No, it's definitely SVD. Here is a bit of code that replicates the SVD
process using basic R matrix operations and gives information sufficient
to rebuild the original data set using a small number of factors. The
whole point of PCA is to reduce the dimensionality of a data set as far
as possible without losing too much information. This code basically
does what "princomp" does but in a different way with outputs provided
in a different form. You can see 

BuildPCACurves <- function(data, ncomps = 3){
  if (class(data) != 'matrix'){A <- as.matrix(data)} else A <- data
  M <- t(A) %*% A
  eigens <- eigen(M)$vectors
  eigens[,1] <- -eigens[,1]
  selectors <- matrix(0, nrow = ncol(A), ncol = ncol(A))
  diagentries <- c(rep(1, ncomps), rep(0, ncol(A) - ncomps))
  diag(selectors) <- diagentries
  coefficients <- A %*% eigens
  newcurves <- coefficients %*% selectors %*% t(eigens)
  coef2 <- apply(coefficients, 2, diff)
  means <- apply(coef2, 2, mean)
  stdevs <- apply(coef2, 2, sd)
  RMSE <- sqrt(sum((apply(newcurves - A, 2, sum)) ^ 2))
  output = list(original = A, rebuilt = newcurves, means =
means[1:ncomps], stds = stdevs[1:ncomps], RMSE = RMSE)
  return(output)
}

On Sat, 2010-10-16 at 11:15 +0200, mat wrote:

> Karla
> 
> You might better ask on r-help list, as this is not directly a topic 
> related to finance.
> 
> Secondly, please provide a minimal self-reproducible example, here we 
> have no idea what mydata is...
> 
> Now trying to answer your question... Here assuming that the example in 
> pls is enough:
> library(pls)
> data(oliveoil)
> sens.pcr <- pcr(sensory ~ chemical, ncomp = 4, scale = TRUE, data = 
> oliveoil)
> 
> it looks indeed that there is no standard error provided:
> class(sens.pcr)
> [1] "mvr"
>  > methods(class="mvr")
>   [1] biplot.mvr       coef.mvr         fitted.mvr       model.frame.mvr
>   [5] model.matrix.mvr MSEP.mvr         plot.mvr         predict.mvr
>   [9] predplot.mvr     print.mvr        residuals.mvr    RMSEP.mvr
> [13] summary.mvr
> 
> And I am not sure it is simply an OLS regression on the extracted 
> factors... indeed, the help file claims rather to be a svd... If it is 
> ols though, one maybe possible way to explore to obtain standard errors 
> would be to fit the ols with lm() on the model response: sens.pcr$model
> 
> Hope this helps
> 
> Matthieu
> 
> 
> 
> 
> Le 14. 10. 10 16:20, karla hernandez villafuerte a crit :
> >
> > Dear Members:
> >
> > I am trying to applied a Principal Component Regression using the pls package and the next formula:
> >
> > PCA<-pcr(Beta~XCT+XCLa+XCLb+XCLc+XCLd+XCLe+XCLf+XCLg+XCLh,
> > data=mydata,ncomp=15,validation="LOO",method="svdpc", model=TRUE, y=TRUE, x=TRUE)
> >
> > where XCT is a matrix of cuantitatives variables and each one of  XCL are cualitatives variables.
> >
> > I can estimate the coefficient matrix using:
> >
> > coef(PCA,comps=5)
> >
> > As far I understand, the PCR perform a multilple regression analysis of the response variable against the reduced set of principal components, using OLS. The results coefficients are transformed into a new set of coefficients (those in coef(PCA,comps=5)) that correspond to a mathematic transformation of the original ones.
> >
> > My question is: Can I see the t values for the final coefficents estimated in coef(PCA,comps=5) or can I have the results of the OLS equation?. In other case which is the best way to analyse the significance of the variables?
> >
> > Thanks!!
> >
> > Karla Hernndez Villafuerte
> >
> >    		 	   		
> > 	[[alternative HTML version deleted]]
> >
> >    
> >
> >
> > _______________________________________________
> > R-SIG-Finance@stat.math.ethz.ch mailing list
> > https://stat.ethz.ch/mailman/listinfo/r-sig-finance
> > -- Subscriber-posting only. If you want to post, subscribe first.
> > -- Also note that this is not the r-help list where general R questions should go.
> 
> 
> 	[[alternative HTML version deleted]]
> 
> _______________________________________________
> R-SIG-Finance@stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-sig-finance
> -- Subscriber-posting only. If you want to post, subscribe first.
> -- Also note that this is not the r-help list where general R questions should go.



	[[alternative HTML version deleted]]

