Normal Quantile
Normal Quantile using Run Script
Summary: Fits an exponential model to a data table, generating a report, and calculating confidence bounds for parameter estimates.
Code:
dt = Open("data_table.jmp");
flbx = dt << Run Script( "Fit Life by X" );
flbx << Fit Exponential;
rpt = Report( flbx );
z = Normal Quantile( .975 );
expvals = [-28.5185625373458 3.17756972351273 . ., 1.16679249525913 0.106118891768106 . .];
actvals = (rpt[Outline Box( "Exponential Results" )][Outline Box( "Estimates" )][Table Box( 1 )] << get as matrix);
expvals[1, 3 :: 4] = (actvals[1, 1] - z * actvals[1, 2]) || (actvals[1, 1] + z * actvals[1, 2]);
expvals[2, 3 :: 4] = (actvals[2, 1] - z * actvals[2, 2]) || (actvals[2, 1] + z * actvals[2, 2]);
Code Explanation:
- Open data table.
- Run Fit Life by X script.
- Fit exponential model.
- Generate report object.
- Calculate normal quantile.
- Define expected values matrix.
- Extract actual estimates from report.
- Calculate lower confidence bound for first parameter.
- Calculate upper confidence bound for first parameter.
- Calculate lower confidence bound for second parameter.
- Calculate upper confidence bound for second parameter.