<?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: JSL codeing in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/recurrence-analysis-cumulative-formula-was-JSL-coding/m-p/912663#M107243</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;Thanks for your reply.&lt;/P&gt;
&lt;P&gt;I want to predict the cumulative values (number of repairs in this study) 90 days later for each machine. I figured it out.&lt;/P&gt;
&lt;P&gt;I just need to use "fit = Report(ra)[OutlineBox("Fitted Recurrence Model Cause= Caster Assay-Left)] &amp;lt;&amp;lt; Get Scriptable Object;". So the "Cause =" will generate the formular for the cause level I want.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;To automate this for 13 cause levels, I just created a list of cause and use a for loop to go through each level.&lt;/P&gt;
&lt;P&gt;Thanks.&lt;/P&gt;</description>
    <pubDate>Tue, 11 Nov 2025 19:29:09 GMT</pubDate>
    <dc:creator>Caozheng0115</dc:creator>
    <dc:date>2025-11-11T19:29:09Z</dc:date>
    <item>
      <title>recurrence analysis cumulative formula (was JSL coding)</title>
      <link>https://community.jmp.com/t5/Discussions/recurrence-analysis-cumulative-formula-was-JSL-coding/m-p/912116#M107177</link>
      <description>&lt;P&gt;Hi, all&lt;BR /&gt;&lt;BR /&gt;I want to Save Cumulative Formula from a model for each Cause level in recurrence analysis model. Following is the code I have&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;ra = Recurrence Analysis(
	Y( :age ),
	Label( :BOT ID ),
	Cost( :Censor ),
	Grouping( :Bot Series ),
	Event Plot( 0 ),
	Fit Model(
		Scale Effects( :Bot Series ),
		Shape Effects( :Bot Series ),
		Run Model,
		Model Type( "Proportional Intensity Poisson Process" )
	)
);
// Get fitted recurrence model object
fit = Report(ra)[OutlineBox("Fitted Recurrence Model")] &amp;lt;&amp;lt; Get Scriptable Object;

// Save intensity and cumulative formulas from fit
intensity_col = fit &amp;lt;&amp;lt; Save Intensity Formula;
cumul_col     = fit &amp;lt;&amp;lt; Save Cumulative Formula (
	If( :Part Grouping2 == "Caster Assy-Left"",
            full_formula
        )
    );
&lt;/CODE&gt;&lt;CODE class=" language-jsl"&gt;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;I have Part Grouping2 as Cause and there are 13 levels in Part Grouping2, I want to generate fit value for each level in Part Grouping2. I tried some code but did not work. In the code&amp;nbsp;&lt;CODE class=" language-jsl"&gt;Part Grouping2 == "Caster Assy-Left"&amp;nbsp;.&lt;/CODE&gt;&amp;nbsp;That&amp;nbsp;is&amp;nbsp;just&amp;nbsp;trying&amp;nbsp;to&amp;nbsp;use&amp;nbsp;the&amp;nbsp;formular&amp;nbsp;for one Part Grouping2 level Caster Assy-Left. There are 13 total levels and I want to automate this so I don't need to repeat 13 times.&lt;BR /&gt;Thanks.&lt;/P&gt;
&lt;P&gt;&lt;CODE class=" language-jsl"&gt;&lt;/CODE&gt;&lt;/P&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;</description>
      <pubDate>Sat, 08 Nov 2025 21:35:56 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/recurrence-analysis-cumulative-formula-was-JSL-coding/m-p/912116#M107177</guid>
      <dc:creator>Caozheng0115</dc:creator>
      <dc:date>2025-11-08T21:35:56Z</dc:date>
    </item>
    <item>
      <title>Re: JSL codeing</title>
      <link>https://community.jmp.com/t5/Discussions/recurrence-analysis-cumulative-formula-was-JSL-coding/m-p/912154#M107185</link>
      <description>&lt;P&gt;What are you trying to extract or do in the end? Your script will create the formulas for you which seem to look something like this&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="jthi_0-1762581573217.png" style="width: 999px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/86635iE72CED4B36533B07/image-size/large?v=v2&amp;amp;px=999" role="button" title="jthi_0-1762581573217.png" alt="jthi_0-1762581573217.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here(1);
dt = Open("$SAMPLE_DATA/Reliability/Bladder Cancer.jmp");
ra = dt &amp;lt;&amp;lt; Recurrence Analysis(
	Y(:Age),
	Cost(:Cost),
	Grouping(:Treatment Group),
	Label(:Patient Number),
	Fit Model(
		Scale Effects(:Treatment Group),
		Shape Effects(:Treatment Group),
		Run Model,
		Model Type("Proportional Intensity Poisson Process")
	)
);

fit = Report(ra)[Outline Box("Fitted Recurrence Model")] &amp;lt;&amp;lt; Get Scriptable Object;
intensity_col = fit &amp;lt;&amp;lt; Save Intensity Formula;
cumul_col = fit &amp;lt;&amp;lt; Save Cumulative Formula;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sat, 08 Nov 2025 06:01:14 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/recurrence-analysis-cumulative-formula-was-JSL-coding/m-p/912154#M107185</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2025-11-08T06:01:14Z</dc:date>
    </item>
    <item>
      <title>Re: JSL codeing</title>
      <link>https://community.jmp.com/t5/Discussions/recurrence-analysis-cumulative-formula-was-JSL-coding/m-p/912663#M107243</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;Thanks for your reply.&lt;/P&gt;
&lt;P&gt;I want to predict the cumulative values (number of repairs in this study) 90 days later for each machine. I figured it out.&lt;/P&gt;
&lt;P&gt;I just need to use "fit = Report(ra)[OutlineBox("Fitted Recurrence Model Cause= Caster Assay-Left)] &amp;lt;&amp;lt; Get Scriptable Object;". So the "Cause =" will generate the formular for the cause level I want.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;To automate this for 13 cause levels, I just created a list of cause and use a for loop to go through each level.&lt;/P&gt;
&lt;P&gt;Thanks.&lt;/P&gt;</description>
      <pubDate>Tue, 11 Nov 2025 19:29:09 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/recurrence-analysis-cumulative-formula-was-JSL-coding/m-p/912663#M107243</guid>
      <dc:creator>Caozheng0115</dc:creator>
      <dc:date>2025-11-11T19:29:09Z</dc:date>
    </item>
    <item>
      <title>Re: JSL codeing</title>
      <link>https://community.jmp.com/t5/Discussions/recurrence-analysis-cumulative-formula-was-JSL-coding/m-p/912676#M107244</link>
      <description>&lt;P&gt;You are using By column? Most likely looping isn't necessary but that is a good option, just make sure you aren't overwriting any columns by accident&lt;/P&gt;
&lt;P&gt;If you are using By column, broadcasting might also work if it does what you are looking for&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here(1);
dt = Open("$SAMPLE_DATA/Reliability/Bladder Cancer.jmp");
ra = dt &amp;lt;&amp;lt; Recurrence Analysis(
	Y(:Age),
	Cost(:Cost),
	Grouping(:Treatment Group),
	Label(:Patient Number),
	Fit Model(
		Scale Effects(:Treatment Group),
		Shape Effects(:Treatment Group),
		Run Model,
		Model Type("Proportional Intensity Poisson Process")
	),
	By(:Cause of Death)
);

fit = Report(ra[1])[Outline Box("Fitted Recurrence Model")] &amp;lt;&amp;lt; Get Scriptable Object;
fit &amp;lt;&amp;lt; Broadcast(Save Intensity Formula);
fit &amp;lt;&amp;lt; Broadcast(Save Cumulative Formula);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="jthi_0-1762891507569.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/86852i98A45746947B370C/image-size/medium?v=v2&amp;amp;px=400" role="button" title="jthi_0-1762891507569.png" alt="jthi_0-1762891507569.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 11 Nov 2025 20:06:27 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/recurrence-analysis-cumulative-formula-was-JSL-coding/m-p/912676#M107244</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2025-11-11T20:06:27Z</dc:date>
    </item>
  </channel>
</rss>

