help needed

Victor t1msky at yahoo.co.uk
Thu Jul 16 17:45:35 UTC 2009


Asma,

You may have specified more levels in your experiment than 4 - in this
code, For i = 0 to 1 means that the loop will run twice (to add 2
unsampled itmes to the 2 sampled itmes in ratelist). If you want 6
unsampled itmes then you use For i = 0 to 5, for example, otherwise
you will get a Level specified is not valid error. Also, make sure
that there are sufficient levels in ratelist to accomodate these items
otherwise you will get the same error.

Tim

On Jul 15, 9:53 pm, alp115 <asmahani... at gmail.com> wrote:
> Thanks Tim.
>
> I am having trouble with this line:
>
> RecallList.SetAttrib counter, "Word", StudyList.GetAttrib (unsampled,
> "Word")
>
> Actually I am trying to design a similar experiment where some images
> the Triallist will be presented first and later along with some novel
> images (which were not shown in the block) are presented in a rating
> block.
>
> I have modified the code as follows:
>
> Dim i As Integer
> Dim novel As Integer
>
> For i = 0 To 1
>         'Choose levels until get a novel level
>         Do
>                 novel = Random(1, TrialList.Order.Count)
>         Loop Until  TrialList.GetAttrib(novel, "Old") <> "1"
>
>         'set the new sample as old
>         TrialList.SetAttrib novel, "Old", "1"
> Debug.Print novel
>         'add the level to RateList - increase counter to add levels
>         counter = counter + 1
>         RateList.SetAttrib counter, "image", TrialList.GetAttrib (novel,
> "image")
>
> Next i
>
> RateList.Reset
>
> The following Runtime error occurs after the trial block:
>
> Factor error: Level specified is not valid in RateList
>
> Can you give some insight about this error.
>
> Thanks very much,
> Asma
>
> On Jul 15, 3:11 pm, Victor <t1m... at yahoo.co.uk> wrote:
>
> > Hi Asma,
>
> > This inline uses a for...next loop in order to populate the recall
> > list with items that were not presented in the studyproc. Items that
> > have been sampled in the studyproc are set to 1 in the initial
> > studyproc phase. In the complete recalllist inline, variables are
> > first set to numbers (Dim i as integer and Dim unsampled as integer).
> > The code seraches for an item in the list which is not 1 (<> 1) using
> > Loop Until StudyList.GetAttrib(unsampled, "Sampled") <> "1". Once
> > found, the sample is then marked as sampled in the studylist using
> > StudyList.SetAttrib unsampled, "Sampled", "1". It is then added to the
> > recall list which will be used in the second phase of the experiment
> > using counter = counter +1 then RecallList.SetAttrib counter, "Word",
> > StudyList.GetAttrib (unsampled, "Word") with the correct answer for
> > the unsampled item set to 2 using RecallList.SetAttrib counter,
> > "CorrectAnswer", "2". Next i means that the for i = 0 to 1 is repeated
> > until the recalllist is populated with unsampled itmes making up the
> > quota left over from the sampled items. Once populated with stimuli,
> > RecallList.reset sets the list to be used in the recall phase of the
> > experiment.
>
> > For more information see for...next in the e-basic help.
>
> > I hope this has been made clearer,
> > Tim
>
> > On Jul 15, 3:16 pm, alp115 <asmahani... at gmail.com> wrote:
>
> > > Hi,
>
> > > Thanks for your reply Tim,
>
> > > This is a part of code from studyrecall.es downloaded from PST, Can
> > > anybody explain me what is this actually meant for. I am having
> > > difficulty understanding it.
>
> > > Dim i As Integer
> > > Dim unsampled As Integer
>
> > > For i = 0 To 1
> > > 'Choose levels until get an unsampled level
> > > Do
> > > unsampled = Random(1, StudyList.Order.Count)
> > > Loop Until StudyList.GetAttrib(unsampled, "Sampled") <> "1"
>
> > > 'set the new sample as sampled
> > > StudyList.SetAttrib unsampled, "Sampled", "1"
>
> > > 'add the level to RecallList - increase counter to add levels
> > > counter = counter +1
> > > RecallList.SetAttrib counter, "Word", StudyList.GetAttrib (unsampled,
> > > "Word")
> > > RecallList.SetAttrib counter, "CorrectAnswer", "2"
>
> > > Next i
>
> > > RecallList.Reset
>
> > > Thanks,
> > > Asma
>
> > > On Jul 15, 8:10 am, Victor <t1m... at yahoo.co.uk> wrote:
>
> > > > Hi Asma,
>
> > > > Try first looking at "Rerun Error Trials Until All Correct" example on
> > > > the ptsnet.com (you will rewuire a log in). I think this will get you
> > > > started.
>
> > > > Tim
>
> > > > On Jul 14, 11:58 pm, alp115 <asmahani... at gmail.com> wrote:
>
> > > > > Hi all,
>
> > > > > I am a novice with E Prime. I am working on an experiment where I want
> > > > > to compute accuracy of a block of trials and present the correct
> > > > > images along with some new images in another block of trials. Does
> > > > > anyone has a similar code or could help me with it?
>
> > > > > ~Asma
>
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "E-Prime" group.
To post to this group, send email to e-prime at googlegroups.com
To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com
For more options, visit this group at http://groups.google.com/group/e-prime?hl=en
-~----------~----~----~----~------~----~------~--~---



More information about the Eprime mailing list