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: R: variable not found?
From
Paul Burkander <[email protected]>
To
[email protected]
Subject
Re: st: R: variable not found?
Date
Mon, 24 Oct 2011 16:53:26 -0400
The use of -test- in this case is not unnecessary, and if it's
incorrect I'd rather you tell me why. Please see
http://www.ats.ucla.edu/stat/stata/dae/mvreg.htm for an explanation of
the usefulness of the joint test across equations. This exercise
follows the example on that page almost exactly.
Also please note that this question has nothing to do with the
substance of the homework, but with what still appears to be a bug in
stata. I should also note that the homework has been handed in, so no
advice given here will affect it.
Exactly what I did: using emacs, I replaced the spaces with commas.
then in stata:
insheet using filename
manova motive aspire algebra geom =group
mvreg
test group
Which gave the error "group not found." Below is the log.
What exactly did you type that didn't result in error?
Thank you.
Paul
. insheet using data.csv
(5 vars, 221 obs)
. des
Contains data
obs: 221
vars: 5
size: 4,641 (99.9% of memory free)
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
storage display value
variable name type format label variable label
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
motiv float %9.0g MOTIV
aspire float %9.0g ASPIRE
algebra float %9.0g ALGEBRA
geom float %9.0g GEOM
group byte %8.0g GROUP
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Sorted by:
Note: dataset has changed since last saved
. manova motiv aspire algebra geom = group
Number of obs = 221
W = Wilks' lambda L = Lawley-Hotelling trace
P = Pillai's trace R = Roy's largest root
Source | Statistic df F(df1, df2) = F Prob>F
-----------+--------------------------------------------------
group | W 0.9056 1 4.0 216.0 5.63 0.0002 e
| P 0.0944 4.0 216.0 5.63 0.0002 e
| L 0.1043 4.0 216.0 5.63 0.0002 e
| R 0.1043 4.0 216.0 5.63 0.0002 e
|--------------------------------------------------
Residual | 219
-----------+--------------------------------------------------
Total | 220
--------------------------------------------------------------
e = exact, a = approximate, u = upper bound on F
. mvreg
Equation Obs Parms RMSE "R-sq" F P
----------------------------------------------------------------------
motiv 221 2 17.81392 0.0384 8.740918 0.0035
aspire 221 2 14.48455 0.0920 22.19203 0.0000
algebra 221 2 17.94691 0.0318 7.20056 0.0078
geom 221 2 14.22695 0.0615 14.34351 0.0002
------------------------------------------------------------------------------
| Coef. Std. Err. t P>|t| [95% Conf. Interval]
-------------+----------------------------------------------------------------
motiv |
1.group | 7.413426 2.507497 2.96 0.003 2.471512 12.35534
_cons | 42.30231 2.01703 20.97 0.000 38.32703 46.27758
-------------+----------------------------------------------------------------
aspire |
1.group | 9.604709 2.038852 4.71 0.000 5.586426 13.62299
_cons | 62.79179 1.640052 38.29 0.000 59.55949 66.0241
-------------+----------------------------------------------------------------
algebra |
1.group | 6.778811 2.526216 2.68 0.008 1.800006 11.75762
_cons | 45.65538 2.032087 22.47 0.000 41.65043 49.66033
-------------+----------------------------------------------------------------
geom |
1.group | 7.584382 2.002592 3.79 0.000 3.637563 11.5312
_cons | 66.57667 1.610884 41.33 0.000 63.40185 69.75149
------------------------------------------------------------------------------
. test group
group not found
r(111);
On Mon, Oct 24, 2011 at 2:16 PM, Steven Samuels <[email protected]> wrote:
>
> Sorry, my reply was incomplete. I get no error message with -test- -mvreg- after pasting your data into BBEdit, replacing commas with spaces, and making all names lower case. You haven't actually shown us, as the FAQ request, exactly what you typed.
>
>
> Steve
>
>
> Paul,
>
>
>
> Your use of the -test- statement appears to be incorrect, and unnecessary too. The output of -manova- do give the (four) tests that all groups have zero coefficiernts
>
> You must test four coefficients, not one, if you want a global test of group differences.
> I'd also remind the group that the FAQ suggest we don't respond to requests for help with homework.
>
>
> Steve
>
>
> On Oct 24, 2011, at 4:14 PM, Paul Burkander wrote:
>
> In my attempt at brevity, I didn't note that the variables are turned
> to lowercase when pasted, and we were running the command with the
> correct case. And the error is actually "regressor group not found"
> My apologies for the erroneous description.
>
> This seems like a bug. It's replicated in stata 12.
>
> On Mon, Oct 24, 2011 at 6:01 AM, Nick Cox <[email protected]> wrote:
>> Whatever the problem is, that will not solve it.
>>
>> -format- changes display format only; it doesn't otherwise change the status of any variable, especially its kind, type or storage characteristics.
>>
>> Nick
>> [email protected]
>>
>> Christian Otchia
>>
>> You should format the variable after pasting in Stata 11.
>>
>> Try this:
>>
>> format %6.1g GROUP
>>
>> test GROUP
>>
>>
>> Paul Burkander
>>
>>> I'm trying to help my wife do some stata homework, and we've run into
>>> some odd behavior.
>>>
>>> Below is a sample of the data. She's supposed to do a manova of
>>> MOTIV,ASPIRE,ALGEBRA,GEOM, on GROUP , then mvreg, then test the
>>> restriction that the coefficients on GROUP are zero in all four
>>> equations. After doing the manova and mvreg, we typed test GROUP, but
>>> receive the error message "GROUP not found."
>>>
>>> Any ideas? Perhaps we're doing something dumb? She entered the data
>>> by pasting into the data editor. We're using Stata 11 SE and I just
>>> did a full update.
>>>
>>> Thanks, Paul
>>>
>>> MOTIV,ASPIRE,ALGEBRA,GEOM,GROUP
>>> 74.31,78.57,68.59,78.57,1
>>> 27.15,61.91,37.15,71.43,1
>>> 64.31,90.48,67.16,83.34,1
>>> 40.01,64.29,48.59,59.53,1
>>> 35.73,59.53,31.44,54.76,1
>>> 55.73,83.34,60.02,85.72,0
>>> 52.87,64.29,62.88,69.05,0
>>> 58.59,71.43,64.31,80.95,0
>>
>> *
>> * 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/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/