Learn R Programming

coda4microbiome (version 0.2.4)

plot_prediction: plot_prediction

Description

Plot of the predictions of a fitted model: Multiple box-plot and density plots for binary outcomes and Regression plot for continuous outcome

Usage

plot_prediction(prediction, y, strata = NULL, showPlots = TRUE)

Value

prediction plot

Arguments

prediction

the fitted values of predictions for the model

y

outcome (binary or continuous); data type: numeric, character or factor vector

strata

stratification variable (default = NULL)

showPlots

if TRUE, shows the plots (default = TRUE)

Author

M. Calle - T. Susin

Examples

Run this code

# prediction plot for the log-ratio between columns 3 and 32 on HIV status

data(HIV, package = "coda4microbiome")

x<-impute_zeros(x_HIV)

lr<-log(x[,3])-log(x[,32])

plot_prediction(lr, y_HIV)


Run the code above in your browser using DataLab