Learn R Programming

LUCIDus (version 2.0.0)

predict.lucid: Predict the outcome based on a fitted LUCID model

Description

Predict the outcome based on a fitted LUCID model

Usage

# S3 method for lucid
predict(object, newG, newZ, newCoG = NULL, newCoY = NULL, ...)

Arguments

object

A model fitted and returned by est.lucid

newG

A new data set of genetic/environmental factors

newZ

A new data set of biomarkers

newCoG

Optional. A new data set of covariates included in the G->X analysis

newCoY

Optional. A new data set of covariates included in the X->Y analysis

...

Other parameters to be passed to predict

Value

A list contains predicted latent cluster and outcome for each observation

Examples

Run this code
# NOT RUN {
index <- sample(1:3000, 200)
fit <- est.lucid(G = G1[-index, ], Z = Z1[-index, ], Y = as.matrix(Y1[-index, ]))
pred <- predict(object = fit, newG = G1[index, ], newZ = Z1[index, ])
# }

Run the code above in your browser using DataLab