楼主: SarahLee1212
5118 13

[时间序列问题] 为什么logistic回归结果中提出了一个样本 stata [推广有奖]

  • 0关注
  • 1粉丝

已卖:332份资源

硕士生

74%

还不是VIP/贵宾

-

威望
0
论坛币
894 个
通用积分
3.5006
学术水平
4 点
热心指数
3 点
信用等级
3 点
经验
2926 点
帖子
139
精华
0
在线时间
121 小时
注册时间
2015-7-4
最后登录
2017-5-26

楼主
SarahLee1212 发表于 2015-10-9 17:25:49 |AI写论文

+2 论坛币
k人 参与回答

经管之家送您一份

应届毕业生专属福利!

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

经管之家联合CDA

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

感谢您参与论坛问题回答

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

+2 论坛币
我一共997个数据   可用stata做logistic回归后,结果显示数据只有996,怎么回事呢? Number of obs   =        996
                                                  LR chi2(12)     =      38.84


二维码

扫码加我 拉你入群

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

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

关键词:logistic回归 logistic ogistic logisti logist 样本

沙发
蓝色 发表于 2015-10-9 18:08:10 来自手机
只看结果很难知道什么原因
软件不会出错

藤椅
SarahLee1212 发表于 2015-10-9 18:48:23
蓝色 发表于 2015-10-9 18:08
只看结果很难知道什么原因
软件不会出错
我看一篇博士论文  他观测值126,可logistic结果中number of obs是122,是什么原因呢 ?谢谢了

板凳
蓝色 发表于 2015-10-9 18:59:17
我猜不出来

报纸
andruw 在职认证  发表于 2015-10-9 19:35:46
蓝色 发表于 2015-10-9 18:59
我猜不出来
可能有missing data

地板
andruw 在职认证  发表于 2015-10-9 19:35:54
蓝色 发表于 2015-10-9 18:59
我猜不出来
可能有missing data

7
SarahLee1212 发表于 2015-10-10 08:07:16
andruw 发表于 2015-10-9 19:35
可能有missing data
这样结果可以用吗?我看其他论文也有这种情况

8
SarahLee1212 发表于 2015-10-10 08:07:51
蓝色 发表于 2015-10-9 18:59
我猜不出来
亲 我问一下Hosmer-Lemeshow拟合度检验的命令是什么啊?我没找到

9
蓝色 发表于 2015-10-10 16:10:33

Title

    [R] logit postestimation -- Postestimation tools for logit


Description

    The following postestimation commands are of special interest after logit:

    Command               Description
    ---------------------------------------------------------------------------------------
    estat classification  report various summary statistics, including the classification
                            table
    estat gof             Pearson or Hosmer-Lemeshow goodness-of-fit test

10
蓝色 发表于 2015-10-10 16:11:28

Title

    [R] estat gof -- Pearson or Hosmer-Lemeshow goodness-of-fit test


Syntax

        estat gof [if] [in] [weight] [, options]

    gof_options           Description
    ---------------------------------------------------------------------------------------
    Main
      group(#)            perform Hosmer-Lemeshow goodness-of-fit test using # quantiles
      all                 execute test for all observations in the data
      outsample           adjust degrees of freedom for samples outside estimation sample
      table               display table of groups used for test
    ---------------------------------------------------------------------------------------
    fweights are allowed; see weight.
    estat gof is not appropriate after the svy prefix.


Menu for estat

    Statistics > Postestimation > Reports and statistics


Description

    estat gof reports the Pearson goodness-of-fit test or the Hosmer-Lemeshow
    goodness-of-fit test.

    estat gof requires that the current estimation results be from logistic, logit, or
    probit.  For estat gof after poisson, see [R] poisson postestimation.  For estat gof
    after sem, see [SEM] estat gof.


Options

        +------+
    ----+ Main +---------------------------------------------------------------------------

    group(#) specifies the number of quantiles to be used to group the data for the
        Hosmer-Lemeshow goodness-of-fit test.  group(10) is typically specified.  If this
        option is not given, the Pearson goodness-of-fit test is computed using the
        covariate patterns in the data as groups.

    all requests that the statistic be computed for all observations in the data, ignoring
        any if or in restrictions specified by the estimation command.

    outsample adjusts the degrees of freedom for the Pearson and Hosmer-Lemeshow
        goodness-of-fit tests for samples outside the estimation sample.  See Samples other
        than the estimation sample in [R] estat gof.

    table displays a table of the groups used for the Hosmer-Lemeshow or Pearson
        goodness-of-fit test with predicted probabilities, observed and expected counts for
        both outcomes, and totals for each group.


Examples

    Setup
        . webuse lbw

    Fit logistic regression to predict low birth weight
        . logistic low age lwt i.race smoke ptl ht ui

    Perform goodness-of-fit test
        . estat gof

    Same as above, but use 10 quantiles
        . estat gof, group(10)

    Same as above, but display table of groups used for test
        . estat gof, group(10) table


Stored results

    estat gof stores the following in r():

    Scalars   
      r(N)                number of observations
      r(m)                number of covariate patterns or groups
      r(df)               degrees of freedom
      r(chi2)             chi-squared

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

本版微信群
加好友,备注jltj
拉您入交流群
GMT+8, 2025-12-31 05:43