No function is necessary for multiple lhs's. lm() allows a matrix as
it's lhs and will fit a separate regression for each column of the
matrix. Please read ?lm carefully for details. For that matter, please
read the linked Help pages and/or spend some time with a tutorial
(there are many on the web
Your email is severely damaged because you sent it using HTML format. Please
adjust the settings in your email software to use only plain text when sending
to this list so we can see what you see.
While you are at it you should read about making your examples reproducible
[1]... it may seem lik
In-line
On 12/11/2015 16:27, Matthias Worni wrote:
Hello
I was trying to set up a function() that allows easely to calculate
regressions for severel dependent variables with the same independent
variables.
My function looked like this but was turned down by an error (Im quiet new
to R Studio).
You may have additional scoping problems depending on where you various
variables exist, but your Trend function syntax is incorrect. You need
parentheses around your arguments to the lm call, and you left out the '~' in
your formula. In addition, don't fool yourself by your use of the names CO
4 matches
Mail list logo