Linear model terms within a linear model I am still new to R and having issues searching the right terminology for my problem. I have the following equation:
ln(AGCestimate) = ln(a)+b1ln(Canopy)+b2ln(BA)+b3ln(BAD)+Error

BA and BAD are both linear models themselves 
BA = m1Canopy + b1; and BAD = m2(Canopy) + b2

I am not sure how to code this though, with models within models. I have tried searching for similar examples with for loops, and also stacked hierarchical models, but I am struggling to make sense of it all. Please can someone help! I have tried the following, but get errors with the model terms saying they are a non-numerical argument...
AGC <- lm(biomass2016$log_ground ~ log(a) + b*log(biomass2016$CANOPY) + c*log(BAlinear) + 
          d*log(BADlinear), data=biomass2016, start = list(a=1, b=1, c=1, d=1))

BAlinear and BADlinear have both been coded already and I was trying to call those models into this one.    
 A: You have the following regression equation 
 ln(AGCestimate) = ln(a)+b1*ln(Canopy)+b2*ln(BA)+b3*ln(BAD)+Error

and then you say that some of the terms, say BA are given by linear models themselves, say BA = m1Canopy + b1.  I suppose that b1 here is an intercept term, and that there is an error term you did not include (BAD treated similarly, but I will only discuss the case with one such "model inside the model" with your words. 
To discuss I will switch to a more algebraic, general notation.  We have the linear regression model
$$
   Y = b_0 + a_1 x + a_2 y + E_1
$$
where $E_1$ is an error term.  Then, inside this model, the variable $x$ is not itself directly observed, but given by another linear model 
$$
x  = b_1 + a_3 t + E_2
$$
Now we just substitute this model in the first model:
$$
  Y = b_0 + a_1 (b_1 + a_3 t + E_2) + a_2 y + E_1  \\
=  b_0 + a_1\cdot b_1 + a_1 \cdot a_3 t + a_1 \cdot E_2 + a_2 y + E_1
$$
which we can reorganize as 
$$
   Y = (b_0 + a_1 b_1) + a_1 a_3 t + a_2 y + (a_1 E_2 + E_1)
$$
so we have a new intercept given by $b_0+a_1 b_1$, a new $t$ slope $a_1 a_3$, and a new error term $a_1 E_2 + E_1$.  This is now a linear model in its own right, and can be estimated directly. If you are content with the "new" parameters in the last equatiuon, this is fine, but if you need estimates of the original parameters also, then it becomes more complicated. If so is the case, say so, and I will try to extend the answer.
