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

Re: st: RE: Matrix


From   Roger Newson <[email protected]>
To   [email protected]
Subject   Re: st: RE: Matrix
Date   Mon, 21 Jul 2003 21:32:29 +0100

At 19:56 21/07/03 +0100, Nick Cox wrote (in response to Shige Song):
[email protected]

> I have a two level data set: students nested within school. Assume a
> simple case where there are only 4 variables:
>
> Y: math achievement, the dependent variable
> X: family background meausred in SEI, individual level covariate
> Z: school - average SEI, school level covariate
> S: school ID.
>
> I want to estimate a series of simple regression of Y on X
> within each
> context (each school), extract the coefficient vectors, and
> stack them
> (coefficient vector for each school) to form a coefficient matrix to
> include coeffcient vectors for all schools. What is the
> best way to do this?

-statsby- ?
Another possibility might be -parmby-, which is part of the -parmest- package. Type -ssc desc parmest- in Stata to find how to download the latest Stata 8 version from SSC. Alternatively, if Shige Song does not have Stata 8, then it is possible to download the Stata 7, 6 or 5 versions of -parmest- from my website at

http://www.kcl-phs.org.uk/rogernewson

by typing in Stata

net from http://www.kcl-phs.org.uk/rogernewson

At my website, you can also download a presentation I gave at the 2002 UK Stata User Meeting on -parmest-, which gives an example of combining the results of multiple regression models using -parmest-.

I hope this helps.

Roger


--
Roger Newson
Lecturer in Medical Statistics
Department of Public Health Sciences
King's College London
5th Floor, Capital House
42 Weston Street
London SE1 3QD
United Kingdom

Tel: 020 7848 6648 International +44 20 7848 6648
Fax: 020 7848 6620 International +44 20 7848 6620
or 020 7848 6605 International +44 20 7848 6605
Email: [email protected]
Website: http://www.kcl-phs.org.uk/rogernewson

Opinions expressed are those of the author, not the institution.

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