Interesting Logistic Regression Idea - Problem: Data not currently in 0/1 form. Any solutions? I am attempting to conduct a logistic regression for a tennis analytics project, endeavoring to predict the probability of a player winning a point in which he is the server. My response variable (service points) is binary in the sense that it can have only two outcomes for each observation - a success (service point win) or a failure (service point loss). 
I have an issue with my data: For a given player, I have the point by point data for hundreds of matches. So take my data for R. Nadal as an example:
250 matches, each with about 70 dependent variable observations (service points). So for each match I currently have the two variables: Total_Service_Points_Played and Total_Service_Points_Won. 
Eg - Match 1: Total_Service_Points_Played: 70 ; Total_Service_Points_Won: 47
So my data isn't in 1's and 0's. Is there a way I can implement a logistic regression with my dependent variable observations in their current form? Is there any simple transformation that comes to mind?
What springs to mind for me is to flesh out my match data into 1's and 0's. So following on from Match 1 above I would have: 47 1's followed by 26 0's . My data doesn't provide information as to what sequence these 1's and 0's arrived in, but since the depdendent variable observations are i.i.d this won't cause an issue? Correct me if I'm wrong please. Another issue posed by this technique would be the massive increase in my data - from 250 observations as a ratio (service point wins/service points played) to 250*70=17500 observations or more.
As a side note, the last thing I'm wondering is about the dispersion of my dependent variable data. Specifically, in the ratio of serve wins to total serve points as above, there exists no values < 0.2 or 20% .... In addition, there exists no value > 0.9 ..... Does this fit the bill for the (link=logit) argument? I know this relates to an S shape curve which is undefined at 0 and 1, but approaches both values.... I might be going off track here but is this something to be concerned about? 
 A: If you're fitting with glm, you can use the win rate as your DV and use the weights option to specify the number of "trials" each rate observation is based on. From ?glm:

For a binomial GLM prior weights are used to give the number of
  trials when the response is the proportion of successes

So your call to glm would look something like this:
glm(Total_Service_Points_Won/Total_Service_Points_Played ~ ... ,
    family = binomial(link=logit), weights = Total_Service_Points_Played)

A: Provided your predictors are constant during a match, it shouldn't matter. Suppose you are applying a generalized linear model of the form $\exp(\eta y - \psi(\eta))$ to some grouped responses, $y_{11},\ldots,y_{1n_1},\ldots,y_{N1},\ldots,y_{Nn_N}$. Here there are $N$ groups (250 matches in your case) with $n_i$ observations (about 70 in your case) in the $ith$ group, and $\eta()$ is (in your case) the logistic function. The likelihood is then
$\Pi_{i=1}^N\Pi_{j=1}^{n_i} \exp(\eta_i y_{ij} - \psi(\eta_i))=
 \Pi_{i=1}^N \exp(\Sigma_{j=1}^{n_i}\eta_i y_{ij}-n_i\psi(\eta_i)) = 
\Pi_{i=1}^N \exp(n_i(\eta_i y_{i.}-\psi(\eta_i))).$
The last equation is just the likelihood of an exponential family with sufficient statistic $y_{i.}=\Sigma y_{ij}/n_i$ (the group match averages in your case). You can optimize the likelihood using this grouped statistic as well. So the likelihood equation is the same whether you use the group averages or any sequence of 0s, 1s that give the same group averages. In particular, the same coefficient vector $\beta$ under a regression model $\eta_i=x_i^T\beta$ maximizes the likelihood, if your predictors $x_i$ are fixed at the block (match) level. 
A: There exists a logistic regression for binary data, but also one for grouped data.  In the former case the likelihood function is a product of Bernouilli probabilities and in the latter case a product of Binomial probabilities (see, e.g., in this pdf). As @Analist has indicated in a comment, both types are implemented in R, in the glm function.
You should create a data frame with columns nbr.success, nbr.failure and the explanatory variables surface and ranking and then use the formula, cbind(nbr.success, nbr.failure) ~ surface + ranking + 1, in the glm function. 
