MixTreatment: PSE/JND for Multivariable GLMM Using Delta Methods

Description Usage Arguments Details Value References See Also Examples

View source: R/MixTreatment.R

Description

Estimate the Point of Subjective Equivalence (PSE), the Just Noticeable Difference (JND) and the related Standard Errors for a multivariate distribution by means of Delta Method. The method applies to multivariable GLMM having a probit link function. The function is based on a recursive use of glmer and MixDelta

Usage

1
MixTreatment(xplode.obj, datafr)

Arguments

xplode.obj

an object of class xplode.obj. The fitted model (object of class "merMod") from xplode.obj includes one continuous predictor and one factorial predictor.

datafr

the data frame fitted with the GLMM model

Details

The function MixTreatment is based on a recursive use of glmer and PsychDelta to multivariable GLMM including continuous and factorial predictors. The same caveats of PsychDelta apply (e.g., confidence interval based on normality assumption).

Value

A list, whose lenght is equal to the levels of the factorial predictor, i. Each cell of the list is equal to the output of delta.psy.probit applied to a multivariable model whose baseline is level i of the factorial predictor.

References

Moscatelli, A., Mezzetti, M., & Lacquaniti, F. (2012). Modeling psychophysical data at the population-level: The generalized linear mixed model. Journal of Vision, 12(11):26, 1-17. https://doi.org/10.1167/12.11.26

See Also

glmer for Generalized Linear Mixed Models (including random effects).MixDelta for univariable model with delta method. pseMer for bootstrap-based confidence intervals.

Examples

1
2
3
4
5
6
library(lme4)
data(vibro_exp3)
formula.mod <- cbind(faster, slower) ~ speed * vibration + (1 + speed| subject)
mod <- glmer(formula = formula.mod, family = binomial(link = "probit"), data = vibro_exp3)
xplode.mod <- xplode(model = mod, name.cont = "speed", name.factor = "vibration")
MixTreatment(xplode.mod, vibro_exp3)

MixedPsy documentation built on May 2, 2019, 3:40 p.m.