plot_interpolation_vs_covariate {MOFA2} | R Documentation

## Plot interpolated factors versus covariate (1-dimensional)

### Description

make a plot of interpolated covariates versus covariate

### Usage

    plot_interpolation_vs_covariate(
      object,
      covariate = 1,
      factors = "all",
      only_mean = TRUE,
      show_observed = TRUE
    )

### Arguments

`object` | a trained `MOFA` object using MEFISTO.
`covariate` | covariate to use for plotting
`factors` | character or numeric specifying the factor(s) to plot, default is "all"
`only_mean` | show only mean or include uncertainties?
`show_observed` | include observed factor values as dots on the plot

### Details

to be filled

### Value

Returns a `ggplot2` object

### Examples

    # Using an existing trained model
    file <- system.file("extdata", "MEFISTO_model.hdf5", package = "MOFA2")
    model <- load_model(file)
    model <- interpolate_factors(model, new_values = seq(0,1.1,0.1))
    plot_interpolation_vs_covariate(model, covariate = "time", factors = 1)

[Package MOFA2 version 1.4.0 Index]