全部版块 我的主页
论坛 计量经济学与统计论坛 五区 计量经济学与统计软件 Stata专版
6557 5
2012-05-07
各位大侠,用stata做boxcox转换,遇到麻烦了,我相对y进行boxcox转换后,做出转换后的值与x的散点图,哪位高手能把命令或程序写给我呢?万分感谢!
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

全部回复
2012-5-8 08:51:35
如果不是非要用Stata不可,那么Minitab做Boxcox是再好不过的啦
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2012-5-8 13:33:49
下载了minitab,试了一下,好像成功了,非常感谢
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2012-5-8 13:59:24
不知道是不是下面的这个命令

Title

    [R] lnskew0 -- Find zero-skewness log or Box-Cox transform


Syntax

    Zero-skewness log transform

        lnskew0 newvar = exp [if] [in] [, options]


    Zero-skewness Box-Cox transform

        bcskew0 newvar = exp [if] [in] [, options]


    options       Description
    -----------------------------------------------------------------------------------------
    Main
      delta(#)    increment for derivative of skewness function; default is delta(0.02) for
                    lnskew0 and delta(0.01) for bcskew0
      zero(#)     value for determining convergence; default is zero(0.001)
      level(#)    set confidence level; default is level(95)
    -----------------------------------------------------------------------------------------


Menu

    lnskew0

        Data > Create or change data > Other variable-creation commands > Zero-skewness log
            transform

    bcskew0

        Data > Create or change data > Other variable-creation commands > Box-Cox transform


Description

    lnskew0 creates newvar = ln(+/-exp - k), choosing k and the sign of exp so that the
    skewness of newvar is zero.

    bcskew0 creates newvar = (exp^L - 1)/L, the Box-Cox power transformation (Box and Cox
    1964), choosing L so that the skewness of newvar is zero.  exp must be strictly positive.
    Also see [R] boxcox for maximum likelihood estimation of L.


二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2012-5-8 19:34:26
boxcox y x
mat b=e(b)
mat b=b[1,"theta:_cons"]
g yb=(y^det(b)-1)/det(b)
sc yb x
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2012-11-6 21:18:21
sungmoo 发表于 2012-5-8 19:34
boxcox y x
mat b=e(b)
mat b=b[1,"theta:_cons"]
非常感谢!
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

相关推荐
栏目导航
热门文章
推荐文章

说点什么

分享

扫码加好友,拉您进群
各岗位、行业、专业交流群