margarita: Create an object of class 'margarita'

Description Usage Arguments Details

View source: R/margarita.R

Description

Create an object of class 'margarita'

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
margarita(
  rlm,
  evmSim,
  newdata = NULL,
  trans = log,
  invtrans = exp,
  alpha = c(0.1, 0.5),
  baseline = "alt.b",
  arm = "arm",
  minima = FALSE
)

Arguments

rlm

An object of class 'rlm' returned by lmr.

evmSim

An object of class 'evmSim'.

newdata

A data.frame containing the new data from which predictions are to be made. Defaults to newdata=NULL which will only work of there are no covariates in the linear model or the extreme value model (with the exception of the baseline term in the linear model)

trans

A function matching that used to transform the response in the robust regression. Defaults to trans=log. Use trans=I if no transformation was made.

invtrans

A function, the inverse of trans.

alpha

Used to specify coverage of interval estimates. Defaults to alpha = c(1, .5).

baseline

Character string giving the name of the baseline variable.

arm

Character string giving the name of the treatment group variable. Defaults to arm = "arm". If there is no treatment factor, presumably there is a continuous exposure variable and the sample size is the number of rows in the data.

minima

Are the extremes minima rather than maxima (i.e. the response was multiplied by -1 prior to all modelling). Defaults to minima=FALSE. Note that if you specify minima=TRUE the function will fail and you will be told to multiply by -1 at the very start of the analysis, and to then multiply M by -1 in the call to this function.

Details

Returns a list with class 'margarita', to be used with simulate.margarita.


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