tt <- c(1:50,1:50)
nrge <- c(rep(0,50),rep(1,50))
St <- beauty$looks
Nt <- beauty$expr
fit <- lm(log(c(St,Nt)) ~ tt + I(tt*nrge))
Note that we don't have access to beauty
, or the text of the error message. So we can't replicate the problem and diagnose it from there.
Can you redo the reproducible example with dummy data for beauty
that replicates the error? (Ideally as a minimal REPRoducible EXample (reprex)? A reprex makes it much easier for others to understand your issue and figure out how to help.)