Description Usage Arguments Details Value Author(s) References See Also Examples
View source: R/fitTsfm.control.R
Creates a list of control parameters for fitTsfm
.
All control parameters that are not passed to this function are set to
default values. This function is meant for internal use only!!
1 2 3 4 5 6 7 | fitTsfm.control(decay = 0.95, weights, model = TRUE, x = FALSE,
y = FALSE, qr = TRUE, nrep = NULL, efficiency = 0.9, mxr = 50,
mxf = 50, mxs = 50, scope, scale, direction, trace = FALSE,
steps = 1000, k = 2, nvmin = 1, nvmax = 8, force.in = NULL,
force.out = NULL, method, really.big = FALSE, type, normalize = TRUE,
eps = .Machine$double.eps, max.steps, plot.it = FALSE,
lars.criterion = "Cp", K = 10)
|
decay |
a scalar in (0, 1] to specify the decay factor for "DLS". Default is 0.95. |
weights |
an optional vector of weights to be used in the fitting
process for |
model, x, y, qr |
logicals passed to |
nrep |
the number of random subsamples to be drawn for
|
efficiency |
the asymptotic efficiency of the final estimate for
|
mxr |
the maximum number of iterations in the refinement step. Default is 50. |
mxf |
the maximum number of iterations for computing final coefficient estimates. Default is 50. |
mxs |
the maximum number of iterations for computing scale estimate. Default is 50. |
scope |
defines the range of models examined in the |
scale |
optional parameter for |
direction |
the mode of |
trace |
If positive (or, not |
steps |
the maximum number of steps to be considered for
|
k |
the multiple of the number of degrees of freedom used for the
penalty in |
nvmin |
minimum size of subsets to examine for |
nvmax |
maximum size of subsets to examine for |
force.in |
index to columns of design matrix that should be in all
models for |
force.out |
index to columns of design matrix that should be in no
models for |
method |
one of "exhaustive", "forward", "backward" or "seqrep"
(sequential replacement) to specify the type of subset search/selection.
Required if |
really.big |
option for |
type |
option for |
normalize |
option for |
eps |
option for |
max.steps |
Limit the number of steps taken for |
plot.it |
option to plot the output for |
lars.criterion |
an option to assess model selection for the
|
K |
number of folds for computing the K-fold cross-validated mean
squared prediction error for |
This control function is used to process optional arguments passed
via ...
to fitTsfm
. These arguments are validated and defaults
are set if necessary before being passed internally to one of the following
functions: lm
, lmRob
,
step
, regsubsets
,
lars
and cv.lars
. See their
respective help files for more details. The arguments to each of these
functions are listed above in approximately the same order for user
convenience.
The scalar decay
is used by fitTsfm
to compute
exponentially decaying weights for fit.method="DLS"
. Alternately, one
can directly specify weights
, a weights vector, to be used with
"LS" or "Robust". Especially when fitting multiple assets, care should be
taken to ensure that the length of the weights vector matches the number of
observations (excluding cases ignored due to NAs).
lars.criterion
selects the criterion (one of "Cp" or "cv") to
determine the best fitted model for variable.selection="lars"
. The
"Cp" statistic (defined in page 17 of Efron et al. (2004)) is calculated
using summary.lars
. While, "cv" computes the K-fold
cross-validated mean squared prediction error using
cv.lars
.
A list of the above components. This is only meant to be used by
fitTsfm
.
Sangeetha Srinivasan
Efron, B., Hastie, T., Johnstone, I., & Tibshirani, R. (2004). Least angle regression. The Annals of statistics, 32(2), 407-499.
fitTsfm
, lm
,
lmRob
, step
,
regsubsets
, lars
and
cv.lars
1 2 3 4 5 6 7 8 9 10 11 12 13 | ## Not run:
# check argument list passed by fitTsfm.control
tsfm.ctrl <- fitTsfm.control(method="exhaustive", nvmin=2)
print(tsfm.ctrl)
## End(Not run)
# used internally by fitTsfm in the example below
data(managers)
fit <- fitTsfm(asset.names=colnames(managers[,(1:6)]),
factor.names=colnames(managers[,(7:9)]),
data=managers, variable.selection="subsets",
method="exhaustive", nvmin=2)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.