Summary of Cross-Validated Parity Regression Model
Source:R/summary.cv.savvyPR.R
summary.cv.savvyPR.RdPrints 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.
Usage
# S3 method for class 'cv.savvyPR'
summary(object, ...)Arguments
- object
A fitted model object of class
cv.savvyPRreturned bycv.savvyPR.- ...
Additional arguments passed to the generic
summaryfunction (currently unused).
Value
Invisibly returns NULL. This function is primarily called for its side
effect of printing the summary to the console.
Details
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 (
valand/orlambda).
Author
Ziwei Chen, Vali Asimit and Pietro Millossovich
Maintainer: Ziwei Chen <ziwei.chen.3@citystgeorges.ac.uk>
Examples
# \donttest{
# 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)
#> Summary of Cross-Validated Parity Model
#> ===================================================================
#>
#> Parameterization Method: budget
#> Intercept: Included
#>
#> Call:
#> cv.savvyPR(x = x, y = y, method = "budget", model_type = "PR3")
#>
#> Residuals:
#> 0% 25% 50% 75% 100%
#> -1.13990915 -0.31910728 -0.02820466 0.33315737 1.23879794
#>
#> Coefficients:
#> Estimate Std. Error t value Pr(>|t|) 2.5 % 97.5 % Signif.
#> (Intercept) 0.0659 0.0537 1.2272 0.2230 -0.0394 0.1712
#> X1 -0.9956 0.059 -16.8868 1.6986e-29 -1.1111 -0.88 ***
#> X2 -1.0854 0.0551 -19.6988 3.3258e-34 -1.1934 -0.9774 ***
#> X3 0.0103 0.055 0.187 0.8521 -0.0976 0.1181
#> X4 -0.0654 0.0534 -1.2256 0.2236 -0.17 0.0392
#> X5 -2.6262 0.0556 -47.2095 8.6459e-65 -2.7352 -2.5171 ***
#> X6 1.0722 0.0579 18.5297 2.6790e-32 0.9588 1.1857 ***
#> X7 0.2621 0.0509 5.1495 1.5518e-06 0.1623 0.3618 ***
#> X8 2.3303 0.0539 43.2532 1.5133e-61 2.2247 2.4359 ***
#> X9 0.6715 0.0504 13.3343 6.2237e-23 0.5728 0.7702 ***
#> X10 -0.4369 0.0522 -8.3653 7.7024e-13 -0.5393 -0.3346 ***
#> ---
#> Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
#>
#> Residual standard error: 0.5106 on 89 degrees of freedom
#> Multiple R-squared: 0.9843 , Adjusted R-squared: 0.9826
#> F-statistic: 559.0964 on 10 and 89 DF, p-value: 9.1272e-76
#> AIC: -124.077 , BIC: -95.4202 , Deviance: 23.2057
#>
#> Cross-Validation Summary:
#> Mean Cross-Validation Error ( mse: Mean-Squared Error ): 0.2966
#> Fixed Val: 0
#> Optimal Lambda: 0
#>
# 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)
#> Summary of Cross-Validated Parity Model
#> ===================================================================
#>
#> Parameterization Method: target
#> Intercept: Included
#>
#> Call:
#> cv.savvyPR(x = x, y = y, method = "target", model_type = "PR1")
#>
#> Residuals:
#> 0% 25% 50% 75% 100%
#> -1.13990915 -0.31910728 -0.02820466 0.33315737 1.23879794
#>
#> Coefficients:
#> Estimate Std. Error t value Pr(>|t|) 2.5 % 97.5 % Signif.
#> (Intercept) 0.0659 0.0537 1.2272 0.2230 -0.0394 0.1712
#> X1 -0.9956 0.059 -16.8868 1.6986e-29 -1.1111 -0.88 ***
#> X2 -1.0854 0.0551 -19.6988 3.3258e-34 -1.1934 -0.9774 ***
#> X3 0.0103 0.055 0.187 0.8521 -0.0976 0.1181
#> X4 -0.0654 0.0534 -1.2256 0.2236 -0.17 0.0392
#> X5 -2.6262 0.0556 -47.2095 8.6459e-65 -2.7352 -2.5171 ***
#> X6 1.0722 0.0579 18.5297 2.6790e-32 0.9588 1.1857 ***
#> X7 0.2621 0.0509 5.1495 1.5518e-06 0.1623 0.3618 ***
#> X8 2.3303 0.0539 43.2532 1.5133e-61 2.2247 2.4359 ***
#> X9 0.6715 0.0504 13.3343 6.2237e-23 0.5728 0.7702 ***
#> X10 -0.4369 0.0522 -8.3653 7.7024e-13 -0.5393 -0.3346 ***
#> ---
#> Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
#>
#> Residual standard error: 0.5106 on 89 degrees of freedom
#> Multiple R-squared: 0.9843 , Adjusted R-squared: 0.9826
#> F-statistic: 559.0964 on 10 and 89 DF, p-value: 9.1272e-76
#> AIC: -124.077 , BIC: -95.4202 , Deviance: 23.2057
#>
#> Cross-Validation Summary:
#> Mean Cross-Validation Error ( mse: Mean-Squared Error ): 0.2812
#> Optimal Val: 0
#> Fixed Lambda: 0
#>
# }