I have the following dataset:
I would like to check if the distribution of the residuals in a given year is different from another year. Therefore, I am running the following command:
However, I get this message:
I do not understand why it is happening, because the same command worked with another analysis of residuals that I was conducting. Moreover, the variable year has more than one value.
Code:
year residuals 2013 -.1820623 2014 -.068333 2015 -.1602945 2016 -.3450584 2017 -.4118948 2018 2019 2007 2008 2009 .9428194 2010 .4984708 2011 .9822 2012 1.107424 2013 1.021672 2014 1.126589 2015 .5650554 2016 .181492 2017 .1412071 2018 .2174679 2019 -.0482616 2007 2008 1.816428 2009 2010 1.660056 2011 1.603834 2012 1.136881 2013 2014 2015 1.052248 2016 .9272207 2017 2018 .6351303 2019 .5296772
Code:
distcomp residuals if year == 2007 | year == 2008, by(year)
Code:
year takes on 1 values, not 2
Comment