[prev in list] [next in list] [prev in thread] [next in thread]
List: r-help
Subject: [R] problem with nls()
From: "Siegfried.Macho" <Siegfried.Macho () unifr ! ch>
Date: 2003-11-28 22:02:10
[Download RAW message or body]
I wanted to use the nls() module to solve a Problem from Sen & Srivastava
(1990, p.209). Here is the (basic) code used to perform the estimation:
library(SenSrivastava)
library(nls)
data(E9.8)
# Use Linear Least Square for estimating start values
lm.obj <- lm(R.1 ~ I.1 + S.1, data = E9.8)
nls1.obj <- nls(R.1 ~ b.0 + b.1*(I.1^a.1-1)/a.1 + b.2*(S.1^a.2-1)/a.2,
data = E9.8,
start = list(b.0 = coef(lm.obj)[1], b.1 =
coef(lm.obj)[2], b.2 = coef(lm.obj)[3], a.1 = 1, a.2 = 1)
)
unfortunately, I receive the following message from nls(): "Error in
object[[i]] : object is not subsettable"
Why do I get this message, what does it mean, and how can I avoid it ?
Note 1: Enclosing expressions by using the function I() does not help either.
Note 2: To avoid confusion I have changed the names I, R, S to I.1, R.1, S.1.
Sincerely,
Siegfried Macho
==============================================
Dr. Siegfried Macho
Department of Psychology
University of Fribourg
Rue de Faucigny 2
CH-1700 Fribourg
Tel.: +41-26-3007635
Fax.: +41-26-3009712
http://www.unifr.ch/psycho/general/macho.htm
==============================================
[[alternative HTML version deleted]]
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic