Learn R Programming

gRapfa (version 1.0)

fit.APFA: Fitting an APFA igraph object to data

Description

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

Usage

fit.APFA(G, dat)

Arguments

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

Value

Returns fitted APFA igraph object for the given data.

Details

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

Examples

Run this code
library(gRapfa)
data(Wheeze)
samp <- sample(1:537, 250)
G <- select.IC(Wheeze[samp,])
G.fit  <- fit.APFA(G, Wheeze[-samp,])

Run the code above in your browser using DataLab