Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
    compliancedivis
    @compliancedivis
    Good evening. I'm confused about how to fit a model with non-imputed data but predict with multiply-imputed data.
    I'd like to do something analogous to a call to predict() with the newdata argument targeting my Amelia object.
    Christopher Gandrud
    @christophergandrud
    Hi @compliancedivis. Does using setx with fitted values not work, e.g. http://docs.zeligproject.org/articles/using_Zelig_with_Amelia.html
    compliancedivis
    @compliancedivis
    I'll try it again, but I was getting an unused arguments error
    In the meantime I have another question. I can't seem to get log-odds output from summary() with the log-odds switch set to TRUE, and I know my model is logit (I've done it two ways -- once with a call to zlogit and once with a model= argument setting)
    Christopher Gandrud
    @christophergandrud
    Hi @compliancedivis Could you send minimal reproducible examples of these issues? It will make them much easier to address.
    compliancedivis
    @compliancedivis
    of course; I'm sorry, was away from my workstation. do you want the console output or do you want me to come up with toy-data examples?
    compliancedivis
    @compliancedivis
    Having started over from scratch with a clean script, setx seems to be working as expected! Thank you!
    Christopher Gandrud
    @christophergandrud
    Good to hear that. Is the log-odds issue addressed?
    Andrew Goldberg
    @aagoldberg
    anyone know how to get var-imp with logistic regression on zelig?
    Andrea Michelle Morris
    @andrea_miche11e_twitter
    I'm having an issue with relogit in R. The package documentation says you can have a range of taus but I keep getting an error: "zelig(y1~x1, data = d, model = "relogit", tau = c(0.01,0.1))
    Error in relogit(formula = cbind(y1, 1 - y1) ~ x1, tau = c(0.01, 0.1), : tau must be a vector of length less than or equal to 1. For multiple taus, estimate models individually." Anyone know what to do?
    mariyana-angelova
    @mariyana-angelova
    Good evening. I would like to estimate a multinomial logit model with individual AND alternative specific variables using Zelig. I want to predict vote choice (5 parties) with previous vote choice ( alternative specific ) and economic perceptions (same value for each choice). So far i could run a mlogit model with individual specific variables but can not figure out how to include the alternative specific ones and then estimate predicted probabilities for different values of the independent variables. Thank you!
    skostiaev
    @skostiaev
    z.out <- zelig(inscat1 ~ as.factor(ed) + as.factor(racethn) +
    • as.factor(income2) + as.factor(sex) + as.factor(state) +
    • as.factor(date) + as.factor(empl2) + age2 +
    • republican + fed, data = mergeddata, model = "mlogit", cite = F)
      Error in vglm.fitter(x = x, y = y, w = w, offset = offset, Xm2 = Xm2, :
      vglm() only handles full-rank models (currently)
    does anyone knows what this error mean?
    Philip Durbin
    @pdurbin
    @skostiaev can you please ask on the mailing list?
    skostiaev
    @skostiaev
    @pdurbin where is it?
    Philip Durbin
    @pdurbin
    @skostiaev linked from https://zeligproject.org/community
    Ista Zahn
    @izahn
    @skostiaev it means roughly that your model is too complex given the data available to estimate it. You can see exactly what conditions lead to this error in the VGAM source code at https://github.com/cran/VGAM/blob/master/R/vglm.fit.q
    skostiaev
    @skostiaev
    @izahn i ran it in base r. i just wanted to replicate it in zelig...
    Ista Zahn
    @izahn
    @skostiaev show us the codes...
    skostiaev
    @skostiaev
    @izahn mnom <- multinom(inscat1 ~ as.factor(ed) + as.factor(racethn) +
    as.factor(income2) + as.factor(sex) + as.factor(state) +
    as.factor(date) + as.factor(empl2) + age2 +
    republican + fed, data = mergeddata)
    Ista Zahn
    @izahn
    @skostiaev Error in multinom(inscat1 ~ as.factor(ed) + as.factor(racethn) + as.factor(income2) + : could not find function "multinom"
    please give codes that actually run.
    skostiaev
    @skostiaev
    @izahn is there option to attach screenshot?
    Ista Zahn
    @izahn
    I don't want screenshots; I want code that I can run and see what happens. I can guess that your model is just not supported by the VGAM package, and that there is nothing to be done about that from the Zelig side. I'm willing to do some work to check if this guess is correct, but only if you set up a reproducible example demonstrating your issue. If you ar not familiar with the concept of a reproducible example you may wish to refer to https://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example
    skostiaev
    @skostiaev

    @izahn library(nnet)

    mnom <- multinom(inscat1 ~ as.factor(ed) + as.factor(racethn) +
    as.factor(income2) + as.factor(sex) + as.factor(state) +
    as.factor(date) + as.factor(empl2) + age2 +
    republican + fed, data = mergeddata)

    @izahn this code worked... i just wanted to do it zelig as well because zelig gives nice option to bootstrap confidence intervals.
    @izahn zelig does allow to do multinomial logit, right?
    Ista Zahn
    @izahn
    @skostiaev Error in is.data.frame(data) : object 'mergeddata' not found
    Yes, zelig does multinomial logit, but it uses the VGAM package instead of nnet.
    skostiaev
    @skostiaev
    @izahn i've got this line of code z.out <- zelig(vote ~ race + age, data = turnout, model = "logit", cite = F) i thought i just replace variable names and model type...
    Ista Zahn
    @izahn
    @skostiaev I'm not sure I understand your question. Can you clarify what you are asking?
    Philip Durbin
    @pdurbin
    @izahn go eat some turkey. Happy Thanksgiving!
    Andrew Ribner
    @andyribner_twitter

    Hi There! I'm new to Zelig but enjoying it so far. I'm trying to run an ls regression after propensity score matching using 'MatchIt ' with multiply imputed data. I know Zelig does great with post-MatchIt and does a good job with multiple MI datasets.

    I've run 'MatchIt' on each of my 5 imputed datasets and saved the data as matchgen1-matchgen5 then combined them using

    'matchgen.mi <- to_zelig_mi(matchgen1,matchgen2,matchgen3,matchgen4,matchgen5)', but the Zelig regression does not support weights to integrate the propensity score. Any ideas?
    Thanks for your help!
    Philip Durbin
    @pdurbin
    @andyribner_twitter you might want to try the mailing list: https://zeligproject.org/community