| resetViaPCA {RESET} | R Documentation | 
Reconstruction Set Test (RESET) via PCA
Description
Wrapper around the reset method that uses the projection of X onto the top num.pcs principal components as X.test.
This PC projection is computed using a randomized reduced rank SVD as implemented by randomSVD.
Usage
resetViaPCA(X, center=TRUE, scale=FALSE, num.pcs=2, pca.buff=2, pca.q=1, var.sets, k=2, 
      random.threshold, k.buff=0, q=0, test.dist="normal", norm.type="2", per.var=FALSE)
Arguments
| X | See description in  | 
| center | Flag which controls whether the values in  | 
| scale | Flag which controls whether the values in  | 
| num.pcs | Number of principal components used for computing the projection of  | 
| pca.buff | Number of extra dimensions used when calling  | 
| pca.q | Number of power iterations used when calling  | 
| var.sets | See description in  | 
| k | See description in  | 
| random.threshold | See description in  | 
| k.buff | See description in  | 
| q | See description in  | 
| test.dist | See description in  | 
| norm.type | See description in  | 
| per.var | See description in  | 
Value
A list with the following elements:
-  San n-by-m matrix of sample-level variable set scores.
-  va length m vector of overall variable set scores.
See Also
reset,createVarSetCollection,randomColumnSpace
Examples
  # Create a collection of 5 variable sets each of size 10
  var.sets = list(set1=1:10, 
                  set2=11:20,
                  set3=21:30,
                  set4=31:40,
                  set5=41:50)                  
  # Simulate a 100-by-100 matrix of random Poisson data
  X = matrix(rpois(10000, lambda=1), nrow=100)
  # Inflate first 10 rows for first 10 variables, i.e., the first
  # 10 samples should have elevated scores for the first variable set
  X[1:10,1:10] = rpois(100, lambda=5)
  # Execute RESET when reconstruction measured on top 10 PCs 
  # with mean centering performed before computing PCs
  resetViaPCA(X, num.pcs=10, var.sets=var.sets, k=2, random.threshold=10)
  
  # Execute RESET when reconstruction measured on top 10 
  # uncentered PCs with centering performed as needed inside reset()
  resetViaPCA(X, center=FALSE, num.pcs=10, var.sets=var.sets, k=2, random.threshold=10)