Come on ...
I'm studying the survey package
I started by studying this page
But my questions are more basic
I have already loaded the following database
> mydata
id str clu wt hou85 ue91 lab91
1 1 2 1 0.500 26881 4123 33786
2 2 2 1 0.500 26881 4123 33786
3 3 1 10 1.004 9230 1623 13727
4 4 1 4 1.893 4896 760 5919
5 5 1 7 2.173 4264 767 5823
6 6 1 32 2.971 3119 568 4011
7 7 1 26 4.762 1946 331 2543
8 8 1 18 6.335 1463 187 1448
9 9 1 13 13.730 675 129 927
>
I would like to understand very well what is being done in the following code
mydesign <-
svydesign(
id = ~clu ,
data = mydata ,
weight = ~wt ,
strata = ~str
)
What is the role of the id = ~ clu argument?
And what is the role of the argument strata = ~ str?
From the little I read, it seems that some kind of division or separation of the mydata file is happening. But I can not see this ...
Now notice in the following sequence of commands
> summary(mydata$ue91)
Min. 1st Qu. Median Mean 3rd Qu. Max.
129 331 760 1401 1623 4123
>
> options(survey.lonely.psu = "adjust")
> svymean(~ue91, mydesign)
mean SE
ue91 445.18 185.56
First the average is 1401 and then the average is 445.18. Why?
What does SE mean?
Good people, for now my doubts are these
Thank you