consmixed: Automated model selection process for the Consumer data

Description Usage Arguments Value Author(s) Examples

Description

Constructs the biggest possible model and reduces it to the best by principle of parcimony. First elimination of random effects is performed following by elimination of fixed effects. The LRT test is used for testing random terms, F-type hypothesis test is used for testing fixed terms. The post-hoc and plots are provided

Usage

1
2
consmixed(response, Prod_effects, Cons_effects=NULL,
Cons, data, structure = 3, alpha.random = 0.1, alpha.fixed = 0.05, ...)

Arguments

response

name of the liking variable in the Consumer data

Prod_effects

vector with names of the variables associated with products

Cons_effects

vector with names of the effects associated with consumers

Cons

name of the column in the data that represents consumers

data

data frame (data from consumer studies)

structure

one of the values in c(1,2,3). 1:Analysis of main effects, Random consumer effect AND interaction between consumer and the main effects(Automized reduction in random part, NO reduction in fixed part). 2: Main effects AND all 2-factor interactions. Random consumer effect AND interaction between consumer and all fixed effects (both main and interaction ones). (Automized reduction in random part, NO reduction in fixed part). 3: Full factorial model with ALL possible fixed and random effects. (Automized reduction in random part, AND automized reduction in fixed part).

alpha.random

significance level for elimination of the random part (for LRT test)

alpha.fixed

significance level for elimination of the fixed part (for F test)

...

other potential arguments.

Value

rand.table

table with value of Chi square test, p-values e t.c. for the random effects

anova.table

table which tests whether the model fixed terms are significant (Analysis of Variance)

model

Final model - object of class lmer or gls (after all the required reduction has been performed)

Author(s)

Alexandra Kuznetsova, Per Bruun Brockhoff, Rune Haubo Bojesen Christensen

Examples

1
2
3
4
5
6
library(SensMixed)
data(ham)

consmixed(response="Informed.liking", 
Prod_effects= c("Product","Information"), 
Cons_effects=c("Gender","Age"), Cons = "Consumer", data =ham, structure=1)

alku86/SensMixed documentation built on May 10, 2019, 9:21 a.m.