sim.intensity.dep: Simulate Intensity Dependent Variables

Description Usage Arguments Value Author(s) Examples

Description

This function simulates intensity dependent variables.

Usage

1
sim.intensity.dep(data = NULL, variable = NULL, spline.dim = NULL, sample.from = NULL, rows = 1)

Arguments

data

The data matrix of simulated data the user wishes to adjust.

variable

The variable the user wishes to introduce.

spline.dim

Dimension of intensity dependent function

sample.from

A list specifying a function that coefficients can be sampled from (e.g. rnorm, rchisq, etc.) and the relevant parameters (e.g. mean, sd, df, etc). The first item in the list should be named func and the second named params.

rows

Either a number between 0 and 1 or a vector of row IDs. A number between 0 and 1 specifies the proportion of data to be influenced by the variable. A vector specifies the rows to be influenced. Equal to 1 by default.

Value

Matrix of dimension equal to that of data containing the intensity-dependent effects.

Author(s)

Brig Mecham <brig.mecham@sagebase.org>

Examples

1
2
3
data <- matrix(rchisq(100,1,2),nr=1000,nc=12)
int.var <- data.frame(array=factor(1:12))
array.effect <- sim.intensity.dep(data, int.var$array, 2, list(func=rnorm, params=c(mean=0,sd=0.5)))

Sage-Bionetworks/snm documentation built on May 9, 2019, 12:14 p.m.