Description Usage Arguments Value Author(s) Examples
Constructs a mixed effects model for each of the selected by user attributes according to the specified by the user structure arguments. If required, then the random structures are reduced by eliminating NS random effects. The likelihood ratio test (LRT) is used for testing random terms, F-type hypothesis test is used for testing fixed terms
1 2 3 4 5 6 7 8 9 10 | sensmixed(attributes=NULL, Prod_effects, replication = NULL,
individual, data, product_structure = 3,
error_structure ="No_Rep", MAM = FALSE,
mult.scaling = FALSE, oneway_rand = TRUE,
MAM_PER = FALSE, adjustedMAM = FALSE,
alpha_conditionalMAM = 1,
calc_post_hoc = FALSE, parallel = FALSE,
reduce.random=TRUE, alpha.random = 0.1,
alpha.fixed = 0.05, interact.symbol = ":",
keep.effs = NULL, ...)
|
attributes |
vector with names of sensory attributes |
Prod_effects |
names of the variables related to the product |
replication |
names of the replication column in the data, if present |
individual |
name of the column in the data that represent assessors |
data |
data frame (data from sensory studies) |
product_structure |
one of the values in c(1, 2, 3). 1: only main effects will enter the initial biggest model. 2: main effects and 2-way interaction. 3: all main effects and all possible interaction |
error_structure |
one of the values in c("No_Rep", "2-WAY", "3-WAY"). "No_Rep" and "2-WAY" - assessor effect and all possible interactions between assessor and Product_effects. "3-WAY" - assessor and replicate effect and interaction between them and interaction between them and Product_effects |
MAM |
logical. if MAM model should be constructed (scaling correction) |
mult.scaling |
logical. Whether multiple scaling should be used |
oneway_rand |
logical. Whether there should be just prod effect as part of the random part in MAM |
MAM_PER |
logical. if MAManalysis function should be called (scaling correction) |
adjustedMAM |
logical. should MAM be adjusted for the scaling |
alpha_conditionalMAM |
logical. scaling should be part of the model in case its p-value is less than alpha_conditionalMAM |
calc_post_hoc |
logical. Should the post hoc analysis be performed on the final resuced models for all the attributes |
parallel |
logical. Should the computation be done in parallel. the default is FALSE |
reduce.random |
logical. Eliminate non-significant random effects according to alpha.random or not. The default is TRUE |
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) |
interact.symbol |
symbol for the indication of the interaction between effects. the default one is ":". |
keep.effs |
which effects should be kept in a model. |
... |
other potential arguments. |
FCHi |
matrix with Chi square values from LRT test and F values form F-type test for the selected attributes |
pvalue |
matrix withp-values for all effects for the selected attributes |
Alexandra Kuznetsova, Per Bruun Brockhoff, Rune Haubo Bojesen Christensen
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 | #import SensMixed package
library(SensMixed)
#import TVbo data from lmerTest package
data(TVbo)
#run automated selection process
res <- sensmixed(c("Coloursaturation", "Colourbalance"),
Prod_effects = c("TVset", "Picture"), replication="Repeat",
individual="Assessor", data=TVbo, MAM=TRUE)
## run MAManalysis function
res_MAM <- sensmixed(c("Coloursaturation", "Colourbalance"),
Prod_effects=c("TVset"), replication="Repeat",
individual="Assessor", data=TVbo, MAM_PER=TRUE)
## print is not yet implemented
## get anova part
res_MAM[[3]][,,1]
## compare with the general implementation
res <- sensmixed(c("Coloursaturation", "Colourbalance"),
Prod_effects=c("TVset"),
individual="Assessor", data=TVbo, MAM=TRUE,
reduce.random=FALSE)
res$fixed
## Not run:
plot F and Chi square values
plot(result)
## End(Not run)
result <- sensmixed(names(TVbo)[5:ncol(TVbo)],
Prod_effects=c("TVset", "Picture"),
replication="Repeat", individual="Assessor", data=TVbo,
calc_post_hoc = TRUE)
result
result$fixed
result_MAM <- sensmixed(names(TVbo)[5:ncol(TVbo)],
Prod_effects=c("TVset", "Picture"),
replication="Repeat", individual="Assessor", data=TVbo,
MAM = TRUE)
result_MAM
result_MAM_mult <- sensmixed(names(TVbo)[5:ncol(TVbo)],
Prod_effects=c("TVset", "Picture"),
replication="Repeat", individual="Assessor", data=TVbo,
MAM = TRUE, mult.scaling = TRUE)
result_MAM_mult
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.