BookmarkSubscribeRSS Feed
Lolapo
Calcite | Level 5

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. 

3 REPLIES 3
art297
Opal | Level 21

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

 

Art, CEO, AnalystFinder.com

 

Lolapo
Calcite | Level 5

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

art297
Opal | Level 21

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

 

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 3 replies
  • 544 views
  • 0 likes
  • 2 in conversation