MATLAB 多元线性回归(regress)
语法
b = regress(y,X)
[b,bint] = regress(y,X)
[b,bint,r] = regress(y,X)
[b,bint,r,rint] = regress(y,X)
[b,bint,r,rint,stats] = regress(y,X)
[___] = regress(y,X,alpha)
说明
b = regress(y,X) returns a vector b of coefficient estimates for a multiple linear regression of the responses in vector y on the predictors in matrix X. To compute coefficient estimates for a model with a constant term (intercept), include a column of ones in the matrix X.
b=回归(y,X)返回一个系数估计向量b,用于矩阵X中预测器上向量y中的响应的多元线性回归。若要计算具有常数项(截距)的模型的系数估计,请在矩阵X中包含一列。
[b,bint] = regress(y,X) also returns a matrix bint of 95% confidence intervals for the coefficient estimates.
[b,bint]=回归(y,X)也返回系数估计的95%置信区间的矩阵bint。
[b,bint,r] = regress(y,X) also returns an additional vector r of residuals.
[b,bint,r]=回归(y,X)还返回一个残差向量r。
[b,bint,r,rint] = regress(y,X) also returns a matrix rint of intervals that can be used to diagnose outliers.
[b,bint,r,rint]=回归(y,X)还返回一个可用于诊断异常值的间隔矩阵。
[b,bint,r,rint,stats] = regress(y,X) also returns a vector stats that contains the R2 statistic, the F-statistic and its p-value, and an estimate of the error variance. The matrix X must include a column of ones for the software to compute the model statistics correctly.
[b,bint,r,rint,stats]=回归(y,X)还返回一个向量统计,其中包含R2统计量、F-统计量及其p值以及误差方差的估计。矩阵X必须包含一列,以便软件正确计算模型统计数据。
[___] = regress(y,X,alpha) uses a 100*(1-alpha)% confidence level to compute bint and rint. Specify any of the output argument combinations in the previous syntaxes.
[___]=回归(y,x,alpha)使用100*(1-alpha)%置信度来计算bint和rint。在前面的语法中指定任何输出参数组合。