Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: st: RE: twoway scatter returns "unmatched quote"


From   Rike <silvery.enigma@gmail.com>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: RE: twoway scatter returns "unmatched quote"
Date   Mon, 16 Mar 2009 13:25:40 -0400

with -set race on- this is where it stops...

          ------------------------------------------------------------------
end _fr_area_parse_and_log ---
        - _fr_area_parse_and_log `log' plotregion1 PLOTRegion , `r(rest)'
        = _fr_area_parse_and_log __000001 plotregion1 PLOTRegion ,
l1title(`""') b1title(`"birth_month"') n
> ote("Graphs by dummy variable equal to one if urban, zero if rural)
          ----------------------------------------------------------------
begin _fr_area_parse_and_log ---
          - gettoken log 0 : 0
          - gettoken object 0 : 0
          - gettoken parseopt 0 : 0
          - local opt = lower("`parseopt'")
          = local opt = lower("PLOTRegion")
          - syntax [ , `parseopt'(string) * ]
          = syntax [ , PLOTRegion(string) * ]
unmatched quote
          ------------------------------------------------------------------
end _fr_area_parse_and_log ---
        ----------------------------------------------------------------------
end bygraph_g.parse_make ---
      - if (_rc == 4023) InvalidFamily `do'
      = if (_rc == 4023) InvalidFamily twoway
      - else if (_rc) exit _rc
        }
        if "`.`name'._scheme.isa'" != "" {
        set curscm `.`name'._scheme.objkey'
        }
        }
      ---------------------------------------------------------------------------------
end graph.Graph ---
    - local rc = _rc
    - gdi record = yes
    - gdi maybedraw = yes
    - gdi end
    - exit `rc'
    = exit 198
    -----------------------------------------------------------------------------------------
end graph ---
  ------------------------------------------------------------------------------------------
end twoway ---
r(198);
r(198);





On Mon, Mar 16, 2009 at 12:14 PM, Rike <silvery.enigma@gmail.com> wrote:
> Yes-
>
> ta status
> 0 rural
> 1 urban
>
> but I still can't get the graph work..
>
>
>
> On Mon, Mar 16, 2009 at 11:28 AM, Richard Ochmann <rochmann@diw.de> wrote:
>> does this do what you want?
>>
>> ***
>> label define status 0 "rural", modify
>> label values status status
>> tab status
>> ***
>>
>> assuming the variable "status" exists.
>>
>> best, rich
>>
>>
>>
>>
>> Rike <silvery.enigma@gmail.com>
>> Gesendet von: owner-statalist@hsphsun2.harvard.edu
>> 16.03.2009 16:16
>> Bitte antworten an
>> statalist@hsphsun2.harvard.edu
>>
>>
>> An
>> statalist@hsphsun2.harvard.edu
>> Kopie
>>
>> Thema
>> Re: st: RE: twoway scatter returns "unmatched quote"
>>
>>
>>
>>
>>
>>
>> I added "modify"
>>
>> label define status 0 "rural", modify
>>
>> is what I did (sorry). But
>>
>> ta status
>>
>> returns
>>
>> 0
>>
>> 1 urban
>>
>>
>>
>>
>>
>> On Mon, Mar 16, 2009 at 11:10 AM, Friedrich Huebler <fhuebler@gmail.com>
>> wrote:
>>> Rike,
>>>
>>> What do you mean by "it doesn't add a label for 0"? Stata can assign
>>> labels to zeros. Did you forget the -modify- option?
>>>
>>> . sysuse auto
>>> . d foreign
>>>              storage  display     value
>>> variable name   type   format      label      variable label
>>> ------------------------------------------------------------
>>> foreign         byte   %8.0g       origin     Car type
>>>
>>> . lab list origin
>>> origin:
>>>           0 Domestic
>>>           1 Foreign
>>>
>>> . lab def origin 0 "Rural", modify
>>> . lab list origin
>>> origin:
>>>           0 Rural
>>>           1 Foreign
>>>
>>> . tab foreign
>>>   Car type |      Freq.     Percent        Cum.
>>> ------------+-----------------------------------
>>>      Rural |         52       70.27       70.27
>>>    Foreign |         22       29.73      100.00
>>> ------------+-----------------------------------
>>>      Total |         74      100.00
>>>
>>> Friedrich
>>>
>>> On Mon, Mar 16, 2009 at 10:54 AM, Rike <silvery.enigma@gmail.com> wrote:
>>>> Hi,
>>>>
>>>> I think the problem lies in the label. The variable "status"" takes 0
>>>> for rural and 1 for urban, but I'm not able to assign a label to 0
>>>> (and "urban" is already assigned to 1). I ran
>>>>
>>>> la def status 0 "rural"
>>>>
>>>> it doesn't add a label for 0 which is odd...
>>>>
>>>>
>>>> On Mon, Mar 16, 2009 at 7:21 AM, Nick Cox <n.j.cox@durham.ac.uk> wrote:
>>>>> No quotes are included in what you report here as typed.
>>>>>
>>>>> So, check out in turn
>>>>>
>>>>> 1. Any unmatched quotes in the variable label of -status-.
>>>>>
>>>>> 2. Any unmatched quotes in the value labels of -status- (if any).
>>>>>
>>>>> 3. Any unmatched quotes in the values of -status- (if it is a string
>>>>> variable).
>>>>>
>>>>> 4. Repeat 1 for your other variables.
>>>>>
>>>>> My guess is #1.
>>>>>
>>>>> Then remove the unmatched quote _or_ insert a matching quote and
>> reissue
>>>>> the -graph- command.
>>>>>
>>>>> Nick
>>>>> n.j.cox@durham.ac.uk
>>>>>
>>>>> Rike
>>>>>
>>>>> I tried it without the space (I mistakenly put it back there when I
>>>>> copied the code for the list) but I get the same error. Any other
>>>>> ideas?
>>>>>
>>>>> Kieran McCaul
>>>>>
>>>>>> You have a space in the -by- option.
>>>>>> -by (status)- should be -by(status)-
>>>>>
>>>>> Rike
>>>>>
>>>>>> I'm running the following code:
>>>>>>
>>>>>> twoway scatter ratio month, by(status) c(l) xlabel(1(1)12)
>>>>>>
>>>>>> twoway scatter ratio1 ratio2 ratio3 ratio4 month, by (status)
>>>>>> connect(l l l l) xlabel(1(1)12)
>>>>>>
>>>>>> where status is a dummy. Stata returns an r(198) error, and it
>>>>>> happened when I added the by-option. I would also like to use
>>>>>> by(status, total) later on. Any suggestions? Thanks in advance.
>>> *
>>> *   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/



© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index