This function gives the model selection results.
Usage
XMInt_select(
X,
Y,
M,
K = 20,
zeta = 0.05,
max.factor = 1.5,
hbic_plot = FALSE,
coef_print = FALSE
)
Arguments
- X
exposure
- Y
outcome
- M
mediators
- K
lambda sequence length (default = 20)
- zeta
min/max lambda ratio (default = 0.05)
- max.factor
enlarging factor (default = 1.5) to start with base model
- hbic_plot
plot HBIC curve (default =
FALSE
)- coef_print
print coefficients (default =
FALSE
)
Value
selected_mediator: selected mediator
selected_interaction: selected interaction
hbic_plot: HBIC plot for final model selection
hbic: computed HBIC
lambda: lambda sequence used
coefficient: estimated coefficients
Examples
data = dat_gen(N = 400, V = 50, es = 1, seed = 1234)
X = data$X; Y = data$Y; M = data$M
XMInt_select(X,Y,M)
#> Max lambda needs to be enlarged.
#> Maximum lambda has been identified.
#> Lambda 1 was finished.
#> Lambda 2 was finished.
#> Lambda 3 was finished.
#> Lambda 4 was finished.
#> Lambda 5 was finished.
#> Lambda 6 was finished.
#> Lambda 7 was finished.
#> Lambda 8 was finished.
#> Lambda 9 was finished.
#> Lambda 10 was finished.
#> Lambda 11 was finished.
#> Lambda 12 was finished.
#> Lambda 13 was finished.
#> Lambda 14 was finished.
#> Lambda 15 was finished.
#> Lambda 16 was finished.
#> Lambda 17 was finished.
#> Lambda 18 was finished.
#> Lambda 19 was finished.
#> Lambda 20 was finished.
#> $selected_mediator
#> [1] "M1" "M2" "M3"
#>
#> $selected_interaction
#> [1] "M1"
#>
#> $hbic_plot
#> [1] "HBIC plot is not printed."
#>
#> $hbic
#> [1] -268.9573 -474.0239 -690.0103 -877.8597 -1267.1706 -1337.8748
#> [7] -1565.0463 -1699.3098 -1699.3098 -1699.3098 -1699.3098 -1699.3097
#> [13] -1699.3097 -1696.0215 -1687.7229 -1663.1533 -1646.6698 -1605.9747
#> [19] -1571.4165 -1552.8660
#>
#> $lambda
#> [1] 1.23671777 1.05631960 0.90223584 0.77062805 0.65821769 0.56220446
#> [7] 0.48019654 0.41015099 0.35032288 0.29922180 0.25557477 0.21829446
#> [13] 0.18645217 0.15925467 0.13602443 0.11618275 0.09923535 0.08476004
#> [19] 0.07239622 0.06183589
#>
#> $coefficient
#> [1] "Coefficients are not printed."
#>