STAT 360: Computational Statistics and Data Analysis

Load R Libraries, Import and Attach Relevant Data, and Specify Seed

library(rmarkdown); library(knitr); library(readxl)
set.seed(37)

EXERCISE 01

Part (a)

X2ind <- 1013.94
DFind <- 36
X2 <- 32.04
DF <- 7
NFI <- (X2ind - X2)/X2ind
NNFI <- (X2ind - DFind/DF*X2)/(X2ind - DFind)
NFI
## [1] 0.9684005
NNFI
## [1] 0.868318

Part (b)

NFI = .968, this is above the .95 threshold so that is good
NNFI = .868, this is below the .95 threshold which isn't acceptable
These two metrics are contradictory, I suppose we'll have to explore more to know if this model is acceptable or not.

Part (c)

IFI <- (X2ind -X2)/(X2ind - DF)
CFI <- 1 - (X2 - DF)/(X2ind -DFind)
IFI
## [1] 0.9751326
CFI
## [1] 0.9743952

Part (d)

IFI = .975, this is above the threshold so that is good
CFI = .974, this is also above the threshold which is good
Fabulous, both of the metrics inidcate that this clustering is acceptable

Part (e)

N <- 253
Fhat <- (X2 - DF)/N
RMSEA <- sqrt(Fhat/DF)
RMSEA
## [1] 0.1189071

Part (f)

RMSEA = .119 which is not below the .1 threshold, so this does not indicate that the model is acceptable

Part (g)

MFI <- exp(-.5*(X2 - DF)/N)
MFI
## [1] 0.9517183

Part (h)

MFI = .952 is above the .95 threshold, so this indicates the model is good

Part (i)

The GFI is .98. This means that 98% of the variance in Contract-Related Causes of Construction Delays can be explained by our model. That's pretty good!

Part (j)

param <- 13
dp <- 9*10/2
GFI <- .98
AGFI <- 1-(1-GFI)/(1-param/dp)
AGFI
## [1] 0.971875