Learn R Programming

pmclust (version 0.1-1)

generate.basic.worker: Generate basic examples for testing

Description

This function will generate a small set of data for testing algorithms.

Usage

generate.basic.worker(N.allworkers, N.worker, N.K.worker,
                        N, p, K, seed)

Arguments

N.allworkers
a collection of sample sizes for all $S$ processors, i.e. a vector of length $S$.
N.worker
total sample size of given processor.
N.K.worker
sample size of each clusters given processor, i.e. sum over N.K.worker is N.worker, a vector of length $K$.
N
total sample size across all $S$ processors, i.e. sum over N.worker is N.
p
dimension of data X.worker, i.e. ncol(X.worker).
K
number of clusters.
seed
a seed for random numbers and processor's rank will be added later.

Value

  • A set of simulated data and information will be returned in a list variable including: ll{K number of clusters, as the input p dimension of data X.worker, as the input N total sample size, as the input N.allworkers a collection of sample sizes for all $S$ processors, as the input N.worker total sample size of given processor, as the input N.K.worker sample size of each clusters given processor, as the input seed a seed for random numbers, as the input X.worker generated data set with dimension with dimension N.worker * p CLASS.worker true id of each data, a vector of length N.worker and has values from 1 to K N.CLASS.worker true sample size of each clusters, a vector of length K }

Details

For all $S$ processors, this function will generate in total $N$ observations from $K$ clusters in $p$ dimensions.

The clusters centers and dispersions are generated automatically inside the code. Currently, it is not allowed for users to change, but it is not difficult to specify them by mimicking this code.

References

High Performance Statistical Computing Website: http://thirteen-01.stat.iastate.edu/snoweye/hpsc/

See Also

em.step.worker, aecm.step.worker, apecm1.step.worker, apecm2.step.worker.

Examples

Run this code
# Examples can be found in the help pages of em.step.worker(),
# aecm.step.worker(), apecm1.step.worker(), and apecm2.step.worker().

Run the code above in your browser using DataLab