Cat,
Why are you using the survey package here? glm(MASS) also does logit, and so
does zelig. Unless you specify some weights, the survey package is of little
gain here.
If you want to stick with the survey package, the problem to me seems as if
idcode is not a unique identifier in the truncated data (maybe because every
country appears twice?). Try idcode=~1 instead, that will count every
observation as equal.
Jens
From:
clkelly.harvard.edu at
gmail.com [
mailto:clkelly.harvard.edu at
gmail.com]
On Behalf Of Catherine Kelly
Sent: Saturday, March 29, 2008 5:51 PM
To: gov2001-l at
lists.fas.harvard.edu
Cc: Jens Hainmueller
Subject: Survey package question
Dear List,
I am running a logit model on the following data, and I have truncated my
data set (a panel data set with country year as the unit of analysis) from
the original 418 country-year observations (rows) to 275 observations
(rows).??? This is the data.4 that I specify in model.4 below:
model.4 <- svydesign(ids=idcode, strata=NULL, weights=NULL, data=data.4)
However, when I attempt to run the logit model in the survey package, I
enter this
#Running Model 1 with three individual year lags in DV included
multilag.logit1 <-
svyglm(dintensity~lag1yr1+lag2yr1+lag3yr1+polity2l+gdpenl+oil+lpop+epop+p901
0.prime+provcont+eprovcont+lsbextex+lsgrtex+lsbextex*p9010.prime+epop*p9010.
prime+epop*lsgrtex+provcont*eprovcont, design=model.4,
family=quasibinomial(link="logit"))
and get the following error:
Error in `$<-.data.frame`(`*tmp*`, ".survey.prob.weights", value =
c(0.00239234449760766,? :
? replacement has 418 rows, data has 275
I am confused because nothing in my data is 418 rows long any more.? Any
clue as to what R is trying to tell me?
Many thanks,
Cat
On Sat, Mar 29, 2008 at 1:12 PM, <johns18 at fas.harvard.edu> wrote:
Does anyone know how to make R include missing data as its own row in
contingency tables? thanks!
_______________________________________________
gov2001-l mailing list
gov2001-l at
lists.fas.harvard.edu
http://lists.fas.harvard.edu/mailman/listinfo/gov2001-l
--
Catherine Lena Kelly
Ph.D. Student
Harvard University Department of Government