Turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

- JMP User Community
- :
- Discussions
- :
- Discussions
- :
- Quantile regression in JSL

Topic Options

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page

Highlighted
##

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

Quantile regression in JSL

Nov 25, 2014 6:13 PM
(3203 views)

Any chance anyone has already written a script to do quantile regression in JMP using JSL? Better yet, does anyone know whether quantile regression will included in future releases of JMP? Quantile regression is becoming pretty standard in statistical analysis and it is surprising that it hasn't been already implemented.

many thanks, Yves

8 REPLIES 8

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

Re: Quantile regression in JSL

Hello Yves,

If you have SAS installed on your machine with JMP, then you should be able to use the Quantile Regression add-in found in **File > SAS > SAS Add-Ins**. This will work through JMP 10. I'm not sure if you have access to SAS or what version of JMP you are using.

In the Pro version of JMP 12, quantile regression will be included as an option in the Generalized Regression platform.

-Michael

Michael Crotty

Sr Statistical Writer

JMP Development

Sr Statistical Writer

JMP Development

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

Re: Quantile regression in JSL

Many thanks for this info Michael. I knew of the SAS add-in but unfortunately I don't have SAS on my computer and my university doesn't want to allow remote connection to the SAS server. Do you know whether the quantile regression platform in JMP 12 will allow it to run as a multiple regression, i.e. with many X variables?

Thanks again, Yves

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

Re: Quantile regression in JSL

Yves,

Yes, the quantile regression routine that is in JMP Pro 12 will run multiple quantile regression. Note that it will be a Pro-only feature, though.

Thanks,

Michael

Michael Crotty

Sr Statistical Writer

JMP Development

Sr Statistical Writer

JMP Development

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

Re: Quantile regression in JSL

I am using JMP 13.1.0 and the SAS Addin menu item is missing under Files/SAS. Is there another way of activating the add in or is quantile regression only available on Pro now?

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

Re: Quantile regression in JSL

The Addins menu does not appear until you install your first add-in. Simply open the add-in file and JMP will ask you to confirm that you want to install/register it. That is all it takes.

Learn it once, use it forever!

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

Re: Quantile regression in JSL

I believe that (since version 12), JMP has been able to do quantile regression, so you may not need to use SAS. I've attached an old table with some saved scripts, but please be aware I didn't review it in detail. Perhaps it's useful though.

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

Re: Quantile regression in JSL

In looking over the documentation, it doesn't appear that I can run a quantile regression for multiple quantiles simultaneously. Am I missing something, or is this a wish list item? Many thanks in advance!

Sincerely, MG

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

Re: Quantile regression in JSL

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
```