I had 10 animals repeatedly performing a two-alternative forced choice task (choosing between two coloured stimuli to get a reward). The outcome was either success or fail. Once the success rate of the animals reached a certain criterion, I altered the brightness of one of the stimuli to see if the success rate would decrease again, so I could see what their learning depended on.
I am working in R and I think I have to do logistic regression on this dataset, with success/fail as dependent variable and trial number as independent variable (to show improvement over time). I am trying this with the glm function. I had some basic statistics training, but I have some questions about this that I can't figure out myself.
- In the beginning, I suspect the animals have a 50/50 success/fail ratio. Can I do logistic regression when the chance of success ranegs from 50% to 100%, instead of 0% to 100% (which I see in all examples)?
- If so, how can I take this into account in my logistic regression? I read something about changing the cut-value to match the abundance of the two outcomes, should I do that?
- I want to see if I have one overall trend, or two separate trends in my dataset: from start until the changed stimulus, and from changed stimulus until the end. I've now created two subsets of the dataset. Is that the way to go, or am I forgetting something?
- How do I take into account other independent variables in logistic regression in R, like the colour, brightness and side of the stimulus? And the differences between the animals?
- Finally, how can I visualise the logistic regression well in R (or another way to display the learning curve)?
I didn't find answers to these questions on the forum, but if I overlooked them I apologise! Any help at all would be appreciated, as I don't have anyone around atm who can help me with this.