Search the Legacy Support Archive (up to v2020)
  1. Read-only archive (2005–2024). Posting is closed. Need help with MediaLab or DirectRT 2027? Email service@empirisoft.com.

    All words · “exact phrase” · -leave out

    Advanced search

Using subject and/or condition ID as variables

  1. #1
    jarvis24 Blair Jarvis, Administrator

    Using subject and/or condition ID as variables

    [edited from support email]
    I have a question regarding DirectRT v2006. I know that it is possible to present a participants prior response as a stimulus. However, is it also possible to present the participants Subject ID as a stimulus? I assume there is a way given that that info is recorded in the data file. My first guess was to use in the stim column the following ~=subj But that didn’t work and I suspect that only a trial number can be listed following the = .

    So, how can I present Subject ID as a stimulus WITHOUT having participants enter their ID # on an earlier trial…?

  2. #2
    jarvis24 Blair Jarvis, Administrator
    Let me see what I can do. You want it presented as if it were a text stimulus? So lets say in your input file, you have var(subj) anywhere you like and DirectRT would automagically replace that expression with the subject ID. so ~var(subj) would be replaced with ~22 for subject 22. !soundvar(cond) would be replaced with !sound17 if 17 were the condition ID.

  3. #3
    jarvis24 Blair Jarvis, Administrator
    Exactly! Thanks

  4. #4
    jarvis24 Blair Jarvis, Administrator

  5. #5
    jarvis24 Blair Jarvis, Administrator
    [follow up edited from support email]
    I tried the update with var(subj), which works fine while the program is running. However, I noticed an unexpected problem. When the session ends - directrt creates a new input file that is a replication of the original file and is named as the original file with the addition of a suffix corresponding to the value of var(subj). For example, the name of my DirectRT input file is primeprog. I ran a session with subject id = 555. Within the session directrt correctly displays 555 when I use var(subj). However, it subsequently lists in the "Select and run an input file" pull down the original file "primeprog" and a new file "primeprog_555" This also happens with other id numbers.

  6. #6
    jarvis24 Blair Jarvis, Administrator
    Yup, it's the same consequence as if you use the random number generation functions. DirectRT actually makes a copy of the input file, generates and inserts the requests values, and then runs THAT input file rather than the origional. It was intended to be a benefit because you would have a permanent record of the input file actually administered to any given subject. I can see how this would be a pain though when searching for the appropriate input file to run when you have collected 100 or so of these. I'm open to suggestions. My first thought of course is to simply archive them once in a while as the number grows.

  7. #7
    REgarding the multiple input files named with the var(subj) prefix. Is there a way for directrt to store those additional files in some other folder so they are not displayed as an available input file? This would simply things for undergraduate RAs (i.e., no need to hunt for the "correct" input file among numerous files of similar names)?

    Lowell

  8. #8
    jarvis24 Blair Jarvis, Administrator
    Nope, the newly generated file has to go in the same folder because that is the input file that is actually run. I suppose one solution could be to have DirectRT move the files to another folder after they have been run.