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

Re: st: weighted regression


From   "Clive Nicholas" <[email protected]>
To   [email protected]
Subject   Re: st: weighted regression
Date   Tue, 13 Jan 2004 17:25:33 -0000 (GMT)

Vincenzo,

Easy!

(a) Create a variable for your weight (let's be really radical and call it
    -weight-);
(b) assign your weighting values to each case in -weight- as you wish; and
(c) run -reg y x1 x2 x3 [pw=weight]-.

Weights -fw-, -aw- and -iw- are also avaialble. Consult [U] section 23.16
for more on weights.

C.

> Dear stata users,
>
> I have a fairly easy question but I did not manage to find the solution. I
> want to regress a variable on another one but I do not want to give the
> same
> importance to all my points. For example, let's immagine I have:
>
> y  |  x
> --------
> 1  | 2
> 2  | 4
> 3  | 6
>
> To make a standard OLS, I would type reg y x.
>
> Now, I want to give a much higher importance to the last point than to the
> others. For example I want to weight the first two points by 1 and the
> last
> by 1.4. This should be done, for example, because of a non representative
> sample where an individual (or a group of individuals) has been clearly
> under-represented.
>
> Does anyone know how to do it?
>
> Thank for your help
>
> Reards
>
> VIncenzo
>
> _________________________________________________________________
> Consigue aqu� las mejores y mas recientes ofertas de trabajo en Am�rica
> Latina y USA: http://latam.msn.com/empleos/
>
> *
> *   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