Turn on suggestions

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

Showing results for

- Home
- /
- Programming
- /
- SAS Procedures
- /
- How do I get SAS to output p-values for univariable quantile regressio...

Options

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

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

Posted 08-04-2015 02:46 PM
(2073 views)

Hi all,

When I include multiple predictors in a multivariable model, SAS outputs a p-value, along with the CI. It doesn't do that if I only include one variable. How do I get SAS to print a p-value?

Thanks!

10 REPLIES 10

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

What does your code look like?

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

graphics on;

**quantreg** algorithm=simplex; model x=y / quantile= **.1** **.2** **.25** **.3** **.4** **.5** **.6** **.7** **.75** **.8** **.9** **.99**; **run**; ods graphics off; **run**;

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

I notice that the first example in the documentation doesn't generate p values (with 2 predictors), but that values are in the output for the second example (with 13 predictors),. The difference is in the CI= option. The default for 'smaller' datasets is a rank based method that does not generate t values and p values for the regression coefficients. Try adding CI=RESAMPLING to your PROC QUANTREG line of code.

Alternatively, you could use a TEST statement.

Steve Denham

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

Hi Steve,

Thank you for your response. I have a very small sample size (n=70). I thought that using the ci=resampling option is unstable for small datasets. Is this incorrect?

Thanks.

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

Could well be. And CI=SPARSE may add a lot of time to the run, which leaves the use of the TEST statement. This one is easy enough with a single predictor:

TEST x1/wald lr qinteract;

The last option, QINTERACT, tests whether the estimated coefficients are different across the various quantiles.

Steve Denham

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

I'm getting these warning messages:

"WARNING: The test for equal coefficients across quantiles is

ignored because the joint covariance is not computed.

WARNING: Heterogeneous covariance estimate is degenerate.

Covariance and correlation for QUANTILE= 0.1 cannot be

computed.

WARNING: Heterogeneous covariance estimate is degenerate.

Covariance and correlation for QUANTILE= 0.9 cannot be

computed.

WARNING: Heterogeneous covariance estimate is degenerate.

Covariance and correlation for QUANTILE= 0.99 cannot

be computed.

WARNING: The Wald test is ignored because the covariance could

not be computed at QUANTILE= 0.1.

WARNING: The Wald test is ignored because the covariance could

not be computed at QUANTILE= 0.9.

WARNING: The Wald test is ignored because the covariance could

not be computed at QUANTILE= 0.99.

WARNING: The likelihood ratio test is ignored at QUANTILE= 0.99

because the estimated sparsity function is close to 0."

Should I be worried? I assume it's because there are no observations at certain percentiles. Is my understanding correct?

Thanks.

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

Worried--well estimating a 99% quantile with only 70 observations is going to cause trouble, and it appears that you need either more data, or fewer quantiles (at well defined points) for the heterogeneous (QINTERACT) to be able to deliver. I would look at deciles or quartiles and see how this works out.

Steve Denham

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

Hi Steve,

I just ended up using "ci=resampling" and I stopped getting those warning messages. The reason why I decided to use that is that when I did a multivariable model, SAS automatically used that option to calculate the confidence intervals. Do you think my reasoning is justifiable?

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

Yes I do. Good work on this.

Steve Denham

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

Thank you for walking through the problem with me!

**Available on demand!**

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

Find more tutorials on the SAS Users YouTube channel.