MAC {maclogp}R Documentation

Mac and LogP measure

Description

This function allows you to obtain a model confidence set using Mac procedure and the LogP uncertainty measure for a selection method based on an information criterion.

Usage

MAC(models, data, B, alpha, method = "bic", delta = 1e-04, eps = 1e-06)

Arguments

models

A list with one entry for each model. Each entry is an integer vector that specifies the columns of matrix data$x to be used as a regressor in that model. An intercept will be fitted automatically.

data

a list including

x

covariates matrix, of dimension nobs and nvars;each row is an observation vector.

y

response variable.

B

number of bootstrap replicates to perform; Default value is 200.

alpha

a vector of significance levels. The confidence levels of the model confidence sets are 1-alpha. Default value is 0.05.

method

Information criterion. Users can choose from "bic", "aic". Default value is "bic".

delta

A small positive number added inside of LogP when the bootstrap probability of selected model is 1. Default value is 1e-4.

eps

toterance level in choosing models with total bootstrap probabilities at least 1-alpha. Default value is 1e-6.

Value

Returns an object of class “MAC”. An object of class “MAC” is a list containing at least the following components:

hat_M

numeric index of selected model.

con_sets

a list with with one entry for a 1-alpha model confidence set. Each entry is an integer vector that specifies the models selected in this set. The model indexes used in con_sets are their orders in models.

length_con

lengths of confidence sets.

order

Model indexes with increasing information scores based on original data.

probs_inorder

Bootstrap probabilities for the models in order.

beta_ls

a list with one entry for each model. Each entry is a vector of estimated coefficients based on original data for that model.

hat_prob

the Bootstrap probability for single selected model.

hat_logp

the LogP measure.

References

Liu, X., Li, Y. & Jiang, J.(2020). Simple measures of uncertainty for model selection. TEST, 1-20.

See Also

plot_MAC

Examples

set.seed(0)
n= 50
B= 100
p= 5
x = matrix(rnorm(n*p, mean=0, sd=1), n, p)
true_b = c(1:3, rep(0,p-3))
y = x%*% true_b+rnorm(n)
alpha=c(0.1,0.05,0.01)
data=list(x=x,y=y)
models=Models_gen(1:p)
result=MAC(models, data, B, alpha)

[Package maclogp version 0.1.1 Index]