Weighting commands

  • Follow


*Version*: SAS 9.2
*Goal of project*: Analyze associations between socio-environmental factors
and type 2 diabetes.
*Goal of this analysis*: obtain weighted descriptive and
multivariate statistics
*Description of data*: CHIS public use data set; >50,000 observations.
Weight variables are already created in the data so I simply need to call
them in.


*Q1.* What is the difference between the WEIGHT command and REPWEIGHT
command?




*Q2.* How do I command SAS to call in variables 1-80 without typing each
var? I kept getting an error when I put a - (dash) between the vars.

PROC FREQ data=melanie;
format                ;
tables T2D * (all vars);
WEIGHT RAKEDW1-RAKEDW80 ;
run;


*Q3.* Is this the appropriate procedure to run after I've created my final
model?

PROC SURVEYLOGISTIC data=melanie;
REPWEIGHTS  RAKEDW1-RAKEDW80 / VARMETHOD=JACKKNIFE;
MODEL T2D = (final model) ;
run;



Many thanks!
~Melanie
0
Reply melanie 3/3/2010 3:54:58 PM

Only question I can answer of those is 2.

For PROC FREQ you can't have multiple weights.  REPWEIGHTs are not intended
to weight the data for simple frequencies ... if CHIS data set is like the
ACS, then it has a WGTP or something like that which is the normal weight
(to weight up to population percentages) separate from the REP weights
(RAKEDW1-80 in your example).

-Joe

On Wed, Mar 3, 2010 at 9:54 AM, Melanie Epstein
<melanie.epstein@gmail.com>wrote:

> *Version*: SAS 9.2
> *Goal of project*: Analyze associations between socio-environmental factors
> and type 2 diabetes.
> *Goal of this analysis*: obtain weighted descriptive and
> multivariate statistics
> *Description of data*: CHIS public use data set; >50,000 observations.
> Weight variables are already created in the data so I simply need to call
> them in.
>
>
> *Q1.* What is the difference between the WEIGHT command and REPWEIGHT
> command?
>
>
>
>
> *Q2.* How do I command SAS to call in variables 1-80 without typing each
> var? I kept getting an error when I put a - (dash) between the vars.
>
> PROC FREQ data=melanie;
> format                ;
> tables T2D * (all vars);
> WEIGHT RAKEDW1-RAKEDW80 ;
> run;
>
>
> *Q3.* Is this the appropriate procedure to run after I've created my final
> model?
>
> PROC SURVEYLOGISTIC data=melanie;
> REPWEIGHTS  RAKEDW1-RAKEDW80 / VARMETHOD=JACKKNIFE;
> MODEL T2D = (final model) ;
> run;
>
>
>
> Many thanks!
> ~Melanie
>
0
Reply snoopy369 (1752) 3/3/2010 4:20:25 PM


1 Replies
203 Views

(page loaded in 0.464 seconds)

Similiar Articles:













7/26/2012 11:11:53 AM


Reply: