MEif$OME &lt;- OME$OME[match(OMEif$UID, OME$UID)]
OMEif &lt;- OMEif[OMEif$L75 &gt; 30,]
summary(lm(L75 ~ Noise/Age, data = OMEif, na.action = na.omit))
summary(lm(L75 ~ Noise/(Age + OME), data = OMEif,
           subset = (Age &gt;= 30 &amp; Age &lt;= 60),
           na.action = na.omit), correlation = FALSE)

# Or fit by weighted least squares
fpl75 &lt;- deriv(~ sqrt(n)*(r/n - 0.5 - 0.5/(1 + exp(-(x-L75)/scal))),
               c("L75", "scal"),
               function(r,n,x,L75,scal) NULL)
nls(0 ~ fpl75(