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")
# Summary of uncorrected structural parameters only
summary(mod.no)
# Summary plus fixed effects
summary(mod.no, fixed = TRUE)
# Fixed effects logit model with analytical bias-correction
mod.ana <- bife(LFP ~ AGE + I(INCH / 1000) + KID1 + KID2 + KID3 | ID,
data = data.set)
# Summary of bias-corrected structural parameters only
summary(mod.ana)
# Summary of uncorrected structural parameters only
summary(mod.ana, corrected = FALSE)
# Summary of bias-corrected structural parameters plus -adjusted
# fixed effects
summary(mod.ana, fixed = TRUE)
# Extract bias-corrected structural parameters of mod.ana
beta.ana <- coef(mod.ana)
print(beta.ana)
# Extract bias-adjusted fixed effects of mod.ana
alpha.ana <- coef(mod.ana, fixed = TRUE)
print(alpha.ana)
# Extract uncorrected structural parameters of mod.ana
beta.no <- coef(mod.ana, corrected = FALSE)
print(beta.no)
# Extract covariance matrix of bias-corrected structural
# parameters of mod.ana
vcov.ana <- vcov(mod.ana)
print(vcov.ana)
# Extract covariance matrix of uncorrected structural parameters
# of mod.ana
vcov.no <- vcov(mod.ana, corrected = FALSE)
print(vcov.no)
Run the code above in your browser using DataLab