Skip to content

xinkaidupsy/netDFI

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

netDFI

The goal of netDFI is to ...

Installation

You can install the development version of netDFI from GitHub with:

# install.packages("devtools")
devtools::install_github("xinkaidupsy/netDFI")

Example

This is a basic example which shows you how to solve a common problem:

library(psych)
library(psychonetrics)
library(dplyr)
library(netDFI)

# get the big five inventory data from psych
data(bfi)

# estimate ggm 
bfi_mod <- ggm(bfi) %>% prune %>% runmodel     

# obtain the partial correlation matrix
bfi_net <- getmatrix(bfi_mod, "omega")

# allow future_apply to use more memory
options(future.globals.maxSize = 1024 * 1024^2)

# run dfi
dfi_bfi <- dfi_ggm(bfi_net, ncores = 8, power = 0.95, iter = 500)

About

Dynamic fit index for network models

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages