ahm {AHM} | R Documentation |
This is one of the main functions. The function ahm computes the proposed additive heredity model.
ahm(y, x, num_major = 3, dist_minor = c(2, 2, 1), type = "weak",
alpha = 0, lambda_seq = seq(0, 5, 0.01), nfolds = NULL,
mapping_type = c("power"), powerh = 0, rep_gcv = 100)
y |
numeric vector |
x |
data.frame Note the column names of the x should be in the order of major components, minor components, and no interactions are needed. |
num_major |
number of major components |
dist_minor |
the allocation of number of minor components nested under major components |
type |
heredity type, weak heredity is the current support type |
alpha |
0 is for the ridge in glmnet https://web.stanford.edu/~hastie/glmnet/glmnet_alpha.html |
lambda_seq |
a numeric vector for the options of lambda used in ridge regression for estimating the initials |
nfolds |
used in cv.glmnet for initial value of parameters in the non-negative garrote method |
mapping_type |
the form of the coefficient function of major components in front of corresponding minor terms. Currently only support "power" |
powerh |
the power parameter used for the power function |
rep_gcv |
the number of choices of tuning parameter used in the GCV selection |
Return a list
data("pringles_fat")
data_fat = pringles_fat
h_tmp = 1.3
x = data_fat[,c("c1","c2","c3","x11","x12","x21","x22")]
y = data_fat[,1]
out = ahm (y, x, num_major = 3, dist_minor = c(2,2,1),
type = "weak", alpha=0, lambda_seq=seq(0,5,0.01), nfold = NULL,
mapping_type = c("power"), powerh = h_tmp,
rep_gcv=100)
summary(out)