plot_nbTP_histogram: Plot an histogram of the number of time-trajectories with a...

View source: R/df_search.R

plot_nbTP_histogramR Documentation

Plot an histogram of the number of time-trajectories with a given number of time-points

Description

Histogram of the number of time-trajectories with a minimum number of time-points. When the number of time-points is inferior to the df selected, a spline cannot be fitted. The histogram highlights the number and percentage of time-trajectories that will be rejected for a given df.

Usage

plot_nbTP_histogram(eigen, dfCutOff = NA)

Arguments

eigen

A list of eigenSpline parameters as generated by get_eigen_spline, containing eigen$matrix, eigen$variance, eigen$model and eigen$countTP.

dfCutOff

(int) A number (a selected df) to highlight the portion of trajectories that would be rejected form the dataset (numberTP < df). Default is NA, with no cut-off plotted.

Value

A ggplot2 plotObject.

See Also

Graphical implementation with santaR_start_GUI

Other DFsearch: get_eigen_DF(), get_eigen_DFoverlay_list(), get_eigen_spline(), get_param_evolution(), plot_param_evolution()

Examples

## 8 subjects, 4 time-points, 3 variables, some missing values
inputData  <- acuteInflammation$data[0:32,1:3]
inputData  <- inputData[-1,]
inputData  <- inputData[-8,]
inputData  <- inputData[-30,]
inputData  <- inputData[-29,]
ind        <- acuteInflammation$meta$ind[0:32]
ind        <- ind[-1]
ind        <- ind[-8]
ind        <- ind[-30]
ind        <- ind[-29]
time       <- acuteInflammation$meta$time[0:32]
time       <- time[-1]
time       <- time[-8]
time       <- time[-30]
time       <- time[-29]
eigen      <- get_eigen_spline(inputData, ind, time, nPC=NA, scaling="scaling_UV",
                               method="nipals", verbose=TRUE, centering=TRUE, ncores=0)
plot_nbTP_histogram(eigen, dfCutOff=3)


adwolfer/santaR documentation built on March 10, 2024, 5:28 p.m.