# NOT RUN {
X1 <- matrix(rnorm(100*300),100,300)
usv <- svd(X1)
X2 <- usv$u[,-3] %*% diag(usv$d[-3]) %*% t(usv$v[,-3])
r1(X1,X2)
r2(X1,X2)
r3(X1,X2)
r4(X1,X2)
GCD(X1,X2)
GCD(X1,X2, 5,5)
# Missing data
X1[c(1, 50, 400, 900)] <- NA
X2[c(10, 200, 450, 1200)] <- NA
r1(X1,X2, impute = TRUE)
r2(X1,X2, impute = TRUE)
r3(X1,X2, impute = TRUE)
r4(X1,X2, impute = TRUE)
GCD(X1,X2, impute = TRUE)
GCD(X1,X2, 5,5, impute = TRUE)
# }
Run the code above in your browser using DataLab