<div dir="ltr"><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div>Hi,<br><br></div>I have a question here. How do I reference a Students Distribution Table inside GraDS? I will explain my situation here. Using GraDS scripting, I was able to calculate slope, and intercept from linear regression calculation. Using the slope and intercept I was able to construct a fitted model and find the standard error of the slope. From which I calculate residuals (simply the data minus fitted model), finding actop and acbottom, then residual auto correlation (actop divide by acbottom). Depending on the value of the residual autocorrelation, I calculate Effective N to be either the original n or based on calculation using the residual auto correlation. After which I find the standard error based on effective n. Then finally t value from dividing the standard error of the slope with the standard error based on effective n. What I need to do next is to get the corresponding confidence level by using the calculated t value and effective n to a student distribution table. How do I go about this? Below is flow of the calculation.<br>
<br></div><div>1. Calculate 30 JJA seasons of a variable (produce time1 until time30)<br></div><div>2. Calculate the slope and intercept using linear regression (produce slope and intercept)<br></div><div>3. Calculate the fitted model using the intercept and and slope (produce fitted1 to fitted30)<br>
</div></div></div></div></div>4. Calculate the standard error of the slope(SEOTS) (produced SEOTS)<br></div>5. Calculate the residuals, time-fitted (produce residual1 to residual30)<br></div>6. Calculate the residual mean.<br>
</div>7. Calculate actop<br></div>8. Calculate acbottom<br></div>9. Calculate the residual auto correlation<br></div>10. based on value of residual auto correlation, calculate effective n<br></div>11. Effective n is either 30 (in this example) or through calculation.<br>
</div>12. Calculate the standard error based on effective n<br></div>13. Calculate Tvalue which is slope divided by standard error based on effective n<br><br></div>This is where I'm stuck. I want to reference a students distribution table to get the confidence level for the slope (which is actually trend of linear regression). And the confidence level varies between each grid point as the t value and effective n varies between each grid point.<br>
<br></div>In Scilab 5.5.0, I would use:<br>[p,q]=cdft('pq',abs(TValue),round(EffectiveN+0.5))<br></div>ConfidenceLevel=(1-(q*2))*100<br></div>which will give the confidence value from double tailed t test. This is just an example. Is there any student distribution function inside GraDS which I'm not aware of?<br>
<br></div>So how do I do this with GraDS or openGraDS?<br><br></div>