I have the following data
data no_of_alerts;
Input doctor alerts error;
cards;
1 1 1
2 1 0
3 1 1
4 1 1
5 1 1
1 2 1
2 2 1
3 2 1
4 2 0
5 2 1
1 3 1
2 3 0
3 3 1
4 3 0
5 3 1
1 4 1
2 4 0
3 4 1
4 4 0
5 4 0
;
Suppose I want to run linear regression model alerts = mean_error, where now Mean_error is the mean error of the alerts. As an example ,for alerts = 1 the mean is 0.8 (1+0+1+1+1)/5). Thus my points will be (1,0.8), (2, 0.8), (3, 0.6) and (4,0.4). Can someone help.
If I use proc reg; Model = alerts = error; run. I get the wrong results.