Continuous variable (1-100 scale) logistic function fitting I've been working with a dataset where there are judgments of brightness from 1-100 (1= less bright) for 5 different brightness categories.




patient
Brightness level
Judgment




1
1
10


1
4
80


1
5
99


1
2
30


1
3
67


2
2
35


2
5
98


2
1
17


2
4
76


2
3
67




What I observe so far is that some subjects use the scale in a more binary way (i.e., choosing the end points 10 vs 90s), and others use it without that bias (i.e., making use of the whole scale). I'm trying to fit a logistic function but I am having a conceptual issue. The crossover point changes depending on how subjects used the scale. What are some of the free parameters that I can use here?

I have 4 options you can evaluate.  There are more than this, but these are first ones I would try.

*

*Baseline:  Treat the person's individual response as part of the error term and regress judgement against brightness level.  This has the disadvantages that you stated.

*Scale the judgement to the mean judgement for each person.

*Scale the judgement to the mean judgement, but on the logistic scale.  It is often helpful to scale numbers constrained to [0,1] (or 0-100) using the logistic transform before performing linear operations.

*Take a generalized mixed model approach with a random intercept on the logistic scale to account for differences between people.

Options are encoded below in R:
dataf <- data.frame(p = c(rep(1,5), rep(2,5)),
                    b = factor(rep(1:5, times = 2)),
                    y = c(10, 30, 67, 80, 99,17, 35, 67, 76, 98))

# baseline - treat person as part of the error in the analysis

dataf$ydefault <- dataf$y/100
glm2 <- glm(ydefault ~ b, data = dataf, family = quasibinomial(link = "logit"))
summary(glm2)
plot(glm2, which = 2)

# option 1 - judgement relative to mean judgement

dataf$y1 <- dataf$y / rep(c(by(dataf$y, dataf$p, mean)), each = 5)
lm1 <- lm(y1 ~ b, data = dataf)
summary(lm1)
plot(lm1, which = 2)

# option 2 - judgement relative to mean judgement on a logistic scale

dataf$y2 <- plogis(qlogis(dataf$y/100) / rep(c(by(qlogis(dataf$y/100), dataf$p, mean)), each = 5))
glm1 <- glm(y2 ~ b, data = dataf, family = quasibinomial(link = "logit"))
summary(glm1)
plot(glm1, which = 2)

# option 3 - generalized mixed model with a random intercept by person and logistic link (quasibinomial family not allowed)

require(lme4)
glme1 <- lme4::glmer(ydefault ~ (1|p) + b, data = dataf, family = gaussian(link = "logit"))
summary(glme1)
plot(glme1)

