A wrapper for the systemfit::systemfit
function that will construct formulas for all equations based on specified
moderators. This function was NOT designed for user-level functionality, but
rather exists to be embedded within fitNetwork
. The purpose for
making it available to the user is for allowing the exact fitted model to be
highly customizable.
SURfit(
data,
varMods = NULL,
mod = "min",
maxiter = 100,
m = NULL,
type = "g",
center = TRUE,
scale = FALSE,
exogenous = TRUE,
covs = NULL,
sur = TRUE,
consec = NULL,
...
)
Dataframe or matrix containing idiographic temporal data.
Character string. Only applies if output from
varSelect
or modSelect
is used to constrain the
model, and cross-validation "CV"
was set as the criterion for
model/variable selection. Options include "min"
, which uses the
lambda value that minimizes the objective function, or "1se"
which
uses the lambda value at 1 standard error above the value that minimizes
the objective function.
Numeric. The maximum number of iterations to attempt before stopping the function.
Character string or numeric value to specify the moderator (if any).
Indicates the type of model to use, either "g"
for
gaussian, or "c"
for categorical (i.e., binary, at present). This
argument should not be edited by the user, as the appropriate input will
automatically be detected.
Logical. Determines whether to mean-center the variables.
Logical. Determines whether to standardize the variables.
Logical. See fitNetwork
function for details.
something
Logical. Provides input to the method
argument of the
systemfit::systemfit
function. If
TRUE
, then the method
will be "SUR"
. If FALSE
,
then the method
will be "OLS"
. These two methods only differ
when constraints are applied. When a saturated model is fit, both methods
produce the same results.
A logical vector that identifies which values to include in
accordance with the beepno
and dayno
arguments in the
fitNetwork
function.
Additional arguments.
A SUR model, as fit with the
systemfit::systemfit
function.
See the systemfit
package for details on customizing
systemfit::systemfit
objects. Constraints
can be applied via the varMods
argument, which is intended to
facilitate the output of the varSelect
and
resample
functions. These objects can be further edited to
apply constraints not specified by these automated functions. Moreover, there
are a variety of additional arguments that can be supplied to the
systemfit::systemfit
function if desired.
If the variable selection results from resample
are intended to
be used as input for the varMods
argument, then these results must be
fed into the modSelect
function.