stepjglm {stepjglm}R Documentation

Variable selection in joint modeling of mean and dispersion

Description

A procedure for selecting variables in JMMD, based on hypothesis testing and the quality of the model's fit, including mixture models.

Usage

stepjglm(
  modelo,
  alpha1,
  alpha2,
  dad,
  familia,
  lambda1,
  lambda2,
  modini = 1,
  saidas = T
)

Arguments

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 dad is a mixture data, dad doesn't contain the principal mixture components.

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 dad is a mixture data, modini is the principal mixture components, else, modini must be equal to 1.

saidas

if True (default) shows step by step procedure

Details

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)

Value

A list containing two objects of the "glm" class, with the adjustments for the mean and dispersion models respectively.

Author(s)

Leandro Alves Pereira, Edmilson Rodrigues Pinto

References

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.

See Also

glm,

Examples


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)


[Package stepjglm version 0.0.1 Index]