My solution is to run the quantile regressions in a loop by quantile. The results match the results I get using the quantreg package in R. Here is an example of the script using the BigClass data. Names Default to Here( 1 );
dt = Open("$SAMPLE_DATA/Big Class.jmp"); // open data table
q = Index(0.1, 0.90, 0.1); // create row vector of required quantiles
For(i = 1, i<=NItems(q), i++, //loop through the list of quantiles and run model by quantile
run = dt << Fit Model(
Y( :Weight ),
Effects( :Height ),
Personality( "Generalized Regression" ),
Generalized Distribution( "Quantile Regression" ),
Quantile( q[i] ), // quantile
Run( Fit( Estimation Method( Maximum Likelihood ), Validation Method( None ) ) ),
SendToReport( Dispatch( {}, "Model Launch", OutlineBox, {Close( 0 )} ) )
);
run << (Fit[1] << Save Residual Formula); // save residuals to compare with R "quantreg" package
run << Close Window;
); Names Default To Here( 1 );
R Init(); // Initializing R
R Submit( //submit to R
"\[
#install.packages("quantreg") # installing quantile regression package
library(quantreg) #using quantreg after installed
setwd("path to file") # set working directory
dt <- read.csv("BigClass.csv", header = TRUE) # read in the data
attach(dt)
head(dt)
fit1 <- rq(Weight ~ Height, tau=seq(0.1, 0.9, by=.1), data=dt) # run the qr
r1 <- resid(fit1) # output residuals
]\"
); // end R Submit
... View more