[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

From |
"Martin Weiss" <[email protected]> |

To |
<[email protected]> |

Subject |
st: AW: AW: RE: AW: modl and modltbl after svy: regress |

Date |
Wed, 27 Jan 2010 15:16:21 +0100 |

<> BTW, Ben (sorry for misspelling in previous post), is there a way to get around the error caused by the following code? ************* tr: forv i=1/10{ di `i' } ************* I constantly get "program error: matching close brace not found" (error 198). For loops, -tr- is particularly useful, so a fix would be nice. HTH Martin -----Ursprüngliche Nachricht----- Von: [email protected] [mailto:[email protected]] Im Auftrag von Martin Weiss Gesendet: Mittwoch, 27. Januar 2010 15:11 An: [email protected] Betreff: st: AW: RE: AW: modl and modltbl after svy: regress <> " The message for others is to look at the code to see where the message is being issued." To this end, I tend to use Benn`s prefix -ssc d tr-, the difference to -set trace on- being that it switches itself off automatically afterwards - which prevents nasty surprises in terms of cluttered screens. Still, even with the -trace-d output it is not always straightforward to pin down the problem reliably. Every Statalister should - before posting to the list - ask himself/herself whether the sheer age of a particular solution could be the problem. In this case, the last update to the command had been in Aug 1997 (!). -which-, followed by the command name, quickly reveals such obvious issues. HTH Martin -----Ursprüngliche Nachricht----- Von: [email protected] [mailto:[email protected]] Im Auftrag von Nick Cox Gesendet: Mittwoch, 27. Januar 2010 15:02 An: [email protected] Betreff: st: RE: AW: modl and modltbl after svy: regress That's my reading too. But how did Martin find this out? The message for others is to look at the code to see where the message is being issued. To do this you do _not_ need to be a Stata programmer yourself (although any and all experience can help you find a solution faster). Another message is that it does help people to understand your question if you specify where user-written software you are referring to comes from. This practice should be standard, as the FAQ requests it, but recently it has become rare. Not only does it help people who answer posts work out what the problem is, it also increases your chance of getting a reply at all. Nick [email protected] Martin Weiss 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" ************* Helen Connolly 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? * * 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/ * * 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/

**References**:**st: modl and modltbl after svy: regress***From:*Helen Connolly <[email protected]>

**st: AW: modl and modltbl after svy: regress***From:*"Martin Weiss" <[email protected]>

**st: RE: AW: modl and modltbl after svy: regress***From:*"Nick Cox" <[email protected]>

**st: AW: RE: AW: modl and modltbl after svy: regress***From:*"Martin Weiss" <[email protected]>

- Prev by Date:
**st: AW: RE: AW: modl and modltbl after svy: regress** - Next by Date:
**RE: st: help creating a table of means and diffs with svy data** - Previous by thread:
**st: AW: RE: AW: modl and modltbl after svy: regress** - Next by thread:
**st: RE: AW: RE: AW: modl and modltbl after svy: regress** - Index(es):

© Copyright 1996–2024 StataCorp LLC | Terms of use | Privacy | Contact us | What's new | Site index |