Bookmark and Share

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   Nick Cox <[email protected]>
To   [email protected]
Subject   Re: st: SUREG with if command.
Date   Thu, 27 Sep 2012 14:24:31 +0100

I just checked and all worked fine for me. Note that -itsp_ado- (from
SSC module of the same name) includes the lines

loc plus `c(sysdir_plus)'
cd "`plus'"

which means that where you have Stata installed should not in any
sense be a complication, let alone a difficulty.
-itsp_ado- automatically changes to an appropriate location indicated
by your system to install files in an appropriate place.

aggreg.mo is the first file to be installed, yet Kit's program bails
out. That sounds like a problem with write permissions or write access
to your D: drive.

Nick

On Thu, Sep 27, 2012 at 1:50 PM, David Ashcraft
<[email protected]> wrote:
> I have further reviewed my commands. Apparently, problem is not with the location of PERSONAL directory rather it is with the file. As I have changed the location of PERSONAL folder to D-drive. I am getting the same error message: file D:\Stata11\StataAdo\Personal\aggreg.mo not found)". Any idea, Am I missing the file or my operating system has some issue. I am using Windows XP and Stata 11.
> Regards
>
> David
>
>
> ----- Original Message -----
> From: David Ashcraft <[email protected]>
> To: "[email protected]" <[email protected]>
> Cc:
> Sent: Thursday, September 27, 2012 2:57:03 PM
> Subject: Re: st: SUREG with if command.
>
> 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/
>
>
> *
> *   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/

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


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index