| sim | R Documentation |
Simulates the experiment of drawing from a sample space.
Simulates the experiment of drawing from a sample space.
Simulates the experiment of drawing from a sample space.
sim(x, ...)
## Default S3 method:
sim(x, ntrials, ...)
## S3 method for class 'ps'
sim(x, ntrials, ...)
x |
a probability space or a subset of one. |
... |
further arguments to be passed to or from other methods. |
ntrials |
number of times to repeat the experiment. |
The sim() function is a wrapper for sample(), except that it strips the probs component from the result and (if x is a data frame) renames the rownames of the data frame consecutively from 1:ntrials.
The sim() function is a wrapper for sample(), except that it strips the probs component from the result and (if x is a data frame) renames the rownames of the data frame consecutively from 1:ntrials.
The sim() function is a wrapper for sample(), except that it strips the probs component from the result and (if x is a data frame) renames the rownames of the data frame consecutively from 1:ntrials.
A data frame if space is a data frame, or a list if space is of class ps.
A data frame if space is a data frame, or a list if space is of class ps.
A data frame if space is a data frame, or a list if space is of class ps.
G. Jay Kerns gkerns@ysu.edu.
empirical
empirical
empirical
S <- cards(makespace = TRUE)
sim(S, ntrials = 5)
T <- urnsamples(S, 2)
U <- probspace(T)
sim(U, ntrials = 4)
S <- cards(makespace = TRUE)
sim(S, ntrials = 5)
T <- urnsamples(S, 2)
U <- probspace(T)
sim(U, ntrials = 4)
S <- cards(makespace = TRUE)
sim(S, ntrials = 5)
T <- urnsamples(S, 2)
U <- probspace(T)
sim(U, ntrials = 4)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.