get_ETA_metrics: Calculates total and individual ETA shrinkage. Plots...

Description Usage Arguments Value Note Author(s)

View source: R/get_ETA_metrics.R

Description

Generates general summaries of shrinkage, individual shrinkage and also produces histograms and qqplots of ETA values.

Usage

1
get_ETA_metrics(mod_folder, run, IOV = 0, EST_num = 1)

Arguments

mod_folder

path to the modelling folder. Typically "\\\\BAST_SYSN\\blah\\blah\\Modelling\\"

run

name of the sub-folder of mod_folder that contains the NONMEM .tab .ext and .phi files. Typically "001" / "002" / "003" etc.

IOV

optional vector containing a list of the ETA numbers that are used for inter-occasion variability. For example, if ETA3, ETA4 and ETA5 are used for IOV then set IOV=c(3,4,5). This is important as shrinkage calculations are rather different for ETAs used to describe inter-occasion variability.

EST_num

number indicating which $ESTIMATION to analyze results for. For example, if you ran 3 $EST methods and you want to analyze results from 3rd method then set EST_num=3. Default value is 1.

Value

Function outputs a list of the following three items:

$ETA_data

a data frame containing ETA estimates, variances of ETA estimates and individual shrinkages. important columns have titles such as Include_ETA_1 which contains TRUE/FALSE for each individual. This is important information for shrinkage calculations and indicate if the particular ETA was active for each individual.

$ETA_summary

a small data frame giving ETAShrink and EBVShrink values for each ETA and for IOV (if used).

$PAR_estimates

a one row data frame containing the estimates of all parameters from the model.

Function also saves three objects to the model folder:

ETA_plots.png

histograms and qqplots of each ETA.

ETA_data.csv

same as $ETA_data.

ETA_shrinkage_summary.csv

same as $ETA_summary.

Note

This function tries to be smart and figure out which IDs contribute to each ETA (for IIV and IOV), but it is worth having a close look at the contents of $ETA_data (particularly the Include_ETA_N columns) to make sure it all looks OK.

Author(s)

Rupert Austin


jgrevel/BAST1-R-Library documentation built on May 21, 2019, 10:11 a.m.