Hello,
Could you assist me in creating a code that initially computes the means and standard deviations of SBA marks and Exam marks by School_Code, performs a regression of Raw_SBA marks on Exam Scores, and subsequently utilizes the means, standard deviations, and the regression coefficient in a mathematical formula to determine the moderated mark?
The formula is "Moderated SBA Score = Overal_Mean_Raw_SBA + RegCoef(Sch_mean_Exam - Overal_Mean_Exam) + (Raw_SBA_Student - Sch_mean_SBA)(Sch_SD_Exam/Sch_SD_SBA)"
Could you assist me in creating a code that initially computes the means and standard deviations of SBA marks and Exam marks by School_Code, performs a regression of Raw_SBA marks on Exam Scores, and subsequently utilizes the means, standard deviations, and the regression coefficient in a mathematical formula to determine the moderated mark?
The formula is "Moderated SBA Score = Overal_Mean_Raw_SBA + RegCoef(Sch_mean_Exam - Overal_Mean_Exam) + (Raw_SBA_Student - Sch_mean_SBA)(Sch_SD_Exam/Sch_SD_SBA)"
Code:
* Example generated by -dataex-. For more info, type help dataex clear input float Indentification long School_Code int(Subject_Code Raw_SBA) float Exam 1 10002 208 37 75 2 10002 208 38 52 3 10002 208 38 52 4 10002 208 40 72 5 10002 208 37 77 6 10005 208 32 56 7 10005 208 34 66 8 10005 208 34 68 9 10005 208 34 66 10 10005 208 34 62 11 10013 208 36 58 12 10013 208 38 59 13 10013 208 36 51 14 10013 208 36 51 15 10013 208 38 53 16 10018 208 39 68 17 10018 208 38 84 18 10018 208 34 63 19 10018 208 35 38 20 10018 208 39 72 21 10032 208 34 67 22 10032 208 38 69 23 10032 208 37 68 24 10032 208 34 61 25 10032 208 36 75 26 10175 208 36 60 27 10175 208 0 5 28 10175 208 36 52 29 10175 208 34 58 30 10175 208 36 60 31 10496 208 37 57 32 10496 208 37 71 33 10496 208 37 57 34 10496 208 35 57 35 10496 208 36 63 36 10558 208 0 67 37 10558 208 0 61 38 10558 208 0 55 39 10558 208 0 59 40 10558 208 0 53 41 10837 208 32 49 42 10837 208 13 36 43 10837 208 36 55 44 10837 208 33 59 45 10837 208 36 56 46 10838 208 32 34 47 10838 208 32 37 48 10838 208 35 51 49 10838 208 36 38 50 10838 208 36 48 51 20005 208 31 51 52 20005 208 30 44 53 20005 208 29 53 54 20005 208 31 51 55 20005 208 29 53 56 20010 208 39 76 57 20010 208 36 68 58 20010 208 34 74 59 20010 208 37 80 60 20010 208 33 71 61 20023 208 36 55 62 20023 208 36 55 63 20023 208 36 55 64 20023 208 36 55 65 20023 208 36 55 66 20080 208 36 76 67 20080 208 39 55 68 20080 208 40 71 69 20080 208 36 60 70 20080 208 36 59 71 20085 208 37 59 72 20085 208 37 60 73 20085 208 36 49 74 20085 208 38 43 75 20085 208 36 58 76 20130 208 37 74 77 20130 208 35 57 78 20130 208 32 58 79 20130 208 37 59 80 20130 208 34 66 81 20153 208 33 46 82 20153 208 24 42 83 20153 208 33 58 84 20153 208 24 44 85 20153 208 33 60 86 20187 208 33 51 87 20187 208 34 43 88 20187 208 30 40 89 20187 208 34 54 90 20187 208 33 51 91 20195 208 30 56 92 20195 208 29 54 93 20195 208 34 76 94 20195 208 34 76 95 20195 208 29 44 96 20235 208 38 69 97 20235 208 36 60 98 20235 208 38 71 99 20235 208 35 57 100 20235 208 36 59 end
Comment