Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Supported by

what happened to the "apply weight" option?

Hello

I cannot find the "apply weight" button in the current opensesame version.
Is there any other way to apply weights?

Thanks,
Tali

Comments

  • HI Tali,

    Yes, you can apply weights—and do much more—using the advanced loop operations.

    Say that you have a column named w that you want to use to weight the rows by (i.e. each row should occur as often as the value of w), you edit the loop script and add the following line:

    weight w
    

    Does that help?

    Cheers!
    Sebastiaan

  • Yes, thank you so much!

  • Hi,


    I am a bit confused by this. I created a column called w and then put numbers in for weighting (some I want to be shown once and some 4 times) but this column is in red - is this right? I also wasn't sure where about to put the weight w in the loop? It doesn't seem to like it anywhere but at the end. I ran it through and it doesn't seem to have worked - any help would be greatly appreciated.


    Cheers,


    Kim

  • Hi @KimS ,

    I created a column called w and then put numbers in for weighting (some I want to be shown once and some 4 times) but this column is in red - is this right?

    Yes, that's correct. The color and right-alignment simply indicate that they are numbers.

    I also wasn't sure where about to put the weight w in the loop?

    You have to edit the script for this. You can access the script by clicking on the view-script button in the top right.

    And then, at the very bottom of the script, add the following line:

    weight w
    

    See also:

    Cheers!

    Sebastiaan

  • That's great - thank you so much for your quick reply.

    Kim

Sign In or Register to comment.