stepjglm {stepjglm} | R Documentation |
A procedure for selecting variables in JMMD, based on hypothesis testing and the quality of the model's fit, including mixture models.
stepjglm( modelo, alpha1, alpha2, dad, familia, lambda1, lambda2, modini = 1, saidas = T )
modelo |
an object of class "formula" (or one that can be coerced to that class): a symbolic description of the model to be fitted. if |
alpha1 |
significance level for testing add new terms on the mean models |
alpha2 |
significance level for testing add new terms on the dispersion models |
dad |
a data frame contain the data |
familia |
a character string naming a family function or the result of a call to a family function. For glm.fit only the third option is supported. (See family for details of family functions.) |
lambda1 |
some function of the sample size to calculate the coefficient of determination as the mean model criterion (See Hu and Shao (2008) for more details) |
lambda2 |
some function of the sample size to calculate the coefficient of determination as the dispersion model criterion (See Hu and Shao (2008) for more details) |
modini |
if |
saidas |
if True (default) shows step by step procedure |
The function implements a method for selection of variables for both the mean and dispersion models in the JMMD. The mehtod is a procedure for selecting variables, based on hypothesis testing and the quality of the model's fit. A criterion for checking the goodness of fit is used, in each iteration of the selection process, as a filter for choosing the terms that will be evaluated by a hypothesis test. for more details on selection algorithms, see Pinto & Pereira (2021)
A list containing two objects of the "glm" class, with the adjustments for the mean and dispersion models respectively.
Leandro Alves Pereira, Edmilson Rodrigues Pinto
Pinto, E. R., Pereira, L. A. (in press). On variable selection in joint modeling of mean and dispersion. Brazilian Journal of Probability and Statistics.
Hu, B. and Shao, J. (2008). Generalized linear model selection usingR2.Journal of Statistical Planning andInference,138, 3705-3712.
glm
,
data(bread_mixture) Form = as.formula(y~ x1:x2+x1:x3+x2:x3+x1:x2:(x1-x2)+x1:x3:(x1-x3)+ + x1:z1+x2:z1+x3:z1+x1:x2:z1 + x1:x3:z1+x1:x2:(x1-x2):z1 + x1:x3:(x1-x3):z1 + x1:z2+x2:z2+x3:z2+x1:x2:z2 + x1:x3:z2+x1:x2:(x1-x2):z2 +x1:x3:(x1-x3):z2) object = stepjglm(Form, 0.1,0.1,bread_mixture,gaussian,sqrt(90),"AIC","-1+x1+x2+x3") summary(object$modelo.mean) summary(object$modelo.disp)