Hi Evann,
Just from looking at your code, it's pretty difficult to see what's
wrong since it looks like you are doing it right. Plus, I googled the
error (always a good idea!), and didn't get much info. Are you sure
there's nothing funny going on with any of the other covariates? Are
there other variables that are collinear with the treatment variable?
Other things to check (just from looking at the manual)
- both data and cfact must be coercable to data frames
- they must be labeled
- all variables appearing in formula must also appear in both data and cfact
Start with those and see where you are. Also -- If you're able to run
Zelig on the same line of code, can you also try running WhatIf along
with Zelig? For example, you can do something like
z.out <- zelig(t ~ x + y, data = sqdata, model =
"logit")
x.out <- setx(z.out, x = 2, y = 3)
summary(whatif(data = z.out, cfact = x.out))
Maya
On Wed, Mar 31, 2010 at 8:18 PM, Evann Smith <egsmith at fas.harvard.edu> wrote:
Hi all,
I'm trying to run King's Whatif package and I keep getting the
following error:
?> model1.cntrl <-whatif(formula= ~ lrexclpop + egipgrps + pimppast+
gdpcapl + lpopl + ongoingwarl + year, data=WCM[WCM$newonset==1,],
cfact=WCM[WCM$newonset==0,])
[1] "Preprocessing data ..."
Error in whatif(formula = ~lrexclpop + egipgrps + pimppast + gdpcapl
+ ?:
? there are no cases in 'cfact' without missing values
This makes no sense to me, as the model ran fine with glm, zelig, etc.
newonset is the dichotomous dependent variable. There are 6940 cases
where newonset is 0 and 215 where it is 1.
Has anyone else used this package and made it work and/or had issues?
Best,
Evann
====================================
Evann Smith
Doctoral Student
Harvard University, Department of Government
egsmith at
fas.harvard.edu
====================================
_______________________________________________
gov2001-l mailing list
gov2001-l at
lists.fas.harvard.edu
http://lists.fas.harvard.edu/mailman/listinfo/gov2001-l