model learning with binary variable Let's say I collected data from a single mouse that either pressed a lever (1) or not (0). There were a total of 3 environments (env), and the mouse spent 10 minutes wandering (the time variable levels corresponds to each minute).
dat1 <- data.frame(time=rep(seq(1,10), times=3), response=c(0,0,0,1,0,1,1,1,1,1, 0,0,0,0,0,1,1,1,1,1, 0,1,0,0,0,0,1,1,1,1), run=rep(c(1,2,3), each=10))

I'd like to model the mouse's behavior across time, such that larger estimates indicate faster learning. Given that my dependent variable response is binary, I guess logistic regression is my only option, so I tried:
summary(glm(response ~ time, data=dat1, family="binomial")))

Coefficients:
            Estimate Std. Error z value Pr(>|z|)   
(Intercept)  -4.8633     1.7654  -2.755  0.00587 **
time          0.9424     0.3223   2.924  0.00345 **

However, changing the data such that it simulates the mouse learning slower
dat2 <- data.frame(time=rep(seq(1,10), times=3), response=c(0,0,0,0,0,0,1,0,1,1, 0,0,0,0,0,0,0,0,1,1, 0,0,0,0,0,0,0,0,1,1), run=rep(c(1,2,3), each=10))
    
summary(glm(response ~ time, data=dat2, family="binomial")))

Coefficients:
            Estimate Std. Error z value Pr(>|z|)  
(Intercept) -16.2691     7.6916  -2.115   0.0344 *
time          1.9912     0.9392   2.120   0.0340 *

The estimate for time is actually larger. What is the reason for this? And is this how I should set up my model if the aim is to determine how quick the mouse has learned?
 A: Your model is certainly right. I think that when you changed your data, the main impact was to decrease the constant. In order to reach $p(t)=0.5$, your model need: $t_1=\frac{4.86}{0.94}=5.16$ minutes and $t_2=\frac{16.27}{1.99}=8.17$ minutes. So your mouse actually globally learns slower, despite the increase in coefficient for $t$. Basically, you increased its ability to learn through time ($\beta_t$ increased), but decreased its basic skill ($\beta_0$ decreased). In general, you can see that the predicted ability of your mouse to pull the lever is higher in model 1 for $t>\frac{-16.27+4.86}{0.94-1.99}=10.88$. So if you plot these probabilities $p(t)$ for both your models, you will be able to see that in model 1, the mouse is actually always more able to pull the lever during the first 10 minutes.

You can see that in model 2, the mouse learns quicker after some time, but this time creates a huge delay overall.
EDIT:
I think that what you are looking for is a kind of score. You can design many scores, depending on your objectives/understanding of your experiment.
For instance, you could create a score $S_i$ for each model $i$ which would represent the expected number of successes after a defined number of trials predicted by each model, i.e.:
$$S_i= \sum_{t=1}^{t_\max}p_i(t)$$
Or it could represent the predicted required time to reach a defined probability of success:
$$S_i=t_i^*\text{ where }t_i^* \text{ is defined by: } p_i(t_i^*)=p_\text{objective}$$
Or you could compute recursively the distribution of the total number of successes after $t$ trials $\forall t>0$ to use the average necessary time in order to obtain $n$ successes.
It is up to you to choose the scoring methodology which corresponds to your problem/objectives. These are a few ideas I could come up with.
