[R-sig-ME] Change mer maybe from call text?

zListserv z||@t@erv @end|ng |rom gm@||@com
Wed Sep 11 17:33:06 CEST 2019

For convenience, I am running separate mixed-effects regressions on variables in a data frame.

In a loop, I issue the following:

	merList[[merSpec$LHS[k]]] = lmerTest::lmer(as.formula(merForm), data=dat, ...)

where merList contains a list of results, merSpec$LHS contains the outcome variable name, and merForm contains the formula for a specific mixed-effects regression.

This works well and provides a convenient way to do bulk analyses (regardless of the dubiety of doing so).

A problem arises in identifying the output because the call slot (@call) in the S4 structure becomes "lmerTest::lmer(as.formula(merForm), data=dat, ...)"

How can I change the output to identify the actual formula used in analysis so it appears in the summary and elsewhere?


More information about the R-sig-mixed-models mailing list