PROC SURVEYMEANS gives incorrect grand total estim when more than 1 replication (iteration) involved

Reply
New Contributor
Posts: 3

PROC SURVEYMEANS gives incorrect grand total estim when more than 1 replication (iteration) involved

hi, everyone. I need to estimate the grand total income of my population. I can calculate the real value of the population. In the code attached (Projekt 4) I'm importing the data contained in the attached doc (Projekt Data.csv). When I have the Proc Surveyselect with reps=1 (line 109) and then use Proc Surveymeans, the result of the MEANS Proc yields an approx estimate of the actual value which for that estimate is more or less credible. however, if in line 109 reps=2, the estimate becomes twice bigger, approx 3 times bigger for three iterations, etc. In other words, the estimates sort of sum up. 

 

Any ideas of why this is the case??

 

P.S. I noticed though that if I use a command mean instead of sum in line 195, the estimate of the mean income doesn't add up when increasing iterations. Also, the variance goes down with more iterations, thus making me feel that it does the right thing. So, it's the total income that's not working... 

 

I'm using SAS Studio using an internet browser. Free for students. 

 

I'd be grateful for any kind of help. 

Attachment
Attachment
PROC Star
Posts: 7,427

Re: PROC SURVEYMEANS gives incorrect grand total estim when more than 1 replication (iteration) invo

You attached two copies of your data, rather than your data and code.

 

Art, CEO, AnalystFinder.com

 

New Contributor
Posts: 3

Re: PROC SURVEYMEANS gives incorrect grand total estim when more than 1 replication (iteration) invo

Oh, thanks a lot. I've attached the code now. 

Attachment
PROC Star
Posts: 7,427

Re: PROC SURVEYMEANS gives incorrect grand total estim when more than 1 replication (iteration) invo

Two quick questions:

1. Is there a reason you used Rendtel.mz2002 TWICE in creating the dataset mz?

2. Your initial use of proc surveyselect uses mz2. Where did that file come from?

 

Art, CEO, AnalystFinder.com

 

Ask a Question
Discussion stats
  • 3 replies
  • 135 views
  • 0 likes
  • 2 in conversation