Functions for ML estimation of regression parameters for sensitivity analysis for different combinations of exposure, mediator and outcome models. The functions are named according to the convention ML."model.expl type""model.resp type" where b
stands for binary probit regression and c stands for linear regression. The optimization is performed using
maxLik. The functions are intended to be called through coefs.sensmed, not on their own.
ML.bb(model.expl, model.resp, Rho, progress = TRUE, ...)ML.bc(model.expl, model.resp, Rho, progress = TRUE, ...)
ML.cb(model.expl, model.resp, Rho, progress = TRUE, ...)
ML.cc(model.expl, model.resp, Rho, progress = TRUE, ...)
Fitted glm model object (probit or linear). If sensitivity analysis to mediator-outcome confounding the mediator model. Otherwise the exposure model.
Fitted glm model object (probit or linear). If sensitivity analysis to exposure-mediator confounding the mediator model. Otherwise the outcome model.
The sensitivity parameter vector. If type="my" the correlation between the error terms in the mediator and outcome models. If type="zm" the correlation between the error terms in the exposure and mediator models. If type="zy" the correlation between the error terms in the exposure and outcome models.
Logical, indicating whether or not the progress (i.e. the proc.time for each Rho) of the optimization will be output
Additional arguments to be passed on to the maxLik function. Can be used to set the method and control arguments of the maxLik function.
A list with elements:
A matrix with the estimated regression parameters for model.resp over the range of Rho. One column per value of Rho.
The sensitivity parameter vector.
A matrix with the estimated regression parameters for model.expl over the range of Rho. One column per value of Rho.
the original fitted glm object of model.expl.
the original fitted glm object of model.resp.
The model matrix (see model.matrix) of model.expl
The model matrix (see model.matrix) of model.resp
The outcome variable of model.resp.
The outcome variable of model.expl.
If model.expl is linear, a column matrix with the estimated residual standard deviation for model.expl over the range of Rho.
If model.resp is linear, a column matrix with the estimated residual standard deviation for model.resp over the range of Rho.
The values of the -loglikelihood function for the best set of regression parameters from the optimization for each Rho.
A list with the covariance matrices for the model parameters in model.expl and model.resp for each Rho.
Information about the maximization (whether or not the convergence was successful, message, method and number of iterations) for each Rho, see maxLik for more information.