sim {UsingR} | R Documentation

## Function to simulate sampling distributions

### Description

A convenient function for simulating sampling distributions

### Usage

    sim(n = 10, m = 250, statistic = "mean", family = "norm", ...)

### Arguments

`n` | size of sample
`m` | number of simulations
`statistic` | character name of statistic. For example "mean" or "median".
`family` | family name of distribution such as "norm", "exp", "unif",...
`...` | named parameter values for the "r" function to find the random samples.

### Value

Returns a data vector of length `m`.

### Author(s)

John Verzani

### Examples

    qqnorm(sim(n=10,family="exp"))
    qqnorm(sim(n=10,family="t",df=3))
    qqnorm(sim(n=10,family="t",statistic="median",df=3))

[Package UsingR version 0.1-4 Index]