Harry S.
Harry S.

Reputation: 1

Get continuous predictor values from a probit glmer() model in R?

I am running a binomial probit model in R. Condition is a categorical variable with value Target as the treatment group (index is 10). pPrime is continuous between 0 and 1. TC_c is continuous. Weight_vec is a vector specifying how many trials each data point is represented by. This is necessary due to preprocessing steps taken to acquire pPrime, which is a transformed variable. The actual transformation is not relevant. The random effects in the model are a random slope and intercept (hence (1 + TC_c | Participant_Number)), but no random Condition*TC_c interaction.

model_dummy_Target = glmer(
  data = df,
  family = binomial(link = 'probit'),
  formula = "pPrime ~ (Condition * TC_c) + (1 + TC_c | Participant_Number)",
  contrasts = list(Condition = contr.treatment(levels(df$Condition), base = 10)),
  weights = Weight_vec
)

In essence, I need to find the value of TC_c per-person, per-condition where the probability of responding correctly is 0.5 pPrime == 0.5.

Below is sample some of my data:

structure(list(Participant_Number = structure(c(1L, 1L, 1L, 1L, 
1L, 1L, 11L, 11L, 11L, 11L, 11L, 11L), levels = c("42", "43", 
"44", "46", "49", "50", "51", "52", "54", "56", "57"), class = "factor"), 
    Condition = structure(c(5L, 6L, 1L, 3L, 5L, 6L, 5L, 6L, 7L, 
    8L, 9L, 10L), levels = c("C_10", "C_12", "C_14", "C_15", 
    "C_16", "C_18", "C_20", "C_22", "Straight", "Target"), class = "factor"), 
    TC_c = c(-3.20231496062992, -3.20231496062992, -2.90231496062992, 
    -2.90231496062992, -2.90231496062992, -2.90231496062992, 
    6.91768503937008, 6.91768503937008, 6.91768503937008, 6.91768503937008, 
    6.91768503937008, 6.91768503937008), pPrime = c(0, 0, 0, 
    0, 0.166666458333594, 0.196428360969613, 0.999999000001, 
    0.999999000001, 0.999998846155178, 0.999998846155178, 0.999999000001, 
    0.999998750001562)), class = "data.frame", row.names = c(1L, 
2L, 3L, 4L, 5L, 6L, 1265L, 1266L, 1267L, 1268L, 1269L, 1270L))

Upvotes: 0

Views: 20

Answers (0)

Related Questions