Re: [R] Regression Problem

2012-09-24 Thread Jeff Newmiller
What is it you think as.numeric accomplishes for you? A reproducible example as requested in the posting guide might clarify. Making factors and leaving them that way seems more productive. --- Jeff Newmiller

Re: [R] Regression Problem

2012-09-24 Thread Milan Bouchet-Valat
Le lundi 24 septembre 2012 à 11:25 +0530, Vignesh Prajapati a écrit : > Hello all, > > I am new to R, I am learning regression and logistic modeling > with categorical predictor variables, when there is only one predictor > categorical variable i can use as.numeric() but when more than t

[R] Regression Problem

2012-09-23 Thread Vignesh Prajapati
Hello all, I am new to R, I am learning regression and logistic modeling with categorical predictor variables, when there is only one predictor categorical variable i can use as.numeric() but when more than two variable then what is solution? can anyone suggest me? Thanks vignesh

Re: [R] Regression Problem for loop

2008-11-27 Thread Jorge Ivan Velez
Dear ales, Try this: # Data # set.seed(123) mat=matrix(rnorm(36),ncol=6) colnames(mat)=paste('x',1:6,sep="") res=rnorm(6) # All info for coefficients. First 4 columns # correspond to the intercept and the next for to the slope t(apply(mat,2,function(x){ sm=summary(lm(res~x))$coeff res=matrix(sm,n

Re: [R] Regression Problem for loop

2008-11-27 Thread David Winsemius
On Nov 27, 2008, at 9:49 AM, David Winsemius wrote: Have you looked at results of str on a regression object? I would not think that there would be a single p.value associated with such a beast, but that there might be if you examined individual coefficients. ? coefficients ?coef That w

Re: [R] Regression Problem for loop

2008-11-27 Thread David Winsemius
Have you looked at results of str on a regression object? I would not think that there would be a single p.value associated with such a beast, but that there might be if you examined individual coefficients. ? coefficients ?coef -- David Winsemius On Nov 27, 2008, at 4:03 AM, ales grill wro

[R] Regression Problem for loop

2008-11-27 Thread ales grill
Dear all, I have wrote a code for a linear regression. I want to write a loop for so, that I can get estimate for pavlues for six predictors. But I am getting for estmate for only last one. How can I get pvalues for all my predictors in a loop?? Anticipating your help Thanks Ales

Re: [R] Regression problem

2008-07-16 Thread Angila Albaros
On 7/15/08, Angila Albaros <[EMAIL PROTECTED]> wrote: > > Dear Sir, > Thanks for your reply but my data is very huge 100 x 550 ( > for x ) and 100 x 1010 ( for y). So, I think that time , I need to take one > column of x ($x1)and do multiple regreesion with y data set.i.e x1 will be

Re: [R] Regression problem

2008-07-15 Thread Erik Iverson
Douglas Bates wrote: On Tue, Jul 15, 2008 at 10:25 AM, Patrick Burns <[EMAIL PROTECTED]> wrote: That can be accomplished with 8 keystrokes. A hint is to do the 4 keystrokes: ?lm Umm - unless you are counting the implicit , that's only 3 keystrokes isn't it? You give away that you're an Em

Re: [R] Regression problem

2008-07-15 Thread Douglas Bates
On Tue, Jul 15, 2008 at 10:25 AM, Patrick Burns <[EMAIL PROTECTED]> wrote: > That can be accomplished with 8 keystrokes. > A hint is to do the 4 keystrokes: > ?lm Umm - unless you are counting the implicit , that's only 3 keystrokes isn't it? > Angila Albaros wrote: >> >> Hello all, >>

Re: [R] Regression problem

2008-07-15 Thread Patrick Burns
That can be accomplished with 8 keystrokes. A hint is to do the 4 keystrokes: ?lm Patrick Burns [EMAIL PROTECTED] +44 (0)20 8525 0696 http://www.burns-stat.com (home of S Poetry and "A Guide for the Unwilling S User") Angila Albaros wrote: Hello all, I am new to r programmean

[R] Regression problem

2008-07-15 Thread Angila Albaros
Hello all, I am new to r programmeand need help. I want to do multiple linear regression analysis. say, I have two matrix 'x' and 'y'. I want, 'x' as my response variable and 'y' as predictor. Each time one column of 'x' will be the response, say x[,1], then next x[,2] and so on.