Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • spmap option la() not allowed

    Hi all,

    I am trying to use the spmap feature in STATA/SE 15.0. I have been following the instructions on the spmap help page:
    HTML Code:
     https://www.stata.com/support/faqs/graphics/spmap-and-maps/
    properly. For the shapefile, I use the shapefile from the following Census link: <https://www.census.gov/geo/maps-data/data/cbf/cbf_state.html> . However, I keep getting the following error:

    option la() not allowed

    I have successfully used spmaps in the past and this has never happened to me but it is now really preventing me from moving forward and I am completely unable to figure out what the issue is given that it isn't even working with the help page's instructions.

    Appreciate any help provided as this is very urgent for me.
    TA

  • #2
    Welcome to Statalist.

    Please review the Statalist FAQ linked to from the top of the page, as well as from the Advice on Posting link on the page you used to create your post. Note especially sections 9-12 on how to best pose your question.

    Section 12.1 is particularly pertinent

    12.1 What to say about your commands and your problem

    Say exactly what you typed and exactly what Stata typed (or did) in response. N.B. exactly!
    While you've told us what Stata told you, you have not shown us the commands that led Stata to tell you that.

    The more you help others understand your problem, the more likely others are to be able to help you solve your problem.

    Comment


    • #3
      A look at the output of help spmap suggests that if your intent was to use the label() option on your spmap command, and you abbreviated label() to la(), then you abbreviated it too far - help spmap tells us lab() is the shortest abbreviation for the label() option to spmap.

      Comment


      • #4
        Hi William and all,

        I appreciate your help but I am not sure if I even specify the la or label option. I also apologise for not ensuring my initial post was up to accepted code. The exact commands were as follows. All of them are from the state spmap help-page I have pasted in my original question. Please note that cb_2016_us_state_5m is referring to the shp, dbf files I have downloaded from the US census website (https://www.census.gov/geo/maps-data...cbf_state.html)

        > shp2dta using cb_2016_us_state_5m, database(usdb) coordinates(uscoord) genid(id)
        > use stats
        > merge 1:1 scode using trans
        > drop _merge
        > merge 1:1 id using usdb
        > drop if _merge!=3
        > spmap pop1990 using uscoord if, id(id) fcolor(Blues)

        This is the error I end up getting:

        option la() not allowed
        r(198);


        Again, all of these commands are pretty much exact replicas of those used in the help-page (https://www.stata.com/support/faqs/g...pmap-and-maps/). I have used them in the past successfully to make it work but am constantly running into this specific error again and again.




        Comment


        • #5
          OK, I more-or-less followed the example in the FAQ and the code worked for me, at least insofar as it did not throw the error you encountered and it produces a graph.

          Do you have the most current versions of the spmap software packages? Note that spmap was updated in January of this year.
          Code:
          . which spmap
          /Users/lisowskiw/Library/Application Support/Stata/ado/plus/s/spmap.ado
          *! -spmap-: Visualization of spatial data                                      
          *! Version 1.3.2 - 09 January 2018 - StataCorp edit for stroke align           
          *! Version 1.3.1 - 29 March 2017 - StataCorp edit to tempfile macros           
          *! Version 1.3.0 - 13 March 2017                                               
          *! Version 1.2.0 - 14 March 2008                                               
          *! Version 1.1.0 - 7 May 2007                                                  
          *! Version 1.0.0 - 7 December 2006                                             
          *! Author: Maurizio Pisati                                                     
          *! Department of Sociology and Social Research                                 
          *! University of Milano Bicocca (Italy)                                        
          *! [email protected]                                                   
          
          . which shp2dta
          /Users/lisowskiw/Library/Application Support/Stata/ado/plus/s/shp2dta.ado
          *! version 1.0.9 15jul2015
          
          . which mif2dta
          /Users/lisowskiw/Library/Application Support/Stata/ado/plus/m/mif2dta.ado
          *! -mif2dta-: Converts MapInfo Interchange Format files to Stata datasets      
          *! Version 2.0.0 - 14 March 2008                                               
          *! Author: Maurizio Pisati                                                     
          *! Department of Sociology and Social Research                                 
          *! University of Milano Bicocca (Italy)                                        
          *! [email protected]
          If not, run
          Code:
          adoupdate
          and try again.

          If your problem persists, Stata Technical Services often recommends confirming that there haven't been problems with your installation or updating of Stata by running their Installation Qualification Tool found at

          https://www.stata.com/support/instal...qualification/

          If it reports problems, contact Stata Technical Services for advice.

          Comment


          • #6
            hi Adarsh, and all,

            i met the same problem and happy to see your request on this website. And now i manage to work it out and share some suggestions based on my experiences.
            previously, i can successfully translated and graphed from the ESRI file by using shp2dta and spmap. but i cannot do it again and the window came up with the same error: option la() not allowed,recently.

            the way i take is simple. just update your stata software to the latest version by typing:
            update all

            and it really works after update is completed.

            hope this will be useful to you.

            Comment


            • #7
              Dear statatalisters,

              I'm having the same problem, I've used spmap in the past succesfully. I'm now working with a Stata 15 version and I just installed spmap and shp2dta ado files. I first tried a pretty basic map and I'm getting the error you have mention:

              spmap households using coordenadas, id(id)

              option la() not allowed

              Have you found any solution so far?

              Thanks in advance

              Comment


              • #8
                Dear statalisters.
                Me too I am encountering the same error mentioned above.

                spmap using coord, id(id)

                option la() not allowed.


                Does anyone have a solution?

                Thank you.

                Comment


                • #9
                  Dear all,
                  Stata technical support tolde me that "In Stata 15, we have actually adapted the older -spmap- into a built-in command called -grmap-."
                  Using grmap instead of spmap I don't get the error anymore.


                  Veronica

                  Comment


                  • #10
                    I also faced the same problem with STATA 15, and Veronica's suggestion to use grmap worked well! Thanks a lot for this!

                    Comment


                    • #11
                      I'm reviving this older thread because someone emailed me about encountering this error while using maptile in Stata 15.0 and pointed me to this thread.

                      For those of you encountering "option la() not allowed" while using spmap in Stata 15.0, I expect that the issue will be solved by upgrading from Stata 15.0 to Stata 15.1. [Reference: https://www.statalist.org/forums/for...6#post1429856]

                      I'm not sure what underlying changes from Stata 14 to 15.0 to 15.1 were responsible for the creation and subsequent solution of this bug with spmap.

                      Comment

                      Working...
                      X