Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/Simulation.default.r

Simulates an (x,y) sample (suitable for estimating a lm) which can be either non linear/heteroscedastic/non normal or in line with standard lm assumptions

1 | ```
Simulation.default(model.to.sim)
``` |

`model.to.sim` |
an integer between 1 and 4 where 1=non linearity; 2=heteroscedasticity; 3=non normality; 4=no violation |

The sample size is simulated between 10 and 1000 according to a uniform distribution. The explanatory variable is simulated as uniform, Gaussian, chi.square, t or a mixture of normal distributions. If non linearity or heteroscedasticity is chosen a random regression function or variance function is defined, if non normality is chosen the (always additive) error is simulated from a chi.square, t, Beta or truncated normal.#'

A list of objects (of which the first two are essential, the following are needed to display the correct solution in the shiny app)

`x,y` |
the sample |

`my` |
the true mean of Y |

`sderr` |
the true standard deviation of errors |

`errore` |
the errors |

`xperdens,ferrore` |
coordinates of points of the true density of errors |

Francesco Pauli, francesco.pauli@deams.units.it

`ComputerDecision.default`

, `checksim`

1 2 3 | ```
Simulation.default(1)
Simulation.default(sample(1:4,1))
``` |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.