Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: orthogonal regression


From   Kit Baum <[email protected]>
To   [email protected]
Subject   st: orthogonal regression
Date   Thu, 2 Dec 2004 11:32:57 -0500

Can you do orthoganal regression in stata? No, but you can do orthogonal regression easily enough:

. sysuse auto
(1978 Automobile Data)

. pca weight length turn, factor(3)
(obs=74)

(principal components; 3 components retained)
Component Eigenvalue Difference Proportion Cumulative
------------------------------------------------------------------
1 2.77909 2.61204 0.9264 0.9264
2 0.16706 0.11321 0.0557 0.9821
3 0.05385 . 0.0179 1.0000

Eigenvectors
Variable | 1 2 3
-------------+--------------------------------
weight | 0.58285 -0.42397 0.69321
length | 0.58426 -0.37423 -0.72013
turn | 0.56473 0.82474 0.02959

. score pc1 pc2 pc3
(based on unrotated principal components)
Scoring Coefficients
Variable | 1 2 3
-------------+--------------------------------
weight | 0.58285 -0.42397 0.69321
length | 0.58426 -0.37423 -0.72013
turn | 0.56473 0.82474 0.02959

. regress price pc1-pc3

Kit Baum, Boston College Economics
http://ideas.repec.org/e/pba1.html

*
* For searches and help try:
* http://www.stata.com/support/faqs/res/findit.html
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/




© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index