crisp(y, X, q = NULL, lambda.min.ratio = 0.01, n.lambda = 50, lambda.seq = NULL, rho = 0.1, e_abs = 10^-4, e_rel = 10^-3, varyrho = TRUE, double.run = FALSE)
M.hat
, which will be a q
by q
matrix. M.hat
is a mean matrix whose element M.hat[i,j]
contains the mean for pairs of covariate values within a quantile range
of the observed predictors X[,1]
and X[,2]
. For example, M.hat[1,2]
represents the
mean of the observations with the first covariate value less than the 1/q
-quantile of X[,1]
,
and the second covariate value between the 1/q
- and 2/q
-quantiles of X[,2]
.
If left NULL
, then q=n
is used when n<100, and="" q=100 is used when n>=100.
We recommend using q<=100< code=""> as higher values take longer to fit and provide an unneeded amount of granularity.=100<>
100,>
lambda.seq
, as a fraction of the maximum lambda value, which is the data-derived
smallest value for which the fit is a constant value. The default is 0.01.lambda.seq
using lambda.min.ratio
and n.lambda
, but providing lambda.seq
overrides this. If provided,
lambda.seq
should be a decreasing sequence of values, since CRISP relies on warm starts for speed.
Thus fitting the model for a whole sequence of lambda values is often faster than fitting for a single lambda value.rho
be varied from iteration to iteration? This is discussed in Appendix C.3 of the CRISP paper.M.hat
. If double.run
is TRUE
, then the algorithm
is run a second time to obtain M.hat
with exact equality of the appropriate rows and columns. This issue
is discussed further in Appendix C.4 of the CRISP paper.crisp
, which can be summarized using summary
, plotted using plot
, and used to predict outcome values for new covariates using predict
.
M.hat.list
: A list of length n.lambda
giving M.hat
for each value of lambda.seq
.
num.blocks
: A vector of length n.lambda
giving the number of blocks in M.hat
for each value of lambda.seq
.
obj.vec
: A vector of length n.lambda
giving the value of the objective of Eqn (4) in the CRISP paper for each value of lambda.seq
.
crispCV
, plot
, summary
, predict
## Not run:
# #See ?'crisp-package' for a full example of how to use this package
#
# #generate data (using a very small 'n' for illustration purposes)
# set.seed(1)
# data <- sim.data(n = 15, scenario = 2)
#
# #fit model for a range of tuning parameters, i.e., lambda values
# #lambda sequence is chosen automatically if not specified
# crisp.out <- crisp(X = data$X, y = data$y)
# ## End(Not run)
Run the code above in your browser using DataLab