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]
Re: st: SUREG with if command.
From
David Ashcraft <[email protected]>
To
"[email protected]" <[email protected]>
Subject
Re: st: SUREG with if command.
Date
Thu, 27 Sep 2012 04:57:03 -0700 (PDT)
I have downloaded -suregb- and follow the instruction given with the program: "After installing the package, give command itsp_ado to build the Mata object files." What I understand from the error message -itsp_ado is stored at c:\ado\plus. While I have my stata installed from D drive and ado files are stored at D:\Stata11\ado. How can I fix this problem without losing any content.
Regards
David
Below is the outcome:
itsp_ado
c:\ado\plus
. version 10.1
. mata: mata set matastrict on
. mata:
------------------------------------------------- mata (type end to exit) ----------------------------------------------------------------
: // aggreg 1.0.0 CFBaum 11aug2008
: void aggreg(string scalar vname,
> string scalar newvname,
> real scalar per,
> string scalar op,
> string scalar touse)
> {
> real colvector mult, v1, v2
> real matrix v3
> if (op=="A") {
> mult = J(per, 1, 1/per)
> }
> else if (op=="S") {
> mult = J(per, 1, 1)
> }
> else if (op=="F") {
> mult = J(per, 1, 0)
> mult[1] = 1
> }
> else if (op=="L") {
> mult = J(per, 1, 0)
> mult[per] = 1
> }
> st_view(v1=., ., vname, touse)
> st_view(v2=., ., newvname)
> v3 = colshape(v1', per) * mult
> v2[(1::rows(v3)), ] = v3
> }
: end
------------------------------------------------------------------------------------------------------------------------------------------
.
end of do-file
(note: file c:\ado\personal\aggreg.mo not found)
file c:\ado\personal\aggreg.mo could not be opened
r(603);
----- Original Message -----
From: Christopher Baum <[email protected]>
To: "[email protected]" <[email protected]>
Cc:
Sent: Wednesday, September 26, 2012 2:40:58 PM
Subject: Re: st: SUREG with if command.
<>
On Sep 26, 2012, at 2:33 AM, Mark wrote:
> It is indeed possible in principle to use the additional obs. -sureg-
> and -reg3- are estimating the error components for a 2-eqn model, so the
> estimated covariance matrix is 2x2:
>
> . qui reg3 (mpg rep78) (trunk turn), ols
>
> . mat list e(Sigma)
>
> symmetric e(Sigma)[2,2]
> mpg trunk
> mpg 29.274269
> trunk -5.0326348 12.233795
>
> The above uses OLS appled to 69 obs for both equations. If we use
> - -regress- to estimate the mpg eqn, where only 69 obs are available, we
> get the same error variance:
>
> . qui reg mpg rep78
>
> . di e(rmse)^2
> 29.274269
>
> But -regress- applied to the trunk equation on its own uses all 74 obs,
> and so the error variance is different (and, since it uses more obs,
> preferable):
>
> . qui reg trunk turn
>
> . di e(rmse)^2
> 11.848587
>
> In principle -sureg-/-reg3- should use the additional 5 obs when
> estimating the trunk equation. Not to do so is throwing away
> information.
That's why I wrote -suregub-. findit suregub
Kit
Kit Baum | Boston College Economics & DIW Berlin | http://ideas.repec.org/e/pba1.html
An Introduction to Stata Programming | http://www.stata-press.com/books/isp.html
An Introduction to Modern Econometrics Using Stata | http://www.stata-press.com/books/imeus.html
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/