library("bife")
# Load 'psid' dataset
data.set <- psid
head(data.set)
# Fixed effects logit model w/o bias-correction
mod.no <- bife(LFP ~ AGE + I(INCH / 1000) + KID1 + KID2 + KID3 | ID,
data = data.set, bias.corr = "no")
# Compute uncorrected average partial effects for mod.no
# Note: bias.corr does not affect the result
apeff.bife(mod.no, discrete = c("KID1", "KID2", "KID3"))
# Fixed effects logit model with analytical bias-correction
mod.ana <- bife(LFP ~ AGE + I(INCH / 1000) + KID1 + KID2 + KID3 | ID,
data = data.set)
# Compute semi-corrected average partial effects for mod.ana
apeff.bife(mod.ana, discrete = c("KID1", "KID2", "KID3"))
# Compute analytical bias-corrected average partial effects
# for mod.ana
apeff.bife(mod.ana, discrete = c("KID1", "KID2", "KID3"),
bias.corr = "ana")
Run the code above in your browser using DataLab