Re: [R] Problems with weight

2012-12-04 Thread Thomas Lumley
You need to defined a svydesign object that contains all the variables you want to use. This object is passed as the design= argument to all the analysis functions in the survey package. The functions don't have a data= argument, and many of them will not look outside the design= argument for var

Re: [R] Problems with weight

2012-11-28 Thread Milan Bouchet-Valat
Le mercredi 28 novembre 2012 à 14:20 -0300, Pablo Menese a écrit : > Dear Milan... are you serious? > Did you read this? No, I had not read this message when I wrote the mail because you sent two completely different messages in two different threads at about the same time. As you can see, I was r

Re: [R] Problems with weight

2012-11-28 Thread Pablo Menese
Dear Milan... are you serious? Did you read this? I have this problem. test <- svydesign(id=~1,weights=~peso) logit <- svyglm(bach ~ job2 + mujer + egp4 + programa + delay + mdeo + str + evprivate, family=binomial,design=test) then appear: Error in svyglm.survey.design(bach ~ job2 + mujer + eg

Re: [R] Problems with weight

2012-11-27 Thread Milan Bouchet-Valat
Le mardi 27 novembre 2012 à 18:33 -0300, Pablo Menese a écrit : > I can't ... I don't know why but I can't > > When I use it: > > logit <- glm(bach ~ egp4 + programa, weight=wst7, > family=quasibinomial(link"logit")) You were advised to use svyglm(), not glm(). It's usually considered polite to r

Re: [R] Problems with weight

2012-11-27 Thread Pablo Menese
I can't ... I don't know why but I can't When I use it: logit <- glm(bach ~ egp4 + programa, weight=wst7, family=quasibinomial(link"logit")) I reach the same betas that in STATA, but the hypothesis test, the t value, and the std. error is different. I think that the solution can't be so far fro

Re: [R] Problems with weight

2012-11-23 Thread Anthony Damico
from your stata output, it looks like you need to use the survey package in R for step-by-step instructions about how to do this (and comparisons to stata), see http://journal.r-project.org/archive/2009-2/RJournal_2009-2_Damico.pdf once you're ready to run the regression, use svyglm() instead of

[R] Problems with weight

2012-11-23 Thread Pablo Menese
Until a weeks ago I used stata for everything. Now I'm learning R and trying to move. But, in this stage I'm testing R trying to do the same things than I used to do in stata whit the same outputs. I have a problem with the logit, applying weights. in stata I have this output . svy: logit bach job