I am trying to run a regression discontinuity based upon the dataset found below. However I keep running into the error c() should be set within the range of year.
How can I redefine c() so that it does not hold the default value of 0.
My cutoff is defined as 1872, the year when the treatment dummy variable takes the value 1.
The error shows up when I attempt
rdplot hiscam year
Best Wishes,
James
Code:
* Example generated by -dataex-. To install: ssc install dataex clear input float hiscam int year float treated 42.87512 1862 0 43.74237 1862 0 43.49274 1863 0 43.85648 1863 0 44.71942 1864 0 45.68772 1864 0 43.78705 1865 0 44.99989 1865 0 43.08729 1866 0 44.15181 1866 0 43.06003 1867 0 43.11882 1867 0 43.62434 1868 0 44.06446 1868 0 44.13048 1869 0 45.65981 1869 0 43.56574 1870 0 45.83962 1870 0 43.35312 1871 0 44.99914 1871 0 47.03517 1872 1 48.04344 1872 1 47.05454 1873 1 48.23038 1873 1 47.78739 1874 1 48.77758 1874 1 47.53606 1875 1 48.73902 1875 1 47.94943 1876 1 48.08339 1876 1 48.14172 1877 1 49.26078 1877 1 48.65994 1878 1 49.85739 1878 1 48.77392 1879 1 49.07422 1879 1 48.99594 1880 1 49.09679 1880 1 49.44331 1881 1 50.71514 1881 1 48.81572 1882 1 49.97142 1882 1 end
0 Response to Defining the cutoff in regression discontinuity
Post a Comment