Dear all,
For my thesis I have to research the causes of employee layoffs for (big) Belgian firms. My data consists of panel data (unbalanced) for period 2011-2020 with +- 185000 observations.
Context:
- My dependent variable is binary: 1 = layoff, 0 = no layoff
- My indepent variables are both continous and binary
To gain more insight about the bivariate analysis, I want to perform t-tests/Wilcoxon ranksum tests to analyse for example the difference between a firm with a Global Ultimate Owner (binary variable, =1 in case it is true) by LAYOFF variable.
I ran Wilcoxon ranksum test (because 'global ultimate ownership' binary dummy variable is not normally distributed ofcourse) & in my results I want to be able to give the difference of this binary dummy variable (global ultimate owner) by layoff =1 & layoff = 0.
My question is the following: how do I calculate the mean of binary variables by layoff =1 & layoff=0? I know that t-tests give the mean as output, but the Wilcoxon ranksum test does not give this and I want to include this information in my thesis to provide additional information for the readers (my professor).
I tried to run the following code:
But "by" is not allowed here.
Thanks in advance! Using stata 16 on windows 11.
Kind regards,
Jordi
For my thesis I have to research the causes of employee layoffs for (big) Belgian firms. My data consists of panel data (unbalanced) for period 2011-2020 with +- 185000 observations.
Context:
- My dependent variable is binary: 1 = layoff, 0 = no layoff
- My indepent variables are both continous and binary
To gain more insight about the bivariate analysis, I want to perform t-tests/Wilcoxon ranksum tests to analyse for example the difference between a firm with a Global Ultimate Owner (binary variable, =1 in case it is true) by LAYOFF variable.
I ran Wilcoxon ranksum test (because 'global ultimate ownership' binary dummy variable is not normally distributed ofcourse) & in my results I want to be able to give the difference of this binary dummy variable (global ultimate owner) by layoff =1 & layoff = 0.
My question is the following: how do I calculate the mean of binary variables by layoff =1 & layoff=0? I know that t-tests give the mean as output, but the Wilcoxon ranksum test does not give this and I want to include this information in my thesis to provide additional information for the readers (my professor).
I tried to run the following code:
Code:
mean GUO, by Layoff
Thanks in advance! Using stata 16 on windows 11.
Kind regards,
Jordi
Comment