# NOT RUN {
library(rrpack)
## Simulate data from a sparse factor regression model
p <- 100; q <- 50; n <- 100; nrank <- 3
mydata <- rrr.sim1(n, p, q, nrank, s2n = 1,
sigma = NULL, rho_X = 0.5, rho_E = 0.3)
Y <- mydata$Y
X <- mydata$X
fit1 <- sofar(Y, X, ic.type = "GIC", nrank = nrank + 2,
control = list(methodA = "adlasso", methodB = "adlasso"))
summary(fit1)
plot(fit1)
fit1$U
crossprod(fit1$U) #check orthogonality
fit1$V
crossprod(fit1$V) #check orthogonality
# }
# NOT RUN {
# }
Run the code above in your browser using DataLab