-1

I have a panel data. I want to calculate the summary statistics for the data before the year 2007 and after year 2007. I tried to use the following command but it did not work.

summarize variables, if year =<2007

Ahmed Arif
  • 189
  • 1
  • 2
  • 10
  • Remove the comma. `if` here is a qualifier, not an option. Also there is no operator `=<`: it's `>=`. See `help if` and `help operators`. If "before" doesn't include the year in question (usual interpretation in English), you need `<` any way. Before `<`; before or in `<=`, in or after `>=`, after `>`. – Nick Cox Oct 14 '17 at 10:56

1 Answers1

0

Don't write variables and your inequality is on the wrong side. Your code should look like this if you want to get the descriptive statistics of all the variables for the years before 2007.

sum if year <=2007