Dear Zelig developpers:
I am using R with Zelig and Amelia to do logistic regression for a
dataset (finished Multiple Imputation using Amelia). After
experimenting with my own dataset, I have a bunch of questions as below.
I have provided an executable example FYI.
* How do I ask zelig to report, combine the results of odds ratio
and its std. error under five datasets ?
* How do I plug weight variable into Zelig function?
* How can extract the peusudo R-square for models, i.e., z.outft1
and z.out.ft2 ?
* Under SPSS, there is a step method to run regression models. It
will show the R square(and adjusted Rsquare) change and the
significance of adding additional covariates in subsequent models.
Or like Stata, I can use chow test to test whether second model
bring statistically significant explanatory power. Does R or Zelig
package has such function? I know not many people care about R
square, but our professor requires us to report the number in the
final table.
Thank you!
Best,
Li Chang
Below is the example:
library(Zelig)
library(Hmisc)
library(Amelia)
data(freetrade)
attach(freetrade)
tariff[freetrade$tariff < 31.65] <- 1; tariff[freetrade$tariff >=
31.65] <- 0
a.out.freetrade <- amelia(freetrade, m = 5, ts = "year", cs =
"country", noms="tariff")
## I want to know odds ratio and std.error , pseudo R square( it will be
great if you can also tell me how to extract regular R-square and
Adjusted R-square without manual calculation)
z.out.ft1 <- zelig(tariff ~ polity + pop + gdp.pc, data =
freetrade, model = "logit")
summary(z.out.ft1)
## and then under model 2, I want to know the r-square change by adding
"year" and "country"
z.out.ft2 <- zelig(tariff ~ polity + pop + gdp.pc + year + country,
data = freetrade, model = "logit")
summary(z.out.ft2)
Show replies by date