Public API

Functions that are exported from the package namespace.

add_dis_age()

Easily add the disease-related age variable to a data frame

add_factor()

Easily add a categorical covariate to a data frame

adjusted_c_hat()

Set the GP mean vector, taking TMM or other normalization into account

uniform() normal() student_t() gam() igam() log_normal() bet()

Prior definitions

create_model()

Create a model

draw_pred()

Draw pseudo-observations from posterior or prior predictive distribution

fit_summary()

Print a fit summary.

get_draws()

Extract parameter draws from lgpfit or stanfit

get_pred()

Extract model predictions and function posteriors

lgp()

Main function of the 'lgpr' package

model_summary() param_summary()

Print a model summary.

new_x()

Create prediction points

sample_model() optimize_model()

Fitting a model

plot_draws() plot_beta() plot_warp() plot_effect_times()

Visualize the distribution of parameter draws

plot_components()

Visualize all model components

plot_data()

Vizualizing longitudinal data

plot_pred() plot_f()

Visualizing model predictions or inferred covariate effects

plot_sim()

Visualize an lgpsim object (simulated data)

ppc()

Graphical posterior predictive checks

pred()

Posterior predictions and function posteriors

prior_pred() sample_param_prior()

Prior (predictive) sampling

read_proteomics_data()

Function for reading the built-in proteomics data

relevances()

Assess component relevances

select() select_freq() select.integrate() select_freq.integrate()

Select relevant components

simulate_data()

Generate an artificial longitudinal data set

Data

testdata_001

A very small artificial test data, used mostly for unit tests

testdata_002

Medium-size artificial test data, used mostly for tutorials

Full documentation

show(<GaussianPrediction>) component_names(<GaussianPrediction>) num_components(<GaussianPrediction>) num_paramsets(<GaussianPrediction>) num_evalpoints(<GaussianPrediction>)

An S4 class to represent analytically computed predictive distributions (conditional on hyperparameters) of an additive GP model

show(<KernelComputer>) num_components(<KernelComputer>) num_evalpoints(<KernelComputer>) num_paramsets(<KernelComputer>) component_names(<KernelComputer>)

An S4 class to represent input for kernel matrix computations

show(<Prediction>) component_names(<Prediction>) num_components(<Prediction>) num_paramsets(<Prediction>) num_evalpoints(<Prediction>)

An S4 class to represent prior or posterior draws from an additive function distribution.

add_dis_age()

Easily add the disease-related age variable to a data frame

add_factor()

Easily add a categorical covariate to a data frame

add_factor_crossing()

Add a crossing of two factors to a data frame

adjusted_c_hat()

Set the GP mean vector, taking TMM or other normalization into account

apply_scaling()

Apply variable scaling

as.character(<lgpexpr>) as.character(<lgpterm>) as.character(<lgpformula>)

Character representations of different formula objects

create_model()

Create a model

create_model.covs_and_comps()

Parse the covariates and model components from given data and formula

create_model.formula()

Create a model formula

create_model.likelihood()

Parse the response variable and its likelihood model

create_model.options()

Parse the given modeling options

create_model.prior()

Parse given prior

create_plot_df()

Helper function for plots

create_scaling()

Create a standardizing transform

dinvgamma_stanlike() qinvgamma_stanlike()

Density and quantile functions of the inverse gamma distribution

draw_pred()

Draw pseudo-observations from posterior or prior predictive distribution

example_fit()

Quick way to create an example lgpfit, useful for debugging

fit_summary()

Print a fit summary.

get_draws()

Extract parameter draws from lgpfit or stanfit

get_pred()

Extract model predictions and function posteriors

kernel_eq() kernel_ns() kernel_zerosum() kernel_bin() kernel_cat() kernel_varmask() kernel_beta()

Compute a kernel matrix (covariance matrix)

lgp()

Main function of the 'lgpr' package

lgpexpr-class

An S4 class to represent an lgp expression

show(<lgpfit>) component_names(<lgpfit>) postproc(<lgpfit>) contains_postproc(<lgpfit>) clear_postproc(<lgpfit>) get_model(<lgpfit>) get_stanfit(<lgpfit>) is_f_sampled(<lgpfit>) plot(<lgpfit>,<missing>)

An S4 class to represent the output of the lgp function

lgpformula-class

An S4 class to represent an lgp formula

show(<lgpmodel>) parameter_info(<lgpmodel>) component_info(<lgpmodel>) covariate_info(<lgpmodel>) component_names(<lgpmodel>) is_f_sampled(<lgpmodel>)

An S4 class to represent an additive GP model

lgpr-package

The 'lgpr' package.

lgprhs-class

An S4 class to represent the right-hand side of an lgp formula

lgpscaling-class

An S4 class to represent variable scaling

show(<lgpsim>) plot(<lgpsim>,<missing>)

An S4 class to represent a data set simulated using the additive GP formalism

lgpterm-class

An S4 class to represent one formula term

model_summary() param_summary()

Print a model summary.

new_x()

Create prediction points

`+`(<lgprhs>,<lgprhs>) `+`(<lgpterm>,<lgpterm>) `+`(<lgprhs>,<lgpterm>) `*`(<lgpterm>,<lgpterm>)

Operations on formula terms and expressions

plot_api_c()

Plot a generated/fit model component

plot_api_g()

Plot longitudinal data and/or model fit so that each subject/group has their own panel

plot_components()

Visualize all model components

plot_data()

Vizualizing longitudinal data

plot_draws() plot_beta() plot_warp() plot_effect_times()

Visualize the distribution of parameter draws

plot_inputwarp()

Visualize input warping function with several steepness parameter values

plot_invgamma()

Plot the inverse gamma-distribution pdf

plot_pred() plot_f()

Visualizing model predictions or inferred covariate effects

plot_sim()

Visualize an lgpsim object (simulated data)

ppc()

Graphical posterior predictive checks

pred()

Posterior predictions and function posteriors

prior_pred() sample_param_prior()

Prior (predictive) sampling

prior_to_num()

Convert given prior to numeric format

uniform() normal() student_t() gam() igam() log_normal() bet()

Prior definitions

read_proteomics_data()

Function for reading the built-in proteomics data

relevances()

Assess component relevances

parameter_info() component_info() covariate_info() component_names() get_model() is_f_sampled() get_stanfit() postproc() contains_postproc() clear_postproc() num_paramsets() num_evalpoints() num_components()

S4 generics for lgpfit, lgpmodel, and other objects

sample_model() optimize_model()

Fitting a model

select() select_freq() select.integrate() select_freq.integrate()

Select relevant components

show(<lgpformula>) show(<lgprhs>) show(<lgpterm>)

Printing formula object info using the show generic

sim.create_f()

Simulate latent function components for longitudinal data analysis

sim.create_x()

Create an input data frame X for simulated data

sim.create_y()

Simulate noisy observations

sim.kernels()

Compute all kernel matrices when simulating data

simulate_data()

Generate an artificial longitudinal data set

split_by_factor() split_within_factor() split_within_factor_random() split_random() split_data()

Split data into training and test sets

testdata_001

A very small artificial test data, used mostly for unit tests

testdata_002

Medium-size artificial test data, used mostly for tutorials

validate_lgpexpr() validate_lgpformula() validate_lgpscaling() validate_lgpfit() validate_GaussianPrediction() validate_Prediction()

Validate S4 class objects

var_mask()

Variance masking function

warp_input()

Input warping function