Re: [R] multiple linear regression with quadratic function

2016-02-23 Thread Bert Gunter
Inline. -- Bert Bert Gunter "The trouble with having an open mind is that people keep coming along and sticking things into it." -- Opus (aka Berkeley Breathed in his "Bloom County" comic strip ) On Tue, Feb 23, 2016 at 2:42 AM, wrote: > Dear R community, > this is probably a well-known topi

Re: [R] multiple linear regression with quadratic function

2016-02-23 Thread peter dalgaard
That's pretty standard. Some call it "response surface analysis". Of course you need to check assumptions like homoscedasticity on the log scale, etc. It's not really an R question, specifically; so stats.stackexchange.com is a better avenue for more detailed discussions. As far as R goes, you j

[R] multiple linear regression with quadratic function

2016-02-23 Thread james.foadi
Dear R community, this is probably a well-known topic to some of you, but I am not well into it and would like some clarifications or even jus some suggestions. I have a quadratic scalar field: F(x,y)=K*exp(-(a*x^2+b*y^2+c*x*y)) I also have a random set of positive x,y values and related

Re: [R] Multiple linear Regression: Standardized Coefficients

2012-02-15 Thread Kenn Konstabel
It's a bit dangerous to call them "betas" in this list. Standardized regression coefficients sounds much better :) A simple way is to first standardize your variables and then run lm again. lm(scale(height)~scale(age) + factor(sex)) # or, depending on what you want: lm(height~scale(age)+factor(

[R] Multiple linear Regression: Standardized Coefficients

2012-02-15 Thread David Studer
Hello everybody, Can anyone tell me, how to obtain standardized regression coefficients (betas) for my independent variables when doing a multiple linear regression? height<-c(180,160,150,170,190,172) sex<-c(1,2,2,1,1,2) age<-c(40,20,30,40,20,25) fit<-lm(height~age+sex) summary(fit) I already h

Re: [R] Multiple linear regression with constraint (imposition)

2009-10-31 Thread CE.KA
Thank you David David Winsemius wrote: > > > On Oct 30, 2009, at 7:47 PM, CE.KA wrote: > >> >> Sorry there was a mistake: > > I could not see what was different? > >> >> Hi R users >> >> I want to do a multiple linear regression with R >> >> With a normal model (Y=Cste+A1*X1+A2*X2) the prog

Re: [R] Multiple linear regression with constraint (imposition)

2009-10-31 Thread CE.KA
ne and Gerontology > School of Medicine > Johns Hopkins University > > Ph. (410) 502-2619 > email: rvarad...@jhmi.edu > > > - Original Message - > From: "CE.KA" > Date: Friday, October 30, 2009 7:48 pm > Subject: Re: [R] Multiple linear regression

Re: [R] Multiple linear regression with constraint (imposition)

2009-10-30 Thread Ravi Varadhan
- Original Message - From: "CE.KA" Date: Friday, October 30, 2009 7:48 pm Subject: Re: [R] Multiple linear regression with constraint (imposition) To: r-help@r-project.org > Sorry there was a mistake: > > Hi R users > > I want to do a multiple linear regr

Re: [R] Multiple linear regression with constraint (imposition)

2009-10-30 Thread David Winsemius
On Oct 30, 2009, at 7:47 PM, CE.KA wrote: Sorry there was a mistake: I could not see what was different? Hi R users I want to do a multiple linear regression with R With a normal model (Y=Cste+A1*X1+A2*X2) the program would be lm(Y~X1+X2) My model is Y=Cste+A1*X1+A2*X2 with the constra

Re: [R] Multiple linear regression with constraint (imposition)

2009-10-30 Thread CE.KA
Sorry there was a mistake: Hi R users I want to do a multiple linear regression with R With a normal model (Y=Cste+A1*X1+A2*X2) the program would be lm(Y~X1+X2) My model is Y=Cste+A1*X1+A2*X2 with the constraint A1=-A2 What is the program for such a model? Best regards -- View this message

[R] Multiple linear regression with constraint (imposition)

2009-10-30 Thread CE.KA
Hi R users I want to do a multiple linear regression with R With a normal model (Y=Cste+A1*X1+A2*X2) the program would be lm(Y ~X2+X2) My model is Y=Cste+A1*X1+A2*X2 with the constraint A1=-A2 What is the program for such a model? Best regards -- View this message in context: http://old.na

Re: [R] multiple linear regression

2009-08-21 Thread Peter Ehlers
Ronggui Huang wrote: pls use lm(y ~ x1+x2) and perhaps have a look at chapter 11 in the Introduction to R manual which you will probably find right there already on your computer. Peter Ehlers 2009/8/21 Inchallah Yarab : Good morning, I want to make a linear regression of a variable fucti

Re: [R] multiple linear regression

2009-08-21 Thread Ronggui Huang
pls use lm(y ~ x1+x2) 2009/8/21 Inchallah Yarab : > Good morning, > > I want to make a linear regression of a variable fuction of  two variables y > = a1 x1 + a2 x2 + c > > I found the function lm (y ~ x)  but it used  for a simple linear regression, > but for  multiple regression i do not know

[R] multiple linear regression

2009-08-21 Thread Inchallah Yarab
Good morning, I want to make a linear regression of a variable fuction of  two variables y = a1 x1 + a2 x2 + c I found the function lm (y ~ x)  but it used  for a simple linear regression, but for  multiple regression i do not know which function do this!!  Can you help me please!!  Thank y

Re: [R] Multiple linear regression with for loop

2008-02-27 Thread bartjoosen
I'm not sure if this is what you want but if you have a matrix as response, you can use the matrix ~ term: example: x <- 1:10 y <- rep(rnorm(10,x,0.5),10) dim(y) <- c(10,10) y <- as.matrix(y) coef(lm(y~x)) Bart Markus "Mühlbacher" wrote: > > Hi everyone! > > I have an array containing the

Re: [R] Multiple linear regression with for loop

2008-02-27 Thread Uwe Ligges
Markus Mühlbacher wrote: > Hi everyone! > > I have an array containing the following fields for over hundred compounds: > cpd, activity, fixterm, energy1, energy2, energy3, ... > > I want to run a multiple linear regression on all entries of an array. > Therefore I tried to do this with a fo

[R] Multiple linear regression with for loop

2008-02-26 Thread M�hlbacher
Hi everyone! I have an array containing the following fields for over hundred compounds: cpd, activity, fixterm, energy1, energy2, energy3, ... I want to run a multiple linear regression on all entries of an array. Therefore I tried to do this with a for loop. (Maybe there is a direct way of c