Mohd masood
2012-Jan-24  04:43 UTC
[R] PCA for assets based household income analysis (" hetcor" and "princomp")
I am doing Principal Component Analysis (PCA) on assets data for household
income prediction. The problem is that the assets data are rank ordered (usually
binary ... possess car/don't possess car), so the normal correlation is
inappropriate for the calculation of the PCA. Instead one has to use the
polychoric correlation coefficient. It uses the "random.polychor.pa"
package.
Scenario 1
If i only use PCA without using polychoric correlation
assets.pca <- princomp(covmat = assets, scores=T)
assets$income<-predict(assets2.pca)[,1]
# these predict the coefficient for  income for each
observation
Scenario 2
but when i run "hetcor" (for polychoric correlation
coefficient) , and then princomp (for PCA) and finally predict
( to  predict the coefficient for income for
each observation).
hetcor and princomp runs fine but predict
command doesn't work and
it doesn't predict value for each observation
 library(epicalc)library(foreign)library(polycor)
assets.mat <- hetcor(assets, use="complete.obs")[[1]]
 assets.pca <- princomp(covmat = assets.mat,
scores=T)assets$income<-predict(assets.pca)[,1]
the problems are why this "pridict" commend throwing error in
scenario 2 and not in scenario 1?Is there any other way to predict the values
for each observation?
thanks a lotmm
       
	[[alternative HTML version deleted]]
Seemingly Similar Threads
- [LLVMdev] Where is liveness analysis pass?
 - [LLVMdev] 回复:Re: [LLVMdev] [Need your help]
 - SEM: Dependent binary: impact estimating wrong standard errors with hetcor()
 - error in hetcor function (polycor package)?
 - Questions regarding sem using hetcor() function from polycor and diagrams
 
