Hello Statalisters,
my name is Christian Rose and I have a problem using Stata.
It is probably the easiest way to explain my problem using a an image.
The image shows my data situation.
I have done some tests for the C variables.
Based on these tests I have generated new variables named "Test_..." where the part after the "_" depends on the test and which C variables were used for the test.
The test variables only contain 1 and 0 and indicate if the p-value of the test was above or below 0.05.
Now my problem:
I want to add all test variables if they have the same ending. For example I would like to add up Test1_13_13 and Test4_13_13 because the both have the ending 13_13.
The reason I want to do this is that the 13_13 indicate that the test was done for two companies each belongs to group 13 (indicated by the variable name).
So I would like to know how many tests between variables of group 13 and 13 resulted in a p-value less than 0.05 and how many resulted in a p-value above 0.05.
I would like to know the same for the groups 13 and 15 and in my real sample I have many more groups.
I hope you understand my problem. Otherwise I am happy to clearify what I mean.
Sorry for my bad english and my lack of knowledge.
I have tried different things and I have searched a lot on the internet but without results. Maybe, because I am looking for the wrong commands as I am not familiar with Stata.
Thank you for your help.
Christian
my name is Christian Rose and I have a problem using Stata.
It is probably the easiest way to explain my problem using a an image.
The image shows my data situation.
I have done some tests for the C variables.
Based on these tests I have generated new variables named "Test_..." where the part after the "_" depends on the test and which C variables were used for the test.
The test variables only contain 1 and 0 and indicate if the p-value of the test was above or below 0.05.
Now my problem:
I want to add all test variables if they have the same ending. For example I would like to add up Test1_13_13 and Test4_13_13 because the both have the ending 13_13.
The reason I want to do this is that the 13_13 indicate that the test was done for two companies each belongs to group 13 (indicated by the variable name).
So I would like to know how many tests between variables of group 13 and 13 resulted in a p-value less than 0.05 and how many resulted in a p-value above 0.05.
I would like to know the same for the groups 13 and 15 and in my real sample I have many more groups.
I hope you understand my problem. Otherwise I am happy to clearify what I mean.
Sorry for my bad english and my lack of knowledge.
I have tried different things and I have searched a lot on the internet but without results. Maybe, because I am looking for the wrong commands as I am not familiar with Stata.
Thank you for your help.
Christian
Comment