[R] multistate multiple failure times

tdenes at cogpsyphy.hu tdenes at cogpsyphy.hu
Thu Sep 9 03:56:05 CEST 2010


Dear List,

I would greatly appreciate if you could give us advice how to analyze
multistate multiple failure times in R. We treated event type as an
independent variable in the survreg model, but this is clearly not the
best solution...

If you are more interested, see the details below:

First I give you a short description of the experiment:
Topic: multistable perception (see
http://en.wikipedia.org/wiki/Multistable_perception)
Sample size: 28 participants
Procedure: 3x2x2=12 trials per participant (one trial per condition, 3
experimental factors with 3/2/2 levels, respectively), each trial lasted
240 seconds; participants had to keep pushing one of three buttons
according to their present perception (i.e. type A, type B or type C
percept), and release and change it as soon as the perception changed;
sampling rate was 250 Hz

Jargon:
- phase duration: the length of a given key press (i.e. the duration of a
single percept)
- number of switches: how many times the percept changed during a trial

General result:
- participants generally made a lot of switches during a trial
- the first phase is generally longer, the later phases are lognormally
distributed
- there is a baseline difference in the proportion and duration of type
A/B/C percepts (A is the most common)
- however, the experimental manipulations affect the duration and
probability of a given percept, and the number of switches

Data:
head(mydata)
  id  stimtype  percept  phaseDur  cens F1 F2 F3 firstphase
1  1        9        A    156.660     1  1  0  0          1
2  1        9        B      8.036     1  1  0  0          0
3  1        9        C      9.236     1  1  0  0          0
4  1        9        A      0.464     1  1  0  0          0
5  1        9        C      3.320     1  1  0  0          0
6  1        9        A      1.672     1  1  0  0          0

#####
QUESTION I: - the effect of experimental manipulations on phase durations
####
What we did:
- use survreg or gamlss, e.g.:

survreg1 <-
survreg(Surv(phaseDur,cens)~firstphase+percept*F1+percept*F2+percept*F3+F1*F2+F1*F3+F2*F3+frailty(id),data=mydata,dist="lognormal")
[note that 3-way-interactions are not possible to fit because "Error in
survpenal.fit(X, Y, weights, offset, init = init, controlvals = control, 
:
  Invalid pcols or pattr arg"; however, without the frailty term this
constraint did not emerge - maybe this can be related to the very high
variability in the number of phases per trial (range 1-145)]

gamlss1 <- 
gamlss(Surv(phaseDur,cens)~firstphase+percept*F1*F2*F3+random(id),data=mydata,family=cens(LOGNO))
[note that in gamlss, even 5-way interactions are allowed, but the
random() option is not a classical random effect]
- here we can run the stepGAIC function to run a stepwise thinning of the
model (this is again not the best solution, but it works)

Can you suggest a more proper solution?


#####
QUESTION II: - the effect of experimental manipulations on percept
distributions and transition probabilities during a trial
####

- what we would like to do:
1) The trial time and experimental condition dependent rate of type A/B/C
percepts should be modeled
- a multinomial logistic regression approach might work here, but the
time-series-nature of the data makes it more complicated. Any suggestions?

2) Transition probabilites should be also investigated
- we can use various packages to compute multistate transition
probabilites, but I am not aware of any package which allows to test
within-subject effects
- maybe bootstrapping the participants could be helpful?


Thank you,
  Denes

P.S.: Of course we can use aggregated measures, mean phase durations or
total proportions, and run univariate mixed effects analyses by lme4.
However, a more detailed analysis would be preferred, if it is possible.



More information about the R-help mailing list