Description Usage Arguments Value Examples
View source: R/em_bivariado_multivariado.R
The function stimulates group data for the multivariate case.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | mult_simul(
mm = c(68, 68),
ss = base::matrix(c(3, 2, 2, 6), 2, 2),
ssdata = array(base::rep(0, 1000 * 2 * 30), c(1000, 2, 30)),
n_data_sets = 30,
breaks_x = c(-Inf, 64, 65, 66, 67, 68, 69, 70, 71, 72, Inf),
breaks_y = c(-Inf, 64.2, 65.2, 66.2, 67.2, 68.2, 69.2, 70.2, 71.2, 72.2, Inf),
lower_x = base::rep(c(-Inf, 64, 65, 66, 67, 68, 69, 70, 71, 72), 10),
lower_y = c(base::rep(-Inf, 10), base::rep(64.2, 10), base::rep(65.2, 10),
base::rep(66.2, 10), base::rep(67.2, 10), base::rep(68.2, 10), base::rep(69.2, 10),
base::rep(70.2, 10), base::rep(71.2, 10), base::rep(72.2, 10)),
upper_x = base::rep(c(64, 65, 66, 67, 68, 69, 70, 71, 72, Inf), 10),
upper_y = c(base::rep(64.2, 10), base::rep(65.2, 10), base::rep(66.2, 10),
base::rep(67.2, 10), base::rep(68.2, 10), base::rep(69.2, 10), base::rep(70.2, 10),
base::rep(71.2, 10), base::rep(72, 2, 10), base::rep(Inf, 10))
)
|
mm |
The vector of mu that we want to simulate from. |
ss |
The covariance matrix for the simulation. |
n_data_sets |
Integer, representa o numero de data sets a serem simulados. |
breaks_x |
Vector of values, represents the intervals that x belongs to. |
breaks_y |
Vector of values, represents the intervals that y belongs to. |
lower_x |
Vector of values, the lower bounds of x. |
lower_y |
Vector of values, the lower bounds of y. |
upper_x |
Vector of values, the upper bounds of x. |
upper_y |
Vector of values, the upper bounds of y. |
Return a list where each element is a simulation of multivariate data.
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 27 28 29 30 31 32 33 34 35 36 37 38 39 | library(MASS)
library(em.univ)
library(tmvtnorm)
simulateddata = em.univ::mult_simul(mm = c(68,68),
ss = base::matrix(c(3,2,2,6),2,2) ,
n_data_sets = 1,
breaks_x = c(-Inf,64,65,66,67,68,69,70,71,72,Inf),
breaks_y = c(-Inf,64.2,65.2,66.2,
67.2,68.2,69.2,70.2,
71.2,72.2,Inf),
lower_x = base::rep(c(-Inf,64,65,66,67,
68,69,70,71,72),10),
lower_y = c(base::rep(-Inf,10),
base::rep(64.2,10),
base::rep(65.2,10),
base::rep(66.2,10),
base::rep(67.2,10),
base::rep(68.2,10),
base::rep(69.2,10),
base::rep(70.2,10),
base::rep(71.2,10),
base::rep(72.2,10)),
upper_x = base::rep(c(64,65,66,67,68,69,70,
71,72,Inf),10),
upper_y = c(base::rep(64.2,10),
base::rep(65.2,10),
base::rep(66.2,10),
base::rep(67.2,10),
base::rep(68.2,10),
base::rep(69.2,10),
base::rep(70.2,10),
base::rep(71.2,10),
base::rep(72,2,10),
base::rep(Inf,10))
)
simulateddata
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.