Simul Ants questions [Regulatives / Guidelines]
Dear EM,
nAntiConservative=0
...
for (iter in 1:100)
{
## T is 1, R1 is 2 and R2 is 3
lny1 = rnorm(n=36, mean=95, sd=0.15*95)
for (i in 1:36) if (trt1[i]==2) lny1[i]=rnorm(n=1, mean = 90, sd = 0.10*90)
for (i in 1:36) if (trt1[i]==3) lny1[i]=rnorm(n=1, mean = 110, sd = 0.15*110)
...
Really?
I would suggest:
If you consider 95, 90 and 110 as the arithmetic means on the untransformed scale use log(x)-sd2/2 as the mean of the logs.
If your numbers 0.15, 0.10 and 0.15 are the CV's user sd = sqrt(log(CV*CV+1)) as sd of the logs.
The manner you have written the simulation for the three treatments suggest you consider the log(metric) for the 3 treatments as independent.
Is this really the case for a cross-over where the 3 treatment were applied to each subject
? IMHO we have to consider some correlation between them.
❝ load(nlme)
nAntiConservative=0
...
for (iter in 1:100)
{
## T is 1, R1 is 2 and R2 is 3
lny1 = rnorm(n=36, mean=95, sd=0.15*95)
for (i in 1:36) if (trt1[i]==2) lny1[i]=rnorm(n=1, mean = 90, sd = 0.10*90)
for (i in 1:36) if (trt1[i]==3) lny1[i]=rnorm(n=1, mean = 110, sd = 0.15*110)
...
Really?
I would suggest:
If you consider 95, 90 and 110 as the arithmetic means on the untransformed scale use log(x)-sd2/2 as the mean of the logs.
If your numbers 0.15, 0.10 and 0.15 are the CV's user sd = sqrt(log(CV*CV+1)) as sd of the logs.
The manner you have written the simulation for the three treatments suggest you consider the log(metric) for the 3 treatments as independent.
Is this really the case for a cross-over where the 3 treatment were applied to each subject

—
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 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 questionsd_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