BenBarnard / covTestR

Tests for Covariance Matrices
https://www.bearstatistics.com/covTestR
2 stars 0 forks source link

RStudio Fatal Error #9

Open gabrielodom opened 4 years ago

gabrielodom commented 4 years ago

For the code below, RStudio crashes when I attempt to use the homogeneityCovariances() function.

gabrielodom commented 4 years ago

covTestR_error_mwe_20200506.txt

GitHub wouldn't let me upload an R script, so here's a text file. I'll comment the code below as well.

gabrielodom commented 4 years ago
# covTestR Error MWE
# Gabriel Odom
# 2020-05-06

###  Introduction and Setup  ###
# RStudio crashes when I attempt to use the homogeneityCovariances() function.

library(covTestR)
p <- 2

# Create a Population Covariance Matrix
A_mat <- matrix(
  c(
    1, 0.1,
    0.1, 1
  ),
  nrow = p, ncol = p, byrow = TRUE
)

# Create a Sample of Data
data_mat <- matrix(
  rnorm(100 * p),
  ncol = p
)

# Create a Single-Group Data Frame
data_df <- data.frame(
  group = "A",
  data_mat
)

###  Attempt Homogeneity Tests  ###
homogeneityCovariances(
  x = data_df,
  Sigma = A_mat,
  group = "group",
  method = "Schott2001"
)