On Thu, 2004-07-15 at 16:28, [EMAIL PROTECTED] wrote:
> Hi, i 'dont understand how to take a general formula, view this:
>
> x<-1:5
> y<-c(0,1,1.7,2,2.1.4)
> dummy<-data.frame(x=x,y=y)
> formula<-"y~A*log(x)/log(2)"
> formu<-as.formula(formula)
> fm<-lm(formu,data=dummy)
You probably meant something similar to this:
> lm(as.formula("y ~ log(x)"),dummy)
Call:
lm(formula = as.formula("y ~log(x)"), data = dummy)
Coefficients:
(Intercept) log(x)
0.0473 1.3793
And your "A" in this case would be 1.3793
Luis Torgo
--
Luis Torgo
FEP/LIACC, University of Porto Phone : (+351) 22 607 88 30
Machine Learning Group Fax : (+351) 22 600 36 54
R. Campo Alegre, 823 email : [EMAIL PROTECTED]
4150 PORTO - PORTUGAL WWW : http://www.liacc.up.pt/~ltorgo
______________________________________________
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html