Announcement

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

  • Error: barstyles[].remake_as_copy: class type not found (when creating box plots)

    Hi all,

    I'm working on creating multiple box plots for a project on student performance on standardized tests. One of the items I'm trying to produce is a matrix of box plots - each box would represent the test scores within a program of a certain academic department. Below is the syntax:

    graph hbox toeflcompi if ali_placeinten > 4 & accepted ==1 & planacademicorganization == "Music", by(primaryplancode) over(accepted) over(ali_placeinten)

    where variables:
    toeflcompi is the test score (continuous)
    ali_placeinten is a second test placement (continuous)
    accepted is whether or not accepted into department (dichotomous)
    planacademicorganization is the department (categorical)
    primaryplancode is the program (categorical)

    This produces the following error message: barstyles[].remake_as_copy: class type not found

    I've been able to successfully create a different matrix with: graph hbox toeflcompi if ali_placeinten > 4 & accepted ==1, by(planacademicorganization) over(accepted) over(ali_placeinten)

    Not sure whats going on, though I've narrowed it down to thinking the by clause is the problem. If I change the by to over, I'll get a box plot (not a matrix).

    Thoughts?

    Thank you!!!

  • #2
    Hi. I get the same problem if the by clause creates an empty stratum AND my frequecy weights are missing in the same stratum. Example:
    graph hbox MEIS [fweight=pw] , by(SMOKING EDUCATION SEX)
    If MEIS and pw are missing for all observations in one of the 24 combinations of SMOKING, EDUCATION and SEX, I get the error message: barstyles[].remake_as_copy: class type not found

    If I fix pw so that it doesn't assume missing values, the problem is fixed. My multiple box plots are produced as expected (but the one stratum remains empty, of course).

    I see that you don't use weights in your syntax, but maybe this still helps narrow it down.
    Last edited by Jørgen Meisfjord; 28 Mar 2023, 10:06.

    Comment


    • #3
      I'd send a dataset that evokes this problem to StataCorp technical support.

      Comment

      Working...
      X