plot_SSR_parameterValue {CGNM}R Documentation

plot_SSR_parameterValue

Description

Make SSR v.s. parameterValue plot of the accepted approximate minimizers found by the CGNM. Bars in the violin plots indicates the interquartile range.

Usage

plot_SSR_parameterValue(
  CGNM_result,
  indicesToInclude = NA,
  ParameterNames = NA,
  ReparameterizationDef = NA,
  showInitialRange = TRUE
)

Arguments

CGNM_result

(required input) A list stores the computational result from Cluster_Gauss_Newton_method() function in CGNM package.

indicesToInclude

(default: NA) A vector of integers indices to include in the plot (if NA, use indices chosen by the acceptedIndices() function with default setting).

ParameterNames

(default: NA) A vector of strings the user can supply so that these names are used when making the plot. (Note if it set as NA or vector of incorrect length then the parameters are named as theta1, theta2, ... or as in ReparameterizationDef)

ReparameterizationDef

(default: NA) A vector of strings the user can supply definition of reparameterization where each string follows R syntax

showInitialRange

(default: TRUE) TRUE or FALSE if TRUE then the initial range appears in the plot.

Value

A ggplot object including the violin plot, interquartile range and median, minimum and maximum.

Examples


model_analytic_function=function(x){

 observation_time=c(0.1,0.2,0.4,0.6,1,2,3,6,12)
 Dose=1000
 F=1

 ka=x[1]
 V1=x[2]
 CL_2=x[3]
 t=observation_time

 Cp=ka*F*Dose/(V1*(ka-CL_2/V1))*(exp(-CL_2/V1*t)-exp(-ka*t))

 log10(Cp)
}

observation=log10(c(4.91, 8.65, 12.4, 18.7, 24.3, 24.5, 18.4, 4.66, 0.238))

CGNM_result=Cluster_Gauss_Newton_method(
nonlinearFunction=model_analytic_function,
targetVector = observation,
initial_lowerRange = c(0.1,0.1,0.1), initial_upperRange =  c(10,10,10),
num_iter = 10, num_minimizersToFind = 100, saveLog = FALSE)

plot_SSR_parameterValue(CGNM_result)

[Package CGNM version 0.9.0 Index]