楼主: 饺子大神
11392 11

[数据管理求助] 有序变量转化为连续变量 [推广有奖]

  • 0关注
  • 2粉丝

博士生

52%

还不是VIP/贵宾

-

威望
0
论坛币
0 个
通用积分
53.2826
学术水平
4 点
热心指数
5 点
信用等级
4 点
经验
2499 点
帖子
254
精华
0
在线时间
153 小时
注册时间
2011-11-28
最后登录
2022-8-17

楼主
饺子大神 发表于 2016-7-25 15:12:53 |AI写论文

+2 论坛币
k人 参与回答

经管之家送您一份

应届毕业生专属福利!

求职就业群
赵安豆老师微信:zhaoandou666

经管之家联合CDA

送您一个全额奖学金名额~ !

感谢您参与论坛问题回答

经管之家送您两个论坛币!

+2 论坛币
有一个指标是自评健康[1-4]分别表示poor,fair,good,excellent.
我看了一篇文章,里面讲:“使用ordered probit 模型为自评健康变量赋值,将之调整成连续变量,并转换为[0,1]区间的一个数值”。然后讲了原理(见图片)

但是我硬是没看懂,所以也不知道放在stata里面应该怎么操作,求哪位大神指点~


PS:我把那篇文章放在附件里面了,然后自评健康指标的解释在85-86页。

二维码

扫码加我 拉你入群

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

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

关键词:连续变量 excellent ordered Probit EXCELL 文章 健康 模型

沙发
饺子大神 发表于 2016-7-25 16:38:24
所以是要自己选择X去预测健康潜变量?!

藤椅
饺子大神 发表于 2016-7-25 16:49:47
别告诉我 只是用最后公式(11)把自评健康标准化[0,1]...但是那个h*到底是什么?

板凳
饺子大神 发表于 2016-7-25 17:11:37
这个用stata要如何实现...

报纸
蓝色 发表于 2016-7-25 17:18:38
线性回归完,可以求Y的预测值

这里一样啊;模型8估计完,可以求出预测值h*





Title

    [R] oprobit postestimation -- Postestimation tools for oprobit

Description
    The following postestimation commands are available after oprobit:
    Command              Description
    -----------------------------------------------------------------------------------------------------------
        contrast         contrasts and ANOVA-style joint tests of estimates
        estat ic         Akaike's and Schwarz's Bayesian information criteria (AIC and BIC)
        estat summarize  summary statistics for the estimation sample
        estat vce        variance-covariance matrix of the estimators (VCE)
        estat (svy)      postestimation statistics for survey data
        estimates        cataloging estimation results
    (1) forecast         dynamic forecasts and simulations
        lincom           point estimates, standard errors, testing, and inference for linear combinations of
                           coefficients
        linktest         link test for model specification
    (2) lrtest           likelihood-ratio test
        margins          marginal means, predictive margins, marginal effects, and average marginal effects
        marginsplot      graph the results from margins (profile plots, interaction plots, etc.)
        nlcom            point estimates, standard errors, testing, and inference for nonlinear combinations of
                           coefficients
        predict          predictions, residuals, influence statistics, and other diagnostic measures
        predictnl        point estimates, standard errors, testing, and inference for generalized predictions
        pwcompare        pairwise comparisons of estimates
        suest            seemingly unrelated estimation
        test             Wald tests of simple and composite linear hypotheses
        testnl           Wald tests of nonlinear hypotheses
    -----------------------------------------------------------------------------------------------------------
    (1) forecast is not appropriate with mi or svy estimation results.
    (2) lrtest is not appropriate with svy estimation results.




Syntax for predict


        predict [type] {stub* | newvar | newvarlist} [if] [in] [, statistic outcome(outcome) nooffset]
        predict [type] {stub* | newvarlist} [if] [in] , scores


    statistic          Description
    -----------------------------------------------------------------------------------------------------------
    Main
      pr               predicted probabilities; the default
      xb               linear prediction
      stdp             standard error of the linear prediction
    -----------------------------------------------------------------------------------------------------------
    If you do not specify outcome(), pr (with one new variable specified) assumes outcome(#1).
    You specify one or k new variables with pr, where k is the number of outcomes.
    You specify one new variable with xb and stdp.
    These statistics are available both in and out of sample; type predict ... if e(sample) ... if wanted only
      for the estimation sample.




Menu for predict
    Statistics > Postestimation > Predictions, residuals, etc.

Options for predict
        +------+
    ----+ Main +-----------------------------------------------------------------------------------------------
    pr, the default, calculates the predicted probabilities.  If you do not also specify the outcome() option,
        you specify k new variables, where k is the number of categories of the dependent variable.  Say that
        you fit a model by typing oprobit result x1 x2, and result takes on three values.  Then you could type
        predict p1 p2 p3 to obtain all three predicted probabilities.  If you specify the outcome() option, you
        must specify one new variable.  Say that result takes on the values 1, 2, and 3.  Typing predict p1,
        outcome(1) would produce the same p1.


    xb calculates the linear prediction.  You specify one new variable, for example, predict linear, xb.  The
        linear prediction is defined, ignoring the contribution of the estimated cutpoints.


    stdp calculates the standard error of the linear prediction.  You specify one new variable, for example,
        predict se, stdp.


    outcome(outcome) specifies for which outcome the predicted probabilities are to be calculated.  outcome()
        should contain either one value of the dependent variable or one of #1, #2, ..., with #1 meaning the
        first category of the dependent variable, #2 meaning the second category, etc.


    nooffset is relevant only if you specified offset(varname) for oprobit.  It modifies the calculations made
        by predict so that they ignore the offset variable; the linear prediction is treated as xb rather than
        as xb + offset.


    scores calculates equation-level score variables.  The number of score variables created will equal the
        number of outcomes in the model.  If the number of outcomes in the model was k, then


        The first new variable will contain the derivative of the log likelihood with respect to the regression
        equation.


        The other new variables will contain the derivative of the log likelihood with respect to the cutpoints.




Examples

    Setup
        . webuse fullauto
        . oprobit rep77 i.foreign length mpg


    Predicted probabilities of an excellent repair record
        . predict exc if e(sample), outcome(5)


    Histogram of predicted probabilities
        . histogram exc


    Linear prediction
        . predict pscore, xb


地板
饺子大神 发表于 2016-7-25 17:23:23
蓝色 发表于 2016-7-25 17:18
线性回归完,可以求Y的预测值

这里一样啊;模型8估计完,可以求出预测值h*
我晓得了,少看了文章中的一句话“回归方程( 8) 和( 12) 中使用的各变量的定义和混合横截面数据的描述性统计见表 1。”
我先试试看~谢谢蓝老师~

7
jiaojiaocai 发表于 2016-12-8 23:09:13
请问, 式( 8) 的线性预测值可以用来衡量个人健康状况,是不是说明直接用式( 8)回归完,然后用求线性预测值?难道就是这一个步骤吗?还有这个min (hi*) 和 max(hi*) 是不是预测值的上下限,还是怎么求,感谢解答,在线等。

8
jiaojiaocai 发表于 2016-12-8 23:37:16
但是按照我上面说的,计算出来的连续变量SAHi在0.5左右徘徊。 可是齐老师和李老师计算出来的要大于0.6,所以我不清楚我自己计算的是不是正确。

9
vivien0520 发表于 2021-9-27 10:55:05
饺子大神 发表于 2016-7-25 17:23
我晓得了,少看了文章中的一句话“回归方程( 8) 和( 12) 中使用的各变量的定义和混合横截面数据的描述性统 ...
请问将定序变量转换为连续变量 如何在stata中操作呢?盼复!

10
糯糯年糕 发表于 2023-6-3 18:03:56
jiaojiaocai 发表于 2016-12-8 23:37
但是按照我上面说的,计算出来的连续变量SAHi在0.5左右徘徊。 可是齐老师和李老师计算出来的要大于0.6,所以 ...
看样本吧

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

本版微信群
加好友,备注jltj
拉您入交流群
GMT+8, 2026-2-7 09:25