Re: [R] setting parameters equal in lm

2012-05-29 Thread Dustin Fife
> ensure that a reasonable answer can be extracted from a given body of data. > ~ John Tukey > > > -Oorspronkelijk bericht- > Van: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] > Namens Dustin Fife > Verzonden: dinsdag 29 mei 2012 14:56 > Aan: Ru

Re: [R] setting parameters equal in lm

2012-05-29 Thread ONKELINX, Thierry
ject.org] Namens Dustin Fife Verzonden: dinsdag 29 mei 2012 14:56 Aan: Rui Barradas CC: r-help Onderwerp: Re: [R] setting parameters equal in lm That did it. Thanks! One more follow-up questions. How do I set a parameter to a particular value? I tried I(.5*X2), but that didn't do what I expected.

Re: [R] setting parameters equal in lm

2012-05-29 Thread Rui Barradas
Simple, just make y2 <- y - 0.5*X2 Rui Barradas Em 29-05-2012 13:55, Dustin Fife escreveu: That did it. Thanks! One more follow-up questions. How do I set a parameter to a particular value? I tried I(.5*X2), but that didn't do what I expected. On Tue, May 29, 2012 at 6:39 AM, Rui Barradas wro

Re: [R] setting parameters equal in lm

2012-05-29 Thread Dustin Fife
That did it. Thanks! One more follow-up questions. How do I set a parameter to a particular value? I tried I(.5*X2), but that didn't do what I expected. On Tue, May 29, 2012 at 6:39 AM, Rui Barradas wrote: > Hello, > > Your model is equivalent of > > y = b1(X1 + X3) + b2X2 > > (plus error) > > S

Re: [R] setting parameters equal in lm

2012-05-29 Thread Rui Barradas
Hello, Your model is equivalent of y = b1(X1 + X3) + b2X2 (plus error) So, use I() to add X1 and X3. You don't need to create an extra variable X13 <- X1 + X3. See the help page for it. The point on function formula. ?I linMod2 = lm(Y ~ -1 + I(X1 + X3) + X2, data=data.set) summary(linMod2

Re: [R] setting parameters equal in lm

2012-05-28 Thread R. Michael Weylandt
I don't know how it ties into the tools car gives you, but one (quick and dirty) way to do this is to simply regress on Y ~ aX2 + b(X1+X3) or in R code something like: lm(Y ~ X2 + I(X1+X3), data = data.set) which gives a linear model you can play around with. Note the I() function [that's the c