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

Creates a matrix containing every possible ordered sample under fixed sample size with replacement designs

1 |

`N` |
Population size |

`m` |
Sample size |

`ID` |
By default FALSE, a vector of values (numeric or string) identifying each unit in the population |

The number of samples in a with replacement support is not equal to the number of ordered samples induced by a with replacement sampling design.

The function returns a matrix of *N^m* rows and *m* columns. Each row of this matrix
corresponds to a possible ordered sample.

Hugo Andres Gutierrez Rojas hagutierrezro@gmail.com. The author acknowledges to Hanwen Zhang for valuable suggestions.

Tille, Y. (2006), *Sampling Algorithms*. Springer

Gutierrez, H. A. (2009), *Estrategias de muestreo: Diseno de encuestas y estimacion de parametros*.
Editorial Universidad Santo Tomas

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 | ```
# Vector U contains the label of a population
U <- c("Yves", "Ken", "Erik", "Sharon", "Leslie")
N <- length(U)
# Under this context, there are five (5) possible ordered samples
OrderWR(N,1)
# The same output, but labeled
OrderWR(N,1,ID=U)
# y is the variable of interest
y<-c(32,34,46,89,35)
OrderWR(N,1,ID=y)
# If the smaple size is m=2, there are (25) possible ordered samples
OrderWR(N,2)
# The same output, but labeled
OrderWR(N,2,ID=U)
# y is the variable of interest
y<-c(32,34,46,89,35)
OrderWR(N,2,ID=y)
# Note that the number of ordered samples is not equal to the number of
# samples in a well defined with-replacement support
OrderWR(N,2)
SupportWR(N,2)
OrderWR(N,4)
SupportWR(N,4)
``` |

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.