Smooth Generalized Normal Distribution

To begin, load the package.

library(smoothic)

Boston Housing Data

Perform automatic variable selection using a smooth information criterion.

fit <- smoothic(
  formula = lcmedv ~ .,
  data = bostonhouseprice2,
  family = "sgnd", # Smooth Generalized Normal Distribution
  model = "mpr" # model location and scale
)

Display the estimates and standard errors.

summary(fit)
#> Call:
#> smoothic(formula = lcmedv ~ ., data = bostonhouseprice2, family = "sgnd", 
#>     model = "mpr")
#> Family:
#> [1] "sgnd"
#> Model:
#> [1] "mpr"
#> 
#> Coefficients:
#> 
#> Location:
#>                     Estimate          SE       Z    Pvalue    
#> intercept_0_beta  3.61269683  0.10734941 33.6536 < 2.2e-16 ***
#> crim_1_beta      -0.02001519  0.00500194 -4.0015 8.911e-05 ***
#> zn_2_beta                  0           0       0         0    
#> indus_3_beta               0           0       0         0    
#> rm_4_beta         0.23433426  0.02030057 11.5432 < 2.2e-16 ***
#> age_5_beta       -0.00107256  0.00038688 -2.7723 0.0037557 ** 
#> rad_6_beta        0.00883288  0.00238284  3.7069 0.0002317 ***
#> ptratio_7_beta   -0.02577409  0.00335341 -7.6859 3.410e-11 ***
#> lnox_8_beta      -0.27725435  0.08430632 -3.2887 0.0008454 ***
#> ldis_9_beta      -0.15856448  0.02356331 -6.7293 2.509e-09 ***
#> ltax_10_beta     -0.18512811  0.04501722 -4.1124 6.153e-05 ***
#> llstat_11_beta   -0.17099144  0.03137785 -5.4494 4.834e-07 ***
#> chast_12_beta     0.05156191  0.01969471  2.6181 0.0057144 ** 
#> 
#> Scale:
#>                    Estimate        SE       Z    Pvalue    
#> intercept_0_alpha -9.650427  2.217661 -4.3516 2.716e-05 ***
#> crim_1_alpha       0.019240  0.016085  1.1961 0.1530811    
#> zn_2_alpha                0         0       0         0    
#> indus_3_alpha     -0.034932  0.022723 -1.5373 0.0771660 .  
#> rm_4_alpha        -0.172226  0.103520 -1.6637 0.0587434 .  
#> age_5_alpha               0         0       0         0    
#> rad_6_alpha        0.032035  0.018054  1.7744 0.0460376 *  
#> ptratio_7_alpha           0         0       0         0    
#> lnox_8_alpha              0         0       0         0    
#> ldis_9_alpha      -0.983160  0.228602 -4.3008 3.237e-05 ***
#> ltax_10_alpha      1.381717  0.391905  3.5256 0.0004097 ***
#> llstat_11_alpha           0         0       0         0    
#> chast_12_alpha            0         0       0         0    
#> 
#> Shape:
#>                   Estimate      SE      Z   Pvalue   
#> intercept_0_nu     0.29238 0.10770 2.7148 0.004393 **
#> 
#> ---
#> Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
#> 
#> Kappa Estimate:
#> [1] 1.539618
#> Penalized Likelihood:
#> [1] 223.6308
#> IC Value:
#> [1] -447.2617

fit$kappa # shape estimate
#> [1] 1.539618

Plot the standardized coefficient values with respect to the epsilon-telescope.

plot_paths(fit)

Plot the model-based conditional density curves.

plot_effects(fit,
             what = c("ltax", "rm", "ldis"), # or "all" for all selected variables
             density_range = c(2.25, 3.75))