Skip to contents

Each point is placed around its projection using the normal distribution (\(\mu=0\), \(\sigma=\) lat_disp ).

Usage

clupoints_n(projs, lat_disp, line_len, clu_dir, clu_ctr)

Arguments

projs

Point projections on the cluster-supporting line (\(p \times n\) matrix).

lat_disp

Standard deviation for the normal distribution, i.e., cluster lateral dispersion.

line_len

Length of cluster-supporting line (ignored).

clu_dir

Direction of the cluster-supporting line.

clu_ctr

Center position of the cluster-supporting line (ignored).

Value

Generated points (\(p \times n\) matrix).

Details

This function's main intended use is by the main clugen function, generating the final points when the point_dist_fn parameter is set to "n".

Note

This function is stochastic. For reproducibility set a PRNG seed with set.seed.

Examples

set.seed(123)
ctr <- c(0, 0)
dir <- c(1, 0)
pdist <- c(-0.5, -0.2, 0.1, 0.3)
proj <- points_on_line(ctr, dir, pdist)
clupoints_n(proj, 0.01, NA, dir, NA)
#>            [,1]         [,2]
#> [1,] -0.5056048  0.001292877
#> [2,] -0.2023018  0.017150650
#> [3,]  0.1155871  0.004609162
#> [4,]  0.3007051 -0.012650612