I am trying to replicate a logistic regression analysis from a paper using R in lme4 (the specific analysis in the paper uses the
glmfit function in Matlab). In it, they conduct a logistic regression on a binary outcome (0 or 1) to determine the beta coefficients of 8 predictors (using the betas as evidence for how much weight that predictor had over the outcome) over multiple trials for each subject.
They describe the coding of their dataset as:
The predictors were coded as a vector of dimensions (trials x 9) matrix where 1-8 constituted relevant values for the outcome, and vector 9 was a constant term to estimate the intercept.
Additionally, subject was a random variable.
In my R code (using lme4), I interpreted this as forcing a zero intercept, thus I wrote the regression model like so:
logr.model <- glmer(outcome ~ -1 + p1 + p2 + p3 + p4 + p5 + p6 + p7 + p8 + (1|subject), data=data, family=binomial(link="logit"))
Was this the correct way to write the model in lme4?