Come salvare il report come file di testo tramite script?Ciao a tutti,
Ho uno script per eseguire una regressione logistica. Quindi voglio salvarlo come file di testo, simile a fare un Ctrl + s con quel rapporto aperto, selezionando "file txt" in "Salva come", quindi salvandolo. C'è un modo per scrivere quest'ultima parte di salvataggio? Ho provato Save (), SaveAs (), Save Text File () e nessuno di loro sembra funzionare. Intendo quindi utilizzare uno script bash separato per analizzare quel file di testo per i numeri esatti di cui ho bisogno. Grazie.
ScriptingRi: Come salvare il report come file di testo?Se sto interpretando correttamente la tua domanda, credo che tu non stia capendo cosa è contenuto in un file .rpt di JMP.Non contiene i risultati della tua analisi logistica.Contiene solo lo script e, eventualmente, la tabella dati che, una volta eseguita, eseguirà nuovamente l'analisi logistica.
Quello che penso tu voglia fare, è disponibile direttamente dal Display Output dall'analisi logistica, senza doverlo salvare come file. Lo script seguente crea un adattamento logistico, quindi elimina il valore del Chi quadrato e lo stampa nel registro
names default to here(1);
dt=open("$SAMPLE_DATA\big class.jmp");
lg = Logistic( Y( :sex ), X( :height ), Target Level( "M" ) );
chiSQ = (report(lg)["Whole Model Test"][numbercolbox(3)]<<GET></GET>
Produzione

L'output del registro
chiSQ = 5.50032691715703;
L'output logistico non deve essere visualizzato per analizzare i valori.
Se quello che stai cercando, sta effettivamente analizzando attraverso lo script che genera quanto sopra puoi anche richiedere dal report di output, per estrarre lo script usando << get script
Ri: Come salvare il report come file di testo tramite script?Ciao,
Ecco uno script che mostra l'uso del comando Salva MSWord () che potrebbe soddisfare le tue esigenze
Names Default to Here (1);
dt = New Table( "TEST for REPORT", // PRODUCES DUMMY DATA (not impprotant to the Script)
Add Rows( 100 ),
New Column( "X1",
Numeric,
"Continuous",
Format( "Best", 12 ),
Set Values(
[-1.75737689252763, -0.764592545628707, 0.0510173405612358,
0.296947452630042, 1.07254119757705, -0.457175811296141, 2.2967706289395,
-2.03142875936277, -0.363048769682677, -0.5070633105302,
0.154495773405026, 0.369788925828579, 0.597166128844207,
-1.07960670306945, -1.30872421085908, 0.130645965468011,
-0.412897094133047, 0.9255870864491, -1.8301802424961, -1.7841388270802,
1.09327584758963, 0.182884026871625, 0.424531175652736,
0.0556158029054966, -0.640709634446687, 0.418565044637002,
0.116564045292701, -2.12143236669799, -0.331469472169104,
-1.24179988452203, 0.155735483143868, -0.00138870426949338,
0.466001490590278, 1.36589200985638, -3.22275463841887,
-0.800508277125038, -1.78007607611038, -1.21967208140065,
1.30176200548787, -0.480892428153654, 0.158765967966113,
-0.127576464285864, 0.252459427763925, -1.68598410912989,
-0.1970956676386, 1.55034428468064, -1.22708700695268,
-0.0605279865915366, -1.49250653248953, -0.162256456084438,
-0.0652649037086258, 0.00797946402916947, -1.35256879313255,
-0.652285809936282, -0.934510673918681, -1.05100651980935,
-0.791137119509579, -0.204256037124367, 0.870279762249423,
-0.445336826845759, 0.795010489801338, 0.0995886571396687,
-0.416148453467265, -2.01017021764025, -1.81678701825346,
1.69323861834956, 0.143536807692393, -0.0336633898898059,
-1.09589423234423, 0.80081362059253, 0.934714505656128, 1.2393741198206,
0.33824576332954, -0.292203308012728, 0.505302707503523,
-1.00205691512905, 0.0466520972335475, 0.223145974635781,
-0.624589588016431, 1.28323068510501, 0.50670682478464,
0.0700531578104748, -2.50121391459843, 1.05477568536072,
-0.0969894453114527, -3.13034948200876, -0.772134746161867,
-1.16109167197385, 1.35393467256404, -0.232421055502557,
-0.28636706790363, 0.434413591597962, 0.742704293993728,
-0.646790477388557, -1.64641063868416, 1.2771435491761,
0.639487960805282, 1.747183899193, 0.585001038344993, 0.930693565426168]
)
),
New Column( "X2",
Numeric,
"Continuous",
Format( "Best", 12 ),
Set Values(
[6.0198103129928, 7.20091205222843, 4.65070026886468, 3.17670690687595,
5.03355092227052, 6.30151380427266, 5.24386848221495, 6.90048447961645,
9.20918236706509, 4.41506689039341, 7.73943697235743, 4.99394902047945,
3.65679903427308, 4.83267420173453, 6.74796638714244, 5.38200291743643,
2.94085457642222, 6.23822904145476, 3.79435790981074, 2.98732948494231,
7.90936901554754, 3.82084295664395, 4.93889136576797, 4.867614989468,
6.79411638520983, 4.63770841913521, 5.72297568708847, 5.67278210743382,
2.87898040841589, 4.77794431031051, 6.69989934770925, 4.18010020602993,
4.28229869222054, 6.47325820610683, 5.73193412972703, 0.836060701792944,
4.37959357272853, 4.48982482007942, 4.09977961461508, 4.96013142226247,
6.45031157468394, 3.18557718923309, 5.28451580294059, 5.44547778148437,
8.83919395262557, 6.08940873455808, 5.40325273508031, 5.43500364366441,
3.07766204858337, 4.89637627661071, 6.14412510760593, -0.485587355920933,
6.20311099333472, 5.09962057513129, 0.983662156370214, 4.56520333800937,
3.40784971252274, 6.6538883206875, 6.00252057357039, 7.97238557914813,
2.71015418553192, 3.96580809447913, 7.78900888660749, 4.28555518962493,
6.01393747682294, 5.94907034495602, 9.84611706857246, 5.79850505627085,
5.67541478004717, 4.30408910278679, 5.40321729312776, 5.85341408571007,
4.94639447712469, 4.34708559266172, 4.73871246438279, 3.19787036834528,
1.00957590923624, 2.47971892470545, 6.20071963231195, 6.97684170194268,
9.22965462317164, 6.53609378001856, 5.81203830009249, 10.5481367361956,
6.16969124017285, 4.21970045748313, 5.07606287078316, 2.52494896388046,
8.31352516884491, 3.71846400818337, 4.02334289547053, 5.86633070726614,
4.88813438851164, 2.8026412414906, 2.93427614698916, 4.14856696486954,
3.65940024812031, 7.15564460250633, 4.31207256865605, 5.1138900371015]
)
),
New Column( "Y",
Numeric,
"Continuous",
Format( "Best", 12 ),
Formula( :X1 + :X2 + Random Normal( 0, 0.5 ) ),
Set Selected
)
);
fm = dt << Fit Model( // SIMPLE ANALYSIS TO GENERATE A REPORT
Y( :Y ),
Effects( :X1, :X2, :X1 * :X2 ),
Personality( "Standard Least Squares" ),
Emphasis( "Effect Leverage" ),
Run(
:Y << {Summary of Fit( 1 ), Analysis of Variance( 1 ),
Parameter Estimates( 1 ), Lack of Fit( 0 ), Scaled Estimates( 0 ),
Plot Actual by Predicted( 1 ), Plot Regression( 0 ),
Plot Residual by Predicted( 1 ), Plot Studentized Residuals( 0 ),
Plot Effect Leverage( 1 ), Plot Residual by Normal Quantiles( 0 ),
Box Cox Y Transformation( 0 )}
)
);
// THAT'S THE PART THAT YOU ARE LOOKING FOR
fmr = fm << report;
fmr << Save MSWord (""); // Use this if you need to enter the path and name manually
//or
fmr << Save MSWord ("path and name of file") // Use this if you know the path and name of the file
// (replace the string with your desired location)
Facci sapere se funziona per te.
Migliore,
TS
Ri: Come salvare il report come file di testo?Ho uno script che assomiglia a questo:

che se corro, ottengo una finestra come questa:

a quel punto se premo Ctrl + s, si apre una finestra

Sono in grado di cambiare l'opzione sottolineata in rosso in txt. Il contenuto di questo file txt è fondamentalmente ogni output nel report, meno i grafici. Spero che ci sia un modo per aggiungere righe allo script in modo che possa eseguire anche la parte di salvataggio come txt per me.
Sto eseguendo JMP 9.0.0
Ri: Come salvare il report come file di testo tramite script?Questo è molto vicino a quello che cerco. Tuttavia, sembra che "Salva MSWord" cerchi di salvare l'intero contenuto del rapporto e quindi non è adatto per il salvataggio in formato txt. Il tentativo di aprire il file txt salvato con questo metodo in un editor di testo causa errori a causa di dati binari.Ri: Come salvare il report come file di testo tramite script?Puoi essere più specifico su ciò che stai tentando di estrarre dall'analisi del file di testo salvato?E perché deve essere in un file di testo?
Se non sei interessato ad estrarre i dati direttamente dall'Albero di visualizzazione dell'output puoi salvarli in formato schema
names default to here(1);
dt=open("$SAMPLE_DATA\big class.jmp");
lg = Logistic( Y( :sex ), X( :height ), Target Level( "M" ) );
chiSQ = (report(lg)["Whole Model Test"][numbercolbox(3)]<<GET></GET>
L'output è simile a questo:
"New Window(\!"Untitled\!", <<Journal, Journal Box(\!"ListBox(vertical,near,sub(
OwnerBox(sub(
OutlineBox(
open(1),title(\!\!\!"Response Y\!\!\!"),rerun(Fit Model(Y(:Y), Effects(:X1, :X2, :X1 * :X2), Personality(\!\!\!"Standard Least Squares\!\!\!"), Emphasis(\!\!\!"Effect Leverage\!\!\!"), Run(:Y << {Summary of Fit(1), Analysis of Variance(1), Parameter Estimates(1), Lack of Fit(0), Scaled Estimates(0), Plot Actual by Predicted(1), Plot Regression(0), Plot Residual by Predicted(1), Plot Studentized Residuals(0), Plot Effect Leverage(1), Plot Residual by Normal Quantiles(0), Box Cox Y Transformation(0)}))),Context({Y(\!\!\!"Y\!\!\!")}),default font id(2),helpKey(\!\!\!"FitLS\!\!\!"),sub(
WrapListBox(sub(
OutlineBox(
open(1),title(\!\!\!"Whole Model\!\!\!"),default font id(2),helpKey(\!\!\!"FitLS Whole\!\!\!"),sub(
OutlineBox(
open(1),title(\!\!\!"Actual by Predicted Plot\!\!\!"),default font id(2),helpKey(\!\!\!"Fit YByPred\!\!\!"),sub(
PictureBox(sub(
BorderBox(top(8),left(5),bottom(8),right(14),sides(16384),options(0),xmin(0),ymin(0),sub(
ScaleBox(id(1),axis(scaleType(0),scaleOrig(-2),scaleWidth(14),widthMajor(2),
nbin(7),nminor(0),timeCode(0),ndec(0),ndecSpec(99),FieldWidth(9),
MinInitInt(-2),MaxInitInt(12),LinearInit,MajorInit(2),MinorInit(0),NObsInit(100),
options(prohibitLogScale,showMajorTicks,showMinorTicks,showLabels,noMinorTickLabelsOnLogAxis,),scaleTypeOptions(),nLabelRows(1),labelRows(LabelRowNumeric(default font id(7),),),labelRows12(LabelRowContinuous(options(0),Automatic Font Size(0),Automatic Tick Marks(0),Inside Ticks(0),Label Alignment(\!\!\!"Near\!\!\!"),Label Buffer Scale(1),Label Orientation(\!\!\!"Horizontal\!\!\!"),Lax Label Range(0),Line Color(2147483647),Line Width(1),Major Grid Line Color(-14145495),Minimum Depth(0),Minimum Font Size(7),Minor Grid Line Color(-15790320),Show Major Grid(0),Show Major Labels(1),Show Major Ticks(1),Show Minor Grid(0),Show Minor Labels(0),Show Minor Ticks(1),Tick Offset(0),Truncate format to interval(1),Wrap Lines(0),default font id(7),),),),length(266),baselength(266),sub(
ScaleBox(id(2),axis(scaleType(0),scaleOrig(-2),scaleWidth(14),widthMajor(2),
nbin(7),nminor(0),timeCode(0),ndec(0),ndecSpec(99),FieldWidth(9),
MinInitInt(-2),MaxInitInt(12),LinearInit,MajorInit(2),MinorInit(0),NObsInit(100),
options(showMajorTicks,showMinorTicks,showLabels,noMinorTickLabelsOnLogAxis,),scaleTypeOptions(),nLabelRows(1),labelRows(LabelRowNumeric(default font id(7),),),labelRows12(LabelRowContinuous(options(0),Automatic Font Size(0),Automatic Tick Marks(0),Inside Ticks(0),Label Alignment(\!\!\!"Near\!\!\!"),Label Buffer Scale(1),Label Orientation(\!\!\!"Horizontal\!\!\!"),Lax Label Range(0),Line Color(2147483647),Line Width(1),Major Grid Line Color(-14145495),Minimum Depth(0),Minimum Font Size(7),Minor Grid Line Color(-15790320),Show Major Grid(0),Show Major Labels(1),Show Major Ticks(1),Show Minor Grid(0),Show Minor Labels(0),Show Minor Ticks(1),Tick Offset(0),Truncate format to interval(1),Wrap Lines(0),default font id(7),),),),length(200),baselength(200),sub(
ListBox(horizontal,near,sub(
AxisBox(side(R),size(44,200),locked(false),scales(0,2,0,2),sub(
TextEditBox(\!\!\!"Y Actual\!\!\!",default font id(9),wrapWidth(200),justification(1),vjustification(1),left,minSize(16,43),maxSize(16,43),BaseSize(0,0),sizeID(0,-1),))),
ListBox(vertical,near,sub(
FrameBox(size(266,200),border(12303),flags(0),markerSize(-1),ndisallow(1),disallow(\!\!\!"Background Map\!\!\!"),scales(1,2,1,2),seg(
,LineSeg(description(\!\!\!"Line of Mean\!\!\!"),properties(color(5), width(2), transparency(0.75)),n(2),x(-9,22.5),y(4.910450521166,4.910450521166),log curve(false),selectable(false),selectionMode(0),),IfSeg(description(\!\!\!"0.05 Significance Curve\!\!\!"),sub(
PolySeg(n(174),
x(-9,-8.5078125,-8.015625,-7.5234375,-7.03125,-6.5390625,-6.046875,-5.5546875,-5.0625,-4.5703125,
-4.078125,-3.5859375,-3.09375,-2.6015625,-2.109375,-1.6171875,-1.125,-0.6328125,-0.140625,0.10546875,
0.3515625,0.59765625,0.84375,1.08984375,1.3359375,1.58203125,1.828125,2.07421875,2.3203125,2.56640625,
2.8125,3.05859375,3.3046875,3.55078125,3.796875,4.04296875,4.2890625,4.53515625,4.78125,5.02734375,
5.2734375,5.51953125,5.765625,6.01171875,6.2578125,6.50390625,6.75,6.99609375,7.2421875,7.48828125,
7.734375,7.98046875,8.2265625,8.47265625,8.71875,8.96484375,9.2109375,9.45703125,9.703125,9.94921875,
10.1953125,10.44140625,10.6875,11.1796875,11.671875,12.1640625,12.65625,13.1484375,13.640625,14.1328125,
14.625,15.1171875,15.609375,16.1015625,16.59375,17.0859375,17.578125,18.0703125,18.5625,19.0546875,
19.546875,20.0390625,20.53125,21.0234375,21.515625,22.0078125,22.5,22.5,22.0078125,21.515625,
21.0234375,20.53125,20.0390625,19.546875,19.0546875,18.5625,18.0703125,17.578125,17.0859375,16.59375,
16.1015625,15.609375,15.1171875,14.625,14.1328125,13.640625,13.1484375,12.65625,12.1640625,11.671875,
11.1796875,10.6875,10.44140625,10.1953125,9.94921875,9.703125,9.45703125,9.2109375,8.96484375…
Inoltre, l'output può essere salvato in una struttura dati XML
xmlVal = char(report(lg)<<GET xml=""></GET>
Il suo output sembra
<OutlineBox width=\!"418\!" height=\!"697\!" helpKey=\!"Logistic Report\!" isOpen=\!"true\!">Logistic Fit of sex By height<IfBox leftOffset=\!"12\!" topOffset=\!"25\!" width=\!"405\!" height=\!"319\!" isTrue=\!"true\!">
<PictureBox width=\!"405\!" height=\!"319\!">
<BorderBox width=\!"405\!" height=\!"319\!">
<ScaleBox leftOffset=\!"5\!" topOffset=\!"5\!" width=\!"395\!" height=\!"309\!" charID=\!"1\!" ID=\!"1\!">
<ScaleBox width=\!"395\!" height=\!"309\!" charID=\!"2\!" ID=\!"2\!">
<ScaleBox width=\!"395\!" height=\!"309\!" charID=\!"3\!" ID=\!"3\!">
<ListBox width=\!"395\!" height=\!"309\!">
<AxisBox width=\!"56\!" height=\!"269\!" charID=\!"2\!">
<DropBox leftOffset=\!"0\!" topOffset=\!"126\!" width=\!"18\!" height=\!"16\!">
<TextEditBox width=\!"18\!" height=\!"16\!">sex</TextEditBox>
</DropBox>
</AxisBox>
<ListBox leftOffset=\!"56\!" topOffset=\!"0\!" width=\!"321\!" height=\!"309\!">
<FrameBox width=\!"321\!" height=\!"269\!" helpKey=\!"FitNom Plot\!">
<SegPlaceholder description=\!"Grid Lines\!"/>
<SegPlaceholder description=\!"Reference Lines\!"/>
<IfSeg description=\!"Probability Curves\!" isTrue=\!"true\!">
<LineSeg/>
</IfSeg>
<IfSeg isTrue=\!"true\!">
<MarkerSeg/>
</IfSeg>
<IfSeg isTrue=\!"false\!">
<LineSeg description=\!"Rate Curve\!"/>
</IfSeg>
</FrameBox>
<AxisBox leftOffset=\!"0\!" topOffset=\!"269\!" width=\!"321\!" height=\!"40\!" charID=\!"1\!">
<DropBox leftOffset=\!"143\!" topOffset=\!"24\!" width=\!"35\!" height=\!"16\!">
<TextEditBox width=\!"35\!" height=\!"16\!">height</TextEditBox>
</DropBox>
</AxisBox>
</ListBox>
<AxisBox leftOffset=\!"377\!" topOffset=\!"0\!" width=\!"18\!" height=\!"269\!" charID=\!"3\!"/>
</ListBox>
</ScaleBox>
</ScaleBox>
</ScaleBox>
</BorderBox>
</PictureBox>
</IfBox>
<OutlineBox leftOffset=\!"12\!" topOffset=\!"344\!" width=\!"94\!" height=\!"25\!" helpKey=\!"Logistic Iterations Report\!" isOpen=\!"false\!">Iterations<TableBox leftOffset=\!"12\!" topOffset=\!"25\!">
<NumberColBox>
<NumberColBoxHeader>Iter</NumberColBoxHeader>
<NumberColBoxItem>0</NumberColBoxItem>
<NumberColBoxItem>1</NumberColBoxItem>
<NumberColBoxItem>2</NumberColBoxItem>
<NumberColBoxItem>3</NumberColBoxItem>
<NumberColBoxItem>4</NumberColBoxItem>
</NumberColBox>
<NumberColBox>
<NumberColBoxHeader>Objective</NumberColBoxHeader>
<NumberColBoxItem>27.725887222</NumberColBoxItem>
<NumberColBoxItem>24.82346039</NumberColBoxItem>
<NumberColBoxItem>24.775518767</NumberColBoxItem>
<NumberColBoxItem>24.775389091</NumberColBoxItem>
<NumberColBoxItem>24.77538909</NumberColBoxItem>
</NumberColBox>
<NumberColBox>
<NumberColBoxHeader>Relative Gradient</NumberColBoxHeader>
<NumberColBoxItem>2.3440989376</NumberColBoxItem>
<NumberColBoxItem>0.3046124766</NumberColBoxItem>
<NumberColBoxItem>0.0160880971</NumberColBoxItem>
<NumberColBoxItem>0.0000491383</NumberColBoxItem>
<NumberColBoxItem>4.622843e-10</NumberColBoxItem>
</NumberColBox>
<NumberColBox>
<NumberColBoxHeader>Norm Gradient</NumberColBoxHeader>
<NumberColBoxItem>155.01290269</NumberColBoxItem>
<NumberColBoxItem>6.4687304657</NumberColBoxItem>
<NumberColBoxItem>0.0335930795</NumberColBoxItem>
<NumberColBoxItem>0.0003601736</NumberColBoxItem>
<NumberColBoxItem>5.6284711e-9</NumberColBoxItem>
</NumberColBox>
</TableBox>
</OutlineBox>
<OutlineBox leftOffset=\!"12\!" topOffset=\!"369\!" width=\!"374\!" height=\!"182\!" helpKey=\!"FitNom Whole\!" isOpen=\!"true\!">Whole Model Test<TableBox leftOffset=\!"12\!" topOffset=\!"25\!" width=\!"361\!" height=\!"70\!">
<StringColBox width=\!"61\!" height=\!"68\!">
<StringColBoxHeader>Model</StringColBoxHeader>
<StringColBoxItem>Difference</StringColBoxItem>
<StringColBoxItem>Full</StringColBoxItem>
<StringColBoxItem>Reduced</StringColBoxItem>
</StringColBox>
<NumberColBox leftOffset=\!"61\!" topOffset=\!"0\!" width=\!"95\!" height=\!"68\!">
<NumberColBoxHeader>-LogLikelihood</NumberColBoxHeader>
<NumberColBoxItem>2.750163</NumberColBoxItem>
<NumberColBoxItem>24.775389</NumberColBoxItem>
<NumberColBoxItem>27.525553</NumberColBoxItem>
</NumberColBox>
<NumberColBox leftOffset=\!"156\!" topOffset=\!"0\!" width=\!"58\!" height=\!"34\!">
<NumberColBoxHeader>DF</NumberColBoxHeader>
<NumberColBoxItem>1</NumberColBoxItem>
</NumberColBox>
<NumberColBox leftOffset=\!"214\!" topOffset=\!"0\!" width=\!"68\!" height=\!"34\!">
<NumberColBoxHeader>ChiSquare</NumberColBoxHeader>
<NumberColBoxItem>5.500327</NumberColBoxItem>
</NumberColBox>
<NumberColBox leftOffset=\!"282\!" topOffset=\!"0\!" width=\!"78\!" height=\!"34\!">
<NumberColBoxHeader>Prob>ChiSq</NumberColBoxHeader>
<NumberColBoxItem>0.0190*</NumberColBoxItem>
</NumberColBox>
</TableBox>
<TextBox leftOffset=\!"12\!" topOffset=\!"95\!" width=\!"6\!" height=\!"16\!"></TextBox>
<TableBox leftOffset=\!"12\!" topOffset=\!"111\!" width=\!"208\!" height=\!"70\!">
<StringColBox width=\!"155\!" height=\!"68\!">
<StringColBoxHeader></StringColBoxHeader>
<StringColBoxItem>RSquare (U)</StringColBoxItem>
<StringColBoxItem>AICc</StringColBoxItem>
<StringColBoxItem>BIC</StringColBoxItem>
<StringColBoxItem>Observations (or Sum Wgts)</StringColBoxItem>
</StringColBox>
<ColStackBox leftOffset=\!"155\!" topOffset=\!"0\!" width=\!"52\!" height=\!"68\!">
<ColStackBoxHeader></ColStackBoxHeader>
<NumberColBox width=\!"52\!" height=\!"17\!">
<NumberColBoxHeader></NumberColBoxHeader>
<NumberColBoxItem>0.0999</NumberColBoxItem>
</NumberColBox>
<NumberColBox leftOffset=\!"0\!" topOffset=\!"17\!" width=\!"52\!" height=\!"17\!">
<NumberColBoxHeader></NumberColBoxHeader>
<NumberColBoxItem>53.8751</NumberColBoxItem>
</NumberColBox>
<NumberColBox leftOffset=\!"0\!" topOffset=\!"34\!" width=\!"52\!" height=\!"17\!">
<NumberColBoxHeader></NumberColBoxHeader>
<NumberColBoxItem>56.9285</NumberColBoxItem>
</NumberColBox>
<NumberColBox leftOffset=\!"0\!" topOffset=\!"51\!" width=\!"52\!" height=\!"17\!">
<NumberColBoxHeader></NumberColBoxHeader>
<NumberColBoxItem>40</NumberColBoxItem>
</NumberColBox>
</ColStackBox>
</TableBox>
</OutlineBox>
<OutlineBox leftOffset=\!"12\!" topOffset=\!"551\!" width=\!"96\!" height=\!"25\!" isOpen=\!"false\!">Fit Details<TableBox leftOffset=\!"12\!" topOffset=\!"25\!">
<StringColBox>
<StringColBoxHeader>Measure</StringColBoxHeader>
<StringColBoxItem>Entropy RSquare</StringColBoxItem>
<StringColBoxItem>Generalized RSquare</StringColBoxItem>
<StringColBoxItem>Mean -Log p</StringColBoxItem>
<StringColBoxItem>RASE</StringColBoxItem>
<StringColBoxItem>Mean Abs Dev</StringColBoxItem>
<StringColBoxItem>Misclassification Rate</StringColBoxItem>
<StringColBoxItem>N</StringColBoxItem>
</StringColBox>
<ColStackBox>
<ColStackBoxHeader></ColStackBoxHeader>
<NumberColBox>
<NumberColBoxHeader>Training</NumberColBoxHeader>
<NumberColBoxItem>0.0999</NumberColBoxItem>
<NumberColBoxItem>0.1719</NumberColBoxItem>
<NumberColBoxItem>0.6194</NumberColBoxItem>
<NumberColBoxItem>0.4617</NumberColBoxItem>
<NumberColBoxItem>0.4286</NumberColBoxItem>
<NumberColBoxItem>0.3500</NumberColBoxItem>
</NumberColBox>
<NumberColBox>
<NumberColBoxHeader></NumberColBoxHeader>
<NumberColBoxItem>40</NumberColBoxItem>
</NumberColBox>
</ColStackBox>
<StringColBox>
<StringColBoxHeader>Definition</StringColBoxHeader>
<StringColBoxItem>1-Loglike(model)/Loglike(0)</StringColBoxItem>
<StringColBoxItem>(1-(L(0)/L(model))^(2/n))/(1-L(0)^(2/n))</StringColBoxItem>
<StringColBoxItem>∑ -Log(ρ[j])/n</StringColBoxItem>
<StringColBoxItem>√ ∑(y[j]-ρ[j])²/n</StringColBoxItem>
<StringColBoxItem>∑ |y[j]-ρ[j]|/n</StringColBoxItem>
<StringColBoxItem>∑ (ρ[j]≠ρMax)/n</StringColBoxItem>
<StringColBoxItem>n</StringColBoxItem>
</StringColBox>
</TableBox>
</OutlineBox>
<OutlineBox leftOffset=\!"12\!" topOffset=\!"576\!" width=\!"350\!" height=\!"120\!" helpKey=\!"FitNom ParmEst\!" isOpen=\!"true\!">Parameter Estimates<TableBox leftOffset=\!"12\!" topOffset=\!"25\!" width=\!"337\!" height=\!"53\!">
<StringColBox width=\!"54\!" height=\!"51\!">
<StringColBoxHeader>Term</StringColBoxHeader>
<StringColBoxItem>Intercept</StringColBoxItem>
<StringColBoxItem>height</StringColBoxItem>
</StringColBox>
<StringColBox leftOffset=\!"54\!" topOffset=\!"0\!" width=\!"0\!" height=\!"51\!">
<StringColBoxHeader>~Bias</StringColBoxHeader>
<StringColBoxItem></StringColBoxItem>
<StringColBoxItem></StringColBoxItem>
</StringColBox>
<NumberColBox leftOffset=\!"54\!" topOffset=\!"0\!" width=\!"71\!" height=\!"51\!">
<NumberColBoxHeader>Estimate</NumberColBoxHeader>
<NumberColBoxItem>-12.267957</NumberColBoxItem>
<NumberColBoxItem>0.19939641</NumberColBoxItem>
</NumberColBox>
<NumberColBox leftOffset=\!"125\!" topOffset=\!"0\!" width=\!"65\!" height=\!"51\!">
<NumberColBoxHeader>Std Error</NumberColBoxHeader>
<NumberColBoxItem>5.9870108</NumberColBoxItem>
<NumberColBoxItem>0.0954697</NumberColBoxItem>
</NumberColBox>
<NumberColBox leftOffset=\!"190\!" topOffset=\!"0\!" width=\!"68\!" height=\!"51\!">
<NumberColBoxHeader>ChiSquare</NumberColBoxHeader>
<NumberColBoxItem>4.20</NumberColBoxItem>
<NumberColBoxItem>4.36</NumberColBoxItem>
</NumberColBox>
<NumberColBox leftOffset=\!"258\!" topOffset=\!"0\!" width=\!"78\!" height=\!"51\!">
<NumberColBoxHeader>Prob>ChiSq</NumberColBoxHeader>
<NumberColBoxItem>0.0405*</NumberColBoxItem>
<NumberColBoxItem>0.0367*</NumberColBoxItem>
</NumberColBox>
</TableBox>
<IfBox leftOffset=\!"12\!" topOffset=\!"78\!" isTrue=\!"false\!" isVisible=\!"false\!">
<TextBox></TextBox>
</IfBox>
<TextBox leftOffset=\!"12\!" topOffset=\!"78\!" width=\!"107\!" height=\!"16\!">For log odds of M/F</TextBox>
<OutlineBox leftOffset=\!"12\!" topOffset=\!"94\!" width=\!"191\!" height=\!"25\!" helpKey=\!"Logistic Covariance\!" isOpen=\!"false\!">Covariance of Estimates<MatrixBox leftOffset=\!"12\!" topOffset=\!"25\!">Cov
<MatrixBoxRowName>Intercept</MatrixBoxRowName>
<MatrixBoxRowName>height</MatrixBoxRowName>
<MatrixBoxColName>Intercept</MatrixBoxColName>
<MatrixBoxColName>height</MatrixBoxColName>
<MatrixBoxCell>35.844</MatrixBoxCell>
<MatrixBoxCell>-0.571</MatrixBoxCell>
<MatrixBoxCell>-0.571</MatrixBoxCell>
<MatrixBoxCell>0.0091</MatrixBoxCell>
</MatrixBox>
</OutlineBox>
</OutlineBox>
</OutlineBox>Ri: Come salvare il report come file di testo tramite script?Ho dimenticato un output di testo aggiuntivo.È possibile visualizzare in output il formato HTML del display e, poiché l'HTML è un file di testo, è possibile analizzarlo
<!doctype html public "-//W3C//DTD HTML 4.0//EN">
<html><head><title>
JMP Report
</title><style>
body { font-family: Arial, sans-serif; font-size: 12px; padding: 0; margin: 10px; }
table { border-color: #a9a9a9; border-collapse: collapse; }
td,th { border-color: #a9a9a9; }
img { border: 1px solid #a9a9a9; }
h1,h2,h3,h4,h5 { padding: 0; margin: 5px 0px; }
</style>
</head><body>
<h2>Logistic Fit of sex By height</h2>
<img src="gfx/image36987882241.png" width=410 height=324><br>
<br>
<br>
<br>
<h3>Whole Model Test</h3>
<table border=1 cellpadding=2 cellspacing=1>
<tr style="vertical-align:top" align=right><th bgcolor=#D9D9D9 align=left>Model</th><th bgcolor=#D9D9D9> -LogLikelihood</th><th bgcolor=#D9D9D9>DF</th><th bgcolor=#D9D9D9>ChiSquare</th><th bgcolor=#D9D9D9>Prob>ChiSq</th></tr>
<tr style="vertical-align:top" align=right><td style="text-align:left">Difference</td><td>2.750163</td><td>1</td><td>5.500327</td><td><font COLOR="#f03246">0.0190*</td></tr>
<tr style="vertical-align:top" align=right><td style="text-align:left">Full</td><td>24.775389</td><td></td><td></td><td></td></tr>
<tr style="vertical-align:top" align=right><td style="text-align:left">Reduced</td><td>27.525553</td><td></td><td></td><td></td></tr>
</table><br>
<br>
<table border=1 cellpadding=2 cellspacing=1>
<tr style="vertical-align:top" align=right><td style="text-align:left">RSquare (U)</td><td>0.0999</td></tr>
<tr style="vertical-align:top" align=right><td style="text-align:left">AICc</td><td>53.8751</td></tr>
<tr style="vertical-align:top" align=right><td style="text-align:left">BIC</td><td>56.9285</td></tr>
<tr style="vertical-align:top" align=right><td style="text-align:left">Observations (or Sum Wgts)</td><td>40</td></tr>
</table><br>
<br>
<h3>Parameter Estimates</h3>
<table border=1 cellpadding=2 cellspacing=1>
<tr style="vertical-align:top" align=right><th bgcolor=#D9D9D9 align=left>Term</th><th bgcolor=#D9D9D9>Estimate</th><th bgcolor=#D9D9D9>Std Error</th><th bgcolor=#D9D9D9>ChiSquare</th><th bgcolor=#D9D9D9>Prob>ChiSq</th></tr>
<tr style="vertical-align:top" align=right><td style="text-align:left">Intercept</td><td> -12.267957</td><td>5.9870108</td><td>4.20</td><td><font COLOR="#f03246">0.0405*</td></tr>
<tr style="vertical-align:top" align=right><td style="text-align:left">height</td><td>0.19939641</td><td>0.0954697</td><td>4.36</td><td><font COLOR="#f03246">0.0367*</td></tr>
</table><br>
<br>
<span style="font-size:9pt">For log odds of M/F</span><br>
</body></html>Ri: Come salvare il report come file di testo tramite script?Due risposte.
bv = Bivariate(
Y( :weight ),
X( :height ),
Fit Line( {Line Color( {212, 73, 88} )} )
);
showproperties(bv);
rep = report(bv);
showproperties(rep);
rep<<SAVETEXT></SAVETEXT>Il bv è l'oggetto della piattaforma. Il rappresentante è l'oggetto della casella di visualizzazione. Le caselle di visualizzazione possono salvare il loro testo nel modo desiderato. La showproperties() mostra tutti i messaggi che possono essere inviati a un oggetto. (L'oggetto piattaforma è attivo e accetta messaggi per aggiungere e rimuovere analisi. Le caselle di visualizzazione nel report contengono output statico.)
La seconda risposta è ciò che suggerisce la maggior parte delle altre risposte: fare parte del lavoro pesante in JMP piuttosto che analizzare l'output di testo in un secondo momento. Lo spezzerei così:
JMP --- JSON --- Altro programma
Fare in modo che JMP trovi e salvi i parametri in un formato di file standard e faccia in modo che l'altro programma li legga in quel modo.
Ora hai un modo per scambiare i programmi su entrambe le estremità purché producano / consumino lo stesso formato. E quando aggiorni da JMP 9 a 15 (presto 16), se il testo è cambiato non devi riscrivere OtherProgram, basta (forse) toccare JSL per estrarre i valori in JSON. Oppure, se scegli una piattaforma diversa in JMP per ottenere le statistiche, funziona anche questo.