genData: Generate Bivariate Data

Description Usage Arguments Details Value Examples

View source: R/genData_function.R

Description

This function will generate an uncensored dataset distributed bivaraite normal or t.

Usage

1
genData(n, locVec, scaleMat, df)

Arguments

n

An integer, representing the number of pairs of data to generate, number of rows in data set, or sample size.

locVec

A vector of length 2, representing the location parameter (equal to the mean vector when df>1).

scaleMat

A symmetric positive-definite 2x2 matrix representing the scale matrix of the distribution, such that S*df/(df-2) is the variance-covariance matrix when df>2

df

Integer greater than 3, representing degrees of freedom with df=Inf implying normal.

Details

It is suggested to use buildScaleMat to generate the scaleMat parameter.

Value

Returns a data set matrix with nrow = n and ncol= 2.

Examples

1
2
3
4
5
6
7
8
xmu = 0
ymu = 0
xsd = 1
ysd = 1
r = 0
df = Inf #normal
scaleMat <- buildScaleMat( xsd, ysd, r, df)
genData(10, c(xmu, ymu), scaleMat, df)

senresearch/lcest documentation built on Jan. 14, 2022, 5:29 p.m.