View source: R/projected_osc.R
| projected_osc | R Documentation | 
The projected orthogonal signal correction (POSC) method is a preprocessing technique used to remove systematic variation from predictor variables that is orthogonal to the response variable. This function implements the POSC algorithm for model fitting and prediction.
projected_osc(
  x,
  y,
  ncomp = 5,
  center = TRUE,
  scale = FALSE,
  tol = 1e-10,
  newdata = NULL
)
| x | A matrix or data frame of the predictor variables. | 
| y | A vector of the response variable. | 
| ncomp | An integer specifying the number of components to include in the POSC model. Default is 5. | 
| center | A logical value indicating whether to mean-center  | 
| scale | A logical value indicating whether to scale  | 
| tol | A numeric value representing the tolerance for convergence. The default value is 1e-10. | 
| newdata | A matrix or data frame of new predictor variables to be corrected using the POSC model. | 
If newdata is provided, a list containing the following components:
correction: The corrected matrix for the new data after applying POSC.
scores: The orthogonal scores matrix for the new data.
If newdata is not provided, a list containing the following components:
model: A list containing the POSC model components:
loadings: The orthogonal loadings matrix.
weights: The orthogonal weights matrix.
Christian L. Goueguel
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.