Predict function with gamlj LM
Posted: Wed Mar 11, 2020 12:10 pm
I am running the predict function on some linear models but it doesn't seem to work with models generated by gamlj (although I am probably doing something wrong).
I can generate a model with lmer and run:
predict(LmerModel1, data) and it works fine.
If I generate the same model in gamlj and run predict:
predict(GamljModel$model, data) I get this error:
Error in eval(predvars, data, env) : object 'XQWdlbnRUeXBl' not found
That weird string is because inside the GamljModel the in lm equation everything has been renamed to random strings:
"XUmF0aW5n ~ 1 + XQWdlbnRUeXBl+( 1 + XQWdlbnRUeXBl | XUmVzcG9uc2VJZA )"
Obviously this is not the way I should be going about it.
What should I be doing?
I can generate a model with lmer and run:
predict(LmerModel1, data) and it works fine.
If I generate the same model in gamlj and run predict:
predict(GamljModel$model, data) I get this error:
Error in eval(predvars, data, env) : object 'XQWdlbnRUeXBl' not found
That weird string is because inside the GamljModel the in lm equation everything has been renamed to random strings:
"XUmF0aW5n ~ 1 + XQWdlbnRUeXBl+( 1 + XQWdlbnRUeXBl | XUmVzcG9uc2VJZA )"
Obviously this is not the way I should be going about it.
What should I be doing?