Announcement

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

  • "Stata has stopped working"-error when using kdensity in twoway graph

    I am new to Stata and have recently run into problems with the graph twoway and kdensity commands in Stata 13.1.


    Code:
    kdensity x if x < 1000
    
    kdensity y if y < 1000
    both produce the desired graphical output. But when running

    Code:
    twoway (kdensity x if x < 1000) (kdensity y if y < 1000)
    I get a dialog box with the error message "Stata has stopped working" and Stata shuts down.


    Has anyone experienced something similar or have a clue as to what I am missing? I am able to produce e.g. twoway scatter plots without Stata issuing the same error

  • #2
    Morten:
    welcome to the list.
    I cannot replicate your problem, as the following:
    Code:
    . set obs 1000
    obs was 0, now 1000
    
    . g x=10000*runiform()
    
    . g y=10000*runiform()
    
    . twoway (kdensity x if x < 1000) (kdensity y if y < 1000)
    works for me (i.e., produces graphs) under both Stata 13.1/SE and Stata 14.2/SE.

    Are you sure that your version of Stata 13.1 is fully updated?
    Kind regards,
    Carlo
    (Stata 19.0)

    Comment


    • #3
      Thanks.

      Your example works for me as well, so I guess the problem is related to the data I am using. I will investigate this further.
      As I am working on a external server I cannot update my current version of Stata. But it seems the problem is related to something else.

      Best, Morten

      Comment


      • #4
        The next step might be to ask the Stata support folks. They are extremely helpful. If this is happening, it might indicate a bug.

        Comment

        Working...
        X