|Date: ||Mon, 23 Oct 2006 14:22:01 -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: Intraclass correlation coefficients Using PROC NESTED,
VARCOMP, AND MIXED|
|Content-Type: ||text/plain; format=flowed|
>Dear SAS Users,
>I'm trying to compute the intraclass correlation coefficients for a
>multilevel model. I have subjects nested within counties which are
>nested with states. I used the following PROCS to obtain the estimate
>My code is setup to obtain the ICC for subjects within counties, but
>how do I obtain subjects within counties within states?
>proc sort data=temp_data;
> by state county;
>proc nested data=temp_data;
> class county id;
> var response;
> title'Using PROC NESTED to Estimate Variance Components';
>proc varcomp data=temp_data;
> class id county;
> model response = county id(county);
> title'Using PROC VARCOMP to Estimate Variance Components';
>proc mixed data=temp_data covtest;
> class id county;
> model response= / solution;
> random county id(county)/solution;
> title'Using PROC MIXED TO ESTIMATE VARIANCE COMPONENTS';
>Thank you all!
You have states, then counties, then people? That does not sound
like a multi-level model. That sounds like a multi-stage sample design.
If, in fact, you have a survey sample design, complete with design
effects and sample weights, then you need to stop what you are
doing, and focus instead on a survey analysis approach using PROC
SURVEYREG instead of PROC MIXED.
It sounds like you have a sample that will naturally fall into the
structure of multi-stage sampling. In that case, you have no
ICCs to muck around with, because you are not dealing with
hierarchical lienar model estimation. You only have to focus on
adjusting your sample weights at each stage of sampling, in order
to accommodate things like non-response.
David L. Cassell
3115 NW Norwood Pl.
Corvallis OR 97330
Try the next generation of search with Windows Live Search today!