Digital Workshop

Welcome to the Digital Workshop Message Boards
It is currently December 22nd, 2024, 10:33 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 8 posts ] 
Author Message
 Post subject: GotoPage Random
PostPosted: December 17th, 2010, 2:20 pm 
Offline
Godlike
Godlike

Joined: November 11th, 2004, 1:18 pm
Posts: 1213
Location: New York
Opus: Opus Pro 9.75
OS: Windows 10 Pro 64 bit
System: Core i7, 16G RAM, Nvidia 640GT (desktop), plus Windows 10 and Android tablets
Hi,

Using Opus, I am working on an interesting learning project to replicate a psychology research experiment. The test subject views a series of words and presses the space bar when they recognize specific ones.There are 4 different trials of 70 each trial.

The challenge is that the word list from the experiment has groups of 3 words each. And the number of times randomly shown totals 20 or 30 depending on the group. 30 is not a problem, 10 each word. But 20, using random selection, is a problem since 20 is not evenly dividable by 3 (can't use a random pattern of 6.66). If these were easily dividable in whole numbers, then create 70 pages and hard code words from each of the 3 word groups (30, 20, 20) and use next random to select the page sequence viewed. But this will not work in this case since there are 2 groups of 20 not dividable by 3. (Slide show with random has the same problem.)

So, a complex (for me) script function (for example, using GotoPage) would be needed that would randomly choose 20 from a 3 page/word group, choose 20 from a second 3 page/word group and 30 from a third 3 page/word group, mix them all together and show them randomly until 70 reached. This script is what I need help with. Can't get my brain around how to write it correctly.

(By the way, I think the sampling concept is 'randomization without replacement.' Way beyond my comprehension.)

Any help would be appreciated.

Kind Regards,

_________________
Stephen


Last edited by Stephen on December 18th, 2010, 4:00 pm, edited 1 time in total.

Top
 Profile  
 
 Post subject: Re: GotoPage Random
PostPosted: December 17th, 2010, 10:33 pm 
Offline
Godlike
Godlike

Joined: November 12th, 2005, 1:56 am
Posts: 1474
Location: SFBay Area
Opus: OpusPro v9.0x, & Evol.
OS: Vista32
System: Core 2 duo 2Ghz, RAM 3GB, Nvidia Go 7700 - laptop
I read the above 3x, and still do not understand it. :cry:
I cannot understand what you start with in terms of the word_triples. Do you have to build the 3-word group from separate sets of individual words. If so, how big is the source set? Does the order of the words matter?
Quote:
a 3 page/word group
?? is that a set of three words, that you placed on a page?

I'm shooting in-the-dark here, so ignore this if it does not fit the problem. Also, it does attempt to implement the '30-20-20' which I also do not grasp.
If you are building a set of 3 words to display and the individual words come from different pools (or source sets) and the displayed order is not changing -- I think you could simply use 3 variables in a text object on a single Page. Use an array index for the random aspect (done for each of 3 source pools), and use that to look-up the array selection (text value) from each pool.

Quote:
'randomization without replacement'
Osni has posted a sample pub before, with an array random script. Just search for: random repeat (it's in a thread that covers 3 pages)
Maybe that will help.

_________________
_good things come to those who wait(0)_


Top
 Profile  
 
 Post subject: Re: GotoPage Random
PostPosted: December 17th, 2010, 11:18 pm 
Offline
Godlike
Godlike

Joined: November 11th, 2004, 1:18 pm
Posts: 1213
Location: New York
Opus: Opus Pro 9.75
OS: Windows 10 Pro 64 bit
System: Core i7, 16G RAM, Nvidia 640GT (desktop), plus Windows 10 and Android tablets
Hi Larry,

Thanks for your reply and suggestions. I will search for Osni's posting on random repeats.

Sorry about my poor description. It's a difficult project to describe. Here's another try at description:

The concept is Go/No Go Association Task or GNAT and is used to elicit sub-conscious impressions (implicit rather than explicit ones-GNAT is a variation on Implicit Association Tasks or IAT's) The test taker is shown a screen on which words rapidly appear (display for 600 ms, 400 ms to transition to the next page). If the categories for example are "Good," "partner" and "Bad," then they are to press the space bar when they see a "Good" word like "peace," "vacation" and "gift" before the next page appears or a "partner" like "empathic" word in order to get a "correct" score for that. They also see a green "O" for a correct response and a red "X" for an incorrect one (so if they press the space bar for a "Bad" word, they see a red "X."

The trial consists of 70 words taken from 3 categories: (1) "Good," (2) "partner (3 descriptive words that the test taker enters before starting the trials, representing a partner's "first name," "pet name." and "characteristic," and (3) "Bad"("death," "accident," "tragedy". The 70 trial block of words is set up in a ratio of 2:2:3. So, there are 20 "Good" words, 20 "partner" words and 30 "Bad" words. The same 3 words in each category are randomly mixed in, one on each page totaling 70 pages, until the 3 "Good" words are used randomly totaling 20 times (on 20 pages), the 3 "partner" words are used randomly totaling 20 times (on 20 pages) and the 3 "Bad" words are used randomly totaling 30 times (on 30 pages).

I tried setting this up with 70 pages, but the problem is that 2 of the categories of 3 words that need to be displayed totaling 20 pages for each category ("Good" and "partner" word categories) can't be hard coded into 20 pages, since 20 is not dividable by 3 (30 for the "Bad" category" is dividable). So, another method of setting up the appropriate random pattern is needed. I've tried concepts like generating random numbers (1,2,3), and if/else, ReplaceSelection, but this didn't work.

I know that Opus can achieve this pattern, but so far the scripting and design has eluded me.

One idea that may work would be to change the word text (ReplaceSelection) between the 3 "Good" and 3 "partner" words for some pages (2?), maybe using a random generator (of 3).

Kind Regards,

_________________
Stephen


Top
 Profile  
 
 Post subject: Re: GotoPage Random
PostPosted: December 18th, 2010, 3:05 pm 
Offline
Godlike
Godlike

Joined: November 12th, 2005, 1:56 am
Posts: 1474
Location: SFBay Area
Opus: OpusPro v9.0x, & Evol.
OS: Vista32
System: Core 2 duo 2Ghz, RAM 3GB, Nvidia Go 7700 - laptop
Okay. I'll give some thought to it, but I am coming up with a couple different interpretations of the problem. One is...

'Good' source words: peace, vacation, gift
'Partner' source words: firstname, petname, trait (or whatever the subject inputs corresponding to those)
'Bad' source words: death, accident, tragedy

Each Opus Page only displays a single word (not a set of three words). 70 Pages.

_________________
_good things come to those who wait(0)_


Top
 Profile  
 
 Post subject: Re: GotoPage Random
PostPosted: December 18th, 2010, 3:44 pm 
Offline
Godlike
Godlike

Joined: November 11th, 2004, 1:18 pm
Posts: 1213
Location: New York
Opus: Opus Pro 9.75
OS: Windows 10 Pro 64 bit
System: Core i7, 16G RAM, Nvidia 640GT (desktop), plus Windows 10 and Android tablets
Hi Larry,

Yes, each page displays one word: 20 "Good" word pages, 20 "partner" word pages and 30 "Bad" word pages, totaling 70. Mixed together using GotoPage Next Random. A counter incrementing On Show for each page, and when the counter = 70, goes to the score page.

(By the way, the pub has 4 practice trials, 16 pages each, plus 4 trials, 70 pages each. A lot of pages (344 plus introductory, learning, score pages, so maybe 350-360 pages).

So far, the best I can come up with, for example, for the 20 "Good" word pages is to have the 3 "Good" words used 6 times each, totaling 18 pages, and the last 2 "Good" word pages to have a random generator (1 or 2 or 3), with if/else (if 1, show "peace", else/if 2, show "vacation," else/if 3, show "gift"). This at least randomly gives all of the 3 "Good" words a chance to each take one of the remaining 2 pages. All still totals 20.

I'm not sure there is a better or more precise way to do this. (Nor would it make a difference.) To set up a rotation from one trial administration to another second administration, to a third, and rotate evenly through the 3 words for the 3 administration, this would require saving the choice and eliminating it for the second or third administration. Generally, the trials are administered once.

Kind Regards,

_________________
Stephen


Top
 Profile  
 
 Post subject: Re: GotoPage Random
PostPosted: December 18th, 2010, 11:56 pm 
Offline

Joined: November 25th, 2004, 1:24 pm
Posts: 512
Location: Scotland
Opus: 9.75
OS: Win 10
System: Asus i7-7700K 16Gb
Not sure if this is useful, some time ago, I posted a function which would generate non repeating randomised list of numbers between "A" and "B", so you could run the function for a random list between 1 and 20, then run it again for 21 to 40, then a third time for 41 to 70.
I am still not clear exactly what you are trying to do, but this may useful?


viewtopic.php?f=4&t=4083&start=0

sandy

_________________
Whoever designed this, never actually used it!


Top
 Profile  
 
 Post subject: Re: GotoPage Random
PostPosted: December 19th, 2010, 1:15 am 
Offline
Godlike
Godlike

Joined: November 12th, 2005, 1:56 am
Posts: 1474
Location: SFBay Area
Opus: OpusPro v9.0x, & Evol.
OS: Vista32
System: Core 2 duo 2Ghz, RAM 3GB, Nvidia Go 7700 - laptop
Stephen,

I sent you an email with some code you can try. The scripts are more complex than they need to be, but they give you some flexibility to change if I have misunderstood the set-up needed, or if your client later wants to change the parameters for the word sets. I think this can all be done on a single Opus Page better than on 70 Pages, and still have visual transition effects and timing -- can look like you've got a new page.

I've left it incomplete as I see Sandyn above has the last piece, the key piece needed for randomizing the display sequence. Just bring that in to pick elements from the Array of 70 words.

BTW, Paul in NZ gave some extra array manipulation scripts in this post:
viewtopic.php?f=4&t=349&p=1404&hilit=pop+push#p1404

_________________
_good things come to those who wait(0)_


Top
 Profile  
 
 Post subject: Re: GotoPage Random
PostPosted: December 19th, 2010, 4:01 am 
Offline
Godlike
Godlike

Joined: November 11th, 2004, 1:18 pm
Posts: 1213
Location: New York
Opus: Opus Pro 9.75
OS: Windows 10 Pro 64 bit
System: Core i7, 16G RAM, Nvidia 640GT (desktop), plus Windows 10 and Android tablets
Thanks Sandy and Larry for your help.

Sandy,

I had briefly looked at this randomization script in my forum search for solutions, which catalyzed some fruitful ideas about using randomization, which I am using.

Larry,

I had tried earlier to use single pages for 70 item trials earlier (ReplaceSelection or by inserted variables which changed values), but found that this somehow conflicted with KeyPress (Space) working properly for user input to choose responses and score them, all within 1 second before the next word showed. I don't believe IsKeyPressed can work with a Space bar. So, I moved to using a separate page for each word.

I plan to revisit the single page concept and further review your script. It would be far smoother and more economical if I can get this to work with single pages for each trial. The array materials in the script are very useful. I can try to build on these.

Again, thanks very much, Sandy and Larry, for your help. I'll keep at it, trying to get this working.

Kind Regards,

_________________
Stephen


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 8 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: No registered users and 26 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group