Hello! I have a dataset of students within classrooms within schools. I am trying to create a dataset that is at the class level from the student level file (i.e. aggregate student scores - 1 variables for one classroom). I have created all my aggregated classroom variables with the following code (retaining student variables only at the class level, teacher variables which are by nature at the class level, and upper school level variables only): proc sql; create table teacher_is as select x_idschool, x_class_id, t_selprog, t_female, t_sel, mean(js_Sel) as js_sel_c, mean (j_int) as j_int_c, mean (j_ext) as j_ext_c, mean (j_pared2) as j_pared2_c, mean (s_ageyrs) as age_c, mean(s_female) as fem_c, TSSA11, TSSA14, TSSA19, TSSA111, TSSA113, t_grade, t_imm, t_nonwhite, t_com_elem6_12, t_ef,t_std_behav, t_clasS_pbs, t_sel_mean, js_Sel_m, t_selprog_m, median, enrol, sch_lvl_Sec from is_agg group by x_idschool, x_class_id; quit; However, my output dataset still has a sample size at the student level. In SPSS you can aggregate up - whereby you have one observation for one class. Is there a way to do this in SAS? Thanks so much, Jillian
... View more