| WPT {hmmr} | R Documentation |
Weather Prediction Task Data
Description
This data set contains responses of 11 Parkinsons' patients and 13 age-matched controls on the Weather Prediction Task. Both groups were tested twice. The PD patients were either on or off dopaminergic medication.
Usage
data(WPT)
Format
A data.frame with 9600 observations on the following variables.
ida factor with participant IDs
groupa factor with group IDs (Parksinson's patient or control)
meda factor indicating, for the PD patients, whether they were on dopaminergic medicine or not
occa numeric vector with testing occassions
triala numeric vector with trial numbers
c1a numeric (binary) vector indicating whether the first cue was present (1) or not (0)
c2a numeric (binary) vector indicating whether the second cue was present (1) or not (0)
c3a numeric (binary) vector indicating whether the third cue was present (1) or not (0)
c4a numeric (binary) vector indicating whether the fourth cue was present (1) or not (0)
ya factor with the actual outcome (Rainy or Fine)
ra factor with participants' prediction of the outcome
Source
Speekenbrink, M., Lagnado, D. A., Wilkinson, L., Jahanshahi, M., & Shanks, D. R. (2010). Models of probabilistic category learning in Parkinson's disease: Strategy use and the effects of L-dopa. Journal of Mathematical Psychology, 54, 123-136.
Corresponding author: m.speekenbrink@ucl.ac.uk
Examples
data(WPT)
# set up predictors for the different strategies
WPT$sngl <- 0 # singleton strategy
WPT$sngl[WPT$c1 == 1 & rowSums(WPT[,c("c1","c2","c3","c4")]) == 1] <- -1
WPT$sngl[WPT$c2 == 1 & rowSums(WPT[,c("c1","c2","c3","c4")]) == 1] <- -1
WPT$sngl[WPT$c3 == 1 & rowSums(WPT[,c("c1","c2","c3","c4")]) == 1] <- 1
WPT$sngl[WPT$c4 == 1 & rowSums(WPT[,c("c1","c2","c3","c4")]) == 1] <- 1
WPT$sc1 <- 1 - 2*WPT$c1
WPT$sc2 <- 1 - 2*WPT$c2
WPT$sc3 <- -1 + 2*WPT$c3
WPT$sc4 <- -1 + 2*WPT$c4
WPT$mc <- sign(-WPT$c1 - WPT$c2 + WPT$c3 + WPT$c4)
rModels <- list(
list(GLMresponse(formula=r~-1,data=WPT,family=binomial())),
list(GLMresponse(formula=r~sngl-1,data=WPT,family=binomial())),
list(GLMresponse(formula=r~sc1-1,data=WPT,family=binomial())),
list(GLMresponse(formula=r~sc2-1,data=WPT,family=binomial())),
list(GLMresponse(formula=r~sc3-1,data=WPT,family=binomial())),
list(GLMresponse(formula=r~sc4-1,data=WPT,family=binomial())),
list(GLMresponse(formula=r~mc-1,data=WPT,family=binomial()))
)
transition <- list()
for(i in 1:7) {
transition[[i]] <- transInit(~1,nstates=7,family=multinomial(link="identity"))
}
inMod <- transInit(~1,ns=7,data=data.frame(rep(1,48)),family=multinomial("identity"))
mod <- makeDepmix(response=rModels,transition=transition,
prior=inMod,ntimes=rep(200,48),stationary=TRUE)
fmod <- fit(mod)