hi guys! Just yesterday I wrote some code to perform a simple CFA. Everything worked perfectly yesterday but today it doesn't work even though I didn't change anything??
I always get this error message:
Error in file(file, "r") : cannot open the connection
In addition: Warning message:
In file(file, "r") : cannot open file '
# CFA
glw_nach =~ nach1 + nach2 + nach3 + nach4 + nach5
glw_marke =~ mar1 + mar2 + mar3 + mar4 + mar5
kb =~ kb1 + kb2 + kb3
': Invalid argument
This is my R code:
ba_data <- read_excel("ba_umfrage_v05_R.xlsx")
ba_data$inf <- recode(ba_data$typ, "1=1; 2=0")
m_model <- '
# CFA
glw_nach =~ nach1 + nach2 + nach3 + nach4 + nach5
glw_marke =~ mar1 + mar2 + mar3 + mar4 + mar5
kb =~ kb1 + kb2 + kb3
'
m_fit <- cfa(m_model, data=ba_data)
summary(m_fit,
standardized = TRUE,
rsquare = TRUE,
fit.measures = TRUE)
I've also attached some pictures! Hope someone can help me! Thanks!!