- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Jim:
I have been putting in the calculation for the t Stat for the bridge stats check.
The t stat function involves gamma, the t stat function uses the number of degrees of freedom, but the Fortran gamma function goes to infinity with n of 170, the t stat tables are all close to the range 0 to 5 , the tables list a dof of infinity, 170 is not infinity it is actually quite a small stats data set.
program Console9
implicit none
integer i
real*8 g, f
! Variables
! Body of Console9
print *, 'Hello World'
f = 0.0
do i = 1, 1000
f = f+ 1.0
g = gamma(f)
write(*,*)i,f,g
end do
end program Console9
This is the result from this simple program.
I was looking at the EXCEL function for t Stat in their data analysis, they quite comfortably say they are calculating a t stat for a dof of several thousand in their linear regression models.
I tried fitting a curve through their t stat data, but one cannot fit a simple curve,
I was wondering, just as a thought experiment, how these publishers of a t STAT table can say they know infinity, infinity divided by infinity is still infinity. And how the heck does EXCEL do a calculation I cannot do in Fortran, unless they use an extrapolation function.
Anyway, enough complaining, thankfully I do not have to write a gamma function.
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The exponent overflowed that of REAL*8 at step 172
If you use REAL*16...
Now if these are correct, I cannot say. The online calculators I came across do not show up to 1000
Jim
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
thanks, LOL where did the real16 come from? I have not seen it before, maybe I am stuck in 1988 with Fortran 3.13.
Johnson's Probability and Statistics for Engineers provides a simple problem for the solution of the linear regression with all of the confidence limits, t stat etc..
I have been trying to line his model and method up with the EXCEL results, so I can check the code, much faster to just code it than use EXCEL. I am sick of looking up t STAT tables as well.
But Johnson and EXCEL use the same name for different things, just annoying and Johnson jumps all over the place so it is hard to convert to code without spending hours looking at the example, excel and then the errors.
EXCEL determines the standard error using the confidence limit equation, which is different to Johnson's standard error definition.
It would be nice if we all agreed on standard terms.
![](/skins/images/7B0AB6865064EAE32B30EC9A4E94B48A/responsive_peak/images/icon_anonymous_message.png)
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page