Prints a comprehensive statistical summary of a fitted parity regression model object. It displays the model's configuration, statistical summaries of the estimated coefficients, and overall model fit statistics.
Usage
# S3 method for class 'savvyPR'
summary(object, ...)Arguments
- object
A fitted model object of class
savvyPRreturned bysavvyPR.- ...
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 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 fitted model. The output includes:
The parameterization method used (
"budget"or"target").The matched call that produced the model.
Residual quantiles.
A table of estimated 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.
Author
Ziwei Chen, Vali Asimit and Pietro Millossovich
Maintainer: Ziwei Chen <ziwei.chen.3@citystgeorges.ac.uk>
Examples
# 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 parity regression model
fit_budget <- savvyPR(x, y, method = "budget", val = 0.05, intercept = FALSE)
summary(fit_budget)
#> Summary of Parity Model
#> ===================================================================
#>
#> Parameterization Method: budget
#> Intercept: Not included
#>
#> Call:
#> savvyPR(x = x, y = y, method = "budget", val = 0.05, intercept = FALSE)
#>
#> Residuals:
#> 0% 25% 50% 75% 100%
#> -1.1793461851 -0.2852306271 -0.0001702917 0.4005871433 1.1196203170
#>
#> Coefficients:
#> Estimate Std. Error t value Pr(>|t|) 2.5 % 97.5 % Signif.
#> X1 -1.005 0.0612 -16.4254 7.9983e-29 -1.1249 -0.8851 ***
#> X2 -1.101 0.0574 -19.174 1.5393e-33 -1.2135 -0.9884 ***
#> X3 0.124 0.0567 2.1879 0.0313 0.0129 0.2351 *
#> X4 -0.1422 0.0557 -2.5546 0.0123 -0.2513 -0.0331 *
#> X5 -2.6292 0.0574 -45.8105 3.6811e-64 -2.7417 -2.5167 ***
#> X6 1.0761 0.0601 17.8971 2.1237e-31 0.9583 1.194 ***
#> X7 0.2992 0.0527 5.6806 1.6304e-07 0.196 0.4025 ***
#> X8 2.3617 0.0558 42.3542 3.1442e-61 2.2524 2.4709 ***
#> X9 0.6847 0.0524 13.0717 1.6403e-22 0.582 0.7873 ***
#> X10 -0.4447 0.0545 -8.1602 1.9048e-12 -0.5516 -0.3379 ***
#> ---
#> Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
#>
#> Residual standard error: 0.5329 on 90 degrees of freedom
#> Multiple R-squared: 0.9827 , Adjusted R-squared: 0.981
#> F-statistic: 512.5722 on 9 and 90 DF, p-value: 9.0838e-75
#> AIC: -116.433 , BIC: -90.3813 , Deviance: 25.5552
#>
# Example 2: Fit and summarize a Target-based parity regression model
fit_target <- savvyPR(x, y, method = "target", val = 1, intercept = TRUE)
summary(fit_target)
#> Summary of Parity Model
#> ===================================================================
#>
#> Parameterization Method: target
#> Intercept: Included
#>
#> Call:
#> savvyPR(x = x, y = y, method = "target", val = 1, intercept = TRUE)
#>
#> Residuals:
#> 0% 25% 50% 75% 100%
#> -1.27461573 -0.36662467 -0.01804345 0.38962860 1.22098116
#>
#> Coefficients:
#> Estimate Std. Error t value Pr(>|t|) 2.5 % 97.5 % Signif.
#> (Intercept) 0.0447 0.0593 0.7532 0.4533 -0.0716 0.161
#> X1 -1.0194 0.0651 -15.6594 2.6310e-27 -1.147 -0.8918 ***
#> X2 -1.1191 0.0608 -18.3925 4.5341e-32 -1.2383 -0.9998 ***
#> X3 0.1741 0.0608 2.8651 0.0052 0.055 0.2932 **
#> X4 -0.1824 0.0589 -3.0945 0.0026 -0.2979 -0.0669 **
#> X5 -2.6378 0.0614 -42.9422 2.7939e-61 -2.7582 -2.5174 ***
#> X6 1.087 0.0639 17.011 1.0309e-29 0.9617 1.2122 ***
#> X7 0.3327 0.0562 5.921 5.8952e-08 0.2226 0.4429 ***
#> X8 2.3795 0.0595 39.9967 1.1451e-58 2.2629 2.4961 ***
#> X9 0.699 0.0556 12.5707 1.9561e-21 0.5901 0.808 ***
#> X10 -0.4613 0.0577 -7.997 4.4064e-12 -0.5743 -0.3482 ***
#> ---
#> Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
#>
#> Residual standard error: 0.5639 on 89 degrees of freedom
#> Multiple R-squared: 0.9809 , Adjusted R-squared: 0.9787
#> F-statistic: 456.9177 on 10 and 89 DF, p-value: 6.1258e-72
#> AIC: -104.245 , BIC: -75.5881 , Deviance: 28.296
#>