simLinear: Simulate expected responses from a robust linear model,...

Description Usage Arguments

View source: R/simulate.R

Description

Simulate expected responses from a robust linear model, accounting for uncertainty in the parameter estimates.

Usage

1
2
3
4
5
6
7
8
simLinear(
  lmod,
  gmod,
  newdata = NULL,
  baseline = "log(alt.b)",
  rawBaseline = "alt.b",
  invtrans = exp
)

Arguments

lmod

An object returned by lmr.

gmod

An object of class 'evmSim'.

newdata

A data.frame containing values of the covariates used to fit the robust model, excluding the baseline variable.

baseline

Character string identifying the baseline column of the design matrix used to fit the robust linear model. Defaults to 'log(b.alt)'.

rawBaseline

Character string giving the name of the untransformed baseline values. If no transformation is performed, this will be the same value as for baseline. Defaults to rawBaseline = "alt.b".

invtrans

A function for back-transforming the baseline data if required. By default, the function assumes the user worked with log-transformed baseline data, so assumes invtrans=exp.


harrysouthworth/margarita documentation built on Aug. 19, 2021, 5 a.m.