Bernardo, thanks for your solution, I was short in time last weeks, but I tried it and it works fine. I'll post it to the list, as it may help other people too.
Regards Bart ----- Original Message ----- From: "Bernardo Rangel Tura" <[EMAIL PROTECTED]> To: "Bart Joosen" <[EMAIL PROTECTED]> Sent: Wednesday, May 30, 2007 8:36 PM Subject: Re: [R] Fitting model with response and day bias > On Wed, 2007-05-30 at 17:20 +0200, Bart Joosen wrote: >> Hello, >> >> you are right about lm(I(y/time)~x1+x2), but what I would like to do is: >> lm(y~(x1+x2)*time), where x1 and x2 should have coefficients, but time >> not. >> Time is just used as a multiplier and should not have a coefficient. >> But I don't know if its possible. >> >> The reason why time is not in my code is that it's simplified to make it >> a >> bit understandable. >> >> >> Thanks anyway >> >> Bart > > Bart, > > If I understand you problem, you have a dataset with 4 variables (y, x1, > x2 and time) and you need fit them model: > > y = A+B*(x1*time)+C*(x2*time)+error > > and use command: lm(y~(x1+x2)*time). > > I think the comand is: lm(y~I(x1*time)+I(x2*time)) > > I sugest try this ... > > I hope this help you ... > > If is solve your problem put solution in list to help other people > -- > Bernardo Rangel Tura, M.D, PhD > National Institute of Cardiolgy > Rio de Janeiro - Brasil > > ______________________________________________ [email protected] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
