summary.hal9001 {hal9001} | R Documentation |
Summary Method for HAL fit objects
Description
Summary Method for HAL fit objects
Usage
## S3 method for class 'hal9001'
summary(
object,
lambda = NULL,
only_nonzero_coefs = TRUE,
include_redundant_terms = FALSE,
round_cutoffs = 3,
...
)
Arguments
object |
An object of class hal9001 , containing the results of
fitting the Highly Adaptive Lasso, as produced by fit_hal .
|
lambda |
Optional numeric value of the lambda tuning
parameter, for which corresponding coefficient values will be summarized.
Defaults to fit_hal 's optimal value, lambda_star , or
the minimum value of lambda_star .
|
only_nonzero_coefs |
A logical specifying whether the summary
should include only terms with non-zero coefficients.
|
include_redundant_terms |
A logical specifying whether the
summary should remove so-called "redundant terms". We define a redundant
term (say x1) as a term (1) with basis function corresponding to an
existing basis function, a duplicate; and (2) the duplicate contains the
x1 term as part of its term, so that x1 terms inclusion would be redundant.
For example, say the same coefficient corresponds to these three terms:
(1) "I(age >= 50)*I(bmi >= 18)", (2) "I(age >= 50)", and (3)
"I(education >= 16)". When include_redundant_terms is
FALSE (default), the second basis function is omitted.
|
round_cutoffs |
An integer indicating the number of decimal
places to be used for rounding cutoff values in the term. For example, if
"bmi" was numeric that was rounded to the third decimal, in the example
above we would have needed to specify round_cutoffs = 0 in order to
yield a term like "I(bmi >= 18)" opposed to something like
"I(bmi >= 18.111)". This rounding is intended to simplify the term-wise
part of the output and only rounds the basis cutoffs, the hal9001
model's coefficients are not rounded.
|
... |
Additional arguments passed to summary , not supported.
|
Details
Method for summarizing the coefficients of the Highly Adaptive
Lasso estimator in terms of the basis functions corresponding to covariates
and interactions of covariates, returned as a single S3 object of class
hal9001
.
Due to the nature of the basis function terms, the summary tables can be
extremely wide. The R environment might not be the optimal location to view
the summary. Tables can be exported from R to LaTeX with xtable
package (or similar). Here's an example:
print(xtable(summary(fit)$table, type = "latex"), file = "dt.tex")
.
Value
A list summarizing a hal9001
object's coefficients.
[Package
hal9001 version 0.4.6
Index]