问题
I am planning to convert an Excel code into SAS
There is a function called TINV used in Excel, and the same function is also in SAS with the same syntax, but I am getting two different results for the same numbers. Please help me know if both are different functions or the same.
SAS:
TINV(0.95,2)
Result: 2.9199855804
Excel:
TINV(0.95,2)
Result : 0.070799
回答1:
Although these functions appear to have the same syntax, they differ in how the arguments are interpreted. It looks as though SAS uses a 1-tailed test, and Excel uses a 2-tailed test, and also SAS follows the convention that probability is defined as 1-p rather than p.
So if in SAS you have tinv(0.95,2)
, the equivalent excel formula is actually tinv((1-0.95)*2,2)
.
来源:https://stackoverflow.com/questions/48864768/sas-tinv-vs-excel-tinv