Learn R Programming

LUCIDus (version 2.1.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, response = TRUE, ...)

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

response

Report the posterior distribution of cluster assignment (and the probability of binary outcome), default is TRUE

...

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:2000, 200)
fit <- est.lucid(G = sim1[-index, 1:10], Z = sim1[-index, 11:20], Y = as.matrix(sim1[-index, 21]))
pred <- predict(object = fit, newG = sim1[index, 1:10], newZ = sim1[index, 11:20])
# }

Run the code above in your browser using DataLab