Surprisingly, I played around with some test code and below actually
creates equations that look correct.

tempmat<-matrix(10,nrow=6,ncol=6)
restrictmat<-diag(6)

colnames(tempmat)<-c("AUD.l1","CHF.l1","CAD.l1","GBP.l1","EUR.l1","JPY.l
1")
rownames(tempmat)<-c("AUD","CHF","CAD","GBP","EUR","JPY")

eqn<-list()

for ( i in 1:6 ) {

datares <- tempmat[, which(restrictmat[i, ] == 1),drop=FALSE]
eqn[[i]]<-paste(rownames(tempmat)[i]," ~","-1","+",colnames(datares))

print(eqn[[i]])

}

The only problem now is that I don't know how to name them so that
I can do the

system<-list( demand = eqDemand, supply = eqSupply)

part that systemfit needs. In fact,  I don't know how to name the actual
equation eqDemand or the named part demand.

I would want demand to be "AUD", supply to be "CHF", etc. If someone has
time to run the code, they would see what I mean. 
Thanks a lot.
--------------------------------------------------------

This is not an offer (or solicitation of an offer) to buy/se...{{dropped}}

______________________________________________
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to