addnoise: Creates random errors for use in power.trend.

Description Usage Arguments Value Author(s) See Also

View source: R/trends.r

Description

This function is used within power.trend. Distribution of noise can be either Normal, Poisson or Negative Binomial. The mean values are entered as a parameter (possibly generated by function generate.trend). Other parameters (sd for Normal, nbsize for Negative Binomial) need to be given. Values in meanvalues are used as the mean values for one of the three specified distributions and then a random allocation is made for each of the nobs values, where nobs is the length of meanvalues.

Usage

1
addnoise(meanvalues, reps, distribution, sd, nbsize, randeffect, randeffect.sd) 

Arguments

meanvalues

Vector of mean values

reps

Number of replicates per time point

distribution

Character string which must be one of Normal (default), Poisson or Negbin

sd

Standard Deviation for Normal distribution

nbsize

Size parameter for Negative Binomial distribution

randeffect

Not working yet

randeffect.sd

Not working yet

Value

Output is a vector of the same length as meanvalues.

Author(s)

David Maxwell: David.Maxwell@cefas.co.uk

See Also

generate.trend, power.trend


emon documentation built on May 2, 2019, 10:21 a.m.