Using R, and package quantreg
, I am performing quantile regression analyses to my data.
I can get access to the p-values using the se (standard error) estimator in the summary function, as below, however I only get 5 decimal places, and would like more.
model <- rq(outcome ~ predictor)
summary(model, se="ker")
Call: rq(formula = outcome ~ predictor)
tau: [1] 0.5
Coefficients:
Value Std. Error t value Pr(>|t|)
(Intercept) 78.68182 2.89984 27.13312 0.00000
predictor 0.22727 0.03885 5.84943 0.00000
How might I get access to more decimal places on the p-values?
Update
Ok, so I can get some more decimal places by selecting the sub-object that contains the matrix of numerical results;
> summary(model, se="ker")[[3]]
Value Std. Error t value Pr(>|t|)
(Intercept) 78.6818182 3.13897835 25.066059 0.000000e+00
predictor 0.2272727 0.04105681 5.535567 4.397638e-08
However the P-value is still rounded to 0 when the value is <1e-12 (the above output is a simplified example model). I can get some more by applying the suggestion from @seancarmody ;
format(summary(model, se="ker")[[3]], digits=22)
But if P < 1e-22 it is still rounded to 0, and if "digits" is set to > 22 I get the following error;
format(summary(model, se="ker")[[3]], digits=23)
Error in prettyNum(.Internal(format(x, trim, digits, nsmall, width, 3L, : invalid 'digits' argument
Is it possible to access even more decimal places?