generate.data: Simulate multivariate normal data

Description Usage Arguments Details Value Author(s) Examples

View source: R/generate.data.R

Description

Simulate multivariate normal data

Usage

1
2
generate.data(cor.matrix, sds = c(1, 1), means = c(0, 0),
  names = c("y", "x"), n = 100)

Arguments

cor.matrix

Either a scalar (indicating the correlation between two variables) or a symmetrical matrix for a variance/covariance matrix

sds

The standard deviation of the variables

means

The means of the variables

names

The names of the variables

n

The desired sample size

Details

This function provides an easy way to simulate random multivariate normal data.

Value

A data frame containing the simulated data

Author(s)

Dustin Fife

Examples

1
generate.data(cor.matrix=.2, sds=c(10, 100), means=c(30, 1000), c("A", "B"), 200)

dustinfife/fifer2 documentation built on Nov. 4, 2019, 11:04 a.m.