tef_parseParFormula: Parse a parameter-level formula for a TEfit model

View source: R/tef_parseParFormula.R

tef_parseParFormulaR Documentation

Parse a parameter-level formula for a TEfit model

Description

Returns the parFormula, with some additional information that assists TEfits in fitting.

Usage

tef_parseParFormula(parFormula, label = "pPar")

Arguments

parFormula

Formula for fitting a parameter. Variables should be numeric; non-numeric variables may break. Can also take a string or a scalar, if the parameter is to be fixed to that value.

label

Label for the parameters

Details

If there are no random-effects terms, parses into a literal equation (e.g., turns ~ x1 + x2 * x3 into pPar_Intercept + pPar_x1\*x1 + pPar_x2\*x2 + pPar_x3\*x3 + pPar_x2_x3\*x2\*x3) which is returned as the "equation" attribute that has an accompanying "parameters" attribute. Additional attributes include whether there are random-effects terms (attribute "MEM") and whether there are any parameters at all, or if the "equation" is actually fixed to a variable or scalar (attributed "is_fixed").

Examples

tef_parseParFormula(~ x1 + x2*x3 + (x2 || subID))
tef_parseParFormula(~ x1 + x2*x3, label = 'thresholdAsymptote')
tef_parseParFormula(2)


akcochrane/TEfits documentation built on June 12, 2025, 11:10 a.m.