X <- matrix(rnorm(100 * 5), nrow = 100, ncol = 5)
y <- -0.5 + X[, 1] * 0.5 + X[, 2] * 1 + rnorm(100)
loading1 <- c(1, 1, rep(0, 3))
loading2 <- c(-0.5, -1, rep(0, 3))
loading.mat <- cbind(loading1, loading2)
Est <- LF(X, y, loading.mat, model = "linear")
## compute confidence intervals
ci(Est, alpha = 0.05, alternative = "two.sided")
## summary statistics
summary(Est)
Run the code above in your browser using DataLab