[R] How to Write a Model in R that has the Log taken of the Intercept
PIKAL Petr
petr.pikal at precheza.cz
Mon Sep 24 14:15:19 CEST 2012
Hi
I do not understand your point.
actually
lm(y~x) is the same as lm(y~x+1)
You can specify a model without intercept by
lm(y~x-1)
you can even do
lm(y~log(x))
But log(intercept) does not have sense. You will get an intercept which is a number and you can consider it
log(intercept)
exp(intercept)
intercept^2
Regards
Petr
> -----Original Message-----
> From: r-help-bounces at r-project.org [mailto:r-help-bounces at r-
> project.org] On Behalf Of Cheryl Johnson
> Sent: Sunday, September 23, 2012 11:26 PM
> To: r-help at r-project.org
> Subject: [R] How to Write a Model in R that has the Log taken of the
> Intercept
>
> Hi,
>
> I know that +1 is used to specify an intercept in a R model. An example
> of this would be: y~x+1
>
> If I want to have a model where the log of the intercept is taken, the
> equation y~x+log(1) will not take the log of the intercept.
>
> Any suggestions on how to take the log of the intercept will be
> appreciated.
>
> Thanks
>
> [[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.
More information about the R-help
mailing list