Announcement

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

  • How to remedy error r900?

    Hello!
    I received this error which makes no sense to me. I am trying to run a command I used on homework to a different dataset and don't understand why it's not working. The error is r900 no room to add more variables
    My command was asking for only two variables
    spagplot pago_dia_dol survey in 1/10, id( id)
    Essentially I want to see people's daily pay change over time-- (survey is my time variable--it represents the baseline, exit survey, 4 follow up surveys and a final survey). is the survey variable stored as the wrong type? Not sure how to remedy this.
    Thanks

    Code:
    * Example generated by -dataex-. To install: ssc install dataex
    clear
    input long id float(pago_dia_dol survey)
    1 . 0
    1 . 1
    1 . 2
    2 . 0
    3 . 0
    4 . 1
    4 . 6
    4 . 0
    5 . 3
    5 . 6
    end
    label values id id
    label def id 1 "Hhr-005e9e8-13b", modify
    label def id 2 "Hhr-00b69bf-667", modify
    label def id 3 "Hhr-00d90fa-b13", modify
    label def id 4 "Hhr-00d90fa-e7a", modify
    label def id 5 "Hhr-00da329-1ae", modify
    label values survey survey1
    label def survey1 0 "BL", modify
    label def survey1 1 "exit", modify
    label def survey1 2 "mo6", modify
    label def survey1 3 "mo12", modify
    label def survey1 6 "final", modify

  • #2
    Ok I found an old forum posting (from [email protected]) that provides a command that generates the spag plot another way but I don't think it's giving me a random selection of 10 (I'd probably change that to more--250 maybe)

    It is this: twoway line daily_earnings_dol survey if id < 250, connect(L)

    Maybe someone might be familiar with this way of generating spag plots and can advise on
    1) how I can adapt it to request a random selection of observations from among the dataset
    2) how I can adapt the command to specify only a subset of observations on the y axis (if daily earnings is less than $10) Here is the command that is saying I've specified too many variables: spagplot daily_earnings_dol survey if daily_earnings_dol <=10, id( id)
    3) or a subset of people by age or sex (variations on the ones I originally tried below that generate the r900 error)
    spagplot daily_earnings_dol survey if sex == 0, id( id)

    spagplot daily_earnings_dol survey if agec <=-3.54, id( id)
    spagplot daily_earnings_dol survey if agec <=-3.55 & agec <= -0.54, id( id)

    Thanking anyone in advance!
    Last edited by Heather Dolphin; 11 Nov 2021, 14:07.

    Comment

    Working...
    X