R: Random generation by Montecarlo

montecarlo {agricolae} | R Documentation

## Random generation by Montecarlo

### Description

Random generation form data, use function density and parameters

### Usage

    montecarlo(data, k, ...)

### Arguments

`data` | vector or object(hist, graph.freq)
`k` | number of simulations
`...` | Other parameters of the function density, only if data is vector

### Value

Generates random.

### Author(s)

Felipe de Mendiburu

### See Also

`density`

### Examples

    library(agricolae)
    r<-rnorm(50, 10,2)
    montecarlo(r, k=100, kernel="epanechnikov")
    # other example
    h<-hist(r,plot=FALSE)
    montecarlo(h, k=100)
    # other example
    breaks<-c(0, 150, 200, 250, 300)
    counts<-c(10, 20, 40, 30)
    h<-graph.freq(x=breaks,counts=counts,plot=FALSE)
    montecarlo(h, k=100)

[Package agricolae version 1.2-6 Index]