Learn R Programming

GRAB (version 0.2.2)

GRAB.SimubVec: GRAB: simulate random effect (i.e. bVec) based on family structure

Description

Simulate random effect (i.e. bVec) based on family structure

Usage

GRAB.SimubVec(nSub, nFam, FamMode, tau)

Value

a data frame including two columns: ID and random effect following a multivariate normal distribution

Arguments

nSub

the number of unrelated subjects in simulations, if nSub = 0, then all subjects are related to at least one of the others.

nFam

the number of families in simulation, if nFam = 0, then all subjects are unrelated to each other.

FamMode

"4-members", "10-members", or "20-members". Check Details section of function help(GRAB.SimuGMat) for more details.

tau

variance component

Examples

Run this code
nSub <- 10
nFam <- 1
FamMode <- "10-members"
tau <- 2
bVec <- GRAB.SimubVec(nSub, nFam, FamMode, tau)

Run the code above in your browser using DataLab