parse-SSE: Parse SSE results

etacorr_catR Documentation

Parse SSE results

Description

parse_sse() parses a single .csv file of SSE summary statistics.

parse_all_sse() recursively searches for SSE results csv files, parses them, and combines them into data frames summarizing parameter statistics and error rates.

Usage

etacorr_cat(runno, eta, ...)

parse_sse(
  file = "sse_results.csv",
  param_stats = c("relative_rmse", "bias"),
  ofv_cols = c(1, 4, 5, 6),
  ofv_colNames = c("effect", "pow.05", "pow.01", "pow.001"),
  sim_names = NULL,
  summary = FALSE
)

parse_all_sse(
  path = getwd(),
  exclude = NULL,
  file = "sse_results.csv",
  param_stats = c("relative_rmse", "bias"),
  ofv_cols = c(1, 4, 5, 6),
  ofv_colNames = c("effect", "pow.05", "pow.01", "pow.001"),
  sim_names = NULL,
  summary = FALSE
)

Arguments

runno

Either a xpose compliant run number, NONMEM data in the form of a data frame or data frame extension, or string representing the path to a NONMEM tablefile

eta

Which ETAs to plot, e.g. eta = c(1, 2)

...

Covariates to plot against ETAs.

file

Name of the SSE results file. Default is "sse_results.csv".

param_stats

Parameter statistics to summarize. Must be present in param_rows of the SSE results. Default is c("relative_rmse", "bias").

ofv_cols

Column numbers to include from the ofv statistics table.

ofv_colNames

OFV statistics column names. Must be the same length as ofv_cols.

sim_names

Optionally, descriptive names for each alternative model, in the same order as listed in the SSE results.

For example, if there are 3 alternative models called "alt_efv.mod", "alt_wt.mod", and "alt_age.mod", in that order, then you could use ⁠simNames = c("efv", "wt, "age")⁠ or something similar.

summary

If TRUE, parse_sse creates a folder called "summary" within the current directory and writes two .csv files to it summarizing the results.

path

Path to the parent directory containing the SSE results. Defaults to the current working directory.

exclude

Optionally, a Perl-style regular expression matching file paths to exclude from the results.

Value

A named list of data frames. "params" is a data frame of parameter statistics. "type_I_error" and "type_II_error" are summaries of OFV statistics.

A named list of data frames. "params" is a data frame of parameter statistics. "type_I_error" and "type_II_error" are summaries of OFV statistics.

Author(s)

Alexander Floren

Sandy Floren

Examples


## Not run: 
setwd(~/Path/To/SSE/Results)

# Parse all "sse_results.csv" files in a directory
parse_all_sse()

# Parse all "sse_results.csv" files in a directory, except those with the
# pattern "induc" in their sub-directory
parse_all_sse(exclude = "induc")

# Generate summary .csv files
parse_all_sse(summary = TRUE)

## End(Not run)

saviclab/savictools documentation built on Dec. 7, 2023, 11:56 p.m.