You might try the following:
1) gen.low <- setx(z.out2, numeric=median, ordered=median, others=mode, nkgender
= 1)
That should simplify the function and account for everything, since it might be
getting hung up in the number of functions it's running.
Another thing that gave us the same error was trying to set just the value of
one variable to fixed value. We used a logit.survey, and we could only run the
function if we set two things to specific values or vectors i.e.,
2) ruler=seq(x:y, by=z) ##Assuming gender is a sequence for the moment...
gen.low <- setx(z.out2, numeric=median, ordered=median, others=mode, nkgender
=ruler, nkclass=1)
This worked for setting a "high" and "low" value of the second
variable to run
our simulations against. We couldn't have run something like the first function
with logit.survey, but the first function worked just fine when the model was a
simple logit.
Hope this helps,
-Colin
Citeren johns18 at
fas.harvard.edu:
I am trying to use setx and am running into the
following error.
gen.low <- setx(z.out2, nkrace = median,
nkgender = 1, nkhourly = median,
age
= median, soc.desir = median, nkorient = median, nativity1 = median,
language1
= median, nkedu = median, pi= median, site.type = median, union = median,
nkclass = median, nkcogender1= median, nkcorace = median)
Error in as.vector(x, "double") : cannot coerce to vector
z.out2 was computed using Zelig and has a bunch of dummy variables, which I
suspect could be part ot this problem. Does anyone have any ideas? thanks!
_______________________________________________
gov2001-l mailing list
gov2001-l at
lists.fas.harvard.edu
http://lists.fas.harvard.edu/mailman/listinfo/gov2001-l