genData: genData

Description Usage Arguments Details Value Examples

View source: R/genData.R

Description

Generating a example dataset (age estimation)

Usage

1
2
3
genData(ntot = 1000, nsites = 1000, nbatches = 5, propAgeAs = 0.05,
  sd_batch = 0.5, sd_signal = 0.1, sd_bparam = 0.03,
  ageRange = c(10, 35), seed = NULL, verbose = FALSE)

Arguments

ntot

total number of observations

nsites

number of sites

nbatches

number of batches

propAgeAs

#proportion of sites with assosiation to age

sd_batch

standard dev of batch effects (normal distr effects)

sd_signal

standard dev of signal (norm distr noise)

sd_bparam

sd of age coefficient

ageRange

Age range of considered ages

seed

The user can set seed if wanted

verbose

boolean, show progress Default: FALSE

Details

The function generates a dataset based on normal distribution where age (uniformly distributed) is a underlying explanatory variable

Value

A list with variables y (response), X (design matrix belonging to fixed effects coefficients), batch (factor with batch effect names), age (true ages)

Examples

1
2
3
4
## Not run:  
dat = genData(seed=1)

## End(Not run)

oyvble/lme1en documentation built on April 30, 2020, 2:41 p.m.