Learn R Programming

merlin (version 0.1.0)

Mixed Effects Regression for Linear, Non-Linear and User-Defined Models

Description

Fits linear, non-linear, and user-defined mixed effects regression models following the framework developed by Crowther (2017) . 'merlin' can fit multivariate outcome models of any type, each of which could be repeatedly measured (longitudinal), with any number of levels, and with any number of random effects at each level. Standard distributions/models available include the Bernoulli, Gaussian, Poisson, beta, negative-binomial, and time-to-event/survival models include the exponential, Gompertz, Royston-Parmar, Weibull and general hazard model. 'merlin' provides a flexible predictor syntax, allowing the user to define variables, random effects, spline and fractional polynomial functions, functions of other outcome models, and any interaction between each of them. Non-linear and time-dependent effects are seamlessly incorporated into the predictor. 'merlin' allows multivariate normal random effects, which are integrated out using Gaussian quadrature or Monte-Carlo integration. Note, 'merlin' is based on the 'Stata' package of the same name, described in Crowther (2018) .

Copy Link

Version

Install

install.packages('merlin')

Monthly Downloads

37

Version

0.1.0

License

GPL (>= 3)

Maintainer

Michael Crowther

Last Published

June 29th, 2020

Functions in merlin (0.1.0)

coef.mlsurv

Extract Model Coefficients
coef.merlin

Extract Model Coefficients
coef.mlrcs

Extract Model Coefficients
heart.valve

Aortic valve replacement surgery data
merlin_util_ev

merlin_util_ev - returns the observation-level expected value of the outcome
merlin_util_depvar

merlin_util_depvar - returns the response variable(s)
merlin_util_ev_deriv

merlin_util_ev_deriv - returns the first derivative with respect to time of the observation-level expected value of the outcome
merlin_util_ev_deriv2

merlin_util_ev_deriv2 - returns the second derivative with respect to time of the observation-level expected value of the outcome
merlin_util_ap_mod

merlin_util_ap_mod - returns the current estimate of the ith ancillary parameter for the specified model
merlin_util_ap

merlin_util_ap - returns the current estimate of the ith ancillary parameter for the associated model
merlin_util_xzb_deriv2

merlin_util_xzb_deriv2 - returns the second derivative with respect to time of the observation-level complex predictor
merlin_util_xzb_deriv2_mod

merlin_util_xzb_deriv2_mod - returns the second derivative with respect to time of the observation-level complex predictor of the specified model
logLik.mlrcs

Extract Log-Likelihood
logLik.merlin

Extract Log-Likelihood
merlin_util_ev_deriv2_mod

merlin_util_ev_deriv2_mod - returns the second derivative with respect to time of the observation-level expected value of the specified outcome
logLik.mlsurv

Extract Log-Likelihood
merlin_util_xzb_deriv_mod

merlin_util_xzb_deriv_mod - returns the first derivative with respect to time of the observation-level complex predictor of a specified model
merlin_util_ev_integ

merlin_util_ev_integ - returns the integral with respect to time of the observation-level expected value of the outcome
merlin_util_ev_integ_mod

merlin_util_ev_integ_mod - returns the integral with respect to time of the observation-level expected value of the specified outcome
merlin

merlin - Mixed Effects Regression for Linear, Nonlinear and User-defined models
merlin_util_xzb

merlin_util_xzb - returns the observation-level complex predictor
merlin_util_ev_deriv_mod

merlin_util_ev_deriv - returns the first derivative with respect to time of the observation-level expected value of the specified outcome
mlrcs

Fit multi-level restricted cubic spline model
summary.mlrcs

Summarizing mlrcs Fits
summary.merlin

Summarizing merlin Fits
merlin_util_xzb_integ

merlin_util_xzb_integ - returns the integral with respect to time of the observation-level complex predictor
mlsurv

Fit proportional hazards survival models
summary.mlsurv

Summarizing mlsurv Fits
vcov.merlin

Calculate Variance-Covariance Matrix for a merlin Model Object
merlin_util_xzb_deriv

merlin_util_xzb_deriv - returns the first derivative with respect to time of the observation-level complex predictor
print.merlin

Print merlin Fits
print.mlrcs

Print mlrcs Fits
merlin_util_ev_mod

merlin_util_ev_mod - returns the observation-level expected value of the outcome for a specified model
merlin_util_timevar

merlin_util_timevar - returns the time variable
sim3

Simulated 3-level survival data
print.mlsurv

Print mlsurv Fits
vcov.mlrcs

Calculate Variance-Covariance Matrix for a mlrcs Model Object
vcov.mlsurv

Calculate Variance-Covariance Matrix for a mlsurv Model Object
predict.merlin

predict.merlin - post-estimation tools for merlin
merlin_util_xzb_mod

merlin_util_xzb_mod - returns the observation-level complex predictor of the specified model
merlin_util_xzb_integ_mod

merlin_util_xzb_integ_mod - returns the integral with respect to time of the observation-level complex predictor of the specified model
pbc

Mayo Clinic primary biliary cirrhosis data