<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic How to randomly assign one value to three unique IDs, while having each ID assigned 6 unique values? in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/How-to-randomly-assign-one-value-to-three-unique-IDs-while/m-p/562205#M77528</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I am attempting to assign a list of video clips to a list of reviewers. Both the reviewers and the video clips have unique IDs. For increased accuracy, I would like three different reviewers to view the same video clip. And each reviewer must review 6 different video clips. The list of reviewer IDs and Video Clip IDs are in separate JMP files. I am currently using JMP v.16.2.0, and I have attached a JMP table illustrating the assignment process for two video clips and 6 reviewers.&lt;/P&gt;&lt;P&gt;Thank you in advance for your help!&lt;/P&gt;</description>
    <pubDate>Sat, 10 Jun 2023 23:56:12 GMT</pubDate>
    <dc:creator>WetlandWoman</dc:creator>
    <dc:date>2023-06-10T23:56:12Z</dc:date>
    <item>
      <title>How to randomly assign one value to three unique IDs, while having each ID assigned 6 unique values?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-randomly-assign-one-value-to-three-unique-IDs-while/m-p/562205#M77528</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I am attempting to assign a list of video clips to a list of reviewers. Both the reviewers and the video clips have unique IDs. For increased accuracy, I would like three different reviewers to view the same video clip. And each reviewer must review 6 different video clips. The list of reviewer IDs and Video Clip IDs are in separate JMP files. I am currently using JMP v.16.2.0, and I have attached a JMP table illustrating the assignment process for two video clips and 6 reviewers.&lt;/P&gt;&lt;P&gt;Thank you in advance for your help!&lt;/P&gt;</description>
      <pubDate>Sat, 10 Jun 2023 23:56:12 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-randomly-assign-one-value-to-three-unique-IDs-while/m-p/562205#M77528</guid>
      <dc:creator>WetlandWoman</dc:creator>
      <dc:date>2023-06-10T23:56:12Z</dc:date>
    </item>
    <item>
      <title>Re: How to randomly assign one value to three unique IDs, while having each ID assigned 6 unique values?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-randomly-assign-one-value-to-three-unique-IDs-while/m-p/562220#M77529</link>
      <description>&lt;P&gt;Here is a rough attempt at what you are asking for.&amp;nbsp; I think it will work.&amp;nbsp; I assume, others in the Community will have a better idea&amp;nbsp; It uses 2 sample data tables, and assigns the clips to review from them&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );

dtRev = New Table( "Reviewers",
	New Column( "Reviewer", character, values( {"400180174", "400197965", "400241556", "400244169", "400247301", "400258583"} ) )
);
dtClp = New Table( "Clips",
	New Column( "Clip",
		character,
		values(
			{"GI2C328162023S24", "SQBC107132043S11", "SQBC107132023S11", "GI2C318162023S24", 
			"GI2C308162023S24", "SQBC107133023S11","GI2C308162022S25", "SQBC107132022S12", 
			"SQBC107132022S13", "GI2C309162032S24", "GI2C308162022S27", "SQBC107132022S16"}
		)
	)
);

// Create a new reviewers data table with each reviewer having 6 entries
dtRev6 = dtRev &amp;lt;&amp;lt; concatenate( dtRev, dtRev, dtRev,dtRev,dtRev );
// Randomize the order of reviewer
dtRev6 &amp;lt;&amp;lt; New Column( "random", set each value( Random Uniform( 1, 1000000 ) ) );
dtRev6 &amp;lt;&amp;lt; Sort( By( :random ), Replace Table, Order( Ascending ) );
dtRev6 &amp;lt;&amp;lt; delete columns( random );
// Scan through data table making sure the same name does not appear within 3 of the previous 
// time it appeared
For( i = 6, i &amp;lt;= N Rows( dtRev6 ), i++,
	If( :Reviewer[i] == :Reviewer[i - 1] | Try( :Reviewer[i] == :Reviewer[i - 2], 0 ),
		For( k = i + 1, k &amp;lt;= N Rows( dtRev6 ), k++,
			If( :Reviewer[k] != :Reviewer[i] &amp;amp; :Reviewer[k] != :Reviewer[i - 1] &amp;amp; Try( :Reviewer[k] != :Reviewer[i - 1], 1 ),
				hold = :Reviewer[i];
				:Reviewer[i] = :Reviewer[k];
				:Reviewer[k] = hold;
				Break();
			)
		)
	)
);

// Assign clips
dtRev6 &amp;lt;&amp;lt; New Column( "Clip", character );
For( i = 1, i &amp;lt;= nrows(dtClp), i++,
	If( (i-1) * 3 +1 &amp;lt;= N Rows( dtRev6 ),
		For( k = (i-1) * 3 +1, k &amp;lt;= (i-1) * 3 +3, k++,
			dtRev6:Clip[k] = dtClp:Clip[i];
		)
	)
);

// Sort the table so reviewer's clips are listed together
dtRev6 &amp;lt;&amp;lt; Sort(
	By( :Reviewer ),
	Replace Table,
	Order( Ascending )
);
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sun, 30 Oct 2022 03:16:28 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-randomly-assign-one-value-to-three-unique-IDs-while/m-p/562220#M77529</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2022-10-30T03:16:28Z</dc:date>
    </item>
    <item>
      <title>Re: How to randomly assign one value to three unique IDs, while having each ID assigned 6 unique values?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-randomly-assign-one-value-to-three-unique-IDs-while/m-p/562449#M77542</link>
      <description>&lt;P&gt;I used a Custom Design. I defined a categorical factor Clip with 12 levels. I created a fixed blocking factor Reviewer with 6 runs per block. (You can assign the reviewer ID with the Value Labels column property.) The definitions look like this:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="custom.PNG" style="width: 705px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/46749i2611847EC17E4E0A/image-size/large?v=v2&amp;amp;px=999" role="button" title="custom.PNG" alt="custom.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I chose 36 runs to achieve all combinations with random assignment using D-optimality. I checked and the design is balanced, which ensures that every reviewer gets 6 clips and every clip gets 3 reviews.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="dist.PNG" style="width: 466px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/46751i074A9E92E58BBDF5/image-size/large?v=v2&amp;amp;px=999" role="button" title="dist.PNG" alt="dist.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 31 Oct 2022 12:57:35 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-randomly-assign-one-value-to-three-unique-IDs-while/m-p/562449#M77542</guid>
      <dc:creator>Mark_Bailey</dc:creator>
      <dc:date>2022-10-31T12:57:35Z</dc:date>
    </item>
    <item>
      <title>Re: How to randomly assign one value to three unique IDs, while having each ID assigned 6 unique values?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-randomly-assign-one-value-to-three-unique-IDs-while/m-p/564385#M77689</link>
      <description>&lt;P&gt;Hi Jim, Thank you for this! It worked like a dream.&lt;/P&gt;&lt;P&gt;Cheers!&lt;/P&gt;</description>
      <pubDate>Thu, 03 Nov 2022 20:16:11 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-randomly-assign-one-value-to-three-unique-IDs-while/m-p/564385#M77689</guid>
      <dc:creator>WetlandWoman</dc:creator>
      <dc:date>2022-11-03T20:16:11Z</dc:date>
    </item>
    <item>
      <title>Re: How to randomly assign one value to three unique IDs, while having each ID assigned 6 unique values?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-randomly-assign-one-value-to-three-unique-IDs-while/m-p/564390#M77690</link>
      <description>&lt;P&gt;Hi Mark,&lt;/P&gt;&lt;P&gt;Thank you for this. I have never used Custom Design so I stuck with what I knew, but this could come in handy for the future :)&lt;/img&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 03 Nov 2022 20:17:14 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-randomly-assign-one-value-to-three-unique-IDs-while/m-p/564390#M77690</guid>
      <dc:creator>WetlandWoman</dc:creator>
      <dc:date>2022-11-03T20:17:14Z</dc:date>
    </item>
  </channel>
</rss>

