Statalist The Stata Listserver


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: RE: if-statements in sureg - not possible?


From   "Scott Merryman" <[email protected]>
To   <[email protected]>
Subject   st: RE: if-statements in sureg - not possible?
Date   Wed, 18 Jan 2006 19:36:34 -0600

I dont believe you can do with sureg-, however it is not too difficult to
�reshape- the data.

The example below regresses a cross-section of firms� investment on market
value and capital stock for nine years in a SUR framework.

webuse grunfeld, clear
keep if time <10
drop time

reshape wide invest mvalue kstock, j(year) i(company)
forv i=1935/1943 {
	local rhs "`rhs' ( invest`i' mvalue`i' kstock`i') "
}
sureg "`rhs'"

 
Hope this helps,
Scott

________________________________________
From: [email protected]
[mailto:[email protected]] On Behalf Of Peter Holm
Sent: Wednesday, January 18, 2006 12:09 PM
To: [email protected]
Subject: st: if-statements in sureg - not possible?

Hello,

I am new to the list and have a question about implementing the sureg
command.� I have cross-sectional time-series data with only four time
periods, and I want to estimate four seemingly unrelated cross-sections,
each corresponding to one period of the data, as an alternative to
estimating a time-series model.� So, I�d like to simply use the sureg
command on four equations, each having the same variable list but with an
�if� statement indicating the appropriate time period for that equation.�
Unfortunately, this is not a valid option under sureg � if terms can only be
applied to the set of equations as a whole.

Is there any way to get around this?

Thanks for any advice,
Peter Holm




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