Learn R Programming

pmxNODE (version 0.1.0)

ind_rhs_plot_nlmixr: Generate individual Right-hand side data plot (nlmixr2)

Description

This functions allows to generate a right-hand side plot with multiple subjects, i.e., combined derivative data of multiple NNs and base-R operations.

Usage

ind_rhs_plot_nlmixr(
  rhs,
  x_var,
  inputs,
  group,
  est_parms = NULL,
  fit_obj = NULL,
  time_nn = NULL,
  act = NULL,
  beta = 20
)

Value

ggplot of right-hand side for all individuals.

Arguments

rhs

(string) String of right-hand side

x_var

(string) Name of the variable in inputs against which the right-hand data should be plotted.

inputs

(dataframe) Dataframe of inputs, with corresponding columns (including matching column names for each variable in rhs.

group

(string) Name of column in inputs dataframe defining groups/individuals.

est_parms

(named vector; semi-optional) A data frame with estimated individual parameters from the NN extracted through the indparm_extractor_nlmixr function. For optionality, see Details.

fit_obj

(nlmixr fit object; semi-optional) The fit-object from nlmixr2(...), fitted with IIV. For optionality, see Details.

time_nn

(boolean vector) Vector for each NN in rhs defining whether the neural network is a time-dependent neural network or not. Default value for all NN is FALSE.

act

(character vector) Vector for each NN in rhs defining the activation function used in the NN. Default value for all NN is "ReLU".

beta

(numeric) Beta value for the Softplus activation function, only applicable if any act is softplus; Default to 20.

Author

Dominic Bräm

Details

Either est_parms or fit_obj must be given. If both arguments are given, est_parms is prioritized.

Examples

Run this code
if (FALSE) {
ind_fit <- nlmxir2(node_model_ind,data=data,est="saem")
rhs_plot <- ind_rhs_plot_mlx(rhs="NNc + NNct",
                             x_var = "NNc",
                             group = "id",
                             inputs = input_data,
                             fit_obj = ind_fit)
}

Run the code above in your browser using DataLab