I try to apply Rayleigh test using circular module in Stata. I try to test whether my data have a monthly peak. Specifically, I try to check whether patients die more often from a specific cause at specific days of month, specific months of year etc. I have already applied chi-square goodness-of-fit and I know that the distribution of my patients is not uniform and I also tried Edward's Seasonality test. However, I know that there is one peak only and I would like to use Rayleigh test too. My variables are months (I tried 1,2,3,4... at the beginning but it didn't work, and I suppose it is due to the fact that circular commands assume that data are recorded in degrees & then I chose to record months as 360/12=30 degrees each) and count (which is the number of patients recorded in each month).
I used the following code after installing the CIRCULAR statistics module
All I get is varlist not allowed r(101); I am sure that there is a mistake at the command I use but I cannot find any proper example.
I would appreciate the help
Code:
* Example generated by -dataex-. To install: ssc install dataex clear input byte count 74 73 89 86 76 57 67 58 73 45 54 75 end
Code:
* Example generated by -dataex-. To install: ssc install dataex clear input int month 0 30 60 90 120 150 180 210 240 270 300 330 end
I used the following code after installing the CIRCULAR statistics module
Code:
circsu month [fweight=count], rayleigh
I would appreciate the help
Comment