Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
st: RE: Histogram of a variable after running a regression
From
"Radwin, David" <[email protected]>
To
<[email protected]>
Subject
st: RE: Histogram of a variable after running a regression
Date
Mon, 2 Dec 2013 17:59:25 -0500
I'm not sure a histogram will give you the information you seek, but here is a simple example that yields a histogram for each independent variable.
sysuse nlsw88
regress wage age tenure hours
local names : colnames e(b)
local x _cons
local names : list names - x
foreach v of local names {
histogram `v', name(`v', replace)
}
David
--
David Radwin, Senior Research Associate
Education and Workforce Development
RTI International
2150 Shattuck Ave. Suite 800, Berkeley, CA 94704
Phone: 510-665-8274
www.rti.org/education
> -----Original Message-----
> From: [email protected] [mailto:owner-
> [email protected]] On Behalf Of Ejebu, Ouregazoe
> Sent: Monday, December 02, 2013 2:23 PM
> To: [email protected]
> Subject: st: Histogram of a variable after running a regression
>
> Dear Statalist,
>
> Please, is it possible to obtain an histogram of my independent variables
> after I have run my regression.
> For instance if I run y x1 x2...xn
> I would like to obtain the histogram of x2 to know its percentage in the
> overall sample.
>
>
> Thank you
>
> Kind Regards,
>
> Ourega-Zoé Ejebu
> Business School
> Room F02
> Edward Wright Building Annexe
> Dunbar Street
> University of Aberdeen
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/faqs/resources/statalist-faq/
* http://www.ats.ucla.edu/stat/stata/