Learn R Programming

gRapfa (version 1.0)

simulateAPFA: Simulation of data from an APFA model

Description

The function draws a number of independent samples from the given APFA model.

Usage

simulateAPFA(g, Nsim = 1000)

Arguments

g
is an APFA model from which the samples are drawn.
Nsim
is the number of simulations.

Value

A data frame containing the simulated data.

Details

The function simulates the data from an APFA model using the edge probabilities.

Examples

Run this code
library(gRapfa)
data(Wheeze)
G <- select.IC(Wheeze)
simWheeze <- simulateAPFA(G)
head(simWheeze)

Run the code above in your browser using DataLab