View source: R/summary.cv.savvyPR.R
| summary.cv.savvyPR | R Documentation |
Prints a comprehensive statistical summary of a fitted cross-validated parity regression model object. It displays the model's configuration, statistical summaries of the estimated coefficients, model fit statistics, and cross-validation results.
## S3 method for class 'cv.savvyPR'
summary(object, ...)
object |
A fitted model object of class |
... |
Additional arguments passed to the generic |
Summary of a Fitted Cross-Validated Parity Regression Model with Statistics
This function is an S3 method for the generic summary function. It formats and prints
a detailed statistical overview of the optimal cross-validated model. The output includes:
The parameterization method used ("budget" or "target").
The matched call that produced the model.
Residual quantiles.
A table of estimated optimal coefficients with their corresponding standard errors, t-values, p-values, confidence intervals, and significance codes.
Overall model fit statistics, including Residual Standard Error, Multiple and Adjusted R-squared, F-statistic, AIC, BIC, and Deviance.
A Cross-Validation Summary displaying the minimum mean cross-validation error and the optimal tuning values (val and/or lambda).
Invisibly returns NULL. This function is primarily called for its side
effect of printing the summary to the console.
Ziwei Chen, Vali Asimit and Pietro Millossovich
Maintainer: Ziwei Chen <ziwei.chen.3@citystgeorges.ac.uk>
cv.savvyPR
# Simulate some data
set.seed(123)
n <- 100
p <- 10
x <- matrix(rnorm(n * p), n, p)
beta <- matrix(rnorm(p), p, 1)
y <- x %*% beta + rnorm(n, sd = 0.5)
# Example 1: Fit and summarize a budget-based cross-validated model
cv_fit_budget <- cv.savvyPR(x, y, method = "budget", model_type = "PR3")
summary(cv_fit_budget)
# Example 2: Fit and summarize a target-based cross-validated model
cv_fit_target <- cv.savvyPR(x, y, method = "target", model_type = "PR1")
summary(cv_fit_target)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.