[SOLVED] Calculate the mean and stdev for simulations
Posted: Tue Jul 20, 2021 9:47 am
After performing several simulations, we can calculate the mean and standard deviations of all simulations by following commands:
The problem is: for rows of simulations with NA values, their mean and standard deviation become zero
The zero values for NA rows could be misunderstood with the rows of actual zero values.
In my opinion, the value of mean and standard deviation for those NA rows should be NA, not zero.
- Code: Select all
grid.db = db.stat.simu(grid.db,names="Raw.Simu.Gaussian.Z1*",fun="mean")
- Code: Select all
grid.db = db.stat.simu(grid.db,names="Raw.Simu.Gaussian.Z1*",fun="stdv")
The problem is: for rows of simulations with NA values, their mean and standard deviation become zero
The zero values for NA rows could be misunderstood with the rows of actual zero values.
In my opinion, the value of mean and standard deviation for those NA rows should be NA, not zero.