fitCyclopsModel fits a Cyclops model data object

fitCyclopsModel(
  cyclopsData,
  prior = createPrior("none"),
  control = createControl(),
  weights = NULL,
  forceNewObject = FALSE,
  returnEstimates = TRUE,
  startingCoefficients = NULL,
  fixedCoefficients = NULL,
  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

computeDevice

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

Value

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

Details

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

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)
#> (Intercept) outcome2 outcome3 treatment2 treatment3 #> 3.044510e+00 -4.542553e-01 -2.929871e-01 1.268003e-05 1.268003e-05
confint(cyclopsFit, c("outcome2","treatment3"))
#> covariate 2.5 % 97.5 % evaluations #> outcome2 2 -0.8576926 -0.06254563 22 #> treatment3 5 -0.3931725 0.39317270 28
predict(cyclopsFit)
#> 1 2 3 4 5 6 7 8 #> 20.99973 13.33316 15.66647 21.00000 13.33333 15.66667 21.00000 13.33333 #> 9 #> 15.66667