Learn R Programming

asd (version 2.2)

simeans.binormal: Simulate Bivariate Normal Means

Description

Simulates bivariate normal means; for use with asd.sim and gasd.sim in ASD.

Usage

simeans.binormal(n = n, means = means, vars = vars, corr = corr)

Arguments

n
Number of records used to calculate means
means
Vector of expected means for two samples
vars
Vector of expected variances for two samples
corr
Correlation between two samples

Value

samp1
Mean of sample 1
samp2
Mean of sample 2

Details

Uses function rmvnorm from package mvtnorm to generate means from correlated normal variates.

See Also

treatsel.sim, dunnett.test, hyp.test, select.rule, combn.test

Examples

Run this code

# need to load mvtnorm
library(mvtnorm)

# generate data
set.seed(1234)
simeans.binormal(n=10,means=c(2,3),vars=c(1,5),corr=0.5)

Run the code above in your browser using DataLab