BookmarkSubscribeRSS Feed
sara_a
Calcite | Level 5


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
sara_a
Calcite | Level 5

graphics on;

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

SteveDenham
Jade | Level 19

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

sara_a
Calcite | Level 5


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.

SteveDenham
Jade | Level 19

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

sara_a
Calcite | Level 5


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.

SteveDenham
Jade | Level 19

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

sara_a
Calcite | Level 5

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?

SteveDenham
Jade | Level 19

Yes I do.  Good work on this.

Steve Denham

sara_a
Calcite | Level 5

Thank you for walking through the problem with me! Smiley Happy

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 10 replies
  • 1929 views
  • 3 likes
  • 3 in conversation