Power with simglm - legacy code

2018-06-01

Power Analysis with simglm

The simglm package allows the ability to conduct a power analysis through simulation. This will be particularly helpful with multilevel models and generalized linear models. To show the process, we will start with basic regression models.

Single Level Power Analysis

Let’s look at a simple single level regression example to get started:

fixed <- ~ 1 + act + diff + numCourse + act:numCourse
fixed_param <- c(0.5, 1.1, 0.6, 0.9, 1.1)
cov_param <- list(dist_fun = c('rnorm', 'rnorm', 'rnorm'),
                  var_type = c("single", "single", "single"),
                  opts = list(list(mean = 0, sd = 2),
                              list(mean = 0, sd = 2),
                              list(mean = 0, sd = 1)))
n <- 150
error_var <- 20
with_err_gen <- 'rnorm'
pow_param <- c('(Intercept)', 'act', 'diff', 'numCourse')
alpha <- .01
pow_dist <- "t"
pow_tail <- 2
replicates <- 100
power_out <- sim_pow(fixed = fixed, fixed_param = fixed_param, 
                     cov_param = cov_param, n = n, error_var = error_var,
                     with_err_gen = with_err_gen, data_str = "single",
                     pow_param = pow_param, alpha = alpha,
                     pow_dist = pow_dist, pow_tail = pow_tail, 
                     replicates = replicates)

Much of the output here is the same from the sim_reg function. The additional arguments, pow_param represents the terms to conduct a power analysis for and must be a subset of the fixed argument, alpha represents the per term level of significance, pow_dist represents the sampling distribution to refer to, either ‘z’ or ‘t’, pow_tail represents whether a one or two tailed hypothesis is being tested, and replicates represents the number of simulations to conduct. Note, to do a power analysis for the intercept, ‘(Intercept)’ must be used. By default, if pow_param is not specified power is conducted for all terms.

Finally, looking at the output from the above call:

head(power_out)
term avg_test_stat sd_test_stat avg_std_err sd_std_err power num_reject num_repl data
(Intercept) 0.4941777 0.3283266 0.3706098 0.0190804 0 0 100 1.000000e+00, 2.000000e+00, 3.000000e+00, 4.000000e+00, 5.000000e+00, 6.000000e+00, 7.000000e+00, 8.000000e+00, 9.000000e+00, 1.000000e+01, 1.100000e+01, 1.200000e+01, 1.300000e+01, 1.400000e+01, 1.500000e+01, 1.600000e+01, 1.700000e+01, 1.800000e+01, 1.900000e+01, 2.000000e+01, 2.100000e+01, 2.200000e+01, 2.300000e+01, 2.400000e+01, 2.500000e+01, 2.600000e+01, 2.700000e+01, 2.800000e+01, 2.900000e+01, 3.000000e+01, 3.100000e+01, 3.200000e+01, 3.300000e+01, 3.400000e+01, 3.500000e+01, 3.600000e+01, 3.700000e+01, 3.800000e+01, 3.900000e+01, 4.000000e+01, 4.100000e+01, 4.200000e+01, 4.300000e+01, 4.400000e+01, 4.500000e+01, 4.600000e+01, 4.700000e+01, 4.800000e+01, 4.900000e+01, 5.000000e+01, 5.100000e+01, 5.200000e+01, 5.300000e+01, 5.400000e+01, 5.500000e+01, 5.600000e+01, 5.700000e+01, 5.800000e+01, 5.900000e+01, 6.000000e+01, 6.100000e+01, 6.200000e+01, 6.300000e+01, 6.400000e+01, 6.500000e+01, 6.600000e+01, 6.700000e+01, 6.800000e+01, 6.900000e+01, 7.000000e+01, 7.100000e+01, 7.200000e+01, 7.300000e+01, 7.400000e+01, 7.500000e+01, 7.600000e+01, 7.700000e+01, 7.800000e+01, 7.900000e+01, 8.000000e+01, 8.100000e+01, 8.200000e+01, 8.300000e+01, 8.400000e+01, 8.500000e+01, 8.600000e+01, 8.700000e+01, 8.800000e+01, 8.900000e+01, 9.000000e+01, 9.100000e+01, 9.200000e+01, 9.300000e+01, 9.400000e+01, 9.500000e+01, 9.600000e+01, 9.700000e+01, 9.800000e+01, 9.900000e+01, 1.000000e+02, 3.592849e-02, 9.088901e-02, 4.364442e-01, 7.403274e-01, 3.579565e-01, 1.635229e-01, 4.695801e-01, 3.820177e-01, 8.411939e-01, 5.598544e-01, 3.843927e-01, 5.184947e-01, 5.077525e-01, 8.875507e-01, 3.415699e-01, 7.155929e-02, 1.146586e+00, 6.887544e-01, 5.196279e-01, 7.168734e-01, 8.738124e-01, 4.739490e-01, 1.817364e-01, -2.042357e-01, 4.272202e-01, 3.253786e-02, 2.285364e-01, 8.086171e-01, 8.184020e-01, 8.383052e-01, 2.222143e-02, -1.103000e-01, 2.304542e-01, 4.773828e-01, 5.596077e-01, 3.136583e-01, 5.544290e-01, 1.259269e+00, 4.496660e-01, 1.001326e-01, 8.669712e-01, 8.855699e-01, 8.963331e-01, 8.511199e-01, 7.672970e-01, 5.907400e-01, 6.747913e-01, 8.679212e-01, 6.557068e-01, -1.797723e-02, 7.554507e-01, 4.382811e-01, -3.018545e-02, 6.125343e-01, 4.766481e-01, 9.335945e-01, 4.026417e-01, 6.676211e-01, 8.259702e-03, 4.670115e-01, 5.920677e-01, 5.251482e-01, 2.615067e-01, 2.521388e-01, 6.212592e-01, 6.131164e-01, -1.253758e-01, 3.408617e-01, 3.788138e-01, 8.850117e-01, 7.190839e-01, 6.169552e-01, -6.176100e-02, 1.283777e+00, 5.693817e-01, -1.288515e-01, 4.917577e-01, 3.031076e-01, 5.705746e-01, -2.168917e-02, 8.350412e-01, 5.105603e-01, 7.702481e-01, 5.421015e-01, 8.409828e-01, 3.317922e-01, -5.035691e-02, 4.968481e-01, 5.547678e-01, 9.567113e-01, -9.548393e-02, 4.934748e-01, 5.571484e-01, 3.156341e-01, 1.456370e-01, 4.044219e-01, 9.406971e-01, 5.546234e-01, 1.080127e+00, 5.793010e-01, 3.435016e-01, 4.234438e-01, 3.639645e-01, 3.959287e-01, 3.483319e-01, 3.652147e-01, 3.389543e-01, 3.533121e-01, 3.739224e-01, 3.541478e-01, 3.884619e-01, 3.657066e-01, 3.676749e-01, 3.860174e-01, 3.963251e-01, 3.510358e-01, 3.553951e-01, 3.683310e-01, 4.258619e-01, 3.386168e-01, 3.705436e-01, 3.724412e-01, 3.726347e-01, 3.643805e-01, 4.032634e-01, 3.786131e-01, 3.834875e-01, 3.752513e-01, 3.733748e-01, 3.459982e-01, 3.616680e-01, 3.588572e-01, 3.502812e-01, 3.709345e-01, 3.521368e-01, 3.861472e-01, 3.907250e-01, 3.577222e-01, 3.602217e-01, 3.992842e-01, 3.758106e-01, 3.547002e-01, 3.587868e-01, 3.666142e-01, 3.707730e-01, 3.694049e-01, 3.533512e-01, 3.777554e-01, 3.732483e-01, 3.572117e-01, 3.692288e-01, 3.572537e-01, 3.961309e-01, 3.756678e-01, 3.734774e-01, 3.346060e-01, 3.571525e-01, 3.487407e-01, 3.640053e-01, 4.023638e-01, 3.607353e-01, 3.816181e-01, 3.607368e-01, 3.935743e-01, 3.817756e-01, 3.682738e-01, 3.864698e-01, 3.526278e-01, 3.767219e-01, 3.468037e-01, 3.829928e-01, 3.443712e-01, 3.715123e-01, 3.743024e-01, 3.437434e-01, 3.338161e-01, 3.794286e-01, 3.823025e-01, 3.722042e-01, 3.729130e-01, 4.064976e-01, 3.832867e-01, 3.927738e-01, 3.810110e-01, 3.760724e-01, 3.536327e-01, 3.652836e-01, 3.743115e-01, 3.409936e-01, 3.867362e-01, 3.488268e-01, 3.706908e-01, 3.714928e-01, 3.665498e-01, 3.698154e-01, 3.465591e-01, 4.103797e-01, 3.658963e-01, 4.074962e-01, 4.073544e-01, 1.045948e-01, 2.146424e-01, 1.199139e+00, 1.869850e+00, 1.027631e+00, 4.477445e-01, 1.385379e+00, 1.081247e+00, 2.249649e+00, 1.580849e+00, 9.895248e-01, 1.417789e+00, 1.380982e+00, 2.299251e+00, 8.618426e-01, 2.038518e-01, 3.226228e+00, 1.869933e+00, 1.220179e+00, 2.117064e+00, 2.358190e+00, 1.272547e+00, 4.877066e-01, -5.605010e-01, 1.059407e+00, 8.593961e-02, 5.959422e-01, 2.154868e+00, 2.191905e+00, 2.422860e+00, 6.144150e-02, -3.073646e-01, 6.579120e-01, 1.286973e+00, 1.589177e+00, 8.122763e-01, 1.418975e+00, 3.520244e+00, 1.248304e+00, 2.507802e-01, 2.306937e+00, 2.496672e+00, 2.498233e+00, 2.321568e+00, 2.069452e+00, 1.599167e+00, 1.909690e+00, 2.297574e+00, 1.756758e+00, -5.032656e-02, 2.046023e+00, 1.226806e+00, -7.620070e-02, 1.630521e+00, 1.276244e+00, 2.790131e+00, 1.127366e+00, 1.914377e+00, 2.269116e-02, 1.160670e+00, 1.641280e+00, 1.376109e+00, 7.249237e-01, 6.406383e-01, 1.627289e+00, 1.664838e+00, -3.244129e-01, 9.666330e-01, 1.005553e+00, 2.551910e+00, 1.877539e+00, 1.791541e+00, -1.662422e-01, 3.429784e+00, 1.656415e+00, -3.859955e-01, 1.296048e+00, 7.928477e-01, 1.532961e+00, -5.816148e-02, 2.054234e+00, 1.332058e+00, 1.961047e+00, 1.422797e+00, 2.236226e+00, 9.382394e-01, -1.378570e-01, 1.327365e+00, 1.626915e+00, 2.473808e+00, -2.737288e-01, 1.331230e+00, 1.499756e+00, 8.610947e-01, 3.938101e-01, 1.166964e+00, 2.292260e+00, 1.515794e+00, 2.650643e+00, 1.422105e+00, 9.168419e-01, 8.303477e-01, 2.324297e-01, 6.352091e-02, 3.058348e-01, 6.550058e-01, 1.680641e-01, 2.813821e-01, 2.597735e-02, 1.160914e-01, 3.240548e-01, 1.583979e-01, 1.694091e-01, 2.291889e-02, 3.901972e-01, 8.387551e-01, 1.550571e-03, 6.350932e-02, 2.243777e-01, 3.596147e-02, 1.969930e-02, 2.052156e-01, 6.264942e-01, 5.760028e-01, 2.911759e-01, 9.316330e-01, 5.521430e-01, 3.282345e-02, 2.998171e-02, 1.663204e-02, 9.510922e-01, 7.590069e-01, 5.116378e-01, 2.001544e-01, 1.141985e-01, 4.179647e-01, 1.580523e-01, 5.765235e-04, 2.139317e-01, 8.023391e-01, 2.247440e-02, 1.365528e-02, 1.359779e-02, 2.164914e-02, 4.027856e-02, 1.119603e-01, 5.814793e-02, 2.301685e-02, 8.107002e-02, 9.599314e-01, 4.256112e-02, 2.218837e-01, 9.393645e-01, 1.051617e-01, 2.039098e-01, 5.977564e-03, 2.614497e-01, 5.754172e-02, 9.819278e-01, 2.476835e-01, 1.029065e-01, 1.709094e-01, 4.696671e-01, 5.227688e-01, 1.058468e-01, 9.810437e-02, 7.460930e-01, 3.353370e-01, 3.163058e-01, 1.174878e-02, 6.245289e-02, 7.529219e-02, 8.681980e-01, 7.868888e-04, 9.980023e-02, 7.000658e-01, 1.970181e-01, 4.291619e-01, 1.274644e-01, 9.537001e-01, 4.174893e-02, 1.849309e-01, 5.178948e-02, 1.569428e-01, 2.686397e-02, 3.496816e-01, 8.905447e-01, 1.864740e-01, 1.059263e-01, 1.452206e-02, 7.846826e-01, 1.852024e-01, 1.358519e-01, 3.906076e-01, 6.942998e-01, 2.451406e-01, 2.332983e-02, 1.317484e-01, 8.926522e-03, 1.571432e-01, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00
act 1.1007842 0.1427887 0.1874566 0.0153983 0 0 100 1.000000e+00, 2.000000e+00, 3.000000e+00, 4.000000e+00, 5.000000e+00, 6.000000e+00, 7.000000e+00, 8.000000e+00, 9.000000e+00, 1.000000e+01, 1.100000e+01, 1.200000e+01, 1.300000e+01, 1.400000e+01, 1.500000e+01, 1.600000e+01, 1.700000e+01, 1.800000e+01, 1.900000e+01, 2.000000e+01, 2.100000e+01, 2.200000e+01, 2.300000e+01, 2.400000e+01, 2.500000e+01, 2.600000e+01, 2.700000e+01, 2.800000e+01, 2.900000e+01, 3.000000e+01, 3.100000e+01, 3.200000e+01, 3.300000e+01, 3.400000e+01, 3.500000e+01, 3.600000e+01, 3.700000e+01, 3.800000e+01, 3.900000e+01, 4.000000e+01, 4.100000e+01, 4.200000e+01, 4.300000e+01, 4.400000e+01, 4.500000e+01, 4.600000e+01, 4.700000e+01, 4.800000e+01, 4.900000e+01, 5.000000e+01, 5.100000e+01, 5.200000e+01, 5.300000e+01, 5.400000e+01, 5.500000e+01, 5.600000e+01, 5.700000e+01, 5.800000e+01, 5.900000e+01, 6.000000e+01, 6.100000e+01, 6.200000e+01, 6.300000e+01, 6.400000e+01, 6.500000e+01, 6.600000e+01, 6.700000e+01, 6.800000e+01, 6.900000e+01, 7.000000e+01, 7.100000e+01, 7.200000e+01, 7.300000e+01, 7.400000e+01, 7.500000e+01, 7.600000e+01, 7.700000e+01, 7.800000e+01, 7.900000e+01, 8.000000e+01, 8.100000e+01, 8.200000e+01, 8.300000e+01, 8.400000e+01, 8.500000e+01, 8.600000e+01, 8.700000e+01, 8.800000e+01, 8.900000e+01, 9.000000e+01, 9.100000e+01, 9.200000e+01, 9.300000e+01, 9.400000e+01, 9.500000e+01, 9.600000e+01, 9.700000e+01, 9.800000e+01, 9.900000e+01, 1.000000e+02, 7.882758e-01, 1.136124e+00, 1.284235e+00, 1.280966e+00, 1.060764e+00, 1.074871e+00, 1.056072e+00, 1.108871e+00, 1.100748e+00, 1.281598e+00, 1.295884e+00, 8.888922e-01, 1.041428e+00, 1.063220e+00, 1.092676e+00, 1.257070e+00, 1.136520e+00, 1.069632e+00, 1.006763e+00, 9.361544e-01, 1.120348e+00, 1.293529e+00, 1.196771e+00, 1.145404e+00, 9.904767e-01, 1.238473e+00, 1.140394e+00, 9.334996e-01, 1.184630e+00, 1.023974e+00, 1.094053e+00, 8.247204e-01, 8.788834e-01, 1.047449e+00, 1.086161e+00, 1.237910e+00, 1.138766e+00, 1.380296e+00, 1.259037e+00, 1.389243e+00, 1.333321e+00, 1.211210e+00, 1.060533e+00, 1.097120e+00, 1.058069e+00, 1.122794e+00, 1.179933e+00, 1.119340e+00, 9.541325e-01, 9.653787e-01, 1.050594e+00, 8.971014e-01, 1.052705e+00, 1.055749e+00, 1.099826e+00, 1.077195e+00, 1.186157e+00, 1.002072e+00, 1.213459e+00, 1.168946e+00, 1.295031e+00, 9.077490e-01, 1.034810e+00, 1.223509e+00, 9.528595e-01, 7.463716e-01, 1.009895e+00, 1.009663e+00, 9.321394e-01, 1.073910e+00, 8.330645e-01, 1.623905e+00, 1.108961e+00, 9.597272e-01, 9.999361e-01, 8.674942e-01, 1.026926e+00, 1.195749e+00, 1.162523e+00, 1.069571e+00, 9.850677e-01, 1.149538e+00, 1.025728e+00, 1.319153e+00, 1.067613e+00, 1.095810e+00, 1.350445e+00, 1.054362e+00, 1.026100e+00, 1.187097e+00, 9.620959e-01, 1.061111e+00, 1.179853e+00, 1.062432e+00, 1.032004e+00, 1.270991e+00, 1.079139e+00, 1.289835e+00, 1.116340e+00, 1.259497e+00, 1.816189e-01, 1.865207e-01, 1.807281e-01, 1.946079e-01, 1.697360e-01, 1.948446e-01, 1.873696e-01, 1.676134e-01, 1.779129e-01, 1.867249e-01, 2.245400e-01, 1.935775e-01, 1.719644e-01, 2.088748e-01, 1.898063e-01, 1.854161e-01, 2.081821e-01, 1.845445e-01, 2.349902e-01, 1.688164e-01, 1.878020e-01, 1.719697e-01, 1.937936e-01, 1.922113e-01, 2.195332e-01, 1.934931e-01, 1.751797e-01, 1.949361e-01, 1.869452e-01, 1.733873e-01, 1.816773e-01, 1.717598e-01, 1.727395e-01, 1.799598e-01, 1.737628e-01, 1.895603e-01, 1.794341e-01, 1.797403e-01, 1.563069e-01, 1.931295e-01, 1.967766e-01, 1.715602e-01, 1.831615e-01, 1.879913e-01, 2.081929e-01, 2.015430e-01, 1.711917e-01, 1.845799e-01, 1.803001e-01, 1.831670e-01, 2.241972e-01, 1.721408e-01, 2.193417e-01, 1.933596e-01, 2.006792e-01, 1.746587e-01, 1.618614e-01, 1.892439e-01, 1.781198e-01, 2.111163e-01, 1.980301e-01, 1.751017e-01, 1.712502e-01, 1.827772e-01, 1.850947e-01, 1.851241e-01, 1.903155e-01, 1.850547e-01, 1.756353e-01, 1.750471e-01, 2.003332e-01, 1.798488e-01, 1.809080e-01, 1.996810e-01, 1.738298e-01, 1.915963e-01, 1.939190e-01, 1.930176e-01, 1.615446e-01, 1.861839e-01, 1.896024e-01, 2.190217e-01, 2.007964e-01, 1.868439e-01, 2.043680e-01, 1.607938e-01, 1.963470e-01, 2.056452e-01, 1.604940e-01, 2.018976e-01, 1.686524e-01, 1.860359e-01, 1.781267e-01, 1.754216e-01, 1.824456e-01, 1.709749e-01, 2.101223e-01, 1.884378e-01, 2.134144e-01, 2.030360e-01, 4.340274e+00, 6.091140e+00, 7.105895e+00, 6.582288e+00, 6.249494e+00, 5.516557e+00, 5.636305e+00, 6.615647e+00, 6.187006e+00, 6.863561e+00, 5.771282e+00, 4.591919e+00, 6.056070e+00, 5.090226e+00, 5.756796e+00, 6.779724e+00, 5.459258e+00, 5.796067e+00, 4.284276e+00, 5.545400e+00, 5.965580e+00, 7.521842e+00, 6.175491e+00, 5.959087e+00, 4.511741e+00, 6.400604e+00, 6.509852e+00, 4.788745e+00, 6.336774e+00, 5.905702e+00, 6.021957e+00, 4.801592e+00, 5.087911e+00, 5.820460e+00, 6.250826e+00, 6.530430e+00, 6.346429e+00, 7.679392e+00, 8.054902e+00, 7.193325e+00, 6.775809e+00, 7.059972e+00, 5.790153e+00, 5.836013e+00, 5.082158e+00, 5.570992e+00, 6.892468e+00, 6.064254e+00, 5.291912e+00, 5.270483e+00, 4.686027e+00, 5.211441e+00, 4.799386e+00, 5.460029e+00, 5.480518e+00, 6.167428e+00, 7.328223e+00, 5.295134e+00, 6.812600e+00, 5.536976e+00, 6.539568e+00, 5.184124e+00, 6.042681e+00, 6.693992e+00, 5.147957e+00, 4.031737e+00, 5.306426e+00, 5.456023e+00, 5.307244e+00, 6.134980e+00, 4.158395e+00, 9.029282e+00, 6.129973e+00, 4.806301e+00, 5.752386e+00, 4.527718e+00, 5.295645e+00, 6.195026e+00, 7.196298e+00, 5.744700e+00, 5.195440e+00, 5.248512e+00, 5.108298e+00, 7.060189e+00, 5.223972e+00, 6.814998e+00, 6.877850e+00, 5.127094e+00, 6.393387e+00, 5.879699e+00, 5.704608e+00, 5.703795e+00, 6.623675e+00, 6.056446e+00, 5.656501e+00, 7.433788e+00, 5.135765e+00, 6.844886e+00, 5.230858e+00, 6.203319e+00, 2.654349e-05, 9.582060e-09, 4.993358e-11, 7.912207e-10, 4.335675e-09, 1.545308e-07, 8.771195e-08, 6.655435e-10, 5.936470e-09, 1.816027e-10, 4.593386e-08, 9.449038e-06, 1.140470e-08, 1.092462e-06, 4.925679e-08, 2.824796e-10, 2.021108e-07, 4.075036e-08, 3.322200e-05, 1.349151e-07, 1.782790e-08, 5.202000e-12, 6.289203e-09, 1.840605e-08, 1.318752e-05, 2.014010e-09, 1.150170e-09, 4.100326e-06, 2.787589e-09, 2.391053e-08, 1.350250e-08, 3.879770e-06, 1.103831e-06, 3.620999e-08, 4.306656e-09, 1.034430e-09, 2.654128e-09, 2.178366e-12, 2.661482e-13, 3.118463e-11, 2.883491e-10, 6.387534e-11, 4.193252e-08, 3.357790e-08, 1.132584e-06, 1.195629e-07, 1.558507e-10, 1.095105e-08, 4.383478e-07, 4.835147e-07, 6.357567e-06, 6.327118e-07, 3.916806e-06, 2.013838e-07, 1.829878e-07, 6.548395e-09, 1.500889e-11, 4.319220e-07, 2.376199e-10, 1.403776e-07, 9.867875e-10, 7.160872e-07, 1.218686e-08, 4.426049e-10, 8.430863e-07, 8.912904e-05, 4.101192e-07, 2.051862e-07, 4.085835e-07, 7.701736e-09, 5.461709e-05, 9.776020e-16, 7.896660e-09, 3.801832e-06, 5.031445e-08, 1.234383e-05, 4.309110e-07, 5.702341e-09, 3.068805e-11, 5.221094e-08, 6.803253e-07, 5.345257e-07, 1.007547e-06, 6.380125e-11, 5.977014e-07, 2.346372e-10, 1.683878e-10, 9.260454e-07, 2.089578e-09, 2.714746e-08, 6.329706e-08, 6.354406e-08, 6.383686e-10, 1.138344e-08, 7.966596e-08, 8.434665e-12, 8.906430e-07, 2.004275e-10, 5.792759e-07, 5.469799e-09, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00
diff 0.6472788 0.1906139 0.1866926 0.0120786 0 0 100 1.000000e+00, 2.000000e+00, 3.000000e+00, 4.000000e+00, 5.000000e+00, 6.000000e+00, 7.000000e+00, 8.000000e+00, 9.000000e+00, 1.000000e+01, 1.100000e+01, 1.200000e+01, 1.300000e+01, 1.400000e+01, 1.500000e+01, 1.600000e+01, 1.700000e+01, 1.800000e+01, 1.900000e+01, 2.000000e+01, 2.100000e+01, 2.200000e+01, 2.300000e+01, 2.400000e+01, 2.500000e+01, 2.600000e+01, 2.700000e+01, 2.800000e+01, 2.900000e+01, 3.000000e+01, 3.100000e+01, 3.200000e+01, 3.300000e+01, 3.400000e+01, 3.500000e+01, 3.600000e+01, 3.700000e+01, 3.800000e+01, 3.900000e+01, 4.000000e+01, 4.100000e+01, 4.200000e+01, 4.300000e+01, 4.400000e+01, 4.500000e+01, 4.600000e+01, 4.700000e+01, 4.800000e+01, 4.900000e+01, 5.000000e+01, 5.100000e+01, 5.200000e+01, 5.300000e+01, 5.400000e+01, 5.500000e+01, 5.600000e+01, 5.700000e+01, 5.800000e+01, 5.900000e+01, 6.000000e+01, 6.100000e+01, 6.200000e+01, 6.300000e+01, 6.400000e+01, 6.500000e+01, 6.600000e+01, 6.700000e+01, 6.800000e+01, 6.900000e+01, 7.000000e+01, 7.100000e+01, 7.200000e+01, 7.300000e+01, 7.400000e+01, 7.500000e+01, 7.600000e+01, 7.700000e+01, 7.800000e+01, 7.900000e+01, 8.000000e+01, 8.100000e+01, 8.200000e+01, 8.300000e+01, 8.400000e+01, 8.500000e+01, 8.600000e+01, 8.700000e+01, 8.800000e+01, 8.900000e+01, 9.000000e+01, 9.100000e+01, 9.200000e+01, 9.300000e+01, 9.400000e+01, 9.500000e+01, 9.600000e+01, 9.700000e+01, 9.800000e+01, 9.900000e+01, 1.000000e+02, 6.405591e-01, 4.286024e-01, 4.025567e-01, 5.539504e-01, 6.719076e-01, 8.223903e-01, 6.868818e-01, 1.018191e+00, 8.303319e-01, 5.180599e-01, 7.334138e-01, 6.021517e-01, 5.489069e-01, 6.388670e-01, 5.683393e-01, 6.642250e-01, 3.482859e-01, 4.885702e-01, 8.227848e-01, 8.062432e-01, 8.147727e-01, 6.554154e-01, 8.476317e-01, 9.100393e-01, 7.082122e-01, 5.527896e-01, 7.744459e-01, 3.604655e-01, 6.399855e-01, 6.218612e-01, 5.724526e-01, 6.003947e-01, 5.794354e-01, 7.890205e-01, 5.436713e-01, 5.320325e-01, 4.726265e-01, 5.997506e-01, 5.022371e-01, 6.256373e-01, 9.632063e-01, 4.247251e-01, 6.932995e-01, 7.729020e-01, 5.354376e-01, 6.936491e-01, 8.019556e-01, 6.154777e-01, 5.614734e-01, 4.274625e-01, 4.380303e-01, 5.777639e-01, 4.618057e-01, 6.824490e-01, 7.009507e-01, 3.755536e-01, 6.535766e-01, 4.582857e-01, 8.362492e-01, 4.410262e-01, 8.015757e-01, 6.439811e-01, 6.790061e-01, 4.422259e-01, 6.409345e-01, 6.676688e-01, 4.397845e-01, 9.839276e-01, 3.005431e-01, 6.325857e-01, 5.571037e-01, 6.285412e-01, 9.538909e-01, 6.755927e-01, 7.556877e-01, 3.599390e-01, 6.317102e-01, 1.271767e+00, 6.755088e-01, 7.603606e-01, 8.141130e-01, 3.920659e-01, 8.853009e-01, 9.669297e-01, 3.925635e-01, 8.944948e-01, 4.534961e-01, 4.435153e-01, 8.657863e-01, 6.246141e-01, 1.644689e-01, 7.244498e-01, 3.952180e-01, 1.158059e+00, 7.738049e-01, 5.166074e-01, 6.628658e-01, 9.381972e-01, 7.371310e-01, 8.084904e-01, 1.640832e-01, 2.122986e-01, 1.934357e-01, 1.931445e-01, 1.902458e-01, 1.877919e-01, 1.690388e-01, 2.020699e-01, 1.941758e-01, 1.902090e-01, 1.913380e-01, 1.720763e-01, 1.742359e-01, 1.934714e-01, 1.965019e-01, 1.680977e-01, 1.984663e-01, 1.824487e-01, 1.987927e-01, 1.715280e-01, 1.859911e-01, 1.762472e-01, 1.718898e-01, 1.906060e-01, 1.904887e-01, 1.744732e-01, 1.970916e-01, 1.787879e-01, 1.712223e-01, 1.632514e-01, 1.931866e-01, 1.756410e-01, 1.954810e-01, 1.905276e-01, 1.637471e-01, 1.786818e-01, 1.956992e-01, 2.021566e-01, 1.807386e-01, 2.234376e-01, 1.854709e-01, 1.685886e-01, 1.670840e-01, 1.733197e-01, 1.947288e-01, 1.832106e-01, 1.779395e-01, 1.859224e-01, 1.816311e-01, 1.906015e-01, 1.930709e-01, 1.927995e-01, 2.034962e-01, 1.715411e-01, 1.838288e-01, 1.715279e-01, 1.785374e-01, 1.833336e-01, 1.989962e-01, 1.913425e-01, 1.856685e-01, 1.906042e-01, 1.766427e-01, 1.702240e-01, 1.938929e-01, 1.913803e-01, 1.911716e-01, 1.910839e-01, 2.018799e-01, 1.837086e-01, 1.856861e-01, 1.692910e-01, 1.982355e-01, 1.811879e-01, 1.719384e-01, 1.616925e-01, 1.960812e-01, 1.983228e-01, 2.025465e-01, 1.875256e-01, 2.070241e-01, 1.914498e-01, 1.999742e-01, 1.854485e-01, 1.943411e-01, 1.663466e-01, 1.806897e-01, 2.051370e-01, 1.867438e-01, 2.068233e-01, 1.889098e-01, 1.830392e-01, 1.798186e-01, 1.892870e-01, 1.877481e-01, 1.852302e-01, 1.918400e-01, 2.005597e-01, 2.031939e-01, 1.871215e-01, 3.903867e+00, 2.018866e+00, 2.081088e+00, 2.868062e+00, 3.531787e+00, 4.379264e+00, 4.063458e+00, 5.038805e+00, 4.276185e+00, 2.723634e+00, 3.833080e+00, 3.499329e+00, 3.150366e+00, 3.302126e+00, 2.892284e+00, 3.951423e+00, 1.754887e+00, 2.677850e+00, 4.138908e+00, 4.700361e+00, 4.380707e+00, 3.718729e+00, 4.931252e+00, 4.774452e+00, 3.717870e+00, 3.168336e+00, 3.929371e+00, 2.016163e+00, 3.737745e+00, 3.809224e+00, 2.963211e+00, 3.418306e+00, 2.964152e+00, 4.141241e+00, 3.320188e+00, 2.977541e+00, 2.415066e+00, 2.966762e+00, 2.778804e+00, 2.800053e+00, 5.193302e+00, 2.519299e+00, 4.149408e+00, 4.459400e+00, 2.749659e+00, 3.786075e+00, 4.506901e+00, 3.310400e+00, 3.091284e+00, 2.242702e+00, 2.268754e+00, 2.996708e+00, 2.269358e+00, 3.978340e+00, 3.813062e+00, 2.189461e+00, 3.660726e+00, 2.499736e+00, 4.202338e+00, 2.304905e+00, 4.317240e+00, 3.378630e+00, 3.843953e+00, 2.597905e+00, 3.305611e+00, 3.488701e+00, 2.300470e+00, 5.149191e+00, 1.488722e+00, 3.443420e+00, 3.000245e+00, 3.712786e+00, 4.811908e+00, 3.728686e+00, 4.395107e+00, 2.226071e+00, 3.221676e+00, 6.412614e+00, 3.335080e+00, 4.054703e+00, 3.932455e+00, 2.047878e+00, 4.427076e+00, 5.214006e+00, 2.019971e+00, 5.377297e+00, 2.509805e+00, 2.162045e+00, 4.636224e+00, 3.020038e+00, 8.706211e-01, 3.957893e+00, 2.197870e+00, 6.118008e+00, 4.121505e+00, 2.789002e+00, 3.455306e+00, 4.677895e+00, 3.627722e+00, 4.320672e+00, 1.445548e-04, 4.534447e-02, 3.918439e-02, 4.746681e-03, 5.538531e-04, 2.267686e-05, 7.891947e-05, 1.373937e-06, 3.431121e-05, 7.250411e-03, 1.880286e-04, 6.198385e-04, 1.981034e-03, 1.208352e-03, 4.414254e-03, 1.209164e-04, 8.139079e-02, 8.264678e-03, 5.893181e-05, 5.982394e-06, 2.254466e-05, 2.854524e-04, 2.208591e-06, 4.359985e-06, 2.863392e-04, 1.870061e-03, 1.313792e-04, 4.562977e-02, 2.664743e-04, 2.052922e-04, 3.559619e-03, 8.182259e-04, 3.549381e-03, 5.839868e-05, 1.138019e-03, 3.406603e-03, 1.697777e-02, 3.521121e-03, 6.178873e-03, 5.806134e-03, 6.869468e-07, 1.284321e-02, 5.656800e-05, 1.635852e-05, 6.725545e-03, 2.234744e-04, 1.345385e-05, 1.175644e-03, 2.390401e-03, 2.643294e-02, 2.475948e-02, 3.211387e-03, 2.472178e-02, 1.092191e-04, 2.024169e-04, 3.016240e-02, 3.515539e-04, 1.354268e-02, 4.596917e-05, 2.259118e-02, 2.911762e-05, 9.357827e-04, 1.806266e-04, 1.034716e-02, 1.194474e-03, 6.430049e-04, 2.284788e-02, 8.384126e-07, 1.387323e-01, 7.511259e-04, 3.176503e-03, 2.916419e-04, 3.711025e-06, 2.753611e-04, 2.126572e-05, 2.755222e-02, 1.573722e-03, 1.894167e-09, 1.082930e-03, 8.161968e-05, 1.298660e-04, 4.237647e-02, 1.867100e-05, 6.253861e-07, 4.522821e-02, 2.958423e-07, 1.317852e-02, 3.225526e-02, 7.846121e-06, 2.987682e-03, 3.854002e-01, 1.180002e-04, 2.954458e-02, 8.382246e-09, 6.305932e-05, 5.997349e-03, 7.212018e-04, 6.580410e-06, 3.953724e-04, 2.871946e-05, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00
numCourse 0.9037453 0.3574858 0.3714900 0.0283753 0 0 100 1.000000e+00, 2.000000e+00, 3.000000e+00, 4.000000e+00, 5.000000e+00, 6.000000e+00, 7.000000e+00, 8.000000e+00, 9.000000e+00, 1.000000e+01, 1.100000e+01, 1.200000e+01, 1.300000e+01, 1.400000e+01, 1.500000e+01, 1.600000e+01, 1.700000e+01, 1.800000e+01, 1.900000e+01, 2.000000e+01, 2.100000e+01, 2.200000e+01, 2.300000e+01, 2.400000e+01, 2.500000e+01, 2.600000e+01, 2.700000e+01, 2.800000e+01, 2.900000e+01, 3.000000e+01, 3.100000e+01, 3.200000e+01, 3.300000e+01, 3.400000e+01, 3.500000e+01, 3.600000e+01, 3.700000e+01, 3.800000e+01, 3.900000e+01, 4.000000e+01, 4.100000e+01, 4.200000e+01, 4.300000e+01, 4.400000e+01, 4.500000e+01, 4.600000e+01, 4.700000e+01, 4.800000e+01, 4.900000e+01, 5.000000e+01, 5.100000e+01, 5.200000e+01, 5.300000e+01, 5.400000e+01, 5.500000e+01, 5.600000e+01, 5.700000e+01, 5.800000e+01, 5.900000e+01, 6.000000e+01, 6.100000e+01, 6.200000e+01, 6.300000e+01, 6.400000e+01, 6.500000e+01, 6.600000e+01, 6.700000e+01, 6.800000e+01, 6.900000e+01, 7.000000e+01, 7.100000e+01, 7.200000e+01, 7.300000e+01, 7.400000e+01, 7.500000e+01, 7.600000e+01, 7.700000e+01, 7.800000e+01, 7.900000e+01, 8.000000e+01, 8.100000e+01, 8.200000e+01, 8.300000e+01, 8.400000e+01, 8.500000e+01, 8.600000e+01, 8.700000e+01, 8.800000e+01, 8.900000e+01, 9.000000e+01, 9.100000e+01, 9.200000e+01, 9.300000e+01, 9.400000e+01, 9.500000e+01, 9.600000e+01, 9.700000e+01, 9.800000e+01, 9.900000e+01, 1.000000e+02, 8.371890e-01, 1.217562e+00, 1.521204e+00, 9.240372e-01, 3.977857e-01, 9.754716e-01, 8.030478e-01, 1.043738e+00, 1.056538e+00, 7.880124e-01, 7.881026e-01, 9.234671e-01, 1.330339e+00, 2.737651e-01, 7.152824e-01, 1.640791e+00, 2.090537e-01, 3.296778e-01, 4.143074e-01, 5.245678e-01, 1.219444e+00, 8.125772e-01, 8.784141e-01, 9.175594e-01, 4.607233e-01, 9.564796e-01, 6.391656e-01, 9.313043e-01, 6.814663e-01, 5.143359e-01, 8.020000e-01, 6.654887e-01, 1.139327e+00, 1.011160e+00, 8.883918e-01, 6.933695e-01, 8.035224e-01, 7.428687e-01, 1.088803e+00, 1.075160e+00, 1.150121e+00, 5.375396e-01, 4.699872e-01, 9.248679e-01, 6.878657e-01, 4.101098e-01, 9.718086e-01, 5.629311e-01, 1.117394e+00, 7.909859e-01, 1.105612e+00, 5.698597e-01, 3.746954e-01, 1.028702e+00, 1.252949e+00, 2.269200e-01, 1.104946e+00, 1.050563e+00, 7.468156e-01, 1.345061e+00, 1.204265e+00, 9.589043e-01, 7.051613e-01, 4.239211e-01, 1.345456e+00, 1.056480e+00, 5.327934e-01, 9.050963e-01, 1.468774e+00, 6.193017e-01, 7.467058e-01, 1.316419e+00, 1.394260e+00, 1.149180e+00, 1.500936e+00, 1.175170e+00, 1.052985e+00, 9.813052e-01, 5.595326e-01, 8.221430e-01, 1.736166e+00, 1.166299e+00, 2.889275e-01, 1.297855e+00, 5.116032e-01, 1.493282e+00, 8.837207e-01, 6.636916e-01, 1.226529e+00, 3.660766e-01, 1.326606e+00, 1.417397e+00, 1.386804e+00, 1.253189e+00, 7.123357e-01, 4.248500e-01, 9.979454e-01, 6.684776e-01, 1.826696e+00, 7.420529e-01, 3.063096e-01, 4.580666e-01, 3.849961e-01, 3.981406e-01, 3.327361e-01, 3.544891e-01, 3.607372e-01, 3.386402e-01, 3.937397e-01, 3.622305e-01, 3.832828e-01, 3.924674e-01, 3.626837e-01, 4.064752e-01, 3.819949e-01, 3.605101e-01, 3.214835e-01, 4.002978e-01, 4.277556e-01, 3.337623e-01, 3.639852e-01, 3.454935e-01, 3.910654e-01, 3.662599e-01, 4.217924e-01, 3.789961e-01, 3.833706e-01, 3.775400e-01, 4.160600e-01, 3.442764e-01, 3.297923e-01, 3.355875e-01, 3.628852e-01, 3.559699e-01, 3.672790e-01, 3.874809e-01, 4.265720e-01, 3.616940e-01, 3.568469e-01, 3.883901e-01, 3.521155e-01, 3.676032e-01, 4.121488e-01, 3.580435e-01, 3.798873e-01, 3.360905e-01, 3.416754e-01, 3.732545e-01, 3.768332e-01, 3.709179e-01, 3.841548e-01, 3.735529e-01, 4.022397e-01, 3.687907e-01, 3.514082e-01, 3.236409e-01, 3.215746e-01, 3.360811e-01, 3.664457e-01, 4.208134e-01, 3.447574e-01, 4.258211e-01, 3.458947e-01, 4.180258e-01, 3.925918e-01, 3.794529e-01, 3.661420e-01, 3.583562e-01, 3.746273e-01, 3.571280e-01, 3.690460e-01, 3.384285e-01, 3.648574e-01, 3.460503e-01, 3.689331e-01, 3.419116e-01, 4.244657e-01, 4.133905e-01, 3.764400e-01, 3.685315e-01, 3.922429e-01, 4.017359e-01, 3.951148e-01, 3.818742e-01, 3.773277e-01, 3.538814e-01, 3.938891e-01, 3.676107e-01, 3.330958e-01, 3.785922e-01, 3.557397e-01, 3.796950e-01, 3.461720e-01, 3.764509e-01, 3.684886e-01, 3.301028e-01, 3.788265e-01, 3.386068e-01, 4.181708e-01, 3.671258e-01, 2.733147e+00, 2.658046e+00, 3.951219e+00, 2.320881e+00, 1.195499e+00, 2.751767e+00, 2.226130e+00, 3.082143e+00, 2.683340e+00, 2.175445e+00, 2.056191e+00, 2.352978e+00, 3.668042e+00, 6.735099e-01, 1.872492e+00, 4.551305e+00, 6.502780e-01, 8.235813e-01, 9.685611e-01, 1.571681e+00, 3.350259e+00, 2.351932e+00, 2.246208e+00, 2.505214e+00, 1.092299e+00, 2.523719e+00, 1.667227e+00, 2.466770e+00, 1.637904e+00, 1.493962e+00, 2.431834e+00, 1.983056e+00, 3.139634e+00, 2.840577e+00, 2.418847e+00, 1.789429e+00, 1.883674e+00, 2.053860e+00, 3.051176e+00, 2.768248e+00, 3.266318e+00, 1.462282e+00, 1.140334e+00, 2.583116e+00, 1.810710e+00, 1.220236e+00, 2.844246e+00, 1.508170e+00, 2.965221e+00, 2.132510e+00, 2.878038e+00, 1.525513e+00, 9.315227e-01, 2.789392e+00, 3.565509e+00, 7.011475e-01, 3.436048e+00, 3.125922e+00, 2.037998e+00, 3.196335e+00, 3.493080e+00, 2.251894e+00, 2.038659e+00, 1.014103e+00, 3.427112e+00, 2.784219e+00, 1.455155e+00, 2.525689e+00, 3.920626e+00, 1.734117e+00, 2.023341e+00, 3.889801e+00, 3.821382e+00, 3.320846e+00, 4.068315e+00, 3.437059e+00, 2.480730e+00, 2.373797e+00, 1.486379e+00, 2.230862e+00, 4.426251e+00, 2.903148e+00, 7.312496e-01, 3.398647e+00, 1.355859e+00, 4.219724e+00, 2.243577e+00, 1.805420e+00, 3.682210e+00, 9.669416e-01, 3.729147e+00, 3.732987e+00, 4.006113e+00, 3.328958e+00, 1.933128e+00, 1.287023e+00, 2.634307e+00, 1.974200e+00, 4.368300e+00, 2.021249e+00, 7.054408e-03, 8.741843e-03, 1.210095e-04, 2.168727e-02, 2.338436e-01, 6.684567e-03, 2.754818e-02, 2.460311e-03, 8.136629e-03, 3.121716e-02, 4.155730e-02, 1.996703e-02, 3.424832e-04, 5.016951e-01, 6.315220e-02, 1.119273e-05, 5.165416e-01, 4.115300e-01, 3.343770e-01, 1.182042e-01, 1.029349e-03, 2.002110e-02, 2.620216e-02, 1.334348e-02, 2.765134e-01, 1.268972e-02, 9.762781e-02, 1.479857e-02, 1.036100e-01, 1.373585e-01, 1.624172e-02, 4.925028e-02, 2.050193e-03, 5.151532e-03, 1.680923e-02, 7.563307e-02, 6.161146e-02, 4.178566e-02, 2.711462e-03, 6.372027e-03, 1.359931e-03, 1.458279e-01, 2.560273e-01, 1.078051e-02, 7.225599e-02, 2.243561e-01, 5.095733e-03, 1.336869e-01, 3.537781e-03, 3.464945e-02, 4.607085e-03, 1.293095e-01, 3.531317e-01, 5.990509e-03, 4.923356e-04, 4.843347e-01, 7.702678e-04, 2.141811e-03, 4.336804e-02, 1.708593e-03, 6.333637e-04, 2.583152e-02, 4.330112e-02, 3.122230e-01, 7.940830e-04, 6.081873e-03, 1.477879e-01, 1.262185e-02, 1.357624e-04, 8.502269e-02, 4.487544e-02, 1.523497e-04, 1.963142e-04, 1.135530e-03, 7.745848e-05, 7.676149e-04, 1.425461e-02, 1.891658e-02, 1.393500e-01, 2.722560e-02, 1.873394e-05, 4.272190e-03, 4.658068e-01, 8.746280e-04, 1.772519e-01, 4.292381e-05, 2.637518e-02, 7.308361e-02, 3.255414e-04, 3.351832e-01, 2.749027e-04, 2.711074e-04, 9.828456e-05, 1.105268e-03, 5.516915e-02, 2.001369e-01, 9.346509e-03, 5.025901e-02, 2.370564e-05, 4.509413e-02, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00

The output contains the variable name, the average test statistic, the standard deviation of the test statistic, the power rate, the number of null hypotheses rejects, and the total number of replications. Increasing the number of replications would increase the precision of the power analysis, however may significantly increase the computational time.

Standardized Coefficients

By default, the simglm package uses unstandardized regression coefficients when doing the simulation. A way to use standardized coefficients however, would be to generate standardized variables. For example:

fixed <- ~ 1 + act + diff + numCourse + act:numCourse
fixed_param <- c(0.2, 0.4, 0.25, 0.7, 0.1)
cov_param <- list(dist_fun = c('rnorm', 'rnorm', 'rnorm'),
                  var_type = c("single", "single", "single"),
                  opts = list(list(mean = 0, sd = 1),
                              list(mean = 0, sd = 1),
                              list(mean = 0, sd = 1)))
n <- 150
error_var <- 1
with_err_gen <- 'rnorm'
pow_param <- c('(Intercept)', 'act', 'diff', 'numCourse')
alpha <- .01
pow_dist <- "t"
pow_tail <- 2
replicates <- 100
power_out <- sim_pow(fixed = fixed, fixed_param = fixed_param, 
                     cov_param = cov_param,n = n, error_var = error_var,
                     with_err_gen = with_err_gen, data_str = "single",
                     pow_param = pow_param, alpha = alpha,
                     pow_dist = pow_dist, pow_tail = pow_tail, 
                     replicates = replicates)
head(power_out)
term avg_test_stat sd_test_stat avg_std_err sd_std_err power num_reject num_repl data
(Intercept) 0.1903069 0.0852844 0.0819886 0.0055974 0 0 100 1.000000e+00, 2.000000e+00, 3.000000e+00, 4.000000e+00, 5.000000e+00, 6.000000e+00, 7.000000e+00, 8.000000e+00, 9.000000e+00, 1.000000e+01, 1.100000e+01, 1.200000e+01, 1.300000e+01, 1.400000e+01, 1.500000e+01, 1.600000e+01, 1.700000e+01, 1.800000e+01, 1.900000e+01, 2.000000e+01, 2.100000e+01, 2.200000e+01, 2.300000e+01, 2.400000e+01, 2.500000e+01, 2.600000e+01, 2.700000e+01, 2.800000e+01, 2.900000e+01, 3.000000e+01, 3.100000e+01, 3.200000e+01, 3.300000e+01, 3.400000e+01, 3.500000e+01, 3.600000e+01, 3.700000e+01, 3.800000e+01, 3.900000e+01, 4.000000e+01, 4.100000e+01, 4.200000e+01, 4.300000e+01, 4.400000e+01, 4.500000e+01, 4.600000e+01, 4.700000e+01, 4.800000e+01, 4.900000e+01, 5.000000e+01, 5.100000e+01, 5.200000e+01, 5.300000e+01, 5.400000e+01, 5.500000e+01, 5.600000e+01, 5.700000e+01, 5.800000e+01, 5.900000e+01, 6.000000e+01, 6.100000e+01, 6.200000e+01, 6.300000e+01, 6.400000e+01, 6.500000e+01, 6.600000e+01, 6.700000e+01, 6.800000e+01, 6.900000e+01, 7.000000e+01, 7.100000e+01, 7.200000e+01, 7.300000e+01, 7.400000e+01, 7.500000e+01, 7.600000e+01, 7.700000e+01, 7.800000e+01, 7.900000e+01, 8.000000e+01, 8.100000e+01, 8.200000e+01, 8.300000e+01, 8.400000e+01, 8.500000e+01, 8.600000e+01, 8.700000e+01, 8.800000e+01, 8.900000e+01, 9.000000e+01, 9.100000e+01, 9.200000e+01, 9.300000e+01, 9.400000e+01, 9.500000e+01, 9.600000e+01, 9.700000e+01, 9.800000e+01, 9.900000e+01, 1.000000e+02, 2.684347e-01, 2.275939e-01, 2.121969e-01, 2.998196e-01, 2.539055e-01, 1.530982e-01, 2.749858e-01, 1.977893e-01, 2.688135e-01, 2.168167e-01, 1.559197e-01, 1.126879e-01, 4.041447e-01, 1.501480e-01, 1.183363e-01, 2.082755e-01, 9.849663e-02, 3.365869e-02, 1.028172e-01, 1.796641e-01, 2.359798e-01, 9.676402e-02, 2.488934e-01, 1.194034e-01, 2.766170e-01, 3.680979e-01, 1.240270e-01, -3.591221e-02, 2.821443e-01, 1.593468e-01, 1.021306e-01, 2.403434e-01, 1.982291e-01, 2.439595e-01, 1.313268e-01, 1.596690e-01, 3.340757e-01, 2.483003e-01, 1.955544e-01, 2.882159e-01, 2.145694e-01, 2.655201e-01, 8.047176e-02, 1.952526e-01, 2.667622e-01, 1.159564e-01, 1.834569e-01, 3.531673e-01, 1.105024e-01, 1.892587e-01, 2.960361e-01, 1.503597e-01, 1.423267e-01, 1.835950e-01, 2.779977e-01, 1.140249e-01, 2.114549e-01, 1.144871e-01, 1.718952e-01, 1.490304e-01, 1.858578e-01, 1.627028e-01, 3.740683e-02, 3.139037e-01, 1.403791e-01, 2.279430e-01, 1.860361e-01, 2.843574e-01, 1.898680e-01, 2.541958e-01, 1.875443e-01, 9.938870e-02, 4.889576e-02, 1.862059e-01, 2.732410e-01, 1.999104e-01, 4.190282e-02, 1.423671e-01, 3.963436e-01, 2.064688e-01, 1.253801e-01, 1.972391e-01, 3.897149e-01, 2.027554e-01, 1.721369e-01, 1.503518e-01, 2.016340e-01, 2.299730e-01, 2.354827e-01, 4.989498e-02, 1.348063e-01, 2.633155e-01, 1.477473e-01, 5.991011e-02, 2.663570e-01, 8.700155e-02, 1.686971e-01, 2.287277e-01, 1.204610e-02, 2.017068e-01, 8.263750e-02, 8.634801e-02, 8.515337e-02, 7.960285e-02, 8.379136e-02, 8.951167e-02, 8.509837e-02, 8.769372e-02, 7.726893e-02, 7.874937e-02, 7.870400e-02, 7.531101e-02, 7.730208e-02, 8.646414e-02, 7.963552e-02, 7.993295e-02, 7.916014e-02, 7.737833e-02, 8.219719e-02, 7.869592e-02, 7.549005e-02, 9.353619e-02, 8.453470e-02, 8.039504e-02, 8.389901e-02, 8.419260e-02, 9.556282e-02, 9.167541e-02, 7.337454e-02, 7.812878e-02, 7.406098e-02, 7.374591e-02, 9.254580e-02, 7.600777e-02, 7.593786e-02, 9.103917e-02, 9.016741e-02, 7.876592e-02, 8.889243e-02, 8.051035e-02, 7.435074e-02, 8.428200e-02, 7.387237e-02, 7.780151e-02, 8.650905e-02, 8.537915e-02, 7.606872e-02, 8.586374e-02, 7.972210e-02, 8.980582e-02, 8.812934e-02, 7.941203e-02, 7.447978e-02, 8.810698e-02, 8.488129e-02, 8.580318e-02, 7.371962e-02, 9.143929e-02, 8.288361e-02, 8.466681e-02, 9.331673e-02, 8.690342e-02, 7.924243e-02, 8.075962e-02, 8.254706e-02, 8.089331e-02, 8.307548e-02, 7.808911e-02, 8.150802e-02, 7.895247e-02, 8.771670e-02, 8.733895e-02, 7.978072e-02, 8.334338e-02, 8.436595e-02, 7.167623e-02, 8.275198e-02, 8.513293e-02, 7.861351e-02, 8.956709e-02, 7.725876e-02, 7.646149e-02, 8.619566e-02, 7.602079e-02, 8.263845e-02, 8.057437e-02, 7.472406e-02, 8.404990e-02, 9.010039e-02, 9.135326e-02, 7.015777e-02, 7.812561e-02, 7.647031e-02, 7.675722e-02, 7.259214e-02, 8.232329e-02, 8.085524e-02, 8.032980e-02, 8.438431e-02, 8.163699e-02, 3.248340e+00, 2.635775e+00, 2.491938e+00, 3.766443e+00, 3.030211e+00, 1.710372e+00, 3.231387e+00, 2.255456e+00, 3.478934e+00, 2.753250e+00, 1.981090e+00, 1.496301e+00, 5.228122e+00, 1.736535e+00, 1.485973e+00, 2.605628e+00, 1.244270e+00, 4.349886e-01, 1.250860e+00, 2.283017e+00, 3.125972e+00, 1.034509e+00, 2.944274e+00, 1.485209e+00, 3.297024e+00, 4.372093e+00, 1.297859e+00, -3.917322e-01, 3.845262e+00, 2.039541e+00, 1.379007e+00, 3.259075e+00, 2.141957e+00, 3.209665e+00, 1.729398e+00, 1.753849e+00, 3.705061e+00, 3.152383e+00, 2.199900e+00, 3.579862e+00, 2.885908e+00, 3.150378e+00, 1.089335e+00, 2.509624e+00, 3.083634e+00, 1.358135e+00, 2.411726e+00, 4.113113e+00, 1.386095e+00, 2.107421e+00, 3.359110e+00, 1.893412e+00, 1.910944e+00, 2.083774e+00, 3.275136e+00, 1.328912e+00, 2.868367e+00, 1.252056e+00, 2.073935e+00, 1.760199e+00, 1.991688e+00, 1.872225e+00, 4.720555e-01, 3.886889e+00, 1.700595e+00, 2.817822e+00, 2.239362e+00, 3.641448e+00, 2.329440e+00, 3.219606e+00, 2.138069e+00, 1.137965e+00, 6.128768e-01, 2.234202e+00, 3.238759e+00, 2.789075e+00, 5.063663e-01, 1.672292e+00, 5.041672e+00, 2.305186e+00, 1.622859e+00, 2.579588e+00, 4.521282e+00, 2.667105e+00, 2.083013e+00, 1.866001e+00, 2.698381e+00, 2.736149e+00, 2.613559e+00, 5.461763e-01, 1.921473e+00, 3.370412e+00, 1.932087e+00, 7.805143e-01, 3.669227e+00, 1.056828e+00, 2.086409e+00, 2.847358e+00, 1.427528e-01, 2.470777e+00, 1.442548e-03, 9.308074e-03, 1.383087e-02, 2.400817e-04, 2.894705e-03, 8.933587e-02, 1.524712e-03, 2.560173e-02, 6.650081e-04, 6.655898e-03, 4.947272e-02, 1.367488e-01, 5.865304e-07, 8.459308e-02, 1.394572e-01, 1.012716e-02, 2.154076e-01, 6.642174e-01, 2.130001e-01, 2.388315e-02, 2.141468e-03, 3.026206e-01, 3.771524e-03, 1.396594e-01, 1.228940e-03, 2.334482e-05, 1.963967e-01, 6.958312e-01, 1.797541e-04, 4.321190e-02, 1.700161e-01, 1.392671e-03, 3.386747e-02, 1.636361e-03, 8.586607e-02, 8.156916e-02, 2.998763e-04, 1.968284e-03, 2.939711e-02, 4.681563e-04, 4.499628e-03, 1.980959e-03, 2.778133e-01, 1.318498e-02, 2.448782e-03, 1.765304e-01, 1.712783e-02, 6.514709e-05, 1.678458e-01, 3.680213e-02, 9.992584e-04, 6.029532e-02, 5.798529e-02, 3.893553e-02, 1.321041e-03, 1.859644e-01, 4.742361e-03, 2.125653e-01, 3.985397e-02, 8.048262e-02, 4.828354e-02, 6.318936e-02, 6.375968e-01, 1.540125e-04, 9.116282e-02, 5.510296e-03, 2.665447e-02, 3.765573e-04, 2.121628e-02, 1.584358e-03, 3.418743e-02, 2.570117e-01, 5.409178e-01, 2.699993e-02, 1.488461e-03, 5.996070e-03, 6.133686e-01, 9.662327e-02, 1.356539e-06, 2.257497e-02, 1.067918e-01, 1.088626e-02, 1.267721e-05, 8.520569e-03, 3.900593e-02, 6.406136e-02, 7.794951e-03, 6.993554e-03, 9.905622e-03, 5.857842e-01, 5.663393e-02, 9.620327e-04, 5.529861e-02, 4.363605e-01, 3.410347e-04, 2.923477e-01, 3.869265e-02, 5.048824e-03, 8.866836e-01, 1.464057e-02, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00
act 0.3975970 0.0844682 0.0834705 0.0079955 0 0 100 1.000000e+00, 2.000000e+00, 3.000000e+00, 4.000000e+00, 5.000000e+00, 6.000000e+00, 7.000000e+00, 8.000000e+00, 9.000000e+00, 1.000000e+01, 1.100000e+01, 1.200000e+01, 1.300000e+01, 1.400000e+01, 1.500000e+01, 1.600000e+01, 1.700000e+01, 1.800000e+01, 1.900000e+01, 2.000000e+01, 2.100000e+01, 2.200000e+01, 2.300000e+01, 2.400000e+01, 2.500000e+01, 2.600000e+01, 2.700000e+01, 2.800000e+01, 2.900000e+01, 3.000000e+01, 3.100000e+01, 3.200000e+01, 3.300000e+01, 3.400000e+01, 3.500000e+01, 3.600000e+01, 3.700000e+01, 3.800000e+01, 3.900000e+01, 4.000000e+01, 4.100000e+01, 4.200000e+01, 4.300000e+01, 4.400000e+01, 4.500000e+01, 4.600000e+01, 4.700000e+01, 4.800000e+01, 4.900000e+01, 5.000000e+01, 5.100000e+01, 5.200000e+01, 5.300000e+01, 5.400000e+01, 5.500000e+01, 5.600000e+01, 5.700000e+01, 5.800000e+01, 5.900000e+01, 6.000000e+01, 6.100000e+01, 6.200000e+01, 6.300000e+01, 6.400000e+01, 6.500000e+01, 6.600000e+01, 6.700000e+01, 6.800000e+01, 6.900000e+01, 7.000000e+01, 7.100000e+01, 7.200000e+01, 7.300000e+01, 7.400000e+01, 7.500000e+01, 7.600000e+01, 7.700000e+01, 7.800000e+01, 7.900000e+01, 8.000000e+01, 8.100000e+01, 8.200000e+01, 8.300000e+01, 8.400000e+01, 8.500000e+01, 8.600000e+01, 8.700000e+01, 8.800000e+01, 8.900000e+01, 9.000000e+01, 9.100000e+01, 9.200000e+01, 9.300000e+01, 9.400000e+01, 9.500000e+01, 9.600000e+01, 9.700000e+01, 9.800000e+01, 9.900000e+01, 1.000000e+02, 4.688302e-01, 4.136543e-01, 3.199400e-01, 5.827339e-01, 3.250700e-01, 3.960206e-01, 3.333438e-01, 5.224728e-01, 3.518828e-01, 5.145095e-01, 4.109518e-01, 5.584155e-01, 4.168028e-01, 3.976327e-01, 2.791447e-01, 4.801840e-01, 2.911002e-01, 3.343805e-01, 2.963553e-01, 3.532924e-01, 4.278354e-01, 3.849860e-01, 4.610491e-01, 4.222760e-01, 3.872846e-01, 3.251924e-01, 2.990157e-01, 5.349339e-01, 3.578011e-01, 3.538020e-01, 4.350379e-01, 4.346532e-01, 4.313385e-01, 3.813515e-01, 2.956726e-01, 4.007647e-01, 3.863932e-01, 2.908810e-01, 4.400007e-01, 3.416210e-01, 3.825736e-01, 4.374302e-01, 5.518499e-01, 4.044161e-01, 4.178235e-01, 4.605690e-01, 5.300922e-01, 5.647244e-01, 3.668845e-01, 3.634648e-01, 4.022977e-01, 6.008888e-01, 3.960485e-01, 3.761488e-01, 4.162911e-01, 3.102268e-01, 4.125849e-01, 3.363247e-01, 3.017056e-01, 3.290075e-01, 2.733592e-01, 2.925101e-01, 3.806176e-01, 4.235969e-01, 3.431866e-01, 4.188914e-01, 3.922073e-01, 4.004143e-01, 5.199036e-01, 5.011620e-01, 5.148023e-01, 4.360034e-01, 3.897207e-01, 3.633084e-01, 5.813404e-01, 5.325117e-01, 4.033885e-01, 2.007345e-01, 4.236499e-01, 3.354543e-01, 3.357403e-01, 3.949589e-01, 3.815323e-01, 3.421279e-01, 3.599124e-01, 4.551806e-01, 3.833069e-01, 3.686754e-01, 3.003858e-01, 4.464250e-01, 3.363960e-01, 3.835720e-01, 3.172467e-01, 2.696534e-01, 5.110317e-01, 3.273928e-01, 5.013841e-01, 3.563573e-01, 1.482889e-01, 5.134111e-01, 7.784113e-02, 8.662523e-02, 9.073970e-02, 8.281685e-02, 8.757357e-02, 9.238177e-02, 9.317860e-02, 9.694956e-02, 7.654147e-02, 7.759844e-02, 7.995691e-02, 7.842199e-02, 7.627473e-02, 8.762971e-02, 7.739267e-02, 8.302570e-02, 7.576051e-02, 7.533798e-02, 8.720320e-02, 7.720272e-02, 7.485154e-02, 9.416940e-02, 8.892613e-02, 8.576727e-02, 9.270390e-02, 8.960913e-02, 1.051797e-01, 8.590996e-02, 8.336038e-02, 7.889132e-02, 7.066060e-02, 7.950956e-02, 8.943747e-02, 8.181104e-02, 7.347510e-02, 8.250872e-02, 9.832908e-02, 7.639243e-02, 8.985506e-02, 7.691413e-02, 7.331834e-02, 8.487725e-02, 7.716343e-02, 8.375830e-02, 8.199227e-02, 8.881706e-02, 6.377368e-02, 8.829186e-02, 7.956435e-02, 9.952213e-02, 9.158876e-02, 7.905387e-02, 8.105506e-02, 7.451005e-02, 9.728106e-02, 8.321616e-02, 7.855165e-02, 9.025655e-02, 9.854107e-02, 7.988406e-02, 9.027577e-02, 8.974082e-02, 7.918405e-02, 8.405688e-02, 9.074565e-02, 8.539261e-02, 7.930475e-02, 7.911290e-02, 7.441944e-02, 8.385132e-02, 9.116718e-02, 8.267463e-02, 8.758313e-02, 9.750305e-02, 9.170970e-02, 7.038606e-02, 8.212401e-02, 8.326909e-02, 7.818854e-02, 9.351939e-02, 7.646167e-02, 7.870959e-02, 9.960632e-02, 7.634865e-02, 8.123506e-02, 8.076299e-02, 7.378076e-02, 8.261283e-02, 8.963116e-02, 9.874006e-02, 7.038956e-02, 7.351238e-02, 7.659427e-02, 7.191635e-02, 7.559530e-02, 9.177664e-02, 7.696230e-02, 7.443330e-02, 8.270211e-02, 8.733418e-02, 6.022911e+00, 4.775217e+00, 3.525910e+00, 7.036417e+00, 3.711965e+00, 4.286783e+00, 3.577472e+00, 5.389120e+00, 4.597283e+00, 6.630410e+00, 5.139666e+00, 7.120650e+00, 5.464493e+00, 4.537647e+00, 3.606862e+00, 5.783559e+00, 3.842373e+00, 4.438405e+00, 3.398445e+00, 4.576166e+00, 5.715787e+00, 4.088228e+00, 5.184630e+00, 4.923510e+00, 4.177651e+00, 3.629009e+00, 2.842902e+00, 6.226681e+00, 4.292221e+00, 4.484676e+00, 6.156726e+00, 5.466679e+00, 4.822794e+00, 4.661369e+00, 4.024120e+00, 4.857241e+00, 3.929593e+00, 3.807720e+00, 4.896783e+00, 4.441589e+00, 5.217980e+00, 5.153680e+00, 7.151702e+00, 4.828371e+00, 5.095888e+00, 5.185591e+00, 8.312084e+00, 6.396109e+00, 4.611167e+00, 3.652100e+00, 4.392435e+00, 7.601004e+00, 4.886166e+00, 5.048297e+00, 4.279262e+00, 3.727964e+00, 5.252402e+00, 3.726319e+00, 3.061724e+00, 4.118562e+00, 3.028046e+00, 3.259499e+00, 4.806746e+00, 5.039408e+00, 3.781852e+00, 4.905477e+00, 4.945572e+00, 5.061302e+00, 6.986126e+00, 5.976793e+00, 5.646794e+00, 5.273727e+00, 4.449723e+00, 3.726124e+00, 6.338920e+00, 7.565585e+00, 4.911943e+00, 2.410672e+00, 5.418312e+00, 3.587002e+00, 4.390962e+00, 5.017927e+00, 3.830403e+00, 4.481125e+00, 4.430506e+00, 5.636005e+00, 5.195215e+00, 4.462689e+00, 3.351354e+00, 4.521215e+00, 4.779060e+00, 5.217788e+00, 4.141911e+00, 3.749543e+00, 6.760099e+00, 3.567279e+00, 6.514671e+00, 4.787605e+00, 1.793049e+00, 5.878697e+00, 1.343893e-08, 4.345700e-06, 5.652885e-04, 7.245455e-11, 2.925067e-04, 3.289129e-05, 4.721038e-04, 2.800811e-07, 9.239316e-06, 6.164121e-10, 8.751522e-07, 4.612827e-11, 1.972279e-07, 1.184602e-05, 4.256752e-04, 4.329040e-08, 1.816843e-04, 1.782680e-05, 8.752244e-04, 1.009177e-05, 5.999319e-08, 7.173404e-05, 7.144502e-07, 2.284781e-06, 5.065132e-05, 3.935707e-04, 5.116102e-03, 4.863671e-09, 3.218483e-05, 1.474499e-05, 6.908652e-09, 1.952239e-07, 3.540665e-06, 7.056785e-06, 9.176183e-05, 3.050038e-06, 1.312699e-04, 2.064295e-04, 2.567888e-06, 1.759627e-05, 6.142001e-07, 8.216228e-07, 3.903125e-11, 3.456352e-06, 1.065137e-06, 7.113489e-07, 6.179228e-14, 2.060748e-09, 8.717201e-06, 3.625417e-04, 2.149762e-05, 3.362112e-12, 2.689547e-06, 1.317156e-06, 3.389309e-05, 2.760820e-04, 5.251257e-07, 2.777291e-04, 2.623372e-03, 6.378410e-05, 2.914266e-03, 1.390732e-03, 3.794553e-06, 1.370261e-06, 2.269525e-04, 2.472258e-06, 2.074115e-06, 1.243048e-06, 9.476330e-11, 1.687124e-08, 8.343864e-08, 4.763976e-07, 1.702023e-05, 2.779252e-04, 2.757366e-09, 4.088115e-12, 2.403372e-06, 1.717545e-02, 2.445931e-07, 4.565486e-04, 2.162652e-05, 1.507323e-06, 1.898954e-04, 1.496205e-05, 1.841142e-05, 8.783762e-08, 6.810212e-07, 1.613935e-05, 1.025579e-03, 1.268075e-05, 4.274584e-06, 6.147372e-07, 5.824628e-05, 2.553077e-04, 3.131392e-10, 4.892918e-04, 1.121970e-09, 4.120477e-06, 7.504959e-02, 2.728040e-08, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00
diff 0.2418966 0.0920727 0.0825093 0.0076570 0 0 100 1.000000e+00, 2.000000e+00, 3.000000e+00, 4.000000e+00, 5.000000e+00, 6.000000e+00, 7.000000e+00, 8.000000e+00, 9.000000e+00, 1.000000e+01, 1.100000e+01, 1.200000e+01, 1.300000e+01, 1.400000e+01, 1.500000e+01, 1.600000e+01, 1.700000e+01, 1.800000e+01, 1.900000e+01, 2.000000e+01, 2.100000e+01, 2.200000e+01, 2.300000e+01, 2.400000e+01, 2.500000e+01, 2.600000e+01, 2.700000e+01, 2.800000e+01, 2.900000e+01, 3.000000e+01, 3.100000e+01, 3.200000e+01, 3.300000e+01, 3.400000e+01, 3.500000e+01, 3.600000e+01, 3.700000e+01, 3.800000e+01, 3.900000e+01, 4.000000e+01, 4.100000e+01, 4.200000e+01, 4.300000e+01, 4.400000e+01, 4.500000e+01, 4.600000e+01, 4.700000e+01, 4.800000e+01, 4.900000e+01, 5.000000e+01, 5.100000e+01, 5.200000e+01, 5.300000e+01, 5.400000e+01, 5.500000e+01, 5.600000e+01, 5.700000e+01, 5.800000e+01, 5.900000e+01, 6.000000e+01, 6.100000e+01, 6.200000e+01, 6.300000e+01, 6.400000e+01, 6.500000e+01, 6.600000e+01, 6.700000e+01, 6.800000e+01, 6.900000e+01, 7.000000e+01, 7.100000e+01, 7.200000e+01, 7.300000e+01, 7.400000e+01, 7.500000e+01, 7.600000e+01, 7.700000e+01, 7.800000e+01, 7.900000e+01, 8.000000e+01, 8.100000e+01, 8.200000e+01, 8.300000e+01, 8.400000e+01, 8.500000e+01, 8.600000e+01, 8.700000e+01, 8.800000e+01, 8.900000e+01, 9.000000e+01, 9.100000e+01, 9.200000e+01, 9.300000e+01, 9.400000e+01, 9.500000e+01, 9.600000e+01, 9.700000e+01, 9.800000e+01, 9.900000e+01, 1.000000e+02, 1.904455e-01, 1.676917e-01, 2.371918e-01, 1.245063e-01, 1.771005e-01, 2.435433e-01, 2.857692e-01, -3.841816e-04, 2.723488e-01, 1.522032e-01, 1.932123e-01, 3.797260e-01, 4.042874e-01, 3.714488e-01, 2.141278e-01, 9.991652e-02, 4.130453e-01, 1.710452e-01, 8.179729e-02, 2.364515e-01, 1.722946e-01, 3.028389e-01, 1.465553e-01, 2.440313e-01, 2.493385e-01, 2.512025e-01, 2.581328e-01, 3.912894e-01, 1.340782e-01, 3.790159e-01, 1.480109e-01, 1.579054e-01, 1.088205e-01, 2.998001e-01, 2.593072e-01, 2.075915e-01, 4.261039e-01, 3.489059e-01, 2.601944e-01, 2.671904e-01, 1.728493e-01, 2.566570e-01, 1.690201e-01, 2.630499e-01, 2.302329e-01, 2.769685e-01, 1.652631e-01, 9.707092e-02, 2.971721e-01, 3.231872e-01, 9.590714e-02, 3.479537e-01, 3.157490e-01, 1.025851e-01, 1.346424e-01, 6.213302e-02, 1.478090e-01, 3.242967e-01, 2.199429e-01, 1.027194e-01, 3.912426e-01, 2.559133e-01, 2.014958e-01, 2.233136e-01, 2.929914e-01, 2.634916e-01, 2.974062e-01, 4.223749e-01, 2.767655e-01, 2.525963e-01, 3.147283e-01, 5.442644e-01, 2.537860e-01, 2.411013e-01, 1.759890e-01, 2.461265e-01, 2.433408e-01, 2.801432e-01, 1.773269e-01, 2.279583e-01, 2.969149e-01, 1.537154e-01, 2.532670e-01, 2.725960e-01, 2.590827e-01, 2.651623e-01, 2.868400e-01, 3.405617e-01, 2.093968e-01, 1.173485e-01, 1.990927e-01, 2.638938e-01, 2.798375e-01, 3.262458e-01, 1.905879e-01, 1.836808e-01, 3.428968e-01, 3.420870e-01, 3.060685e-01, 1.847357e-01, 7.858413e-02, 8.712232e-02, 8.832961e-02, 8.230781e-02, 7.715507e-02, 1.018845e-01, 8.754602e-02, 8.429115e-02, 8.021069e-02, 8.135320e-02, 7.506808e-02, 7.863354e-02, 7.043768e-02, 9.250447e-02, 8.721993e-02, 7.745476e-02, 8.388241e-02, 8.270726e-02, 7.971167e-02, 7.465751e-02, 7.837720e-02, 9.333305e-02, 8.211496e-02, 8.807354e-02, 8.753068e-02, 8.598997e-02, 8.810903e-02, 9.043145e-02, 6.808938e-02, 7.606271e-02, 7.305174e-02, 7.706583e-02, 9.903740e-02, 7.270640e-02, 7.078638e-02, 9.072552e-02, 9.034209e-02, 7.564298e-02, 9.981764e-02, 8.638554e-02, 7.472980e-02, 8.080958e-02, 7.375999e-02, 6.921510e-02, 9.207176e-02, 8.144988e-02, 7.182261e-02, 7.367241e-02, 7.300716e-02, 8.849512e-02, 9.555572e-02, 8.551166e-02, 7.234230e-02, 8.645893e-02, 8.579672e-02, 9.232755e-02, 7.670061e-02, 9.286959e-02, 7.792372e-02, 8.602992e-02, 8.808250e-02, 9.037818e-02, 7.639236e-02, 7.939371e-02, 8.472851e-02, 8.255452e-02, 8.654462e-02, 7.446828e-02, 8.073368e-02, 7.752510e-02, 8.725775e-02, 8.982064e-02, 7.353234e-02, 8.042023e-02, 8.968068e-02, 7.546128e-02, 9.263663e-02, 8.214157e-02, 7.735147e-02, 9.921021e-02, 7.707197e-02, 8.026320e-02, 9.023381e-02, 7.569500e-02, 8.112597e-02, 7.744321e-02, 7.603211e-02, 7.584072e-02, 8.873634e-02, 8.943484e-02, 7.018030e-02, 8.591935e-02, 9.532680e-02, 7.572366e-02, 7.159867e-02, 8.106173e-02, 8.387562e-02, 7.543878e-02, 9.066213e-02, 8.566359e-02, 2.423459e+00, 1.924785e+00, 2.685304e+00, 1.512691e+00, 2.295384e+00, 2.390386e+00, 3.264217e+00, -4.557792e-03, 3.395417e+00, 1.870894e+00, 2.573828e+00, 4.829059e+00, 5.739647e+00, 4.015469e+00, 2.455032e+00, 1.289998e+00, 4.924099e+00, 2.068079e+00, 1.026164e+00, 3.167150e+00, 2.198274e+00, 3.244712e+00, 1.784758e+00, 2.770768e+00, 2.848585e+00, 2.921300e+00, 2.929698e+00, 4.326918e+00, 1.969150e+00, 4.982940e+00, 2.026110e+00, 2.048968e+00, 1.098782e+00, 4.123434e+00, 3.663235e+00, 2.288127e+00, 4.716560e+00, 4.612535e+00, 2.606697e+00, 3.092999e+00, 2.312991e+00, 3.176072e+00, 2.291487e+00, 3.800470e+00, 2.500581e+00, 3.400478e+00, 2.300990e+00, 1.317602e+00, 4.070452e+00, 3.652035e+00, 1.003678e+00, 4.069080e+00, 4.364653e+00, 1.186519e+00, 1.569319e+00, 6.729630e-01, 1.927090e+00, 3.491958e+00, 2.822541e+00, 1.193997e+00, 4.441775e+00, 2.831582e+00, 2.637643e+00, 2.812736e+00, 3.458002e+00, 3.191728e+00, 3.436450e+00, 5.671877e+00, 3.428130e+00, 3.258252e+00, 3.606881e+00, 6.059458e+00, 3.451352e+00, 2.998018e+00, 1.962396e+00, 3.261627e+00, 2.626831e+00, 3.410492e+00, 2.292482e+00, 2.297731e+00, 3.852437e+00, 1.915142e+00, 2.806786e+00, 3.601241e+00, 3.193585e+00, 3.423958e+00, 3.772617e+00, 4.490486e+00, 2.359764e+00, 1.312112e+00, 2.836875e+00, 3.071413e+00, 2.935560e+00, 4.308374e+00, 2.661892e+00, 2.265938e+00, 4.088159e+00, 4.534630e+00, 3.375925e+00, 2.156525e+00, 1.660570e-02, 5.621445e-02, 8.091262e-03, 1.325347e-01, 2.314538e-02, 1.811487e-02, 1.369351e-03, 9.963697e-01, 8.842353e-04, 6.337498e-02, 1.106091e-02, 3.446084e-06, 5.349593e-08, 9.484244e-05, 1.527017e-02, 1.991048e-01, 2.278895e-06, 4.040933e-02, 3.065229e-01, 1.877203e-03, 2.951518e-02, 1.459774e-03, 7.639150e-02, 6.325421e-03, 5.030445e-03, 4.044143e-03, 3.942464e-03, 2.800815e-05, 5.084212e-02, 1.759540e-06, 4.458726e-02, 4.226832e-02, 2.736844e-01, 6.258851e-05, 3.484177e-04, 2.357586e-02, 5.584161e-06, 8.667334e-06, 1.009703e-02, 2.377484e-03, 2.212965e-02, 1.824085e-03, 2.337567e-02, 2.119966e-04, 1.351178e-02, 8.692232e-04, 2.281763e-02, 1.897150e-01, 7.682373e-05, 3.626261e-04, 3.172060e-01, 7.723071e-05, 2.405776e-05, 2.373579e-01, 1.187533e-01, 5.020420e-01, 5.592399e-02, 6.358205e-04, 5.434081e-03, 2.344289e-01, 1.758287e-05, 5.290720e-03, 9.259317e-03, 5.593536e-03, 7.145707e-04, 1.734238e-03, 7.692123e-04, 7.402871e-08, 7.913358e-04, 1.396436e-03, 4.256455e-04, 1.121468e-08, 7.310300e-04, 3.198425e-03, 5.163083e-02, 1.381052e-03, 9.544603e-03, 8.402224e-04, 2.331668e-02, 2.300770e-02, 1.750434e-04, 5.744332e-02, 5.692387e-03, 4.342066e-04, 1.723858e-03, 8.026518e-04, 2.347369e-04, 1.439639e-05, 1.961911e-02, 1.915559e-01, 5.208416e-03, 2.544796e-03, 3.872882e-03, 3.017095e-05, 8.647266e-03, 2.493578e-02, 7.175319e-05, 1.199520e-05, 9.443501e-04, 3.269148e-02, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00
numCourse 0.6986464 0.0806113 0.0828623 0.0080186 0 0 100 1.000000e+00, 2.000000e+00, 3.000000e+00, 4.000000e+00, 5.000000e+00, 6.000000e+00, 7.000000e+00, 8.000000e+00, 9.000000e+00, 1.000000e+01, 1.100000e+01, 1.200000e+01, 1.300000e+01, 1.400000e+01, 1.500000e+01, 1.600000e+01, 1.700000e+01, 1.800000e+01, 1.900000e+01, 2.000000e+01, 2.100000e+01, 2.200000e+01, 2.300000e+01, 2.400000e+01, 2.500000e+01, 2.600000e+01, 2.700000e+01, 2.800000e+01, 2.900000e+01, 3.000000e+01, 3.100000e+01, 3.200000e+01, 3.300000e+01, 3.400000e+01, 3.500000e+01, 3.600000e+01, 3.700000e+01, 3.800000e+01, 3.900000e+01, 4.000000e+01, 4.100000e+01, 4.200000e+01, 4.300000e+01, 4.400000e+01, 4.500000e+01, 4.600000e+01, 4.700000e+01, 4.800000e+01, 4.900000e+01, 5.000000e+01, 5.100000e+01, 5.200000e+01, 5.300000e+01, 5.400000e+01, 5.500000e+01, 5.600000e+01, 5.700000e+01, 5.800000e+01, 5.900000e+01, 6.000000e+01, 6.100000e+01, 6.200000e+01, 6.300000e+01, 6.400000e+01, 6.500000e+01, 6.600000e+01, 6.700000e+01, 6.800000e+01, 6.900000e+01, 7.000000e+01, 7.100000e+01, 7.200000e+01, 7.300000e+01, 7.400000e+01, 7.500000e+01, 7.600000e+01, 7.700000e+01, 7.800000e+01, 7.900000e+01, 8.000000e+01, 8.100000e+01, 8.200000e+01, 8.300000e+01, 8.400000e+01, 8.500000e+01, 8.600000e+01, 8.700000e+01, 8.800000e+01, 8.900000e+01, 9.000000e+01, 9.100000e+01, 9.200000e+01, 9.300000e+01, 9.400000e+01, 9.500000e+01, 9.600000e+01, 9.700000e+01, 9.800000e+01, 9.900000e+01, 1.000000e+02, 7.918322e-01, 8.003112e-01, 5.572464e-01, 5.872987e-01, 7.160122e-01, 7.531214e-01, 6.515016e-01, 5.872399e-01, 6.884630e-01, 7.067615e-01, 7.324372e-01, 8.054812e-01, 7.746671e-01, 8.619743e-01, 6.309980e-01, 6.523514e-01, 7.045454e-01, 7.438591e-01, 6.043557e-01, 7.521485e-01, 7.656793e-01, 6.471538e-01, 6.530401e-01, 7.258096e-01, 6.900712e-01, 8.224698e-01, 7.240183e-01, 6.365442e-01, 7.490652e-01, 8.289348e-01, 6.980597e-01, 7.228073e-01, 6.873533e-01, 8.296401e-01, 6.653002e-01, 8.148490e-01, 6.440574e-01, 7.606496e-01, 6.998271e-01, 6.621854e-01, 7.614970e-01, 8.545091e-01, 7.747652e-01, 5.951861e-01, 4.745844e-01, 5.682640e-01, 6.380248e-01, 7.353158e-01, 6.932743e-01, 8.165033e-01, 7.661998e-01, 6.825848e-01, 7.602528e-01, 6.489594e-01, 7.270118e-01, 6.387733e-01, 5.732829e-01, 5.631381e-01, 5.490810e-01, 7.169621e-01, 8.207793e-01, 6.945511e-01, 7.117709e-01, 6.649249e-01, 6.957668e-01, 8.099026e-01, 5.141753e-01, 7.824555e-01, 6.486190e-01, 6.651124e-01, 6.792258e-01, 7.070747e-01, 6.293721e-01, 6.727484e-01, 5.076306e-01, 7.880311e-01, 7.772149e-01, 6.286930e-01, 8.159516e-01, 7.139913e-01, 7.649232e-01, 6.523759e-01, 8.129086e-01, 6.931041e-01, 6.214851e-01, 7.123805e-01, 7.015166e-01, 7.744389e-01, 7.902910e-01, 6.770574e-01, 7.030384e-01, 5.905937e-01, 6.673592e-01, 7.111006e-01, 6.362406e-01, 6.193818e-01, 6.908897e-01, 7.190889e-01, 6.755934e-01, 6.545854e-01, 8.467080e-02, 8.571876e-02, 8.544075e-02, 8.018314e-02, 7.667014e-02, 1.005717e-01, 8.694635e-02, 9.257839e-02, 7.344337e-02, 8.289905e-02, 8.364465e-02, 6.916963e-02, 7.000463e-02, 8.747920e-02, 7.794681e-02, 7.966561e-02, 8.259973e-02, 8.334918e-02, 8.199898e-02, 7.923589e-02, 7.265154e-02, 9.533946e-02, 7.777713e-02, 7.392673e-02, 8.512502e-02, 8.137015e-02, 9.948951e-02, 9.485323e-02, 7.099975e-02, 8.211805e-02, 7.350335e-02, 7.335763e-02, 9.065715e-02, 7.861591e-02, 7.025739e-02, 8.909635e-02, 8.627789e-02, 7.816330e-02, 8.638228e-02, 8.277758e-02, 6.998724e-02, 8.155571e-02, 7.475595e-02, 7.933943e-02, 8.542625e-02, 8.497943e-02, 7.754824e-02, 8.358474e-02, 8.498262e-02, 8.885583e-02, 9.303000e-02, 9.913718e-02, 7.633582e-02, 9.224866e-02, 8.183605e-02, 9.025011e-02, 7.665578e-02, 1.030728e-01, 9.178197e-02, 8.686977e-02, 9.726689e-02, 9.112093e-02, 8.246252e-02, 8.705847e-02, 8.282944e-02, 7.783796e-02, 8.120969e-02, 7.458656e-02, 8.441508e-02, 8.301179e-02, 8.295740e-02, 9.664127e-02, 7.677475e-02, 8.094563e-02, 9.989676e-02, 7.206949e-02, 8.014190e-02, 8.322935e-02, 9.268914e-02, 9.189607e-02, 7.830583e-02, 7.759503e-02, 9.054969e-02, 6.867516e-02, 7.831184e-02, 7.896843e-02, 8.167976e-02, 9.792965e-02, 8.533871e-02, 8.241244e-02, 6.721989e-02, 7.220425e-02, 6.951446e-02, 7.365256e-02, 8.013620e-02, 8.853144e-02, 8.119949e-02, 8.727852e-02, 8.045961e-02, 7.803983e-02, 9.351892e+00, 9.336476e+00, 6.522022e+00, 7.324465e+00, 9.338866e+00, 7.488401e+00, 7.493144e+00, 6.343164e+00, 9.374066e+00, 8.525568e+00, 8.756533e+00, 1.164501e+01, 1.106594e+01, 9.853477e+00, 8.095238e+00, 8.188620e+00, 8.529633e+00, 8.924613e+00, 7.370283e+00, 9.492523e+00, 1.053906e+01, 6.787890e+00, 8.396299e+00, 9.817959e+00, 8.106561e+00, 1.010776e+01, 7.277333e+00, 6.710834e+00, 1.055025e+01, 1.009443e+01, 9.496978e+00, 9.853199e+00, 7.581898e+00, 1.055308e+01, 9.469470e+00, 9.145706e+00, 7.464918e+00, 9.731545e+00, 8.101513e+00, 7.999574e+00, 1.088051e+01, 1.047761e+01, 1.036393e+01, 7.501769e+00, 5.555487e+00, 6.687077e+00, 8.227457e+00, 8.797250e+00, 8.157837e+00, 9.189080e+00, 8.236051e+00, 6.885255e+00, 9.959320e+00, 7.034893e+00, 8.883760e+00, 7.077811e+00, 7.478665e+00, 5.463499e+00, 5.982450e+00, 8.253298e+00, 8.438425e+00, 7.622300e+00, 8.631446e+00, 7.637683e+00, 8.399994e+00, 1.040498e+01, 6.331454e+00, 1.049057e+01, 7.683686e+00, 8.012264e+00, 8.187645e+00, 7.316488e+00, 8.197644e+00, 8.311114e+00, 5.081552e+00, 1.093432e+01, 9.697984e+00, 7.553741e+00, 8.803098e+00, 7.769553e+00, 9.768406e+00, 8.407445e+00, 8.977486e+00, 1.009250e+01, 7.936030e+00, 9.021079e+00, 8.588621e+00, 7.908115e+00, 9.260638e+00, 8.215476e+00, 1.045879e+01, 8.179487e+00, 9.600293e+00, 9.654799e+00, 7.939491e+00, 6.996179e+00, 8.508548e+00, 8.239014e+00, 8.396678e+00, 8.387838e+00, 1.469708e-16, 1.609570e-16, 1.080265e-09, 1.531896e-11, 1.587044e-16, 6.251787e-12, 6.091012e-12, 2.698545e-09, 1.289491e-16, 1.817850e-14, 4.787050e-15, 1.539674e-22, 5.131063e-21, 7.504587e-18, 2.118909e-13, 1.248049e-13, 1.775821e-14, 1.801319e-15, 1.193470e-11, 6.403561e-17, 1.233253e-19, 2.706125e-10, 3.817940e-14, 9.273453e-18, 1.987411e-13, 1.643044e-18, 1.979057e-11, 4.053198e-10, 1.152943e-19, 1.779498e-18, 6.236939e-17, 7.517050e-18, 3.736245e-12, 1.133458e-19, 7.339181e-17, 4.943023e-16, 7.111771e-12, 1.550985e-17, 2.045006e-13, 3.636212e-13, 1.573526e-20, 1.785089e-19, 3.535642e-19, 5.809075e-12, 1.286467e-07, 4.588750e-10, 1.000837e-13, 3.779579e-15, 1.486321e-13, 3.831899e-16, 9.530777e-14, 1.619172e-10, 3.991013e-18, 7.304729e-11, 2.285418e-15, 5.805352e-11, 6.595092e-12, 1.981468e-07, 1.640791e-08, 8.639518e-14, 2.999007e-14, 2.988701e-12, 9.873665e-15, 2.744828e-12, 3.737997e-14, 2.762652e-19, 2.863925e-09, 1.651215e-19, 2.127079e-12, 3.385290e-13, 1.254980e-13, 1.599840e-11, 1.185688e-13, 6.213512e-14, 1.135654e-06, 1.136871e-20, 1.893463e-17, 4.363976e-12, 3.653373e-15, 1.319508e-12, 1.245580e-17, 3.581811e-14, 1.323159e-15, 1.800151e-18, 5.198619e-13, 1.025631e-15, 1.264197e-14, 6.080526e-13, 2.515969e-16, 1.071407e-13, 1.999111e-19, 1.314487e-13, 3.381778e-17, 2.447196e-17, 5.098523e-13, 8.981915e-11, 2.004833e-14, 9.371372e-14, 3.809667e-14, 4.007465e-14, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00

Varying Arguments

fixed <- ~ 1 + act + diff + numCourse + act:numCourse
fixed_param <- c(0.5, 1.1, 0.6, 0.9, 1.1)
cov_param <- list(dist_fun = c('rnorm', 'rnorm', 'rnorm'), 
                  var_type = c("single", "single", "single"),
                  opts = list(list(mean = 0, sd = 2),
                              list(mean = 0, sd = 2),
                              list(mean = 0, sd = 1)))
n <- NULL
error_var <- NULL
with_err_gen <- 'rnorm'
pow_param <- c('(Intercept)', 'act', 'diff', 'numCourse')
alpha <- .01
pow_dist <- "t"
pow_tail <- 2
replicates <- 10
terms_vary <- list(n = c(20, 40, 60, 80, 100), error_var = c(5, 10, 20),
                   fixed_param = list(c(0.5, 1.1, 0.6, 0.9, 1.1), 
                                      c(0.6, 1.1, 0.6, 0.9, 1.1)),
                cov_param = list(list(dist_fun = c('rnorm', 'rnorm', 'rnorm'),
                                       mean = c(0, 0, 0), sd = c(2, 2, 1), 
                                  var_type = c("single", "single", "single")),
                                  list(dist_fun = c('rnorm', 'rnorm', 'rnorm'),
                                       mean = c(0.5, 0, 0), sd = c(2, 2, 1), 
                                  var_type = c("single", "single", "single"))
                                  )
                   )
power_out <- sim_pow(fixed = fixed, fixed_param = fixed_param, 
                     cov_param = cov_param,
                     n = n, error_var = error_var, with_err_gen = with_err_gen, 
                     data_str = "single", pow_param = pow_param, alpha = alpha,
                     pow_dist = pow_dist, pow_tail = pow_tail, 
                     replicates = replicates, terms_vary = terms_vary)

Model Misspecification

It is also possible to specify a model different than the generating model for evaluation of power. This may be useful if it is thought another variable is important in explaining variation, however due to design issues is not possible to collect this variable. As a result, there would likely be additional variation due to this variable that will not be able to be explained. Building this into the generating model can help provide additional information about the impact on power.

An example using single level power analysis is shown below.

fixed <- ~ 1 + act + diff + numCourse + act:numCourse
fixed_param <- c(0.5, 1.1, 0.6, 0.9, 1.1)
cov_param <- list(dist_fun = c('rnorm', 'rnorm', 'rnorm'),
                  var_type = c("single", "single", "single"),
                  opts = list(list(mean = 0, sd = 2),
                              list(mean = 0, sd = 2),
                              list(mean = 0, sd = 1)))
n <- 150
error_var <- 20
with_err_gen <- 'rnorm'
pow_param <- c('(Intercept)', 'act', 'diff', 'numCourse')
alpha <- .01
pow_dist <- "t"
pow_tail <- 2
replicates <- 100

lm_fit_mod <- sim_data ~ 1 + act + diff

power_out <- sim_pow(fixed = fixed, fixed_param = fixed_param, 
                     cov_param = cov_param, n = n, error_var = error_var,
                     with_err_gen = with_err_gen, data_str = "single",
                     pow_param = pow_param, alpha = alpha,
                     pow_dist = pow_dist, pow_tail = pow_tail, 
                     replicates = replicates, lm_fit_mod = lm_fit_mod)
head(power_out)
term avg_test_stat sd_test_stat avg_std_err sd_std_err power num_reject num_repl data
(Intercept) 0.4623343 0.3831034 0.4176197 0.0257606 0 0 100 1.000000000, 2.000000000, 3.000000000, 4.000000000, 5.000000000, 6.000000000, 7.000000000, 8.000000000, 9.000000000, 10.000000000, 11.000000000, 12.000000000, 13.000000000, 14.000000000, 15.000000000, 16.000000000, 17.000000000, 18.000000000, 19.000000000, 20.000000000, 21.000000000, 22.000000000, 23.000000000, 24.000000000, 25.000000000, 26.000000000, 27.000000000, 28.000000000, 29.000000000, 30.000000000, 31.000000000, 32.000000000, 33.000000000, 34.000000000, 35.000000000, 36.000000000, 37.000000000, 38.000000000, 39.000000000, 40.000000000, 41.000000000, 42.000000000, 43.000000000, 44.000000000, 45.000000000, 46.000000000, 47.000000000, 48.000000000, 49.000000000, 50.000000000, 51.000000000, 52.000000000, 53.000000000, 54.000000000, 55.000000000, 56.000000000, 57.000000000, 58.000000000, 59.000000000, 60.000000000, 61.000000000, 62.000000000, 63.000000000, 64.000000000, 65.000000000, 66.000000000, 67.000000000, 68.000000000, 69.000000000, 70.000000000, 71.000000000, 72.000000000, 73.000000000, 74.000000000, 75.000000000, 76.000000000, 77.000000000, 78.000000000, 79.000000000, 80.000000000, 81.000000000, 82.000000000, 83.000000000, 84.000000000, 85.000000000, 86.000000000, 87.000000000, 88.000000000, 89.000000000, 90.000000000, 91.000000000, 92.000000000, 93.000000000, 94.000000000, 95.000000000, 96.000000000, 97.000000000, 98.000000000, 99.000000000, 100.000000000, 0.861503216, 0.578660041, 0.900169014, -0.003439614, 0.336883956, -0.295638711, 1.078024430, 0.263219409, 0.456276821, 0.244478642, 0.395964089, 0.929215636, 0.583242786, 0.314569620, 0.346766593, 0.680499219, -0.161325535, 1.121005424, -0.286164697, 0.635326511, 0.646878456, 0.297903622, 0.302428946, 0.360007081, 0.249779153, 0.848008792, 0.843994925, 0.570743674, -0.105030186, 0.546620607, 0.867492039, 0.818271409, 0.491901457, 0.713662693, 0.765998565, 0.818187884, 0.310586251, 0.503865595, 0.266015558, 0.023287412, -0.053139086, 0.218282374, 1.109376439, 0.395976614, 0.236576291, -0.152231598, 0.136643452, 1.298413641, 0.510793904, 0.270633320, 0.193127593, 0.394119031, 0.275232862, 0.413893965, 0.358538443, 0.792708946, -0.395397012, 0.487289739, 0.553279463, 0.470379244, 0.143755174, 0.384428644, 1.359046923, 0.960679111, 1.403411914, 0.267787616, 0.582773270, 0.162405896, 0.211025776, 0.417663987, 0.387239245, 0.702505541, 0.895662290, 0.963301736, -0.153269594, 0.627260289, 0.315483635, 1.240787290, 0.613211537, 0.833349209, -0.338413973, 0.241905261, 0.767489946, 0.613900178, 0.946660434, 0.282817257, 1.122494090, 0.494339870, 0.326587606, 0.274864048, 0.225664599, -0.094749051, 0.118563479, 0.727380627, 0.410136183, 0.312025285, -0.020558962, 0.388878987, -0.006790127, 0.487390478, 0.382429716, 0.394807848, 0.434227118, 0.404074735, 0.421260089, 0.413371555, 0.428777956, 0.433226657, 0.464618418, 0.414925381, 0.427131924, 0.432659438, 0.442991171, 0.389474376, 0.406969159, 0.422570414, 0.417411459, 0.398397002, 0.396178299, 0.416225467, 0.406464469, 0.438319091, 0.331774566, 0.410221391, 0.415443505, 0.443699350, 0.414866423, 0.405824975, 0.356822927, 0.476735861, 0.437151807, 0.433316097, 0.410512758, 0.423002961, 0.426123692, 0.422547800, 0.387269700, 0.404791367, 0.432362757, 0.379890768, 0.403358485, 0.395876389, 0.358610107, 0.393320295, 0.427515875, 0.410698246, 0.399048393, 0.416763489, 0.403733059, 0.417906906, 0.419902337, 0.411858187, 0.433496685, 0.440088122, 0.395577112, 0.384373976, 0.420318593, 0.362467211, 0.386049916, 0.436359819, 0.472228616, 0.397415322, 0.451827976, 0.470851334, 0.422400724, 0.417601914, 0.444318080, 0.432838125, 0.403149702, 0.395609661, 0.433615690, 0.387967979, 0.417851880, 0.406948668, 0.423024859, 0.392374196, 0.433363180, 0.403170230, 0.417339566, 0.452789435, 0.478408257, 0.442809956, 0.426443405, 0.414595637, 0.429923999, 0.430301984, 0.409127601, 0.438612844, 0.436429681, 0.407465600, 0.417637697, 0.408846705, 0.428623574, 0.408681947, 0.385511103, 0.462689578, 0.453682686, 0.472568580, 0.398348650, 0.418377605, 2.252709922, 1.465675122, 2.073037306, -0.008512322, 0.799705373, -0.715188812, 2.514178763, 0.607578976, 0.982046349, 0.589211104, 0.927029957, 2.147683730, 1.316601378, 0.807677318, 0.852070938, 1.610380652, -0.386490432, 2.813789806, -0.722312902, 1.526399897, 1.591476021, 0.679650119, 0.911549519, 0.877592170, 0.601234945, 1.911223879, 2.034377522, 1.406378880, -0.294348200, 1.146590075, 1.984418285, 1.888393750, 1.198261071, 1.687134036, 1.797596753, 1.936320305, 0.801989546, 1.244753808, 0.615260113, 0.061300284, -0.131741585, 0.551390233, 3.093544818, 1.006753578, 0.553374284, -0.370665323, 0.342423261, 3.115468784, 1.265177305, 0.647592360, 0.459934550, 0.956928970, 0.634913417, 0.940479746, 0.906368019, 2.062337714, -0.940707877, 1.344369157, 1.433181153, 1.077961863, 0.304418599, 0.967322150, 3.007885731, 2.040302410, 3.322465695, 0.641250932, 1.311612776, 0.375211625, 0.523442719, 1.055747692, 0.893047123, 1.810730727, 2.143492306, 2.367133284, -0.362318174, 1.598627780, 0.727989018, 3.077576665, 1.469334774, 1.840478475, -0.707374857, 0.546295895, 1.799746313, 1.480720305, 2.201925077, 0.657252970, 2.743628359, 1.127052883, 0.748316672, 0.674569945, 0.540335799, -0.231747132, 0.276614462, 1.779820791, 1.063876448, 0.674372841, -0.045315730, 0.822904872, -0.017045689, 1.164953554, 0.025758154, 0.144872543, 0.039914492, 0.993219773, 0.425171896, 0.475626737, 0.013007992, 0.544404194, 0.327690544, 0.556624085, 0.355430519, 0.033378159, 0.190021288, 0.420581386, 0.395560759, 0.109460043, 0.699692353, 0.005566668, 0.471249637, 0.129059039, 0.113650681, 0.497794878, 0.363498318, 0.381597131, 0.548609525, 0.057922094, 0.043711403, 0.161722083, 0.768907084, 0.253413990, 0.049070858, 0.060943366, 0.232743714, 0.093698452, 0.074293510, 0.054747021, 0.423853581, 0.215203070, 0.539334278, 0.951203330, 0.895368833, 0.582203354, 0.002367744, 0.315707512, 0.580847804, 0.711420408, 0.732521498, 0.002208783, 0.207809616, 0.518258738, 0.646242743, 0.340174232, 0.526471870, 0.348514417, 0.366224368, 0.040935943, 0.348397858, 0.180899958, 0.153929473, 0.282816503, 0.761239526, 0.334971795, 0.003095655, 0.043110226, 0.001125976, 0.522358191, 0.191695627, 0.708043908, 0.601454395, 0.292815526, 0.373291595, 0.072224584, 0.033719002, 0.019229198, 0.717634636, 0.112050563, 0.467778312, 0.002490111, 0.143878892, 0.067714435, 0.480453487, 0.585690741, 0.073951590, 0.140821292, 0.029228949, 0.512046031, 0.006833278, 0.261556501, 0.455464747, 0.501008548, 0.589783186, 0.817056712, 0.782464710, 0.077171346, 0.289129149, 0.501133458, 0.963917151, 0.411895018, 0.986423280, 0.245924761, 0.000000000, 0.000000000, 0.000000000, 0.000000000, 0.000000000, 0.000000000, 0.000000000, 0.000000000, 0.000000000, 0.000000000, 0.000000000, 0.000000000, 0.000000000, 0.000000000, 0.000000000, 0.000000000, 0.000000000, 0.000000000, 0.000000000, 0.000000000, 0.000000000, 0.000000000, 0.000000000, 0.000000000, 0.000000000, 0.000000000, 0.000000000, 0.000000000, 0.000000000, 0.000000000, 0.000000000, 0.000000000, 0.000000000, 0.000000000, 0.000000000, 0.000000000, 0.000000000, 0.000000000, 0.000000000, 0.000000000, 0.000000000, 0.000000000, 0.000000000, 0.000000000, 0.000000000, 0.000000000, 0.000000000, 0.000000000, 0.000000000, 0.000000000, 0.000000000, 0.000000000, 0.000000000, 0.000000000, 0.000000000, 0.000000000, 0.000000000, 0.000000000, 0.000000000, 0.000000000, 0.000000000, 0.000000000, 0.000000000, 0.000000000, 0.000000000, 0.000000000, 0.000000000, 0.000000000, 0.000000000, 0.000000000, 0.000000000, 0.000000000, 0.000000000, 0.000000000, 0.000000000, 0.000000000, 0.000000000, 0.000000000, 0.000000000, 0.000000000, 0.000000000, 0.000000000, 0.000000000, 0.000000000, 0.000000000, 0.000000000, 0.000000000, 0.000000000, 0.000000000, 0.000000000, 0.000000000, 0.000000000, 0.000000000, 0.000000000, 0.000000000, 0.000000000, 0.000000000, 0.000000000, 0.000000000, 0.000000000
act 1.1332447 0.2139508 0.2124018 0.0185272 0 0 100 1.000000e+00, 2.000000e+00, 3.000000e+00, 4.000000e+00, 5.000000e+00, 6.000000e+00, 7.000000e+00, 8.000000e+00, 9.000000e+00, 1.000000e+01, 1.100000e+01, 1.200000e+01, 1.300000e+01, 1.400000e+01, 1.500000e+01, 1.600000e+01, 1.700000e+01, 1.800000e+01, 1.900000e+01, 2.000000e+01, 2.100000e+01, 2.200000e+01, 2.300000e+01, 2.400000e+01, 2.500000e+01, 2.600000e+01, 2.700000e+01, 2.800000e+01, 2.900000e+01, 3.000000e+01, 3.100000e+01, 3.200000e+01, 3.300000e+01, 3.400000e+01, 3.500000e+01, 3.600000e+01, 3.700000e+01, 3.800000e+01, 3.900000e+01, 4.000000e+01, 4.100000e+01, 4.200000e+01, 4.300000e+01, 4.400000e+01, 4.500000e+01, 4.600000e+01, 4.700000e+01, 4.800000e+01, 4.900000e+01, 5.000000e+01, 5.100000e+01, 5.200000e+01, 5.300000e+01, 5.400000e+01, 5.500000e+01, 5.600000e+01, 5.700000e+01, 5.800000e+01, 5.900000e+01, 6.000000e+01, 6.100000e+01, 6.200000e+01, 6.300000e+01, 6.400000e+01, 6.500000e+01, 6.600000e+01, 6.700000e+01, 6.800000e+01, 6.900000e+01, 7.000000e+01, 7.100000e+01, 7.200000e+01, 7.300000e+01, 7.400000e+01, 7.500000e+01, 7.600000e+01, 7.700000e+01, 7.800000e+01, 7.900000e+01, 8.000000e+01, 8.100000e+01, 8.200000e+01, 8.300000e+01, 8.400000e+01, 8.500000e+01, 8.600000e+01, 8.700000e+01, 8.800000e+01, 8.900000e+01, 9.000000e+01, 9.100000e+01, 9.200000e+01, 9.300000e+01, 9.400000e+01, 9.500000e+01, 9.600000e+01, 9.700000e+01, 9.800000e+01, 9.900000e+01, 1.000000e+02, 1.161890e+00, 9.510237e-01, 1.531873e+00, 1.168036e+00, 1.427974e+00, 1.114688e+00, 1.214504e+00, 1.286977e+00, 1.333260e+00, 1.151459e+00, 1.213965e+00, 1.291296e+00, 1.602970e+00, 1.134282e+00, 1.207718e+00, 1.391813e+00, 8.720775e-01, 1.215410e+00, 1.297785e+00, 1.173796e+00, 1.229811e+00, 1.058476e+00, 1.356880e+00, 9.633601e-01, 9.711665e-01, 9.993775e-01, 1.250452e+00, 9.087154e-01, 9.687379e-01, 1.054715e+00, 9.277191e-01, 8.743800e-01, 1.121275e+00, 1.345567e+00, 1.166824e+00, 8.772872e-01, 1.250742e+00, 8.469607e-01, 1.051227e+00, 9.259948e-01, 7.559175e-01, 9.831762e-01, 1.436852e+00, 9.537491e-01, 1.280757e+00, 1.513377e+00, 9.416026e-01, 9.963292e-01, 1.207747e+00, 8.439840e-01, 8.642505e-01, 1.067923e+00, 1.185744e+00, 1.040262e+00, 9.971150e-01, 8.834116e-01, 1.389878e+00, 1.122666e+00, 1.763510e+00, 1.087330e+00, 1.026722e+00, 1.385529e+00, 1.272421e+00, 1.440875e+00, 1.172556e+00, 1.013668e+00, 1.328837e+00, 1.148279e+00, 1.328457e+00, 9.360228e-01, 8.092242e-01, 8.213415e-01, 8.379929e-01, 1.303506e+00, 9.557648e-01, 7.655339e-01, 1.103105e+00, 1.480438e+00, 1.334040e+00, 1.206263e+00, 1.063075e+00, 1.336763e+00, 8.552486e-01, 8.099814e-01, 1.232945e+00, 6.837383e-01, 1.077883e+00, 1.354077e+00, 1.432227e+00, 1.056284e+00, 1.401764e+00, 1.402813e+00, 9.886038e-01, 1.149502e+00, 1.349647e+00, 1.063592e+00, 8.557067e-01, 1.301542e+00, 9.681676e-01, 1.062291e+00, 2.408345e-01, 1.825160e-01, 2.016288e-01, 1.950689e-01, 2.254020e-01, 1.914020e-01, 2.225619e-01, 2.047731e-01, 2.412793e-01, 2.337891e-01, 2.261768e-01, 2.334471e-01, 2.160795e-01, 2.227395e-01, 1.870092e-01, 1.901543e-01, 1.977794e-01, 2.108647e-01, 1.986827e-01, 1.847247e-01, 2.158392e-01, 2.236380e-01, 1.450263e-01, 2.199886e-01, 2.180310e-01, 2.160496e-01, 2.042137e-01, 1.900128e-01, 1.792444e-01, 2.514206e-01, 2.190488e-01, 2.082976e-01, 2.172540e-01, 2.033391e-01, 1.941317e-01, 2.147065e-01, 2.044281e-01, 2.244917e-01, 2.102160e-01, 2.002260e-01, 1.870049e-01, 1.966502e-01, 1.965279e-01, 1.954548e-01, 2.061696e-01, 2.076970e-01, 2.002798e-01, 2.108795e-01, 2.091460e-01, 2.198779e-01, 2.061189e-01, 2.140846e-01, 2.181066e-01, 2.253518e-01, 2.111417e-01, 2.071644e-01, 2.076114e-01, 1.913809e-01, 2.048585e-01, 2.117144e-01, 2.300998e-01, 1.896585e-01, 2.321527e-01, 2.585928e-01, 2.134509e-01, 2.199461e-01, 2.235916e-01, 2.360129e-01, 2.188281e-01, 2.056025e-01, 2.403316e-01, 2.005098e-01, 2.297408e-01, 2.270725e-01, 2.029802e-01, 1.936782e-01, 2.132474e-01, 1.987873e-01, 2.003374e-01, 2.160406e-01, 2.647987e-01, 2.221555e-01, 2.157361e-01, 2.199534e-01, 2.262480e-01, 2.032266e-01, 2.271998e-01, 2.163704e-01, 2.407706e-01, 1.938467e-01, 2.298422e-01, 2.088957e-01, 2.117437e-01, 2.092856e-01, 1.952765e-01, 2.184966e-01, 2.352880e-01, 2.560147e-01, 2.232228e-01, 1.774091e-01, 4.824431e+00, 5.210631e+00, 7.597493e+00, 5.987815e+00, 6.335234e+00, 5.823807e+00, 5.456929e+00, 6.284897e+00, 5.525797e+00, 4.925204e+00, 5.367327e+00, 5.531429e+00, 7.418426e+00, 5.092414e+00, 6.458068e+00, 7.319388e+00, 4.409344e+00, 5.763934e+00, 6.531948e+00, 6.354296e+00, 5.697812e+00, 4.732989e+00, 9.356097e+00, 4.379136e+00, 4.454260e+00, 4.625686e+00, 6.123252e+00, 4.782390e+00, 5.404565e+00, 4.195021e+00, 4.235217e+00, 4.197745e+00, 5.161123e+00, 6.617356e+00, 6.010476e+00, 4.085984e+00, 6.118247e+00, 3.772792e+00, 5.000702e+00, 4.624748e+00, 4.042233e+00, 4.999621e+00, 7.311184e+00, 4.879640e+00, 6.212150e+00, 7.286466e+00, 4.701436e+00, 4.724639e+00, 5.774661e+00, 3.838422e+00, 4.192972e+00, 4.988321e+00, 5.436534e+00, 4.616169e+00, 4.722493e+00, 4.264303e+00, 6.694611e+00, 5.866132e+00, 8.608428e+00, 5.135836e+00, 4.462073e+00, 7.305388e+00, 5.480963e+00, 5.571982e+00, 5.493332e+00, 4.608712e+00, 5.943144e+00, 4.865325e+00, 6.070779e+00, 4.552585e+00, 3.367116e+00, 4.096265e+00, 3.647559e+00, 5.740483e+00, 4.708661e+00, 3.952608e+00, 5.172889e+00, 7.447345e+00, 6.658967e+00, 5.583504e+00, 4.014653e+00, 6.017241e+00, 3.964328e+00, 3.682514e+00, 5.449532e+00, 3.364412e+00, 4.744207e+00, 6.258143e+00, 5.948511e+00, 5.449070e+00, 6.098809e+00, 6.715376e+00, 4.668870e+00, 5.492506e+00, 6.911466e+00, 4.867771e+00, 3.636848e+00, 5.083858e+00, 4.337226e+00, 5.987806e+00, 3.476050e-06, 6.257069e-07, 3.255126e-12, 1.560461e-08, 2.729991e-09, 3.486412e-08, 2.008058e-07, 3.525961e-09, 1.453061e-07, 2.240418e-06, 3.047645e-07, 1.414971e-07, 8.744815e-12, 1.067127e-06, 1.455682e-09, 1.504071e-11, 1.990439e-05, 4.660660e-08, 9.942798e-10, 2.477195e-09, 6.409066e-08, 5.151539e-06, 1.300584e-16, 2.250579e-05, 1.656403e-05, 8.121735e-06, 7.959339e-09, 4.167752e-06, 2.563808e-07, 4.698375e-05, 4.008423e-05, 4.648245e-05, 7.832011e-07, 6.381593e-10, 1.395038e-08, 7.190075e-05, 8.161020e-09, 2.334658e-04, 1.605994e-06, 8.153875e-06, 8.509752e-05, 1.613708e-06, 1.572960e-11, 2.734619e-06, 5.093601e-09, 1.799937e-11, 5.893684e-06, 5.338634e-06, 4.425034e-08, 1.834209e-04, 4.736448e-05, 1.696496e-06, 2.208918e-07, 8.453531e-06, 5.387773e-06, 3.570910e-05, 4.262447e-10, 2.836662e-08, 1.045056e-14, 8.779046e-07, 1.604098e-05, 1.623494e-11, 1.794187e-07, 1.168079e-07, 1.692953e-07, 8.722623e-06, 1.944856e-08, 2.910620e-06, 1.034148e-08, 1.103061e-05, 9.696377e-04, 6.909634e-05, 3.668919e-04, 5.219403e-08, 5.715140e-06, 1.196999e-04, 7.425964e-07, 7.459797e-12, 5.136301e-10, 1.105978e-07, 9.457242e-05, 1.349080e-08, 1.145116e-04, 3.237595e-04, 2.078757e-07, 9.784935e-04, 4.910134e-06, 4.037776e-09, 1.894171e-08, 2.083255e-07, 8.993115e-09, 3.822760e-10, 6.767738e-06, 1.699539e-07, 1.356437e-10, 2.879793e-06, 3.811589e-04, 1.108828e-06, 2.666176e-05, 1.560532e-08, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00
diff 0.5710741 0.1996116 0.2106021 0.0175957 0 0 100 1.000000e+00, 2.000000e+00, 3.000000e+00, 4.000000e+00, 5.000000e+00, 6.000000e+00, 7.000000e+00, 8.000000e+00, 9.000000e+00, 1.000000e+01, 1.100000e+01, 1.200000e+01, 1.300000e+01, 1.400000e+01, 1.500000e+01, 1.600000e+01, 1.700000e+01, 1.800000e+01, 1.900000e+01, 2.000000e+01, 2.100000e+01, 2.200000e+01, 2.300000e+01, 2.400000e+01, 2.500000e+01, 2.600000e+01, 2.700000e+01, 2.800000e+01, 2.900000e+01, 3.000000e+01, 3.100000e+01, 3.200000e+01, 3.300000e+01, 3.400000e+01, 3.500000e+01, 3.600000e+01, 3.700000e+01, 3.800000e+01, 3.900000e+01, 4.000000e+01, 4.100000e+01, 4.200000e+01, 4.300000e+01, 4.400000e+01, 4.500000e+01, 4.600000e+01, 4.700000e+01, 4.800000e+01, 4.900000e+01, 5.000000e+01, 5.100000e+01, 5.200000e+01, 5.300000e+01, 5.400000e+01, 5.500000e+01, 5.600000e+01, 5.700000e+01, 5.800000e+01, 5.900000e+01, 6.000000e+01, 6.100000e+01, 6.200000e+01, 6.300000e+01, 6.400000e+01, 6.500000e+01, 6.600000e+01, 6.700000e+01, 6.800000e+01, 6.900000e+01, 7.000000e+01, 7.100000e+01, 7.200000e+01, 7.300000e+01, 7.400000e+01, 7.500000e+01, 7.600000e+01, 7.700000e+01, 7.800000e+01, 7.900000e+01, 8.000000e+01, 8.100000e+01, 8.200000e+01, 8.300000e+01, 8.400000e+01, 8.500000e+01, 8.600000e+01, 8.700000e+01, 8.800000e+01, 8.900000e+01, 9.000000e+01, 9.100000e+01, 9.200000e+01, 9.300000e+01, 9.400000e+01, 9.500000e+01, 9.600000e+01, 9.700000e+01, 9.800000e+01, 9.900000e+01, 1.000000e+02, 3.246012e-01, 2.893143e-01, 8.689278e-01, 5.698067e-01, 7.743041e-01, 6.225287e-01, 8.006803e-01, 6.434293e-01, 5.409099e-01, 5.784629e-01, 4.742925e-01, 5.741781e-01, 1.838937e-01, 7.300934e-01, 4.641532e-01, 1.805039e-01, 4.967181e-01, 6.641502e-01, 7.620235e-01, 5.457396e-01, 4.901621e-01, 4.838264e-01, 5.150443e-01, 9.674179e-01, 8.235325e-01, 6.355039e-01, 2.863909e-01, 5.766090e-01, 6.492351e-01, 9.611274e-01, 1.119014e+00, 7.711861e-01, 6.464494e-01, 8.948668e-01, 2.575521e-01, 3.766907e-01, 6.987790e-01, 7.111517e-01, 2.493615e-01, 3.825398e-01, 5.702151e-01, 8.653591e-01, 2.303253e-01, 7.732799e-01, 8.369010e-01, 5.712395e-01, 4.539589e-01, 6.971495e-01, 5.451095e-01, 6.715079e-01, 8.581516e-01, 2.412936e-01, 4.519586e-01, 4.728542e-01, 7.134500e-01, 4.492036e-01, 2.640546e-01, 4.906019e-01, 5.039532e-01, 5.809863e-01, 4.457431e-01, 5.331003e-01, 6.059708e-01, 2.294155e-01, 4.753821e-01, 7.845766e-01, 5.074350e-01, 4.429216e-01, 6.053383e-01, 5.883815e-01, 2.989995e-01, 6.023684e-01, 8.796604e-01, 5.285627e-01, 4.249913e-01, 6.180380e-01, 5.097948e-01, 4.503679e-01, 1.864254e-01, 7.035571e-01, 5.893707e-01, 6.321878e-01, 4.795632e-01, 6.118064e-01, 7.833689e-01, 9.672520e-01, 4.378106e-01, 7.598246e-01, 5.127376e-01, 2.491865e-01, 5.587415e-01, 4.440748e-01, 6.865879e-01, 3.818002e-01, 7.314961e-01, 5.196449e-01, 2.672751e-01, 8.171345e-01, 6.717436e-01, 7.580660e-01, 1.959517e-01, 2.128008e-01, 2.131264e-01, 1.893776e-01, 2.359497e-01, 1.890032e-01, 2.178842e-01, 2.055488e-01, 2.348231e-01, 1.999380e-01, 2.086115e-01, 2.177383e-01, 2.089649e-01, 1.869711e-01, 2.001591e-01, 2.235183e-01, 2.051270e-01, 2.058829e-01, 1.944399e-01, 2.362190e-01, 2.005263e-01, 2.116271e-01, 1.701502e-01, 2.018453e-01, 2.062283e-01, 2.151352e-01, 2.064885e-01, 2.005797e-01, 2.122966e-01, 2.414922e-01, 2.053123e-01, 2.466282e-01, 1.925316e-01, 2.357688e-01, 2.032163e-01, 2.100518e-01, 1.967684e-01, 2.168556e-01, 2.093492e-01, 1.979881e-01, 2.080753e-01, 1.944533e-01, 2.066066e-01, 2.133405e-01, 2.258225e-01, 2.225584e-01, 2.009501e-01, 2.250866e-01, 1.850492e-01, 2.152186e-01, 2.357959e-01, 1.972409e-01, 2.074083e-01, 1.883527e-01, 2.122509e-01, 2.217175e-01, 2.165840e-01, 1.637836e-01, 1.746243e-01, 2.172826e-01, 2.504736e-01, 2.056692e-01, 2.153213e-01, 2.133059e-01, 1.977346e-01, 1.990343e-01, 2.303238e-01, 2.086387e-01, 1.937300e-01, 1.830158e-01, 1.914583e-01, 1.886278e-01, 2.243653e-01, 2.178644e-01, 2.177891e-01, 1.986443e-01, 2.307676e-01, 2.172908e-01, 2.069021e-01, 2.291324e-01, 2.834081e-01, 2.028696e-01, 2.341172e-01, 2.130240e-01, 2.271991e-01, 2.257103e-01, 1.970276e-01, 2.303823e-01, 2.189541e-01, 2.073916e-01, 2.039911e-01, 1.940834e-01, 2.014540e-01, 2.049175e-01, 2.150436e-01, 2.228330e-01, 2.227401e-01, 2.328953e-01, 2.014864e-01, 2.055145e-01, 1.656537e+00, 1.359554e+00, 4.077054e+00, 3.008840e+00, 3.281649e+00, 3.293746e+00, 3.674797e+00, 3.130300e+00, 2.303478e+00, 2.893211e+00, 2.273568e+00, 2.637010e+00, 8.800217e-01, 3.904845e+00, 2.318921e+00, 8.075573e-01, 2.421515e+00, 3.225864e+00, 3.919070e+00, 2.310312e+00, 2.444378e+00, 2.286221e+00, 3.026998e+00, 4.792869e+00, 3.993306e+00, 2.953975e+00, 1.386959e+00, 2.874712e+00, 3.058152e+00, 3.979952e+00, 5.450301e+00, 3.126917e+00, 3.357627e+00, 3.795526e+00, 1.267379e+00, 1.793323e+00, 3.551276e+00, 3.279379e+00, 1.191127e+00, 1.932135e+00, 2.740426e+00, 4.450215e+00, 1.114801e+00, 3.624628e+00, 3.706012e+00, 2.566695e+00, 2.259063e+00, 3.097251e+00, 2.945754e+00, 3.120120e+00, 3.639382e+00, 1.223344e+00, 2.179077e+00, 2.510473e+00, 3.361352e+00, 2.026018e+00, 1.219178e+00, 2.995428e+00, 2.885928e+00, 2.673874e+00, 1.779602e+00, 2.592027e+00, 2.814263e+00, 1.075523e+00, 2.404142e+00, 3.941917e+00, 2.203137e+00, 2.122911e+00, 3.124649e+00, 3.214922e+00, 1.561695e+00, 3.193423e+00, 3.920662e+00, 2.426109e+00, 1.951389e+00, 3.111280e+00, 2.209127e+00, 2.072650e+00, 9.010322e-01, 3.070527e+00, 2.079583e+00, 3.116228e+00, 2.048389e+00, 2.872006e+00, 3.447941e+00, 4.285369e+00, 2.222078e+00, 3.298103e+00, 2.341758e+00, 1.201526e+00, 2.739049e+00, 2.288062e+00, 3.408161e+00, 1.863190e+00, 3.401617e+00, 2.331993e+00, 1.199942e+00, 3.508592e+00, 3.333940e+00, 3.688625e+00, 9.974614e-02, 1.760528e-01, 7.442446e-05, 3.086523e-03, 1.289197e-03, 1.238655e-03, 3.328485e-04, 2.106914e-03, 2.265393e-02, 4.393671e-03, 2.444042e-02, 9.263153e-03, 3.802840e-01, 1.432502e-04, 2.177724e-02, 4.206503e-01, 1.667422e-02, 1.548132e-03, 1.358112e-04, 2.226223e-02, 1.569322e-02, 2.367017e-02, 2.917334e-03, 3.983826e-06, 1.025886e-04, 3.654151e-03, 1.675539e-01, 4.644635e-03, 2.646843e-03, 1.079280e-04, 2.071293e-07, 2.129759e-03, 1.001058e-03, 2.148204e-04, 2.070239e-01, 7.497716e-02, 5.154716e-04, 1.298894e-03, 2.355234e-01, 5.526614e-02, 6.896887e-03, 1.684117e-05, 2.667548e-01, 3.980752e-04, 2.975092e-04, 1.126664e-02, 2.535039e-02, 2.340153e-03, 3.747032e-03, 2.176357e-03, 3.777367e-04, 2.231571e-01, 3.091872e-02, 1.313952e-02, 9.886100e-04, 4.457182e-02, 2.247292e-01, 3.217240e-03, 4.490954e-03, 8.346558e-03, 7.720740e-02, 1.050394e-02, 5.558907e-03, 2.839025e-01, 1.745564e-02, 1.246266e-04, 2.914157e-02, 3.543658e-02, 2.145203e-03, 1.604284e-03, 1.205100e-01, 1.720175e-03, 1.350018e-04, 1.647284e-02, 5.291195e-02, 2.238366e-03, 2.871326e-02, 3.995107e-02, 3.690450e-01, 2.545973e-03, 3.930043e-02, 2.203462e-03, 4.230109e-02, 4.682422e-03, 7.370343e-04, 3.283033e-05, 2.780575e-02, 1.220911e-03, 2.053544e-02, 2.314792e-01, 6.924418e-03, 2.355990e-02, 8.440598e-04, 6.443084e-02, 8.630032e-04, 2.105860e-02, 2.320924e-01, 5.980678e-04, 1.083695e-03, 3.167294e-04, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00

You’ll notice, compared to above, the power is somewhat reduced for the other three fixed effects when not modeling the numCourse variable. You can also build in the lm_fit_mod argument into the design via the terms_vary argument.

fixed <- ~ 1 + act + diff + numCourse + act:numCourse
fixed_param <- c(0.5, 1.1, 0.6, 0.9, 1.1)
cov_param <- list(dist_fun = c('rnorm', 'rnorm', 'rnorm'),
                  var_type = c("single", "single", "single"),
                  opts = list(list(mean = 0, sd = 2),
                              list(mean = 0, sd = 2),
                              list(mean = 0, sd = 1)))
n <- 150
error_var <- 20
with_err_gen <- 'rnorm'
pow_param <- c('(Intercept)', 'act', 'diff', 'numCourse')
alpha <- .01
pow_dist <- "t"
pow_tail <- 2
replicates <- 100

terms_vary <- list(n = c(20, 40, 60, 80, 100), error_var = c(5, 10, 20),
                   fixed_param = list(c(0.5, 1.1, 0.6, 0.9, 1.1), 
                                      c(0.6, 1.1, 0.6, 0.9, 1.1)),
                lm_fit_mod = list(sim_data ~ 1 + act + diff, 
                                  sim_data ~ 1 + act)
)

power_out <- sim_pow(fixed = fixed, fixed_param = fixed_param, 
                     cov_param = cov_param, n = n, error_var = error_var,
                     with_err_gen = with_err_gen, data_str = "single",
                     pow_param = pow_param, alpha = alpha,
                     pow_dist = pow_dist, pow_tail = pow_tail, 
                     replicates = replicates, terms_vary = terms_vary)
head(power_out)
## # A tibble: 6 x 13
## # Groups:   term, n, error_var, fixed_param [3]
##   term       n error_var fixed_param lm_fit_mod avg_test_stat sd_test_stat
##   <chr>  <dbl>     <dbl> <fct>       <fct>              <dbl>        <dbl>
## 1 (Inte~  20.0      5.00 0.5,1.1,0.~ ~,sim_dat~         0.552        0.842
## 2 (Inte~  20.0      5.00 0.5,1.1,0.~ ~,sim_dat~         0.513        0.841
## 3 (Inte~  20.0      5.00 0.6,1.1,0.~ ~,sim_dat~         0.503        0.749
## 4 (Inte~  20.0      5.00 0.6,1.1,0.~ ~,sim_dat~         0.578        0.727
## 5 (Inte~  20.0     10.0  0.5,1.1,0.~ ~,sim_dat~         0.427        0.904
## 6 (Inte~  20.0     10.0  0.5,1.1,0.~ ~,sim_dat~         0.479        1.06 
## # ... with 6 more variables: avg_std_err <dbl>, sd_std_err <dbl>,
## #   power <dbl>, num_reject <dbl>, num_repl <dbl>, data <list>

Nested Data

Extending the power analysis to nested data is fairly straightforward. Below is a three level example

fixed <- ~1 + time + diff + act + actClust + time:act
random <- ~1 + time
random3 <- ~ 1 + time
fixed_param <- c(4, 2, 6, 2.3, 7, 0)
random_param <- list(random_var = c(7, 4), rand_gen = 'rnorm')
random_param3 <- list(random_var = c(4, 2), rand_gen = 'rnorm')
cov_param <- list(dist_fun = c('rnorm', 'rnorm', 'rnorm'),
                  var_type = c("level1", "level2", "level3"),
                  opts = list(list(mean = 0, sd = 1.5),
                              list(mean = 0, sd = 4),
                              list(mean = 0, sd = 2)))
k <- 10
n <- 45
p <- 8
error_var <- 4
with_err_gen <- 'rnorm'
data_str <- "long"
pow_param <- c('time', 'diff', 'act', 'actClust')
alpha <- .01
pow_dist <- "z"
pow_tail <- 2
replicates <- 3
power_out <- sim_pow(fixed = fixed, random = random, random3 = random3,
                     fixed_param = fixed_param,
                     random_param = random_param, 
                     random_param3 = random_param3,
                     cov_param = cov_param,
                     k = k, n = n, p = p,
                     error_var = error_var, with_err_gen = "rnorm",
                     data_str = data_str, 
                     unbal = list(level2 = FALSE, level3 = FALSE),
                     pow_param = pow_param, alpha = alpha,
                     pow_dist = pow_dist, pow_tail = pow_tail, 
                     replicates = replicates)
head(power_out)
term avg_test_stat sd_test_stat avg_std_err sd_std_err power num_reject num_repl data
act 2.320041 0.0411618 0.0335640 0.0020501 0.0000000 0 3 2.29607582, 2.36757018, 2.29647771, 0.03186448, 0.03298674, 0.03584088, 72.05752424, 71.77339152, 64.07425539, 0.00000000, 0.00000000, 0.00000000
actClust 6.943790 0.5342803 0.3156075 0.0889217 1.0000000 3 3 6.9053497, 7.4962526, 6.4297684, 0.3240727, 0.2227559, 0.3999939, 21.3080261, 33.6523213, 16.0746663, 1.0000000, 1.0000000, 1.0000000
diff 5.993633 0.0181422 0.0250004 0.0006943 1.0000000 3 3 6.01345832, 5.98958362, 5.97785830, 0.02426728, 0.02508600, 0.02564794, 247.80108249, 238.76201248, 233.07363449, 1.00000000, 1.00000000, 1.00000000
time 2.579477 0.3018169 0.3967801 0.1692804 0.3333333 1 3 2.9258058, 2.3726119, 2.4400136, 0.5339253, 0.2075873, 0.4488276, 5.4798032, 11.4294658, 5.4364159, 1.0000000, 0.0000000, 0.0000000

Generalized Power Analysis

fixed <- ~ 1 + act + diff
fixed_param <- c(0.1, 0.5, 0.3)
cov_param <- list(dist_fun = c('rnorm', 'rnorm'),
                  var_type = c("single", "single"),
                  opts = list(list(mean = 0, sd = 2),
                              list(mean = 0, sd = 4)))
n <- 50
pow_param <- c('(Intercept)', 'act', 'diff')
alpha <- .01
pow_dist <- "z"
pow_tail <- 2
replicates <- 10

power_out <- sim_pow_glm(fixed = fixed, fixed_param = fixed_param, 
                         cov_param = cov_param, 
                         n = n, data_str = "single", 
                         outcome_type = 'logistic',
                         pow_param = pow_param, alpha = alpha,
                         pow_dist = pow_dist, pow_tail = pow_tail, 
                         replicates = replicates)
head(power_out)
term avg_test_stat sd_test_stat avg_std_err sd_std_err power num_reject num_repl data
(Intercept) 0.2352793 0.4633512 0.3747019 0.0432934 0 0 10 0.48545764, 0.10048261, 1.11471840, 0.04703883, -0.06584406, 0.82109569, 0.34616522, 0.10808744, -0.26660185, -0.33780707, 0.33901173, 0.35134671, 0.43769449, 0.33601605, 0.36147260, 0.40856452, 0.33322827, 0.34078947, 0.39309635, 0.44579868, 1.43197888, 0.28599274, 2.54679561, 0.13998983, -0.18215506, 2.00970874, 1.03882309, 0.31716778, -0.67820993, -0.75775700, 0.15214987, 0.77488368, 0.01087171, 0.88866803, 0.85546104, 0.04446202, 0.29888702, 0.75111630, 0.49763860, 0.44859647, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000
act 0.5173795 0.2076280 0.2154106 0.0372221 0 0 10 0.380412998, 0.582676391, 0.604967625, 0.280902798, 0.686331780, 0.278106048, 0.327583864, 0.507477224, 0.934595150, 0.590741037, 0.196594575, 0.214715499, 0.234314404, 0.179753336, 0.249737868, 0.169402387, 0.198449143, 0.185204388, 0.290055553, 0.235878348, 1.935012695, 2.713713694, 2.581862721, 1.562712577, 2.748208688, 1.641689077, 1.650719466, 2.740092874, 3.222124663, 2.504430961, 0.052988738, 0.006653364, 0.009826867, 0.118120215, 0.005992186, 0.100654457, 0.098795871, 0.006142183, 0.001272438, 0.012264854, 0.000000000, 0.000000000, 0.000000000, 0.000000000, 0.000000000, 0.000000000, 0.000000000, 0.000000000, 0.000000000, 0.000000000
diff 0.3390305 0.0757709 0.1122846 0.0184731 0 0 10 0.2276863231, 0.3401228559, 0.3483950820, 0.3124679443, 0.3127391671, 0.3766316880, 0.2994529731, 0.2806165661, 0.3810212242, 0.5111706984, 0.0841449161, 0.1043406191, 0.1404530510, 0.1002244772, 0.1024252562, 0.1095823464, 0.0999277560, 0.1135617896, 0.1282871925, 0.1398982148, 2.7058832976, 3.2597358423, 2.4805091773, 3.1176809600, 3.0533403454, 3.4369741153, 2.9966946619, 2.4710474103, 2.9700644051, 3.6538757772, 0.0068122981, 0.0011151602, 0.0131194886, 0.0018228001, 0.0022630911, 0.0005882518, 0.0027292393, 0.0134717957, 0.0029773732, 0.0002583113, 0.0000000000, 0.0000000000, 0.0000000000, 0.0000000000, 0.0000000000, 0.0000000000, 0.0000000000, 0.0000000000, 0.0000000000, 0.0000000000

Vary Arguments

fixed <- ~ 1 + act + diff
fixed_param <- c(0.1, 0.5, 0.3)
cov_param <- list(dist_fun = c('rnorm', 'rnorm'),
                  var_type = c("single", "single"),
                  opts = list(list(mean = 0, sd = 5),
                              list(mean = 0, sd = 8)))
n <- NULL
pow_param <- c('(Intercept)', 'act', 'diff')
alpha <- .01
pow_dist <- "z"
pow_tail <- 2
replicates <- 10
terms_vary <- list(n = c(20, 40, 60, 80, 100),
                   fixed_param = list(c(0.5, 0.1, 0.2), 
                                      c(0.6, 0.1, 0.2)))

power_out <- sim_pow_glm(fixed = fixed, fixed_param = fixed_param, 
                         cov_param = cov_param, 
                         n = n, data_str = "single", 
                         outcome_type = 'logistic',
                         pow_param = pow_param, alpha = alpha,
                         pow_dist = pow_dist, pow_tail = pow_tail, 
                         replicates = replicates, terms_vary = terms_vary)
## Warning: glm.fit: algorithm did not converge
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
head(power_out)
## # A tibble: 6 x 11
## # Groups:   term, n [3]
##   term            n fixed_param avg_test_stat sd_test_stat avg_std_err
##   <chr>       <dbl> <fct>               <dbl>        <dbl>       <dbl>
## 1 (Intercept)  20.0 0.5,0.1,0.2        25.8         78.9      8237    
## 2 (Intercept)  20.0 0.6,0.1,0.2         0.203        0.767       0.608
## 3 (Intercept)  40.0 0.5,0.1,0.2         0.708        0.760       0.481
## 4 (Intercept)  40.0 0.6,0.1,0.2         0.806        0.439       0.481
## 5 (Intercept)  60.0 0.5,0.1,0.2         0.456        0.311       0.344
## 6 (Intercept)  60.0 0.6,0.1,0.2         0.667        0.400       0.362
## # ... with 5 more variables: sd_std_err <dbl>, power <dbl>,
## #   num_reject <dbl>, num_repl <dbl>, data <list>