I fitted a 2-level binomial model using mcmc. I want to apply predisposition score matching with calculated probability.
How can I convert mlwinfitMCMC fitted propensity scores (the predicted prob of Y for all obs) to numeric objects?
Base R commands are simple: p < model$fitted.values
mlwinfitMCMC object fitted values (propensity scores) storage
-
- Posts: 8
- Joined: Wed Dec 20, 2023 8:55 am
-
- Posts: 1384
- Joined: Mon Oct 19, 2009 10:34 am
Re: mlwinfitMCMC object fitted values (propensity scores) storage
You should be able to do this with the overloads that R2MLwiN provides for the generic predict (https://stat.ethz.ch/R-manual/R-devel/l ... edict.html) function. To find more information on the syntax supported in R2MLwiN run:
or:
depending on which estimation method you are using.
Code: Select all
help("predict.mlwinfitIGLS")
Code: Select all
help("predict.mlwinfitMCMC")