0

I collected analysts’ forecasts and calculated bias and accuracy such as:

$bias=actual-forecast$

$accuracy=abs(actual-forecast)$

What I am wondering is now on how to calculate the t-statistic to determine that the median bias is significantly different from zero. I am using R and found the t.test function to calculate mean significance but did not find anything appropriate for the median. (in my case I need the one sample t-test)

kjetil b halvorsen
  • 63,378
  • 26
  • 142
  • 467
Gritti
  • 151
  • 2
  • 11
  • can i delete the question? i get a warning for trying to delete it as someone already answered the question – Gritti Aug 16 '14 at 19:09
  • I think the SE system may not let you delete your question once there is an upvoted answer. I'm not sure I follow your question, though. Are you just wondering how to do a one-sample t-test in R? – gung - Reinstate Monica Aug 16 '14 at 19:12
  • 1
    Gritti - you can't delete the question yourself; once it has an answer, it's not yours to delete any more. If you wish, you can edit it to improve it, and I strongly suggest you make it as clear as you can. – Glen_b Aug 17 '14 at 00:30
  • 2
    The one-sample t-test with $\text{H}_0: \mu_0=0$ is performed like so: `t.test(x)` (assuming your data were in `x`). It returns a test statistic and p-value in the output. – Glen_b Aug 17 '14 at 00:32
  • I edited my question. Hope it is clear now – Gritti Aug 17 '14 at 14:14
  • If you provide a question with respect to an R function, please provide a reproducable data example to make giving helpful answers to your question easier. Glens comment already explains the basic steps. I deleted my answer as it did not fit your updated question anymore. – SimonG Aug 17 '14 at 14:17

0 Answers0