Or Duek
2010-Jun-09 15:19 UTC
[R] comparing two regression models with different dependent variable
Hi, I would like to compare to regression models - each model has a different dependent variable. The first model uses a number that represents the learning curve for reward. The second model uses a number that represents the learning curve from punishment stimuli. The first model is significant and the second isn't. I want to compare those two models and show that they are significantly different. How can I do that? Thank you. [[alternative HTML version deleted]]
Bert Gunter
2010-Jun-09 15:53 UTC
[R] comparing two regression models with different dependentvariable
1. This is not an R question. 2. What you have requested is nonsense. You need to consult your local statistician. Bert Gunter Genentech Nonclinical Statistics -----Original Message----- From: r-help-bounces at r-project.org [mailto:r-help-bounces at r-project.org] On Behalf Of Or Duek Sent: Wednesday, June 09, 2010 8:20 AM To: R-help at r-project.org Subject: [R] comparing two regression models with different dependentvariable Hi, I would like to compare to regression models - each model has a different dependent variable. The first model uses a number that represents the learning curve for reward. The second model uses a number that represents the learning curve from punishment stimuli. The first model is significant and the second isn't. I want to compare those two models and show that they are significantly different. How can I do that? Thank you. [[alternative HTML version deleted]] ______________________________________________ R-help at r-project.org 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.
Joris Meys
2010-Jun-09 16:22 UTC
[R] comparing two regression models with different dependent variable
On Wed, Jun 9, 2010 at 5:19 PM, Or Duek <orduek at gmail.com> wrote:> Hi, > I would like to compare to regression models - each model has a different > dependent variable. > The first model uses a number that represents the learning curve for reward. > The second model uses a number that represents the learning curve from > punishment stimuli. > The first model is significant and the second isn't. > I want to compare those two models and show that they are significantly > different.They are different, forget about significance.> How can I do that?You don't. Your problem translates to whether reward or punishment gives a better learning curve, so you build a model using a factor that represents whether the learning curve comes from reward or punishment, and test the significance of the difference using the correct approach in the framework of your choice. And since curves are functions, you actually need a method for functional data analysis. Either you start eg here : http://www.psych.mcgill.ca/misc/fda/ or you take the advice of Bert. If I was you, I'd go for the latter.> Thank you.You're welcome. Cheers Joris> > ? ? ? ?[[alternative HTML version deleted]] > > ______________________________________________ > R-help at r-project.org 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. >-- Joris Meys Statistical consultant Ghent University Faculty of Bioscience Engineering Department of Applied mathematics, biometrics and process control tel : +32 9 264 59 87 Joris.Meys at Ugent.be ------------------------------- Disclaimer : http://helpdesk.ugent.be/e-maildisclaimer.php
Gabor Grothendieck
2010-Jun-10 07:00 UTC
[R] comparing two regression models with different dependent variable
We need to define what it means for these models to be the same or different. With the usual lm assumptions suppose for i=1, 2 (the two models) that: y1 = a1 + X b1 + error1 y2 = a2 + X b2 + error2 which implies the following which also satisfies the usual lm assumptions: y1-y2 = (a1-a2) + X(b1-b2) + error Here X is a matrix, a1 and a2 are scalars and all other elements are vectors. We say the models are the "same" if b1=b2 (but allow the intercepts to differ even if the models are the "same"). If y1 and y2 are as in the built in anscombe data frame and x3 and x4 are the x variables, i.e. columns of X, then:> fm1 <- lm(y1 - y2 ~ x3 + x4, anscombe) > # this model reduces to the following if b1 = b2 > fm0 <- lm(y1 - y2 ~ 1, anscombe) > anova(fm0, fm1)Analysis of Variance Table Model 1: y1 - y2 ~ 1 Model 2: y1 - y2 ~ x3 + x4 Res.Df RSS Df Sum of Sq F Pr(>F) 1 10 20.637 2 8 18.662 2 1.9751 0.4233 0.6687 so we cannot reject the hypothesis that the models are the "same". On Wed, Jun 9, 2010 at 11:19 AM, Or Duek <orduek at gmail.com> wrote:> Hi, > I would like to compare to regression models - each model has a different > dependent variable. > The first model uses a number that represents the learning curve for reward. > The second model uses a number that represents the learning curve from > punishment stimuli. > The first model is significant and the second isn't. > I want to compare those two models and show that they are significantly > different. > How can I do that? > Thank you. > > ? ? ? ?[[alternative HTML version deleted]] > > ______________________________________________ > R-help at r-project.org 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. >