QQ登录

只需要一步,快速开始

 注册地址  找回密码
查看: 2954|回复: 7
打印 上一主题 下一主题

[问题求助] 多元回归用matlab怎么算

[复制链接]
字体大小: 正常 放大
wxkdesky        

2

主题

3

听众

35

积分

升级  31.58%

  • TA的每日心情
    郁闷
    2014-9-20 14:24
  • 签到天数: 7 天

    [LV.3]偶尔看看II

    自我介绍
    我是学生

    群组学术交流A

    跳转到指定楼层
    1#
    发表于 2012-8-27 16:46 |只看该作者 |倒序浏览
    |招呼Ta 关注Ta
    多元回归用matlab怎么算呀?不会,有没有示例程序呀?包括求参数,求残差,求置信区间,最后怎么检验?
    zan
    转播转播0 分享淘帖0 分享分享0 收藏收藏1 支持支持0 反对反对0 微信微信

    4

    主题

    4

    听众

    156

    积分

    升级  28%

  • TA的每日心情
    郁闷
    2014-3-24 10:09
  • 签到天数: 41 天

    [LV.5]常住居民I

    群组学术交流B

    回复

    使用道具 举报

    hzs2012        

    3

    主题

    6

    听众

    152

    积分

    升级  26%

  • TA的每日心情
    开心
    2013-2-4 14:45
  • 签到天数: 32 天

    [LV.5]常住居民I

    自我介绍
    hello world

    群组Matlab讨论组

    群组学术交流B

    回复

    使用道具 举报

    hzs2012        

    3

    主题

    6

    听众

    152

    积分

    升级  26%

  • TA的每日心情
    开心
    2013-2-4 14:45
  • 签到天数: 32 天

    [LV.5]常住居民I

    自我介绍
    hello world

    群组Matlab讨论组

    群组学术交流B

    回复

    使用道具 举报

    liwenhui        

    70

    主题

    65

    听众

    5199

    积分

    独孤求败

  • TA的每日心情
    擦汗
    2018-4-26 23:29
  • 签到天数: 1502 天

    [LV.Master]伴坛终老

    自我介绍
    紫薇软剑,三十岁前所用,误伤义士不祥,乃弃之深谷。 重剑无锋,大巧不工。四十岁前恃之横行天下。 四十岁后,不滞于物,草木竹石均可为剑。自此精修,渐进至无剑胜有剑之境。

    社区QQ达人 邮箱绑定达人 发帖功臣 元老勋章 新人进步奖 风雨历程奖 最具活力勋章

    群组计量经济学之性

    群组LINGO

    本帖最后由 liwenhui 于 2012-8-31 23:35 编辑

    使用函数,regress(),具体调用方式见matlab的帮助。
    1. regress Multiple linear regression using least squares.
    2.     B = regress(Y,X) returns the vector B of regression coefficients in the
    3.     linear model Y = X*B.  X is an n-by-p design matrix, with rows
    4.     corresponding to observations and columns to predictor variables.  Y is
    5.     an n-by-1 vector of response observations.

    6.     [B,BINT] = regress(Y,X) returns a matrix BINT of 95% confidence
    7.     intervals for B.

    8.     [B,BINT,R] = regress(Y,X) returns a vector R of residuals.

    9.     [B,BINT,R,RINT] = regress(Y,X) returns a matrix RINT of intervals that
    10.     can be used to diagnose outliers.  If RINT(i,:) does not contain zero,
    11.     then the i-th residual is larger than would be expected, at the 5%
    12.     significance level.  This is evidence that the I-th observation is an
    13.     outlier.

    14.     [B,BINT,R,RINT,STATS] = regress(Y,X) returns a vector STATS containing, in
    15.     the following order, the R-square statistic, the F statistic and p value
    16.     for the full model, and an estimate of the error variance.

    17.     [...] = regress(Y,X,ALPHA) uses a 100*(1-ALPHA)% confidence level to
    18.     compute BINT, and a (100*ALPHA)% significance level to compute RINT.

    19.     X should include a column of ones so that the model contains a constant
    20.     term.  The F statistic and p value are computed under the assumption
    21.     that the model contains a constant term, and they are not correct for
    22.     models without a constant.  The R-square value is one minus the ratio of
    23.     the error sum of squares to the total sum of squares.  This value can
    24.     be negative for models without a constant, which indicates that the
    25.     model is not appropriate for the data.

    26.     If columns of X are linearly dependent, regress sets the maximum
    27.     possible number of elements of B to zero to obtain a "basic solution",
    28.     and returns zeros in elements of BINT corresponding to the zero
    29.     elements of B.

    30.     regress treats NaNs in X or Y as missing values, and removes them.

    点评

    darker50  感谢元老帮忙回答。  发表于 2012-8-28 09:50
    回复

    使用道具 举报

    秋leaves 实名认证       

    26

    主题

    13

    听众

    870

    积分

  • TA的每日心情
    擦汗
    2013-7-31 21:20
  • 签到天数: 80 天

    [LV.6]常住居民II

    群组学术交流A

    群组学术交流B

    liwenhui 发表于 2012-8-27 19:58
    使用函数,regress(),具体调用方式见matlab的帮助。

    regress Multiple linear regression using least  ...

    果断有道翻译了一下
    回复

    使用道具 举报

    傻人招        

    11

    主题

    5

    听众

    172

    积分

    升级  36%

  • TA的每日心情
    奋斗
    2012-9-19 16:56
  • 签到天数: 11 天

    [LV.3]偶尔看看II

    新人进步奖

    群组Matlab讨论组

    群组学术交流B

    群组学术交流A

    数据输入:x1=[1000 600 1200 500 300 400 1300 1100 1300 300]; x2=[5 7 6 6 8 7 5 4 3 9]; y=[100 75 80 70 50 65 90 100 110 60];x=[x1' x2'];回归、检验、预测:rstool(x,y,'purequadratic')   之后得到一个交互画面,给出两幅图形,左边是x2固定时的曲线y(x1)及其置信区间,右边是x1固定时的曲线y(x2)及其置信区间。假如X1为平均收入,x2为价格,y为商品需求量,改变X1或者X2,画面左边的‘predicted y’下方的数据就为对应的y值。  在画面左下方的下拉式菜单中选‘all’,则beta、rmse和residuals都传送到matlab工作区中,在matlab工作区中输入命令 beta,rmse就能得到结果了·~
    回复

    使用道具 举报

    11

    主题

    10

    听众

    689

    积分

    升级  22.25%

  • TA的每日心情
    开心
    2016-7-10 18:26
  • 签到天数: 107 天

    [LV.6]常住居民II

    社区QQ达人 新人进步奖

    群组Matlab讨论组

    群组学术交流A

    群组学术交流B

    群组学术交流C

    群组学术交流D

    回复

    使用道具 举报

    您需要登录后才可以回帖 登录 | 注册地址

    qq
    收缩
    • 电话咨询

    • 04714969085
    fastpost

    关于我们| 联系我们| 诚征英才| 对外合作| 产品服务| QQ

    手机版|Archiver| |繁體中文 手机客户端  

    蒙公网安备 15010502000194号

    Powered by Discuz! X2.5   © 2001-2013 数学建模网-数学中国 ( 蒙ICP备14002410号-3 蒙BBS备-0002号 )     论坛法律顾问:王兆丰

    GMT+8, 2025-7-26 11:22 , Processed in 0.806094 second(s), 100 queries .

    回顶部