form_expression_mixed_model_lme4 {packDAMipd} | R Documentation |
Form expression to use with mixed models
Description
Form expression to use with mixed models
Usage
form_expression_mixed_model_lme4(
param_to_be_estimated,
dataset,
fix_eff,
fix_eff_interact_vars,
random_intercept_vars,
nested_intercept_vars_pairs,
cross_intercept_vars_pairs,
uncorrel_slope_intercept_pairs,
random_slope_intercept_pairs,
family,
link
)
Arguments
param_to_be_estimated |
column name of dependent variable |
dataset |
a dataframe |
fix_eff |
names of variables as fixed effect predictors |
fix_eff_interact_vars |
if interaction -true |
random_intercept_vars |
names of variables for random intercept |
nested_intercept_vars_pairs |
those of the random intercept variables with nested effect |
cross_intercept_vars_pairs |
those of the random intercept variables with crossed effect |
uncorrel_slope_intercept_pairs |
variables with correlated intercepts |
random_slope_intercept_pairs |
random slopes intercept pairs - this is a list of paired variables |
family |
family of distribution for non gaussian distribution of predicted variable |
link |
link function for the variance |
Details
Form the expression for mixed model
Value
result regression result with plot if success and -1, if failure
Examples
datafile <- system.file("extdata", "data_linear_mixed_model.csv",
package = "packDAMipd")
dt = utils::read.csv(datafile, header = TRUE)
formula <- form_expression_mixed_model_lme4("extro",
dataset = dt,
fix_eff = c("open", "agree", "social"),
fix_eff_interact_vars = NULL,
random_intercept_vars = c("school", "class"),
nested_intercept_vars_pairs = list(c("school", "class")),
cross_intercept_vars_pairs = NULL,
uncorrel_slope_intercept_pairs = NULL,
random_slope_intercept_pairs = NULL, family = "binomial", link = NA
)
[Package packDAMipd version 1.1.0 Index]