summary: Summarizes Fit from 'crisp' or 'crispCV'.

Description Usage Arguments Value Examples

Description

This function summarizes fit of the class crispCV or crisp.

Usage

1
2
3
4
5
## S3 method for class 'crisp'
summary(object, lambda.index = NULL, ...)

## S3 method for class 'crispCV'
summary(object, ...)

Arguments

object

An object of class crisp or crispCV, which result from running the crisp or crispCV functions, respectively.

lambda.index

The index for the desired value of lambda, i.e., object$lambda.seq[lambda.index]. By default, fits for all values of lambda are summarized.

...

Additional arguments to be passed, which are ignored in this function.

Value

None.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
## 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)
#or fit model and select lambda using 2-fold cross-validation
#note: use larger 'n.fold' (e.g., 10) in practice
crispCV.out <- crispCV(X = data$X, y = data$y, n.fold = 2)

#summarize all of the fits
summary(crisp.out)
#or just summarize a single fit
#we examine the fit with an index of 25. that is, lambda of
crisp.out$lambda.seq[25]
summary(crisp.out, lambda.index = 25)
#lastly, we can summarize the fit chosen using cross-validation
summary(crispCV.out)

## End(Not run)

crisp documentation built on May 2, 2019, 2:40 a.m.