Finding horizontal assymptote for non linear exponential model using R software

I have problem with finding horizontal assymptote using R software

Here's an example

library(stats)
library(ggplot2)

x <- 1:1000
y <- sqrt(x)

sortedxy <- sortedXyData(x, y)
asymptote_value <- NLSstRtAsymptote(sortedxy)

ggplot() +
  geom_line(aes(x = x, y = y)) +
  geom_hline(yintercept = asymptote_value, linetype = "dashed", color = "red")

|Day|Rep|Bruce|
|1|1|1027|
|1|2|988|
|1|3|1126|
|1|4|1054|
|3|1|361|
|3|2|416|
|3|3|403|
|3|4|397|
|7|1|214|
|7|2|233|
|7|3|230|
|7|4|200|
|14|1|130|
|14|2|136|
|14|3|109|
|14|4|140|
|21|1|76|
|21|2|76|
|21|3|72|
|21|4|73|
|28|1|51|
|28|2|57|
|28|3|53|
|28|4|50|
|35|1|33|
|35|2|35|
|35|3|31|
|35|4|28|
|42|1|20|
|42|2|22|
|42|3|19|
|42|4|15|
|49|1|19|
|49|2|26|
|49|3|21|
|49|4|16|
|56|1|21|
|56|2|20|
|56|3|19|
|56|4|16|
|63|1|14|
|63|2|13|
|63|3|13|
|63|4|14|
|70|1|14|
|70|2|13|
|70|3|13|
|70|4|9|
|78|1|12|
|78|2|10|
|78|3|8|
|78|4|12|
|91|1|15|
|91|2|8|
|91|3|14|
|91|4|11|
|98|1|7|
|98|2|5|
|98|3|8|
|98|4|5|
|105|1|6|
|105|2|7|
|105|3|6|
|105|4|5|
|119|1|4|
|119|2|5|
|119|3|5|
|119|4|5|
|126|1|4|
|126|2|5|
|126|3|4|
|126|4|3|
|133|1|4|
|133|2|5|
|133|3|4|
|133|4|2|
|140|1|3|
|140|2|4|
|140|3|3|
|140|4|2|
|147|1|2|
|147|2|4|
|147|3|5|
|147|4|2|
|154|1|1|
|154|2|4|
|154|3|3|
|154|4|2|
|168|1|3|
|168|2|3|
|168|3|4|
|168|4|3|
|175|1|2|
|175|2|3|
|175|3|2|
|175|4|2|
|182|1|2|
|182|2|2|
|182|3|2|

this is my data i am studying carbon mineralization from biochar (Bruce) my using co2 emission. i want to know on what amount and what day I will get horizontal asymptote ( means co2 emission will be equal in each day)

In case someone else would like to give this a try, here's the data as output by dput()
It would be trivially simple to substitute x and y in the example above with df$Day and df$Bruce, but I suspect what OP wants is something entirely different.

df _<- structure(list(Day = c(1, 1, 1, 1, 3, 3, 3, 3, 7, 7, 7, 7, 14, 
14, 14, 14, 21, 21, 21, 21, 28, 28, 28, 28, 35, 35, 35, 35, 42, 
42, 42, 42, 49, 49, 49, 49, 56, 56, 56, 56, 63, 63, 63, 63, 70, 
70, 70, 70, 78, 78, 78, 78, 91, 91, 91, 91, 98, 98, 98, 98, 105, 
105, 105, 105, 119, 119, 119, 119, 126, 126, 126, 126, 133, 133, 
133, 133, 140, 140, 140, 140, 147, 147, 147, 147, 154, 154, 154, 
154, 168, 168, 168, 168, 175, 175, 175, 175, 182, 182, 182), 
    Rep = c(1, 2, 3, 4, 1, 2, 3, 4, 1, 2, 3, 4, 1, 2, 3, 4, 1, 
    2, 3, 4, 1, 2, 3, 4, 1, 2, 3, 4, 1, 2, 3, 4, 1, 2, 3, 4, 
    1, 2, 3, 4, 1, 2, 3, 4, 1, 2, 3, 4, 1, 2, 3, 4, 1, 2, 3, 
    4, 1, 2, 3, 4, 1, 2, 3, 4, 1, 2, 3, 4, 1, 2, 3, 4, 1, 2, 
    3, 4, 1, 2, 3, 4, 1, 2, 3, 4, 1, 2, 3, 4, 1, 2, 3, 4, 1, 
    2, 3, 4, 1, 2, 3), Bruce = c(1027, 988, 1126, 1054, 361, 
    416, 403, 397, 214, 233, 230, 200, 130, 136, 109, 140, 76, 
    76, 72, 73, 51, 57, 53, 50, 33, 35, 31, 28, 20, 22, 19, 15, 
    19, 26, 21, 16, 21, 20, 19, 16, 14, 13, 13, 14, 14, 13, 13, 
    9, 12, 10, 8, 12, 15, 8, 14, 11, 7, 5, 8, 5, 6, 7, 6, 5, 
    4, 5, 5, 5, 4, 5, 4, 3, 4, 5, 4, 2, 3, 4, 3, 2, 2, 4, 5, 
    2, 1, 4, 3, 2, 3, 3, 4, 3, 2, 3, 2, 2, 2, 2, 2)), class = "data.frame", row.names = c(NA, 
-99L))

can anyone please help me find the horizontal asymptote

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.