# NOT RUN {
# Fit Gamma discriminant function model for poolwise Xtilde vs. (Y, C),
# without assuming a constant log-OR. Ignoring processing errors for simplicity.
data(pdat2)
dat <- pdat2$dat
c.list <- pdat2$c.list
fit <- p_dfa_xerrors2(
g = dat$g,
y = dat$y,
xtilde = dat$xtilde,
c = c.list,
errors = "neither",
constant_or = FALSE
)
# Plot estimated log-OR vs. X at mean value for C
p <- plot_dfa2(
estimates = fit$estimates,
varcov = fit$theta.var,
xrange = range(dat$xtilde / dat$g),
cvals = mean(unlist(c.list))
)
p
# }
Run the code above in your browser using DataLab