0

I'm running a nonlinear multiple regression with the nls_multstart() function with one dependent variable and three independent variables.

this is my code:

NLS.2 <- nls_multstart(micro~(a*b*rad_nee/(a+b*rad_nee))*(1+(A1*gfc)+(A2*vwc_nee)), 
                      data = GPP.micro_2019,
iter = 10500, convergence_count = FALSE,
start_lower = c(a=-10, b=-1, A1=0, A2=-5 ), 
start_upper = c(a=10, b=1, A1=7.88, A2=5 ),
lower = c(a=-10, b=-1, A1=0, A2=-5),
upper=c(a=10, b=1, A1=7.88, A2=5))

and this is the summary of the model:

Formula: micro ~ (a * b * rad_nee/(a + b * rad_nee)) * (1 + (A1 * gfc) + 
    (A2 * vwc_nee))

Parameters:
    Estimate Std. Error t value Pr(>|t|)    
a  -2.417472   0.404279  -5.980 7.06e-09 ***
b  -0.008043   0.001542  -5.216 3.64e-07 ***
A1  7.880000   1.159270   6.797 6.81e-11 ***
A2 -0.013911   0.002599  -5.352 1.86e-07 ***
---
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

Residual standard error: 0.9265 on 270 degrees of freedom

Number of iterations to convergence: 27 
Achieved convergence tolerance: 1.49e-08

$isConv
[1] TRUE

$finIter
[1] 27

$finTol
[1] 1.490116e-08

$stopCode
[1] 2

$stopMessage
[1] "Relative error between `par' and the solution is at most `ptol'."

As you can see A1 took the upper boundary provided, (if I change the boundaries of the other three coefficients, a, b, A2, they take always these values, but if I change A1 boundaries it takes always the upper boundary). However it seems to works.

But when I use nls() with the coefficients resulted from nls_multstart as starting values all the coefficients become non-significant even if the fit (modelled vs measured) is good. modelled vs measured plot here the summary of the nls()

Formula: micro ~ (a * b * rad_nee/(a + b * rad_nee)) * (1 + (A1 * gfc) + 
    (A2 * vwc_nee))

Parameters:
     Estimate Std. Error t value Pr(>|t|)
a  -0.2892654  0.2720112  -1.063    0.289
b  -0.0008152  0.0007737  -1.054    0.293
A1 90.6142121 86.2457023   1.051    0.294
A2  0.0568188  0.0797072   0.713    0.477

Residual standard error: 0.8128 on 270 degrees of freedom

Algorithm "port", convergence message: relative convergence (4)

Can anybody tell me what is wrong with the code or if there is a way to improve it?

below a sample of the data:

       micro   vwc_nee   rad_nee   gfc
1   -1.0833333  22.7    165.885 0.1047220
2   -0.4768519  34.9    151.359 0.0626554
3   -0.6064815  21.4    157.745 0.0790994
4   -0.3270255  19.3    159.531 0.0378047
5   -1.6215278  26.7    147.391 0.2237490
6   -0.8333333  25.9    147.482 0.1659130
Fra AdV
  • 1
  • 1
  • 3
  • 1
    "but unfortunately all the coefficient are non-significant" Umm, according to the model summary only one coefficient is "non-significant". But you should be very careful with these p-values. They are the result of a test with H0: alpha = 0 and that might not be the right hypothesis for a non-linear parameter alpha. Why are you even interested in significance of model parameters? – Roland Feb 03 '23 at 09:09
  • I'm sorry. It was a mistake, but I'm very interested in your comment. I'm trying to reproduce a model that was run in MatLab with R, trying to get almost identical results (all significant coefficient). now I managed to get them all significant (by changing the search range of the initial values), but Would like to know why I should be careful with this p-values? (Sorry if the question sounds silly I don't have a very strong background) – Fra AdV Feb 03 '23 at 10:11
  • And if I try to run nls() with the coefficients obtained the fit of the model continues to be like that of the posted image, but in this case the coefficients are all non-significant. I can only get them with nls.multstart – Fra AdV Feb 03 '23 at 10:24

0 Answers0