Re: [R] how to plot a logarithmic regression line

2014-02-22 Thread David Winsemius
On Feb 22, 2014, at 1:06 PM, arun wrote: > HI, > Try ?curve > > fit <- lm(Mean_Percent_of_Range~log(No.ofPoints)) > coef(fit) > #(Intercept) log(No.ofPoints) > # -74.52645 46.14392 > > > > plot(Mean_Percent_of_Range ~ No.ofPoints) > curve(coef(fit)[[1]]+coef(fit)[[2]]*

Re: [R] how to plot a logarithmic regression line

2014-02-22 Thread arun
HI, Try ?curve fit <- lm(Mean_Percent_of_Range~log(No.ofPoints))  coef(fit)  #    (Intercept) log(No.ofPoints)   #     -74.52645 46.14392  plot(Mean_Percent_of_Range ~ No.ofPoints) curve(coef(fit)[[1]]+coef(fit)[[2]]*log(x),add=TRUE,col=2) A.K. I realize this is a stupid questio