# Obtain p-values from t-values

I used Tobit regression and wanted to test if the coefficients are significant. The problem is that when I run the R code I get t-values instead of z-values. I found code on how to calculate p-values for z-values and I'm wondering if you can use the same code for the t-values that you use for the z-values to calculate the p-values.

This is the code for when you have z-values:

ctable <- coef(summary(m))
pvals <- 2 * pt(abs(ctable[, "z value"]), df.residual(m), lower.tail = FALSE)
cbind(ctable, pvals)


This is the code I used for the t-values:

ctable <- coef(summary(m))
pvals <- 2 * pt(abs(ctable[, "t value"]), df.residual(m), lower.tail = FALSE)
cbind(ctable, pvals)

Value  Std. Error   t value         pvals
(Intercept):1   209.559678 32.50165463  6.447662  3.327237e-10
(Intercept):2    4.184758  0.05227107 80.058783 7.628269e-246
math             5.914589  0.70502334  8.389210  8.842612e-16
proggeneral     -12.714341 12.36481457 -1.028268  3.044547e-01
progvocational  -46.143265 13.65615960 -3.378934  8.002457e-04

-

Computationally this is a correct calculation of a p value for a two sided test of whether there is significant evidence the parameter behind your t value is different from zero, assuming the t statistic does indeed have a t distribution under the null hypothesis.

I'm surprised the summary() method doesn't itself calculate this p value. This makes me wonder whether the author has reason to doubt whether these statistics really do have t distributions and this is a valid test to use. I would investigate this further if I were you.

I would also round your p values (and probably everything else in that table) to two decimal places to avoid giving a false sense of precision.

-