0

Heights for both studies (years combined) over time Average of Dryland heights(avgheight) over time (adjdap)

I am trying to run a nonlinear model for a growth curve that is following a sigmoidal pattern but am having some issues with one of my studies.

This particular data set is for plant height, and I am trying to model plant height over time for two growing seasons. I have this model that I have been tweaking for each new data set, but it has been running correctly for my other biomass yield data. It is also running correctly for my irrigated study height data. I only get this error for my dryland study model. Here is a glimpse of my data:

Rows: 1,459
Columns: 17
$ ActDOY     <dttm> 2019-09-23, 2019-09-23, 2019-09-23, 2019-0~
$ DOY        <dbl> 265, 265, 265, 265, 265, 265, 265, 265, 265~
$ CDOY       <dbl> 242, 242, 242, 242, 242, 242, 242, 242, 242~
$ Date       <chr> "09/21", "09/21", "09/21", "09/21", "09/21"~
$ Year       <dbl> 2019, 2019, 2019, 2019, 2019, 2019, 2019, 2~
$ avgheight  <dbl> 112.33333, 111.33333, 108.66667, 102.33333,~
$ Field      <chr> "F6", "F6", "F6", "F6", "F6", "F6", "F6", "~
$ Plot       <dbl> 101, 102, 112, 203, 210, 212, 301, 305, 307~
$ treatment  <dbl> 103, 103, 103, 103, 103, 103, 103, 103, 103~
$ heights    <dbl> 10.8, 15.2, 6.4, 10.8, 6.4, 15.2, 6.4, 15.2~
$ height     <chr> "medium", "high", "low", "medium", "low", "~
$ Block      <chr> "1", "1", "1", "2", "2", "2", "3", "3", "3"~
$ dap        <dbl> 80, 80, 80, 80, 80, 80, 80, 80, 80, 74, 74,~
$ irrigation <chr> "Irrigated", "Irrigated", "Irrigated", "Irr~
$ PD         <dttm> 2019-06-07, 2019-06-07, 2019-06-07, 2019-0~
$ ADAP       <dbl> 108, 108, 108, 108, 108, 108, 108, 108, 108~
$ AdjDAP     <dbl> 85, 85, 85, 85, 85, 85, 85, 85, 85, 75, 75,~

Here is my current model:

```{r}
metadrm(avgheight ~ AdjDAP,
      data = sunnHempht.dat %>% filter(irrigation == "Dryland"),
      fct = LL.3(),
      ind = Year,
      struct = "UN") ->  dry.metadrm
dry.start <- coef(dry.metadrm)

medrm(avgheight ~ AdjDAP, 
      data = sunnHempht.dat %>% filter(irrigation == "Dryland"),
      random = b + d + e ~ 1 | Year,
      fct = LL.3(),
      start = dry.start) ->  dry.medrm
dry.parms <- fixef(summary(dry.medrm))
summary(dry.medrm)
```

Here are the errors and warnings that result:

Error in solve.default(pdMatrix(a, factor = TRUE)) : 
system is computationally singular: reciprocal condition number = 2.66326e-74
In addition: Warning message:
In nlme.formula(avgheight ~ meLL.3(AdjDAP, b, d, e), fixed = b +  :
  Iteration 1, LME step: nlminb() did not converge (code = 1). Do increase 'msMaxIter'!

Any help would be greatly appreciated on what I can do to get this running! Thanks!

Lauren
  • 1
  • 1
  • 1
    what package are `metadrm`, `medrm` from? We might not be able to help very much without a [mcve]. Can you show us a plot of avgheight vs AdjDAP with lines separated by year? Do both of these models fail, or just one? – Ben Bolker Oct 19 '21 at 16:04
  • it appears this is a github package and docs are here : https://doseresponse.github.io/medrc/index.html installation code is: ## You can install medrc from GitHub # install.packages("devtools") ## first installing drc and drcData devtools::install_github("DoseResponse/drc") devtools::install_github("DoseResponse/drcData") ## then installing the development version of medrc devtools::install_github("DoseResponse/medrc") still need MRE though – Mostafa Lotfi Oct 19 '21 at 17:22
  • @BenBolker I am using the `drc` and `medrc` packages from the DoseResponse GitHub info that Mostafa shared above. My irrigated model runs totally fine, and the data should be virtually the same aside from the irrigated being taller overall. I have linked to an image of my dryland heights averaged per adjdap over time above to hopefully help! – Lauren Oct 19 '21 at 17:41
  • @BenBolker I have also added an image with both studies plotted over time with the years combined. – Lauren Oct 19 '21 at 17:47

0 Answers0