<?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 Re: Fitting model to ordinal factors and response in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Fitting-model-to-ordinal-factors-and-response/m-p/108147#M39350</link>
    <description>&lt;P&gt;You may want to try building your model using Partioning.&amp;nbsp; Below is a scirpt that creates your table and then runs a Partition(Decision Tree) Analysis&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;names default to here(1);
dt = New Table( "Example",
	Add Rows( 48 ),
	New Column( "d",
		Numeric,
		"Nominal",
		Format( "Best", 12 ),
		Set Values(
			[1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2,
			2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3]
		)
	),
	New Column( "u",
		Numeric,
		"Nominal",
		Format( "Best", 12 ),
		Set Values(
			[1, 2, 3, 4, 1, 2, 3, 4, 1, 2, 3, 4, 1, 2, 3, 4, 1, 2, 3, 4, 1, 2, 3, 4,
			1, 2, 3, 4, 1, 2, 3, 4, 1, 2, 3, 4, 1, 2, 3, 4, 1, 2, 3, 4, 1, 2, 3, 4]
		)
	),
	New Column( "s",
		Numeric,
		"Nominal",
		Format( "Best", 12 ),
		Set Values(
			[1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 1, 1, 1, 1, 2, 2, 2, 2,
			3, 3, 3, 3, 4, 4, 4, 4, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4]
		)
	),
	New Column( "value",
		Character,
		"Nominal",
		Set Values(
			{"Low", "Low", "Low", "Med", "Low", "Low", "Low", "Med", "Low", "Low",
			"Med", "Med", "Low", "Med", "Med", "Med", "Low", "Low", "Med", "High",
			"Low", "Low", "Med", "High", "Low", "Med", "High", "High", "Med", "High",
			"High", "High", "Med", "Med", "High", "High", "Med", "Med", "High",
			"High", "Med", "High", "High", "High", "High", "High", "High", "High"}
		)
	)
);


dt &amp;lt;&amp;lt; Partition(
	Y( :value ),
	X( :d, :u, :s ),
	Informative Missing( 1 ),
	Initial Splits(
		:d == {1},
		{:u == {4, 3}},
		{:u == {1, 2}, {:d == {2}}, {:d == {2}}}
	),
	SendToReport(
		Dispatch( {}, "Partition Report", FrameBox, {Frame Size( 480, 74 )} )
	)
);&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Tue, 29 Jan 2019 00:43:41 GMT</pubDate>
    <dc:creator>txnelson</dc:creator>
    <dc:date>2019-01-29T00:43:41Z</dc:date>
    <item>
      <title>Fitting model to ordinal factors and response</title>
      <link>https://community.jmp.com/t5/Discussions/Fitting-model-to-ordinal-factors-and-response/m-p/108143#M39346</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hello, I have such a diagram and want to figure out the equation which produces it:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-left" image-alt="Untitled picture.png" style="width: 999px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/15257i3F6A2B27FFE3D62E/image-size/large?v=v2&amp;amp;px=999" role="button" title="Untitled picture.png" alt="Untitled picture.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;One can imagine it as a 3-dimentional space with color responces for every S/U/D combination.&lt;/P&gt;&lt;P&gt;I filled S/U/D into a&amp;nbsp;JMP table to fit (some kind of)&amp;nbsp;model but realized immediately, that the response in color code (e.g. 1 for green, 2 for yelow and 3=red) doesn't make much sense.&lt;/P&gt;&lt;P&gt;To my understanding, the equation behind this diagram generates 4x4x3=48 values and colors correspond to certain parts of values. For example, 30% of upper values get red, 25% lower -- green. The rest is yellow.&lt;/P&gt;&lt;P&gt;How then should I represent the responce?&lt;/P&gt;&lt;P&gt;Isn't it too many unknowns&amp;nbsp;for this task?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 28 Jan 2019 23:06:42 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Fitting-model-to-ordinal-factors-and-response/m-p/108143#M39346</guid>
      <dc:creator>Roman-V</dc:creator>
      <dc:date>2019-01-28T23:06:42Z</dc:date>
    </item>
    <item>
      <title>Re: Fitting model to ordinal factors and response</title>
      <link>https://community.jmp.com/t5/Discussions/Fitting-model-to-ordinal-factors-and-response/m-p/108147#M39350</link>
      <description>&lt;P&gt;You may want to try building your model using Partioning.&amp;nbsp; Below is a scirpt that creates your table and then runs a Partition(Decision Tree) Analysis&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;names default to here(1);
dt = New Table( "Example",
	Add Rows( 48 ),
	New Column( "d",
		Numeric,
		"Nominal",
		Format( "Best", 12 ),
		Set Values(
			[1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2,
			2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3]
		)
	),
	New Column( "u",
		Numeric,
		"Nominal",
		Format( "Best", 12 ),
		Set Values(
			[1, 2, 3, 4, 1, 2, 3, 4, 1, 2, 3, 4, 1, 2, 3, 4, 1, 2, 3, 4, 1, 2, 3, 4,
			1, 2, 3, 4, 1, 2, 3, 4, 1, 2, 3, 4, 1, 2, 3, 4, 1, 2, 3, 4, 1, 2, 3, 4]
		)
	),
	New Column( "s",
		Numeric,
		"Nominal",
		Format( "Best", 12 ),
		Set Values(
			[1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 1, 1, 1, 1, 2, 2, 2, 2,
			3, 3, 3, 3, 4, 4, 4, 4, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4]
		)
	),
	New Column( "value",
		Character,
		"Nominal",
		Set Values(
			{"Low", "Low", "Low", "Med", "Low", "Low", "Low", "Med", "Low", "Low",
			"Med", "Med", "Low", "Med", "Med", "Med", "Low", "Low", "Med", "High",
			"Low", "Low", "Med", "High", "Low", "Med", "High", "High", "Med", "High",
			"High", "High", "Med", "Med", "High", "High", "Med", "Med", "High",
			"High", "Med", "High", "High", "High", "High", "High", "High", "High"}
		)
	)
);


dt &amp;lt;&amp;lt; Partition(
	Y( :value ),
	X( :d, :u, :s ),
	Informative Missing( 1 ),
	Initial Splits(
		:d == {1},
		{:u == {4, 3}},
		{:u == {1, 2}, {:d == {2}}, {:d == {2}}}
	),
	SendToReport(
		Dispatch( {}, "Partition Report", FrameBox, {Frame Size( 480, 74 )} )
	)
);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 29 Jan 2019 00:43:41 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Fitting-model-to-ordinal-factors-and-response/m-p/108147#M39350</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2019-01-29T00:43:41Z</dc:date>
    </item>
    <item>
      <title>Re: Fitting model to ordinal factors and response</title>
      <link>https://community.jmp.com/t5/Discussions/Fitting-model-to-ordinal-factors-and-response/m-p/108189#M39358</link>
      <description>&lt;P&gt;Jim's suggestion to use a recursive partitioning method is great. The fact is, there is more than one way that you can model this ordinal reponse under different conditions of S, U, and D. Here is a result using ordinal logistic regression:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dt = New Table( "4x4x3 Factorial",
	Add Rows( 48 ),
	New Table Variable( "Design", "4x4x3 Factorial" ),
	New Script(
		"Model",
		Fit Model(
			Effects( :S, :U, :D, :S * :U, :S * :D, :U * :D ),
			Y( :Y ),
			PERSONALITY( Standard Least Squares )
		)
	),
	New Script( "Evaluate Design", DOE( Evaluate Design, X( :S, :U, :D ) ) ),
	New Script(
		"DOE Dialog",
		DOE(
			Full Factorial Design,
			{Add Response( Maximize, "Y", ., ., . ),
			Add Factor( Categorical, {"1", "2", "3", "4"}, "S", 0 ),
			Add Factor( Categorical, {"1", "2", "3", "4"}, "U", 0 ),
			Add Factor( Categorical, {"1", "2", "3"}, "D", 0 ),
			Set Random Seed( 873 ), Make Design, Simulate Responses( 0 ),
			Set Run Order( Sort Left to Right ), Make Table}
		)
	),
	New Script(
		"Graph Builder",
		Graph Builder(
			Size( 566, 1456 ),
			Show Control Panel( 0 ),
			Show Legend( 0 ),
			Variables( Y( :Y ), Page( :D ), Group X( :U ), Group Y( :S ) ),
			Elements( Points( Y, Legend( 7 ) ) ),
			SendToReport(
				Dispatch(
					{},
					"400",
					ScaleBox,
					{Legend Model(
						7,
						Properties( -1, {Line Color( 4 )}, Item ID( "1", 1 ) ),
						Properties( -1, {Line Color( 41 )}, Item ID( "2", 1 ) ),
						Properties( -1, {Line Color( 3 )}, Item ID( "3", 1 ) )
					)}
				)
			)
		)
	),
	New Column( "Pattern",
		Character,
		"Nominal",
		Set Values(
			{"111", "112", "113", "121", "122", "123", "131", "132", "133", "141",
			"142", "143", "211", "212", "213", "221", "222", "223", "231", "232",
			"233", "241", "242", "243", "311", "312", "313", "321", "322", "323",
			"331", "332", "333", "341", "342", "343", "411", "412", "413", "421",
			"422", "423", "431", "432", "433", "441", "442", "443"}
		)
	),
	New Column( "S",
		Character,
		"Nominal",
		Set Property( "Value Ordering", {"1", "2", "3", "4"} ),
		Set Property( "Design Role", DesignRole( Categorical ) ),
		Set Property( "Factor Changes", Easy ),
		Set Values(
			{"1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "2", "2",
			"2", "2", "2", "2", "2", "2", "2", "2", "2", "2", "3", "3", "3", "3",
			"3", "3", "3", "3", "3", "3", "3", "3", "4", "4", "4", "4", "4", "4",
			"4", "4", "4", "4", "4", "4"}
		)
	),
	New Column( "U",
		Character,
		"Nominal",
		Set Property( "Value Ordering", {"1", "2", "3", "4"} ),
		Set Property( "Design Role", DesignRole( Categorical ) ),
		Set Property( "Factor Changes", Easy ),
		Set Values(
			{"1", "1", "1", "2", "2", "2", "3", "3", "3", "4", "4", "4", "1", "1",
			"1", "2", "2", "2", "3", "3", "3", "4", "4", "4", "1", "1", "1", "2",
			"2", "2", "3", "3", "3", "4", "4", "4", "1", "1", "1", "2", "2", "2",
			"3", "3", "3", "4", "4", "4"}
		)
	),
	New Column( "D",
		Character,
		"Nominal",
		Set Property( "Value Ordering", {"1", "2", "3"} ),
		Set Property( "Design Role", DesignRole( Categorical ) ),
		Set Property( "Factor Changes", Easy ),
		Set Values(
			{"1", "2", "3", "1", "2", "3", "1", "2", "3", "1", "2", "3", "1", "2",
			"3", "1", "2", "3", "1", "2", "3", "1", "2", "3", "1", "2", "3", "1",
			"2", "3", "1", "2", "3", "1", "2", "3", "1", "2", "3", "1", "2", "3",
			"1", "2", "3", "1", "2", "3"}
		)
	),
	New Column( "Y",
		Numeric,
		"Ordinal",
		Format( "Best", 12 ),
		Value Labels( {1 = "Low", 2 = "Med", 3 = "High"} ),
		Use Value Labels( 1 ),
		Set Values(
			[1, 1, 2, 1, 1, 2, 1, 2, 3, 2, 3, 3, 1, 1, 2, 1, 1, 2, 1, 2, 3, 2, 3, 3,
			1, 1, 2, 1, 2, 3, 2, 3, 3, 2, 3, 3, 1, 2, 3, 2, 3, 3, 2, 3, 3, 2, 3, 3]
		)
	),
	Set Label Columns( :Pattern )
);

dt &amp;lt;&amp;lt; Fit Model(
	Y( :Y ),
	Effects( :S, :U, :D ),
	Personality( "Ordinal Logistic" ),
	Run(
		Likelihood Ratio Tests( 1 ),
		Profiler(
			1,
			Term Value(
				S( "1", Lock( 0 ), Show( 1 ) ),
				U( "1", Lock( 0 ), Show( 1 ) ),
				D( "1", Lock( 0 ), Show( 1 ) )
			)
		)
	)
);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 29 Jan 2019 12:12:21 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Fitting-model-to-ordinal-factors-and-response/m-p/108189#M39358</guid>
      <dc:creator>Mark_Bailey</dc:creator>
      <dc:date>2019-01-29T12:12:21Z</dc:date>
    </item>
  </channel>
</rss>

