gera.pa.model: Generates PA input model

Description Usage Arguments Value Author(s) References Examples

View source: R/gera.pa.model.R

Description

This function is called from 'gera.pa' function. It receives a BN structure and a data set, build a PA input model string based on BN structure and return it.

Usage

1
gera.pa.model(bn.structure, data.to.work)

Arguments

bn.structure

is a BN structure learned from data.

data.to.work

is a data set containing the variables of the BN.

Value

the PA input modeo string

Author(s)

Elias Carvalho

References

Yves Rosseel (2012). lavaan: An R Package for Structural Equation Modeling. Journal of Statistical Software, 48(2),1-36.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
# Clean environment
closeAllConnections()
rm(list=ls())
# Set enviroment
# setwd("To your working directory")
# Load packages
library(bnpa)
library(bnlearn)
# load data sets from package
data(dataQualiN)
# Show first lines
head(dataQualiN)
# Learn BN structure
bn.structure <- hc(dataQualiN)
bnlearn::graphviz.plot(bn.structure)
# Set variables
# Generates the PA model from bn structure
pa.model <- gera.pa.model(bn.structure, dataQualiN)
pa.model

bnpa documentation built on Aug. 2, 2019, 1:05 a.m.

Related to gera.pa.model in bnpa...