glm_model {psycModel} | R Documentation |
Generalized Linear Regression
Description
Fit a generalized linear regression using glm()
. This function is still in early development stage.
Usage
glm_model(
data,
response_variable,
predictor_variable,
two_way_interaction_factor = NULL,
three_way_interaction_factor = NULL,
family,
quite = FALSE
)
Arguments
data |
|
response_variable |
response variable. Support |
predictor_variable |
predictor variable. Support |
two_way_interaction_factor |
two-way interaction factors. You need to pass 2+ factor. Support |
three_way_interaction_factor |
three-way interaction factor. You need to pass exactly 3 factors. Specifying three-way interaction factors automatically included all two-way interactions, so please do not specify the two_way_interaction_factor argument. Support |
family |
a GLM family. It will passed to the family argument in glmer. See |
quite |
suppress printing output |
Value
an object class of glm
representing the linear regression fit
Examples
fit <- glm_model(
response_variable = incidence,
predictor_variable = period,
family = "poisson", # or you can enter as poisson(link = 'log'),
data = lme4::cbpp
)
[Package psycModel version 0.5.0 Index]