simule function

Simulate by bootstrap

Simulate by bootstrap

simule(data, nb.simul)

Arguments

  • data: A data frame from which the rows are the original data from which the simualte data are calculated (by the average of a bootstrap sample. The columns corresponds to the variables for which the simulation should be done. The first column must be a factor allowing to group the rows. A bootstrap simulation is done for each level of this factor.
  • nb.simul: The number of simulations.

Details

The simulation is independently done for each level of the factor. The number of rows can be different for each levels.

Returns

  • mean: Data.frame with all the levels of the factor variable, and for each variable, the mean of the original data.

  • simul: Data.frame with all the levels of the factor variable, and for each variable, the nb.simul bootstrap simulations.

  • simul.mean: Data.frame with all the levels of the factor variable, and for each variable, the mean of the simulated data.

Author(s)

Jeremy Mazet

  • Maintainer: Francois Husson
  • License: GPL (>= 2)
  • Last published: 2024-04-20