LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (April 2006, week 2)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Fri, 14 Apr 2006 11:28:52 -0700
Reply-To:   David L Cassell <davidlcassell@MSN.COM>
Sender:   "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:   David L Cassell <davidlcassell@MSN.COM>
Subject:   Re: Logistic regression w/survey data
In-Reply-To:   <20060414142843.61576.qmail@web51511.mail.yahoo.com>
Content-Type:   text/plain; format=flowed

axnjxntx@yahoo.com wrote back: >Just to clarify - >I did get the same results (betas/ORs, results from >the Wald F-test/Wald Chi-sq test) when using both >SURVEYLOGISTIC and RLOGIST with the regular weights >(i.e. not the scaled weights). >I was concerned when I saw the R-square value from >SURVEYLOGISTIC (which I had shown previously was 1). >The R-square from the RLOGIST results was .4782. > >I don't believe there is anything odd with the data. > >The code I have used (for both SAS & SUDAAN) is: > >SURVEYLOGISTIC: >proc surveylogistic data=two; > where 1 <= race_m <=3; > weight wt; > strata stratum2; > cluster psu2; > class dur (order=internal) race_m (order=internal) >smkcat (order=internal) > agegrp cigday (order=internal) qn2 qn13b >(order=internal) / param=ref ref=first; > model tds2 = agegrp qn2 race_m dur smkcat cigday >qn13b / rsq; > format dur dur. smkcat smkcat. agegrp agegrp. cigday >cigday. qn13b qn13b. > tds2 tds2f.; >run; > >RLOGIST: >proc sort data=two; > by stratum2 psu2; >run; > >proc rlogist data=two design=wr filetype=sas; > nest stratum2 psu2 / missunit; > weight wt; > subgroup dur race_m smkcat agegrp cigday qn2 qn13b; > levels 3 3 3 2 4 2 6; > reflevel race_m=1 dur=1 smkcat=1 agegrp=1 cigday=1 >qn13b=1; > model tds2 = agegrp qn2 race_m dur smkcat cigday >qn13b; > rformat dur dur.; rformat smkcat smkcat.; rformat >agegrp agegrp.; > rformat cigday cigday.; rformat qn13b qn13b.; > print / style=nchs; > print hlchisq hlchidf hlchip / style=nchs; > print / hlgroups=all style=nchs; > TITLE "Model 1: outcome is tobacco dependence >score"; > title2 "Co-variates: age groups, sex, >race/ethnicity, smoking stage, duration, CPD, and # >days smoked"; > title3 "First attempt at model"; >run; > > >As an aside, I tried a logistic regression using >SURVEYLOGISTIC with some NHIS data (from the National >Center for Health Statistics). I normally use SUDAAN, >but wanted to see what the results would be. Again, >the ORs and results from the Wald tests were the same >when comparing SURVEYLOGISTIC with RLOGIST. However, >I found that the R-square value from SURVEYLOGISTIC >was 1. And the r-square value from RLOGIST was .0286. > >Any thoughts? Does anything look funny w/my code?

It's pretty hard to tell what's going on from way over here with no idea of your sample design.

But I would appreciate it if you would write back to SAS-L and explain how STRATUM2 and PSU2 fit into the sample design. They're not part of the second stage of the sample, are they?

One of the features of the SAS survey analysis procs is that the STRATUM and CLUSTER statements should only be fed the design information from the first-stage of a multi-stage sample. If you have strata and/or clusters at stages 2, 3, ... then those do not go into the design effects in the STRATUM and CLUSTER statements. So that's the only thing that is occurring to me that might be affecting your results like this.

HTH, David -- David L. Cassell mathematical statistician Design Pathways 3115 NW Norwood Pl. Corvallis OR 97330

_________________________________________________________________ Don’t just search. Find. Check out the new MSN Search! http://search.msn.click-url.com/go/onm00200636ave/direct/01/


Back to: Top of message | Previous page | Main SAS-L page