Manipulate a Nonlinear Model Formula
nlformula.RdCheck and manipulate the formula for a nonlinear model, such as
specified in nlmer.
Arguments
- mc
matched call from the calling function, typically
nlmer(). Should have arguments named- formula:
a formula of the form
resp ~ nlmod ~ meformwhererespis an expression for the response,nlmodis the nonlinear model expression andmeformis the mixed-effects model formula.respcan be omitted when, e.g., optimizing a design.- data:
a data frame in which to evaluate the model function
- start:
either a numeric vector containing initial estimates for the nonlinear model parameters or a list with components
nlpars:the initial estimates of the nonlinear model parameters
theta:the initial estimates of the variance component parameters
Value
a list with components
- "respMod"
a response module of class
"nlsResp"- "frame"
the model frame, including a terms attribute
- "X"
the fixed-effects model matrix
- "reTrms"
the random-effects terms object
Details
The model formula for a nonlinear mixed-effects model is
of the form resp ~ nlmod ~ mixed where
resp is an expression (usually just a name) for
the response, nlmod is the call to the nonlinear
model function, and mixed is the mixed-effects
formula defining the linear predictor for the parameter
matrix. If the formula is to be used for optimizing
designs, the resp part can be omitted.