Description Usage Arguments Value Examples
Dimensionality reduction for exponential family data by extending Pearson's PCA formulation to minimize deviance. The convex relaxation to projection matrices, the Fantope, is used.
| 1 2 3 4 | 
| x | matrix of either binary, proportions, count, or continuous data | 
| k | number of principal components to return | 
| M | value to approximate the saturated model | 
| family | exponential family distribution of data | 
| weights | an optional matrix of the same size as the  | 
| quiet | logical; whether the calculation should give feedback | 
| partial_decomp | logical; if  | 
| max_iters | number of maximum iterations | 
| conv_criteria | convergence criteria. The difference between average deviance in successive iterations | 
| random_start | logical; whether to randomly inititalize the parameters. If  | 
| start_H | starting value for the Fantope matrix | 
| mu | main effects vector. Only used if  | 
| main_effects | logical; whether to include main effects in the model | 
| normalize | logical; whether to weight the variables to they all have equal influence | 
| ss_factor | step size multiplier. Amount by which to multiply the step size. Quadratic
convergence rate can be proven for  | 
An S3 object of class cgpca which is a list with the
following components:
| mu | the main effects | 
| H | a rank  | 
| U | a  | 
| PCs | the princial component scores | 
| M | the parameter inputed | 
| iters | number of iterations required for convergence | 
| loss_trace | the trace of the average deviance using the Fantope matrix | 
| proj_loss_trace | the trace of the average deviance using the projection matrix | 
| prop_deviance_expl | the proportion of deviance explained by this model.
If  | 
| 1 2 3 4 5 6 7 8 9 10 11 | # construct a low rank matrix in the logit scale
rows = 100
cols = 10
set.seed(1)
mat_logit = outer(rnorm(rows), rnorm(cols))
# generate a binary matrix
mat = (matrix(runif(rows * cols), rows, cols) <= inv.logit.mat(mat_logit)) * 1.0
# run convex generalized PCA on it
cgpca = convexGeneralizedPCA(mat, k = 1, M = 4, family = "binomial")
 | 
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.