Hi all, I am attempting to make a scatterplot of CO2 rate data (y) at varying temperatures (x) with two categorical variables, depth (Mineral, Organic) and substrate (Calcareous, Metapelite, Peridotite) with fitted lines following the equation y = a*exp(B*t) where y = co2 rate, a = basal respiration (intercept), B = slope and t = temperature (time equivalent). I have already fitted all of the exponential curves so I have the values for y, a, B and t for each data point. I am struggling to figure out how to fit the exponential curves across the two groups. So far, I have produced the base scatterplot using GGplot2 colouring by depth and faceting by substrate but I do not know what the best approach is to fit the curves. I have attempted to filter the dataset into categories (substrate = 1, depth = 1) and use nls to fit the curves with such little success that it isn't worth posting the code. Any advice/ guidance is greatly appreciated.

More Daniel Fishburn's questions See All
Similar questions and discussions