Learn R Programming

msma (version 3.1)

simdata: Simulate Data sets

Description

This is a function for generating multiblock data based on the multivariable normal distribusion

Usage

simdata(n = 100, rho = 0.8, Yps = c(100, 120, 150), Xps = 500, seed = 1)

Value

X

Simulated X which has a list form

Y

Simulated Y which has a list form

Arguments

n

a numeric scalar, sample size.

rho

a numeric scalar, correlation coefficient.

Yps

a numeric vector, numbers of columns for Y. The length of vector corresponds to the number of blocks.

Xps

a numeric vector, numbers of columns for X. The length of vector corresponds to the number of blocks.

seed

a seed number for generating random numbers.

Details

The output is a list of matrics.