deltavar2: Delta method function (modified from emdbook)

Description Usage Arguments

Description

See '?deltavar()' in package emdbook. Only change was to replace 'expr <- as.expression(substitute(fun))' with 'expr<-fun'. This was necessary b/c of problems that arose when invoking 'deltavar()' inside of another function. Specifically, I wanted to call 'deltavar()' each time an outer function was executed, but apply deltavar to a unique set of x-values upon each execution of the outer function. For reasons I don't entirely understand, this range of x-values defined within the outer function's environment was not being adequately passed to the internal environment of deltavar. There's probably a classier/more resilient way of fixing this, but in the short term, I patched it over by creating 'deltavar2()', and using parse/a custom string in 'get.nbcurve.tpc()' when 'deltavar2()' is called.

Usage

1
deltavar2(fun, meanval = NULL, vars, Sigma, verbose = FALSE)

Arguments

fun

Function to calculate the variance of, given parameter estimates in meanvals

meanval

'possibly named vector of mean values of parameters'

vars

'list of variable names: needed if params does not have names, or if some of the values specified in params should be treated as constant'

Sigma

'numeric vector of variances or variance-covariance matrix'

verbose

'print details?'


ctkremer/growthTools documentation built on July 27, 2021, 4:19 p.m.