Our World Statistics Day conversations have been a great reminder of how much statistics can inform our lives. Do you have an example of how statistics has made a difference in your life? Share your story with the Community!
Choose Language Hide Translation Bar
Level I

Get Results from Fit Life by X

When sending the message get results to Fit Life by X the function returns a list that can not be parsed. Below is the log results of running the example script. It is not possible to extract any of the data from the returned list. Note the list has only 1 element and it is 9 characters long id the word Lognormal.



//clear log();
Names Default To Here( 1 );
Clear Globals();

dt = Open( "$SAMPLE_DATA/Reliability/Devalt.jmp" );
obj = dt << Fit Life by X(
    Y( :Hours ),
    X( :Temp ),
    Distribution( Lognormal ),
    Censor( :Censor ),
    Relationship( Arrhenius Celsius ),
    Freq( :Weight ),
    Nested Model Tests( Regression )
r = obj << Get Results;

If( Is List( r ),
    Show( r );
    Show( N Items( r ) );
    Show( Length( r[1] ) );

obj << close window;
Close( dt, nosave );

r = {Lognormal({β0(-13.4686494027261), β0 Std Error(2.88719528358502), β1(0.627852956861924), β1 Std Error(0.0828387976570147), σ(0.977823306557825), σ Std Error(0.132646840946067), Covariance Matrix(
[ 8.3358966055556 -0.238821313406502 -0.195117141288106,
-0.238821313406502 0.00686226639725982 0.00592730106968758,
-0.195117141288106 0.00592730106968758 0.0175951844129713]), maximum loglikelihood(-321.702778021814), AICc(649.554624366609), BIC(658.723392465329), Converged("Yes")})};
N Items(r) = 1;
Length(r[1]) = 9;


Super User

Re: Get Results from Fit Life by X

It is possible to extract items from the data structure.  For example:

b0 = r["LogNormal"]["β0"];
b0_se =  r["LogNormal"]["β0 Std Error"];

b0 = -13.4686494027261;

b0_se = 2.88719528358502;