All, I am a student and keep getting an error when setting up estimate and contrast statements. I'm trying to build a model for the association between mean glucose and exercise status, and control for possible confounding. Below is the log, and I keep getting this error message "Effects used in the ESTIMATE statement must have appeared previously in the MODEL statement." I don't understand why I keep getting this - the variables 'waist' and 'diabetes' are in the model statement. Does anyone know what I'm doing wrong/can help me out? Thanks! 89 proc glm data=testdata1; 90 class diabetes; 91 model glucose = waist diabetes/solution; 92 estimate 'diabetes: waist = 80' diabetes 1 -1 waist*diabetes 80 -80; ERROR: Effects used in the ESTIMATE statement must have appeared previously in the MODEL statement. NOTE: The previous statement has been deleted. 93 estimate 'diabetes: waist = 110' diabetes 1 -1 waist*diabetes 110 -110; ERROR: Effects used in the ESTIMATE statement must have appeared previously in the MODEL statement. NOTE: The previous statement has been deleted. 94 estimate 'diabetes: waist = 140' diabetes 1 -1 waist*diabetes 140 -140; ERROR: Effects used in the ESTIMATE statement must have appeared previously in the MODEL statement. NOTE: The previous statement has been deleted. 95 contrast '80 vs. 90' diabetes 1 -1 waist*diabetes 80 -80, diabetes 1 -1 waist*diabetes 90 95 ! -90; ERROR: Effects used in the CONTRAST statement must have appeared previously in the MODEL statement.
... View more