<>
BTW, the technical reason for the refusal to provide output seems to be that
-regress- does leave behind the -global- "S_E_cmd" while with the -svy-
option it does not. -modl- depends on this value being there...
*************
webuse highschool, clear
generate male = sex == 1 if !missing(sex)
regress weight height
di "$S_E_cmd"
svy, subpop(male): regress weight height
di "$S_E_cmd"
*************
HTH
Martin
-----Ursprüngliche Nachricht-----
Von: [email protected]
[mailto:[email protected]] Im Auftrag von Helen Connolly
Gesendet: Mittwoch, 27. Januar 2010 10:13
An: [email protected]
Betreff: st: modl and modltbl after svy: regress
Hello,
I would like to use the modl and modltbl commands after svy: regress. I
do the following:
svy, subpop($subpop): regress $wage
modl 1
The response is:
. modl 1
Last estimates not found.
modl must immediately follow an estimation procedure.
r(301);
However, if I look at last estimates, I get:
. ereturn list
scalars:
e(r2) = 0
e(stages) = 1
e(N_sub) = 377278
e(N_subpop) = 4.579482189141677
e(N) = 683840
e(N_pop) = 7.878162752876319
e(N_strata) = 28
e(N_psu) = 402352
e(df_r) = 402324
e(N_strata_omit) = 0
e(singleton) = 0
e(census) = 0
e(k_eq) = 1
e(df_m) = 0
e(rank) = 1
macros:
e(cmd) : "regress"
e(cmdline) : "svy , subpop(employee): regress lnnetmwdp"
e(prefix) : "svy"
e(cmdname) : "regress"
e(command) : "regress lnnetmwdp"
e(estat_cmd) : "svy_estat"
e(vce) : "linearized"
e(vcetype) : "Linearized"
e(title) : "Survey: Linear regression"
e(subpop) : "employee"
e(wexp) : "= nw1"
e(wtype) : "pweight"
e(wvar) : "nw1"
e(singleunit) : "missing"
e(su1) : "casenum"
e(strata1) : "cid"
e(properties) : "b V"
e(marginsok) : "XB default"
e(depvar) : "lnnetmwdp"
e(predict) : "regres_p"
e(model) : "ols"
matrices:
e(b) : 1 x 1
e(V) : 1 x 1
e(V_modelbased) : 1 x 1
e(V_srssub) : 1 x 1
e(V_srs) : 1 x 1
e(_N_strata_certain) : 1 x 1
e(_N_strata_single) : 1 x 1
e(_N_strata) : 1 x 1
functions:
e(sample)
and:
. mat list e(b)
symmetric e(b)[1,1]
_cons
y1 .839104
So the last estimates do exist.
When I rerun the same command using just regress (regress $wage [w=nw1]
if $subpop), the "modl 1" command works.
Can anyone tell me why modl is not recognizing the last estimates for
svy: regress and/or how to fix this?
Thank you,
Helen Connolly
*
* 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/