Hi,
I am using Stata 16.1.
I am studying the effect of different methods of land restoration on soil organic carbon sequestration. The soil organic carbon was evaluated in 6 depths (6 soil layers). I also included the soil clay content as a continuous covariate. So I have 2 independent categorical variables (method and depth - I am treating depth as categorical here), and 1 continuous independent variable (clay). Soil organic carbon (SOC) is my dependent variable.
I ran the regression and estimated the margins. The results of the margins were for each layer. But in my case, I need also the margins for the total soil organic carbon, which is the sum of all layers. So, my question is: is there a way to have a result of the margins for the sum of the layers (1+2+3+4+5+6)?
Commands used
reg SOC i.method##i.depth c.clay
contrast i.method##i.depth
margins i.method#i.depth
PS: I have already tried to include a "7th" soil depth to my data, with the sum of soil organic carbon of all other layers. But the results do not match. For example, if I sum all layers in a method, the result is not the same as the depth 7 (which was included).
I am using Stata 16.1.
I am studying the effect of different methods of land restoration on soil organic carbon sequestration. The soil organic carbon was evaluated in 6 depths (6 soil layers). I also included the soil clay content as a continuous covariate. So I have 2 independent categorical variables (method and depth - I am treating depth as categorical here), and 1 continuous independent variable (clay). Soil organic carbon (SOC) is my dependent variable.
I ran the regression and estimated the margins. The results of the margins were for each layer. But in my case, I need also the margins for the total soil organic carbon, which is the sum of all layers. So, my question is: is there a way to have a result of the margins for the sum of the layers (1+2+3+4+5+6)?
Commands used
reg SOC i.method##i.depth c.clay
contrast i.method##i.depth
margins i.method#i.depth
PS: I have already tried to include a "7th" soil depth to my data, with the sum of soil organic carbon of all other layers. But the results do not match. For example, if I sum all layers in a method, the result is not the same as the depth 7 (which was included).

Comment