How can I pass function to formulas?

Hi ,guys:
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
图片1

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 lnp and xfoodd,but I don't know how to do that.I wonder if you can give me some guides. Many Thanks!

This topic was automatically closed 21 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.