fisher_evaluation {MIXFIM}R Documentation

Evaluation of the Fisher Information Matrix in Nonlinear Mixed Effect Models using Markov Chains Monte Carlo

Description

fisher_evaluation is used to evaluate the Fisher information matrix for both continuous and discrete data in nonlinear mixed effect models using Markov Chains Monte Carlo.

Usage

fisher_evaluation(t, y_ini=1, model, model2, model3, params, dim_b, 
set_seed=TRUE, seed=42, n_samp, n_rep=1, n_iter, n_burn, CV=FALSE, 
plot_graph=0, L_boot=1000, nb_patients=1)

Arguments

t

Vector of sampling times (or doses).

y_ini

A possible value for the response y to initialize the MCMC process. The default value is set at 1 (which works for many types of outcomes: continuous, binary, ...).

model

Compiled STAN model describing the response model to sample in the conditionnal distribution of b given y.

model2

Compiled STAN model describing the response model for calculating the derivative of the log-likelihood with respoect to each parameter.

model3

Compiled STAN model describing the response model to sample in the marginal distribution of the response y.

params

Vector of parameters given as follows: fixed effetcs, variances of the random effets, standard deviations of the residual errors (if continuous data).

dim_b

Number of random effects.

set_seed

Boolean indicating if the seed shoud be fixed. The default value is set at TRUE.

seed

Integer for the fixed seed. Used only if set_seed is TRUE. The default value is set at 42.

n_samp

Integer representing the number of Monte Carlo (MC) samples, (i.e. number of samples for the outcome y).

n_rep

Integer representing the number of repeated measures at the same time (or dose) for each patient. The default value is set at 1 (for continuous data).

n_iter

Integer representing the number of Markov Chains Monte Carlo (MCMC) samples.

n_burn

Integer representing the number of burn-in samples for MCMC.

CV

Boolean indicating if some convergence information (variance of the determinant, mean of b, mean log-likelihood, ...) should be returned. The default value is set at FALSE.

plot_graph

An integer with value 0 (no graph should be plotted), 1 (graph of the determinant of the FIM), 2 (graph of the determinant of the FIM with confidence intervals assuming normal distribution), 3 (graph of the determinant of the FIM with bootstrap confidence intervals) or 4 (graph of the determinant of the FIM with both bootstrap confidence intervals and confidence intervals assuming normal distribution). The default value is set at 0.

L_boot

Number of samples for bootstrap estimation of the confidence intervals of the normalized determinant of the FIM. This argument is used/required only if plot_graph = 3 or 4. The default value is set at 1000.

nb_patients

Number of patients with the same elementary design for which the FIM is evaluated. The default value is set at 1.

Value

An list is returned, composed of the following variables:

FIM

Expected Fisher information matrix (FIM). Of note, the FIM is an individual FIM and is calculated for nb_patients patients.

FIM_covar

Variance-covariance matrix of the FIM. (Of note, its dimension is of size 4 as the FIM is in dimension 2.)

inv_FIM

Inverse of the FIM.

RSE

Relative standard errors (square root of the diagonal elements of the inverse of the FIM).

RSE_inf_boot

Vector containing the lower bound of the bootstrap confidence interval of the RSEs.

RSE_sup_boot

Vector containing the upper bound of the bootstrap confidence interval of the RSEs.

det_norm_FIM

Normalized determinant of the FIM.

det_IC_normal

Vector containing the lower and upper bound of the confidence interval of the normalized determinant of the FIM assuming normal distribution.

det_IC_boot

Vector containing the lower and upper bound of the bootstrap confidence interval of the normalized determinant of the FIM.

If CV=TRUE:

mean_dloglik1

Mean of the partial derivatives of the log-likelihood according to the first MCMC sample and MC sample. Should be equal approximately to 0.

mean_dloglik2

Mean of the partial derivatives of the log-likelihood according to the second MCMC sample and MC sample. Should be equal approximately to 0.

var_dloglik1

Variance of the partial derivatives of the log-likelihood according to the first MCMC sample and MC sample.

var_dloglik2

Variance of the partial derivatives of the log-likelihood according to the second MCMC sample and MC sample.

mean_b

Mean of the samples in the conditionnal distribution of b given y. Should be equal approximately to 0.

mat_A_k1

Vector containing for each value sampled of the response y, the estimation of the integral of the partial derivatives of the log-likelihood over the random effects according to the first MCMC sample of the random effects b given y.

mat_A_k2

Vector containing for each value sampled of the response y, the estimation of the integral of the partial derivatives of the log-likelihood over the random effects according to the second MCMC sample of the random effects b given y.

In addition, plot_graph enables to plot a graph of the normalized determinant of the FIM with normal and bootstrap confidence intervals in function of the number of MC samples.

Author(s)

Marie-Karelle Riviere-Jourdan eldamjh@gmail.com

References

Riviere, M-K., Ueckert, S. and Mentre, F,. Evaluation of the Fisher information matrix in nonlinear mixed effect models using Markov Chains Monte Carlo.

Examples


############################
# PLEASE UNCOMMENT EXAMPLE #
############################
#times = c(0.5,1,2,6,24,36,72,120)
#params = c(1,8,0.15,0.6,0.02,0.07,0.1)

# Files cen be found in external data
#model = stan_model("model_b_given_y.stan")
#model2 = stan_model("model_derivatives.stan")
#model3 = stan_model("model_y.stan")

#model_Warfarin = fisher_evaluation(t=times, y_ini=0.5, model=model, 
#model2=model2, model3=model3, params=params, dim_b=3, set_seed=TRUE, seed=42, 
#n_samp=1000, n_rep=1, n_iter=200, n_burn=500, CV=TRUE, plot_graph=4, 
#nb_patients=32)
#model_Warfarin

[Package MIXFIM version 1.1 Index]