Coerce a non-Zelig fitted model object to a Zelig class object

to_zelig(obj)

Arguments

obj

a fitted model object fitted using lm and many using glm. Note: more intended in future Zelig releases.

Examples

library(dplyr)
#> #> Attaching package: ‘dplyr’
#> The following object is masked from ‘package:testthat’: #> #> matches
#> The following objects are masked from ‘package:stats’: #> #> filter, lag
#> The following objects are masked from ‘package:base’: #> #> intersect, setdiff, setequal, union
lm.out <- lm(Fertility ~ Education, data = swiss) z.out <- to_zelig(lm.out)
#> to_zelig is an experimental function. #> Please report issues to: https://github.com/IQSS/Zelig/issues
#> Assuming zls to convert to Zelig.
# to_zelig called from within setx setx(z.out) %>% sim() %>% plot()