fitCyclopsModel: Fit a Cyclops model

View source: R/ModelFit.R

fitCyclopsModelR Documentation

Fit a Cyclops model

Description

fitCyclopsModel fits a Cyclops model data object

Usage

fitCyclopsModel(
  cyclopsData,
  prior = createPrior("none"),
  control = createControl(),
  weights = NULL,
  forceNewObject = FALSE,
  returnEstimates = TRUE,
  startingCoefficients = NULL,
  fixedCoefficients = NULL,
  warnings = TRUE,
  computeDevice = "native"
)

Arguments

cyclopsData

A Cyclops data object

prior

A prior object. More details are given below.

control

A "cyclopsControl" object constructed by createControl

weights

Vector of 0/1 weights for each data row

forceNewObject

Logical, forces the construction of a new Cyclops model fit object

returnEstimates

Logical, return regression coefficient estimates in Cyclops model fit object

startingCoefficients

Vector of starting values for optimization

fixedCoefficients

Vector of booleans indicating if coefficient should be fix

warnings

Logical, report regularization warnings

computeDevice

String: Name of compute device to employ; defaults to "native" C++ on CPU

Details

This function performs numerical optimization to fit a Cyclops model data object.

Value

A list that contains a Cyclops model fit object pointer and an operation duration

Prior

Currently supported prior types are:

⁠ "none"⁠ Useful for finding MLE
⁠ "laplace"⁠ L_1 regularization
⁠ "normal"⁠ L_2 regularization

References

Suchard MA, Simpson SE, Zorych I, Ryan P, Madigan D. Massive parallelization of serial inference algorithms for complex generalized linear models. ACM Transactions on Modeling and Computer Simulation, 23, 10, 2013.

Simpson SE, Madigan D, Zorych I, Schuemie M, Ryan PB, Suchard MA. Multiple self-controlled case series for large-scale longitudinal observational databases. Biometrics, 69, 893-902, 2013.

Mittal S, Madigan D, Burd RS, Suchard MA. High-dimensional, massive sample-size Cox proportional hazards regression for survival analysis. Biostatistics, 15, 207-221, 2014.

Examples

## Dobson (1990) Page 93: Randomized Controlled Trial :
counts <- c(18,17,15,20,10,20,25,13,12)
outcome <- gl(3,1,9)
treatment <- gl(3,3)
cyclopsData <- createCyclopsData(counts ~ outcome + treatment, modelType = "pr")
cyclopsFit <- fitCyclopsModel(cyclopsData, prior = createPrior("none"))
coef(cyclopsFit)
confint(cyclopsFit, c("outcome2","treatment3"))
predict(cyclopsFit)


Cyclops documentation built on June 22, 2024, 10:24 a.m.