search for: systemeq

Displaying 2 results from an estimated 2 matches for "systemeq".

Did you mean: systeme
2002 Jan 08
2
how to use attr?
I'm trying to build a flexible OLS/SUR/2SLS/3SLS package and I'm having trouble getting some information out of a formula. For example.... # set up the system of equations demand <- q ~ p + d supply <- q ~ p + f + a inst <- ~ d + f + a systemeq <- list( demand, supply ) ...blah, blah, blah... # get the number if instruments... # or build the "bigX"... #I need to get a print of the variables to build a large matrix... print( attr( systemeq[[1]], "variables" ) ) I've tried all kinds of variants... names( syst...
2002 Jan 16
1
getting the response (dependent) from formula?
I'm trying to build a vector (fitting systems of equations) and I'm having a little trouble getting the response variables from a list of formulas... bdgmodel <- lbdg ~ d1sqr + ld1 + lhg hgmodel <- lhg ~ ht2 + lht + whc inst <- ~ d1sqr + ld1 + ht2 + lht + whc systemeq <- list( bdgmodel, hgmodel ) # manually generate the y matrix... y <- cbind( matrix( lbdg ), matrix( log(hg) ) ) I would like to replace the previous line with something like... # do the three stage least squares here... for(i in 1:length( systemeq ) ) { bigy <- rbind(...