Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: st: goodness of fit svy: probit
From
Bart van Rijsbergen <[email protected]>
To
[email protected]
Subject
Re: st: goodness of fit svy: probit
Date
Thu, 10 Feb 2011 12:02:27 +0100
Dear Maarten,
I'm Using Stata/SE 10.1
Output of your adjusted do-file below.
Bart
. webuse nhanes2f
. svyset psuid [pweight=finalwgt], strata(stratid)
pweight: finalwgt
VCE: linearized
Single unit: missing
Strata 1: stratid
SU 1: psuid
FPC 1: <zero>
. svy: probit diabetes i.race age height weight female rural
(running probit on estimation sample)
i: operator invalid
an error occurred when svy executed probit
r(198);
. estat gof
last estimates not found
r(301);
. quietly: tab race, gen(race)
. svy: probit diabetes race2 race3 age height weight female rural
(running probit on estimation sample)
Survey: Probit regression
Number of strata = 31 Number of obs = 10335
Number of PSUs = 62 Population size = 116997257
Design df = 31
F( 7, 25) = 59.26
Prob > F = 0.0000
------------------------------------------------------------------------------
| Linearized
diabetes | Coef. Std. Err. t P>|t| [95% Conf. Interval]
-------------+----------------------------------------------------------------
race2 | .3370688 .0691827 4.87 0.000 .1959698 .4781678
race3 | -.1239669 .1350437 -0.92 0.366 -.3993904 .1514566
age | .0255013 .0018595 13.71 0.000 .0217088 .0292937
height | -.011303 .004224 -2.68 0.012 -.0199178 -.0026881
weight | .0108959 .001727 6.31 0.000 .0073736 .0144182
female | .1020087 .0735978 1.39 0.176 -.048095 .2521125
rural | .0428421 .0556401 0.77 0.447 -.0706367 .1563209
_cons | -2.069001 .7010847 -2.95 0.006 -3.498872 -.6391288
------------------------------------------------------------------------------
. estat gof
invalid subcommand gof
r(321);
. svy: probit diabetes age height weight female rural
(running probit on estimation sample)
Survey: Probit regression
Number of strata = 31 Number of obs = 10335
Number of PSUs = 62 Population size = 116997257
Design df = 31
F( 5, 27) = 50.66
Prob > F = 0.0000
------------------------------------------------------------------------------
| Linearized
diabetes | Coef. Std. Err. t P>|t| [95% Conf. Interval]
-------------+----------------------------------------------------------------
age | .0249637 .0019366 12.89 0.000 .0210139 .0289134
height | -.0112541 .0040786 -2.76 0.010 -.0195725 -.0029356
weight | .0119266 .00173 6.89 0.000 .0083982 .015455
female | .1179433 .0723124 1.63 0.113 -.0295387 .2654254
rural | .0021713 .0543817 0.04 0.968 -.1087409 .1130834
_cons | -2.083342 .6704638 -3.11 0.004 -3.450762 -.7159218
------------------------------------------------------------------------------
. estat gof
invalid subcommand gof
r(321);
2011/2/10 Maarten buis <[email protected]>:
> --- On Thu, 10/2/11, Bart van Rijsbergen wrote:
>> I'm trying to calculate a goodness of fit measure after
>> estimating a probit model using svy. According to my
>> information, -estat gof- should be able to perform a
>> goodness-of-fit test for -svy: probit-.
>> I get the following message: invalid subcommand gof
>> r(321);
>
> I cannot reproduce that error. The following example works
> fine for me:
>
> *---------------- begin example ---------------------------
> webuse nhanes2f
> svyset psuid [pweight=finalwgt], strata(stratid)
> svy: probit diabetes i.race age height weight female rural
> estat gof
> *----------------- end example ----------------------------
>
> What version of Stata are you using? Can you change the
> example above so that it reproduces your error?
>
> Hope this helps,
> Maarten
>
> --------------------------
> Maarten L. Buis
> Institut fuer Soziologie
> Universitaet Tuebingen
> Wilhelmstrasse 36
> 72074 Tuebingen
> Germany
>
> http://www.maartenbuis.nl
> --------------------------
>
>
>
>
> *
> * For searches and help try:
> * http://www.stata.com/help.cgi?search
> * http://www.stata.com/support/statalist/faq
> * http://www.ats.ucla.edu/stat/stata/
>
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/