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

st: For Sophia Rabe-Hesketh...... RE: Re: Factor analysis of count data


From   "Chih-Mao Hsieh" <[email protected]>
To   <[email protected]>
Subject   st: For Sophia Rabe-Hesketh...... RE: Re: Factor analysis of count data
Date   Tue, 16 Sep 2003 21:31:09 -0500

Dear Sophia,


Briefly, I have a dataset which has variable names and a sample row that
look like the following:

id     pattern1     pattern2     pattern3     pattern4     pattern5
100       6             5            3            0            12

All the 'pattern' variables are count variables, and I want to run a
factor analysis.

I have read the manual, and I know that I am to use Stata's "reshape"
command.  I was going to use the following syntax:

. reshape long pattern, i(id) j(type)

And then I would get the following:

id     type     pattern
100     1          6
100     2          5
100     3          3
100     4          0
100     5         12

But it appears in the manual (p.39) that I have to create dummies for
each type?  For example,

id    pattern     type1     type2     type3     type4     type5
100     6           1         0         0         0         0
100     5           0         1         0         0         0
.
.
.

Do I indeed have to create these dummies (i.e. am I interpreting the
manual correctly?)?  And if I can use the 'original' "id--type--pattern"
file described above, what would be the proper syntax for the 'gllamm'
command then?

Thanks ahead of time, I am only beginning to use (and appreciate)
gllamm...


Chihmao.


-----------------------------------------------------
Chihmao Hsieh
John M. Olin School of Business
Washington University
Box 1133, One Brookings Drive
St. Louis, MO 63130
Email:  [email protected]
http://students.olin.wustl.edu/~hsieh


-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Sophia
Rabe-Hesketh
Sent: Friday, September 12, 2003 5:52 AM
To: [email protected]
Subject: Re: st: For Sophia Rabe-Hesketh...... RE: Re: Factor analysis
of count data


Dear Chihmao,

You're right, the manual is so out-of-date
that it doesn't mention factor scoring!

It is very easy to obtain factor scores
(empirical Bayes predictions, equivalent to 
the regression method for continuous responses) 
using the prediction command gllapred:

gllapred scores, fac

The manual also doesn't say much about
adaptive quadrature which I would expect
to work much better than ordinary
quadrature for count-data. Simply
add the 'adapt' option to the gllamm
command.

Best wishes,

Sophia


At 12:01 AM 9/12/2003 -0500, you wrote:
>Dear Sophia:
>
>
>Thank you for your response.  I have read chapter 4 as you suggested, 
>but I am a little unclear as to the capability of this GLLAMM program 
>to create scoring coefficients after running the factor analysis.
>
>
>Chihmao.
>
>-----------------------------------------------------
>Chihmao Hsieh
>John M. Olin School of Business
>Washington University
>Box 1133, One Brookings Drive
>St. Louis, MO 63130
>Email:  [email protected] http://students.olin.wustl.edu/~hsieh
>
>
>-----Original Message-----
>From: [email protected]
>[mailto:[email protected]] On Behalf Of Sophia 
>Rabe-Hesketh
>Sent: Monday, September 08, 2003 1:47 PM
>To: [email protected]
>Subject: st: Re: Factor analysis of count data
>
>
>Dear Chihmao Hsieh,
>
>You can estimate confirmatory factor models for count-data (and many 
>other response types) by maximum likelihood using gllamm. gllamm uses 
>adaptive quadrature to  evaluate the likelihood. If your model involves

>only one or two factors, it shouldn't take that long to estimate the 
>model.
>
>For more information on gllamm, see
>
>http://www.iop.kcl.ac.uk/IoP/Departments/BioComp/programs/gllamm.html
>
>You may find Chapter 4 of the gllamm manual useful.
>
>Best regards,
>
>Sophia
>
>----- Original Message -----
>From: "Chih-Mao Hsieh" <[email protected]>
>To: <[email protected]>
>Sent: Monday, September 08, 2003 6:13 PM
>Subject: st: Factor analysis of count data
>
>
>> Dear Statalisters,
>>
>>
>> While work has been done on developing factor analytical methods for
>non-normal data like categorical variables, less has been done until 
>recently on factor analysis of count data.  Is there any technical 
>information on how STATA might handle factor analysis of count data 
>(especially code)?  I've looked at the manuals but have not found good 
>stuff.  I expect my observations numbering in the tens of thousands, 
>and significant levels of overdispersion.
>>
>> Many thanks for any advice.
>>
>>
>> Chihmao Hsieh
>> PhD candidate, Strategy
>> Olin School of Business
>> Washington University in St. Louis
>>
>> *
>> *   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/
>>
>
>*
>*   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/
>
>*
>*   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/
>
*
*   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/

*
*   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