# \donttest{
data(testyxm) # testyxm is a list called dt
dataWithMiss <- testyxm$dataMissing
# Binary regression with link=logit
fit_yx <- emyxmiss(Wheeze ~ city + soc + cond,
data = dataWithMiss,
adtnlCovforR = c("age"),
family = binomial(link = "logit"),
method = "brglmFit")
fit_yx
# Binary regression with link=probit
fit_yx <- emyxmiss(Wheeze ~ city + soc + cond,
data = dataWithMiss,
adtnlCovforR = c("age"),
family = binomial(link = "probit"))
fit_yx
# Firth correction and link=probit
fit_yx <- emyxmiss(Wheeze ~ city + soc + cond,
data = dataWithMiss,
adtnlCovforR = c("age"),
family = binomial(link = "probit"),
method = "brglmFit")
fit_yx
# on simulated data
demo_df <- simulateCovariateData(50, nCov=6)
simulated_df <- simulateData(demo_df)
testMissData <- simulated_df$dataMissing
fit_yx <- emyxmiss(y~x2+x3+x4,
data=testMissData,
adtnlCovforR=c("x1"),
family=binomial,
method="glm.fit")
fit_yx
summary(fit_yx$fit_y)
# }
Run the code above in your browser using DataLab