Usage
predReg(genReg, N, M = 100, fit = NULL, adjust.to = fit$Design$limits["Adjust to", ], do.pred = function(df) { fit.call <- fit$call fit.call$data <- quote(df) fit <- eval(fit.call) fit$Design$limits["Adjust to", names(adjust.to)] <- adjust.to if(is(fit, "lrm")) Predict(fit, fun = plogis) else Predict(fit) }, ...)
Arguments
genReg
A function that returns a simulated registry dataset, taking as
its first parameter the desired size of the simulated registry,
and possibly other parameters passed through via the ...
arg
N
Size of generated registries
fit
A fitted model usually intended to serve as a template
for a model to be fitted to the simulated registries.
This may be NULL
when do.pred
is provided
explicitly in the call
adjust.to
A list of adjust-to values for the fitted models,
defaulting to the adjust-to parameters of fit
do.pred
A function to be run on the data generated during each iteration
of the simulation, generating either an rms:Predict
object, or a (usually, named) atomic vector
...
Additional parameters passed to genReg