appendObj: Append an objective function to a basic dMod.frame

View source: R/dModFrameClass.R

appendObjR Documentation

Append an objective function to a basic dMod.frame

Description

Append an objective function to a basic dMod.frame

Usage

appendObj(
  dMod.frame,
  prd = list(g * (x * p)),
  obj_data = list(normL2(data, prd, e)),
  obj = list(obj_data),
  pars = list(structure(rnorm(length(getParameters(obj))), names = getParameters(obj))),
  times = list(seq(min(as.data.frame(data)[["time"]]),
    max(as.data.frame(data)[["time"]]) * 1.1, length.out = 200)),
  ...,
  keepCalls = F
)

Arguments

dMod.frame

A dMod.frame

prd

Expression after which the concatenated prediction function is formed. Has to wrapped in list()

obj_data

Expression after which the objective function which describes the data is formed. Has to wrapped in list()

obj

This object is taken by the standard fitting functions. At typical expression would be list(obj_data + constr). Has to wrapped in list()

pars

A named vector of parameters to run e.g. test simulations of the model. Defaults to random parameters

times

A vector of times to run e.g. test simulations of the model. Defaults to seq(0, 1*t_max(data), length.out = 200)

...

Other columns which are mutations of existing ones or new columns.

keepCalls

Store a record of the calls in a new colun? See mutatedMod.frame.

Value

The dMod.frame augmented by standardized columns


dkaschek/dMod documentation built on April 23, 2024, 5:18 p.m.