<?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: Convert sas code to JSL in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Convert-sas-code-to-JSL/m-p/271112#M52762</link>
    <description>&lt;P&gt;I apply this code in sas but I have a problem in the last part of code&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sat, 06 Jun 2020 13:55:49 GMT</pubDate>
    <dc:creator>ahmedmohamed</dc:creator>
    <dc:date>2020-06-06T13:55:49Z</dc:date>
    <item>
      <title>Convert sas code to JSL</title>
      <link>https://community.jmp.com/t5/Discussions/Convert-sas-code-to-JSL/m-p/271038#M52753</link>
      <description>&lt;P&gt;I need to convert this code to JSL&lt;/P&gt;&lt;P&gt;the code reference " &lt;SPAN class="fontstyle0"&gt;Pharmaceutical Statistics Using SAS&lt;/SPAN&gt;&lt;SPAN class="fontstyle2"&gt;®&lt;/SPAN&gt;&lt;SPAN class="fontstyle0"&gt;: A Practical Guide&lt;/SPAN&gt;&amp;nbsp;"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 11 Jun 2023 11:01:57 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Convert-sas-code-to-JSL/m-p/271038#M52753</guid>
      <dc:creator>ahmedmohamed</dc:creator>
      <dc:date>2023-06-11T11:01:57Z</dc:date>
    </item>
    <item>
      <title>Re: Convert sas code to JSL</title>
      <link>https://community.jmp.com/t5/Discussions/Convert-sas-code-to-JSL/m-p/271075#M52756</link>
      <description>&lt;P&gt;Your request is a non trivial request.&amp;nbsp; It would take many hours of work for an individual skilled in SAS, JMP and statistics to accomplish the task.&amp;nbsp; I suggest that you get in touch with a contract house to pay them to have the conversion done.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I assume you need the code converted because you do not have access to SAS, and/or you are not familiar with SAS.&lt;/P&gt;
&lt;P&gt;If the issue is one of not having access to SAS, one can access SAS University Edition, and with minor change, can get the program to successfully execute.&lt;/P&gt;</description>
      <pubDate>Sat, 06 Jun 2020 10:13:31 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Convert-sas-code-to-JSL/m-p/271075#M52756</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2020-06-06T10:13:31Z</dc:date>
    </item>
    <item>
      <title>Re: Convert sas code to JSL</title>
      <link>https://community.jmp.com/t5/Discussions/Convert-sas-code-to-JSL/m-p/271084#M52757</link>
      <description>&lt;P&gt;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/13101"&gt;@ahmedmohamed&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I agree with Jim.&amp;nbsp; I am not sure if the JMP nonlinear platform can perform ridge analysis. It is easy to put bounds on the parameter estimates, but I am not familiar with the Loss formula. I do know that JSL is easier for most of the SAS data steps.&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The JSL below shows some of the first steps for input and executing a simple linear and simple non-linear fit.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;//conversion
Names Default to Here(1);

dt_cs = Open("$Downloads/elisa_cs.csv");

dt_cs &amp;lt;&amp;lt; select where(! (:plate=="A" &amp;amp; :series==1));
dt_cs &amp;lt;&amp;lt; delete Rows(); //only keep A 1

dt_calib = Data Table( "elisa_cs" ) &amp;lt;&amp;lt; Stack(
	columns( :rep1, :rep2, :rep3 ),
	Source Label Column( "Label" ),
	Stacked Data Column( "signal" ),
	Output Table Name("calib")
);

dt_calib &amp;lt;&amp;lt; New Column("w", numeric, continuous, &amp;lt;&amp;lt; Set each value(1/:signal^1.3));

report1  = dt_calib &amp;lt;&amp;lt; Fit Model(
	Weight( :w ),
	Y( :signal ),
	Effects( :concentration ),
	Personality( "Standard Least Squares" ),
	Emphasis( "Minimal Report" ),
	Run
);

report1 &amp;lt;&amp;lt; Save Columns( {"Prediction Formula"}); //predictions are saved to the data table
 
lin_est = report1 &amp;lt;&amp;lt; get estimates; //vector 
show(lin_est);


gb = dt_calib &amp;lt;&amp;lt; Graph Builder(
	Size( 522, 456 ),
	Show Control Panel( 0 ),
	Show Legend( 0 ),
	Variables(
		X( :concentration ),
		Y( :signal ),
		Y( :Pred Formula signal, Position( 1 ), Side( "Right" ) )
	),
	Elements( Points( X, Y( 1 ), Legend( 6 ) ), Line( X, Y( 2 ), Legend( 11 ) ) ),
	SendToReport(
		Dispatch(
			{},
			"Graph Builder",
			OutlineBox,
			{Set Title( "Fit of the Linear Model" ), Image Export Display( Normal )}
		),
		Dispatch(
			{},
			"concentration",
			ScaleBox,
			{Scale( "Log" ), Format( "Best", 6 ), Min( 1 ), Max( 1000 ), Inc( 1 ),
			Minor Ticks( 0 )}
		),
		Dispatch(
			{},
			"signal",
			ScaleBox,
			{Format( "Fixed Dec", 12, 0 ), Min( 0 ), Max( 4 ), Inc( 1 ),
			Minor Ticks( 1 ), Label Row(
				{Show Major Grid( 1 ), Show Minor Grid( 1 )}
			)}
		),
		Dispatch(
			{},
			"Pred Formula signal",
			ScaleBox,
			{Format( "Fixed Dec", 12, 0 ), Min( 0 ), Max( 4 ), Inc( 1 ),
			Minor Ticks( 1 )}
		),
		Dispatch(
			{},
			"400",
			ScaleBox,
			{Legend Model(
				11,
				Properties(
					0,
					{Line Color( 19 ), Line Width( 3 )},
					Item ID( "Mean(Pred Formula signal)", 1 )
				)
			)}
		)
	)
);

//Note since this is a simple weighted regression the analysis and plot can be created with Bivariate
//here the predicteds are saved, not the formula

report1_biv = dt_calib &amp;lt;&amp;lt; Bivariate(
	Y( :signal ),
	X( :concentration ),
	Weight( :w ),
	Fit Line( {Confid Shaded Fit( 1 ), Line Color( {212, 73, 88} ), Save Predicteds} ),
	SendToReport(
		Dispatch(
			{},
			"1",
			ScaleBox,
			{Scale( "Log" ), Min( 1 ), Max( 1000 ), Inc( 1 ), Minor Ticks( 0 )}
		),
		Dispatch(
			{},
			"2",
			ScaleBox,
			{Min( 0 ), Max( 4 ), Inc( 1 ), Minor Ticks( 1 ),
			Label Row( {Show Major Grid( 1 ), Show Minor Grid( 1 )} )}
		),
		Dispatch(
			{},
			"Bivar Plot",
			FrameBox,
			{Grid Line Order( 2 ), Reference Line Order( 3 )}
		)
	)
);

//=========================================================================================
//NonLinear fit

nlmod = dt_calib &amp;lt;&amp;lt;	New Column( "NonLin Model",
		Numeric,
		"Continuous",
		Format( "Best", 12 ),
		Formula(
			Parameter(
				{top = 3, bottom = 0.2, c50 = 250, slope = 1},
				top + (bottom - top) / (1 + (:concentration / c50) ^ slope)
			)
		)
	);

report2_nlin = dt_calib &amp;lt;&amp;lt; Nonlinear(
	Y( :signal ),
	X( :NonLin Model ),
	Weight( :w ),
	Newton,
	Finish,
	SendToReport(
		Dispatch(
			{"Plot"},
			"1",
			ScaleBox,
			{Scale( "Log" ), Format( "Best", 6 ), Min( 1 ), Max( 1000 ), Inc( 1 ),
			Minor Ticks( 0 )}
		),
		Dispatch(
			{"Plot"},
			"2",
			ScaleBox,
			{Min( 0 ), Max( 4 ), Inc( 1 ), Minor Ticks( 1 ),
			Label Row( {Show Major Grid( 1 ), Show Minor Grid( 1 )} )}
		)
	)
);
report2 _nlin &amp;lt;&amp;lt; Confidence Limits;
report2 _nlin &amp;lt;&amp;lt; Save Estimates; //updates the column nlmod

nlin_est = report2_nlin &amp;lt;&amp;lt; get estimates; //vector

show(nlin_est);

//==== up to proc nlmixed&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sat, 06 Jun 2020 12:01:39 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Convert-sas-code-to-JSL/m-p/271084#M52757</guid>
      <dc:creator>gzmorgan0</dc:creator>
      <dc:date>2020-06-06T12:01:39Z</dc:date>
    </item>
    <item>
      <title>Re: Convert sas code to JSL</title>
      <link>https://community.jmp.com/t5/Discussions/Convert-sas-code-to-JSL/m-p/271109#M52761</link>
      <description>Great effort . Thanks a lot</description>
      <pubDate>Sat, 06 Jun 2020 13:49:04 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Convert-sas-code-to-JSL/m-p/271109#M52761</guid>
      <dc:creator>ahmedmohamed</dc:creator>
      <dc:date>2020-06-06T13:49:04Z</dc:date>
    </item>
    <item>
      <title>Re: Convert sas code to JSL</title>
      <link>https://community.jmp.com/t5/Discussions/Convert-sas-code-to-JSL/m-p/271112#M52762</link>
      <description>&lt;P&gt;I apply this code in sas but I have a problem in the last part of code&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 06 Jun 2020 13:55:49 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Convert-sas-code-to-JSL/m-p/271112#M52762</guid>
      <dc:creator>ahmedmohamed</dc:creator>
      <dc:date>2020-06-06T13:55:49Z</dc:date>
    </item>
  </channel>
</rss>

