Statalist The Stata Listserver

[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: tetrachoric correlation in stata 9

From   Maarten buis <>
Subject   Re: st: tetrachoric correlation in stata 9
Date   Tue, 14 Nov 2006 21:02:24 +0000 (GMT)

--- prneiva <> wrote:
> I am trying to run a tetrachoric correlation in Stata 9. After
> running tetrachoric varlist, available, the correlation matrix is
> shown on the screen but it looks like that nothing is being saved 
> on memory. Matrix list command shows that there is not any matrix
> in there.
>  Stata's help says that the pairwise correlation matrix is returned
> as r(corr) and can be used to perform a factor or a principal
> component analysis of binary variables using factormat or pcamat. It
> also says tetrachoric saves the matrix r(Rho). What does it mean? 

Here is an example on how you could use 
-tetrachoric-, find the results that it 
leaves behind, and use the correlation 
matrix. Copy the example text, open  
Stata, type -doedit-, and paste the text
and than click on do.

*------------ begin example -----------
sysuse auto, clear

/*make some binary vars*/
gen good = rep78>3
sum price, meanonly
gen expensive = price>r(mean)

tetrachoric foreign good expensive
/*see what -tetrachoric- leaves behind*/
return list
matrix list r(Rho)

/*do the factor analysis*/
factormat r(Rho), n(74)
*------------- end example ------------

Maarten L. Buis
Department of Social Research Methodology
Vrije Universiteit Amsterdam
Boelelaan 1081
1081 HV Amsterdam
The Netherlands

visiting adress:
Buitenveldertselaan 3 (Metropolitan), room Z434

+31 20 5986715

All New Yahoo! Mail  Tired of Vi@gr@! come-ons? Let our SpamGuard protect you.
*   For searches and help try:

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