Re: [R] adjusting a power model in R

2007-04-16 Thread Greg Snow
Depending on the assumptions you make about the error sturcture of your
model there are a couple of options:

1). Use transformations and lm (assumes lognormal multiplicitive
errors):

 fit - lm( log(Y) ~ log(X) )

This finds log(bo) and b1

2). Use nonlinear least squares (assumes normal additive errors), look
at ?nls

3). Use more general algorithms, look at ?optim or maybe even the BRugs
package.

Hope this helps,

-- 
Gregory (Greg) L. Snow Ph.D.
Statistical Data Center
Intermountain Healthcare
[EMAIL PROTECTED]
(801) 408-8111
 
 

 -Original Message-
 From: [EMAIL PROTECTED] 
 [mailto:[EMAIL PROTECTED] On Behalf Of Milton 
 Cezar Ribeiro
 Sent: Sunday, April 15, 2007 8:23 PM
 To: R-help
 Subject: [R] adjusting a power model in R
 
 Dear R-gurus,
 
 How can I fit a power model in R? I would like adjust Y = 
 b0*X^b1 or something like. 
 
 Kind regards,
 
 Miltinho
 Brazil.
 
 __
 
 
   [[alternative HTML version deleted]]
 
 __
 R-help@stat.math.ethz.ch 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.


__
R-help@stat.math.ethz.ch 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.


[R] adjusting a power model in R

2007-04-15 Thread Milton Cezar Ribeiro
Dear R-gurus,

How can I fit a power model in R? I would like adjust Y = b0*X^b1 or something 
like. 

Kind regards,

Miltinho
Brazil.

__


[[alternative HTML version deleted]]

__
R-help@stat.math.ethz.ch 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.