Announcement

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

  • Problems of pathview package written by Scott Long

    Dear Stata Users,

    Hope someone here has used -pathview- written by Scott Long. It is a package for Stata to construct parallel coordinates for categorical Data. I installed the package from http://www.indiana.edu/~jslsoc/stata. When I run the -pvdata- command, Stata alarms me "unrecognized command: pvdata". I detect the ado files (pvdata4.ado, pvsel4.ado, pvplot4.ado), and find the problem may due to the version sign. So I substitute pvdata/pvsel/pvplot for all the pvdata4/pvsel4/pvplot4 strings. After these substitutions, the command seems to be recognized by Stata.
    And I run the following codes on the dataset that show you by dataex. The -pvdata- and -pvsel- commands do not get alarm message from Stata, but unfortunately, the successive -pvplot- command is lack of luck and gets from Stata a message which showed in last code below. I wonder if there's someone familiar with -pathview- could give me some advice. Thank you.
    Add: Long's PathView introduction webpage seems unmaintained http://www.indiana.edu/~jslsoc/research_pathview.htm
    and the webpage attached in pvstata help file is lost http://www.indiana.edu/~jslsoc/pathview.htm

    Code:
    * Example generated by -dataex-. To install: ssc install dataex
    clear
    input int id byte(item1 item2 item3 item4 item5 item6 item7 item8 item9)
     1 1 2 2 2 2 2 2 2 2
     2 1 1 2 1 1 1 1 2 2
     3 3 5 4 5 2 2 2 4 2
     4 4 4 2 2 4 1 1 2 1
     5 1 2 3 5 1 3 2 2 1
     6 5 3 2 2 2 1 3 5 5
     7 1 2 2 2 2 2 2 3 1
     8 2 2 1 1 2 2 2 2 2
     9 2 2 1 2 1 2 1 1 3
    10 2 1 2 2 2 1 2 2 2
    end
    Code:
    pvdata item1 item2 item3 item4 item5 item6 item7 item8 item9, id(id)
    pvsel, all(1 2 3 4 5)
    pvplot
    Code:
        Variable |       Obs        Mean    Std. Dev.       Min        Max
    -------------+--------------------------------------------------------
           item1 |        80         2.2     1.33502          1          5
    1 invalid name
    r(198);
    Last edited by Chen Samulsion; 01 Mar 2018, 02:29.

  • #2
    I run hammock (SSC) on the data above and get a graph like this:
    Code:
    hammock item1-item9
    Click image for larger version

Name:	hammock.png
Views:	1
Size:	59.7 KB
ID:	1432191

    Comment


    • #3
      It seems that there is a bug in -pvdata- command (a part of -pathview-) that should be fixed. Using the data and codes in #1, I get the following graph. It is equivalent to the graph in #2.
      Click image for larger version

Name:	pathview.png
Views:	1
Size:	108.3 KB
ID:	1486836
      Last edited by Chen Samulsion; 06 Mar 2019, 02:36.

      Comment

      Working...
      X