I hope someone can help me with the new-ish collect command. I think it is what I want to use to construct a table, but find the syntax beyond me.
The situation
I have agents of three agent_types: high, med and low. I wish to do a t-test of the variable, rmse_mean, for each agent_type against the other two.
My goal is a table that looks like this.
I've run the t-tests with the
prefix (shown below, although I perhaps needed to be adding more syntax).
After this, I'm totally stumped.
Can anyone help?
Thanks
The situation
I have agents of three agent_types: high, med and low. I wish to do a t-test of the variable, rmse_mean, for each agent_type against the other two.
My goal is a table that looks like this.
Code:
Pairwise T-Test Results: Mean_RMSE by Agent Type | Comparison | T-Statistic | P-Value | |---------------|-------------|---------| | High vs Med | 3.25 | 0.009 | | High vs Low | 5.80 | < 0.001 | | Med vs Low | 2.10 | 0.041 | Note: P-values < 0.05 indicate statistical significance.
I've run the t-tests with the
Code:
collect
After this, I'm totally stumped.
Can anyone help?
Thanks
Code:
collect: ttest rmse_mean if agent_type == "high" | agent_type == "med", by(agent_type) unequal collect: ttest rmse_mean if agent_type == "med" | agent_type == "low", by(agent_type) unequal collect: ttest rmse_mean if agent_type == "high" | agent_type == "low", by(agent_type) unequal

Comment