View source: R/fitTsfm.control.R
fitTsfm.control | R Documentation |
fitTsfm
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!!
fitTsfm.control(
decay = 0.95,
weights,
model = TRUE,
x = FALSE,
y = FALSE,
qr = TRUE,
nrep = NULL,
bb = 0.5,
efficiency = 0.95,
family = "mopt",
tuning.psi,
tuning.chi,
compute.rd = FALSE,
corr.b = TRUE,
split.type = "f",
initial = "S",
max.it = 100,
refine.tol = 1e-07,
rel.tol = 1e-07,
refine.PY = 10,
solve.tol = 1e-07,
trace.lev = 0,
psc_keep = 0.5,
resid_keep_method = "threshold",
resid_keep_thresh = 2,
resid_keep_prop = 0.2,
py_maxit = 20,
py_eps = 1e-05,
mscale_maxit = 50,
mscale_tol = 1e-06,
mscale_rho_fun = "bisquare",
scope,
scale,
direction,
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
|
bb |
tuning constant (between 0 and 1/2) for the M-scale used to compute the initial S-estimator. It
determines the robustness (breakdown point) of the resulting MM-estimator, which is
|
efficiency |
desired asymptotic efficiency of the final regression M-estimator. Defaults to 0.85. |
family |
string specifying the name of the family of loss function to be used (current valid options are "bisquare", "optimal" and "modopt" from the RobStatTM package). Incomplete entries will be matched to the current valid options. |
tuning.psi |
tuning parameters for the regression M-estimator computed with a rho function
as specified with argument |
tuning.chi |
tuning constant for the function used to compute the M-scale
used for the initial S-estimator. If missing, it is computed inside |
compute.rd |
logical value indicating whether robust leverage distances need to be computed. |
corr.b |
logical value indicating whether a finite-sample correction should be applied
to the M-scale parameter |
split.type |
determines how categorical and continuous variables are split. See
|
initial |
string specifying the initial value for the M-step of the MM-estimator. Valid
options are |
max.it |
maximum number of IRWLS iterations for the MM-estimator |
refine.tol |
relative convergence tolerance for the S-estimator |
rel.tol |
relative convergence tolerance for the IRWLS iterations for the MM-estimator |
refine.PY |
number of refinement steps for the Pen~a-Yohai candidates |
solve.tol |
relative tolerance for inversion |
trace.lev |
positive values (increasingly) provide details on the progress of the MM-algorithm |
psc_keep |
For pyinit, proportion of observations to remove based on PSCs. The effective proportion of removed
observations is adjusted according to the sample size to be |
resid_keep_method |
For pyinit, how to clean the data based on large residuals. If
|
resid_keep_thresh |
See parameter |
resid_keep_prop |
See parameter |
py_maxit |
Maximum number of iterations. See |
py_eps |
Relative tolerance for convergence. See |
mscale_maxit |
Maximum number of iterations for the M-scale algorithm. See |
mscale_tol |
Convergence tolerance for the M-scale algorithm. See |
mscale_rho_fun |
String indicating the loss function used for the M-scale. See |
scope |
defines the range of models examined in the |
scale |
optional parameter for |
direction |
the mode of |
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 |
trace |
If positive (or, not |
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
, lmrobdetMM
,
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
,
lmrobdetMM
, step
,
regsubsets
, lars
and
cv.lars
## 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
# load data
data(managers, package = 'PerformanceAnalytics')
# Make syntactically valid column names
colnames(managers)
colnames(managers) <- make.names( colnames(managers))
colnames(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.