fit.APFA: Fitting an APFA igraph object to data

Description Usage Arguments Details Value Author(s) Examples

View source: R/APFAfunctions.R

Description

Fits the APFA igraph object G to a commensurate dataset, i.e., the edge probabilities are calculated using the data.

Usage

1
fit.APFA(G, dat)

Arguments

G

An APFA object.

dat

The data for which the APFA models from G has to be fit.

Details

Any observations not in the sample space of G are ignored.

Value

Returns fitted APFA igraph object for the given data.

Author(s)

Smitha Ankinakatte and David Edwards

Examples

1
2
3
4
5
library(gRapfa)
data(Wheeze)
samp <- sample(1:537, 250)
G <- select.IC(Wheeze[samp,])
G.fit  <- fit.APFA(G, Wheeze[-samp,])

gRapfa documentation built on May 2, 2019, 6:54 a.m.