I want to use systemfit to estimate a set of formulas which is composed by two parts,as the picture showing: enter image description here
there are four equations needed to be estimated,so I have codes :
library(systemfit) library(micEconAids) data( Blanciforti86 ) eps <- list() eps1 <- formula(wFood1 ~ Xfoodd + pFood1) eps2 <- formula(wFood2 ~ Xfoodd + pFood2) eps3 <- formula(wFood3 ~ Xfoodd + pFood3) eps2 <- formula(wFood4 ~ Xfoodd + pFood4) #how can I write xFoodd ? fit <- systemfit(eps,"SUR")
My question is how to write the code of
xFoodd,it seems that I can write a function of
xfoodd,but I don't know how to do that.I wonder if you can give me some guides. Many Thanks!