I have measured a binary response variable (yes/no) 8 times from 20 individuals. Now I want to test ift the response is different from the probability of 50%.
Thus, the replicate is the individual. However, I do not have a "yes/no"-answer from the individuals but rather a percentage of "yes-answers".
The usual 1-sample binomial test however requires a 1/0-answer. The data structure is pretty similar to the events/trials-structure which is used in PROC GLM, but I don't have a factor or treatment; I just want test for an overall difference from 50%.
Can anyone help me, please?!
You don't need any factor / treatment / covariate / predictor - whatever you want to call the term on the right hand side of the equation. There is an implicit intercept in virtually all SAS procedures which fit some sort of regression model. For a binary response for which you want to test whether the probability of the response is 0.5, all that you need to do is fit a logistic regression model in which you test the null hypothesis that the intercept is 0.
I've got to say that I am confused by your statement that "The data structure is pretty similar to the events/trials-structure which is used in PROC GLM". The GLM procedure does not support an events/trials syntax on the model statement. However, the LOGISTIC, GENMOD, and GLIMMIX procedures all support an events/trials syntax.
Of the above procedures, I would recommend using the GLIMMIX procedure and incorporating a random intercept term. What you might find is that the probability of a positive response varies across individuals. The overall probability of the response may be 50%, but for some individuals the probability may be greater than 50% and for some individuals the probability may be less than 50%. Such a scenario would lead to increased variability of the intercept estimate. And you should take such an increase in the variance of the intercept into account when constructing a test of H0 that the intercept is zero. Your modeling procedure should allow for this sort of increase in variability of the intercept estimate. The GLIMMIX procedure allows for variation of the intercept estimate across persons.
If you have SAS 9.2, you could use the following code to fit an intercept-only model which allows for a test that the overall probability of the response is 50% while also allowing a for person-specific variability in the probability of the response:
proc glimmix data=mydata method=quad;
model event_count/trials = / s;
random intercept / subject=personID;
If you do not have SAS version 9.2, then you will not be able to use the method=QUAD option for the GLIMMIX procedure. Quadrature methods are generally superior to other methods which are available for fitting generalized linear mixed models (GLMMs). However, I would not be too concerned about differences between quadrature methods and the linearization methods that are available with prior versions of the GLIMMIX procedure unless that p-value is very close to whatever level you are using to reject the null hypothesis.
If you find yourself in a situation where the p-value is very close to the nominal value which you have selected for rejection of the null hypothesis, then you might want to consider using the NLMIXED procedure to fit the logistic regression model. But let's not go there just now. The NLMIXED procedure is a very powerful procedure for fitting all kinds of generalized linear and nonlinear mixed models via Gaussian quadrature. However, it requires a little more effort to construct the code. Not a lot, mind you, for the present problem. But let's go with the GLIMMIX procedure for this problem unless you find yourself in the unfortunate situation of not having SAS 9.2 so that you cannot use quadrature methods for fitting the mixed model AND you obtain a p-value for the test that the intercept is zero which is quite near the nominal p-value.
Many thanks, Dale, for this detailed answer!!!
You are right, it was the GENMOD statement not GLM what I had in mind. Fortunately, our admins keep SAS updated, thus I can use V9.2. Thanks also for drawing my attention to the new and interesting PROC GLIMMIX.