114: Computing a variable in JASP

Поделиться
HTML-код
  • Опубликовано: 21 авг 2024

Комментарии • 5

  • @perpalmgren2820
    @perpalmgren2820 Год назад +1

    Hi,
    I am a big fan of your chanel. Two questions. How do I go about in JASP to:
    a) create a new nominal (binary) variable from a scale variable. So, I have an age variable (denoted as year of age) and I want to dichotomize this to a nominal variable with two levels, thus, under or equal to the mean age =1 and over the mean age = 2.
    b) collapse an ordinal scale (Likert) with five steps to an ordinal scale with three steps. Thus, I want 1 & 2 =1, 3=2 and 4 & 5 =3.
    Would be great with two videos on this common problem.

    • @ShipUSTATS
      @ShipUSTATS  Год назад

      So these are all great questions and I will eventually make a video on them. For the first one this is easy you will need to use the ifelse statement in JASP. First you would add this under test you would add the greater than symbol on one side of that you would enter age and the other side you would enter mean(Y) and then enter age in the y spot. (I do something similar in this video: ruclips.net/video/o5E8Bs3RVJI/видео.html ) then you would enter 2 in the then spot and 1 in the else spot.
      The second one is a bit more dificult. but also includes the ifelse statements. Here you enter ifelse then in the else you would enter = on the left side of it you would put your variable and on the other side you would put 1. In then you woudl put 1 and in else you would then put an ifelse statement and repeat this time with = 2 then as a 1 and then in else you would put ifelse this time you would have your variable = to 3 and your then as 2 and then add your if else again to else. You have to keep doing this until the last one and then else would just be the final value. Let me know if this makes sense I will get to a video on this eventually but that is the technique I have worked out.

  • @caglacakr326
    @caglacakr326 10 месяцев назад +1

    Hi, thanks for this valuable series of tutorials. I am relatively beginner on this statistics courses and I have a question. When I want to compute a variable as in this video, I am getting an error from the JASP that is about my added scores are somehow below the maximum or smt like that. So I can not compute a variable then see the total score of inventory for each subject. How can I solve this problem? (Note: my inventory has 52 questions with the scale of measure on 1 to 6. That's why the total scores are high.)

    • @caglacakr326
      @caglacakr326 10 месяцев назад +1

      Here is the error I face when I try to calculate total scores and compute a variable with this.
      Error: Error in parse(text = .rCode): contextstack overflow at line 1
      tryCatch(suppressWarnings({
      returnVal

    • @ShipUSTATS
      @ShipUSTATS  10 месяцев назад +1

      ​@@caglacakr326 I am not familiar with this particular error but some things I would recommend checking. 1. Do you have any special characters in any of your variable names? ($%&# for example) JASP runs on R and sometimes R will read those characters as instructions and this can create errors. I just tried to run this myself I get a different error but similar in that it says text = .rcode 2. Are you sure there isn't a error in how you are adding up your variables? a missing instruction or an odd instruction somewhere. If none of these work I would recommend that you check to see if your version of JASP is up to date and if that doesn't work the people who support JASP have a way to report bugs and you could directly ask them: github.com/jasp-stats/