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

Re: st: Re: -betacoef-


From   "Clive Nicholas" <[email protected]>
To   [email protected]
Subject   Re: st: Re: -betacoef-
Date   Tue, 13 Jan 2004 14:17:27 -0000 (GMT)

My grateful thanks to both Kit and Scott for putting me right (again).

C.

> On Jan 13, 2004, at 2:33 AM, Clive wrote:
>
>> I think I encountered a more fundamental problem with -betacoef-: I
>> couldn't get it to work! My current regressions are weighted (which
>> - -betacoef- has the ability to handle according to its description),
>> but
>> when I run a model such as:
>>
>> - -reg beatles john paul george ringo [pw=epstein]-
>> - -betacoef-
>>
>> I get an r(101) error. I've tried running -betacoef- after -reg [aw]-
>> and
>> without any weights at all. All I get is silence. Adding -betacoef- as
>> an
>> option to -reg- isn't allowed.
>>
>> Am I going somewhere wrong or is the package?
>
> Yes and no. I will revise the documentation to make it clear that it
> will not work with pweights, since summarize john [pw=epstein] is not a
> valid command. It works with fw (which I had tested), aw, and iw.
>
> The command itself is silent. Since you can always see the beta
> coefficients by using regress, beta, it does not display them. It does
> place them in r(beta). So if you do
>
> regress
> betacoef
> mat list r(beta)
>
> I wrote betacoef so that those writing programs can make use of the
> beta coefficients in further computations or displays. For instance,
> you might want to generate a matrix showing the beta coefficients for
> various units in a panel:
>
> webuse grunfeld,clear
> drop if company>5
> mat Betas = J(5,3,.)
> local matr
> forval i=1/5 {
> 	qui reg invest mvalue kstock if company==`i'
> 	betacoef
> 	mat Betas[`i',1] = r(beta)
> 	local matr "`matr' Comp`i'"
> 	}
> mat BetaC = Betas[1...,1..2]
> mat rownames BetaC = `matr'
> mat colnames BetaC = mvalue kstock
> mat list BetaC
>
> Kit
>
> *
> *   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/
>


CLIVE NICHOLAS        |t: 0(44)191 222 5969
Politics Building     |e: [email protected]
School of Geography,  |f: 0(44)870 126 2421
 Politics & Sociology |
University of         |
 Newcastle-upon-Tyne  |
Newcastle-upon-Tyne   |
NE1 7RU		      |
United Kingdom	      |http://www.ncl.ac.uk/geps

(c) The University of Newcastle upon Tyne is a registered trademark of
Universities UK, a division of World Wrestling Entertainment, a
subdivision of Fox Inc., part of Muddy Fox, a joint-stock partnership with
the band Mud. Muddy Fox is a subdivision of IMG/McCormack, a division of
Coca-Cola, part-owner of God, Jesus, Moses and Son (GJMS) Miracles plc.
GJMS Miracles is a registered trademark of the University of Newcastle
upon Tyne. All rights reserved 2003.
*
*   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