Page 1 of 1

Headers of Estimates.csv

Posted: 06 Sep 2021, 15:25
by biancar
Hello,

Apologies, but I cannot find on the Apollo manual, academic paper, or on this online forum any confirmation of what the headers are for the columns in the outputted CSV file when generating model estimates. More specifically, what are the values in t-ratio(0) and t-ratio(1) referring to? I assume one-tailed and two-tailed t-test statistics, but which is which? Is t-ratio(1) the one-tailed test (because the default is not to include these in the estimation table)?

Many thanks for your help.

Re: Headers of Estimates.csv

Posted: 06 Sep 2021, 18:57
by dpalma
Hi,

The columns are as follows:
  • Estimate: Value of the parameter estimate
  • Std.err.: Standard error of the parameter estimate
  • t-ratio(0): t statistic against zero, i.e. H0: b=0, H1: b!=0, where b is the parameter estimate. Calculated using b's std.err.
  • t-ratio(1): t statistic against one, i.e. H0: b=1, H1: b!=1, where b is the parameter estimate. Calculated using b's std.err.
  • Rob.std.err.: Robust standard error of the parameter estimate, i.e. calculated using the robust "sandwich" covariance matrix. See Train (2009) Discrete choice models with simulation, section 8.6.
  • t-ratio(0): t statistic against zero, i.e. H0: b=0, H1: b!=0, where b is the parameter estimate. Calculated using b's Rob.std.err.
  • t-ratio(1): t statistic against one, i.e. H0: b=1, H1: b!=1, where b is the parameter estimate. Calculated using b's Rob.std.err.
The value of the t-statistic will be the same regardless if you want to do the test with one or two tails. The significance of the test however, i.e. its p-value, will change depending on the number of tails considered. For example, a t-statistic (or t-ratio, as it is called in Apollo) of 1.96 has a p-value of 0.05 for the two-tails test, and a value of 0.025 for the single tail test.

By default, Apollo does not output p-values, but you can ask for them when calling apollo_modelOutput (to output results to screen) or apollo_saveOutput (to save the results to a file) with the following additional options:

Code: Select all

apollo_modelOutput(model, modelOutput_settings = list(printPVal=1)) # for one sided t-test
apollo_modelOutput(model, modelOutput_settings = list(printPVal=2)) # for two sided t-test
apollo_saveOutput(model, saveOutput_settings = list(printPVal=1)) # for one sided t-test
apollo_saveOutput(model, saveOutput_settings = list(printPVal=2)) # for two sided t-test
?apollo_modelOutput # for more details
Cheers
David

Re: Headers of Estimates.csv

Posted: 07 Sep 2021, 08:52
by biancar
Thank you so much! This was extremely helpful.
Bianca

Re: Headers of Estimates.csv

Posted: 10 Sep 2021, 14:03
by biancar
Hi David,

I tried out the p-value add on in my output, and while I got a robust t-ratio(0) of 1.8992, I also got a robust p-value (1-tailed) of 0.0575. Normally if looking at the 95% confidence level for a one-tailed test, the t-ratio would be significant if <1.645. But the p-value is contradicting that (since 0.0575 is greater than 0.05). I just wanted to confirm if this means that because it's a robust t-ratio using the robust "sandwich" covariance matrix, that the classical value of 1.645 to check the t-ratio's significance doesn't apply anymore?

Thanks!
Bianca

Re: Headers of Estimates.csv

Posted: 11 Sep 2021, 14:38
by biancar
Hi David,

It might be my code, but I think something may be up with Apollo and the p-value output on the screen (in R) vs the saved files to the computer.

I inputted the following to print out 1-tailed p-values. The screen prints out one-tailed p-values. The version saved to the computer however definitely only prints out 2-tailed p-values. (I am using Apollo version 0.2.4).

Code: Select all

# ----------------------------------------------------------------- #
#---- FORMATTED OUTPUT (TO SCREEN)                               ----
# ----------------------------------------------------------------- #

apollo_modelOutput(model, modelOutput_settings = list(printPVal=1))

# ----------------------------------------------------------------- #
#---- FORMATTED OUTPUT (TO FILE, using model name)               ----
# ----------------------------------------------------------------- #

#apollo_saveOutput(model)

apollo_saveOutput(model,saveOutput_settings = list(printPVal=1))

Re: Headers of Estimates.csv

Posted: 11 Sep 2021, 15:56
by dpalma
Hi Bianca,

I just looked at the code and you are right. The p-values written to the file ending in "_estimates.csv" are only those for the two-sided test, independent of the value of the "printPVal" setting.

The values printed to screen and written in the file ending in "_output.txt" should be correct, though.

Thank you for pointing this out. We will fix it in the next release (0.2.6), though we don't have a release date for it yet. For now, please use the p-values printed to screen or saved in the "_output.txt" file.

Cheers
David