turn on suggestions

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

Showing results for

Find a Community

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

Topic Options

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

- Mark as New
- Bookmark
- Subscribe
- RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

08-04-2015 02:46 PM

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!

- Mark as New
- Bookmark
- Subscribe
- RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

Posted in reply to sara_a

08-04-2015 03:17 PM

What does your code look like?

- Mark as New
- Bookmark
- Subscribe
- RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

Posted in reply to Reeza

08-04-2015 03:27 PM

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
- RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

Posted in reply to sara_a

08-05-2015 08:28 AM

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
- RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

Posted in reply to SteveDenham

08-05-2015 12:49 PM

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
- RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

Posted in reply to sara_a

08-05-2015 01:29 PM

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
- RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

Posted in reply to SteveDenham

08-05-2015 05:20 PM

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
- RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

Posted in reply to sara_a

08-11-2015 08:03 AM

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
- RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

Posted in reply to SteveDenham

08-11-2015 12:54 PM

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
- RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

Posted in reply to sara_a

08-11-2015 02:36 PM

Yes I do. Good work on this.

Steve Denham

- Mark as New
- Bookmark
- Subscribe
- RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

Posted in reply to SteveDenham

08-11-2015 02:45 PM

Thank you for walking through the problem with me!