Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down at the end of May, and its replacement, statalist.org is already up and running.


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

RE: st: logistic regression complex samples


From   "Scholes, Shaun" <s.scholes@ucl.ac.uk>
To   "statalist@hsphsun2.harvard.edu" <statalist@hsphsun2.harvard.edu>
Subject   RE: st: logistic regression complex samples
Date   Wed, 7 Dec 2011 19:24:52 +0000

Hi, I have been playing around with this and I was wondering whether one possibility was that Stata would still give the message below if there was only one observation in a strata?

Note: missing standard errors because of stratum with single sampling unit

Just a thought! And perhaps Antonio could check this using (Stata SE 11.1): 

svydes,single

Shaun





-----Original Message-----
From: owner-statalist@hsphsun2.harvard.edu [mailto:owner-statalist@hsphsun2.harvard.edu] On Behalf Of Stas Kolenikov
Sent: 07 December 2011 17:19
To: statalist@hsphsun2.harvard.edu
Subject: Re: st: logistic regression complex samples

Antonio,

it would help if you mentioned the version of Stata that you are using. By default, Stata would use observations as PSUs (and the output of -svyset- would state that -- again, it would help if you included the output of both commands). You can also achieve the effect of specifying observations as PSUs via -svyset _n ...-.

On Wed, Dec 7, 2011 at 10:05 AM, Antonio silva <asilva@inbox.com> wrote:
> Hello,
> I would like to perform binary logistic regression in stratified sampling incorporating 2 variables that represents that design var_weight and var_strata.
> Considering a model with 2 covariates , in SAS I would consider a code like this that works perfectly:
>
> PROC SURVEYLOGISTIC DATA =  dataset
> STRATA var_strata;
>
> WEIGHT var_weight;
>
>
> CLASS covariate1
>      Covariate2  ;
>
> MODEL outcome(event='1')= covariate1 covariate2 /clparm vadjust=none ;
>  Run;
>
>
> I tried an equivalent Stata code but does not work. It seems that in Stata its is always necessary have the cluster variable. But in my design I do not have cluster variable,only weight and strata.
>
> svyset [pweight= var_weight], strata(var_strata)
>
>  svy: logistic outcome i.covariate1 i.covariate2
>
> After run , in the output appears only the OR calculated and a note:
> Note: missing standard errors because of stratum with single sampling unit.
> What is wrong with it?
>
> After that I did some tests considering a fictitious cluster variable and worked.   I suppose this command works only when the 3 design variables weight strata and cluster are used at the same time.

--
Stas Kolenikov, also found at http://stas.kolenikov.name Small print: I use this email account for mailing lists only.

*
*   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/


© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index