matlab多元线性函数程序,转:matlab 多元线性回归函数regress的用法--译者dxc0002

REGRESS Multiple linear regression using least squares.

B =

REGRESS(Y,X) returns the vector B of regression coefficients in

the

linear model

Y = X*B. X is an n-by-p design matrix, with

rows

corresponding to observations and columns to predictor

variables. Y is

an n-by-1 vector of response

observations.

REGRESS 多元线性回归——用最小二乘估计法

B = REGRESS(Y,X) ,

返回值为线性模型Y = X*B的回归系数向量

X ,n-by-p 矩阵,行对应于观测值,列对应于预测变量

Y ,n-by-1 向量,观测值的响应(即因变量,译者注)

[B,BINT] =

REGRESS(Y,X) returns a matrix BINT of 95% confidence

intervals for B.

BINT,B的95%的置信区间矩阵

[B,BINT,R] = REGRESS(Y,X) returns a

vector R of residuals.

R,残差向量

[B,BINT,R,RINT] = REGRESS(Y,X) returns a matrix RINT of intervals

that

can be used

to diagnose outliers. If RINT(i,:) does not

contain zero,

then the

i-th residual is larger than would be expected, at the 5%

significance

level. This is evidence that the I-th observation

is an outlier.

RINT,区间矩阵,该矩阵可以用来诊断异常(即发现奇异观测值,译者注)。

如果RINT(i,:)所定区间没有包含0,

则第i个残差在默认的5%的显著性水平比我们所预期的要大,

这可说明第i个观测值是个奇异点

(即说明该点可能是错误而无意义的,如记录错误等,译者注)

[B,BINT,R,RINT,STATS] = REGRESS(Y,X) returns a vector STATS

containing

the R-square

statistic, the F statistic and p value for the full model,

and an estimate of the error

variance.

STATS,向量,包括R方统计量,F统计量,总模型的p值(还不清楚)

和方差的一个估计(还不清楚)

[...] =

REGRESS(Y,X,ALPHA) uses a 100*(1-ALPHA)% confidence level to

compute BINT, and a (100*ALPHA)%

significance level to compute RINT.

用100*(1-ALPHA)%的置信水平来计算BINT,

用(100*ALPHA)%的显著性水平来计算RINT

X should

include a column of ones so that the model contains a constant

term. The F statistic and p value are computed

under the assumption

that the

model contains a constant term, and they are not correct for

models

without a constant. The R-square value is one

minus the ratio of

the error

sum of squares to the total sum of squares. This

value can

be negative

for models without a constant, which indicates that the

model is not appropriate for the

data.

X应该包含一个全“1”的列,这样则该模型包含常数项。

F统计量和p值是在模型有常数项的假设下计算的,

如果模型没有常数项,则计算得的F统计量和p值是不正确的。

the R-square value is one minus the

ratio of the error sum of squares to the total sum of

squares.(此句无法把握,请高手帮忙~~!)

若模型没有常数项,则这个值可以为负值,这也表明这个模型对数据是不合适的。

(即数据不适合用多元线性模型,译者注)

If columns

of X are linearly dependent, REGRESS sets the maximum

possible

number of elements of B to zero to obtain a "basic solution",

and returns

zeros in elements of BINT corresponding to the zero elements of

B.

如果X的列是线性相关的,

则REGRESS将使B的元素中“0”的数量尽量多,

以此获得一个“基本解”,

并且使B中元素“0”所对应的BINT元素为“0”。

REGRESS treats NaNs in X or Y as

missing values, and removes them.

REGRESS 将X或者Y中的NaNs当作缺失值处理,并且移除它们

原创..................dxc0002#163.com

rcoplot(r,rint)

displays an errorbar plot of the confidence intervals on the

residuals from a regression. The residuals appear in the plot in

case order. Inputs r and rint are outputs from the regress

function.

he interval around the first residual, shown in red, does not

contain zero. This indicates that the residual is larger than

expected in 95% of new observations, and suggests the data point is

an outlier.

这是个画残差的函数,红色的表示超出期望值的数据

圆圈代表残差的值,竖线代表置信区间的范围

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值