BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
shovakc
Fluorite | Level 6

My dataset has 28 replicate weights and I use them in "PROC SURVEYFREQ" using the repweights statement. In the results viewer, I noticed in the Variance Estimation table that the number of replicates is listed as 12. Why is there a discrepancy in the number of replicate weights in the dataset and the results viewer? 

1 ACCEPTED SOLUTION

Accepted Solutions
ballardw
Super User

Try

 

REPWEIGHTS CI_FWT1 - CI_FWT28;

 

You didn't say but I suspect that the replicates used were CI_FWT1, CI_FWT10 through 19 and CI_FWT28

Reason:

CI_FWT1: says use all of the variables that start with CI_FWT1    ( first 11 variable as above)

and then ADDED the CI_FWT28.

 

Test this by using:

data junk;

    set CIrear15;

    keep CI_FWT1:CI_FWT28;

run;

and see if the variables I mentioned are the only ones in the set.

The - says to use the numbered range in the list 1 through 28.

 

View solution in original post

4 REPLIES 4
ballardw
Super User

Please post the code used. Other options may have influence on the result.

 

Also from the documentation:

Each REPWEIGHTS variable should contain the weights for a single replicate, and the number of replicates equals the number of REPWEIGHTS variables. The REPWEIGHTS variables must be numeric, and the variable values must be nonnegative numbers.

 

So how many variables were on your REPWEIGHTS statement?

This could also be the case of analyzing one or more variables with low frequency that had missing values for all the records in some replicates.

 

 

 

shovakc
Fluorite | Level 6

Thanks. Here is the code.

 

proc surveyfreq data=CIrear15;
REPWEIGHTS CI_FWT1:CI_FWT28;
weight CI_FWT0;
TABLES SEAT_BELT;
run;

 

There are 28 replicate weights and they are all numeric and nonnegative numbers. I do not get any error or warning messages when I run this code. I am just curious why the results window shows 12 replicate weights even though there are 28 replicate weights in the dataset.

ballardw
Super User

Try

 

REPWEIGHTS CI_FWT1 - CI_FWT28;

 

You didn't say but I suspect that the replicates used were CI_FWT1, CI_FWT10 through 19 and CI_FWT28

Reason:

CI_FWT1: says use all of the variables that start with CI_FWT1    ( first 11 variable as above)

and then ADDED the CI_FWT28.

 

Test this by using:

data junk;

    set CIrear15;

    keep CI_FWT1:CI_FWT28;

run;

and see if the variables I mentioned are the only ones in the set.

The - says to use the numbered range in the list 1 through 28.

 

shovakc
Fluorite | Level 6
Thank you for the suggestion! That worked. I was using the wrong code.

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

What is ANOVA?

ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 4 replies
  • 5430 views
  • 0 likes
  • 2 in conversation