Skip to content

error using boxcox.nls during non linear estimation

1 message · Francisco Mora Ardila

#
Hi all

I?ve got a problem using boxcox.nls function in nlrwr packagge. I?m fitting several non 
linear models to these data:
[1]   2   1   1   5   4   6  13  11  13 101 101 101
[1]  1.281055090  1.563609934  0.001570796  2.291579783  0.841891853
 [6]  6.553951324 14.243274230 14.519899320 15.066473610 21.728809880
[11] 18.553054450 23.722637370

I used nls function with self starters, for example SSgompertz:

model<-nls(y~SSgompertz(x,a,b))

The model runs OK, with the following summary:

Formula: y ~ SSgompertz(x, a, b, c)

Parameters:
  Estimate Std. Error t value Pr(>|t|)    
a  21.2426     0.9689  21.924 4.03e-09 ***
b   5.3330     1.4722   3.622  0.00555 ** 
c   0.8045     0.0274  29.364 3.01e-10 ***
---
Signif. codes:  0 ?***? 0.001 ?**? 0.01 ?*? 0.05 ?.? 0.1 ? ? 1 

Residual standard error: 1.686 on 9 degrees of freedom

Number of iterations to convergence: 5 
Achieved convergence tolerance: 1.508e-06 

But then, trying to use boxcox.nls(model) gives the following error:
Error in eval(object$data)[, as.character(formula(object)[[2]])[2]] : 
  object type 'environment' is not a subset

(this last part traduced from spanish)

I?ve tryed other functions, even without self starters but it does not work. Then it 
seems to be there something in the data, but I don?t know what.

Any suggestions?

Francisco


----------------------
Francisco Mora Ardila
Estudiante de Doctorado
Centro de Investigaciones en Ecosistemas
Universidad Nacional Aut?noma de M?xico