SimulateData2P: Simulate data for a node with two parents

View source: R/SimulateData2P.R

SimulateData2PR Documentation

Simulate data for a node with two parents

Description

Simulate data for a node with two parents

Usage

SimulateData2P(N, P1, P2, b0.1, b1.1, b1.2, sd.1)

Arguments

N

Number of observations

P1

Data vector of the parent node, P1.

P2

Data vector of the parent node, P2.

b0.1

Intercept of b0.1 + b1.1*P1 + b1.2*P2, where P1 and P2 are the parents of the corresponding node.

b1.1

Slope of P1 for b0.1 + b1.1*P1+ b1.2*P2, where P1 and P2 are the parents of the corresponding node.

b1.2

Slope of P2 for b0.1 + b1.1*P1 + b1.2*P2, where P1 and P2 are the parents of the corresponding node.

sd.1

Standard deviation for corresponding data generated nodes.

Value

Vector

Author(s)

Md Bahadur Badsha (mbbadshar@gmail.com)

See Also

SimulateData for simulated data generating function.

Examples

Data2P <- SimulateData2P(N = 10^3, 
                         P1 = 1, 
                         P2 = 1, 
                         b0.1 = 0, 
                         b1.1 = 1, 
                         b1.2 = 1, 
                         sd.1 = 1)

MRPC documentation built on April 11, 2022, 5:10 p.m.