Appendix I: Power Analysis

The following report was provided by Joe Swintek (EMR, Inc.; under contract with the USEPA, 

NHEERL, MED).

Section 1: Fecundity Power Analysis

Introduction:

In the case of the MMT and the MRT, a power analysis needed to be performed to optimize lab 

and animal usage. Within these protocols, fecundity data is not transformable to normally 

distributed data, is measured repeatedly over time with several replicates in each treatment, and 

has zeros randomly induced in the data. This leads to complex correlation structures within a

non-parametric repeated measures analysis, which often has a very complicated closed form 

solution for their power. Because of complicatedness of the closed form solution for power, a 

numerical solution for power is calculated by use of a Monte Carlo simulation.

Assumptions:

In order to design the Monte Carlo simulation, assumptions need to be made in regards to the 

data involved in the study. First, the between aquarium within treatment mean fecundity is 

assumed to be normally distributed, which is a reasonable assumption and not disproven when 

tested against a Q-Q plot or a Shapiro-Wilk test of past tests. It is assumed the between tank 

mean and variance of the controls for the simulation and future studies will be similar to past 

studies with similar rearing practices. Next the within pair fecundity follows a Poisson 

distribution, which is typical for count data. The data is also assumed to be stationary, does not 

change over the time that fecundity data is gathered. It is reasonable to assume the within pair 

fecundity is stationary since these tests were designed to be that way. Finally, it is assumed that 

the rate at which there is zero fecundity in the controls is constant throughout the previous 

studies, will be the same in future studies, and will be induced at the same rate throughout the 

treatments. 

Parameters: 

Using the assumptions above and data from previous studies, parameters for the Monte Carlo 

simulation can be estimated. By calculating the within pair mean fecundity of the controls from 

past studies and averaging it over all pairs, the population mean for the Monte Carlo simulation 

is determined to be 21 eggs. In a similar fashion, by taking the variance of the within pair means 

the population variance is determined to be 49. The rate at which the fecundity of a pair is zero 

is separated into three categories; one day, one week (greater than a day less than 8 days), and 

never (greater than 8 days). The rate at which zero fecundity occurs is estimated to be; 8/91 for 

one day, 5/91 for one week, and 3/91 for all days. 

Data Simulation:
Data generation is achieved though a multistep process in the R programming language. First 

using the ‘rnorm’ function with mean 21 and variance 49 every pair’s mean fecundity is 

generated. After which, pairs within higher treatments have their mean fecundity reduced by the 

percent reduction being tested for that treatment. The daily fecundity values for each pair are 

then generated by using the ‘rpois’ function in R. Finally 0’s are induced to each pair with the 

rate of 8/91 for 1 day with a 0 value, 5/91 for 7 days in a row to have values of 0, 3/91 to have 

all days have values of 0, and a 75/91 to not have a value of 0 induced. For this simulation, data 

sets are generated with a control group and 5 treatment groups at a 20%, 30% 40%, 50% and 

70% reduction. The multistep process is repeated 1000 times for each pair and the percent 

reduction combination. 

Data Analysis:

Analyzing the simulation data is performed using the multigenerational repeated measures 

ANOVA algorithms in STATCHARRMS. First, due to non-normality the simulation data is 

rank transformed using the ‘rank’ procedure in SAS. Next the data for the F1 and F2 generation 

are analyzed on the basis of weeks (not days) using SAS ‘mixed’ procedure with Dunnett 

adjusted p-values. Finally the results of each analysis are gathered and the number of times out 

of 1000 a significant result is found at the alpha level of 0.05 is used to determine the power. 

Since trends are suspect as part of the analysis process, lower level treatments are only 

considered to have a significant effect only if all treatments of high levels are also deemed to 

have a significant effect, i.e. in a five dose design dose 3 can only be considered significant if 

both dose 4 and 5 are.

Results:

The Graph below shows the results of the power simulation for the experiment design of having 

two pairs in the controls for every pair in the treatment. The horizontal axis of the graph is the 

number of pairs in each treatment group while the vertical axis is the power. The graph shows 

that at 6 pairs a study has a small but noticeable probability of not detecting a reduction of 50%, 

about a 75% probability at detecting a reduction of 40%, less than 50% chance at detecting a 

reduction of 30%, and very little chance at detecting a reduction of 20%. At 12 pairs the 

probability of not detecting a reduction of 40% or greater is near zero, and there is probability of 

greater than 80% of detecting a reduction as low 30%. 
Power Analysis Procedural Summary:

Assumptions

• The population mean fecundity of mating pairs are normally distributed with some mean 

and variance (Confirmed Graphically) 

• The within pair mean fecundity does not change over time, at least during the times the 

data is gathered (Confirmed though repeated measures ANOVA and graphically)

• The within pair fecundity follows a Poisson distribution 

• The rate of non-mating pairs within the controls is constant though out the studies

• The rate of non-mating pairs from the controls is retained in the treatments 

• The fecundity of the controls in future studies is similar to the fecundity of the controls 

from past studies

• The data will be analyzed using the algorithms in StatCHARRMS

Data Generation: Parameters

1. All parameter estimation only uses data for days between 77 and 97 (21 days using weeks 

11, 12, and 13)

2. Rate of non-mating pairs are determined using past studies

0

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1

1.1

1pr 2pr 3pr 4pr 5pr 6pr 7pr 8pr 9pr 10pr 11pr 12pr

Power

Medaka Fecundity

2:1 Experimental Design

20% Reduction 2:1

30% Reduction 2:1

40% Reduction 2:1

50% Reduction 2:1

70% Reduction 2:1
3. The rate of non-mating pairs is split into three categories, one day, one week ( > one day 

and < 8 days) , and never ( >8 days)

4. The rate of non-mating pairs is determined to be 8/91 for one day, 5/91 for one week and 

3/91 for never

5. A sub set of the data is created from past studies using only days in which pairs mated 

6. Each fecundity value for each pair in the subset was averaged over the days in the subset 

to get that pairs average fecundity

7. The average of each pairs average fecundity is taken as the population’s mean and 

determined to be 21 eggs

8. The variance of each pairs average fecundity is taken as the population’s variance and 

determined to be 49 

Data Generation: Data Sets

1. The mean fecundity for each pair is generated by using the ‘rnorm’ function in R with 

mean 21 and variance 49

2. The treatment pairs have their mean fecundity reduced by the percent reduction being 

tested

3. The daily value of the fecundity for each pair is then generating using the ‘rpois’ 

function in R with parameter being that pairs mean fecundity (from step one)

4. Finally, 0’s are induced with the probability of 8/91 for a pair to have 1 day with a 0 

value, 5/91 to have 7 days (in a row) with 0 values, and 3/91 to have all days have a 0 

value

5. This process is repeated 1000 times for each number of pair/ percent reduction 

combination

Data Analysis

1. Uses SAS procedures reversed enginered from StatCHARRMS

2. A subset of the data is created that only has generations F1 and F2

3. The data is set to weeks instead of days 

4. The data is rank transformed (do to non-normality), using proc rank: options

normal=blom, ties=mean, Fecundity as the variable and by generation 

5. The data is analyzed using proc mixed 

6. The proc mixed code is: 

class generation WEEK group replicate ; model Rank_EGGS=generation| WEEK |group 

/solution outpred=resids; random replicate(generation*group) 

WEEK*replicate(generation*group) /type=vc group=generation S;

7. The number of times in 1000 a significant result ( p-value <= 0.05) is found is counted 

and used to determine the power at the number of pairs/ percent reduction combination
Section 2: Non-reproduction Endpoint Power Analysis

The purpose of this report is to explain the procedure used for the power analysis of the four end 

points of weight, length, SCC, and Vtg for 9 week old medaka using the MRT. First normality is 

assessed using a combination of quantile-quantile plots and the Shapiro-Wilk test. Next 

significant differences in the end points for each of several past studies are tested for. After the 

data is transformed to become normal and the appropriate studies are selected from, the mean 

and variances of the controls for each gender are calculated. Finally, the mean and variances are 

used to generate new data sets which are tested using standard Dunnett tests and Jonckheere –

Terpstra. 

Weight is the first end point to be evaluated. First, normality is assessed. From the Q-Q plots in 

graph set 1, it is clear that the data is not normal or even log normal. However on the log scale 

the data looks bi-modal thus tests for significant differences in the studies will be done using data 

on the log scale.

Graph Set 1:

Tables 1 and 2 below, shows that there are significant differences in the juvenile weights of 

medaka between studies. The tables also show that the Prochloraz MMT and the Trenbolone
MMT are the most similar, thus those two studies are used to determine the mean and variance of 

the weights for each gender.

Male Only Df SumsOfSqs MeanSqs F value Pr(>F)

Study 2 19.72 9.86 122.19 < 2.2e-16

Residuals 126 10.17 0.08

MeanSqs F value Pr(>F)

Prochloraz Vs Trenbolone 0.23 3.74 0.057

4tOP Vs Trenbolone 12.88 132.52 < 2.2e-16

4tOP Vs Prochloraz 15.88 193.23 < 2.2e-16

Female Only Df SumsOfSqs MeanSqs F value Pr(>F)

Study 2 19.82 9.91 189.43 < 2.2e-16

Residuals 123 6.43 0.05

MeanSqs F value Pr(>F)

Prochloraz Vs Trenbolone 0.37 8.85 0.004

4tOP Vs Trenbolone 12.75 213.19 < 2.2e-16

4tOP Vs Prochloraz 16.55 301.71 < 2.2e-16

Table 1: ANOVA Table For by Study significance in Weight of Male Medaka 

By Study Comparison

Table 2: ANOVA Table For by Study significance in Weight of Female Medaka 

By Study Comparison

As a final check for normality, Q-Q plots are re-plotted using only the data from the Prochloraz

MMT and Trenbolone MMT in graph set 2. The Q-Q plots show that the data from the 

Prochloraz and Trenbolone MMTs after the log transformation are normal. The mean of the log 

of weight for males was determined to be 5.23 with a standard deviation of 0.25. The mean of 

the log of weight for females was determined to be 5.39 with a standard deviation of 0.21.

Graph Set 2:
Next length is evaluated. Only the Prochloraz MMT has any information for length, so the data 

was only evaluated for a need for a transformation. Graph Set 3 shows the Q-Q plots for the 

length of male and female medaka. The graphs show questionable normality for these data sets, 

thus leading to Table 3. Table 3 is the Shapiro-Wilk test for normality and implies the data is 

normal enough for analysis. The mean of the length for males was determined to be 26.17 with a 

standard deviation of 1.56. The mean of the length for females was determined to be 27.40 with 

a standard deviation of 1.48.

Graph Set 3:

W P-Value

Male 0.947 0.053

Female 0.948 0.053

Table 3: Shapiro-Wilk Normality Test For Length 

Next, the secondary sex characteristics in males (SCC) are analyzed. First a Q-Q plot for SCC is 

plotted and shown in graph set 4. The graph shows SCC is normal, except for the unusually high 

amount of 0’s. Table 4 shows that every study has a significantly different value for SCC, thus 

only values from the most recent MMT (Prochloraz) are evaluated. Graph set 5 shows that the 

data is normal within the latest study. The mean of SCC for males is calculated at 69.08 with a 

standard deviation of 22.06. The high standard deviation implies that SCC is a ”noisy” response. 

Graph Set 4:
Male Only Df SumsOfSqs MeanSqs F value Pr(>F)

Study 2 90199.00 45100.00 68.84 < 2.2e-16

Residuals 126 82544.00 655.00

MeanSqs F value Pr(>F)

Prochloraz Vs Trenbolone 8696.20 13.28 < 5.0e-4

4tOP Vs Trenbolone 86425.00 118.74 < 2.2e-16

4tOP Vs Prochloraz 36562.00 63.12 < 2.2e-16

Table 4: ANOVA Table For by Study significance in SCC of Male Medaka 

By Study Comparison

Graph Set 5:

Lastly, vitellogenin is analyzed. Following the same pattern as above, the Q-Q plots for both the 

untransformed and log transformed VTG values are shown in graph set 6 below. The graphs 

show that vitellogenin is almost log-normal; however the deviation from the normal distribution 

could be due to a significant difference in the studies. Table 5 is the ANOVA table for the effect 

study has on vitellogenin. As shown in the table each study has a different value for 

vitellogenin, thus only the latest MMT (Prochloraz) will be taken into account for this analysis.
Graph Set 6:

Female Only Df SumsOfSqs MeanSqs F value Pr(>F)

Study 1 1.26E+14 1.26E+14 13.11 1.07E-13

Residuals 79 7.62E+14 9.65E+12

MeanSqs F value Pr(>F)

Prochloraz Vs Trenbolone 8696.20 13.28 5.17E-04

4tOP Vs Trenbolone 86425.00 118.74 2.07E-07

4tOP Vs Prochlora 36562.00 63.12 1.18E-14

Table 5: ANOVA Table For by Study significance in Log VTG of Female Medaka 

By Study Comparison

Graph set 7 shows that vitellogenin is normal for the Prochloraz MMT. The log mean of 

vitellogenin is calculated out to be 15.30 with a standard deviation of 0.54.

Graph set 7:
Using a similar procedure as the fecundity tests, the power of detecting changes in length, 

weight, vitellogenin and SCC are estimated. The tables below show the results of the 

simulation. The simulation shows that the proposed study design of the MRT has sufficient 

power to detect changes in the other end points.

10% 20% 30% 40% 50% Trend

Female 0.142 0.699 0.990 1.000 1.000 1.000

Male 0.101 0.535 0.945 0.999 1.000 1.000

10% 20% 30% 40% 50% Trend

Female 0.988 1.000 1.000 1.000 1.000 1.000

Male 0.997 1.000 1.000 1.000 1.000 1.000

0% 20% 40% 60% 80% Trend

VTG (Female) 0.012 0.094 0.593 0.989 1.000 1.000

SCC (Male) 0.012 0.248 0.870 0.998 1.000 1.000

Power of current design given percent reduction in weight

Power of current design given percent reduction in Length

Power of current design given percent reduction in in VTG or SCC