- 在线时间
- 1340 小时
- 最后登录
- 2025-2-25
- 注册时间
- 2007-9-30
- 听众数
- 65
- 收听数
- 6
- 能力
- 0 分
- 体力
- 12983 点
- 威望
- 4 点
- 阅读权限
- 150
- 积分
- 5199
- 相册
- 12
- 日志
- 34
- 记录
- 36
- 帖子
- 2348
- 主题
- 70
- 精华
- 1
- 分享
- 1
- 好友
- 513

独孤求败
TA的每日心情 | 擦汗 2018-4-26 23:29 |
---|
签到天数: 1502 天 [LV.Master]伴坛终老
- 自我介绍
- 紫薇软剑,三十岁前所用,误伤义士不祥,乃弃之深谷。 重剑无锋,大巧不工。四十岁前恃之横行天下。 四十岁后,不滞于物,草木竹石均可为剑。自此精修,渐进至无剑胜有剑之境。
群组: 计量经济学之性 群组: LINGO |
5#
发表于 2012-8-27 19:58
|只看该作者
|
|邮箱已经成功绑定
本帖最后由 liwenhui 于 2012-8-31 23:35 编辑
使用函数,regress(),具体调用方式见matlab的帮助。 - 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.
-
- [B,BINT] = regress(Y,X) returns a matrix BINT of 95% confidence
- intervals for B.
-
- [B,BINT,R] = regress(Y,X) returns a vector R of residuals.
-
- [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.
-
- [B,BINT,R,RINT,STATS] = regress(Y,X) returns a vector STATS containing, in
- the following order, the R-square statistic, the F statistic and p value
- for the full model, and an estimate of the error variance.
-
- [...] = regress(Y,X,ALPHA) uses a 100*(1-ALPHA)% confidence level to
- compute BINT, and a (100*ALPHA)% significance level to compute 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.
-
- 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.
-
- regress treats NaNs in X or Y as missing values, and removes them.
|
|