[R] how to compute p-value?
Christoph Buser
buser at stat.math.ethz.ch
Wed Nov 15 09:27:33 CET 2006
Dear Michael
It calls the function pt() to calculate the p-value based on
your t statistics and the degree of freedoms.
If you are interested how it is calculated in details, you can
have a look into the source code:
/R-2.4.0/src/nmath/pt.c
There you can find the C-code.
Hope this helps
Christoph Buser
--------------------------------------------------------------
Credit and Surety PML study: visit our web page www.cs-pml.org
--------------------------------------------------------------
Christoph Buser <buser at stat.math.ethz.ch>
Seminar fuer Statistik, LEO C13
ETH Zurich 8092 Zurich SWITZERLAND
phone: x-41-44-632-4673 fax: 632-1228
http://stat.ethz.ch/~buser/
--------------------------------------------------------------
Michael writes:
> Hi all,
>
> I just want to understand how R computes p-value in a simple linear
> regression model? The reason is that in Matlab in the
>
> function which "evaluate standard errors for multivariate normal
> regression", it just provide estimates and standard errors, without giving
> out p-value,
>
> It computes t-statistics as follows:
>
> abs(beta_hat/std_beta_hat)
>
> how to go further to get p-value?
>
> Thanks
>
> [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
More information about the R-help
mailing list