simulate_dataMBH: simulate_dataMBH

Description Usage Arguments Value

View source: R/simulate_dataMBH.R

Description

This simulates multivariate data to fit model based hypervolumes

Usage

1
2
3
simulate_dataMBH(nobs = 10, ndims = 3, ngroups = 4, sdgrp = 2,
  sdobs = NULL, variances = "fixed", vardiff = 0.5, means = rep(0,
  ndims), returntruecov = FALSE)

Arguments

nobs

Number of observations to simulate per group

ndims

Number of variables to simulate

ngroups

Number of groups to simulate

sdgrp

Standard deviation of group means

sdobs

Standard deviation of observations within groups. Either a single value or vector with length equal to ndims. If NULL (default) a vector of length equal to ndims is generated from a Uniform distribution with bounds 1 and 10. Note that if sdobs = NULL the vector generated is on the variance scale, if sdobs is provided then it should be a standard deviation

variances

Either "fixed" to constrain within-group variances to be the same (the default), or "variable" so within-group variances can vary

vardiff

Standard deviation of within-group variance differences

means

Means of each variable to simulate

returntruecov

Logical. Return true covariance matrix as well as data? Defaults to FALSE

Value

data - simulated data

(optional) truecov - covariance matrix used to simulate data


susanjarvis501/MBH documentation built on Aug. 27, 2020, 7:37 a.m.