Simulation of intra-subject variability [Regulatives / Guidelines]
Dear Ol' Pirate, dear Helmut,
Totally right if you think in terms of the EMA mantra 'all effects fixed'. But then you have to specify subjects effects in some reasonable way. What you do is to assume subjects effect of zero or Dolly-clones of a subject
having all the same subject effect.
Don't know how this affects your goal.
Don't also know what a reasonable way is to specify subjects fixed effects. At least you have many, many scenarios beside those you like to consider.
The way out would be to consider subjects effects as random with a CV associated. Of course this is a mixed model. No one else than EMA has doubt about it.
Refer f.i. to Chow, Liu "Design and Analysis of Bioavailability ..." page 42 for the model of the classical 2x2 crossover.
To generalize this to the 3x3 study one could simulate the logs of a PK metric via a multivariate normal distribution with variance-covariance matrix
where varT, varR1 and varR2 are the intra-subject variances and varS the variability of the subjects effect (between-subjects variability).
This model of course neglects any subject-by-treatment interaction.
Together with a proper specification of the mean vector (µT, µR1, µR2) you get from the multivariate normal distribution (R package mvtnorm) vectors of simulated logs for T, R1 and R2.
In this notation one neglects also period effects. If you like to deal with them you have to write down the above variance-covariance matrix for the period values for each sequence analogous to Chow, Liu for the 2x2 crossover.
Another possibility would be the simulation with a zero mean vector and add the necessary fixed effects (treatment, period) afterwards.
Hope this gibberish sounds reasonable to you and I have not made a big mistake.
Code follows if I have tested it
.
❝ ❝ I have no idea how to simulate CVintra; CVtotal is not what I really want (to see if reference’s different variances have an influence on the result).
❝
❝ Neither had I when I started this thread, but now I have and I don't think it is difficult. Our model (simplest case but not satisfying d_labes' concern):
❝
❝ y~Seq+Subj+Treat+Per+error
❝
❝ There is one error in play unless we do a mixed model. So we sample the error (intrasubject) from a normal distribution and add it to the fixed effects. We can set the fixed effects to zero for Per and Seq, and tweak the Treat's as per our wishes for T/R ratios.
Totally right if you think in terms of the EMA mantra 'all effects fixed'. But then you have to specify subjects effects in some reasonable way. What you do is to assume subjects effect of zero or Dolly-clones of a subject

Don't know how this affects your goal.
Don't also know what a reasonable way is to specify subjects fixed effects. At least you have many, many scenarios beside those you like to consider.
The way out would be to consider subjects effects as random with a CV associated. Of course this is a mixed model. No one else than EMA has doubt about it.
Refer f.i. to Chow, Liu "Design and Analysis of Bioavailability ..." page 42 for the model of the classical 2x2 crossover.
To generalize this to the 3x3 study one could simulate the logs of a PK metric via a multivariate normal distribution with variance-covariance matrix
( varT+varS varS varS )
( varS varR1+varS varS )
( varS varS varR2+varS )
where varT, varR1 and varR2 are the intra-subject variances and varS the variability of the subjects effect (between-subjects variability).
This model of course neglects any subject-by-treatment interaction.
Together with a proper specification of the mean vector (µT, µR1, µR2) you get from the multivariate normal distribution (R package mvtnorm) vectors of simulated logs for T, R1 and R2.
In this notation one neglects also period effects. If you like to deal with them you have to write down the above variance-covariance matrix for the period values for each sequence analogous to Chow, Liu for the 2x2 crossover.
Another possibility would be the simulation with a zero mean vector and add the necessary fixed effects (treatment, period) afterwards.
Hope this gibberish sounds reasonable to you and I have not made a big mistake.
Code follows if I have tested it

—
Regards,
Detlew
Regards,
Detlew
Complete thread:
- Anticonservativism?! ElMaestro 2010-02-06 17:10 [Regulatives / Guidelines]
- Conservativism? Helmut 2011-11-03 21:12
- In hindsight... ElMaestro 2011-11-03 21:43
- In hindsight... Helmut 2011-11-04 01:56
- In hindsight... ElMaestro 2011-11-04 08:41
- rlnorm simulates what? d_labes 2011-11-04 09:40
- Oops. Helmut 2011-11-04 16:05
- Oops. ElMaestro 2011-11-04 16:22
- Simulation of intra-subject variabilityd_labes 2011-11-07 11:16
- Simulation of intra-subject variability ElMaestro 2011-11-08 11:02
- Simulation of intra-subject variabilityd_labes 2011-11-07 11:16
- Oops. Oops. d_labes 2011-11-25 13:54
- Another Oops. Helmut 2011-11-25 14:23
- Oops. ElMaestro 2011-11-04 16:22
- Oops. Helmut 2011-11-04 16:05
- In hindsight... Helmut 2011-11-04 01:56
- In hindsight... ElMaestro 2011-11-03 21:43
- Simul Ants questions d_labes 2011-11-04 15:46
- Simul Ants questions ElMaestro 2011-11-04 16:06
- Simul Ants questions Helmut 2011-11-04 16:09
- Liberal Conservatives d_labes 2011-11-08 11:31
- Liberal Conservatives martin 2011-11-08 20:50
- Liberal Conservatives Helmut 2011-11-08 22:56
- intra-subject correlation martin 2011-11-09 09:01
- intra-subject correlation Helmut 2011-11-25 17:16
- intra-subject correlation martin 2011-11-09 09:01
- Liberal Conservatives Helmut 2011-11-08 22:56
- Liberal Conservatives martin 2011-11-08 20:50
- Conservativism? Helmut 2011-11-03 21:12