Not necessarily. It is only the where the expression that contains the error begins. Often the unexpected symbol reflects unmatched delimiters. Perhaps, as per @nirgrahamuk on line 25 above. Or it may be due to a delimiter problem, which are easier to detect with formatting as below.
library(lme4)
#> Loading required package: Matrix
cbpp$obs <- 1:nrow(cbpp)
gm2 <- glmer(cbind(incidence, size - incidence) ~ period +
(1 | herd) +
(1 | obs),
family = binomial,
data = cbpp)
gm2
#> Generalized linear mixed model fit by maximum likelihood (Laplace
#> Approximation) [glmerMod]
#> Family: binomial ( logit )
#> Formula: cbind(incidence, size - incidence) ~ period + (1 | herd) + (1 |
#> obs)
#> Data: cbpp
#> AIC BIC logLik deviance df.resid
#> 186.6383 198.7904 -87.3192 174.6383 50
#> Random effects:
#> Groups Name Std.Dev.
#> obs (Intercept) 0.8911
#> herd (Intercept) 0.1840
#> Number of obs: 56, groups: obs, 56; herd, 15
#> Fixed Effects:
#> (Intercept) period2 period3 period4
#> -1.500 -1.226 -1.329 -1.866
See the FAQ: How to do a minimal reproducible example reprex
for beginners