Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down at the end of May, and its replacement, statalist.org is already up and running.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: RE: AW: PCA results and new variable


From   "Nick Cox" <n.j.cox@durham.ac.uk>
To   <statalist@hsphsun2.harvard.edu>
Subject   st: RE: AW: PCA results and new variable
Date   Thu, 11 Mar 2010 12:44:13 -0000

-help pca- explains how you can save values of the first component. 

-help sum()- explains how to calculate cumulative sums. 

Nick 
n.j.cox@durham.ac.uk 

mmolina@uniroma3.it

Regarding the official example, I would need to make,

*************
sysuse auto, clear
bys foreign: pca trunk weight length headroom

and then create a new variable with the cumulative of the first
compenent
of each group (foreign or domestic)assigned to each "car".

"Martin Weiss" <martin.weiss1@gmx.de>

-statsby- could be your friend, but you really need to frame your
question
in terms of an official example:

sysuse auto, clear
bys rep78: pca trunk weight length headroom

mmolina@uniroma3.it

I am performing a PCA analysis of specific firms'(id) characteristics
(varname) within regions.
I would like to know if it possible to create a new variable with the
results of the cumulative of the first component to be assigned to each
firm (id).

*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index