// This shows how to conduct Fractional Random Weight Bootstrap Samples // In this case, the bootstraps are taken for the Weibull parameter estimates on the Fan file. // Based on Meeker & Gotwalt, Applications of the Fractional-Random-Weight Bootrap // https://community.jmp.com/t5/Discovery-Summit-2017/Applications-of-the-Fractional-Random-Weight-Bootstrap/ta-p/44063 Names Default To Here( 1 ); dt = Open( "$Sample_Data/Reliability/Fan.jmp" ); nSample = 3000; // number of bootstrap samples nrow = n rows(dt); // number of rows in dataset g_scale=((nrow-1)/nrow); // determine the scale parameter for Gamma distribution gamma1 = dt << New Column( "Gamma1", Numeric, Formula( Random Gamma(g_scale, 1) ) ); // generate random Gamma distributed data wgtCol = dt << New Column( "Fractional Weight", Numeric, Formula( (g_scale / Col Sum( :Gamma 1 )) * :Gamma 1 ) ); // determine fractional random weights betas = J( nSample, 2, . ); // store results For( sample = 1, sample <= nSample, sample++, gamma1 << evalFormula; wgtCol << evalFormula; obj = Survival( Y( :Time ), Censor( :Censor ), Freq( :Fractional Weight ), Failure Plot( 0 ), Survival Plot( 0 ), Weibull Fit, Invisible ); report = obj << report; betai = report["Weibull Parameter Estimates", Table Box( 1 ), ColumnBox( "Estimate" )] << Get; betas[sample, 0] = Matrix( {betai} ); obj << close window; ); dtResult = As Table( betas ); Column( dtResult, 1 ) << SetName( "Alpha" ); Column( dtResult, 2 ) << SetName( "Beta" ); dtResult << Bivariate( X( :Alpha ), Y( :Beta ), HistogramBorders );