re: Univariate random effects

Description Usage Arguments Details Value Author(s) Examples

Description

function description.

Usage

1
re(x, sigma, groups, size = NULL, q = 1, replace = TRUE)

Arguments

x

factor vector to evaluate the random effect

sigma

variance of the random effect

groups

character vector to name the levels of x or a numeric value indicating the number of groups of x

size

numeric value to simulate the covariate x

q

number of response varables to replicate

replace

An optional argument to simulate an independent random effect with one repetition (e.g. mre(groups = 100, size = 100, replace = FALSE))

Details

details.

Value

return.

Author(s)

Erick A. Chacón-Montalván

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
(x <- re(groups = 5, size = 15))
re(x, sigma = 10)

(x <- re(groups = 15, size = 15, replace = FALSE))
re(x, sigma = 1)

(x <- re(groups = 2, size = 5, q = 2))
re(x, sigma = 10)

(x <- 1:10)
re(x, sigma = 10)

ErickChacon/datasim documentation built on March 25, 2020, 7:53 p.m.