Oops. [Regulatives / Guidelines]
Hi Hs,
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.
Edit:
The following code possibly shows what I suggest (and I am as always probably wrong):
##..and analyse from here
I have not debugged so it is prolly full of errors.
❝ 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.
Edit:
The following code possibly shows what I suggest (and I am as always probably wrong):
Per=c(1,2,3, 1,2,3, 1,2,3, 1,2,3, 1,2,3, 1,2,3, 1,2,3, 1,2,3, 1,2,3, 1,2,3, 1,2,3, 1,2,3)
Subj=c(1,1,1, 2,2,2, 3,3,3, 4,4,4, 5,5,5, 6,6,6, 7,7,7, 8,8,8, 9,9,9, 10,10,10, 11,11,11, 12,12,12)
Trt=c(1,2,3,1,2,3,1,3,2,1,3,2,2,1,3,2,1,3,2,3,1,2,3,1,3,2,1,3,2,1,3,1,2,3,1,2)
Seq=c("ABC","ABC","ABC","ABC","ABC","ABC","ACB","ACB","ACB","ACB","ACB",
"ACB","BAC","BAC","BAC","BAC","BAC","BAC","BCA","BCA","BCA","BCA","BCA",
"BCA","CBA","CBA","CBA","CBA","CBA","CBA","CAB","CAB","CAB","CAB","CAB","CAB")
intraCV =0.3 ##30 percent CV
##CVintra=sqrt(exp(MSE)-1)
MSE=log(1+intraCV^2)
Trt.effects=c(0.9, 1.0, 0.95) ## or whatever the truly should be cf. Martin's suggestion
##a simulation loop should start here!
## now we make the y vector
AUC=rnorm(36, mean=0, sd=sqrt(MSE)) ##first the error/noise
for (i in 1:36)
{
foo=Trt[i]
AUC[i]= AUC[i]+Trt.effects[foo] ##and here we add the fixed effect
}
##..and analyse from here
I have not debugged so it is prolly full of errors.
—
Pass or fail!
ElMaestro
Pass or fail!
ElMaestro
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 variability d_labes 2011-11-07 11:16
- Simulation of intra-subject variability ElMaestro 2011-11-08 11:02
- Simulation of intra-subject variability d_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