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

Description Usage Arguments Value Note Author(s)

View source: R/get_ETA_metrics.R


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


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



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


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


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.


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.


Function outputs a list of the following three items:


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.


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


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

Function also saves three objects to the model folder:


histograms and qqplots of each ETA.


same as $ETA_data.


same as $ETA_summary.


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.


Rupert Austin

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