kumulative Formel für die Rezidivanalyse (ehemals JSL-Kodierung)Hallo zusammen
Ich möchte die kumulative Formel eines Modells für jede Ursachenebene in einem Rezidivanalysemodell speichern. Nachfolgend der Code, den ich habe.
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")] << Get Scriptable Object;
// Save intensity and cumulative formulas from fit
intensity_col = fit << Save Intensity Formula;
cumul_col = fit << Save Cumulative Formula (
If( :Part Grouping2 == "Caster Assy-Left"",
full_formula
)
);
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 Part Grouping2 == "Caster Assy-Left" . That is just trying to use the formular 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.
Thanks.
</CODE></P>
<DIV>
</DIV>
</LINGO-BODY>
<LINGO-LABS id="lingo-labs-912116" slang="en-US" mode="UPDATE">
<LINGO-LABEL>Automatisierung und Skripterstellung</LINGO-LABEL>
</LINGO-LABS>
<LINGO-SUB id="lingo-sub-912154" slang="en-US" mode="CREATE" translate="no">Betreff: JSL-Codierung</LINGO-SUB>
<LINGO-BODY id="lingo-body-912154" slang="en-US" mode="CREATE">
<P>Was genau möchten Sie letztendlich extrahieren oder erreichen? Ihr Skript erstellt die Formeln für Sie, die in etwa so aussehen:</P>
<P><SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="jthi_0-1762581573217.png" style="width: 999px;"><SPAN class="lia-inline-image-display-wrapper" image-alt="jthi_0-1762581573217.png" style="width: 999px;"><SPAN class="lia-inline-image-display-wrapper" image-alt="jthi_0-1762581573217.png" style="width: 999px;"><SPAN class="lia-inline-image-display-wrapper" image-alt="jthi_0-1762581573217.png" style="width: 999px;"><SPAN class="lia-inline-image-display-wrapper" image-alt="jthi_0-1762581573217.png" style="width: 999px;"><SPAN class="lia-inline-image-display-wrapper" image-alt="jthi_0-1762581573217.png" style="width: 999px;"><span class="lia-inline-image-display-wrapper" image-alt="jthi_0-1762581573217.png" style="width: 999px;"><img src="https://us.v-cdn.net/6038925/uploads/images/86635iE72CED4B36533B07/jthi_0-1762581573217.png" role="button" title="jthi_0-1762581573217.png" alt="jthi_0-1762581573217.png" /></span></SPAN></SPAN></SPAN></SPAN></SPAN></SPAN></P>
<PRE><CODE class=" language-jsl">Names Default To Here(1);
dt = Open("$SAMPLE_DATA/Reliability/Bladder Cancer.jmp");
ra = dt << 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")] << Get Scriptable Object;
intensity_col = fit << Save Intensity Formula;
cumul_col = fit << Save Cumulative Formula;
Betreff: JSL-CodierungHallo,
Danke für Ihre Antwort.
Ich möchte die kumulierten Werte (Anzahl der Reparaturen in dieser Studie) 90 Tage später für jede Maschine vorhersagen. Ich habe es herausgefunden.
Ich muss lediglich "fit = Report(ra)[OutlineBox("Fitted Recurrence Model Cause= Caster Assay-Left)] << Get Scriptable Object;" verwenden. Dadurch wird "Cause =" die Formel für die gewünschte Ursachenebene generieren.
Um dies für 13 Ursachenstufen zu automatisieren, habe ich einfach eine Liste von Ursachen erstellt und verwende eine for-Schleife, um jede Stufe durchzugehen.
Danke.
Betreff: JSL-CodierungSie verwenden die Spaltenumwandlung? Eine Schleife ist höchstwahrscheinlich nicht nötig, aber es ist eine gute Option. Achten Sie nur darauf, dass Sie keine Spalten versehentlich überschreiben.
Wenn Sie die Spalte „Nach“ verwenden, könnte auch Broadcasting funktionieren, sofern es Ihren Anforderungen entspricht.
Names Default To Here(1);
dt = Open("$SAMPLE_DATA/Reliability/Bladder Cancer.jmp");
ra = dt << 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")] << Get Scriptable Object;
fit << Broadcast(Save Intensity Formula);
fit << Broadcast(Save Cumulative Formula);
