[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
st: generating new var using principal components eigen
Dear STATA list,
I am trying to create a single var_simple comprised of the sum of var*pc1 (pc1 is the score of component one of a principle components analysis). I have tried a simple formula where var_simple= pc1*var1+ pc1*var2 etc... but thought there must be a quicker way to compute this that I am unaware of. Also, in the first example, I obtained a number of negative values (some of the var's had a negative score for pc1) and I was wanting to transform them into positive values in simple_var. Any help would be greatly appreciated. Thanks for your attention to what is no doubt a simple problem!