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.61487398  0.10276515 35.1761 < 2.2e-16 ***
#> crim_1_beta      -0.01966869  0.00485003 -4.0554 7.391e-05 ***
#> zn_2_beta                  0           0       0         0    
#> indus_3_beta               0           0       0         0    
#> rm_4_beta         0.23420795  0.01674201 13.9892 < 2.2e-16 ***
#> age_5_beta       -0.00106469  0.00037756 -2.8199 0.0032749 ** 
#> rad_6_beta        0.00872888  0.00225009  3.8794 0.0001322 ***
#> ptratio_7_beta   -0.02576656  0.00284079 -9.0702 3.928e-14 ***
#> lnox_8_beta      -0.27952994  0.08742682 -3.1973 0.0011070 ** 
#> ldis_9_beta      -0.15876816  0.02377214 -6.6787 3.053e-09 ***
#> ltax_10_beta     -0.18566174  0.03298377 -5.6289 2.356e-07 ***
#> llstat_11_beta   -0.17089617  0.02526373 -6.7645 2.112e-09 ***
#> chast_12_beta     0.05037052  0.01949714  2.5835 0.0062559 ** 
#> 
#> Scale:
#>                    Estimate        SE       Z    Pvalue    
#> intercept_0_alpha -9.650781  2.212211 -4.3625 2.592e-05 ***
#> crim_1_alpha       0.017943  0.015786  1.1366 0.1709230    
#> zn_2_alpha                0         0       0         0    
#> indus_3_alpha     -0.033626  0.021922 -1.5339 0.0775463 .  
#> rm_4_alpha        -0.171268  0.103700 -1.6516 0.0602066 .  
#> age_5_alpha               0         0       0         0    
#> rad_6_alpha        0.032485  0.017919  1.8129 0.0420818 *  
#> ptratio_7_alpha           0         0       0         0    
#> lnox_8_alpha              0         0       0         0    
#> ldis_9_alpha      -0.973190  0.228854 -4.2524 3.798e-05 ***
#> ltax_10_alpha      1.376569  0.389562  3.5336 0.0003973 ***
#> llstat_11_alpha           0         0       0         0    
#> chast_12_alpha            0         0       0         0    
#> 
#> Shape:
#>                   Estimate      SE      Z  Pvalue   
#> intercept_0_nu     0.29278 0.10525 2.7817 0.00364 **
#> 
#> ---
#> Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
#> 
#> Kappa Estimate:
#> [1] 1.540152
#> Penalized Likelihood:
#> [1] 223.5697
#> IC Value:
#> [1] -447.1393

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

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))