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.
Important: Read this before posting to this forum
- This forum is for questions related to the use of Apollo. We will answer some general choice modelling questions too, where appropriate, and time permitting. We cannot answer questions about how to estimate choice models with other software packages.
- There is a very detailed manual for Apollo available at http://www.ApolloChoiceModelling.com/manual.html. This contains detailed descriptions of the various Apollo functions, and numerous examples are available at http://www.ApolloChoiceModelling.com/examples.html. In addition, help files are available for all functions, using e.g. ?apollo_mnl
- Before asking a question on the forum, users are kindly requested to follow these steps:
- Check that the same issue has not already been addressed in the forum - there is a search tool.
- Ensure that the correct syntax has been used. For any function, detailed instructions are available directly in Apollo, e.g. by using ?apollo_mnl for apollo_mnl
- Check the frequently asked questions section on the Apollo website, which discusses some common issues/failures. Please see http://www.apollochoicemodelling.com/faq.html
- Make sure that R is using the latest official release of Apollo.
- Users can check which version they are running by entering packageVersion("apollo").
- Then check what is the latest full release (not development version) at http://www.ApolloChoiceModelling.com/code.html.
- To update to the latest official version, just enter install.packages("apollo"). To update to a development version, download the appropriate binary file from http://www.ApolloChoiceModelling.com/code.html, and install the package from file
- If the above steps do not resolve the issue, then users should follow these steps when posting a question:
- provide full details on the issue, including the entire code and output, including any error messages
- posts will not immediately appear on the forum, but will be checked by a moderator first. This may take a day or two at busy times. There is no need to submit the post multiple times.
Headers of Estimates.csv
Re: Headers of Estimates.csv
Hi,
The columns are as follows:
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:
Cheers
David
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.
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
David
Re: Headers of Estimates.csv
Thank you so much! This was extremely helpful.
Bianca
Bianca
Re: Headers of Estimates.csv
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
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
- Attachments
-
- Screenshot 2021-09-10 at 15.02.23.png (33.93 KiB) Viewed 6174 times
Re: Headers of Estimates.csv
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).
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
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
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