systemfit/0000755000176200001440000000000014406632022012300 5ustar liggesuserssystemfit/NAMESPACE0000644000176200001440000000540112567432726013536 0ustar liggesusersexport( "correlation.systemfit" ) export( "createSystemfitModel" ) export( "hausman.systemfit" ) export( "nlsystemfit" ) export( "se.ratio.systemfit" ) export( "systemfit" ) export( "systemfit.control" ) import( "Matrix" ) importFrom( "car", "linear.hypothesis" ) importFrom( "car", "linearHypothesis" ) importFrom( "lmtest", "lrtest" ) importFrom( "lmtest", "lrtest.default" ) importFrom( "MASS", "mvrnorm" ) importFrom( "methods", "as" ) importFrom( "sandwich", "bread" ) importFrom( "sandwich", "estfun" ) importFrom( "stats", "nobs" ) importFrom( "stats", "as.formula" ) importFrom( "stats", "coef" ) importFrom( "stats", "confint" ) importFrom( "stats", "cor" ) importFrom( "stats", "delete.response" ) importFrom( "stats", "deriv" ) importFrom( "stats", "df.residual" ) importFrom( "stats", "fitted" ) importFrom( "stats", "formula" ) importFrom( "stats", "model.extract" ) importFrom( "stats", "model.frame" ) importFrom( "stats", "model.matrix" ) importFrom( "stats", "nlm" ) importFrom( "stats", "optim" ) importFrom( "stats", "pchisq" ) importFrom( "stats", "pf" ) importFrom( "stats", "predict" ) importFrom( "stats", "printCoefmat" ) importFrom( "stats", "pt" ) importFrom( "stats", "qt" ) importFrom( "stats", "residuals" ) importFrom( "stats", "rnorm" ) importFrom( "stats", "symnum" ) importFrom( "stats", "terms" ) importFrom( "stats", "var" ) importFrom( "stats", "vcov" ) S3method( "bread", "systemfit" ) S3method( "coef", "systemfit" ) S3method( "coef", "systemfit.equation" ) S3method( "coef", "summary.systemfit" ) S3method( "coef", "summary.systemfit.equation" ) S3method( "confint", "systemfit" ) S3method( "confint", "systemfit.equation" ) S3method( "estfun", "systemfit" ) S3method( "fitted", "systemfit" ) S3method( "fitted", "systemfit.equation" ) S3method( "formula", "systemfit" ) S3method( "formula", "systemfit.equation" ) S3method( "linear.hypothesis", "systemfit" ) S3method( "linearHypothesis", "systemfit" ) S3method( "logLik", "systemfit" ) S3method( "lrtest", "systemfit" ) S3method( "model.frame", "systemfit" ) S3method( "model.frame", "systemfit.equation" ) S3method( "model.matrix", "systemfit" ) S3method( "model.matrix", "systemfit.equation" ) S3method( "nobs", "systemfit" ) S3method( "predict", "systemfit" ) S3method( "predict", "systemfit.equation" ) S3method( "print", "confint.systemfit" ) S3method( "print", "systemfit" ) S3method( "print", "systemfit.equation" ) S3method( "print", "summary.systemfit" ) S3method( "print", "summary.systemfit.equation" ) S3method( "residuals", "systemfit" ) S3method( "residuals", "systemfit.equation" ) S3method( "summary", "systemfit" ) S3method( "summary", "systemfit.equation" ) S3method( "terms", "systemfit" ) S3method( "terms", "systemfit.equation" ) S3method( "vcov", "systemfit" ) S3method( "vcov", "systemfit.equation" ) systemfit/data/0000755000176200001440000000000014406577567013237 5ustar liggesuserssystemfit/data/GrunfeldGreene.rda0000644000176200001440000000321611063415462016602 0ustar liggesusers[lEǷ7  Q $\$b7{ ۦv,n۶) T@ EI5Q kP#OW&g̙93s[^lN)N1L8S\&ƫ8i%4j*/JdJZ"=ЍvUNAND~Zioz)ӶQpi:12DZϡr7qyhϞ1ۦ~p=eVm^ϱ<3Es[T=ٲO,<s<0nی<-̔[YE)Z!eEm|MV1t&֧];1^ۃyh)&B`]4} 3->Rٰ/ޏOsʂh/ݜYݒvHm|N߇d-Ɍ,L[1Tf?b| {2ڳ($6q\}s߃6_ xw oykG9B_'>lVQ0߳7~)hbȏ`wnZn;< ރS;= aBt؏x8ơyZqy϶Űku:^ط ^~o{;\wo I>H{7ihz N|@{8~;8N+ vWZ2 [ Z gK7d/`s:xk?}3o ڏnKݱQs v {0>|kǍ.<0~6ܦ?Wg w=|@3UQ6P{ߋv~0^u<7_2.>wk繄y%X3k>W3: 8bS\xxdļup(}5_@q-^@o %vTܗ-gp?2 톬"'X7v&㹕~ɯr_C̳51/=ih<$>S mLK1.c\ƶ<<.ꁐM \UU]e:~f. bV+{>HU+7WՄ؂պx xB1|ǕyjU1JTE}t_trPCVE%QOU9J*aUT6Vz*O8e: Ԓj=qHzjOjbߨt F 8.-V1*Xb{UTI,5ԬRI.5ԜRYfaaYfaaYfaXaEaXaEaXaUVaXaUVaXaUVa؄aM6a؄aM6a؄a]va؅a]va؅a]va8Ca8Ca8SNa8SNa8SNaK.aK.a1RS6=2<՞eJ&}systemfit/data/ppine.txt.gz0000644000176200001440000000350214406577567015532 0ustar liggesusersmX]$ |NQx퍝X>IDU?LDw$AK?~??χ>!G>Ag9]v9χ7 _.P9G6H9P@'l?A)]]VN $ճERC45n(jGg |FpFC9L[9Ho) T/)evQʐ `GƩ/CTEE0pE7R}rLR{&DP;ɚ(0NV&ɼSAq C)?S7qs JDHUv"McȑaTE rb,\ĉᩅXbi+jg>MvDDU<P*S;eBB B?gdQȞ CbAS9o $R.X\ZE+<8\ VL-6"Z@]ScU*2 a(qJzwL SIR 4^EBL I $ߴSNs]WR")0Vwp*reZpFb@P+j<DMAd~QQ;߲O3R9"*MAEHqm!'y5 Nu-T%ޖPªBT|dE|=* r#dqii+ ]8`rV7M]Iol(&wLu.:TtD^sZl(݋vmpBSAZfLE.@1Mιzh4SKs]fvD$gucìCZ]vl՘Q&l}vlSe#6x{a&vfE)kpkv:螺^@H`m Kl˒ ޲BۂWD~;cbz_$lVk"mZt=Zv>3-e R|=am+N/DݭI[ƬC: P7.cÅI~9DѼ&)WyM>P{/Wl.|ۣ}ބ5JEDE"^rf}H-Xl,*EXL[1/jw3kㅳkoO)zmkLU}جF_ngbG咵yYC",xP6)6 CLOLV^8ЎC-`gprH/ܼx{Sxg'lie:Q,I~lo$iC! \mf[(7XLa %>,4l9 njR5iNs`Itj8$ͯ=yR`OezaviCr^KY~s~: 4KHj®Aٷgˡ`-f+ VS=^}dּ!-yXGd,-%ϐ[\dq g|,Tn_^fMq:*?ZWۢң3 η * ?T|s(x%<3g $R~2=9oO/]4^\7tzr}|zz8cz~qx; Oxߧ1Ƶv=?}K({c6LL8oj lEcc\uXm[W]VۗKI< FOMTaJ3XrS=䕑VM*bjCAh hu. Q1"l8c]xa^DWӌw J /ylc;LJ k_ИHuwmK2G)d@ѕaauɇz*AL|b8M]8Șd X>T[TZOkD;jL6Jp7K5?E { Eab#1No+/ƜJa  Kz$MAR++[u=( 2 )ұЁ5г9Q+!E:j3y 8뷲z^W(XK9VC?Z. &6k1蝝LZ!5´Xͨ Zf <8 2C:ĺ"\ztQj`x\<ûV4TAW(U-%=^jeAMpX<2<$Yw UR%Sy'KEjDU.1Dh~L٩ɛF*x#W?/systemfit/man/0000755000176200001440000000000014406577567013101 5ustar liggesuserssystemfit/man/summary.nlsystemfit.system.Rd0000644000176200001440000000273111063415462020750 0ustar liggesusers % $Id: summary.nlsystemfit.system.Rd 154 2006-02-14 14:15:11Z henningsena $ \name{summary.nlsystemfit} \alias{summary.nlsystemfit.system} \alias{summary.nlsystemfit.equation} \title{Summary of nlsystemfit estimation} \description{ These functions print a summary of the estimated equation system. } \usage{ \method{summary}{nlsystemfit.system}( object, ... ) \method{summary}{nlsystemfit.equation}( object, ... ) } \arguments{ \item{object}{an object of class \code{nlsystemfit.system} or \code{nlsystemfit.equation}.} \item{...}{not used by user.} } \author{Jeff D. Hamann \email{jeff.hamann@forestinformatics.com}} \seealso{\code{\link{nlsystemfit}}, \code{\link{print.nlsystemfit.system}}} \examples{ library( systemfit ) data( ppine ) hg.formula <- hg ~ exp( h0 + h1*log(tht) + h2*tht^2 + h3*elev + h4*cr) dg.formula <- dg ~ exp( d0 + d1*log(dbh) + d2*hg + d3*cr + d4*ba ) labels <- list( "height.growth", "diameter.growth" ) inst <- ~ tht + dbh + elev + cr + ba start.values <- c(h0=-0.5, h1=0.5, h2=-0.001, h3=0.0001, h4=0.08, d0=-0.5, d1=0.009, d2=0.25, d3=0.005, d4=-0.02 ) model <- list( hg.formula, dg.formula ) model.ols <- nlsystemfit( "OLS", model, start.values, data=ppine, eqnlabels=labels ) print( model.ols ) model.3sls <- nlsystemfit( "3SLS", model, start.values, data=ppine, eqnlabels=labels, inst=inst ) print( model.3sls ) } \keyword{models} \keyword{regression} \keyword{nonlinear} systemfit/man/model.frame.systemfit.Rd0000644000176200001440000000273511216215644017573 0ustar liggesusers\name{model.frame.systemfit} \alias{model.frame.systemfit} \alias{model.frame.systemfit.equation} \title{Extracting the Data of a systemfit Object} \description{ These functions return the data used by \code{\link{systemfit}} to estimate a system of equations. } \usage{ \method{model.frame}{systemfit}( formula, \dots ) \method{model.frame}{systemfit.equation}( formula, \dots ) } \arguments{ \item{formula}{an object of class \code{systemfit} or \code{systemfit.equation}.} \item{\dots}{currently ignored.} } \value{ \code{model.frame.systemfit} returns a simple data frame (without a 'terms' attribute) that contains all variables used to estimate the entire system of equations. \code{model.frame.systemfit.equation} returns a model frame (data frame with a 'terms' attribute) that contains all variables used to estimate the respective equation. } \author{Arne Henningsen \email{arne.henningsen@googlemail.com}} \seealso{ \code{\link{systemfit}}, \code{\link{model.frame}}, and \code{\link{model.matrix.systemfit}} } \examples{ data( "Kmenta" ) eqDemand <- consump ~ price + income eqSupply <- consump ~ price + farmPrice + trend system <- list( demand = eqDemand, supply = eqSupply ) ## perform OLS of the system fitols <- systemfit( system, data = Kmenta ) ## data used to estimate the entire system model.frame( fitols ) ## data used to estimate the first equation model.frame( fitols$eq[[ 1 ]] ) } \keyword{models} systemfit/man/lrtest.systemfit.Rd0000644000176200001440000000537011431052552016711 0ustar liggesusers % $Id: lrtest.systemfit.Rd 1055 2010-08-12 20:11:21Z arne $ \name{lrtest.systemfit} \alias{lrtest.systemfit} \title{Likelihood Ratio test for Equation Systems} \description{ Testing linear hypothesis on the coefficients of a system of equations by a Likelihood Ratio test. } \usage{ \method{lrtest}{systemfit}( object, ... ) } \arguments{ \item{object}{a fitted model object of class \code{systemfit}.} \item{\dots}{further fitted model objects of class \code{systemfit}.} } \details{ \code{lrtest.systemfit} consecutively compares the fitted model object \code{object} with the models passed in \code{...}. The LR-statistic for sytems of equations is \deqn{ LR = T \cdot \left( log \left| \hat{ \hat{ \Sigma } }_r \right| - log \left| \hat{ \hat{ \Sigma } }_u \right| \right) } where \eqn{T} is the number of observations per equation, and \eqn{\hat{\hat{\Sigma}}_r} and \eqn{\hat{\hat{\Sigma}}_u} are the residual covariance matrices calculated by formula "0" (see \code{\link{systemfit}}) of the restricted and unrestricted estimation, respectively. Asymptotically, \eqn{LR} has a \eqn{\chi^2} distribution with \eqn{j} degrees of freedom under the null hypothesis (Green, 2003, p. 349). } \value{ An object of class \code{anova}, which contains the log-likelihood value, degrees of freedom, the difference in degrees of freedom, likelihood ratio Chi-squared statistic and corresponding p value. See documentation of \code{\link[lmtest]{lrtest}} in package "lmtest". } \references{ Greene, W. H. (2003) \emph{Econometric Analysis, Fifth Edition}, Prentice Hall. } \author{Arne Henningsen \email{arne.henningsen@googlemail.com}} \seealso{\code{\link{systemfit}}, \code{\link[lmtest]{lrtest}} (package "lmtest"), \code{\link{linearHypothesis.systemfit}}} \examples{ data( "Kmenta" ) eqDemand <- consump ~ price + income eqSupply <- consump ~ price + farmPrice + trend system <- list( demand = eqDemand, supply = eqSupply ) ## unconstrained SUR estimation fitsur <- systemfit( system, "SUR", data = Kmenta ) # create restriction matrix to impose \eqn{beta_2 = \beta_6} R1 <- matrix( 0, nrow = 1, ncol = 7 ) R1[ 1, 2 ] <- 1 R1[ 1, 6 ] <- -1 ## constrained SUR estimation fitsur1 <- systemfit( system, "SUR", data = Kmenta, restrict.matrix = R1 ) ## perform LR-test lrTest1 <- lrtest( fitsur1, fitsur ) print( lrTest1 ) # rejected # create restriction matrix to impose \eqn{beta_2 = - \beta_6} R2 <- matrix( 0, nrow = 1, ncol = 7 ) R2[ 1, 2 ] <- 1 R2[ 1, 6 ] <- 1 ## constrained SUR estimation fitsur2 <- systemfit( system, "SUR", data = Kmenta, restrict.matrix = R2 ) ## perform LR-test lrTest2 <- lrtest( fitsur2, fitsur ) print( lrTest2 ) # accepted } \keyword{models} systemfit/man/confint.systemfit.Rd0000755000176200001440000000377111216215644017046 0ustar liggesusers\name{confint.systemfit} \alias{confint.systemfit} \alias{confint.systemfit.equation} \title{Confidence intervals of coefficients} \description{ These functions calculate the confidence intervals of the coefficients from an object returned by \code{\link{systemfit}}. } \usage{ \method{confint}{systemfit}( object, parm = NULL, level = 0.95, useDfSys = NULL, \dots ) \method{confint}{systemfit.equation}( object, parm, level = 0.95, useDfSys = NULL, \dots ) } \arguments{ \item{object}{an object of class \code{systemfit} or \code{systemfit.equation}.} \item{parm}{not used yet.} \item{level}{confidence level.} \item{useDfSys}{logical. Use the degrees of freedom of the whole system (in place of the degrees of freedom of the single equation) to calculate the confidence intervals of the coefficients. If it not specified (\code{NULL}), it is set to \code{TRUE} if restrictions on the coefficients are imposed and \code{FALSE} otherwise.} \item{\dots}{other arguments.} } \value{ An object of class \code{confint.systemfit}, which is a matrix with columns giving lower and upper confidence limits for each estimated coefficient. These will be labelled as (1-level)/2 and 1 - (1-level)/2 in \% (by default 2.5\% and 97.5\%). } \author{Arne Henningsen \email{arne.henningsen@googlemail.com}} \seealso{ \code{\link{systemfit}}, \code{\link{print.confint.systemfit}}, \code{\link{confint}} } \examples{ data( "Kmenta" ) eqDemand <- consump ~ price + income eqSupply <- consump ~ price + farmPrice + trend system <- list( demand = eqDemand, supply = eqSupply ) ## perform OLS on each of the equations in the system fitols <- systemfit( system, data = Kmenta ) ## confidence intervals of all coefficients confint( fitols ) ## confidence intervals of the coefficients of the first equation confint( fitols$eq[[1]] ) ## confidence intervals of the coefficients of the second equation confint( fitols$eq[[2]] ) } \keyword{models} \keyword{regression} systemfit/man/ppine.Rd0000644000176200001440000000365011063415462014464 0ustar liggesusers % $Id: ppine.Rd 486 2007-10-10 07:58:53Z henningsena $ \name{ppine} \alias{ppine} \docType{data} \title{Tree Growth Data for Ponderosa Pine} \usage{data(ppine)} \description{ A subset of tree growth observations from a Ponderosa pine growth database. The \code{ppine} data frame has 166 rows and 8 columns. } \format{ This data frame contains the following columns: \describe{ \item{elev}{ Altitude of the plot, in feet above mean sea level. } \item{smi}{ Summer moisture index is the ratio of growing season heating degree days to growing season precipitation. } \item{dbh}{ Diameter of the tree at breast height (4.5 feet). } \item{tht}{ Total stem height for the tree. } \item{cr}{ Crown ratio code. The scale is from 1 to 9 where a crown class of one represents a crown ratio between 0 and 15 percent. A crown ratio code of 2 represents a crown ratio value between 16 and 25\%,...,8=76-85\%, 9 >=85\%. } \item{ba}{ Plot basal area at the beginning of the growth period. } \item{dg}{ Five-year diameter increment. } \item{hg}{ Five-year height increment. } } } \details{ The exogenous variables are \code{elev}, \code{smi}, \code{dbh}, \code{tht}, \code{cr}, and \code{ba}; the endogenous variables \code{dg} and \code{hg}. There are no lagged variables in the dataset and the observations are for a single remeasurement. The data was provided by the USDA Forest Service Intermountain Research Station. % The data was provided by the USDA Forest Service Intermountain % Research Station from installations on USDA Forest Service, Spokane Indian % Reservation and the Nez Perce Indian Reservation lands. } \source{ William R. Wykoff \email{wwykoff@fs.fed.us} \emph{Rocky Mountain Research Station, 1221 South Main Street, Moscow, ID 83843} } \examples{ data(ppine) } \keyword{datasets} systemfit/man/model.matrix.systemfit.Rd0000644000176200001440000000315512007135246020000 0ustar liggesusers\name{model.matrix.systemfit} \alias{model.matrix.systemfit} \alias{model.matrix.systemfit.equation} \title{Construct Design Matrices for Systems of Equations} \description{ These functions create design matrices from objects returned by \code{\link{systemfit}}. } \usage{ \method{model.matrix}{systemfit}( object, which = "x", \dots ) \method{model.matrix}{systemfit.equation}( object, which = "x", \dots ) } \arguments{ \item{object}{an object of class \code{systemfit} or \code{systemfit.equation}.} \item{which}{character string: \code{"x"} indicates the usual model matrix of the regressors, \code{"xHat"} indicates the model matrix of the fitted regressors, \code{"z"} indicates the matrix of instrumental variables.} \item{\dots}{currently ignored.} } \value{ \code{model.matrix.systemfit} returns a design matrix to estimate the specified system of equations. \code{model.matrix.systemfit.equation} returns a design matrix to estimate the specified formula of the respective equation. } \author{Arne Henningsen \email{arne.henningsen@googlemail.com}} \seealso{ \code{\link{systemfit}}, \code{\link{model.matrix}}, and \code{\link{model.frame.systemfit}} } \examples{ data( "Kmenta" ) eqDemand <- consump ~ price + income eqSupply <- consump ~ price + farmPrice + trend system <- list( demand = eqDemand, supply = eqSupply ) ## perform OLS of the system fitols <- systemfit( system, data = Kmenta ) ## design matrix of the entire system model.matrix( fitols ) ## design matrix of the first equation model.matrix( fitols$eq[[ 1 ]] ) } \keyword{models} systemfit/man/nlsystemfit.Rd0000644000176200001440000002025711063415462015734 0ustar liggesusers % $Id: nlsystemfit.Rd 548 2008-09-12 08:22:23Z henningsena $ \name{nlsystemfit} \alias{nlsystemfit} \title{Nonlinear Equation System Estimation} \description{ Fits a set of structural nonlinear equations using Ordinary Least Squares (OLS), Seemingly Unrelated Regression (SUR), Two-Stage Least Squares (2SLS), Three-Stage Least Squares (3SLS). } \usage{ nlsystemfit( method="OLS", eqns, startvals, eqnlabels=c(as.character(1:length(eqns))), inst=NULL, data=list(), solvtol=.Machine$double.eps, maxiter=1000, ... ) } \arguments{ \item{method}{the estimation method, one of "OLS", "SUR", "2SLS", "3SLS".} \item{eqns}{a list of structural equations to be estimated.} \item{startvals}{a list of starting values for the coefficients.} \item{eqnlabels}{an optional list of character vectors of names for the equation labels.} \item{inst}{one-sided model formula specifying instrumental variables or a list of one-sided model formulas if different instruments should be used for the different equations (only needed for 2SLS, 3SLS and GMM estimations).} \item{data}{an optional data frame containing the variables in the model. By default the variables are taken from the environment from which nlsystemfit is called.} \item{solvtol}{tolerance for detecting linear dependencies in the columns of X in the \code{\link{qr}} function calls.} \item{maxiter}{the maximum number of iterations for the \code{\link{nlm}} function.} \item{...}{arguments passed to \code{\link{nlm}}.} } \details{ The nlsystemfit function relies on \code{\link{nlm}} to perform the minimization of the objective functions and the \code{\link{qr}} set of functions. A system of nonlinear equations can be written as: \deqn{\epsilon_{t} = q( y_t, x_t, \theta )} \deqn{z_{t} = Z( x_t )} where \eqn{\epsilon_{t}} are the residuals from the y observations and the function evaluated at the coefficient estimates. The objective functions for the methods are: \tabular{lccc}{ % \hline Method \tab Instruments \tab Objective Function \tab Covariance of \eqn{\theta}\cr %\hline OLS \tab no \tab \eqn{r'r} \tab \eqn{(X(diag(S)^{-1}\bigotimes I)X)^{-1}}\cr %\hline SUR \tab no \tab \eqn{r'(diag(S)_{OLS}^{-1}\bigotimes I)r} \tab \eqn{(X(S^{-1}\bigotimes I)X)^{-1}}\cr %\hline 2SLS \tab yes \tab \eqn{r'(I \bigotimes W)r} \tab \eqn{(X(diag(S)^{-1}\bigotimes I)X)^{-1}}\cr %\hline 3SLS \tab yes \tab \eqn{r'(S_{2SLS}^{-1} \bigotimes W)r} \tab \eqn{(X(diag(S)^{-1}\bigotimes W)X)^{-1}} %\hline } where, r is a column vector for the residuals for each equation, S is variance-covariance matrix between the equations (\eqn{\hat{\sigma}_{ij} = (\hat{e}_i' \hat{e}_j) / \sqrt{(T - k_i)*(T - k_j)}}), X is matrix of the partial derivates with respect to the coefficients, W is a matrix of the instrument variables \eqn{Z(Z'Z)^{-1}Z}, Z is a matrix of the instrument variables, and I is an nxn identity matrix. The SUR and 3SLS methods requires two solutions. The first solution for the SUR is an OLS solution to obtain the variance-covariance matrix. The 3SLS uses the variance-covatiance from a 2SLS solution, then fits all the equations simultaneously. The user should be aware that the function is \bold{VERY} sensative to the starting values and the nlm function may not converge. The nlm function will be called with the \code{typsize} argument set the absolute values of the starting values for the OLS and 2SLS methods. For the SUR and 3SLS methods, the \code{typsize} argument is set to the absolute values of the resulting OLS and 2SLS coefficient estimates from the nlm result structre. In addition, the starting values for the SUR and 3SLS methods are obtained from the OLS and 2SLS coefficient estimates to shorten the number of iterations. The number of iterations reported in the summary are only those used in the last call to nlm, thus the number of iterations in the OLS portion of the SUR fit and the 2SLS portion of the 3SLS fit are not included. } \value{ \code{nlsystemfit} returns a list of the class \code{nlsystemfit.system} and contains all results that belong to the whole system. This list contains one special object: "eq". It is a list and contains one object for each estimated equation. These objects are of the class \code{nlsystemfit.equation} and contain the results that belong only to the regarding equation. The objects of the class \code{nlsystemfit.system} and \code{nlsystemfit.equation} have the following components (the elements of the latter are marked with an asterisk (\eqn{*})): \item{eq}{a list object that contains a list object for each equation.} \item{method}{estimation method.} \item{resids}{an \eqn{n \times g} matrix of the residuals.} \item{g}{number of equations.} \item{n}{total number of observations.} \item{k}{total number of coefficients.} \item{b}{vector of all estimated coefficients.} \item{se}{estimated standard errors of \code{b}.} \item{t}{t values for \code{b}.} \item{p}{p values for \code{b}.} \item{bcov}{estimated covariance matrix of \code{b}.} \item{rcov}{estimated residual covariance matrix.} \item{drcov}{determinant of \code{rcov}.} \item{rcovest}{residual covariance matrix used for estimation (only SUR and 3SLS).} \item{rcor}{estimated residual correlation matrix.} \item{nlmest}{results from the nlm function call} \item{solvetol}{tolerance level when inverting a matrix or calculating a determinant.} ## elements of the class nlsystemfit.eq \item{eq}{a list that contains the results that belong to the individual equations.} \item{eqnlabel*}{the equation label of the ith equation (from the labels list).} \item{formula*}{model formula of the ith equation.} \item{n*}{number of observations of the ith equation.} \item{k*}{number of coefficients/regressors in the ith equation.} \item{df*}{degrees of freedom of the ith equation.} \item{b*}{estimated coefficients of the ith equation.} \item{se*}{estimated standard errors of \code{b}.} \item{t*}{t values for \code{b}.} \item{p*}{p values for \code{b}.} \item{covb*}{estimated covariance matrix of \code{b}.} \item{predicted*}{vector of predicted values of the ith equation.} \item{residuals*}{vector of residuals of the ith equation.} \item{ssr*}{sum of squared residuals of the ith equation.} \item{mse*}{estimated variance of the residuals (mean of squared errors) of the ith equation.} \item{s2*}{estimated variance of the residuals (\eqn{\hat{\sigma}^2}) of the ith equation.} \item{rmse*}{estimated standard error of the residulas (square root of mse) of the ith equation.} \item{s*}{estimated standard error of the residuals (\eqn{\hat{\sigma}}) of the ith equation.} \item{r2*}{R-squared (coefficient of determination).} \item{adjr2*}{adjusted R-squared value.} } \references{ Gallant, R. H. (1987) \emph{Nonlinear Equation Estimation}, John Wiley and Sons, 610 pp. SAS Institute (1999) \emph{SAS/ETS User's Guide, Version 8}, Cary NC: SAS Institute 1546 pp. } \author{Jeff D. Hamann \email{jeff.hamann@forestinformatics.com} } \seealso{\code{\link{systemfit}}, \code{\link{nlm}}, and \code{\link{qr}}} \examples{ library( systemfit ) data( ppine ) hg.formula <- hg ~ exp( h0 + h1*log(tht) + h2*tht^2 + h3*elev + h4*cr) dg.formula <- dg ~ exp( d0 + d1*log(dbh) + d2*hg + d3*cr + d4*ba ) labels <- list( "height.growth", "diameter.growth" ) inst <- ~ tht + dbh + elev + cr + ba start.values <- c(h0=-0.5, h1=0.5, h2=-0.001, h3=0.0001, h4=0.08, d0=-0.5, d1=0.009, d2=0.25, d3=0.005, d4=-0.02 ) model <- list( hg.formula, dg.formula ) model.ols <- nlsystemfit( "OLS", model, start.values, data=ppine, eqnlabels=labels ) print( model.ols ) model.sur <- nlsystemfit( "SUR", model, start.values, data=ppine, eqnlabels=labels ) print( model.sur ) model.2sls <- nlsystemfit( "2SLS", model, start.values, data=ppine, eqnlabels=labels, inst=inst ) print( model.2sls ) model.3sls <- nlsystemfit( "3SLS", model, start.values, data=ppine, eqnlabels=labels, inst=inst ) print( model.3sls ) } \keyword{models} \keyword{regression} \keyword{nonlinear} systemfit/man/vcov.systemfit.Rd0000755000176200001440000000430011216215644016350 0ustar liggesusers\name{vcov.systemfit} \alias{vcov.systemfit} \alias{vcov.systemfit.equation} \title{Variance covariance matrix of coefficients} \description{ These functions extract the variance covariance matrix of the coefficients from an object returned by \code{\link{systemfit}}. } \usage{ \method{vcov}{systemfit}( object, modified.regMat = FALSE, \dots ) \method{vcov}{systemfit.equation}( object, \dots ) } \arguments{ \item{object}{an object of class \code{systemfit} or \code{systemfit.equation}.} \item{modified.regMat}{logical. If \code{TRUE}, the covariance matrix of the coefficients of the modified regressor matrix (original regressor matrix post-multiplied by \code{restrict.regMat}) rather than the covariance matrix of the coefficients of the original regressor matrix is returned.} \item{\dots}{other arguments.} } \value{ \code{vcov.systemfit} returns the variance covariance matrix of all estimated coefficients. } \author{Arne Henningsen \email{arne.henningsen@googlemail.com}} \seealso{ \code{\link{systemfit}}, \code{\link{vcov}} } \examples{ data( "Kmenta" ) eqDemand <- consump ~ price + income eqSupply <- consump ~ price + farmPrice + trend system <- list( demand = eqDemand, supply = eqSupply ) ## perform OLS on each of the equations in the system fitols <- systemfit( system, data = Kmenta ) ## variance covariance matrix of all coefficients vcov( fitols ) ## variance covariance matrix of the coefficients in the first equation vcov( fitols$eq[[1]] ) ## variance covariance matrix of the coefficients in the second equation vcov( fitols$eq[[2]] ) ## estimation with restriction by modifying the regressor matrix modReg <- matrix( 0, 7, 6 ) colnames( modReg ) <- c( "demIntercept", "demPrice", "demIncome", "supIntercept", "supPrice2", "supTrend" ) modReg[ 1, "demIntercept" ] <- 1 modReg[ 2, "demPrice" ] <- 1 modReg[ 3, "demIncome" ] <- 1 modReg[ 4, "supIntercept" ] <- 1 modReg[ 5, "supPrice2" ] <- 1 modReg[ 6, "supPrice2" ] <- 1 modReg[ 7, "supTrend" ] <- 1 fitsur <- systemfit( system, "SUR", data = Kmenta, restrict.regMat = modReg ) vcov( fitsur, modified.regMat = TRUE ) vcov( fitsur ) } \keyword{models} systemfit/man/KleinI.Rd0000644000176200001440000000427214250574423014531 0ustar liggesusers\name{KleinI} \alias{KleinI} \docType{data} \title{Klein Model I} \description{ Data for Klein's (1950) Model I of the US economy. } \usage{data("KleinI")} \format{ A data frame containing annual observations from 1920 to 1941 \describe{ \item{year}{Year.} \item{consump}{Consumption.} \item{corpProf}{Corporate profits.} \item{corpProfLag}{Corporate profits of the previous year.} \item{privWage}{Private wage bill.} \item{invest}{Investment.} \item{capitalLag}{Capital stock of the previous year.} \item{gnp}{Gross national product.} \item{gnpLag}{Gross national product of the previous year.} \item{govWage}{Government wage bill.} \item{govExp}{Government spending.} \item{taxes}{Taxes.} \item{wages}{Sum of private and government wage bill.} \item{trend}{time trend measured as years from 1931.} } } \source{ Greene (2003), Appendix F, Data Sets Used in Applications, Table F15.1. \url{https://pages.stern.nyu.edu/~wgreene/Text/econometricanalysis.htm} } \references{ Greene, W.H. (2003). \emph{Econometric Analysis}, 5th edition. Prentice Hall, Upper Saddle River (NJ). Klein, L. (1950). \emph{Economic Fluctuations in the United States, 1921--1941}. John Wiley, New York. } \examples{ ## Repeating the estimations of Klein's (1950) Model I ## in Greene (2003, pp. 381 and 412) data( "KleinI" ) eqConsump <- consump ~ corpProf + corpProfLag + wages eqInvest <- invest ~ corpProf + corpProfLag + capitalLag eqPrivWage <- privWage ~ gnp + gnpLag + trend inst <- ~ govExp + taxes + govWage + trend + capitalLag + corpProfLag + gnpLag system <- list( Consumption = eqConsump, Investment = eqInvest, PrivateWages = eqPrivWage ) # OLS kleinOls <- systemfit( system, data = KleinI ) summary( kleinOls ) # 2SLS klein2sls <- systemfit( system, "2SLS", inst = inst, data = KleinI, methodResidCov = "noDfCor" ) summary( klein2sls ) # 3SLS klein3sls <- systemfit( system, "3SLS", inst = inst, data = KleinI, methodResidCov = "noDfCor" ) summary( klein3sls ) # I3SLS kleinI3sls <- systemfit( system, "3SLS", inst = inst, data = KleinI, methodResidCov = "noDfCor", maxit = 500 ) summary( kleinI3sls ) } \keyword{datasets} systemfit/man/residuals.systemfit.Rd0000755000176200001440000000303211216215644017367 0ustar liggesusers\name{residuals.systemfit} \alias{residuals.systemfit} \alias{residuals.systemfit.equation} \title{Residuals of systemfit object} \description{ These functions extract the residuals from an object returned by \code{\link{systemfit}}. } \usage{ \method{residuals}{systemfit}( object, \dots ) \method{residuals}{systemfit.equation}( object, na.rm = FALSE, \dots ) } \arguments{ \item{object}{an object of class \code{systemfit} or \code{systemfit.equation}.} \item{na.rm}{a logical value indicating whether \code{NA} values (corresponding to observations that were not included in the estimation) should be removed from the vector of residuals before it is returned.} \item{\dots}{other arguments.} } \value{ \code{residuals.systemfit} returns a data.frame of residuals, where each column contains the residuals of one equation. \code{residuals.systemfit.equation} returns a vector of residuals. } \author{Arne Henningsen \email{arne.henningsen@googlemail.com}} \seealso{ \code{\link{systemfit}}, \code{\link{residuals}} } \examples{ data( "Kmenta" ) eqDemand <- consump ~ price + income eqSupply <- consump ~ price + farmPrice + trend system <- list( demand = eqDemand, supply = eqSupply ) ## perform OLS on each of the equations in the system fitols <- systemfit( system, data = Kmenta ) ## residuals of all equations residuals( fitols ) ## residuals of the first equation residuals( fitols$eq[[1]] ) ## residuals of the second equation residuals( fitols$eq[[2]] ) } \keyword{models} systemfit/man/systemfit.control.Rd0000644000176200001440000001420612007130346017050 0ustar liggesusers\name{systemfit.control} \alias{systemfit.control} \title{Create list of control parameters for systemfit} \description{ Create a list of control pararameters for function \code{\link{systemfit}}. All control parameters that are not passed to this function are set to default values. } \usage{ systemfit.control( maxiter = 1, tol = 1e-5, methodResidCov = "geomean", centerResiduals = FALSE, residCovRestricted = TRUE, residCovWeighted = FALSE, method3sls = "GLS", singleEqSigma = NULL, useMatrix = TRUE, solvetol = .Machine$double.eps, model = TRUE, x = FALSE, y = FALSE, z = FALSE ) } \arguments{ \item{maxiter}{maximum number of iterations for WLS, SUR, W2SLS and 3SLS estimations.} \item{tol}{tolerance level indicating when to stop the iteration (only WLS, SUR, W2SLS and 3SLS estimations).} \item{methodResidCov}{method for calculating the estimated residual covariance matrix, one of "noDfCor", "geomean", "max", or "Theil" (see details).} \item{centerResiduals}{logical. Subtract the means from the residuals of each equation before calculating the estimated residual covariance matrix.} \item{residCovRestricted}{logical. If 'FALSE' the residual covariance matrix for a WLS, SUR, W2SLS, or 3SLS estimation is obtained from an unrestricted first-step estimation.} \item{residCovWeighted}{logical. If 'TRUE' the residual covariance matrix for a SUR or 3SLS estimation is obtained from a WLS or W2SLS estimation.} \item{method3sls}{method for calculating the 3SLS estimator, one of "GLS", "IV", "GMM", "Schmidt", or "EViews" (see details).} \item{singleEqSigma}{logical. use different \eqn{\sigma^2}s for each single equation to calculate the covariance matrix and the standard errors of the coefficients (only OLS and 2SLS)? If \code{singleEqSigma} is \code{NULL}, it is automatically determined: It is set to \code{TRUE}, if restrictions on the coefficients are imposed, and it is set to \code{FALSE} otherwise.} \item{useMatrix}{logical. Use package \code{Matrix} for matrix calculations?} \item{solvetol}{tolerance level for detecting linear dependencies when inverting a matrix or calculating a determinant (see \code{\link{solve}} and \code{\link{det}}).} \item{model, x, y, z}{ logical. If 'TRUE' the corresponding components of the fit (the model frame, the model matrix, the response, and the matrix of instruments, respectively) are returned.} } \details{ If the estimation is iterated (WLS, SUR, W2SLS or 3SLS estimation with \code{maxiter}>1), the convergence criterion is \deqn{\sqrt{ \frac{ \sum_i (b_{i,g} - b_{i,g-1})^2 }{ \sum_i b_{i,g-1}^2 }} < \code{tol}} (\eqn{b_{i,g}} is the ith coefficient of the gth iteration step). The method for calculating the estimated covariance matrix of the residuals (\eqn{\hat{\Sigma}}) can be one of the following (see Judge et al., 1985, p. 469): \cr if methodResidCov='noDfCor': \deqn{\hat{\sigma}_{ij} = \frac{\hat{e}_i' \hat{e}_j}{T}} if methodResidCov='geomean': \deqn{\hat{\sigma}_{ij} = \frac{\hat{e}_i' \hat{e}_j} {\sqrt{(T - k_i)*(T - k_j)}}} if methodResidCov='Theil': \deqn{\hat{\sigma}_{ij} = \frac{\hat{e}_i' \hat{e}_j}{T - k_i - k_j + tr[X_i(X_i'X_i)^{-1}X_i'X_j(X_j'X_j)^{-1}X_j']}} if methodResidCov='max': \deqn{\hat{\sigma}_{ij} = \frac{\hat{e}_i' \hat{e}_j} {T - \max( k_i, k_j)}} If \eqn{ i = j}, the formulas 'geomean', 'Theil', and 'max' are equal. All these three formulas yield unbiased estimators for the diagonal elements of the residual covariance matrix. If \eqn{i \neq j}, only formula 'Theil' yields an unbiased estimator for the residual covariance matrix, but it is not neccessarily positive semidefinit. Thus, it is doubtful whether formula 'Theil' is really superior to formula 'noDfCor' (Theil, 1971, p. 322). The methods for calculating the 3SLS estimator lead to identical results if the same instruments are used in all equations. If different instruments are used in the different equations, only the GMM-3SLS estimator ("GMM") and the 3SLS estimator proposed by Schmidt (1990) ("Schmidt") are consistent, whereas "GMM" is efficient relative to "Schmidt" (see Schmidt, 1990). If \code{residCovWeighted} is \code{TRUE}, \code{\link{systemfit}} does a OLS or 2SLS estimation in a first step. It uses the residuals from the first-step estimation to calculate the residual covariance matrix that is used in a second-step WLS or W2SLS estimation. Then, it uses the residuals from the second-step estimation to calculate the residual covariance matrix that is used in a final SUR or 3SLS estimation. This three-step method is the default method of command "TSCS" in the software LIMDEP that carries out "SUR" estimations in which all coefficient vectors are constrained to be equal (personal information from W.H. Greene, 2006/02/16). If no cross-equation restrictions are imposed, \code{residCovWeighted} has no effect on the estimation results. } \value{ A list of the above components. } \references{ Judge, George G.; W. E. Griffiths; R. Carter Hill; Helmut Luetkepohl and Tsoung-Chao Lee (1985) \emph{The Theory and Practice of Econometrics, Second Edition}, Wiley. Schmidt, P. (1990) \emph{Three-Stage Least Squares with different Instruments for different equations}, Journal of Econometrics 43, p. 389-394. Theil, H. (1971) \emph{Principles of Econometrics}, Wiley, New York. } \author{ Arne Henningsen \email{arne.henningsen@googlemail.com} } \seealso{\code{\link{systemfit}}} \examples{ data( "Kmenta" ) eqDemand <- consump ~ price + income eqSupply <- consump ~ price + farmPrice + trend eqSystem <- list( demand = eqDemand, supply = eqSupply ) ## SUR estimation: calculation of residual covariance ## matrix without correction for degrees of freedom fitsur <- systemfit( eqSystem, "SUR", data = Kmenta, control = systemfit.control( methodResidCov = "noDfCor" ) ) print( fitsur ) } \keyword{models} \keyword{regression} systemfit/man/print.nlsystemfit.system.Rd0000644000176200001440000000300511063415462020402 0ustar liggesusers % $Id: print.nlsystemfit.system.Rd 153 2006-02-14 14:14:09Z henningsena $ \name{print.nlsystemfit} \alias{print.nlsystemfit.system} \alias{print.nlsystemfit.equation} \title{Print output of nlsystemfit estimation} \description{ These functions print a summary of the estimated equation system. } \usage{ \method{print}{nlsystemfit.system}( x, digits=6, ... ) \method{print}{nlsystemfit.equation}( x, digits=6, ... ) } \arguments{ \item{x}{an object of class \code{nlsystemfit.system} or \code{nlsystemfit.equation}.} \item{digits}{number of digits to print.} \item{...}{not used by user.} } \author{Jeff D. Hamann \email{jeff.hamann@forestinformatics.com}} \seealso{\code{\link{nlsystemfit}}, \code{\link{summary.nlsystemfit.system}} } \examples{ library( systemfit ) data( ppine ) hg.formula <- hg ~ exp( h0 + h1*log(tht) + h2*tht^2 + h3*elev + h4*cr) dg.formula <- dg ~ exp( d0 + d1*log(dbh) + d2*hg + d3*cr + d4*ba ) labels <- list( "height.growth", "diameter.growth" ) inst <- ~ tht + dbh + elev + cr + ba start.values <- c(h0=-0.5, h1=0.5, h2=-0.001, h3=0.0001, h4=0.08, d0=-0.5, d1=0.009, d2=0.25, d3=0.005, d4=-0.02 ) model <- list( hg.formula, dg.formula ) model.ols <- nlsystemfit( "OLS", model, start.values, data=ppine, eqnlabels=labels ) print( model.ols ) model.3sls <- nlsystemfit( "3SLS", model, start.values, data=ppine, eqnlabels=labels, inst=inst ) print( model.3sls ) } \keyword{models} \keyword{regression} \keyword{nonlinear} systemfit/man/systemfit-internal.Rd0000644000176200001440000000103211063415462017202 0ustar liggesusers % $Id: systemfit-internal.Rd 365 2007-06-08 08:23:42Z henningsena $ \name{systemfit-internal} \alias{knls} \title{Internal systemfit functions} \description{ Internal systemfit functions } \usage{ knls( theta, eqns, data, fitmethod="OLS", parmnames, instr=NULL, S=NULL ) } \details{ These functions are no the called by the user. The knls is the driver function that is passed to the nlm call in \code{\link{nlsystemfit}}. } %\seealso{\code{\link{nlm}},\code{\link{qr}}, and \code{\link{systemfit}} } \keyword{internal} systemfit/man/formula.systemfit.Rd0000644000176200001440000000231211216215644017036 0ustar liggesusers\name{formula.systemfit} \alias{formula.systemfit} \alias{formula.systemfit.equation} \title{Model Formulae of systemfit Objects} \description{ This method extracts the model formulae from fitted objects returned by \code{\link{systemfit}}. } \usage{ \method{formula}{systemfit}( x, ... ) \method{formula}{systemfit.equation}( x, ... ) } \arguments{ \item{x}{an object of class \code{systemfit}.} \item{...}{currently not used.} } \value{ \code{formula.systemfit.equation} returns the formula of a single equation of a \code{systemfit} object. \code{formula.systemfit.equation} returns a list of formulae: one formula object for each equation of the \code{systemfit} object. } \author{Arne Henningsen \email{arne.henningsen@googlemail.com}} \seealso{ \code{\link{systemfit}}, \code{\link{formula}} } \examples{ data( "Kmenta" ) eqDemand <- consump ~ price + income eqSupply <- consump ~ price + farmPrice + trend system <- list( demand = eqDemand, supply = eqSupply ) ## perform a SUR estimation fitsur <- systemfit( system, "SUR", data = Kmenta ) ## formula of the second equation formula( fitsur$eq[[2]] ) ## all formulae of the system formula( fitsur ) } \keyword{models} systemfit/man/fitted.systemfit.Rd0000755000176200001440000000303411216215644016655 0ustar liggesusers\name{fitted.systemfit} \alias{fitted.systemfit} \alias{fitted.systemfit.equation} \title{Fitted values} \description{ These functions extract the fitted values from an object returned by \code{\link{systemfit}}. } \usage{ \method{fitted}{systemfit}( object, \dots ) \method{fitted}{systemfit.equation}( object, na.rm = FALSE, \dots ) } \arguments{ \item{object}{an object of class \code{systemfit} or \code{systemfit.equation}.} \item{na.rm}{a logical value indicating whether \code{NA} values (corresponding to observations that were not included in the estimation) should be removed from the vector of fitted values before it is returned.} \item{\dots}{other arguments.} } \value{ \code{fitted.systemfit} returns a data.frame of all fitted values, where each column contains the fitted values of one equation. \code{fitted.systemfit.equation} returns a vector of the fitted values of a single equation. } \author{Arne Henningsen \email{arne.henningsen@googlemail.com}} \seealso{ \code{\link{systemfit}}, \code{\link{fitted}} } \examples{ data( "Kmenta" ) eqDemand <- consump ~ price + income eqSupply <- consump ~ price + farmPrice + trend system <- list( demand = eqDemand, supply = eqSupply ) ## perform OLS on each of the equations in the system fitols <- systemfit( system, data = Kmenta ) ## all fitted values fitted( fitols ) ## fitted values of the first equation fitted( fitols$eq[[1]] ) ## fitted values of the second equation fitted( fitols$eq[[2]] ) } \keyword{models} systemfit/man/createSystemfitModel.Rd0000644000176200001440000000277411216215644017513 0ustar liggesusers\name{createSystemfitModel} \alias{createSystemfitModel} \title{Create a Model for systemfit} \description{ This function creates a model that can be estimated by \code{systemfit}. The data, disturbances, and --- if not provided by the user --- the coefficients as well as the disturbance covariance matrix are generated by random numbers. } \usage{ createSystemfitModel( nEq, nRegEq, nObs, coef = NULL, sigma = NULL ) } \arguments{ \item{nEq}{the number of equations.} \item{nRegEq}{the number of regressors in each equation (without the intercept).} \item{nObs}{the number of observations.} \item{coef}{an optional vector of coefficients.} \item{sigma}{an optional covariance matrix of the disturbance terms.} } \value{ \code{createSystemfitModel} returns a list with following elements: \item{formula}{a list of the model equations (objects of class \code{formula}).} \item{data}{a \code{data.frame} that contains the data.} \item{coef}{a vector of (true) coefficients.} \item{sigma}{the covariance matrix of the disturbance terms.} } \author{Arne Henningsen \email{arne.henningsen@googlemail.com}} \seealso{\code{\link{systemfit}}} \examples{ ## create a model by random numbers systemfitModel <- createSystemfitModel( 3, 4, 100 ) ## estimate this model by "SUR" fitsur <- systemfit( systemfitModel$formula, "SUR", data = systemfitModel$data ) ## compare the "true" and the estimated coefficients cbind( systemfitModel$coef, coef( fitsur ) ) } \keyword{models} systemfit/man/print.confint.systemfit.Rd0000644000176200001440000000230011216215644020161 0ustar liggesusers\name{print.confint.systemfit} \alias{print.confint.systemfit} \title{Print confidence intervals of coefficients} \description{ This function prints the confidence intervals of the coefficients of the estimated equation system. } \usage{ \method{print}{confint.systemfit}( x, digits=3, \dots ) } \arguments{ \item{x}{an object of type \code{confint.systemfit}.} \item{digits}{number of digits to print.} \item{\dots}{other arguments.} } \author{Arne Henningsen \email{arne.henningsen@googlemail.com}} \seealso{\code{\link{systemfit}}, \code{\link{confint.systemfit}} and \code{\link{confint.systemfit.equation}}} \examples{ data( "Kmenta" ) eqDemand <- consump ~ price + income eqSupply <- consump ~ price + farmPrice + trend system <- list( demand = eqDemand, supply = eqSupply ) ## perform OLS on each of the equations in the system fitols <- systemfit( system, data = Kmenta ) ## calculate and print the confidence intervals ## of all coefficients ci <- confint( fitols ) print( ci, digits=4 ) ## calculate and print the confidence intervals ## of the coefficients of the second equation ci2 <- confint( fitols$eq[[2]] ) print( ci2, digits=4 ) } \keyword{models} \keyword{regression} systemfit/man/estfun.systemfit.Rd0000644000176200001440000001017314406572315016706 0ustar liggesusers\name{estfun.systemfit} \alias{estfun.systemfit} \title{Extract Gradients of the Objective Function at each Observation} \description{ Extract the gradients of the objective function with respect to the coefficients evaluated at each observation (\sQuote{Empirical Estimating Function}, see \code{\link[sandwich]{estfun}}). } \usage{ \method{estfun}{systemfit}( x, residFit = TRUE, ... ) } \arguments{ \item{x}{an object of class \code{systemfit}.} \item{residFit}{logical. If \code{FALSE}, the residuals are calculated based on observed regressors. If \code{TRUE}, the residuals are calculated based on fitted regressors. This argument is ignored if no instrumental variable are used.} \item{\dots}{further arguments (currently ignored).} } \value{ Matrix of gradients of the objective function with respect to the coefficients evaluated at each observation. } \section{Warnings}{ The \pkg{sandwich} package must be loaded before this method can be used. In specific estimations with the 3SLS method, not all columns of the matrix returned by the \code{estfun} method sum up to zero, which indicates that an inappropriate estimating function is returned. This can be either with argument \code{residFit} set to \code{TRUE} or with this argument set to \code{FALSE} or even in both cases. This problem depends on the formula used for the 3SLS estimation and seems to be related to unbalanced systems and systems where different instruments are used in different equations. } \author{ Arne Henningsen } \seealso{\code{\link[sandwich]{estfun}}, \code{\link{systemfit}}.} \examples{ data( "Kmenta" ) eqDemand <- consump ~ price + income eqSupply <- consump ~ price + farmPrice + trend system <- list( demand = eqDemand, supply = eqSupply ) inst <- ~ income + farmPrice + trend ## OLS estimation fitols <- systemfit( system, "OLS", data = Kmenta ) ## obtain the estimation function library( "sandwich" ) estfun( fitols ) ## this is only true for OLS models all.equal( estfun( fitols ), unlist( residuals( fitols ) ) * model.matrix( fitols ) ) # each column should sum up to (approximately) zero colSums( estfun( fitols ) ) ## 2SLS estimation fit2sls <- systemfit( system, "2SLS", inst = inst, data = Kmenta ) ## obtain the estimation function estfun( fit2sls ) ## this is only true for 2SLS models all.equal( estfun( fit2sls ), drop( rep( Kmenta$consump, 2 ) - model.matrix( fit2sls, which = "xHat" ) \%*\% coef( fit2sls ) ) * model.matrix( fit2sls, which = "xHat" ) ) all.equal( estfun( fit2sls, residFit = FALSE ), unlist( residuals( fit2sls ) ) * model.matrix( fit2sls, which = "xHat" ) ) # each column should sum up to (approximately) zero colSums( estfun( fit2sls ) ) colSums( estfun( fit2sls, residFit = FALSE ) ) ## iterated SUR estimation fitsur <- systemfit( system, "SUR", data = Kmenta, maxit = 100 ) ## obtain the estimation function estfun( fitsur ) ## this should be true for SUR and WLS models all.equal( estfun( fitsur ), unlist( residuals( fitsur ) ) * ( ( solve( fitsur$residCovEst ) \%x\% diag( nrow( Kmenta ) ) ) \%*\% model.matrix( fitsur ) ), check.attributes = FALSE ) # each column should sum up to (approximately) zero colSums( estfun( fitsur ) ) ## 3SLS estimation fit3sls <- systemfit( system, "3SLS", inst = inst, data = Kmenta ) ## obtain the estimation function estfun( fit3sls ) estfun( fit3sls, residFit = FALSE ) ## this should be true for 3SLS and W2SLS models all.equal( estfun( fit3sls ), drop( rep( Kmenta$consump, 2 ) - model.matrix( fit2sls, which = "xHat" ) \%*\% coef( fit3sls ) ) * ( ( solve( fit3sls$residCovEst ) \%x\% diag( nrow( Kmenta ) ) ) \%*\% model.matrix( fit3sls, which = "xHat" ) ), check.attributes = FALSE ) all.equal( estfun( fit3sls, residFit = FALSE ), unlist( residuals( fit3sls ) ) * ( ( solve( fit3sls$residCovEst ) \%x\% diag( nrow( Kmenta ) ) ) \%*\% model.matrix( fit3sls, which = "xHat" ) ), check.attributes = FALSE ) # each column should sum up to (approximately) zero colSums( estfun( fit3sls ) ) colSums( estfun( fit3sls, residFit = FALSE ) ) } \keyword{methods} systemfit/man/se.ratio.systemfit.Rd0000644000176200001440000000367611063415462017133 0ustar liggesusers % $Id: se.ratio.systemfit.Rd 437 2007-06-30 07:44:12Z henningsena $ \name{se.ratio.systemfit} \alias{se.ratio.systemfit} \title{Ratio of the Standard Errors} \description{ \code{se.ratio.systemfit} returns a vector of the ratios of the standard errors of the predictions for two equations. } \usage{ se.ratio.systemfit( resultsi, resultsj, eqni ) } \arguments{ \item{resultsi}{an object of type \code{systemfit}.} \item{resultsj}{an object of type \code{systemfit}.} \item{eqni}{index for equation to obtain the ratio of standard errors.} } \value{ \code{se.ratio} returns a vector of the standard errors of the ratios for the predictions between the predicted values in equation i and equation j. } \references{ Hasenauer, H; Monserud, R and T. Gregoire. (1998) Using Simultaneous Regression Techniques with Individual-Tree Growth Models. \emph{Forest Science}. 44(1):87-95 } \author{Jeff D. Hamann \email{jeff.hamann@forestinformatics.com}} \seealso{\code{\link{systemfit}} and \code{\link{correlation.systemfit}}} \examples{ data( "Kmenta" ) eqDemand <- consump ~ price + income eqSupply <- consump ~ price + farmPrice + trend inst <- ~ income + farmPrice + trend system <- list( demand = eqDemand, supply = eqSupply ) ## perform 2SLS on each of the equations in the system fit2sls <- systemfit( system, "2SLS", inst = inst, data = Kmenta ) fit3sls <- systemfit( system, "3SLS", inst = inst, data = Kmenta ) ## print the results from the fits print( fit2sls ) print( fit3sls ) print( "covariance of residuals used for estimation (from 2sls)" ) print( fit3sls$residCovEst ) print( "covariance of residuals" ) print( fit3sls$residCov ) ## examine the improvement of 3SLS over 2SLS by computing ## the ratio of the standard errors of the estimates improve.ratio <- se.ratio.systemfit( fit2sls, fit3sls, 2 ) print( "summary values for the ratio in the std. err. for the predictions" ) print( summary( improve.ratio ) ) } \keyword{models} systemfit/man/bread.systemfit.Rd0000644000176200001440000000465114406572247016467 0ustar liggesusers\name{bread.systemfit} \alias{bread.systemfit} \title{Bread for Sandwiches} \description{ Extract the estimator for the bread of sandwhiches (see \code{\link[sandwich]{bread}}). } \usage{ \method{bread}{systemfit}( x, ... ) } \arguments{ \item{x}{an object of class \code{systemfit}.} \item{\dots}{further arguments (currently ignored).} } \value{ Quadratic symmetric matrix, which is an estimator for the expectation of the negative derivative of the estimating function (see \code{\link{estfun.systemfit}}). } \section{Warnings}{ The \pkg{sandwich} package must be loaded before this method can be used. This method might not be suitable for specific formulas for 3SLS estimations in case of unbalanced systems or different instruments for different equations. } \author{ Arne Henningsen } \seealso{\code{\link[sandwich]{bread}}, \code{\link{systemfit}}.} \examples{ data( "Kmenta" ) eqDemand <- consump ~ price + income eqSupply <- consump ~ price + farmPrice + trend system <- list( demand = eqDemand, supply = eqSupply ) inst <- ~ income + farmPrice + trend ## OLS estimation fitols <- systemfit( system, "OLS", data = Kmenta ) ## obtain the bread library( "sandwich" ) bread( fitols ) ## this is only true for OLS models all.equal( bread( fitols ), solve( crossprod( model.matrix( fitols ) ) / 40 ) ) ## 2SLS estimation fit2sls <- systemfit( system, "2SLS", inst = inst, data = Kmenta ) ## obtain the bread bread( fit2sls ) ## this is only true for 2SLS models all.equal( bread( fit2sls ), solve( crossprod( model.matrix( fit2sls, which = "xHat" ) ) / 40 ) ) ## iterated SUR estimation fitsur <- systemfit( system, "SUR", data = Kmenta, maxit = 100 ) ## obtain the bread bread( fitsur ) ## this should be true for SUR and WLS models all.equal( bread( fitsur ), solve( t( model.matrix( fitsur ) ) \%*\% ( ( solve( fitsur$residCovEst ) \%x\% diag( nrow( Kmenta ) ) ) \%*\% model.matrix( fitsur ) ) / 40 ), check.attributes = FALSE ) ## 3SLS estimation fit3sls <- systemfit( system, "3SLS", inst = inst, data = Kmenta ) ## obtain the bread bread( fit3sls ) ## this should be true for 3SLS and W2SLS models all.equal( bread( fit3sls ), solve( t( model.matrix( fit3sls, which = "xHat" ) ) \%*\% ( ( solve( fit3sls$residCovEst ) \%x\% diag( nrow( Kmenta ) ) ) \%*\% model.matrix( fit3sls, which = "xHat" ) ) / 40 ), check.attributes = FALSE ) } \keyword{methods} systemfit/man/Kmenta.Rd0000644000176200001440000000342611063415462014571 0ustar liggesusers % $Id: Kmenta.Rd 486 2007-10-10 07:58:53Z henningsena $ \name{Kmenta} \alias{Kmenta} \docType{data} \title{Partly Artificial Data on the U. S. Economy} \description{ These are partly contrived data from Kmenta (1986), constructed to illustrate estimation of a simultaneous-equation model. } \usage{ data("Kmenta") } \format{ This data frame contains 20 annual observations of 5 variables: \describe{ \item{consump}{food consumption per capita.} \item{price}{ratio of food prices to general consumer prices.} \item{income}{disposable income in constant dollars.} \item{farmPrice}{ratio of preceding year's prices received by farmers to general consumer prices.} \item{trend}{time trend in years.} } } \details{ The exogenous variables \code{income}, \code{farmPrice}, and \code{trend} are based on real data; the endogenous variables \code{price} and \code{consump} were generated by simulation. } \source{ Kmenta (1986), Table 13-1, p. 687. } \references{ Kmenta, J. (1986). \emph{Elements of Econometrics}, Second Edition, Macmillan, New York. } \examples{ ## Replicating the estimations in Kmenta (1986), p. 712, Tab 13-2 data( "Kmenta" ) eqDemand <- consump ~ price + income eqSupply <- consump ~ price + farmPrice + trend inst <- ~ income + farmPrice + trend system <- list( demand = eqDemand, supply = eqSupply ) ## OLS estimation fitOls <- systemfit( system, data = Kmenta ) summary( fitOls ) ## 2SLS estimation fit2sls <- systemfit( system, "2SLS", inst = inst, data = Kmenta ) summary( fit2sls ) ## 3SLS estimation fit3sls <- systemfit( system, "3SLS", inst = inst, data = Kmenta ) summary( fit3sls ) ## I3LS estimation fitI3sls <- systemfit( system, "3SLS", inst = inst, data = Kmenta, maxit = 250 ) summary( fitI3sls ) } \keyword{datasets} systemfit/man/predict.systemfit.Rd0000755000176200001440000000715011216215644017033 0ustar liggesusers\name{predict.systemfit} \alias{predict.systemfit} \alias{predict.systemfit.equation} \title{Predictions from System Estimation} \description{ Returns the predicted values, their standard errors and the confidence limits of prediction. } \usage{ \method{predict}{systemfit}( object, newdata = NULL, se.fit = FALSE, se.pred = FALSE, interval = "none", level=0.95, useDfSys = NULL, ... ) \method{predict}{systemfit.equation}( object, newdata = NULL, se.fit = FALSE, se.pred = FALSE, interval = "none", level=0.95, useDfSys = NULL, ... ) } \arguments{ \item{object}{an object of class \code{systemfit} or \code{systemfit.equation}.} \item{newdata}{An optional data frame in which to look for variables with which to predict. If it is \code{NULL}, the fitted values are returned.} \item{se.fit}{return the standard error of the fitted values?} \item{se.pred}{return the standard error of prediction?} \item{interval}{Type of interval calculation ("none", "confidence" or "prediction")} \item{level}{Tolerance/confidence level.} \item{useDfSys}{logical. Use the degrees of freedom of the whole system (in place of the degrees of freedom of the single equation) to calculate the confidence or prediction intervals. If it not specified (\code{NULL}), it is set to \code{TRUE} if restrictions on the coefficients are imposed and \code{FALSE} otherwise.} \item{...}{additional optional arguments.} } \details{ The variance of the fitted values (used to calculate the standard errors of the fitted values and the "confidence interval") is calculated by \eqn{Var[E[y^0]-\hat{y}^0]=x^0 \; Var[b] \; {x^0}'}\cr The variances of the predicted values (used to calculate the standard errors of the predicted values and the "prediction intervals") is calculated by \eqn{Var[y^0-\hat{y}^0]=\hat{\sigma}^2+x^0 \; Var[b] \; {x^0}'} } \value{ \code{predict.systemfit} returns a dataframe that contains for each equation the predicted values (".pred") and if requested the standard errors of the fitted values (".se.fit"), the standard errors of the prediction (".se.pred"), and the lower (".lwr") and upper (".upr") limits of the confidence or prediction interval(s). \code{predict.systemfit.equation} returns a dataframe that contains the predicted values ("fit") and if requested the standard errors of the fitted values ("se.fit"), the standard errors of the prediction ("se.pred"), and the lower ("lwr") and upper ("upr") limits of the confidence or prediction interval(s). } \references{ Greene, W. H. (2003) \emph{Econometric Analysis, Fifth Edition}, Macmillan. Gujarati, D. N. (1995) \emph{Basic Econometrics, Third Edition}, McGraw-Hill. Kmenta, J. (1997) \emph{Elements of Econometrics, Second Edition}, University of Michigan Publishing. } \author{Arne Henningsen \email{arne.henningsen@googlemail.com}} \seealso{ \code{\link{systemfit}}, \code{\link{predict}} } \examples{ data( "Kmenta" ) eqDemand <- consump ~ price + income eqSupply <- consump ~ price + farmPrice + trend system <- list( demand = eqDemand, supply = eqSupply ) ## OLS estimation fitols <- systemfit( system, data=Kmenta ) ## predicted values and limits predict( fitols ) ## predicted values of the first equation predict( fitols$eq[[1]] ) ## predicted values of the second equation predict( fitols$eq[[2]] ) } \keyword{models} systemfit/man/hausman.systemfit.Rd0000644000176200001440000000536711216215644017042 0ustar liggesusers % $Id: hausman.systemfit.Rd 986 2008-10-16 07:57:24Z arne $ \name{hausman.systemfit} \alias{hausman.systemfit} \title{Hausman Test} \description{ \code{hausman.systemfit} returns the Hausman statistic for a specification test. } \usage{ hausman.systemfit( results2sls, results3sls ) } \arguments{ \item{ results2sls }{result of a \emph{2SLS} (limited information) estimation returned by \code{\link{systemfit}}.} \item{ results3sls }{result of a \emph{3SLS} (full information) estimation returned by \code{\link{systemfit}}.} } \details{ The null hypotheses of the test is that all exogenous variables are uncorrelated with all disturbance terms. Under this hypothesis both the 2SLS and the 3SLS estimator are consistent but only the 3SLS estimator is (asymptotically) efficient. Under the alternative hypothesis the 2SLS estimator is consistent but the 3SLS estimator is inconsistent. The Hausman test statistic is \deqn{m = ( b_2 - b_3 )' ( V_2 - V_3 ) ( b_2 - b_3 ) } where $b_2$ and $V_2$ are the estimated coefficients and their variance covariance matrix of a \emph{2SLS} estimation and $b_3$ and $V_3$ are the estimated coefficients and their variance covariance matrix of a \emph{3SLS} estimation. } \value{ \code{hausman.systemfit} returns a list of the class \code{htest} that contains following elements: \item{q}{vector of the differences between the estimated coefficients.} \item{qVar}{variance covariance matrix of \code{q} (difference between the variance covariance matrices of the estimated coefficients).} \item{statistic}{the Hausman test statistic.} \item{parameter}{degrees of freedom.} \item{p.value}{P-value of the test.} \item{method}{character string describing this test.} \item{data.name}{name of the data.frame used for estimation.} } \references{ Greene, W. H. (1993) \emph{Econometric Analysis, Fifth Edition}, Macmillan. Hausman, J. A. (1978) Specification Tests in Econometrics. \emph{Econometrica}. 46:1251-1271. Kmenta, J. (1997) \emph{Elements of Econometrics, Second Edition}, University of Michigan Publishing } \author{Jeff D. Hamann \email{jeff.hamann@forestinformatics.com},\cr Arne Henningsen \email{arne.henningsen@googlemail.com} } \seealso{\code{\link{systemfit}}} \examples{ data( "Kmenta" ) eqDemand <- consump ~ price + income eqSupply <- consump ~ price + farmPrice + trend inst <- ~ income + farmPrice + trend system <- list( demand = eqDemand, supply = eqSupply ) ## perform the estimations fit2sls <- systemfit( system, "2SLS", inst = inst, data = Kmenta ) fit3sls <- systemfit( system, "3SLS", inst = inst, data = Kmenta ) ## perform the Hausman test h <- hausman.systemfit( fit2sls, fit3sls ) print( h ) } \keyword{models} systemfit/man/linear.hypothesis.systemfit.Rd0000644000176200001440000001202511430757761021054 0ustar liggesusers\name{linearHypothesis.systemfit} \alias{linearHypothesis.systemfit} \title{Test Linear Hypothesis} \description{ Testing linear hypothesis on the coefficients of a system of equations by an F-test or Wald-test. } \usage{ \method{linearHypothesis}{systemfit}( model, hypothesis.matrix, rhs = NULL, test = c( "FT", "F", "Chisq" ), vcov. = NULL, ... ) } \arguments{ \item{model}{a fitted object of type \code{systemfit}.} \item{hypothesis.matrix}{matrix (or vector) giving linear combinations of coefficients by rows, or a character vector giving the hypothesis in symbolic form (see documentation of \code{\link[car]{linearHypothesis}} in package "car" for details).} \item{rhs}{optional right-hand-side vector for hypothesis, with as many entries as rows in the hypothesis matrix; if omitted, it defaults to a vector of zeroes.} \item{test}{character string, "\code{FT}", "\code{F}", or "\code{Chisq}", specifying whether to compute Theil's finite-sample F test (with approximate F distribution), the finite-sample Wald test (with approximate F distribution), or the large-sample Wald test (with asymptotic Chi-squared distribution).} \item{vcov.}{a function for estimating the covariance matrix of the regression coefficients or an estimated covariance matrix (function \code{vcov} is used by default).} \item{\dots}{further arguments passed to \code{\link[car]{linearHypothesis.default}} (package "car").} } \details{ Theil's \eqn{F} statistic for sytems of equations is \deqn{F = \frac{ ( R \hat{b} - q )' ( R ( X' ( \Sigma \otimes I )^{-1} X )^{-1} R' )^{-1} ( R \hat{b} - q ) / j }{ \hat{e}' ( \Sigma \otimes I )^{-1} \hat{e} / ( M \cdot T - K ) } } where \eqn{j} is the number of restrictions, \eqn{M} is the number of equations, \eqn{T} is the number of observations per equation, \eqn{K} is the total number of estimated coefficients, and \eqn{\Sigma} is the estimated residual covariance matrix. Under the null hypothesis, \eqn{F} has an approximate \eqn{F} distribution with \eqn{j} and \eqn{M \cdot T - K} degrees of freedom (Theil, 1971, p. 314). The \eqn{F} statistic for a Wald test is \deqn{ F = \frac{ ( R \hat{b} - q )' ( R \, \widehat{Cov} [ \hat{b} ] R' )^{-1} ( R \hat{b} - q ) }{ j } } Under the null hypothesis, \eqn{F} has an approximate \eqn{F} distribution with \eqn{j} and \eqn{M \cdot T - K} degrees of freedom (Greene, 2003, p. 346). The \eqn{\chi^2} statistic for a Wald test is \deqn{ W = ( R \hat{b} - q )' ( R \widehat{Cov} [ \hat{b} ] R' )^{-1} ( R \hat{b} - q ) } Asymptotically, \eqn{W} has a \eqn{\chi^2} distribution with \eqn{j} degrees of freedom under the null hypothesis (Greene, 2003, p. 347). } \value{ An object of class \code{anova}, which contains the residual degrees of freedom in the model, the difference in degrees of freedom, the test statistic (either F or Wald/Chisq) and the corresponding p value. See documentation of \code{\link[car]{linearHypothesis}} in package "car". } \references{ Greene, W. H. (2003) \emph{Econometric Analysis, Fifth Edition}, Prentice Hall. Theil, Henri (1971) \emph{Principles of Econometrics}, John Wiley & Sons, New York. } \author{Arne Henningsen \email{arne.henningsen@googlemail.com}} \seealso{\code{\link{systemfit}}, \code{\link[car]{linearHypothesis}} (package "car"), \code{\link{lrtest.systemfit}}} \examples{ data( "Kmenta" ) eqDemand <- consump ~ price + income eqSupply <- consump ~ price + farmPrice + trend system <- list( demand = eqDemand, supply = eqSupply ) ## unconstrained SUR estimation fitsur <- systemfit( system, method = "SUR", data=Kmenta ) # create hypothesis matrix to test whether beta_2 = \beta_6 R1 <- matrix( 0, nrow = 1, ncol = 7 ) R1[ 1, 2 ] <- 1 R1[ 1, 6 ] <- -1 # the same hypothesis in symbolic form restrict1 <- "demand_price - supply_farmPrice = 0" ## perform Theil's F test linearHypothesis( fitsur, R1 ) # rejected linearHypothesis( fitsur, restrict1 ) ## perform Wald test with F statistic linearHypothesis( fitsur, R1, test = "F" ) # rejected linearHypothesis( fitsur, restrict1 ) ## perform Wald-test with chi^2 statistic linearHypothesis( fitsur, R1, test = "Chisq" ) # rejected linearHypothesis( fitsur, restrict1, test = "Chisq" ) # create hypothesis matrix to test whether beta_2 = - \beta_6 R2 <- matrix( 0, nrow = 1, ncol = 7 ) R2[ 1, 2 ] <- 1 R2[ 1, 6 ] <- 1 # the same hypothesis in symbolic form restrict2 <- "demand_price + supply_farmPrice = 0" ## perform Theil's F test linearHypothesis( fitsur, R2 ) # accepted linearHypothesis( fitsur, restrict2 ) ## perform Wald test with F statistic linearHypothesis( fitsur, R2, test = "F" ) # accepted linearHypothesis( fitsur, restrict2 ) ## perform Wald-test with chi^2 statistic linearHypothesis( fitsur, R2, test = "Chisq" ) # accepted linearHypothesis( fitsur, restrict2, test = "Chisq" ) } \keyword{models} systemfit/man/systemfit.Rd0000644000176200001440000003310114254022375015374 0ustar liggesusers % $Id: systemfit.Rd 1171 2022-06-20 07:42:53Z arne $ \name{systemfit} \alias{systemfit} \title{Linear Equation System Estimation} \description{ Fits a set of linear structural equations using Ordinary Least Squares (OLS), Weighted Least Squares (WLS), Seemingly Unrelated Regression (SUR), Two-Stage Least Squares (2SLS), Weighted Two-Stage Least Squares (W2SLS) or Three-Stage Least Squares (3SLS). } \usage{ systemfit( formula, method = "OLS", inst=NULL, data=list(), restrict.matrix = NULL, restrict.rhs = NULL, restrict.regMat = NULL, pooled = FALSE, control = systemfit.control( ... ), ... ) } \arguments{ \item{formula}{an object of class \code{formula} (for single-equation models) or (typically) a list of objects of class \code{formula} (for multiple-equation models); if argument \code{data} is of class \code{pdata.frame} (created with \code{pdata.frame()}), this argument must be a single object of class \code{formula} that represents the formula to be estimated for all individuals.} \item{method}{the estimation method, one of "OLS", "WLS", "SUR", "2SLS", "W2SLS", or "3SLS" (see details); iterated estimation methods can be specified by setting control parameter \code{maxiter} larger than 1 (e.g. 500).} \item{inst}{one-sided model formula specifying the instrumental variables (including exogenous explanatory variables) or a list of one-sided model formulas if different instruments should be used for the different equations (only needed for 2SLS, W2SLS, and 3SLS estimations).} \item{data}{an optional data frame containing the variables in the model. By default the variables are taken from the environment from which systemfit is called.} \item{restrict.matrix}{an optional j x k matrix to impose linear restrictions on the coefficients by \code{restrict.matrix} * \eqn{b} = \code{restrict.rhs} (j = number of restrictions, k = number of all coefficients, \eqn{b} = vector of all coefficients) or a character vector giving the restrictions in symbolic form (see documentation of \code{\link[car]{linearHypothesis}} in package "car" for details). The number and the names of the coefficients can be obtained by estimating the system without restrictions and applying the \code{coef} method to the returned object.} \item{restrict.rhs}{an optional vector with j elements to impose linear restrictions (see \code{restrict.matrix}); default is a vector that contains j zeros.} \item{restrict.regMat}{an optional matrix to impose restrictions on the coefficients by post-multiplying the regressor matrix with this matrix (see details).} \item{control}{list of control parameters. The default is constructed by the function \code{\link{systemfit.control}}. See the documentation of \code{\link{systemfit.control}} for details.} \item{pooled}{logical, restrict coefficients to be equal in all equations (only for panel-like data).} \item{...}{arguments passed to \code{\link{systemfit.control}}.} } \details{ The estimation of systems of equations with unequal numbers of observations has not been thoroughly tested yet. Currently, \code{systemfit} calculates the residual covariance matrix only from the residuals/observations that are available in all equations. If argument \code{data} is of class \code{pdata.frame} (created with \code{pdata.frame()} and thus, contains panel data in long format), argument \code{formula} must be a single equation that is applied to all individuals. In this case, argument \code{pooled} specifies whether the coefficients are restricted to be equal for all individuals. If argument \code{restrict.regMat} is specified, the regressor matrix \eqn{X} is post-multiplied by this matrix: \eqn{X^{*} = X \cdot} \code{restrict.regMat}. Then, this modified regressor matrix \eqn{X^{*}} is used for the estimation of the coefficient vector \eqn{b^{*}}. This means that the coefficients of the original regressors (\eqn{X}), vector \eqn{b}, can be represented by \eqn{b =} \code{restrict.regMat} \eqn{\cdot b^{*}}. If \code{restrict.regMat} is a non-singular quadratic matrix, there are no restrictions on the coefficients imposed, but the coefficients \eqn{b^{*}} are linear combinations of the original coefficients \eqn{b}. If \code{restrict.regMat} has less columns than rows, linear restrictions are imposed on the coefficients \eqn{b}. However, imposing linear restrictions by the \code{restrict.regMat} matrix is less flexible than by providing the matrix \code{restrict.matrix} and the vector \code{restrict.rhs}. The advantage of imposing restrictions on the coefficients by the matrix \code{restrict.regMat} is that the matrix, which has to be inverted during the estimation, gets smaller by this procedure, while it gets larger if the restrictions are imposed by \code{restrict.matrix} and \code{restrict.rhs}. In the context of multi-equation models, the term \dQuote{weighted} in \dQuote{weighted least squares} (WLS) and \dQuote{weighted two-stage least squares} (W2SLS) means that the \emph{equations} might have different weights and \emph{not} that the \emph{observations} have different weights. It is important to realize the limitations on estimating the residuals covariance matrix imposed by the number of observations \eqn{T} in each equation. With \eqn{g} equations we estimate \eqn{g*(g+1)/2} elements using \eqn{T*g} observations total. Beck and Katz (1995,1993) discuss the issue and the resulting overconfidence when the ratio of \eqn{T/g} is small (e.g. 3). Even for \eqn{T/g=5} the estimate is unstable both numerically and statistically and the 95% confidence region of the estimate of the variance is approximately \eqn{[0.5*\sigma^2, 3*\sigma^2]}{[0.5*s^2, 3*s^2]}, which is inadequate precision if the covariance matrix will be used for simulation of asset return paths either for investment or risk management decisions. For a starter on models with large cross-sections see Reichlin (2002). [This paragraph has been provided by Stephen C. Bond -- Thanks!] } \value{ \code{systemfit} returns a list of the class \code{systemfit} and contains all results that belong to the whole system. This list contains one special object: "eq". It is a list and contains one object for each estimated equation. These objects are of the class \code{systemfit.equation} and contain the results that belong only to the regarding equation. The objects of the class \code{systemfit} and \code{systemfit.equation} have the following components (the elements of the latter are marked with an asterisk (\eqn{*})): \item{call}{the matched call.} \item{method}{estimation method.} \item{rank}{total number of linear independent coefficients = number of coefficients minus number of linear restrictions.} \item{df.residual}{degrees of freedom of the whole system.} \item{iter}{number of iteration steps.} \item{coefficients}{vector of all estimated coefficients.} \item{coefCov}{estimated covariance matrix of \code{coefficients}.} \item{residCov}{estimated residual covariance matrix.} \item{residCovEst}{residual covariance matrix used for estimation (only WLS, W2SLS, SUR and 3SLS).} \item{restrict.matrix}{the restriction matrix.} \item{restrict.rhs}{the restriction vector.} \item{restrict.regMat}{matrix used to impose restrictions on the coefficients by post-multiplying the regressor matrix with this matrix.} \item{control}{list of control parameters used for the estimation.} \item{panelLike}{logical. Was this an analysis with panel-like data?} ## elements of the class systemfit.eq \item{eq}{a list that contains the results that belong to the individual equations.} \item{eqnLabel*}{the label of this equation.} \item{eqnNo*}{the number of this equation.} \item{terms*}{the 'terms' object used for the ith equation.} \item{inst*}{instruments of the ith equation (only 2SLS, W2SLS, and 3SLS).} \item{termsInst*}{the 'terms' object of the instruments used for the ith equation (only 2SLS, W2SLS, and 3SLS).} \item{rank*}{number of linear independent coefficients in the ith equation (differs from the number of coefficients only if there are restrictions that are not cross-equation).} \item{nCoef.sys*}{total number of coefficients in all equations.} \item{rank.sys*}{total number of linear independent coefficients in all equations.} \item{df.residual*}{degrees of freedom of the ith equation.} \item{df.residual.sys*}{degrees of freedom of the whole system.} \item{coefficients*}{estimated coefficients of the ith equation.} \item{covb*}{estimated covariance matrix of \code{coefficients}.} \item{model*}{if requested (the default), the model frame of the ith equation.} \item{modelInst*}{if requested (the default), the model frame of the instrumental variables of the ith equation (only 2SLS, W2SLS, and 3SLS).} \item{x*}{if requested, the model matrix of the ith equation.} \item{y*}{if requested, the response of the ith equation.} \item{z*}{if requested, the matrix of instrumental variables of the ith equation (only 2SLS, W2SLS, and 3SLS).} \item{fitted.values*}{vector of fitted values of the ith equation.} \item{residuals*}{vector of residuals of the ith equation.} } \references{ Beck, N.; J.N. Katz (1995) What to do (and not to do) with Time-Series Cross-Section Data, \emph{The American Political Science Review}, 89, pp. 634-647. Beck, N.; J.N. Katz; M.R. Alvarez; G. Garrett; P. Lange (1993) Government Partisanship, Labor Organization, and Macroeconomic Performance: a Corrigendum, \emph{American Political Science Review}, 87, pp. 945-48. Greene, W. H. (2003) \emph{Econometric Analysis, Fifth Edition}, Prentice Hall. Judge, George G.; W. E. Griffiths; R. Carter Hill; Helmut Luetkepohl and Tsoung-Chao Lee (1985) \emph{The Theory and Practice of Econometrics, Second Edition}, Wiley. Kmenta, J. (1997) \emph{Elements of Econometrics, Second Edition}, University of Michigan Publishing. Reichlin, L. (2002) \emph{Factor models in large cross-sections of time series}, Working Paper, ECARES and CEPR. Schmidt, P. (1990) \emph{Three-Stage Least Squares with different Instruments for different equations}, Journal of Econometrics 43, p. 389-394. Theil, H. (1971) \emph{Principles of Econometrics}, Wiley, New York. } \author{Arne Henningsen \email{arne.henningsen@googlemail.com},\cr Jeff D. Hamann \email{jeff.hamann@forestinformatics.com} } \seealso{\code{\link{lm}} and \code{\link{nlsystemfit}}} \examples{ data( "Kmenta" ) eqDemand <- consump ~ price + income eqSupply <- consump ~ price + farmPrice + trend system <- list( demand = eqDemand, supply = eqSupply ) ## OLS estimation fitols <- systemfit( system, data=Kmenta ) print( fitols ) ## OLS estimation with 2 restrictions Rrestr <- matrix(0,2,7) Rrestr[1,3] <- 1 Rrestr[1,7] <- -1 Rrestr[2,2] <- -1 Rrestr[2,5] <- 1 qrestr <- c( 0, 0.5 ) fitols2 <- systemfit( system, data = Kmenta, restrict.matrix = Rrestr, restrict.rhs = qrestr ) print( fitols2 ) ## OLS estimation with the same 2 restrictions in symbolic form restrict <- c( "demand_income - supply_trend = 0", "- demand_price + supply_price = 0.5" ) fitols2b <- systemfit( system, data = Kmenta, restrict.matrix = restrict ) print( fitols2b ) # test whether both restricted estimators are identical all.equal( coef( fitols2 ), coef( fitols2b ) ) ## OLS with restrictions on the coefficients by modifying the regressor matrix ## with argument restrict.regMat modReg <- matrix( 0, 7, 6 ) colnames( modReg ) <- c( "demIntercept", "demPrice", "demIncome", "supIntercept", "supPrice2", "supTrend" ) modReg[ 1, "demIntercept" ] <- 1 modReg[ 2, "demPrice" ] <- 1 modReg[ 3, "demIncome" ] <- 1 modReg[ 4, "supIntercept" ] <- 1 modReg[ 5, "supPrice2" ] <- 1 modReg[ 6, "supPrice2" ] <- 1 modReg[ 7, "supTrend" ] <- 1 fitols3 <- systemfit( system, data = Kmenta, restrict.regMat = modReg ) print( fitols3 ) ## iterated SUR estimation fitsur <- systemfit( system, "SUR", data = Kmenta, maxit = 100 ) print( fitsur ) ## 2SLS estimation inst <- ~ income + farmPrice + trend fit2sls <- systemfit( system, "2SLS", inst = inst, data = Kmenta ) print( fit2sls ) ## 2SLS estimation with different instruments in each equation inst1 <- ~ income + farmPrice inst2 <- ~ income + farmPrice + trend instlist <- list( inst1, inst2 ) fit2sls2 <- systemfit( system, "2SLS", inst = instlist, data = Kmenta ) print( fit2sls2 ) ## 3SLS estimation with GMM-3SLS formula inst <- ~ income + farmPrice + trend fit3sls <- systemfit( system, "3SLS", inst = inst, data = Kmenta, method3sls = "GMM" ) print( fit3sls ) ## Examples how to use systemfit() with panel-like data ## Repeating the SUR estimations in Greene (2003, p. 351) data( "GrunfeldGreene" ) if( requireNamespace( 'plm', quietly = TRUE ) ) { library( "plm" ) GGPanel <- pdata.frame( GrunfeldGreene, c( "firm", "year" ) ) formulaGrunfeld <- invest ~ value + capital # SUR greeneSur <- systemfit( formulaGrunfeld, "SUR", data = GGPanel, methodResidCov = "noDfCor" ) summary( greeneSur ) # SUR Pooled greeneSurPooled <- systemfit( formulaGrunfeld, "SUR", data = GGPanel, pooled = TRUE, methodResidCov = "noDfCor", residCovWeighted = TRUE ) summary( greeneSurPooled ) } ## Further examples are in the documentation to the data sets ## 'KleinI' and 'GrunfeldGreene'. } \keyword{models} \keyword{regression} systemfit/man/summary.systemfit.Rd0000755000176200001440000001200411216215644017070 0ustar liggesusers\name{summary.systemfit} \alias{summary.systemfit} \alias{summary.systemfit.equation} \alias{print.summary.systemfit} \alias{print.summary.systemfit.equation} \title{Summary of systemfit estimation} \description{ These functions create and print summary results of the estimated equation system. } \usage{ \method{summary}{systemfit}( object, useDfSys = NULL, residCov = TRUE, equations = TRUE, ... ) \method{summary}{systemfit.equation}( object, useDfSys = NULL, ... ) \method{print}{summary.systemfit}( x, digits = max( 3, getOption("digits") - 1 ), residCov = x$printResidCov, equations = x$printEquations, ... ) \method{print}{summary.systemfit.equation}( x, digits = max( 3, getOption("digits") - 1 ), ... ) } \arguments{ \item{object}{an object of class \code{systemfit} or \code{systemfit.equation}.} \item{x}{an object of class \code{summary.systemfit} or \code{summary.systemfit.equation}.} \item{useDfSys}{logical. Use the degrees of freedom of the whole system (in place of the degrees of freedom of the single equation) to calculate prob values for the t-test of individual coefficients. If it not specified (\code{NULL}), it is set to \code{TRUE} if restrictions on the coefficients are imposed and \code{FALSE} otherwise.} \item{digits}{number of digits to print.} \item{residCov}{logical. If \code{TRUE}, the residual correlation matrix, the residual covariance matrix, and its determinant are printed.} \item{equations}{logical. If \code{TRUE}, summary results of each equation are printed. If \code{FALSE}, just the coefficients are printed.} \item{...}{not used by user.} } \value{ Applying \code{summary} on an object of class \code{systemfit} returns a list of class \code{summary.systemfit}. Applying \code{summary} on an object of class \code{systemfit.equation} returns a list of class \code{summary.systemfit.equation}. An object of class \code{summary.systemfit} contains all results that belong to the whole system. This list contains one special object: \code{eq}. This is a list and contains objects of class \code{summary.systemfit.equation}. These objects contain the results that belong to each of the eatimated equations. The objects of classes \code{summary.systemfit} and \code{summary.systemfit.equation} have the following components (elements that are marked with a \eqn{*} are available only in objects of class \code{summary.systemfit}; elements that are marked with a \eqn{+} are available only in objects of class \code{summary.systemfit.equation}): \item{method}{estimation method.} \item{residuals}{residuals.} \item{coefficients}{a matrix with columns for the estimated coefficients, their standard errors, t-statistic and corresponding (two-sided) p-values.} \item{df}{degrees of freedom, a 2-vector, where the first element is the number of coefficients and the second element is the number of observations minus the number of coefficients.} \item{coefCov}{estimated covariance matrix of the coefficients.} \item{call*}{the matched call of \code{systemfit}.} \item{ols.r.squared*}{OLS \eqn{R^2} value of the entire system.} \item{mcelroy.r.squared*}{McElroy's \eqn{R^2} value for the system.} \item{iter*}{number of iteration steps (only if the estimation is iterated).} \item{control*}{list of control parameters used for the estimation.} \item{residCov*}{estimated residual covariance matrix.} \item{residCovEst*}{residual covariance matrix used for estimation (only SUR and 3SLS).} \item{residCor*}{correlation matrix of the residuals.} \item{detResidCov*}{determinant of \code{residCov}.} \item{eqnLabel+}{equation label.} \item{eqnNo+}{equation number.} \item{terms+}{the 'terms' object used for the respective equation.} \item{r.squared+}{\eqn{R^2} value of the respective equation.} \item{adj.r.squared+}{adjusted \eqn{R^2} value of the respective equation.} \item{sigma+}{estimated standard error of the residuals of the respective equation.} \item{ssr+}{sum of squared residuals of the respective equation.} \item{printResidCov*}{argument \code{residCov}.} \item{printEquations*}{argument \code{equations}.} } \author{Jeff D. Hamann \email{jeff.hamann@forestinformatics.com},\cr Arne Henningsen \email{arne.henningsen@googlemail.com}} \seealso{\code{\link{systemfit}}, \code{\link{print.systemfit}}} \examples{ data( "Kmenta" ) eqDemand <- consump ~ price + income eqSupply <- consump ~ price + farmPrice + trend inst <- ~ income + farmPrice + trend system <- list( demand = eqDemand, supply = eqSupply ) ## perform OLS on each of the equations in the system fitols <- systemfit( system, data = Kmenta ) ## results of the system summary( fitols ) ## short results of the system summary( fitols, residCov = FALSE, equations = FALSE ) ## results of the first equation summary( fitols$eq[[1]] ) ## results of the second equation summary( fitols$eq[[2]] ) } \keyword{models} systemfit/man/coef.systemfit.Rd0000755000176200001440000000536011216215644016316 0ustar liggesusers\name{coef.systemfit} \alias{coef.systemfit} \alias{coef.systemfit.equation} \alias{coef.summary.systemfit} \alias{coef.summary.systemfit.equation} \title{Coefficients of systemfit object} \description{ These functions extract the coefficients from an object returned by \code{\link{systemfit}}. } \usage{ \method{coef}{systemfit}( object, modified.regMat = FALSE, \dots ) \method{coef}{systemfit.equation}( object, \dots ) \method{coef}{summary.systemfit}( object, modified.regMat = FALSE, \dots ) \method{coef}{summary.systemfit.equation}( object, \dots ) } \arguments{ \item{object}{an object of class \code{systemfit}, \code{systemfit.equation}, \code{summary.systemfit}, or \code{summary.systemfit.equation}.} \item{modified.regMat}{logical. If \code{TRUE}, the coefficients of the modified regressor matrix (original regressor matrix post-multiplied by \code{restrict.regMat}) rather than the coefficients of the original regressor matrix are returned.} \item{\dots}{other arguments.} } \value{ \code{coef.systemfit} returns a vector of all estimated coefficients. \code{coef.systemfit.equation} returns a vector of the estimated coefficients of a single equation. \code{coef.summary.systemfit} returns a matrix of all estimated coefficients, their standard errors, t-values, and p-values. \code{coef.summary.systemfit.equation} returns a matrix of the estimated coefficients of a single equation, their standard errors, t-values, and p-values. } \author{Arne Henningsen \email{arne.henningsen@googlemail.com}} \seealso{ \code{\link{systemfit}}, \code{\link{coef}} } \examples{ data( "Kmenta" ) eqDemand <- consump ~ price + income eqSupply <- consump ~ price + farmPrice + trend system <- list( demand = eqDemand, supply = eqSupply ) ## perform OLS on each of the equations in the system fitols <- systemfit( system, data = Kmenta ) ## all coefficients coef( fitols ) coef( summary( fitols ) ) ## coefficients of the first equation coef( fitols$eq[[1]] ) coef( summary( fitols$eq[[1]] ) ) ## coefficients of the second equation coef( fitols$eq[[2]] ) coef( summary( fitols$eq[[2]] ) ) ## estimation with restriction by modifying the regressor matrix modReg <- matrix( 0, 7, 6 ) colnames( modReg ) <- c( "demIntercept", "demPrice", "demIncome", "supIntercept", "supPrice2", "supTrend" ) modReg[ 1, "demIntercept" ] <- 1 modReg[ 2, "demPrice" ] <- 1 modReg[ 3, "demIncome" ] <- 1 modReg[ 4, "supIntercept" ] <- 1 modReg[ 5, "supPrice2" ] <- 1 modReg[ 6, "supPrice2" ] <- 1 modReg[ 7, "supTrend" ] <- 1 fitols3 <- systemfit( system, data = Kmenta, restrict.regMat = modReg ) coef( fitols3, modified.regMat = TRUE ) coef( fitols3 ) } \keyword{models} systemfit/man/logLik.systemfit.Rd0000644000176200001440000000352412567135544016632 0ustar liggesusers\name{logLik.systemfit} \alias{logLik.systemfit} \title{Log-Likelihood value of systemfit object} \description{ This method calculates the log-likelihood value of a fitted object returned by \code{\link{systemfit}}. } \usage{ \method{logLik}{systemfit}( object, residCovDiag = FALSE, ... ) } \arguments{ \item{object}{an object of class \code{systemfit}.} \item{residCovDiag}{logical. If this argument is set to \code{TRUE}, the residual covaraince matrix that is used for calculating the log-likelihood value is assumed to be diagonal, i.e. all covariances are set to zero. This may be desirable for models estimated by OLS, 2SLS, WLS, and W2SLS.} \item{...}{currently not used.} } \details{ The residual covariance matrix that is used for calculating the log-likelihood value is calculated based on the actually obtained (final) residuals (not correcting for degrees of freedom). In case of systems of equations with unequal numbers of observations, the calculation of the residual covariance matrix is only based on the residuals/observations that are available in all equations. } \value{ A numeric scalar (the log-likelihood value) with 2 attributes: \code{nobs} (total number of observations in all equations) and \code{df} (number of free parameters, i.e. coefficients + elements of the residual covariance matrix). } \author{Arne Henningsen \email{arne.henningsen@googlemail.com}} \seealso{ \code{\link{systemfit}}, \code{\link{logLik}} } \examples{ data( "Kmenta" ) eqDemand <- consump ~ price + income eqSupply <- consump ~ price + farmPrice + trend system <- list( demand = eqDemand, supply = eqSupply ) ## perform a SUR estimation fitsur <- systemfit( system, "SUR", data = Kmenta ) ## residuals of all equations logLik( fitsur ) } \keyword{models} systemfit/man/correlation.systemfit.Rd0000644000176200001440000000454611063415462017725 0ustar liggesusers % $Id: correlation.systemfit.Rd 474 2007-07-27 07:22:28Z henningsena $ \name{correlation.systemfit} \alias{correlation.systemfit} \title{Correlation between Predictions from Equation i and j} \description{ \code{correlation} returns a vector of the correlations between the predictions of two equations in a set of equations. The correlation between the predictions is defined as, \deqn{ r_{ijk} = \frac{x'_{ik}C_{ij}x_{jk}}{\sqrt{(x'_{ik}C_{ii}x_{ik})(x'_{jk}C_{jj}x_{jk})}} } where \eqn{r_{ijk}} is the correlation between the predicted values of equation i and j and \eqn{C_{ij}} is the cross-equation variance-covariance matrix between equations i and j. } \usage{ correlation.systemfit( results, eqni, eqnj ) } \arguments{ \item{results}{an object of type \code{systemfit}.} \item{eqni}{index for equation i} \item{eqnj}{index for equation j} } \value{ \code{correlation} returns a vector of the correlations between the predicted values in equation i and equation j. } \references{ Greene, W. H. (1993) \emph{Econometric Analysis, Second Edition}, Macmillan. Hasenauer, H; Monserud, R and T. Gregoire. (1998) Using Simultansous Regression Techniques with Individual-Tree Growth Models. \emph{Forest Science}. 44(1):87-95 Kmenta, J. (1997) \emph{Elements of Econometrics, Second Edition}, University of Michigan Publishing } \author{Jeff D. Hamann \email{jeff.hamann@forestinformatics.com}} \seealso{\code{\link{systemfit}}} \examples{ data( "Kmenta" ) eqDemand <- consump ~ price + income eqSupply <- consump ~ price + farmPrice + trend inst <- ~ income + farmPrice + trend system <- list( demand = eqDemand, supply = eqSupply ) ## perform 2SLS on each of the equations in the system fit2sls <- systemfit( system, "2SLS", inst = inst, data = Kmenta ) print( fit2sls ) print( fit2sls$rcov ) ## perform the 3SLS fit3sls <- systemfit( system, "3SLS", inst = inst, data = Kmenta ) print( fit3sls ) print( "covariance of residuals used for estimation (from 2sls)" ) print( fit3sls$rcovest ) print( "covariance of residuals" ) print( fit3sls$rcov ) ## examine the correlation between the predicted values ## of suppy and demand by plotting the correlation over ## the value of q r12 <- correlation.systemfit( fit3sls, 1, 2 ) plot( Kmenta$consump, r12, main="correlation between predictions from supply and demand" ) } \keyword{models} systemfit/man/print.systemfit.Rd0000755000176200001440000000243411216215644016535 0ustar liggesusers % $Id: print.systemfit.Rd 986 2008-10-16 07:57:24Z arne $ \name{print.systemfit} \alias{print.systemfit} \alias{print.systemfit.equation} \title{Print results of systemfit estimation} \description{ These functions print a few results of the estimated equation system. } \usage{ \method{print}{systemfit}( x, digits = max( 3, getOption("digits") - 1 ), \dots ) \method{print}{systemfit.equation}( x, digits = max( 3, getOption("digits") - 1 ), ... ) } \arguments{ \item{x}{an object of class \code{systemfit} or \code{systemfit.equation}.} \item{digits}{number of digits to print.} \item{\dots}{other arguments.} } \author{Jeff D. Hamann \email{jeff.hamann@forestinformatics.com},\cr Arne Henningsen \email{arne.henningsen@googlemail.com}} \seealso{\code{\link{systemfit}}, \code{\link{summary.systemfit}}} \examples{ data( "Kmenta" ) eqDemand <- consump ~ price + income eqSupply <- consump ~ price + farmPrice + trend system <- list( demand = eqDemand, supply = eqSupply ) ## perform OLS on each of the equations in the system fitols <- systemfit( system, data = Kmenta ) ## results of the whole system print( fitols ) ## results of the first equation print( fitols$eq[[1]] ) ## results of the second equation print( fitols$eq[[2]] ) } \keyword{models} systemfit/man/GrunfeldGreene.Rd0000644000176200001440000000614014254026525016245 0ustar liggesusers\name{GrunfeldGreene} \alias{GrunfeldGreene} \docType{data} \title{Grunfeld Data as published by Greene (2003)} \description{ Panel data on 5 US firms for the years 1935-1954. } \usage{ data("GrunfeldGreene") } \format{ A data frame containing 20 annual observations on 3 variables for 5 firms. \describe{ \item{invest}{gross investment.} \item{value}{market value of the firm (at the end of the previous year).} \item{capital}{capital stock of the firm (at the end of the previous year).} \item{firm}{name of the firm ("General Motors", "Chrysler", "General Electric", "Westinghouse" or "US Steel").} \item{year}{year.} } } \details{ There exist several different versions of this data set, and this version is considered incorrect (see \url{https://web.archive.org/web/20170426034143/http://web.stanford.edu/~clint/bench/grunfeld.htm} for details). However, we provide this incorrect version to replicate the results published in Theil (1971) and Greene (2003). A correct version of this data set with 5 additional firms is available in the \code{Ecdat} package (data set \code{Grunfeld}). } \source{ Greene (2003), Appendix F, Data Sets Used in Applications, Table F13.1. \url{https://pages.stern.nyu.edu/~wgreene/Text/econometricanalysis.htm} (a subset of this data set is available in Theil (1971), p. 296). } \references{ Greene, W.H. (2003). \emph{Econometric Analysis}, 5th edition. Prentice Hall, Upper Saddle River (NJ). Grunfeld, Y. (1958). \emph{The Determinants of Corporate Investment}, Unpublished Ph.D. Dissertation, University of Chicago. Theil, Henri (1971). \emph{Principles of Econometrics}, John Wiley & Sons, New York. } \examples{ ## Repeating the OLS and SUR estimations in Greene (2003, pp. 351) data( "GrunfeldGreene" ) if( requireNamespace( 'plm', quietly = TRUE ) ) { library( "plm" ) GGPanel <- pdata.frame( GrunfeldGreene, c( "firm", "year" ) ) formulaGrunfeld <- invest ~ value + capital # OLS greeneOls <- systemfit( formulaGrunfeld, "OLS", data = GGPanel ) summary( greeneOls ) sapply( greeneOls$eq, function(x){return(summary(x)$ssr/20)} ) # sigma^2 # OLS Pooled greeneOlsPooled <- systemfit( formulaGrunfeld, "OLS", data = GGPanel, pooled = TRUE ) summary( greeneOlsPooled ) sum( sapply( greeneOlsPooled$eq, function(x){return(summary(x)$ssr)}) )/97 # sigma^2 # SUR greeneSur <- systemfit( formulaGrunfeld, "SUR", data = GGPanel, methodResidCov = "noDfCor" ) summary( greeneSur ) # SUR Pooled greeneSurPooled <- systemfit( formulaGrunfeld, "SUR", data = GGPanel, pooled = TRUE, methodResidCov = "noDfCor", residCovWeighted = TRUE ) summary( greeneSurPooled ) ## Repeating the OLS and SUR estimations in Theil (1971, pp. 295, 300) GrunfeldTheil <- subset( GrunfeldGreene, firm \%in\% c( "General Electric", "Westinghouse" ) ) GTPanel <- pdata.frame( GrunfeldTheil, c( "firm", "year" ) ) formulaGrunfeld <- invest ~ value + capital # OLS theilOls <- systemfit( formulaGrunfeld, "OLS", data = GTPanel ) summary( theilOls ) # SUR theilSur <- systemfit( formulaGrunfeld, "SUR", data = GTPanel, methodResidCov = "noDfCor" ) summary( theilSur ) } } \keyword{datasets} systemfit/man/terms.systemfit.Rd0000644000176200001440000000230111216215644016521 0ustar liggesusers\name{terms.systemfit} \alias{terms.systemfit} \alias{terms.systemfit.equation} \title{Model Terms of systemfit Objects} \description{ This method extracts the model terms from fitted objects returned by \code{\link{systemfit}}. } \usage{ \method{terms}{systemfit}( x, ... ) \method{terms}{systemfit.equation}( x, ... ) } \arguments{ \item{x}{an object of class \code{systemfit}.} \item{...}{currently not used.} } \value{ \code{terms.systemfit.equation} returns the model terms of a single equation of a \code{systemfit} object. \code{terms.systemfit.equation} returns a list of model terms: one model term object for each equation of the \code{systemfit} object. } \author{Arne Henningsen \email{arne.henningsen@googlemail.com}} \seealso{ \code{\link{systemfit}}, \code{\link{terms}} } \examples{ data( "Kmenta" ) eqDemand <- consump ~ price + income eqSupply <- consump ~ price + farmPrice + trend system <- list( demand = eqDemand, supply = eqSupply ) ## perform a SUR estimation fitsur <- systemfit( system, "SUR", data = Kmenta ) ## model terms of the second equation terms( fitsur$eq[[ 2 ]] ) ## all model terms of the system terms( fitsur ) } \keyword{models} systemfit/DESCRIPTION0000644000176200001440000000205514406632022014010 0ustar liggesusersPackage: systemfit Version: 1.1-30 Date: 2023-03-22 Title: Estimating Systems of Simultaneous Equations Author: Arne Henningsen and Jeff D. Hamann Maintainer: Arne Henningsen Depends: R (>= 3.2.0), Matrix, car (>= 2.0-0), lmtest Suggests: knitr, plm (>= 1.0-1), sem (>= 2.0-0) Imports: stats (>= 2.14.0), sandwich (>= 2.2-9), MASS, methods Description: Econometric estimation of simultaneous systems of linear and nonlinear equations using Ordinary Least Squares (OLS), Weighted Least Squares (WLS), Seemingly Unrelated Regressions (SUR), Two-Stage Least Squares (2SLS), Weighted Two-Stage Least Squares (W2SLS), and Three-Stage Least Squares (3SLS) as suggested, e.g., by Zellner (1962) , Zellner and Theil (1962) , and Schmidt (1990) . License: GPL (>= 2) URL: https://r-forge.r-project.org/projects/systemfit/ VignetteBuilder: knitr NeedsCompilation: no Packaged: 2023-03-22 13:15:35 UTC; gsl324 Repository: CRAN Date/Publication: 2023-03-22 17:00:02 UTC systemfit/build/0000755000176200001440000000000014406577565013423 5ustar liggesuserssystemfit/build/vignette.rds0000644000176200001440000000031514406577565015761 0ustar liggesusersuO 0 ֹGB2YA* sqڡ+M6yCps`1&( 4mGyA% ?y]FX[)[jEvPR}"[YŒwF97lfeKJo^%Iɨkzn=D'5F\7Gsystemfit/tests/0000755000176200001440000000000014406577567013470 5ustar liggesuserssystemfit/tests/test_panel.R0000644000176200001440000002716614254024170015737 0ustar liggesuserslibrary( systemfit ) if(requireNamespace( 'plm', quietly = TRUE ) ) { library( plm ) options( digits = 3 ) useMatrix <- FALSE } ## Repeating the OLS and SUR estimations in Theil (1971, pp. 295, 300) if(requireNamespace( 'plm', quietly = TRUE ) ) { data( "GrunfeldGreene" ) GrunfeldTheil <- subset( GrunfeldGreene, firm %in% c( "General Electric", "Westinghouse" ) ) GrunfeldTheil <- pdata.frame( GrunfeldTheil, c( "firm", "year" ) ) formulaGrunfeld <- invest ~ value + capital } # OLS if(requireNamespace( 'plm', quietly = TRUE ) ) { theilOls <- systemfit( formulaGrunfeld, "OLS", data = GrunfeldTheil, useMatrix = useMatrix ) print( theilOls ) print( summary( theilOls ) ) print( summary( theilOls, useDfSys = TRUE, residCov = FALSE, equations = FALSE ) ) print( summary( theilOls, equations = FALSE ) ) print( coef( theilOls ) ) print( coef( summary(theilOls ) ) ) print( vcov( theilOls ) ) print( residuals( theilOls ) ) print( confint( theilOls ) ) print( fitted(theilOls ) ) print( logLik( theilOls ) ) print( logLik( theilOls, residCovDiag = TRUE ) ) print( nobs( theilOls ) ) print( model.frame( theilOls ) ) print( model.matrix( theilOls ) ) print( formula( theilOls ) ) print( formula( theilOls$eq[[ 1 ]] ) ) print( terms( theilOls ) ) print( terms( theilOls$eq[[ 1 ]] ) ) } # SUR if(requireNamespace( 'plm', quietly = TRUE ) ) { theilSur <- systemfit( formulaGrunfeld, "SUR", data = GrunfeldTheil, methodResidCov = "noDfCor", useMatrix = useMatrix ) print( theilSur ) print( summary( theilSur ) ) print( summary( theilSur, useDfSys = TRUE, equations = FALSE ) ) print( summary( theilSur, residCov = FALSE, equations = FALSE ) ) print( coef( theilSur ) ) print( coef( summary( theilSur ) ) ) print( vcov( theilSur ) ) print( residuals( theilSur ) ) print( confint( theilSur ) ) print( fitted( theilSur ) ) print( logLik( theilSur ) ) print( logLik( theilSur, residCovDiag = TRUE ) ) print( nobs( theilSur ) ) print( model.frame( theilSur ) ) print( model.matrix( theilSur ) ) print( formula( theilSur ) ) print( formula( theilSur$eq[[ 2 ]] ) ) print( terms( theilSur ) ) print( terms( theilSur$eq[[ 2 ]] ) ) } ## Repeating the OLS and SUR estimations in Greene (2003, pp. 351) if(requireNamespace( 'plm', quietly = TRUE ) ) { GrunfeldGreene <- pdata.frame( GrunfeldGreene, c( "firm", "year" ) ) formulaGrunfeld <- invest ~ value + capital } # OLS if(requireNamespace( 'plm', quietly = TRUE ) ) { greeneOls <- systemfit( formulaGrunfeld, "OLS", data = GrunfeldGreene, useMatrix = useMatrix ) print( greeneOls ) print( summary( greeneOls ) ) print( summary( greeneOls, useDfSys = TRUE, equations = FALSE ) ) print( summary( greeneOls, residCov = FALSE ) ) print( sapply( greeneOls$eq, function(x){return(summary(x)$ssr/20)} ) ) # sigma^2 print( coef( greeneOls ) ) print( coef( summary( greeneOls ) ) ) print( vcov( greeneOls ) ) print( residuals( greeneOls ) ) print( confint(greeneOls ) ) print( fitted( greeneOls ) ) print( logLik( greeneOls ) ) print( logLik( greeneOls, residCovDiag = TRUE ) ) print( nobs( greeneOls ) ) print( model.frame( greeneOls ) ) print( model.matrix( greeneOls ) ) print( formula( greeneOls ) ) print( formula( greeneOls$eq[[ 2 ]] ) ) print( terms( greeneOls ) ) print( terms( greeneOls$eq[[ 2 ]] ) ) } # OLS Pooled if(requireNamespace( 'plm', quietly = TRUE ) ) { greeneOlsPooled <- systemfit( formulaGrunfeld, "OLS", data = GrunfeldGreene, pooled = TRUE, useMatrix = useMatrix ) print( greeneOlsPooled ) print( summary( greeneOlsPooled ) ) print( summary( greeneOlsPooled, useDfSys = FALSE, residCov = FALSE ) ) print( summary( greeneOlsPooled, residCov = FALSE, equations = FALSE ) ) print( sum( sapply( greeneOlsPooled$eq, function(x){return(summary(x)$ssr)}) )/97 ) # sigma^2 print( coef( greeneOlsPooled ) ) print( coef( greeneOlsPooled, modified.regMat = TRUE ) ) print( coef( summary( greeneOlsPooled ) ) ) print( coef( summary( greeneOlsPooled ), modified.regMat = TRUE ) ) print( vcov( greeneOlsPooled ) ) print( vcov( greeneOlsPooled, modified.regMat = TRUE ) ) print( residuals( greeneOlsPooled ) ) print( confint( greeneOlsPooled ) ) print( fitted( greeneOlsPooled ) ) print( logLik( greeneOlsPooled ) ) print( logLik( greeneOlsPooled, residCovDiag = TRUE ) ) print( nobs( greeneOlsPooled ) ) print( model.frame( greeneOlsPooled ) ) print( model.matrix( greeneOlsPooled ) ) print( formula( greeneOlsPooled ) ) print( formula( greeneOlsPooled$eq[[ 1 ]] ) ) print( terms( greeneOlsPooled ) ) print( terms( greeneOlsPooled$eq[[ 1 ]] ) ) } # SUR if(requireNamespace( 'plm', quietly = TRUE ) ) { greeneSur <- systemfit( formulaGrunfeld, "SUR", data = GrunfeldGreene, methodResidCov = "noDfCor", useMatrix = useMatrix ) print( greeneSur ) print( summary( greeneSur ) ) print( summary( greeneSur, useDfSys = TRUE, residCov = FALSE ) ) print( summary( greeneSur, equations = FALSE ) ) print( coef( greeneSur ) ) print( coef( summary( greeneSur ) ) ) print( vcov( greeneSur ) ) print( residuals( greeneSur ) ) print( confint( greeneSur ) ) print( fitted( greeneSur ) ) print( logLik( greeneSur ) ) print( logLik( greeneSur, residCovDiag = TRUE ) ) print( nobs( greeneSur ) ) print( model.frame( greeneSur ) ) print( model.matrix( greeneSur ) ) print( formula( greeneSur ) ) print( formula( greeneSur$eq[[ 1 ]] ) ) print( terms( greeneSur ) ) print( terms( greeneSur$eq[[ 1 ]] ) ) } # SUR Pooled if(requireNamespace( 'plm', quietly = TRUE ) ) { greeneSurPooled <- systemfit( formulaGrunfeld, "SUR", data = GrunfeldGreene, pooled = TRUE, methodResidCov = "noDfCor", residCovWeighted = TRUE, useMatrix = useMatrix ) print( greeneSurPooled ) print( summary( greeneSurPooled ) ) print( summary( greeneSurPooled, useDfSys = FALSE, equations = FALSE ) ) print( summary( greeneSurPooled, residCov = FALSE, equations = FALSE ) ) print( coef( greeneSurPooled ) ) print( coef( greeneSurPooled, modified.regMat = TRUE ) ) print( coef( summary( greeneSurPooled ) ) ) print( coef( summary( greeneSurPooled ), modified.regMat = TRUE ) ) print( vcov( greeneSurPooled ) ) print( vcov( greeneSurPooled, modified.regMat = TRUE ) ) print( residuals( greeneSurPooled ) ) print( confint( greeneSurPooled ) ) print( fitted( greeneSurPooled ) ) print( logLik( greeneSurPooled ) ) print( logLik( greeneSurPooled, residCovDiag = TRUE ) ) print( nobs( greeneSurPooled ) ) print( model.frame( greeneSurPooled ) ) print( model.matrix( greeneSurPooled ) ) print( formula( greeneSurPooled ) ) print( formula( greeneSurPooled$eq[[ 1 ]] ) ) print( terms( greeneSurPooled ) ) print( terms( greeneSurPooled$eq[[ 1 ]] ) ) } ######### IV estimation ####################### ### 2SLS ### # instruments = explanatory variables -> 2SLS estimates = OLS estimates if(requireNamespace( 'plm', quietly = TRUE ) ) { greene2sls <- systemfit( formulaGrunfeld, inst = ~ value + capital, "2SLS", data = GrunfeldGreene, useMatrix = useMatrix ) print( greene2sls ) print( summary( greene2sls ) ) print( all.equal( coef( summary( greene2sls ) ), coef( summary( greeneOls ) ) ) ) print( all.equal( greene2sls[ -c(1,2,6) ], greeneOls[ -c(1,2,6) ] ) ) for( i in 1:length( greene2sls$eq ) ) { print( all.equal( greene2sls$eq[[i]][ -c(3,15:17) ], greeneOls$eq[[i]][-3] ) ) } } # 'real' IV/2SLS estimation if(requireNamespace( 'plm', quietly = TRUE ) ) { greene2slsR <- systemfit( invest ~ capital, inst = ~ value, "2SLS", data = GrunfeldGreene, useMatrix = useMatrix ) print( greene2slsR ) print( summary( greene2slsR ) ) } ### 2SLS, pooled ### # instruments = explanatory variables -> 2SLS estimates = OLS estimates if(requireNamespace( 'plm', quietly = TRUE ) ) { greene2slsPooled <- systemfit( formulaGrunfeld, inst = ~ value + capital, "2SLS", data = GrunfeldGreene, pooled = TRUE, useMatrix = useMatrix ) print( greene2slsPooled ) print( summary( greene2slsPooled ) ) print( all.equal( coef( summary( greene2slsPooled ) ), coef( summary( greeneOlsPooled ) ) ) ) print( all.equal( greene2slsPooled[ -c(1,2,6) ], greeneOlsPooled[ -c(1,2,6) ] ) ) for( i in 1:length( greene2slsPooled$eq ) ) { print( all.equal( greene2slsPooled$eq[[i]][ -c(3,15:17) ], greeneOlsPooled$eq[[i]][-3] ) ) } } # 'real' IV/2SLS estimation if(requireNamespace( 'plm', quietly = TRUE ) ) { greene2slsRPooled <- systemfit( invest ~ capital, inst = ~ value, "2SLS", data = GrunfeldGreene, pooled = TRUE, useMatrix = useMatrix ) print( greene2slsRPooled ) print( summary( greene2slsRPooled ) ) } ### 3SLS ### # instruments = explanatory variables -> 3SLS estimates = SUR estimates if(requireNamespace( 'plm', quietly = TRUE ) ) { greene3sls <- systemfit( formulaGrunfeld, inst = ~ value + capital, "3SLS", data = GrunfeldGreene, useMatrix = useMatrix, methodResidCov = "noDfCor" ) print( greene3sls ) print( summary( greene3sls ) ) print( all.equal( coef( summary( greene3sls ) ), coef( summary( greeneSur ) ) ) ) print( all.equal( greene3sls[ -c(1,2,7) ], greeneSur[ -c(1,2,7) ] ) ) for( i in 1:length( greene3sls$eq ) ) { print( all.equal( greene3sls$eq[[i]][ -c(3,15:17) ], greeneSur$eq[[i]][-3] ) ) } } # 'real' IV/3SLS estimation if(requireNamespace( 'plm', quietly = TRUE ) ) { greene3slsR <- systemfit( invest ~ capital, inst = ~ value, "3SLS", data = GrunfeldGreene, useMatrix = useMatrix ) print( greene3slsR ) print( summary( greene3slsR ) ) } ### 3SLS, Pooled ### # instruments = explanatory variables -> 3SLS estimates = SUR estimates if(requireNamespace( 'plm', quietly = TRUE ) ) { greene3slsPooled <- systemfit( formulaGrunfeld, inst = ~ capital + value, "3SLS", data = GrunfeldGreene, pooled = TRUE, useMatrix = useMatrix, residCovWeighted = TRUE, methodResidCov = "noDfCor" ) print( greene3slsPooled ) print( summary( greene3slsPooled ) ) print( all.equal( coef( summary( greene3slsPooled ) ), coef( summary( greeneSurPooled ) ) ) ) print( all.equal( greene3slsPooled[ -c(1,2,7) ], greeneSurPooled[ -c(1,2,7) ] ) ) for( i in 1:length( greene3slsPooled$eq ) ) { print( all.equal( greene3slsPooled$eq[[i]][ -c(3,15:17) ], greeneSurPooled$eq[[i]][-3] ) ) } } # 'real' IV/3SLS estimation if(requireNamespace( 'plm', quietly = TRUE ) ) { greene3slsRPooled <- systemfit( invest ~ capital, inst = ~ value, "3SLS", data = GrunfeldGreene, useMatrix = useMatrix ) print( greene3slsRPooled ) print( summary( greene3slsRPooled ) ) } ## **************** estfun ************************ library( "sandwich" ) if(requireNamespace( 'plm', quietly = TRUE ) ) { print( estfun( theilOls ) ) print( round( colSums( estfun( theilOls ) ), digits = 7 ) ) print( estfun( theilSur ) ) print( round( colSums( estfun( theilSur ) ), digits = 7 ) ) print( estfun( greeneOls ) ) print( round( colSums( estfun( greeneOls ) ), digits = 7 ) ) print( try( estfun( greeneOlsPooled ) ) ) print( estfun( greeneSur ) ) print( round( colSums( estfun( greeneSur ) ), digits = 7 ) ) print( try( estfun( greeneSurPooled ) ) ) } ## **************** bread ************************ if(requireNamespace( 'plm', quietly = TRUE ) ) { print( bread( theilOls ) ) print( bread( theilSur ) ) print( bread( greeneOls ) ) print( try( bread( greeneOlsPooled ) ) ) print( bread( greeneSur ) ) print( try( bread( greeneSurPooled ) ) ) } systemfit/tests/test_2sls.Rout.save0000644000176200001440000071637613060100647017216 0ustar liggesusers R version 3.3.2 (2016-10-31) -- "Sincere Pumpkin Patch" Copyright (C) 2016 The R Foundation for Statistical Computing Platform: x86_64-pc-linux-gnu (64-bit) R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > library( systemfit ) Loading required package: Matrix Loading required package: car Loading required package: lmtest Loading required package: zoo Attaching package: 'zoo' The following objects are masked from 'package:base': as.Date, as.Date.numeric Please cite the 'systemfit' package as: Arne Henningsen and Jeff D. Hamann (2007). systemfit: A Package for Estimating Systems of Simultaneous Equations in R. Journal of Statistical Software 23(4), 1-40. http://www.jstatsoft.org/v23/i04/. If you have questions, suggestions, or comments regarding the 'systemfit' package, please use a forum or 'tracker' at systemfit's R-Forge site: https://r-forge.r-project.org/projects/systemfit/ > options( digits = 3 ) > > data( "Kmenta" ) > useMatrix <- FALSE > > demand <- consump ~ price + income > supply <- consump ~ price + farmPrice + trend > inst <- ~ income + farmPrice + trend > inst1 <- ~ income + farmPrice > instlist <- list( inst1, inst ) > system <- list( demand = demand, supply = supply ) > restrm <- matrix(0,1,7) # restriction matrix "R" > restrm[1,3] <- 1 > restrm[1,7] <- -1 > restrict <- "demand_income - supply_trend = 0" > restr2m <- matrix(0,2,7) # restriction matrix "R" 2 > restr2m[1,3] <- 1 > restr2m[1,7] <- -1 > restr2m[2,2] <- -1 > restr2m[2,5] <- 1 > restr2q <- c( 0, 0.5 ) # restriction vector "q" 2 > restrict2 <- c( "demand_income - supply_trend = 0", + "- demand_price + supply_price = 0.5" ) > tc <- matrix(0,7,6) > tc[1,1] <- 1 > tc[2,2] <- 1 > tc[3,3] <- 1 > tc[4,4] <- 1 > tc[5,5] <- 1 > tc[6,6] <- 1 > tc[7,3] <- 1 > restr3m <- matrix(0,1,6) # restriction matrix "R" 2 > restr3m[1,2] <- -1 > restr3m[1,5] <- 1 > restr3q <- c( 0.5 ) # restriction vector "q" 2 > restrict3 <- "- C2 + C5 = 0.5" > > # It is not possible to estimate 2SLS with systemfit exactly > # as EViews does, because EViews uses > # methodResidCov == "geomean" for the coefficient covariance matrix and > # methodResidCov == "noDfCor" for the residual covariance matrix. > # systemfit uses always the same formulas for both calculations. > > ## *************** 2SLS estimation ************************ > ## ************ 2SLS estimation (default)********************* > fit2sls1 <- systemfit( system, "2SLS", data = Kmenta, inst = inst, + x = TRUE, useMatrix = useMatrix ) > print( summary( fit2sls1 ) ) systemfit results method: 2SLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 33 162 4.36 0.697 0.548 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 65.7 3.87 1.97 0.755 0.726 supply 20 16 96.6 6.04 2.46 0.640 0.572 The covariance matrix of the residuals demand supply demand 3.87 4.36 supply 4.36 6.04 The correlations of the residuals demand supply demand 1.000 0.902 supply 0.902 1.000 2SLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 94.6333 7.9208 11.95 1.1e-09 *** price -0.2436 0.0965 -2.52 0.022 * income 0.3140 0.0469 6.69 3.8e-06 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.966 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 65.729 MSE: 3.866 Root MSE: 1.966 Multiple R-Squared: 0.755 Adjusted R-Squared: 0.726 2SLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 49.5324 12.0105 4.12 0.0008 *** price 0.2401 0.0999 2.40 0.0288 * farmPrice 0.2556 0.0473 5.41 5.8e-05 *** trend 0.2529 0.0997 2.54 0.0219 * --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.458 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 96.633 MSE: 6.04 Root MSE: 2.458 Multiple R-Squared: 0.64 Adjusted R-Squared: 0.572 > nobs( fit2sls1 ) [1] 40 > > ## *************** 2SLS estimation (singleEqSigma=F)******************* > fit2sls1s <- systemfit( system, "2SLS", data = Kmenta, inst = inst, + singleEqSigma = FALSE, useMatrix = useMatrix ) > print( summary( fit2sls1s ) ) systemfit results method: 2SLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 33 162 4.36 0.697 0.548 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 65.7 3.87 1.97 0.755 0.726 supply 20 16 96.6 6.04 2.46 0.640 0.572 The covariance matrix of the residuals demand supply demand 3.87 4.36 supply 4.36 6.04 The correlations of the residuals demand supply demand 1.000 0.902 supply 0.902 1.000 2SLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 94.633 8.935 10.59 6.6e-09 *** price -0.244 0.109 -2.24 0.039 * income 0.314 0.053 5.93 1.6e-05 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.966 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 65.729 MSE: 3.866 Root MSE: 1.966 Multiple R-Squared: 0.755 Adjusted R-Squared: 0.726 2SLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 49.5324 10.8404 4.57 0.00032 *** price 0.2401 0.0902 2.66 0.01706 * farmPrice 0.2556 0.0426 5.99 1.9e-05 *** trend 0.2529 0.0899 2.81 0.01253 * --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.458 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 96.633 MSE: 6.04 Root MSE: 2.458 Multiple R-Squared: 0.64 Adjusted R-Squared: 0.572 > nobs( fit2sls1s ) [1] 40 > > ## ********************* 2SLS (useDfSys = TRUE) ***************** > print( summary( fit2sls1, useDfSys = TRUE ) ) systemfit results method: 2SLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 33 162 4.36 0.697 0.548 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 65.7 3.87 1.97 0.755 0.726 supply 20 16 96.6 6.04 2.46 0.640 0.572 The covariance matrix of the residuals demand supply demand 3.87 4.36 supply 4.36 6.04 The correlations of the residuals demand supply demand 1.000 0.902 supply 0.902 1.000 2SLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 94.6333 7.9208 11.95 1.6e-13 *** price -0.2436 0.0965 -2.52 0.017 * income 0.3140 0.0469 6.69 1.3e-07 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.966 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 65.729 MSE: 3.866 Root MSE: 1.966 Multiple R-Squared: 0.755 Adjusted R-Squared: 0.726 2SLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 49.5324 12.0105 4.12 0.00024 *** price 0.2401 0.0999 2.40 0.02208 * farmPrice 0.2556 0.0473 5.41 5.5e-06 *** trend 0.2529 0.0997 2.54 0.01605 * --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.458 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 96.633 MSE: 6.04 Root MSE: 2.458 Multiple R-Squared: 0.64 Adjusted R-Squared: 0.572 > nobs( fit2sls1 ) [1] 40 > > ## ********************* 2SLS (methodResidCov = "noDfCor" ) ***************** > fit2sls1r <- systemfit( system, "2SLS", data = Kmenta, inst = inst, + methodResidCov = "noDfCor", useMatrix = useMatrix ) > print( summary( fit2sls1r ) ) systemfit results method: 2SLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 33 162 2.97 0.697 0.525 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 65.7 3.87 1.97 0.755 0.726 supply 20 16 96.6 6.04 2.46 0.640 0.572 The covariance matrix of the residuals demand supply demand 3.29 3.59 supply 3.59 4.83 The correlations of the residuals demand supply demand 1.000 0.902 supply 0.902 1.000 2SLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 94.6333 7.3027 12.96 3.1e-10 *** price -0.2436 0.0890 -2.74 0.014 * income 0.3140 0.0433 7.25 1.3e-06 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.966 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 65.729 MSE: 3.866 Root MSE: 1.966 Multiple R-Squared: 0.755 Adjusted R-Squared: 0.726 2SLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 49.5324 10.7425 4.61 0.00029 *** price 0.2401 0.0894 2.69 0.01623 * farmPrice 0.2556 0.0423 6.05 1.7e-05 *** trend 0.2529 0.0891 2.84 0.01188 * --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.458 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 96.633 MSE: 6.04 Root MSE: 2.458 Multiple R-Squared: 0.64 Adjusted R-Squared: 0.572 > nobs( fit2sls1r ) [1] 40 > > ## *************** 2SLS (methodResidCov="noDfCor", singleEqSigma=F) ************* > fit2sls1rs <- systemfit( system, "2SLS", data = Kmenta, inst = inst, + methodResidCov = "noDfCor", singleEqSigma = FALSE, useMatrix = useMatrix ) > print( summary( fit2sls1rs ) ) systemfit results method: 2SLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 33 162 2.97 0.697 0.525 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 65.7 3.87 1.97 0.755 0.726 supply 20 16 96.6 6.04 2.46 0.640 0.572 The covariance matrix of the residuals demand supply demand 3.29 3.59 supply 3.59 4.83 The correlations of the residuals demand supply demand 1.000 0.902 supply 0.902 1.000 2SLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 94.6333 8.1158 11.66 1.6e-09 *** price -0.2436 0.0989 -2.46 0.025 * income 0.3140 0.0481 6.53 5.2e-06 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.966 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 65.729 MSE: 3.866 Root MSE: 1.966 Multiple R-Squared: 0.755 Adjusted R-Squared: 0.726 2SLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 49.5324 9.8463 5.03 0.00012 *** price 0.2401 0.0819 2.93 0.00980 ** farmPrice 0.2556 0.0387 6.60 6.1e-06 *** trend 0.2529 0.0817 3.10 0.00694 ** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.458 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 96.633 MSE: 6.04 Root MSE: 2.458 Multiple R-Squared: 0.64 Adjusted R-Squared: 0.572 > nobs( fit2sls1rs ) [1] 40 > > ## ********************* 2SLS with restriction ******************** > ## **************** 2SLS with restriction (default)******************** > fit2sls2 <- systemfit( system, "2SLS", data = Kmenta, restrict.matrix = restrm, + inst = inst, useMatrix = useMatrix ) > print( summary( fit2sls2 ) ) systemfit results method: 2SLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 34 166 3.6 0.691 0.553 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 67.4 3.97 1.99 0.749 0.719 supply 20 16 98.2 6.13 2.48 0.634 0.565 The covariance matrix of the residuals demand supply demand 3.97 4.55 supply 4.55 6.13 The correlations of the residuals demand supply demand 1.000 0.923 supply 0.923 1.000 2SLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 94.2816 8.8693 10.63 2.4e-12 *** price -0.2247 0.1034 -2.17 0.037 * income 0.2983 0.0454 6.57 1.6e-07 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.991 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 67.418 MSE: 3.966 Root MSE: 1.991 Multiple R-Squared: 0.749 Adjusted R-Squared: 0.719 2SLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 48.1843 10.5384 4.57 6.1e-05 *** price 0.2427 0.0896 2.71 0.011 * farmPrice 0.2619 0.0411 6.38 2.8e-07 *** trend 0.2983 0.0454 6.57 1.6e-07 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.477 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 98.155 MSE: 6.135 Root MSE: 2.477 Multiple R-Squared: 0.634 Adjusted R-Squared: 0.565 > nobs( fit2sls2 ) [1] 40 > # the same with symbolically specified restrictions > fit2sls2Sym <- systemfit( system, "2SLS", data = Kmenta, + restrict.matrix = restrict, inst = inst, useMatrix = useMatrix ) > all.equal( fit2sls2, fit2sls2Sym ) [1] "Component \"call\": target, current do not match when deparsed" > nobs( fit2sls2Sym ) [1] 40 > > ## ************* 2SLS with restriction (singleEqSigma=T) ***************** > fit2sls2s <- systemfit( system, "2SLS", data = Kmenta, restrict.matrix = restrm, + inst = inst, singleEqSigma = TRUE, x = TRUE, + useMatrix = useMatrix ) > print( summary( fit2sls2s ) ) systemfit results method: 2SLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 34 166 3.6 0.691 0.553 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 67.4 3.97 1.99 0.749 0.719 supply 20 16 98.2 6.13 2.48 0.634 0.565 The covariance matrix of the residuals demand supply demand 3.97 4.55 supply 4.55 6.13 The correlations of the residuals demand supply demand 1.000 0.923 supply 0.923 1.000 2SLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 94.2816 8.0090 11.77 1.5e-13 *** price -0.2247 0.0946 -2.37 0.023 * income 0.2983 0.0430 6.94 5.3e-08 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.991 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 67.418 MSE: 3.966 Root MSE: 1.991 Multiple R-Squared: 0.749 Adjusted R-Squared: 0.719 2SLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 48.1843 11.8001 4.08 0.00025 *** price 0.2427 0.1006 2.41 0.02135 * farmPrice 0.2619 0.0459 5.70 2.1e-06 *** trend 0.2983 0.0430 6.94 5.3e-08 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.477 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 98.155 MSE: 6.135 Root MSE: 2.477 Multiple R-Squared: 0.634 Adjusted R-Squared: 0.565 > nobs( fit2sls2s ) [1] 40 > > ## ********************* 2SLS with restriction (useDfSys=T) ************** > print( summary( fit2sls2, useDfSys = TRUE ) ) systemfit results method: 2SLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 34 166 3.6 0.691 0.553 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 67.4 3.97 1.99 0.749 0.719 supply 20 16 98.2 6.13 2.48 0.634 0.565 The covariance matrix of the residuals demand supply demand 3.97 4.55 supply 4.55 6.13 The correlations of the residuals demand supply demand 1.000 0.923 supply 0.923 1.000 2SLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 94.2816 8.8693 10.63 2.4e-12 *** price -0.2247 0.1034 -2.17 0.037 * income 0.2983 0.0454 6.57 1.6e-07 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.991 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 67.418 MSE: 3.966 Root MSE: 1.991 Multiple R-Squared: 0.749 Adjusted R-Squared: 0.719 2SLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 48.1843 10.5384 4.57 6.1e-05 *** price 0.2427 0.0896 2.71 0.011 * farmPrice 0.2619 0.0411 6.38 2.8e-07 *** trend 0.2983 0.0454 6.57 1.6e-07 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.477 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 98.155 MSE: 6.135 Root MSE: 2.477 Multiple R-Squared: 0.634 Adjusted R-Squared: 0.565 > nobs( fit2sls2 ) [1] 40 > > ## ********************* 2SLS with restriction (methodResidCov = "noDfCor") ************** > fit2sls2r <- systemfit( system, "2SLS", data = Kmenta, restrict.matrix = restrm, + inst = inst, methodResidCov = "noDfCor", useMatrix = useMatrix ) > print( summary( fit2sls2r ) ) systemfit results method: 2SLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 34 166 2.45 0.691 0.526 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 67.4 3.97 1.99 0.749 0.719 supply 20 16 98.2 6.13 2.48 0.634 0.565 The covariance matrix of the residuals demand supply demand 3.37 3.75 supply 3.75 4.91 The correlations of the residuals demand supply demand 1.000 0.923 supply 0.923 1.000 2SLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 94.2816 8.1771 11.53 2.7e-13 *** price -0.2247 0.0954 -2.36 0.024 * income 0.2983 0.0419 7.13 3.1e-08 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.991 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 67.418 MSE: 3.966 Root MSE: 1.991 Multiple R-Squared: 0.749 Adjusted R-Squared: 0.719 2SLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 48.1843 9.7159 4.96 1.9e-05 *** price 0.2427 0.0826 2.94 0.0059 ** farmPrice 0.2619 0.0379 6.92 5.7e-08 *** trend 0.2983 0.0419 7.13 3.1e-08 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.477 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 98.155 MSE: 6.135 Root MSE: 2.477 Multiple R-Squared: 0.634 Adjusted R-Squared: 0.565 > nobs( fit2sls2r ) [1] 40 > > ## ******** 2SLS with restriction (methodResidCov="noDfCor", singleEqSigma=TRUE) ********* > fit2sls2rs <- systemfit( system, "2SLS", data = Kmenta, restrict.matrix = restrm, + inst = inst, methodResidCov = "noDfCor", singleEqSigma = TRUE, + useMatrix = useMatrix ) > print( summary( fit2sls2rs ) ) systemfit results method: 2SLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 34 166 2.45 0.691 0.526 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 67.4 3.97 1.99 0.749 0.719 supply 20 16 98.2 6.13 2.48 0.634 0.565 The covariance matrix of the residuals demand supply demand 3.37 3.75 supply 3.75 4.91 The correlations of the residuals demand supply demand 1.000 0.923 supply 0.923 1.000 2SLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 94.2816 7.3834 12.77 1.6e-14 *** price -0.2247 0.0871 -2.58 0.014 * income 0.2983 0.0394 7.57 8.5e-09 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.991 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 67.418 MSE: 3.966 Root MSE: 1.991 Multiple R-Squared: 0.749 Adjusted R-Squared: 0.719 2SLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 48.1843 10.5574 4.56 6.3e-05 *** price 0.2427 0.0900 2.70 0.011 * farmPrice 0.2619 0.0411 6.37 2.8e-07 *** trend 0.2983 0.0394 7.57 8.5e-09 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.477 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 98.155 MSE: 6.135 Root MSE: 2.477 Multiple R-Squared: 0.634 Adjusted R-Squared: 0.565 > nobs( fit2sls2rs ) [1] 40 > > ## ********************* 2SLS with restriction via restrict.regMat ****************** > ## *************** 2SLS with restriction via restrict.regMat (default )*************** > fit2sls3 <- systemfit( system, "2SLS", data = Kmenta, restrict.regMat = tc, + inst = inst, methodResidCov = "noDfCor", useMatrix = useMatrix ) > print( summary( fit2sls3, useDfSys = TRUE ) ) systemfit results method: 2SLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 34 166 2.45 0.691 0.526 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 67.4 3.97 1.99 0.749 0.719 supply 20 16 98.2 6.13 2.48 0.634 0.565 The covariance matrix of the residuals demand supply demand 3.37 3.75 supply 3.75 4.91 The correlations of the residuals demand supply demand 1.000 0.923 supply 0.923 1.000 2SLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 94.2816 8.1771 11.53 2.7e-13 *** price -0.2247 0.0954 -2.36 0.024 * income 0.2983 0.0419 7.13 3.1e-08 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.991 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 67.418 MSE: 3.966 Root MSE: 1.991 Multiple R-Squared: 0.749 Adjusted R-Squared: 0.719 2SLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 48.1843 9.7159 4.96 1.9e-05 *** price 0.2427 0.0826 2.94 0.0059 ** farmPrice 0.2619 0.0379 6.92 5.7e-08 *** trend 0.2983 0.0419 7.13 3.1e-08 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.477 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 98.155 MSE: 6.135 Root MSE: 2.477 Multiple R-Squared: 0.634 Adjusted R-Squared: 0.565 > nobs( fit2sls3 ) [1] 40 > > > ## ***************** 2SLS with 2 restrictions ******************* > ## ************** 2SLS with 2 restrictions (default) ************** > fit2sls4 <- systemfit( system, "2SLS", data = Kmenta, restrict.matrix = restr2m, + restrict.rhs = restr2q, inst = inst, useMatrix = useMatrix ) > print( summary( fit2sls4 ) ) systemfit results method: 2SLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 35 166 3.78 0.69 0.568 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 66.1 3.89 1.97 0.754 0.725 supply 20 16 100.0 6.25 2.50 0.627 0.557 The covariance matrix of the residuals demand supply demand 3.89 4.53 supply 4.53 6.25 The correlations of the residuals demand supply demand 1.000 0.919 supply 0.919 1.000 2SLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 95.7059 6.4189 14.91 < 2e-16 *** price -0.2433 0.0663 -3.67 0.00081 *** income 0.3027 0.0408 7.42 1.1e-08 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.972 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 66.081 MSE: 3.887 Root MSE: 1.972 Multiple R-Squared: 0.754 Adjusted R-Squared: 0.725 2SLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 46.5637 7.8941 5.90 1.1e-06 *** price 0.2567 0.0663 3.87 0.00045 *** farmPrice 0.2637 0.0398 6.62 1.2e-07 *** trend 0.3027 0.0408 7.42 1.1e-08 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.5 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 99.971 MSE: 6.248 Root MSE: 2.5 Multiple R-Squared: 0.627 Adjusted R-Squared: 0.557 > nobs( fit2sls4 ) [1] 40 > # the same with symbolically specified restrictions > fit2sls4Sym <- systemfit( system, "2SLS", data = Kmenta, + restrict.matrix = restrict2, inst = inst, useMatrix = useMatrix ) > all.equal( fit2sls4, fit2sls4Sym ) [1] "Component \"call\": target, current do not match when deparsed" > nobs( fit2sls4Sym ) [1] 40 > > ## ************ 2SLS with 2 restrictions (singleEqSigma=T) ************** > fit2sls4s <- systemfit( system, "2SLS", data = Kmenta, restrict.matrix = restr2m, + restrict.rhs = restr2q, inst = inst, singleEqSigma = TRUE, + useMatrix = useMatrix ) > print( summary( fit2sls4s ) ) systemfit results method: 2SLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 35 166 3.78 0.69 0.568 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 66.1 3.89 1.97 0.754 0.725 supply 20 16 100.0 6.25 2.50 0.627 0.557 The covariance matrix of the residuals demand supply demand 3.89 4.53 supply 4.53 6.25 The correlations of the residuals demand supply demand 1.000 0.919 supply 0.919 1.000 2SLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 95.7059 6.3056 15.18 < 2e-16 *** price -0.2433 0.0684 -3.56 0.0011 ** income 0.3027 0.0394 7.69 5.1e-09 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.972 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 66.081 MSE: 3.887 Root MSE: 1.972 Multiple R-Squared: 0.754 Adjusted R-Squared: 0.725 2SLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 46.5637 8.3296 5.59 2.7e-06 *** price 0.2567 0.0684 3.75 0.00064 *** farmPrice 0.2637 0.0455 5.79 1.5e-06 *** trend 0.3027 0.0394 7.69 5.1e-09 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.5 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 99.971 MSE: 6.248 Root MSE: 2.5 Multiple R-Squared: 0.627 Adjusted R-Squared: 0.557 > nobs( fit2sls4s ) [1] 40 > > ## ***************** 2SLS with 2 restrictions (useDfSys=T) ************** > print( summary( fit2sls4, useDfSys = TRUE ) ) systemfit results method: 2SLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 35 166 3.78 0.69 0.568 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 66.1 3.89 1.97 0.754 0.725 supply 20 16 100.0 6.25 2.50 0.627 0.557 The covariance matrix of the residuals demand supply demand 3.89 4.53 supply 4.53 6.25 The correlations of the residuals demand supply demand 1.000 0.919 supply 0.919 1.000 2SLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 95.7059 6.4189 14.91 < 2e-16 *** price -0.2433 0.0663 -3.67 0.00081 *** income 0.3027 0.0408 7.42 1.1e-08 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.972 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 66.081 MSE: 3.887 Root MSE: 1.972 Multiple R-Squared: 0.754 Adjusted R-Squared: 0.725 2SLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 46.5637 7.8941 5.90 1.1e-06 *** price 0.2567 0.0663 3.87 0.00045 *** farmPrice 0.2637 0.0398 6.62 1.2e-07 *** trend 0.3027 0.0408 7.42 1.1e-08 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.5 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 99.971 MSE: 6.248 Root MSE: 2.5 Multiple R-Squared: 0.627 Adjusted R-Squared: 0.557 > nobs( fit2sls4 ) [1] 40 > > ## ***************** 2SLS with 2 restrictions (methodResidCov="noDfCor") ************** > fit2sls4r <- systemfit( system, "2SLS", data = Kmenta, restrict.matrix = restr2m, + restrict.rhs = restr2q, inst = inst, methodResidCov = "noDfCor", + x = TRUE, useMatrix = useMatrix ) > print( summary( fit2sls4r ) ) systemfit results method: 2SLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 35 166 2.57 0.69 0.54 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 66.1 3.89 1.97 0.754 0.725 supply 20 16 100.0 6.25 2.50 0.627 0.557 The covariance matrix of the residuals demand supply demand 3.30 3.73 supply 3.73 5.00 The correlations of the residuals demand supply demand 1.000 0.919 supply 0.919 1.000 2SLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 95.7059 6.0044 15.94 < 2e-16 *** price -0.2433 0.0621 -3.92 0.00039 *** income 0.3027 0.0382 7.93 2.5e-09 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.972 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 66.081 MSE: 3.887 Root MSE: 1.972 Multiple R-Squared: 0.754 Adjusted R-Squared: 0.725 2SLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 46.5637 7.3842 6.31 3.1e-07 *** price 0.2567 0.0621 4.14 0.00021 *** farmPrice 0.2637 0.0373 7.08 3.0e-08 *** trend 0.3027 0.0382 7.93 2.5e-09 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.5 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 99.971 MSE: 6.248 Root MSE: 2.5 Multiple R-Squared: 0.627 Adjusted R-Squared: 0.557 > nobs( fit2sls4r ) [1] 40 > > ## ***** 2SLS with 2 restrictions (methodResidCov="noDfCor", singleEqSigma=T) ******* > fit2sls4rs <- systemfit( system, "2SLS", data = Kmenta, restrict.matrix = restr2m, + restrict.rhs = restr2q, inst = inst, methodResidCov = "noDfCor", + singleEqSigma = TRUE, useMatrix = useMatrix ) > print( summary( fit2sls4rs ) ) systemfit results method: 2SLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 35 166 2.57 0.69 0.54 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 66.1 3.89 1.97 0.754 0.725 supply 20 16 100.0 6.25 2.50 0.627 0.557 The covariance matrix of the residuals demand supply demand 3.30 3.73 supply 3.73 5.00 The correlations of the residuals demand supply demand 1.000 0.919 supply 0.919 1.000 2SLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 95.7059 5.7579 16.62 < 2e-16 *** price -0.2433 0.0621 -3.92 4e-04 *** income 0.3027 0.0360 8.40 6.6e-10 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.972 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 66.081 MSE: 3.887 Root MSE: 1.972 Multiple R-Squared: 0.754 Adjusted R-Squared: 0.725 2SLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 46.5637 7.5360 6.18 4.5e-07 *** price 0.2567 0.0621 4.13 0.00021 *** farmPrice 0.2637 0.0407 6.47 1.8e-07 *** trend 0.3027 0.0360 8.40 6.6e-10 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.5 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 99.971 MSE: 6.248 Root MSE: 2.5 Multiple R-Squared: 0.627 Adjusted R-Squared: 0.557 > nobs( fit2sls4rs ) [1] 40 > > ## ************* 2SLS with 2 restrictions via R and restrict.regMat ****************** > ## ******** 2SLS with 2 restrictions via R and restrict.regMat (default) ************* > fit2sls5 <- systemfit( system, "2SLS", data = Kmenta, restrict.matrix = restr3m, + restrict.rhs = restr3q, restrict.regMat = tc, inst = inst, + useMatrix = useMatrix ) > print( summary( fit2sls5 ) ) systemfit results method: 2SLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 35 166 3.78 0.69 0.568 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 66.1 3.89 1.97 0.754 0.725 supply 20 16 100.0 6.25 2.50 0.627 0.557 The covariance matrix of the residuals demand supply demand 3.89 4.53 supply 4.53 6.25 The correlations of the residuals demand supply demand 1.000 0.919 supply 0.919 1.000 2SLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 95.7059 6.4189 14.91 < 2e-16 *** price -0.2433 0.0663 -3.67 0.00081 *** income 0.3027 0.0408 7.42 1.1e-08 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.972 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 66.081 MSE: 3.887 Root MSE: 1.972 Multiple R-Squared: 0.754 Adjusted R-Squared: 0.725 2SLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 46.5637 7.8941 5.90 1.1e-06 *** price 0.2567 0.0663 3.87 0.00045 *** farmPrice 0.2637 0.0398 6.62 1.2e-07 *** trend 0.3027 0.0408 7.42 1.1e-08 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.5 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 99.971 MSE: 6.248 Root MSE: 2.5 Multiple R-Squared: 0.627 Adjusted R-Squared: 0.557 > nobs( fit2sls5 ) [1] 40 > # the same with symbolically specified restrictions > fit2sls5Sym <- systemfit( system, "2SLS", data = Kmenta, + restrict.matrix = restrict3, restrict.regMat = tc, inst = inst, + useMatrix = useMatrix ) > all.equal( fit2sls5, fit2sls5Sym ) [1] "Component \"call\": target, current do not match when deparsed" > nobs( fit2sls5Sym ) [1] 40 > > ## ******* 2SLS with 2 restrictions via R and restrict.regMat (singleEqSigma=T) ****** > fit2sls5s <- systemfit( system, "2SLS", data = Kmenta, restrict.matrix = restr3m, + restrict.rhs = restr3q, restrict.regMat = tc, inst = inst, + singleEqSigma = TRUE, useMatrix = useMatrix ) > print( summary( fit2sls5s ) ) systemfit results method: 2SLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 35 166 3.78 0.69 0.568 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 66.1 3.89 1.97 0.754 0.725 supply 20 16 100.0 6.25 2.50 0.627 0.557 The covariance matrix of the residuals demand supply demand 3.89 4.53 supply 4.53 6.25 The correlations of the residuals demand supply demand 1.000 0.919 supply 0.919 1.000 2SLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 95.7059 6.3056 15.18 < 2e-16 *** price -0.2433 0.0684 -3.56 0.0011 ** income 0.3027 0.0394 7.69 5.1e-09 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.972 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 66.081 MSE: 3.887 Root MSE: 1.972 Multiple R-Squared: 0.754 Adjusted R-Squared: 0.725 2SLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 46.5637 8.3296 5.59 2.7e-06 *** price 0.2567 0.0684 3.75 0.00064 *** farmPrice 0.2637 0.0455 5.79 1.5e-06 *** trend 0.3027 0.0394 7.69 5.1e-09 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.5 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 99.971 MSE: 6.248 Root MSE: 2.5 Multiple R-Squared: 0.627 Adjusted R-Squared: 0.557 > nobs( fit2sls5s ) [1] 40 > > ## ********** 2SLS with 2 restrictions via R and restrict.regMat (useDfSys=T) ******* > print( summary( fit2sls5, useDfSys = TRUE ) ) systemfit results method: 2SLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 35 166 3.78 0.69 0.568 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 66.1 3.89 1.97 0.754 0.725 supply 20 16 100.0 6.25 2.50 0.627 0.557 The covariance matrix of the residuals demand supply demand 3.89 4.53 supply 4.53 6.25 The correlations of the residuals demand supply demand 1.000 0.919 supply 0.919 1.000 2SLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 95.7059 6.4189 14.91 < 2e-16 *** price -0.2433 0.0663 -3.67 0.00081 *** income 0.3027 0.0408 7.42 1.1e-08 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.972 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 66.081 MSE: 3.887 Root MSE: 1.972 Multiple R-Squared: 0.754 Adjusted R-Squared: 0.725 2SLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 46.5637 7.8941 5.90 1.1e-06 *** price 0.2567 0.0663 3.87 0.00045 *** farmPrice 0.2637 0.0398 6.62 1.2e-07 *** trend 0.3027 0.0408 7.42 1.1e-08 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.5 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 99.971 MSE: 6.248 Root MSE: 2.5 Multiple R-Squared: 0.627 Adjusted R-Squared: 0.557 > nobs( fit2sls5 ) [1] 40 > > ## ************* 2SLS with 2 restrictions via R and restrict.regMat (methodResidCov="noDfCor") ********* > fit2sls5r <- systemfit( system, "2SLS", data = Kmenta, restrict.matrix = restr3m, + restrict.rhs = restr3q, restrict.regMat = tc, inst = inst, + methodResidCov = "noDfCor", useMatrix = useMatrix ) > print( summary( fit2sls5r ) ) systemfit results method: 2SLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 35 166 2.57 0.69 0.54 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 66.1 3.89 1.97 0.754 0.725 supply 20 16 100.0 6.25 2.50 0.627 0.557 The covariance matrix of the residuals demand supply demand 3.30 3.73 supply 3.73 5.00 The correlations of the residuals demand supply demand 1.000 0.919 supply 0.919 1.000 2SLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 95.7059 6.0044 15.94 < 2e-16 *** price -0.2433 0.0621 -3.92 0.00039 *** income 0.3027 0.0382 7.93 2.5e-09 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.972 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 66.081 MSE: 3.887 Root MSE: 1.972 Multiple R-Squared: 0.754 Adjusted R-Squared: 0.725 2SLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 46.5637 7.3842 6.31 3.1e-07 *** price 0.2567 0.0621 4.14 0.00021 *** farmPrice 0.2637 0.0373 7.08 3.0e-08 *** trend 0.3027 0.0382 7.93 2.5e-09 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.5 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 99.971 MSE: 6.248 Root MSE: 2.5 Multiple R-Squared: 0.627 Adjusted R-Squared: 0.557 > nobs( fit2sls5r ) [1] 40 > > ## ** 2SLS with 2 restrictions via R and restrict.regMat (methodResidCov="noDfCor", singleEqSigma=T) ** > fit2sls5rs <- systemfit( system, "2SLS", data = Kmenta, restrict.matrix = restr3m, + restrict.rhs = restr3q, restrict.regMat = tc, inst = inst, + methodResidCov = "noDfCor", singleEqSigma = TRUE, + x = TRUE, useMatrix = useMatrix ) > print( summary( fit2sls5rs ) ) systemfit results method: 2SLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 35 166 2.57 0.69 0.54 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 66.1 3.89 1.97 0.754 0.725 supply 20 16 100.0 6.25 2.50 0.627 0.557 The covariance matrix of the residuals demand supply demand 3.30 3.73 supply 3.73 5.00 The correlations of the residuals demand supply demand 1.000 0.919 supply 0.919 1.000 2SLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 95.7059 5.7579 16.62 < 2e-16 *** price -0.2433 0.0621 -3.92 4e-04 *** income 0.3027 0.0360 8.40 6.6e-10 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.972 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 66.081 MSE: 3.887 Root MSE: 1.972 Multiple R-Squared: 0.754 Adjusted R-Squared: 0.725 2SLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 46.5637 7.5360 6.18 4.5e-07 *** price 0.2567 0.0621 4.13 0.00021 *** farmPrice 0.2637 0.0407 6.47 1.8e-07 *** trend 0.3027 0.0360 8.40 6.6e-10 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.5 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 99.971 MSE: 6.248 Root MSE: 2.5 Multiple R-Squared: 0.627 Adjusted R-Squared: 0.557 > nobs( fit2sls5rs ) [1] 40 > > ## *********** 2SLS estimation with different instruments ************** > ## ******* 2SLS estimation with different instruments (default) ********* > fit2slsd1 <- systemfit( system, "2SLS", data = Kmenta, inst = instlist, + useMatrix = useMatrix ) > print( summary( fit2slsd1 ) ) systemfit results method: 2SLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 33 164 9.25 0.694 0.512 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 67.4 3.97 1.99 0.748 0.719 supply 20 16 96.6 6.04 2.46 0.640 0.572 The covariance matrix of the residuals demand supply demand 3.97 3.84 supply 3.84 6.04 The correlations of the residuals demand supply demand 1.000 0.784 supply 0.784 1.000 2SLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Instruments: ~income + farmPrice Estimate Std. Error t value Pr(>|t|) (Intercept) 106.7894 11.1435 9.58 2.9e-08 *** price -0.4116 0.1448 -2.84 0.011 * income 0.3617 0.0564 6.41 6.4e-06 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.992 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 67.447 MSE: 3.967 Root MSE: 1.992 Multiple R-Squared: 0.748 Adjusted R-Squared: 0.719 2SLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 49.5324 12.0105 4.12 0.0008 *** price 0.2401 0.0999 2.40 0.0288 * farmPrice 0.2556 0.0473 5.41 5.8e-05 *** trend 0.2529 0.0997 2.54 0.0219 * --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.458 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 96.633 MSE: 6.04 Root MSE: 2.458 Multiple R-Squared: 0.64 Adjusted R-Squared: 0.572 > nobs( fit2slsd1 ) [1] 40 > > ## *********** 2SLS estimation with different instruments (singleEqSigma=F)***** > fit2slsd1s <- systemfit( system, "2SLS", data = Kmenta, inst = instlist, + singleEqSigma = FALSE, useMatrix = useMatrix ) > print( summary( fit2slsd1s ) ) systemfit results method: 2SLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 33 164 9.25 0.694 0.512 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 67.4 3.97 1.99 0.748 0.719 supply 20 16 96.6 6.04 2.46 0.640 0.572 The covariance matrix of the residuals demand supply demand 3.97 3.84 supply 3.84 6.04 The correlations of the residuals demand supply demand 1.000 0.784 supply 0.784 1.000 2SLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Instruments: ~income + farmPrice Estimate Std. Error t value Pr(>|t|) (Intercept) 106.7894 12.4749 8.56 1.4e-07 *** price -0.4116 0.1622 -2.54 0.021 * income 0.3617 0.0631 5.73 2.5e-05 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.992 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 67.447 MSE: 3.967 Root MSE: 1.992 Multiple R-Squared: 0.748 Adjusted R-Squared: 0.719 2SLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 49.5324 10.8976 4.55 0.00033 *** price 0.2401 0.0907 2.65 0.01755 * farmPrice 0.2556 0.0429 5.96 2e-05 *** trend 0.2529 0.0904 2.80 0.01292 * --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.458 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 96.633 MSE: 6.04 Root MSE: 2.458 Multiple R-Squared: 0.64 Adjusted R-Squared: 0.572 > nobs( fit2slsd1s ) [1] 40 > > ## ********* 2SLS estimation with different instruments (useDfSys=T) ******* > print( summary( fit2slsd1, useDfSys = TRUE ) ) systemfit results method: 2SLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 33 164 9.25 0.694 0.512 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 67.4 3.97 1.99 0.748 0.719 supply 20 16 96.6 6.04 2.46 0.640 0.572 The covariance matrix of the residuals demand supply demand 3.97 3.84 supply 3.84 6.04 The correlations of the residuals demand supply demand 1.000 0.784 supply 0.784 1.000 2SLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Instruments: ~income + farmPrice Estimate Std. Error t value Pr(>|t|) (Intercept) 106.7894 11.1435 9.58 4.7e-11 *** price -0.4116 0.1448 -2.84 0.0076 ** income 0.3617 0.0564 6.41 2.9e-07 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.992 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 67.447 MSE: 3.967 Root MSE: 1.992 Multiple R-Squared: 0.748 Adjusted R-Squared: 0.719 2SLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 49.5324 12.0105 4.12 0.00024 *** price 0.2401 0.0999 2.40 0.02208 * farmPrice 0.2556 0.0473 5.41 5.5e-06 *** trend 0.2529 0.0997 2.54 0.01605 * --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.458 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 96.633 MSE: 6.04 Root MSE: 2.458 Multiple R-Squared: 0.64 Adjusted R-Squared: 0.572 > nobs( fit2slsd1 ) [1] 40 > > ## ********* 2SLS estimation with different instruments (methodResidCov="noDfCor") ****** > fit2slsd1r <- systemfit( system, "2SLS", data = Kmenta, inst = instlist, + methodResidCov = "noDfCor", useMatrix = useMatrix ) > print( summary( fit2slsd1r ) ) systemfit results method: 2SLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 33 164 6.29 0.694 0.5 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 67.4 3.97 1.99 0.748 0.719 supply 20 16 96.6 6.04 2.46 0.640 0.572 The covariance matrix of the residuals demand supply demand 3.37 3.16 supply 3.16 4.83 The correlations of the residuals demand supply demand 1.000 0.784 supply 0.784 1.000 2SLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Instruments: ~income + farmPrice Estimate Std. Error t value Pr(>|t|) (Intercept) 106.789 10.274 10.39 8.8e-09 *** price -0.412 0.134 -3.08 0.0068 ** income 0.362 0.052 6.95 2.3e-06 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.992 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 67.447 MSE: 3.967 Root MSE: 1.992 Multiple R-Squared: 0.748 Adjusted R-Squared: 0.719 2SLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 49.5324 10.7425 4.61 0.00029 *** price 0.2401 0.0894 2.69 0.01623 * farmPrice 0.2556 0.0423 6.05 1.7e-05 *** trend 0.2529 0.0891 2.84 0.01188 * --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.458 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 96.633 MSE: 6.04 Root MSE: 2.458 Multiple R-Squared: 0.64 Adjusted R-Squared: 0.572 > nobs( fit2slsd1r ) [1] 40 > > ## 2SLS estimation with different instruments (methodResidCov="noDfCor",singleEqSigma=F) > fit2slsd1r <- systemfit( system, "2SLS", data = Kmenta, inst = instlist, + methodResidCov = "noDfCor", singleEqSigma = FALSE, + useMatrix = useMatrix ) > print( summary( fit2slsd1r ) ) systemfit results method: 2SLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 33 164 6.29 0.694 0.5 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 67.4 3.97 1.99 0.748 0.719 supply 20 16 96.6 6.04 2.46 0.640 0.572 The covariance matrix of the residuals demand supply demand 3.37 3.16 supply 3.16 4.83 The correlations of the residuals demand supply demand 1.000 0.784 supply 0.784 1.000 2SLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Instruments: ~income + farmPrice Estimate Std. Error t value Pr(>|t|) (Intercept) 106.7894 11.3309 9.42 3.7e-08 *** price -0.4116 0.1473 -2.79 0.012 * income 0.3617 0.0574 6.31 7.9e-06 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.992 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 67.447 MSE: 3.967 Root MSE: 1.992 Multiple R-Squared: 0.748 Adjusted R-Squared: 0.719 2SLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 49.5324 9.8982 5.00 0.00013 *** price 0.2401 0.0824 2.92 0.01012 * farmPrice 0.2556 0.0389 6.56 6.5e-06 *** trend 0.2529 0.0821 3.08 0.00718 ** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.458 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 96.633 MSE: 6.04 Root MSE: 2.458 Multiple R-Squared: 0.64 Adjusted R-Squared: 0.572 > nobs( fit2slsd1r ) [1] 40 > > ## **** 2SLS estimation with different instruments and restriction ******* > ## ** 2SLS estimation with different instruments and restriction (default) **** > fit2slsd2 <- systemfit( system, "2SLS", data = Kmenta, restrict.matrix = restrm, + inst = instlist, useMatrix = useMatrix ) > print( summary( fit2slsd2 ) ) systemfit results method: 2SLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 34 165 4.89 0.693 0.56 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 64.4 3.79 1.95 0.760 0.731 supply 20 16 100.3 6.27 2.50 0.626 0.556 The covariance matrix of the residuals demand supply demand 3.79 4.35 supply 4.35 6.27 The correlations of the residuals demand supply demand 1.000 0.891 supply 0.891 1.000 2SLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Instruments: ~income + farmPrice Estimate Std. Error t value Pr(>|t|) (Intercept) 103.5936 11.8930 8.71 3.5e-10 *** price -0.3449 0.1455 -2.37 0.024 * income 0.3260 0.0511 6.38 2.8e-07 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.947 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 64.445 MSE: 3.791 Root MSE: 1.947 Multiple R-Squared: 0.76 Adjusted R-Squared: 0.731 2SLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 47.3592 10.5362 4.49 7.7e-05 *** price 0.2443 0.0894 2.73 0.0099 ** farmPrice 0.2657 0.0411 6.47 2.1e-07 *** trend 0.3260 0.0511 6.38 2.8e-07 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.504 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 100.321 MSE: 6.27 Root MSE: 2.504 Multiple R-Squared: 0.626 Adjusted R-Squared: 0.556 > nobs( fit2slsd2 ) [1] 40 > > ## 2SLS estimation with different instruments and restriction (singleEqSigma=T) > fit2slsd2s <- systemfit( system, "2SLS", data = Kmenta, restrict.matrix = restrm, + inst = instlist, singleEqSigma = TRUE, useMatrix = useMatrix ) > print( summary( fit2slsd2s ) ) systemfit results method: 2SLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 34 165 4.89 0.693 0.56 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 64.4 3.79 1.95 0.760 0.731 supply 20 16 100.3 6.27 2.50 0.626 0.556 The covariance matrix of the residuals demand supply demand 3.79 4.35 supply 4.35 6.27 The correlations of the residuals demand supply demand 1.000 0.891 supply 0.891 1.000 2SLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Instruments: ~income + farmPrice Estimate Std. Error t value Pr(>|t|) (Intercept) 103.5936 10.6344 9.74 2.3e-11 *** price -0.3449 0.1327 -2.60 0.014 * income 0.3260 0.0485 6.73 9.9e-08 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.947 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 64.445 MSE: 3.791 Root MSE: 1.947 Multiple R-Squared: 0.76 Adjusted R-Squared: 0.731 2SLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 47.3592 11.9466 3.96 0.00036 *** price 0.2443 0.1017 2.40 0.02188 * farmPrice 0.2657 0.0465 5.71 2.0e-06 *** trend 0.3260 0.0485 6.73 9.9e-08 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.504 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 100.321 MSE: 6.27 Root MSE: 2.504 Multiple R-Squared: 0.626 Adjusted R-Squared: 0.556 > nobs( fit2slsd2s ) [1] 40 > > ## **** 2SLS estimation with different instruments and restriction (useDfSys=F) > print( summary( fit2slsd2, useDfSys = FALSE ) ) systemfit results method: 2SLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 34 165 4.89 0.693 0.56 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 64.4 3.79 1.95 0.760 0.731 supply 20 16 100.3 6.27 2.50 0.626 0.556 The covariance matrix of the residuals demand supply demand 3.79 4.35 supply 4.35 6.27 The correlations of the residuals demand supply demand 1.000 0.891 supply 0.891 1.000 2SLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Instruments: ~income + farmPrice Estimate Std. Error t value Pr(>|t|) (Intercept) 103.5936 11.8930 8.71 1.1e-07 *** price -0.3449 0.1455 -2.37 0.03 * income 0.3260 0.0511 6.38 6.9e-06 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.947 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 64.445 MSE: 3.791 Root MSE: 1.947 Multiple R-Squared: 0.76 Adjusted R-Squared: 0.731 2SLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 47.3592 10.5362 4.49 0.00037 *** price 0.2443 0.0894 2.73 0.01475 * farmPrice 0.2657 0.0411 6.47 7.8e-06 *** trend 0.3260 0.0511 6.38 9.1e-06 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.504 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 100.321 MSE: 6.27 Root MSE: 2.504 Multiple R-Squared: 0.626 Adjusted R-Squared: 0.556 > nobs( fit2slsd2 ) [1] 40 > > ## **** 2SLS estimation with different instruments and restriction (methodResidCov="noDfCor") > fit2slsd2r <- systemfit( system, "2SLS", data = Kmenta, restrict.matrix = restrm, + inst = instlist, methodResidCov = "noDfCor", useMatrix = useMatrix ) > print( summary( fit2slsd2r ) ) systemfit results method: 2SLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 34 165 3.32 0.693 0.537 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 64.4 3.79 1.95 0.760 0.731 supply 20 16 100.3 6.27 2.50 0.626 0.556 The covariance matrix of the residuals demand supply demand 3.22 3.58 supply 3.58 5.02 The correlations of the residuals demand supply demand 1.000 0.891 supply 0.891 1.000 2SLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Instruments: ~income + farmPrice Estimate Std. Error t value Pr(>|t|) (Intercept) 103.5936 10.9648 9.45 4.9e-11 *** price -0.3449 0.1341 -2.57 0.015 * income 0.3260 0.0471 6.92 5.7e-08 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.947 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 64.445 MSE: 3.791 Root MSE: 1.947 Multiple R-Squared: 0.76 Adjusted R-Squared: 0.731 2SLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 47.3592 9.7139 4.88 2.5e-05 *** price 0.2443 0.0824 2.96 0.0055 ** farmPrice 0.2657 0.0379 7.01 4.3e-08 *** trend 0.3260 0.0471 6.92 5.7e-08 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.504 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 100.321 MSE: 6.27 Root MSE: 2.504 Multiple R-Squared: 0.626 Adjusted R-Squared: 0.556 > nobs( fit2slsd2r ) [1] 40 > > ## 2SLS estimation with different instr. and restr. (methodResidCov="noDfCor", singleEqSigma=T) > fit2slsd2rs <- systemfit( system, "2SLS", data = Kmenta, restrict.matrix = restrm, + inst = instlist, methodResidCov = "noDfCor", singleEqSigma = TRUE, + useMatrix = useMatrix ) > print( summary( fit2slsd2rs ) ) systemfit results method: 2SLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 34 165 3.32 0.693 0.537 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 64.4 3.79 1.95 0.760 0.731 supply 20 16 100.3 6.27 2.50 0.626 0.556 The covariance matrix of the residuals demand supply demand 3.22 3.58 supply 3.58 5.02 The correlations of the residuals demand supply demand 1.000 0.891 supply 0.891 1.000 2SLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Instruments: ~income + farmPrice Estimate Std. Error t value Pr(>|t|) (Intercept) 103.5936 9.7929 10.58 2.7e-12 *** price -0.3449 0.1220 -2.83 0.0078 ** income 0.3260 0.0444 7.35 1.6e-08 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.947 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 64.445 MSE: 3.791 Root MSE: 1.947 Multiple R-Squared: 0.76 Adjusted R-Squared: 0.731 2SLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 47.3592 10.6890 4.43 9.3e-05 *** price 0.2443 0.0910 2.69 0.011 * farmPrice 0.2657 0.0416 6.38 2.8e-07 *** trend 0.3260 0.0444 7.35 1.6e-08 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.504 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 100.321 MSE: 6.27 Root MSE: 2.504 Multiple R-Squared: 0.626 Adjusted R-Squared: 0.556 > nobs( fit2slsd2rs ) [1] 40 > > ## **** 2SLS estimation with different instruments and restriction via restrict.regMat * > ## 2SLS estimation with different instruments and restriction via restrict.regMat (default) > fit2slsd3 <- systemfit( system, "2SLS", data = Kmenta, restrict.regMat = tc, + inst = instlist, useMatrix = useMatrix ) > print( summary( fit2slsd3 ) ) systemfit results method: 2SLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 34 165 4.89 0.693 0.56 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 64.4 3.79 1.95 0.760 0.731 supply 20 16 100.3 6.27 2.50 0.626 0.556 The covariance matrix of the residuals demand supply demand 3.79 4.35 supply 4.35 6.27 The correlations of the residuals demand supply demand 1.000 0.891 supply 0.891 1.000 2SLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Instruments: ~income + farmPrice Estimate Std. Error t value Pr(>|t|) (Intercept) 103.5936 11.8930 8.71 3.5e-10 *** price -0.3449 0.1455 -2.37 0.024 * income 0.3260 0.0511 6.38 2.8e-07 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.947 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 64.445 MSE: 3.791 Root MSE: 1.947 Multiple R-Squared: 0.76 Adjusted R-Squared: 0.731 2SLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 47.3592 10.5362 4.49 7.7e-05 *** price 0.2443 0.0894 2.73 0.0099 ** farmPrice 0.2657 0.0411 6.47 2.1e-07 *** trend 0.3260 0.0511 6.38 2.8e-07 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.504 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 100.321 MSE: 6.27 Root MSE: 2.504 Multiple R-Squared: 0.626 Adjusted R-Squared: 0.556 > nobs( fit2slsd3 ) [1] 40 > > ## **** 2SLS estimation with different instr. and restr. via restrict.regMat (methodResidCov="noDfCor") > fit2slsd3r <- systemfit( system, "2SLS", data = Kmenta, restrict.regMat = tc, + inst = instlist, methodResidCov = "noDfCor", useMatrix = useMatrix ) > print( summary( fit2slsd3r ) ) systemfit results method: 2SLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 34 165 3.32 0.693 0.537 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 64.4 3.79 1.95 0.760 0.731 supply 20 16 100.3 6.27 2.50 0.626 0.556 The covariance matrix of the residuals demand supply demand 3.22 3.58 supply 3.58 5.02 The correlations of the residuals demand supply demand 1.000 0.891 supply 0.891 1.000 2SLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Instruments: ~income + farmPrice Estimate Std. Error t value Pr(>|t|) (Intercept) 103.5936 10.9648 9.45 4.9e-11 *** price -0.3449 0.1341 -2.57 0.015 * income 0.3260 0.0471 6.92 5.7e-08 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.947 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 64.445 MSE: 3.791 Root MSE: 1.947 Multiple R-Squared: 0.76 Adjusted R-Squared: 0.731 2SLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 47.3592 9.7139 4.88 2.5e-05 *** price 0.2443 0.0824 2.96 0.0055 ** farmPrice 0.2657 0.0379 7.01 4.3e-08 *** trend 0.3260 0.0471 6.92 5.7e-08 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.504 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 100.321 MSE: 6.27 Root MSE: 2.504 Multiple R-Squared: 0.626 Adjusted R-Squared: 0.556 > nobs( fit2slsd3r ) [1] 40 > > > ## *********** estimations with a single regressor ************ > fit2slsS1 <- systemfit( + list( consump ~ price - 1, price ~ consump + trend ), "2SLS", + data = Kmenta, inst = ~ farmPrice + trend + income, useMatrix = useMatrix ) > print( summary( fit2slsS1 ) ) systemfit results method: 2SLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 36 1544 179 -0.65 0.852 N DF SSR MSE RMSE R2 Adj R2 eq1 20 19 861 45.3 6.73 -2.213 -2.213 eq2 20 17 682 40.1 6.33 -0.022 -0.143 The covariance matrix of the residuals eq1 eq2 eq1 45.3 -40.5 eq2 -40.5 40.1 The correlations of the residuals eq1 eq2 eq1 1.00 -0.95 eq2 -0.95 1.00 2SLS estimates for 'eq1' (equation 1) Model Formula: consump ~ price - 1 Instruments: ~farmPrice + trend + income Estimate Std. Error t value Pr(>|t|) price 1.006 0.015 66.9 <2e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 6.734 on 19 degrees of freedom Number of observations: 20 Degrees of Freedom: 19 SSR: 861.48 MSE: 45.341 Root MSE: 6.734 Multiple R-Squared: -2.213 Adjusted R-Squared: -2.213 2SLS estimates for 'eq2' (equation 2) Model Formula: price ~ consump + trend Instruments: ~farmPrice + trend + income Estimate Std. Error t value Pr(>|t|) (Intercept) 55.5365 46.2668 1.20 0.25 consump 0.4453 0.4622 0.96 0.35 trend -0.0426 0.2496 -0.17 0.87 Residual standard error: 6.335 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 682.257 MSE: 40.133 Root MSE: 6.335 Multiple R-Squared: -0.022 Adjusted R-Squared: -0.143 > nobs( fit2slsS1 ) [1] 40 > fit2slsS2 <- systemfit( + list( consump ~ price - 1, consump ~ trend - 1 ), "2SLS", + data = Kmenta, inst = ~ farmPrice + price + income, useMatrix = useMatrix ) > print( summary( fit2slsS2 ) ) systemfit results method: 2SLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 38 47456 111148 -87.5 -5.28 N DF SSR MSE RMSE R2 Adj R2 eq1 20 19 861 45.3 6.73 -2.21 -2.21 eq2 20 19 46595 2452.3 49.52 -172.79 -172.79 The covariance matrix of the residuals eq1 eq2 eq1 45.34 -6.33 eq2 -6.33 2452.34 The correlations of the residuals eq1 eq2 eq1 1.0000 -0.0448 eq2 -0.0448 1.0000 2SLS estimates for 'eq1' (equation 1) Model Formula: consump ~ price - 1 Instruments: ~farmPrice + price + income Estimate Std. Error t value Pr(>|t|) price 1.006 0.015 66.9 <2e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 6.733 on 19 degrees of freedom Number of observations: 20 Degrees of Freedom: 19 SSR: 861.449 MSE: 45.339 Root MSE: 6.733 Multiple R-Squared: -2.213 Adjusted R-Squared: -2.213 2SLS estimates for 'eq2' (equation 2) Model Formula: consump ~ trend - 1 Instruments: ~farmPrice + price + income Estimate Std. Error t value Pr(>|t|) trend 7.578 0.934 8.11 1.4e-07 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 49.521 on 19 degrees of freedom Number of observations: 20 Degrees of Freedom: 19 SSR: 46594.549 MSE: 2452.345 Root MSE: 49.521 Multiple R-Squared: -172.786 Adjusted R-Squared: -172.786 > nobs( fit2slsS2 ) [1] 40 > fit2slsS3 <- systemfit( + list( consump ~ trend - 1, price ~ trend - 1 ), "2SLS", + data = Kmenta, inst = instlist, useMatrix = useMatrix ) > print( summary( fit2slsS3 ) ) systemfit results method: 2SLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 38 97978 687515 -104 -10.6 N DF SSR MSE RMSE R2 Adj R2 eq1 20 19 50950 2682 51.8 -189.0 -189.0 eq2 20 19 47028 2475 49.8 -69.5 -69.5 The covariance matrix of the residuals eq1 eq2 eq1 2682 2439 eq2 2439 2475 The correlations of the residuals eq1 eq2 eq1 1.000 0.989 eq2 0.989 1.000 2SLS estimates for 'eq1' (equation 1) Model Formula: consump ~ trend - 1 Instruments: ~income + farmPrice Estimate Std. Error t value Pr(>|t|) trend 8.65 1.05 8.27 1e-07 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 51.784 on 19 degrees of freedom Number of observations: 20 Degrees of Freedom: 19 SSR: 50949.985 MSE: 2681.578 Root MSE: 51.784 Multiple R-Squared: -189.031 Adjusted R-Squared: -189.031 2SLS estimates for 'eq2' (equation 2) Model Formula: price ~ trend - 1 Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) trend 7.318 0.929 7.88 2.1e-07 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 49.751 on 19 degrees of freedom Number of observations: 20 Degrees of Freedom: 19 SSR: 47028.107 MSE: 2475.164 Root MSE: 49.751 Multiple R-Squared: -69.48 Adjusted R-Squared: -69.48 > nobs( fit2slsS3 ) [1] 40 > fit2slsS4 <- systemfit( + list( consump ~ trend - 1, price ~ trend - 1 ), "2SLS", + data = Kmenta, inst = ~ farmPrice + trend + income, + restrict.matrix = matrix( c( 1, -1 ), nrow = 1 ), useMatrix = useMatrix ) > print( summary( fit2slsS4 ) ) systemfit results method: 2SLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 39 93548 111736 -99 -1.03 N DF SSR MSE RMSE R2 Adj R2 eq1 20 19 46514 2448 49.5 -172.5 -172.5 eq2 20 19 47033 2475 49.8 -69.5 -69.5 The covariance matrix of the residuals eq1 eq2 eq1 2448 2439 eq2 2439 2475 The correlations of the residuals eq1 eq2 eq1 1.000 0.988 eq2 0.988 1.000 2SLS estimates for 'eq1' (equation 1) Model Formula: consump ~ trend - 1 Instruments: ~farmPrice + trend + income Estimate Std. Error t value Pr(>|t|) trend 7.362 0.646 11.4 5.7e-14 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 49.478 on 19 degrees of freedom Number of observations: 20 Degrees of Freedom: 19 SSR: 46514.283 MSE: 2448.12 Root MSE: 49.478 Multiple R-Squared: -172.487 Adjusted R-Squared: -172.487 2SLS estimates for 'eq2' (equation 2) Model Formula: price ~ trend - 1 Instruments: ~farmPrice + trend + income Estimate Std. Error t value Pr(>|t|) trend 7.362 0.646 11.4 5.7e-14 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 49.754 on 19 degrees of freedom Number of observations: 20 Degrees of Freedom: 19 SSR: 47033.469 MSE: 2475.446 Root MSE: 49.754 Multiple R-Squared: -69.488 Adjusted R-Squared: -69.488 > nobs( fit2slsS4 ) [1] 40 > fit2slsS5 <- systemfit( + list( consump ~ 1, price ~ 1 ), "2SLS", + data = Kmenta, inst = ~ farmPrice, useMatrix = useMatrix ) > print( summary( fit2slsS1 ) ) systemfit results method: 2SLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 36 1544 179 -0.65 0.852 N DF SSR MSE RMSE R2 Adj R2 eq1 20 19 861 45.3 6.73 -2.213 -2.213 eq2 20 17 682 40.1 6.33 -0.022 -0.143 The covariance matrix of the residuals eq1 eq2 eq1 45.3 -40.5 eq2 -40.5 40.1 The correlations of the residuals eq1 eq2 eq1 1.00 -0.95 eq2 -0.95 1.00 2SLS estimates for 'eq1' (equation 1) Model Formula: consump ~ price - 1 Instruments: ~farmPrice + trend + income Estimate Std. Error t value Pr(>|t|) price 1.006 0.015 66.9 <2e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 6.734 on 19 degrees of freedom Number of observations: 20 Degrees of Freedom: 19 SSR: 861.48 MSE: 45.341 Root MSE: 6.734 Multiple R-Squared: -2.213 Adjusted R-Squared: -2.213 2SLS estimates for 'eq2' (equation 2) Model Formula: price ~ consump + trend Instruments: ~farmPrice + trend + income Estimate Std. Error t value Pr(>|t|) (Intercept) 55.5365 46.2668 1.20 0.25 consump 0.4453 0.4622 0.96 0.35 trend -0.0426 0.2496 -0.17 0.87 Residual standard error: 6.335 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 682.257 MSE: 40.133 Root MSE: 6.335 Multiple R-Squared: -0.022 Adjusted R-Squared: -0.143 > > > ## **************** shorter summaries ********************** > print( summary( fit2sls1, useDfSys = TRUE, residCov = FALSE ) ) systemfit results method: 2SLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 33 162 4.36 0.697 0.548 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 65.7 3.87 1.97 0.755 0.726 supply 20 16 96.6 6.04 2.46 0.640 0.572 2SLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 94.6333 7.9208 11.95 1.6e-13 *** price -0.2436 0.0965 -2.52 0.017 * income 0.3140 0.0469 6.69 1.3e-07 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.966 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 65.729 MSE: 3.866 Root MSE: 1.966 Multiple R-Squared: 0.755 Adjusted R-Squared: 0.726 2SLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 49.5324 12.0105 4.12 0.00024 *** price 0.2401 0.0999 2.40 0.02208 * farmPrice 0.2556 0.0473 5.41 5.5e-06 *** trend 0.2529 0.0997 2.54 0.01605 * --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.458 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 96.633 MSE: 6.04 Root MSE: 2.458 Multiple R-Squared: 0.64 Adjusted R-Squared: 0.572 > > print( summary( fit2sls1, equations = FALSE ) ) systemfit results method: 2SLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 33 162 4.36 0.697 0.548 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 65.7 3.87 1.97 0.755 0.726 supply 20 16 96.6 6.04 2.46 0.640 0.572 The covariance matrix of the residuals demand supply demand 3.87 4.36 supply 4.36 6.04 The correlations of the residuals demand supply demand 1.000 0.902 supply 0.902 1.000 Coefficients: Estimate Std. Error t value Pr(>|t|) demand_(Intercept) 94.6333 7.9208 11.95 1.1e-09 *** demand_price -0.2436 0.0965 -2.52 0.0218 * demand_income 0.3140 0.0469 6.69 3.8e-06 *** supply_(Intercept) 49.5324 12.0105 4.12 0.0008 *** supply_price 0.2401 0.0999 2.40 0.0288 * supply_farmPrice 0.2556 0.0473 5.41 5.8e-05 *** supply_trend 0.2529 0.0997 2.54 0.0219 * --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 > > print( summary( fit2sls1rs, residCov = FALSE, equations = FALSE ) ) systemfit results method: 2SLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 33 162 2.97 0.697 0.525 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 65.7 3.87 1.97 0.755 0.726 supply 20 16 96.6 6.04 2.46 0.640 0.572 Coefficients: Estimate Std. Error t value Pr(>|t|) demand_(Intercept) 94.6333 8.1158 11.66 1.6e-09 *** demand_price -0.2436 0.0989 -2.46 0.02471 * demand_income 0.3140 0.0481 6.53 5.2e-06 *** supply_(Intercept) 49.5324 9.8463 5.03 0.00012 *** supply_price 0.2401 0.0819 2.93 0.00980 ** supply_farmPrice 0.2556 0.0387 6.60 6.1e-06 *** supply_trend 0.2529 0.0817 3.10 0.00694 ** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 > > print( summary( fit2sls2Sym, useDfSys = FALSE ), equations = FALSE ) systemfit results method: 2SLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 34 166 3.6 0.691 0.553 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 67.4 3.97 1.99 0.749 0.719 supply 20 16 98.2 6.13 2.48 0.634 0.565 The covariance matrix of the residuals demand supply demand 3.97 4.55 supply 4.55 6.13 The correlations of the residuals demand supply demand 1.000 0.923 supply 0.923 1.000 Coefficients: Estimate Std. Error t value Pr(>|t|) demand_(Intercept) 94.2816 8.8693 10.63 6.3e-09 *** demand_price -0.2247 0.1034 -2.17 0.04425 * demand_income 0.2983 0.0454 6.57 4.8e-06 *** supply_(Intercept) 48.1843 10.5384 4.57 0.00031 *** supply_price 0.2427 0.0896 2.71 0.01551 * supply_farmPrice 0.2619 0.0411 6.38 9.1e-06 *** supply_trend 0.2983 0.0454 6.57 6.4e-06 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 > > print( summary( fit2sls2 ), residCov = FALSE ) systemfit results method: 2SLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 34 166 3.6 0.691 0.553 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 67.4 3.97 1.99 0.749 0.719 supply 20 16 98.2 6.13 2.48 0.634 0.565 2SLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 94.2816 8.8693 10.63 2.4e-12 *** price -0.2247 0.1034 -2.17 0.037 * income 0.2983 0.0454 6.57 1.6e-07 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.991 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 67.418 MSE: 3.966 Root MSE: 1.991 Multiple R-Squared: 0.749 Adjusted R-Squared: 0.719 2SLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 48.1843 10.5384 4.57 6.1e-05 *** price 0.2427 0.0896 2.71 0.011 * farmPrice 0.2619 0.0411 6.38 2.8e-07 *** trend 0.2983 0.0454 6.57 1.6e-07 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.477 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 98.155 MSE: 6.135 Root MSE: 2.477 Multiple R-Squared: 0.634 Adjusted R-Squared: 0.565 > > print( summary( fit2sls3, useDfSys = FALSE, residCov = FALSE, + equations = FALSE ) ) systemfit results method: 2SLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 34 166 2.45 0.691 0.526 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 67.4 3.97 1.99 0.749 0.719 supply 20 16 98.2 6.13 2.48 0.634 0.565 Coefficients: Estimate Std. Error t value Pr(>|t|) demand_(Intercept) 94.2816 8.1771 11.53 1.8e-09 *** demand_price -0.2247 0.0954 -2.36 0.03071 * demand_income 0.2983 0.0419 7.13 1.7e-06 *** supply_(Intercept) 48.1843 9.7159 4.96 0.00014 *** supply_price 0.2427 0.0826 2.94 0.00966 ** supply_farmPrice 0.2619 0.0379 6.92 3.5e-06 *** supply_trend 0.2983 0.0419 7.13 2.4e-06 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 > > print( summary( fit2sls4s ), equations = FALSE, residCov = FALSE ) systemfit results method: 2SLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 35 166 3.78 0.69 0.568 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 66.1 3.89 1.97 0.754 0.725 supply 20 16 100.0 6.25 2.50 0.627 0.557 Coefficients: Estimate Std. Error t value Pr(>|t|) demand_(Intercept) 95.7059 6.3056 15.18 < 2e-16 *** demand_price -0.2433 0.0684 -3.56 0.00110 ** demand_income 0.3027 0.0394 7.69 5.1e-09 *** supply_(Intercept) 46.5637 8.3296 5.59 2.7e-06 *** supply_price 0.2567 0.0684 3.75 0.00064 *** supply_farmPrice 0.2637 0.0455 5.79 1.5e-06 *** supply_trend 0.3027 0.0394 7.69 5.1e-09 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 > > print( summary( fit2sls5r, equations = FALSE, residCov = FALSE ) ) systemfit results method: 2SLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 35 166 2.57 0.69 0.54 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 66.1 3.89 1.97 0.754 0.725 supply 20 16 100.0 6.25 2.50 0.627 0.557 Coefficients: Estimate Std. Error t value Pr(>|t|) demand_(Intercept) 95.7059 6.0044 15.94 < 2e-16 *** demand_price -0.2433 0.0621 -3.92 0.00039 *** demand_income 0.3027 0.0382 7.93 2.5e-09 *** supply_(Intercept) 46.5637 7.3842 6.31 3.1e-07 *** supply_price 0.2567 0.0621 4.14 0.00021 *** supply_farmPrice 0.2637 0.0373 7.08 3.0e-08 *** supply_trend 0.3027 0.0382 7.93 2.5e-09 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 > > print( summary( fit2slsd1s ), residCov = FALSE, equations = FALSE ) systemfit results method: 2SLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 33 164 9.25 0.694 0.512 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 67.4 3.97 1.99 0.748 0.719 supply 20 16 96.6 6.04 2.46 0.640 0.572 Coefficients: Estimate Std. Error t value Pr(>|t|) demand_(Intercept) 106.7894 12.4749 8.56 1.4e-07 *** demand_price -0.4116 0.1622 -2.54 0.02121 * demand_income 0.3617 0.0631 5.73 2.5e-05 *** supply_(Intercept) 49.5324 10.8976 4.55 0.00033 *** supply_price 0.2401 0.0907 2.65 0.01755 * supply_farmPrice 0.2556 0.0429 5.96 2.0e-05 *** supply_trend 0.2529 0.0904 2.80 0.01292 * --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 > > print( summary( fit2slsd2, residCov = FALSE, equations = FALSE ) ) systemfit results method: 2SLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 34 165 4.89 0.693 0.56 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 64.4 3.79 1.95 0.760 0.731 supply 20 16 100.3 6.27 2.50 0.626 0.556 Coefficients: Estimate Std. Error t value Pr(>|t|) demand_(Intercept) 103.5936 11.8930 8.71 3.5e-10 *** demand_price -0.3449 0.1455 -2.37 0.0236 * demand_income 0.3260 0.0511 6.38 2.8e-07 *** supply_(Intercept) 47.3592 10.5362 4.49 7.7e-05 *** supply_price 0.2443 0.0894 2.73 0.0099 ** supply_farmPrice 0.2657 0.0411 6.47 2.1e-07 *** supply_trend 0.3260 0.0511 6.38 2.8e-07 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 > > print( summary( fit2slsd3r ), residCov = FALSE, equations = FALSE ) systemfit results method: 2SLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 34 165 3.32 0.693 0.537 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 64.4 3.79 1.95 0.760 0.731 supply 20 16 100.3 6.27 2.50 0.626 0.556 Coefficients: Estimate Std. Error t value Pr(>|t|) demand_(Intercept) 103.5936 10.9648 9.45 4.9e-11 *** demand_price -0.3449 0.1341 -2.57 0.0147 * demand_income 0.3260 0.0471 6.92 5.7e-08 *** supply_(Intercept) 47.3592 9.7139 4.88 2.5e-05 *** supply_price 0.2443 0.0824 2.96 0.0055 ** supply_farmPrice 0.2657 0.0379 7.01 4.3e-08 *** supply_trend 0.3260 0.0471 6.92 5.7e-08 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 > > > ## ****************** residuals ************************** > print( residuals( fit2sls1 ) ) demand supply 1 0.843 -0.4348 2 -0.698 -1.2131 3 2.359 1.7090 4 1.490 0.7956 5 2.139 1.5942 6 1.277 0.6595 7 1.571 1.4346 8 -3.066 -4.8724 9 -1.125 -2.3975 10 2.492 3.1427 11 -0.108 0.0689 12 -2.292 -1.3978 13 -1.598 -1.1136 14 -0.271 1.1684 15 1.958 3.4865 16 -3.430 -3.8285 17 -0.313 0.6793 18 -2.151 -2.7713 19 1.592 2.6668 20 -0.668 0.6235 > print( residuals( fit2sls1$eq[[ 1 ]] ) ) 1 2 3 4 5 6 7 8 9 10 11 0.843 -0.698 2.359 1.490 2.139 1.277 1.571 -3.066 -1.125 2.492 -0.108 12 13 14 15 16 17 18 19 20 -2.292 -1.598 -0.271 1.958 -3.430 -0.313 -2.151 1.592 -0.668 > > print( residuals( fit2sls2s ) ) demand supply 1 0.678 -0.0135 2 -0.777 -0.8544 3 2.281 2.0245 4 1.416 1.0692 5 2.213 1.7598 6 1.334 0.7923 7 1.640 1.5342 8 -2.994 -4.8544 9 -1.072 -2.3959 10 2.522 3.1637 11 -0.330 0.1628 12 -2.593 -1.2864 13 -1.856 -1.0729 14 -0.356 1.1087 15 2.138 3.2597 16 -3.282 -4.1265 17 -0.076 0.3331 18 -2.119 -3.0961 19 1.690 2.3122 20 -0.458 0.1799 > print( residuals( fit2sls2s$eq[[ 2 ]] ) ) 1 2 3 4 5 6 7 8 9 10 -0.0135 -0.8544 2.0245 1.0692 1.7598 0.7923 1.5342 -4.8544 -2.3959 3.1637 11 12 13 14 15 16 17 18 19 20 0.1628 -1.2864 -1.0729 1.1087 3.2597 -4.1265 0.3331 -3.0961 2.3122 0.1799 > > print( residuals( fit2sls3 ) ) demand supply 1 0.678 -0.0135 2 -0.777 -0.8544 3 2.281 2.0245 4 1.416 1.0692 5 2.213 1.7598 6 1.334 0.7923 7 1.640 1.5342 8 -2.994 -4.8544 9 -1.072 -2.3959 10 2.522 3.1637 11 -0.330 0.1628 12 -2.593 -1.2864 13 -1.856 -1.0729 14 -0.356 1.1087 15 2.138 3.2597 16 -3.282 -4.1265 17 -0.076 0.3331 18 -2.119 -3.0961 19 1.690 2.3122 20 -0.458 0.1799 > print( residuals( fit2sls3$eq[[ 1 ]] ) ) 1 2 3 4 5 6 7 8 9 10 11 0.678 -0.777 2.281 1.416 2.213 1.334 1.640 -2.994 -1.072 2.522 -0.330 12 13 14 15 16 17 18 19 20 -2.593 -1.856 -0.356 2.138 -3.282 -0.076 -2.119 1.690 -0.458 > > print( residuals( fit2sls4r ) ) demand supply 1 0.729 0.0219 2 -0.698 -0.8806 3 2.349 2.0055 4 1.496 1.0326 5 2.165 1.7870 6 1.310 0.7993 7 1.635 1.5189 8 -2.951 -4.9334 9 -1.134 -2.3609 10 2.397 3.2818 11 -0.359 0.2857 12 -2.524 -1.2257 13 -1.745 -1.0782 14 -0.349 1.1382 15 2.022 3.2981 16 -3.345 -4.1440 17 -0.322 0.4686 18 -2.075 -3.1779 19 1.738 2.2072 20 -0.339 -0.0444 > print( residuals( fit2sls4r$eq[[ 2 ]] ) ) 1 2 3 4 5 6 7 8 9 10 0.0219 -0.8806 2.0055 1.0326 1.7870 0.7993 1.5189 -4.9334 -2.3609 3.2818 11 12 13 14 15 16 17 18 19 20 0.2857 -1.2257 -1.0782 1.1382 3.2981 -4.1440 0.4686 -3.1779 2.2072 -0.0444 > > print( residuals( fit2sls5rs ) ) demand supply 1 0.729 0.0219 2 -0.698 -0.8806 3 2.349 2.0055 4 1.496 1.0326 5 2.165 1.7870 6 1.310 0.7993 7 1.635 1.5189 8 -2.951 -4.9334 9 -1.134 -2.3609 10 2.397 3.2818 11 -0.359 0.2857 12 -2.524 -1.2257 13 -1.745 -1.0782 14 -0.349 1.1382 15 2.022 3.2981 16 -3.345 -4.1440 17 -0.322 0.4686 18 -2.075 -3.1779 19 1.738 2.2072 20 -0.339 -0.0444 > print( residuals( fit2sls5rs$eq[[ 1 ]] ) ) 1 2 3 4 5 6 7 8 9 10 11 0.729 -0.698 2.349 1.496 2.165 1.310 1.635 -2.951 -1.134 2.397 -0.359 12 13 14 15 16 17 18 19 20 -2.524 -1.745 -0.349 2.022 -3.345 -0.322 -2.075 1.738 -0.339 > > print( residuals( fit2slsd1 ) ) demand supply 1 1.3775 -0.4348 2 0.0125 -1.2131 3 2.9728 1.7090 4 2.2121 0.7956 5 1.6920 1.5942 6 1.0407 0.6595 7 1.4768 1.4346 8 -2.7583 -4.8724 9 -1.6807 -2.3975 10 1.4265 3.1427 11 -0.2029 0.0689 12 -1.5123 -1.3978 13 -0.4958 -1.1136 14 -0.1528 1.1684 15 0.8692 3.4865 16 -4.0547 -3.8285 17 -2.5309 0.6793 18 -1.8070 -2.7713 19 1.9299 2.6668 20 0.1853 0.6235 > print( residuals( fit2slsd1$eq[[ 2 ]] ) ) 1 2 3 4 5 6 7 8 9 10 -0.4348 -1.2131 1.7090 0.7956 1.5942 0.6595 1.4346 -4.8724 -2.3975 3.1427 11 12 13 14 15 16 17 18 19 20 0.0689 -1.3978 -1.1136 1.1684 3.4865 -3.8285 0.6793 -2.7713 2.6668 0.6235 > > print( residuals( fit2slsd2r ) ) demand supply 1 0.996 0.2444 2 -0.268 -0.6349 3 2.715 2.2177 4 1.936 1.2367 5 1.907 1.8612 6 1.184 0.8736 7 1.609 1.5951 8 -2.709 -4.8434 9 -1.476 -2.3949 10 1.705 3.1765 11 -0.540 0.2202 12 -2.167 -1.2182 13 -1.150 -1.0480 14 -0.316 1.0722 15 1.395 3.1209 16 -3.680 -4.3088 17 -1.669 0.1212 18 -1.829 -3.2948 19 2.016 2.0952 20 0.341 -0.0916 > print( residuals( fit2slsd2r$eq[[ 1 ]] ) ) 1 2 3 4 5 6 7 8 9 10 11 0.996 -0.268 2.715 1.936 1.907 1.184 1.609 -2.709 -1.476 1.705 -0.540 12 13 14 15 16 17 18 19 20 -2.167 -1.150 -0.316 1.395 -3.680 -1.669 -1.829 2.016 0.341 > > > ## *************** coefficients ********************* > print( round( coef( fit2sls1s ), digits = 6 ) ) demand_(Intercept) demand_price demand_income supply_(Intercept) 94.633 -0.244 0.314 49.532 supply_price supply_farmPrice supply_trend 0.240 0.256 0.253 > print( round( coef( fit2sls1s$eq[[ 1 ]] ), digits = 6 ) ) (Intercept) price income 94.633 -0.244 0.314 > > print( round( coef( fit2sls2 ), digits = 6 ) ) demand_(Intercept) demand_price demand_income supply_(Intercept) 94.282 -0.225 0.298 48.184 supply_price supply_farmPrice supply_trend 0.243 0.262 0.298 > print( round( coef( fit2sls2$eq[[ 2 ]] ), digits = 6 ) ) (Intercept) price farmPrice trend 48.184 0.243 0.262 0.298 > > print( round( coef( fit2sls3 ), digits = 6 ) ) demand_(Intercept) demand_price demand_income supply_(Intercept) 94.282 -0.225 0.298 48.184 supply_price supply_farmPrice supply_trend 0.243 0.262 0.298 > print( round( coef( fit2sls3, modified.regMat = TRUE ), digits = 6 ) ) C1 C2 C3 C4 C5 C6 94.282 -0.225 0.298 48.184 0.243 0.262 > print( round( coef( fit2sls3$eq[[ 1 ]] ), digits = 6 ) ) (Intercept) price income 94.282 -0.225 0.298 > > print( round( coef( fit2sls4s ), digits = 6 ) ) demand_(Intercept) demand_price demand_income supply_(Intercept) 95.706 -0.243 0.303 46.564 supply_price supply_farmPrice supply_trend 0.257 0.264 0.303 > print( round( coef( fit2sls4s$eq[[ 2 ]] ), digits = 6 ) ) (Intercept) price farmPrice trend 46.564 0.257 0.264 0.303 > > print( round( coef( fit2sls5r ), digits = 6 ) ) demand_(Intercept) demand_price demand_income supply_(Intercept) 95.706 -0.243 0.303 46.564 supply_price supply_farmPrice supply_trend 0.257 0.264 0.303 > print( round( coef( fit2sls5r, modified.regMat = TRUE ), digits = 6 ) ) C1 C2 C3 C4 C5 C6 95.706 -0.243 0.303 46.564 0.257 0.264 > print( round( coef( fit2sls5r$eq[[ 2 ]] ), digits = 6 ) ) (Intercept) price farmPrice trend 46.564 0.257 0.264 0.303 > > > ## *************** coefficients with stats ********************* > print( round( coef( summary( fit2sls1s ) ), digits = 6 ) ) Estimate Std. Error t value Pr(>|t|) demand_(Intercept) 94.633 8.9352 10.59 0.000000 demand_price -0.244 0.1088 -2.24 0.038916 demand_income 0.314 0.0530 5.93 0.000016 supply_(Intercept) 49.532 10.8404 4.57 0.000315 supply_price 0.240 0.0902 2.66 0.017058 supply_farmPrice 0.256 0.0426 5.99 0.000019 supply_trend 0.253 0.0899 2.81 0.012528 > print( round( coef( summary( fit2sls1s$eq[[ 1 ]] ) ), digits = 6 ) ) Estimate Std. Error t value Pr(>|t|) (Intercept) 94.633 8.935 10.59 0.000000 price -0.244 0.109 -2.24 0.038916 income 0.314 0.053 5.93 0.000016 > > print( round( coef( summary( fit2sls2, useDfSys = FALSE ) ), digits = 6 ) ) Estimate Std. Error t value Pr(>|t|) demand_(Intercept) 94.282 8.8693 10.63 0.000000 demand_price -0.225 0.1034 -2.17 0.044246 demand_income 0.298 0.0454 6.57 0.000005 supply_(Intercept) 48.184 10.5384 4.57 0.000313 supply_price 0.243 0.0896 2.71 0.015508 supply_farmPrice 0.262 0.0411 6.38 0.000009 supply_trend 0.298 0.0454 6.57 0.000006 > print( round( coef( summary( fit2sls2$eq[[ 2 ]], useDfSys = FALSE ) ), + digits = 6 ) ) Estimate Std. Error t value Pr(>|t|) (Intercept) 48.184 10.5384 4.57 0.000313 price 0.243 0.0896 2.71 0.015508 farmPrice 0.262 0.0411 6.38 0.000009 trend 0.298 0.0454 6.57 0.000006 > > print( round( coef( summary( fit2sls3 ) ), digits = 6 ) ) Estimate Std. Error t value Pr(>|t|) demand_(Intercept) 94.282 8.1771 11.53 0.000000 demand_price -0.225 0.0954 -2.36 0.024352 demand_income 0.298 0.0419 7.13 0.000000 supply_(Intercept) 48.184 9.7159 4.96 0.000019 supply_price 0.243 0.0826 2.94 0.005903 supply_farmPrice 0.262 0.0379 6.92 0.000000 supply_trend 0.298 0.0419 7.13 0.000000 > print( round( coef( summary( fit2sls3 ), modified.regMat = TRUE ), digits = 6 ) ) Estimate Std. Error t value Pr(>|t|) C1 94.282 8.1771 11.53 0.000000 C2 -0.225 0.0954 -2.36 0.024352 C3 0.298 0.0419 7.13 0.000000 C4 48.184 9.7159 4.96 0.000019 C5 0.243 0.0826 2.94 0.005903 C6 0.262 0.0379 6.92 0.000000 > print( round( coef( summary( fit2sls3$eq[[ 1 ]] ) ), digits = 6 ) ) Estimate Std. Error t value Pr(>|t|) (Intercept) 94.282 8.1771 11.53 0.0000 price -0.225 0.0954 -2.36 0.0244 income 0.298 0.0419 7.13 0.0000 > > print( round( coef( summary( fit2sls4s ) ), digits = 6 ) ) Estimate Std. Error t value Pr(>|t|) demand_(Intercept) 95.706 6.3056 15.18 0.000000 demand_price -0.243 0.0684 -3.56 0.001104 demand_income 0.303 0.0394 7.69 0.000000 supply_(Intercept) 46.564 8.3296 5.59 0.000003 supply_price 0.257 0.0684 3.75 0.000635 supply_farmPrice 0.264 0.0455 5.79 0.000001 supply_trend 0.303 0.0394 7.69 0.000000 > print( round( coef( summary( fit2sls4s$eq[[ 2 ]] ) ), digits = 6 ) ) Estimate Std. Error t value Pr(>|t|) (Intercept) 46.564 8.3296 5.59 0.000003 price 0.257 0.0684 3.75 0.000635 farmPrice 0.264 0.0455 5.79 0.000001 trend 0.303 0.0394 7.69 0.000000 > > print( round( coef( summary( fit2sls5r, useDfSys = FALSE ) ), digits = 6 ) ) Estimate Std. Error t value Pr(>|t|) demand_(Intercept) 95.706 6.0044 15.94 0.000000 demand_price -0.243 0.0621 -3.92 0.001102 demand_income 0.303 0.0382 7.93 0.000000 supply_(Intercept) 46.564 7.3842 6.31 0.000010 supply_price 0.257 0.0621 4.14 0.000774 supply_farmPrice 0.264 0.0373 7.08 0.000003 supply_trend 0.303 0.0382 7.93 0.000001 > print( round( coef( summary( fit2sls5r, useDfSys = FALSE ), + modified.regMat = TRUE ), digits = 6 ) ) Estimate Std. Error t value Pr(>|t|) C1 95.706 6.0044 15.94 NA C2 -0.243 0.0621 -3.92 NA C3 0.303 0.0382 7.93 NA C4 46.564 7.3842 6.31 NA C5 0.257 0.0621 4.14 NA C6 0.264 0.0373 7.08 NA > print( round( coef( summary( fit2sls5r$eq[[ 2 ]], useDfSys = FALSE ) ), + digits = 6 ) ) Estimate Std. Error t value Pr(>|t|) (Intercept) 46.564 7.3842 6.31 0.000010 price 0.257 0.0621 4.14 0.000774 farmPrice 0.264 0.0373 7.08 0.000003 trend 0.303 0.0382 7.93 0.000001 > > > ## *********** variance covariance matrix of the coefficients ******* > print( round( vcov( fit2sls1s ), digits = 6 ) ) demand_(Intercept) demand_price demand_income demand_(Intercept) 79.8371 -0.85694 0.06274 demand_price -0.8569 0.01185 -0.00336 demand_income 0.0627 -0.00336 0.00280 supply_(Intercept) 0.0000 0.00000 0.00000 supply_price 0.0000 0.00000 0.00000 supply_farmPrice 0.0000 0.00000 0.00000 supply_trend 0.0000 0.00000 0.00000 supply_(Intercept) supply_price supply_farmPrice demand_(Intercept) 0.000 0.000000 0.000000 demand_price 0.000 0.000000 0.000000 demand_income 0.000 0.000000 0.000000 supply_(Intercept) 117.514 -0.892363 -0.263795 supply_price -0.892 0.008136 0.000763 supply_farmPrice -0.264 0.000763 0.001819 supply_trend -0.241 0.000472 0.001122 supply_trend demand_(Intercept) 0.000000 demand_price 0.000000 demand_income 0.000000 supply_(Intercept) -0.240505 supply_price 0.000472 supply_farmPrice 0.001122 supply_trend 0.008090 > print( round( vcov( fit2sls1s$eq[[ 1 ]] ), digits = 6 ) ) (Intercept) price income (Intercept) 79.8371 -0.85694 0.06274 price -0.8569 0.01185 -0.00336 income 0.0627 -0.00336 0.00280 > > print( round( vcov( fit2sls1r ), digits = 6 ) ) demand_(Intercept) demand_price demand_income demand_(Intercept) 53.3287 -0.57241 0.04191 demand_price -0.5724 0.00791 -0.00225 demand_income 0.0419 -0.00225 0.00187 supply_(Intercept) 0.0000 0.00000 0.00000 supply_price 0.0000 0.00000 0.00000 supply_farmPrice 0.0000 0.00000 0.00000 supply_trend 0.0000 0.00000 0.00000 supply_(Intercept) supply_price supply_farmPrice demand_(Intercept) 0.000 0.000000 0.000000 demand_price 0.000 0.000000 0.000000 demand_income 0.000 0.000000 0.000000 supply_(Intercept) 115.402 -0.876328 -0.259055 supply_price -0.876 0.007989 0.000749 supply_farmPrice -0.259 0.000749 0.001786 supply_trend -0.236 0.000463 0.001101 supply_trend demand_(Intercept) 0.000000 demand_price 0.000000 demand_income 0.000000 supply_(Intercept) -0.236183 supply_price 0.000463 supply_farmPrice 0.001101 supply_trend 0.007945 > print( round( vcov( fit2sls1r$eq[[ 2 ]] ), digits = 6 ) ) (Intercept) price farmPrice trend (Intercept) 115.402 -0.876328 -0.259055 -0.236183 price -0.876 0.007989 0.000749 0.000463 farmPrice -0.259 0.000749 0.001786 0.001101 trend -0.236 0.000463 0.001101 0.007945 > > print( round( vcov( fit2sls2 ), digits = 6 ) ) demand_(Intercept) demand_price demand_income demand_(Intercept) 78.66379 -0.829021 0.046112 demand_price -0.82902 0.010698 -0.002471 demand_income 0.04611 -0.002471 0.002061 supply_(Intercept) -1.37081 0.073457 -0.061273 supply_price 0.00269 -0.000144 0.000120 supply_farmPrice 0.00639 -0.000343 0.000286 supply_trend 0.04611 -0.002471 0.002061 supply_(Intercept) supply_price supply_farmPrice demand_(Intercept) -1.3708 0.002689 0.006393 demand_price 0.0735 -0.000144 -0.000343 demand_income -0.0613 0.000120 0.000286 supply_(Intercept) 111.0580 -0.872938 -0.236592 supply_price -0.8729 0.008032 0.000707 supply_farmPrice -0.2366 0.000707 0.001686 supply_trend -0.0613 0.000120 0.000286 supply_trend demand_(Intercept) 0.046112 demand_price -0.002471 demand_income 0.002061 supply_(Intercept) -0.061273 supply_price 0.000120 supply_farmPrice 0.000286 supply_trend 0.002061 > print( round( vcov( fit2sls2$eq[[ 1 ]] ), digits = 6 ) ) (Intercept) price income (Intercept) 78.6638 -0.82902 0.04611 price -0.8290 0.01070 -0.00247 income 0.0461 -0.00247 0.00206 > > print( round( vcov( fit2sls3 ), digits = 6 ) ) demand_(Intercept) demand_price demand_income demand_(Intercept) 66.86423 -0.704668 0.039196 demand_price -0.70467 0.009094 -0.002100 demand_income 0.03920 -0.002100 0.001752 supply_(Intercept) -1.16519 0.062438 -0.052082 supply_price 0.00229 -0.000122 0.000102 supply_farmPrice 0.00543 -0.000291 0.000243 supply_trend 0.03920 -0.002100 0.001752 supply_(Intercept) supply_price supply_farmPrice demand_(Intercept) -1.1652 0.002285 0.005434 demand_price 0.0624 -0.000122 -0.000291 demand_income -0.0521 0.000102 0.000243 supply_(Intercept) 94.3993 -0.741997 -0.201104 supply_price -0.7420 0.006827 0.000601 supply_farmPrice -0.2011 0.000601 0.001433 supply_trend -0.0521 0.000102 0.000243 supply_trend demand_(Intercept) 0.039196 demand_price -0.002100 demand_income 0.001752 supply_(Intercept) -0.052082 supply_price 0.000102 supply_farmPrice 0.000243 supply_trend 0.001752 > print( round( vcov( fit2sls3, modified.regMat = TRUE ), digits = 6 ) ) C1 C2 C3 C4 C5 C6 C1 66.86423 -0.704668 0.039196 -1.1652 0.002285 0.005434 C2 -0.70467 0.009094 -0.002100 0.0624 -0.000122 -0.000291 C3 0.03920 -0.002100 0.001752 -0.0521 0.000102 0.000243 C4 -1.16519 0.062438 -0.052082 94.3993 -0.741997 -0.201104 C5 0.00229 -0.000122 0.000102 -0.7420 0.006827 0.000601 C6 0.00543 -0.000291 0.000243 -0.2011 0.000601 0.001433 > print( round( vcov( fit2sls3$eq[[ 2 ]] ), digits = 6 ) ) (Intercept) price farmPrice trend (Intercept) 94.3993 -0.741997 -0.201104 -0.052082 price -0.7420 0.006827 0.000601 0.000102 farmPrice -0.2011 0.000601 0.001433 0.000243 trend -0.0521 0.000102 0.000243 0.001752 > > print( round( vcov( fit2sls4s ), digits = 6 ) ) demand_(Intercept) demand_price demand_income demand_(Intercept) 39.7610 -0.358128 -0.03842 demand_price -0.3581 0.004681 -0.00113 demand_income -0.0384 -0.001129 0.00155 supply_(Intercept) 39.6949 -0.480685 0.08595 supply_price -0.3581 0.004681 -0.00113 supply_farmPrice -0.0359 0.000252 0.00011 supply_trend -0.0384 -0.001129 0.00155 supply_(Intercept) supply_price supply_farmPrice demand_(Intercept) 39.6949 -0.358128 -0.035932 demand_price -0.4807 0.004681 0.000252 demand_income 0.0859 -0.001129 0.000110 supply_(Intercept) 69.3817 -0.480685 -0.226588 supply_price -0.4807 0.004681 0.000252 supply_farmPrice -0.2266 0.000252 0.002072 supply_trend 0.0859 -0.001129 0.000110 supply_trend demand_(Intercept) -0.03842 demand_price -0.00113 demand_income 0.00155 supply_(Intercept) 0.08595 supply_price -0.00113 supply_farmPrice 0.00011 supply_trend 0.00155 > print( round( vcov( fit2sls4s$eq[[ 1 ]] ), digits = 6 ) ) (Intercept) price income (Intercept) 39.7610 -0.35813 -0.03842 price -0.3581 0.00468 -0.00113 income -0.0384 -0.00113 0.00155 > > print( round( vcov( fit2sls5r ), digits = 6 ) ) demand_(Intercept) demand_price demand_income demand_(Intercept) 36.0523 -0.302514 -0.057288 demand_price -0.3025 0.003851 -0.000847 demand_income -0.0573 -0.000847 0.001456 supply_(Intercept) 34.1121 -0.397307 0.057684 supply_price -0.3025 0.003851 -0.000847 supply_farmPrice -0.0337 0.000218 0.000122 supply_trend -0.0573 -0.000847 0.001456 supply_(Intercept) supply_price supply_farmPrice demand_(Intercept) 34.1121 -0.302514 -0.033671 demand_price -0.3973 0.003851 0.000218 demand_income 0.0577 -0.000847 0.000122 supply_(Intercept) 54.5267 -0.397307 -0.157170 supply_price -0.3973 0.003851 0.000218 supply_farmPrice -0.1572 0.000218 0.001388 supply_trend 0.0577 -0.000847 0.000122 supply_trend demand_(Intercept) -0.057288 demand_price -0.000847 demand_income 0.001456 supply_(Intercept) 0.057684 supply_price -0.000847 supply_farmPrice 0.000122 supply_trend 0.001456 > print( round( vcov( fit2sls5r, modified.regMat = TRUE ), digits = 6 ) ) C1 C2 C3 C4 C5 C6 C1 36.0523 -0.302514 -0.057288 34.1121 -0.302514 -0.033671 C2 -0.3025 0.003851 -0.000847 -0.3973 0.003851 0.000218 C3 -0.0573 -0.000847 0.001456 0.0577 -0.000847 0.000122 C4 34.1121 -0.397307 0.057684 54.5267 -0.397307 -0.157170 C5 -0.3025 0.003851 -0.000847 -0.3973 0.003851 0.000218 C6 -0.0337 0.000218 0.000122 -0.1572 0.000218 0.001388 > print( round( vcov( fit2sls5r$eq[[ 2 ]] ), digits = 6 ) ) (Intercept) price farmPrice trend (Intercept) 54.5267 -0.397307 -0.157170 0.057684 price -0.3973 0.003851 0.000218 -0.000847 farmPrice -0.1572 0.000218 0.001388 0.000122 trend 0.0577 -0.000847 0.000122 0.001456 > > print( round( vcov( fit2slsd1 ), digits = 6 ) ) demand_(Intercept) demand_price demand_income demand_(Intercept) 124.179 -1.51767 0.28519 demand_price -1.518 0.02098 -0.00595 demand_income 0.285 -0.00595 0.00318 supply_(Intercept) 0.000 0.00000 0.00000 supply_price 0.000 0.00000 0.00000 supply_farmPrice 0.000 0.00000 0.00000 supply_trend 0.000 0.00000 0.00000 supply_(Intercept) supply_price supply_farmPrice demand_(Intercept) 0.000 0.000000 0.000000 demand_price 0.000 0.000000 0.000000 demand_income 0.000 0.000000 0.000000 supply_(Intercept) 144.253 -1.095410 -0.323818 supply_price -1.095 0.009987 0.000936 supply_farmPrice -0.324 0.000936 0.002233 supply_trend -0.295 0.000579 0.001377 supply_trend demand_(Intercept) 0.000000 demand_price 0.000000 demand_income 0.000000 supply_(Intercept) -0.295229 supply_price 0.000579 supply_farmPrice 0.001377 supply_trend 0.009931 > print( round( vcov( fit2slsd1$eq[[ 1 ]] ), digits = 6 ) ) (Intercept) price income (Intercept) 124.179 -1.51767 0.28519 price -1.518 0.02098 -0.00595 income 0.285 -0.00595 0.00318 > > print( round( vcov( fit2slsd2rs ), digits = 6 ) ) demand_(Intercept) demand_price demand_income demand_(Intercept) 95.9017 -1.129212 0.176368 demand_price -1.1292 0.014881 -0.003682 demand_income 0.1764 -0.003682 0.001968 supply_(Intercept) -5.2430 0.109460 -0.058492 supply_price 0.0103 -0.000215 0.000115 supply_farmPrice 0.0245 -0.000510 0.000273 supply_trend 0.1764 -0.003682 0.001968 supply_(Intercept) supply_price supply_farmPrice demand_(Intercept) -5.2430 0.010284 0.024451 demand_price 0.1095 -0.000215 -0.000510 demand_income -0.0585 0.000115 0.000273 supply_(Intercept) 114.2555 -0.898881 -0.243056 supply_price -0.8989 0.008273 0.000727 supply_farmPrice -0.2431 0.000727 0.001733 supply_trend -0.0585 0.000115 0.000273 supply_trend demand_(Intercept) 0.176368 demand_price -0.003682 demand_income 0.001968 supply_(Intercept) -0.058492 supply_price 0.000115 supply_farmPrice 0.000273 supply_trend 0.001968 > print( round( vcov( fit2slsd2rs$eq[[ 2 ]] ), digits = 6 ) ) (Intercept) price farmPrice trend (Intercept) 114.2555 -0.898881 -0.243056 -0.058492 price -0.8989 0.008273 0.000727 0.000115 farmPrice -0.2431 0.000727 0.001733 0.000273 trend -0.0585 0.000115 0.000273 0.001968 > > print( round( vcov( fit2slsd3 ), digits = 6 ) ) demand_(Intercept) demand_price demand_income demand_(Intercept) 141.4425 -1.640068 0.234151 demand_price -1.6401 0.021165 -0.004888 demand_income 0.2342 -0.004888 0.002612 supply_(Intercept) -6.9607 0.145321 -0.077656 supply_price 0.0137 -0.000285 0.000152 supply_farmPrice 0.0325 -0.000678 0.000362 supply_trend 0.2342 -0.004888 0.002612 supply_(Intercept) supply_price supply_farmPrice demand_(Intercept) -6.9607 0.013653 0.032462 demand_price 0.1453 -0.000285 -0.000678 demand_income -0.0777 0.000152 0.000362 supply_(Intercept) 111.0123 -0.869653 -0.237751 supply_price -0.8697 0.007995 0.000708 supply_farmPrice -0.2378 0.000708 0.001688 supply_trend -0.0777 0.000152 0.000362 supply_trend demand_(Intercept) 0.234151 demand_price -0.004888 demand_income 0.002612 supply_(Intercept) -0.077656 supply_price 0.000152 supply_farmPrice 0.000362 supply_trend 0.002612 > print( round( vcov( fit2slsd3, modified.regMat = TRUE ), digits = 6 ) ) C1 C2 C3 C4 C5 C6 C1 141.4425 -1.640068 0.234151 -6.9607 0.013653 0.032462 C2 -1.6401 0.021165 -0.004888 0.1453 -0.000285 -0.000678 C3 0.2342 -0.004888 0.002612 -0.0777 0.000152 0.000362 C4 -6.9607 0.145321 -0.077656 111.0123 -0.869653 -0.237751 C5 0.0137 -0.000285 0.000152 -0.8697 0.007995 0.000708 C6 0.0325 -0.000678 0.000362 -0.2378 0.000708 0.001688 > print( round( vcov( fit2slsd3$eq[[ 1 ]] ), digits = 6 ) ) (Intercept) price income (Intercept) 141.442 -1.64007 0.23415 price -1.640 0.02116 -0.00489 income 0.234 -0.00489 0.00261 > > > ## *********** confidence intervals of coefficients ************* > print( confint( fit2sls1 ) ) 2.5 % 97.5 % demand_(Intercept) 77.922 111.345 demand_price -0.447 -0.040 demand_income 0.215 0.413 supply_(Intercept) 24.071 74.994 supply_price 0.028 0.452 supply_farmPrice 0.155 0.356 supply_trend 0.042 0.464 > print( confint( fit2sls1$eq[[ 1 ]], level = 0.9 ) ) 5 % 95 % (Intercept) 80.854 108.412 price -0.411 -0.076 income 0.232 0.396 > > print( confint( fit2sls2s, level = 0.9 ) ) 5 % 95 % demand_(Intercept) 78.005 110.558 demand_price -0.417 -0.032 demand_income 0.211 0.386 supply_(Intercept) 24.204 72.165 supply_price 0.038 0.447 supply_farmPrice 0.169 0.355 supply_trend 0.211 0.386 > print( confint( fit2sls2s$eq[[ 2 ]], level = 0.99 ) ) 0.5 % 99.5 % (Intercept) 15.989 80.380 price -0.032 0.517 farmPrice 0.137 0.387 trend 0.181 0.416 > > print( confint( fit2sls3, level = 0.99, useDfSys = TRUE ) ) 0.5 % 99.5 % demand_(Intercept) 77.664 110.899 demand_price -0.419 -0.031 demand_income 0.213 0.383 supply_(Intercept) 28.439 67.929 supply_price 0.075 0.411 supply_farmPrice 0.185 0.339 supply_trend 0.213 0.383 > print( confint( fit2sls3$eq[[ 1 ]], level = 0.5, useDfSys = TRUE ) ) 25 % 75 % (Intercept) 88.71 99.857 price -0.29 -0.160 income 0.27 0.327 > > print( confint( fit2sls4r, level = 0.5 ) ) 25 % 75 % demand_(Intercept) 83.516 107.895 demand_price -0.369 -0.117 demand_income 0.225 0.380 supply_(Intercept) 31.573 61.554 supply_price 0.131 0.383 supply_farmPrice 0.188 0.339 supply_trend 0.225 0.380 > print( confint( fit2sls4r$eq[[ 2 ]], level = 0.25 ) ) 37.5 % 62.5 % (Intercept) 44.192 48.935 price 0.237 0.277 farmPrice 0.252 0.276 trend 0.290 0.315 > > print( confint( fit2sls5rs, level = 0.25 ) ) 37.5 % 62.5 % demand_(Intercept) 84.017 107.395 demand_price -0.369 -0.117 demand_income 0.230 0.376 supply_(Intercept) 31.265 61.863 supply_price 0.131 0.383 supply_farmPrice 0.181 0.346 supply_trend 0.230 0.376 > print( confint( fit2sls5rs$eq[[ 1 ]], level = 0.975 ) ) 1.3 % 98.8 % (Intercept) 82.221 109.191 price -0.389 -0.098 income 0.218 0.387 > > print( confint( fit2slsd1, level = 0.975, useDfSys = TRUE ) ) 1.3 % 98.8 % demand_(Intercept) 84.118 129.461 demand_price -0.706 -0.117 demand_income 0.247 0.476 supply_(Intercept) 25.097 73.968 supply_price 0.037 0.443 supply_farmPrice 0.159 0.352 supply_trend 0.050 0.456 > print( confint( fit2slsd1$eq[[ 2 ]], level = 0.999, useDfSys = TRUE ) ) 0.1 % 100 % (Intercept) 6.163 92.901 price -0.121 0.601 farmPrice 0.085 0.426 trend -0.107 0.613 > > print( confint( fit2slsd2r, level = 0.999 ) ) 0.1 % 100 % demand_(Intercept) 81.311 125.877 demand_price -0.617 -0.072 demand_income 0.230 0.422 supply_(Intercept) 27.618 67.100 supply_price 0.077 0.412 supply_farmPrice 0.189 0.343 supply_trend 0.230 0.422 > print( confint( fit2slsd2r$eq[[ 1 ]] ) ) 2.5 % 97.5 % (Intercept) 81.311 125.877 price -0.617 -0.072 income 0.230 0.422 > > > ## *********** fitted values ************* > print( fitted( fit2sls1, se.fit = TRUE, interval = "prediction" ) ) demand supply 1 97.6 98.9 2 99.9 100.4 3 99.8 100.5 4 100.0 100.7 5 102.1 102.6 6 102.0 102.6 7 102.4 102.6 8 103.0 104.8 9 101.5 102.7 10 100.3 99.7 11 95.5 95.4 12 94.7 93.8 13 96.1 95.6 14 99.0 97.6 15 103.8 102.3 16 103.7 104.1 17 103.8 102.8 18 102.1 102.7 19 103.6 102.6 20 106.9 105.6 > print( fitted( fit2sls1$eq[[ 1 ]] ) ) 1 2 3 4 5 6 7 8 9 10 11 12 13 97.6 99.9 99.8 100.0 102.1 102.0 102.4 103.0 101.5 100.3 95.5 94.7 96.1 14 15 16 17 18 19 20 99.0 103.8 103.7 103.8 102.1 103.6 106.9 > > print( fitted( fit2sls2s ) ) demand supply 1 97.8 98.5 2 100.0 100.0 3 99.9 100.1 4 100.1 100.4 5 102.0 102.5 6 101.9 102.5 7 102.4 102.5 8 102.9 104.8 9 101.4 102.7 10 100.3 99.7 11 95.8 95.3 12 95.0 93.7 13 96.4 95.6 14 99.1 97.6 15 103.7 102.5 16 103.5 104.4 17 103.6 103.2 18 102.0 103.0 19 103.5 102.9 20 106.7 106.1 > print( fitted( fit2sls2s$eq[[ 2 ]] ) ) 1 2 3 4 5 6 7 8 9 10 11 12 13 98.5 100.0 100.1 100.4 102.5 102.5 102.5 104.8 102.7 99.7 95.3 93.7 95.6 14 15 16 17 18 19 20 97.6 102.5 104.4 103.2 103.0 102.9 106.1 > > print( fitted( fit2sls3 ) ) demand supply 1 97.8 98.5 2 100.0 100.0 3 99.9 100.1 4 100.1 100.4 5 102.0 102.5 6 101.9 102.5 7 102.4 102.5 8 102.9 104.8 9 101.4 102.7 10 100.3 99.7 11 95.8 95.3 12 95.0 93.7 13 96.4 95.6 14 99.1 97.6 15 103.7 102.5 16 103.5 104.4 17 103.6 103.2 18 102.0 103.0 19 103.5 102.9 20 106.7 106.1 > print( fitted( fit2sls3$eq[[ 1 ]] ) ) 1 2 3 4 5 6 7 8 9 10 11 12 13 97.8 100.0 99.9 100.1 102.0 101.9 102.4 102.9 101.4 100.3 95.8 95.0 96.4 14 15 16 17 18 19 20 99.1 103.7 103.5 103.6 102.0 103.5 106.7 > > print( fitted( fit2sls4r ) ) demand supply 1 97.8 98.5 2 99.9 100.1 3 99.8 100.2 4 100.0 100.5 5 102.1 102.5 6 101.9 102.4 7 102.4 102.5 8 102.9 104.8 9 101.5 102.7 10 100.4 99.5 11 95.8 95.1 12 94.9 93.6 13 96.3 95.6 14 99.1 97.6 15 103.8 102.5 16 103.6 104.4 17 103.8 103.1 18 102.0 103.1 19 103.5 103.0 20 106.6 106.3 > print( fitted( fit2sls4r$eq[[ 2 ]] ) ) 1 2 3 4 5 6 7 8 9 10 11 12 13 98.5 100.1 100.2 100.5 102.5 102.4 102.5 104.8 102.7 99.5 95.1 93.6 95.6 14 15 16 17 18 19 20 97.6 102.5 104.4 103.1 103.1 103.0 106.3 > > print( fitted( fit2sls5rs ) ) demand supply 1 97.8 98.5 2 99.9 100.1 3 99.8 100.2 4 100.0 100.5 5 102.1 102.5 6 101.9 102.4 7 102.4 102.5 8 102.9 104.8 9 101.5 102.7 10 100.4 99.5 11 95.8 95.1 12 94.9 93.6 13 96.3 95.6 14 99.1 97.6 15 103.8 102.5 16 103.6 104.4 17 103.8 103.1 18 102.0 103.1 19 103.5 103.0 20 106.6 106.3 > print( fitted( fit2sls5rs$eq[[ 1 ]] ) ) 1 2 3 4 5 6 7 8 9 10 11 12 13 97.8 99.9 99.8 100.0 102.1 101.9 102.4 102.9 101.5 100.4 95.8 94.9 96.3 14 15 16 17 18 19 20 99.1 103.8 103.6 103.8 102.0 103.5 106.6 > > print( fitted( fit2slsd1 ) ) demand supply 1 97.1 98.9 2 99.2 100.4 3 99.2 100.5 4 99.3 100.7 5 102.5 102.6 6 102.2 102.6 7 102.5 102.6 8 102.7 104.8 9 102.0 102.7 10 101.4 99.7 11 95.6 95.4 12 93.9 93.8 13 95.0 95.6 14 98.9 97.6 15 104.9 102.3 16 104.3 104.1 17 106.1 102.8 18 101.7 102.7 19 103.3 102.6 20 106.0 105.6 > print( fitted( fit2slsd1$eq[[ 2 ]] ) ) 1 2 3 4 5 6 7 8 9 10 11 12 13 98.9 100.4 100.5 100.7 102.6 102.6 102.6 104.8 102.7 99.7 95.4 93.8 95.6 14 15 16 17 18 19 20 97.6 102.3 104.1 102.8 102.7 102.6 105.6 > > print( fitted( fit2slsd2r ) ) demand supply 1 97.5 98.2 2 99.5 99.8 3 99.4 99.9 4 99.6 100.3 5 102.3 102.4 6 102.1 102.4 7 102.4 102.4 8 102.6 104.7 9 101.8 102.7 10 101.1 99.6 11 96.0 95.2 12 94.6 93.6 13 95.7 95.6 14 99.1 97.7 15 104.4 102.7 16 103.9 104.5 17 105.2 103.4 18 101.8 103.2 19 103.2 103.1 20 105.9 106.3 > print( fitted( fit2slsd2r$eq[[ 1 ]] ) ) 1 2 3 4 5 6 7 8 9 10 11 12 13 97.5 99.5 99.4 99.6 102.3 102.1 102.4 102.6 101.8 101.1 96.0 94.6 95.7 14 15 16 17 18 19 20 99.1 104.4 103.9 105.2 101.8 103.2 105.9 > > > ## *********** predicted values ************* > predictData <- Kmenta > predictData$consump <- NULL > predictData$price <- Kmenta$price * 0.9 > predictData$income <- Kmenta$income * 1.1 > > print( predict( fit2sls1, se.fit = TRUE, interval = "prediction" ) ) demand.pred demand.se.fit demand.lwr demand.upr supply.pred supply.se.fit 1 97.6 0.661 93.3 102.0 98.9 1.079 2 99.9 0.600 95.5 104.2 100.4 1.064 3 99.8 0.564 95.5 104.1 100.5 0.962 4 100.0 0.605 95.7 104.4 100.7 0.938 5 102.1 0.516 97.8 106.4 102.6 0.914 6 102.0 0.474 97.7 106.2 102.6 0.808 7 102.4 0.493 98.1 106.7 102.6 0.736 8 103.0 0.615 98.6 107.3 104.8 0.994 9 101.5 0.544 97.2 105.8 102.7 0.808 10 100.3 0.822 95.8 104.8 99.7 1.023 11 95.5 0.963 90.9 100.2 95.4 1.228 12 94.7 1.006 90.1 99.4 93.8 1.428 13 96.1 0.915 91.6 100.7 95.6 1.272 14 99.0 0.518 94.7 103.3 97.6 0.917 15 103.8 0.793 99.4 108.3 102.3 0.899 16 103.7 0.636 99.3 108.0 104.1 0.936 17 103.8 1.348 98.8 108.9 102.8 1.665 18 102.1 0.549 97.8 106.4 102.7 0.988 19 103.6 0.695 99.2 108.0 102.6 1.129 20 106.9 1.306 101.9 111.9 105.6 1.733 supply.lwr supply.upr 1 93.2 104.6 2 94.7 106.1 3 94.9 106.0 4 95.1 106.3 5 97.1 108.2 6 97.1 108.1 7 97.1 108.0 8 99.2 110.4 9 97.3 108.2 10 94.0 105.3 11 89.5 101.2 12 87.8 99.8 13 89.8 101.5 14 92.0 103.1 15 96.8 107.9 16 98.5 109.6 17 96.5 109.1 18 97.1 108.3 19 96.8 108.3 20 99.2 112.0 > print( predict( fit2sls1$eq[[ 1 ]], se.fit = TRUE, interval = "prediction" ) ) fit se.fit lwr upr 1 97.6 0.661 93.3 102.0 2 99.9 0.600 95.5 104.2 3 99.8 0.564 95.5 104.1 4 100.0 0.605 95.7 104.4 5 102.1 0.516 97.8 106.4 6 102.0 0.474 97.7 106.2 7 102.4 0.493 98.1 106.7 8 103.0 0.615 98.6 107.3 9 101.5 0.544 97.2 105.8 10 100.3 0.822 95.8 104.8 11 95.5 0.963 90.9 100.2 12 94.7 1.006 90.1 99.4 13 96.1 0.915 91.6 100.7 14 99.0 0.518 94.7 103.3 15 103.8 0.793 99.4 108.3 16 103.7 0.636 99.3 108.0 17 103.8 1.348 98.8 108.9 18 102.1 0.549 97.8 106.4 19 103.6 0.695 99.2 108.0 20 106.9 1.306 101.9 111.9 > > print( predict( fit2sls2s, se.pred = TRUE, interval = "confidence", + level = 0.999, newdata = predictData ) ) demand.pred demand.se.pred demand.lwr demand.upr supply.pred supply.se.pred 1 102.7 2.23 99.1 106 96.1 2.75 2 105.2 2.23 101.6 109 97.5 2.64 3 105.1 2.24 101.4 109 97.6 2.65 4 105.4 2.23 101.8 109 97.9 2.62 5 107.2 2.52 101.7 113 100.1 2.83 6 107.1 2.46 101.9 112 100.0 2.77 7 107.7 2.45 102.6 113 100.0 2.70 8 108.5 2.41 103.6 113 102.2 2.65 9 106.5 2.53 100.9 112 100.4 2.87 10 105.0 2.66 98.7 111 97.4 3.10 11 100.1 2.42 95.1 105 93.0 3.17 12 99.5 2.22 96.0 103 91.3 3.14 13 101.2 2.13 98.5 104 93.1 2.95 14 104.0 2.32 99.7 108 95.3 2.91 15 108.9 2.74 102.1 116 100.2 2.92 16 108.9 2.62 102.7 115 102.0 2.79 17 108.4 3.09 99.9 117 101.1 3.37 18 107.5 2.36 102.9 112 100.5 2.65 19 109.2 2.44 104.1 114 100.3 2.64 20 113.0 2.67 106.6 119 103.3 2.58 supply.lwr supply.upr 1 91.8 100.4 2 94.3 100.8 3 94.2 101.0 4 94.8 101.0 5 95.2 105.0 6 95.6 104.5 7 96.1 103.9 8 98.9 105.6 9 95.2 105.6 10 90.7 104.1 11 85.9 100.2 12 84.4 98.3 13 87.3 98.9 14 89.7 100.8 15 94.7 105.8 16 97.3 106.6 17 92.9 109.3 18 97.1 103.9 19 97.1 103.6 20 100.7 105.9 > print( predict( fit2sls2s$eq[[ 2 ]], se.pred = TRUE, interval = "confidence", + level = 0.999, newdata = predictData ) ) fit se.pred lwr upr 1 96.1 2.75 91.8 100.4 2 97.5 2.64 94.3 100.8 3 97.6 2.65 94.2 101.0 4 97.9 2.62 94.8 101.0 5 100.1 2.83 95.2 105.0 6 100.0 2.77 95.6 104.5 7 100.0 2.70 96.1 103.9 8 102.2 2.65 98.9 105.6 9 100.4 2.87 95.2 105.6 10 97.4 3.10 90.7 104.1 11 93.0 3.17 85.9 100.2 12 91.3 3.14 84.4 98.3 13 93.1 2.95 87.3 98.9 14 95.3 2.91 89.7 100.8 15 100.2 2.92 94.7 105.8 16 102.0 2.79 97.3 106.6 17 101.1 3.37 92.9 109.3 18 100.5 2.65 97.1 103.9 19 100.3 2.64 97.1 103.6 20 103.3 2.58 100.7 105.9 > > print( predict( fit2sls3, se.pred = TRUE, interval = "prediction", + level = 0.975, useDfSys = TRUE ) ) demand.pred demand.se.pred demand.lwr demand.upr supply.pred supply.se.pred 1 97.8 2.09 92.9 103 98.5 2.55 2 100.0 2.08 95.1 105 100.0 2.57 3 99.9 2.07 95.0 105 100.1 2.55 4 100.1 2.08 95.2 105 100.4 2.56 5 102.0 2.06 97.2 107 102.5 2.58 6 101.9 2.05 97.1 107 102.5 2.56 7 102.4 2.05 97.5 107 102.5 2.55 8 102.9 2.09 98.0 108 104.8 2.61 9 101.4 2.07 96.6 106 102.7 2.57 10 100.3 2.17 95.2 105 99.7 2.62 11 95.8 2.20 90.6 101 95.3 2.67 12 95.0 2.20 89.9 100 93.7 2.74 13 96.4 2.17 91.3 101 95.6 2.69 14 99.1 2.06 94.3 104 97.6 2.59 15 103.7 2.14 98.7 109 102.5 2.56 16 103.5 2.08 98.6 108 104.4 2.55 17 103.6 2.40 98.0 109 103.2 2.78 18 102.0 2.07 97.2 107 103.0 2.56 19 103.5 2.11 98.6 108 102.9 2.59 20 106.7 2.38 101.1 112 106.1 2.78 supply.lwr supply.upr 1 92.5 104 2 94.0 106 3 94.1 106 4 94.4 106 5 96.4 109 6 96.5 108 7 96.5 108 8 98.6 111 9 96.7 109 10 93.5 106 11 89.0 102 12 87.3 100 13 89.3 102 14 91.6 104 15 96.5 109 16 98.4 110 17 96.7 110 18 97.0 109 19 96.8 109 20 99.5 113 > print( predict( fit2sls3$eq[[ 1 ]], se.pred = TRUE, interval = "prediction", + level = 0.975, useDfSys = TRUE ) ) fit se.pred lwr upr 1 97.8 2.09 92.9 103 2 100.0 2.08 95.1 105 3 99.9 2.07 95.0 105 4 100.1 2.08 95.2 105 5 102.0 2.06 97.2 107 6 101.9 2.05 97.1 107 7 102.4 2.05 97.5 107 8 102.9 2.09 98.0 108 9 101.4 2.07 96.6 106 10 100.3 2.17 95.2 105 11 95.8 2.20 90.6 101 12 95.0 2.20 89.9 100 13 96.4 2.17 91.3 101 14 99.1 2.06 94.3 104 15 103.7 2.14 98.7 109 16 103.5 2.08 98.6 108 17 103.6 2.40 98.0 109 18 102.0 2.07 97.2 107 19 103.5 2.11 98.6 108 20 106.7 2.38 101.1 112 > > print( predict( fit2sls4r, se.fit = TRUE, interval = "confidence", + level = 0.25 ) ) demand.pred demand.se.fit demand.lwr demand.upr supply.pred supply.se.fit 1 97.8 0.602 97.6 97.9 98.5 0.586 2 99.9 0.526 99.7 100.1 100.1 0.672 3 99.8 0.508 99.7 100.0 100.2 0.621 4 100.0 0.530 99.8 100.2 100.5 0.632 5 102.1 0.488 101.9 102.2 102.5 0.704 6 101.9 0.474 101.8 102.1 102.4 0.636 7 102.4 0.498 102.2 102.5 102.5 0.587 8 102.9 0.604 102.7 103.0 104.8 0.764 9 101.5 0.502 101.3 101.6 102.7 0.656 10 100.4 0.696 100.2 100.6 99.5 0.710 11 95.8 0.928 95.5 96.1 95.1 0.885 12 94.9 0.889 94.7 95.2 93.6 1.146 13 96.3 0.739 96.0 96.5 95.6 1.052 14 99.1 0.519 98.9 99.3 97.6 0.746 15 103.8 0.626 103.6 104.0 102.5 0.637 16 103.6 0.566 103.4 103.8 104.4 0.615 17 103.8 0.942 103.5 104.1 103.1 1.153 18 102.0 0.540 101.8 102.2 103.1 0.556 19 103.5 0.677 103.3 103.7 103.0 0.631 20 106.6 1.226 106.2 107.0 106.3 0.900 supply.lwr supply.upr 1 98.3 98.7 2 99.9 100.3 3 100.0 100.4 4 100.3 100.7 5 102.2 102.7 6 102.2 102.6 7 102.3 102.7 8 104.6 105.1 9 102.5 102.9 10 99.3 99.8 11 94.9 95.4 12 93.3 94.0 13 95.3 96.0 14 97.4 97.9 15 102.3 102.7 16 104.2 104.6 17 102.7 103.4 18 102.9 103.3 19 102.8 103.2 20 106.0 106.6 > print( predict( fit2sls4r$eq[[ 2 ]], se.fit = TRUE, interval = "confidence", + level = 0.25 ) ) fit se.fit lwr upr 1 98.5 0.586 98.3 98.7 2 100.1 0.672 99.9 100.3 3 100.2 0.621 100.0 100.4 4 100.5 0.632 100.3 100.7 5 102.5 0.704 102.2 102.7 6 102.4 0.636 102.2 102.6 7 102.5 0.587 102.3 102.7 8 104.8 0.764 104.6 105.1 9 102.7 0.656 102.5 102.9 10 99.5 0.710 99.3 99.8 11 95.1 0.885 94.9 95.4 12 93.6 1.146 93.3 94.0 13 95.6 1.052 95.3 96.0 14 97.6 0.746 97.4 97.9 15 102.5 0.637 102.3 102.7 16 104.4 0.615 104.2 104.6 17 103.1 1.153 102.7 103.4 18 103.1 0.556 102.9 103.3 19 103.0 0.631 102.8 103.2 20 106.3 0.900 106.0 106.6 > > print( predict( fit2sls5rs, se.fit = TRUE, se.pred = TRUE, + interval = "prediction", level = 0.5, newdata = predictData ) ) demand.pred demand.se.fit demand.se.pred demand.lwr demand.upr supply.pred 1 102.8 0.713 2.10 101.4 104 95.9 2 105.4 0.742 2.11 103.9 107 97.4 3 105.3 0.751 2.11 103.8 107 97.5 4 105.5 0.749 2.11 104.1 107 97.8 5 107.5 1.080 2.25 105.9 109 99.9 6 107.4 1.031 2.23 105.9 109 99.9 7 107.9 1.040 2.23 106.4 109 99.9 8 108.7 1.044 2.23 107.1 110 102.1 9 106.8 1.073 2.24 105.2 108 100.2 10 105.3 1.188 2.30 103.8 107 97.2 11 100.3 1.013 2.22 98.8 102 92.8 12 99.7 0.770 2.12 98.2 101 91.1 13 101.3 0.584 2.06 99.9 103 93.0 14 104.3 0.833 2.14 102.8 106 95.1 15 109.2 1.310 2.37 107.6 111 100.1 16 109.1 1.214 2.32 107.6 111 101.8 17 108.9 1.582 2.53 107.1 111 100.8 18 107.7 0.958 2.19 106.2 109 100.4 19 109.4 1.111 2.26 107.9 111 100.3 20 113.2 1.529 2.50 111.5 115 103.4 supply.se.fit supply.se.pred supply.lwr supply.upr 1 0.746 2.61 94.1 97.7 2 0.628 2.58 95.6 99.1 3 0.642 2.58 95.7 99.3 4 0.607 2.57 96.0 99.5 5 0.978 2.68 98.1 101.8 6 0.881 2.65 98.1 101.7 7 0.786 2.62 98.1 101.7 8 0.780 2.62 100.4 103.9 9 1.031 2.70 98.4 102.1 10 1.212 2.78 95.3 99.1 11 1.339 2.84 90.8 94.7 12 1.478 2.90 89.1 93.1 13 1.292 2.81 91.1 94.9 14 1.123 2.74 93.2 97.0 15 1.105 2.73 98.2 101.9 16 0.996 2.69 100.0 103.7 17 1.636 2.99 98.8 102.9 18 0.777 2.62 98.7 102.2 19 0.775 2.62 98.5 102.1 20 0.600 2.57 101.6 105.1 > print( predict( fit2sls5rs$eq[[ 1 ]], se.fit = TRUE, se.pred = TRUE, + interval = "prediction", level = 0.5, newdata = predictData ) ) fit se.fit se.pred lwr upr 1 102.8 0.713 2.10 101.4 104 2 105.4 0.742 2.11 103.9 107 3 105.3 0.751 2.11 103.8 107 4 105.5 0.749 2.11 104.1 107 5 107.5 1.080 2.25 105.9 109 6 107.4 1.031 2.23 105.9 109 7 107.9 1.040 2.23 106.4 109 8 108.7 1.044 2.23 107.1 110 9 106.8 1.073 2.24 105.2 108 10 105.3 1.188 2.30 103.8 107 11 100.3 1.013 2.22 98.8 102 12 99.7 0.770 2.12 98.2 101 13 101.3 0.584 2.06 99.9 103 14 104.3 0.833 2.14 102.8 106 15 109.2 1.310 2.37 107.6 111 16 109.1 1.214 2.32 107.6 111 17 108.9 1.582 2.53 107.1 111 18 107.7 0.958 2.19 106.2 109 19 109.4 1.111 2.26 107.9 111 20 113.2 1.529 2.50 111.5 115 > > print( predict( fit2slsd1, se.fit = TRUE, se.pred = TRUE, + interval = "confidence", level = 0.99, useDfSys = TRUE ) ) demand.pred demand.se.fit demand.se.pred demand.lwr demand.upr supply.pred 1 97.1 0.751 2.13 95.1 99.2 98.9 2 99.2 0.757 2.13 97.1 101.2 100.4 3 99.2 0.692 2.11 97.3 101.1 100.5 4 99.3 0.766 2.13 97.2 101.4 100.7 5 102.5 0.595 2.08 100.9 104.2 102.6 6 102.2 0.503 2.05 100.8 103.6 102.6 7 102.5 0.503 2.05 101.1 103.9 102.6 8 102.7 0.653 2.10 100.9 104.4 104.8 9 102.0 0.655 2.10 100.2 103.8 102.7 10 101.4 1.074 2.26 98.5 104.3 99.7 11 95.6 0.978 2.22 93.0 98.3 95.4 12 93.9 1.134 2.29 90.8 97.0 93.8 13 95.0 1.162 2.31 91.9 98.2 95.6 14 98.9 0.530 2.06 97.5 100.4 97.6 15 104.9 1.061 2.26 102.0 107.8 102.3 16 104.3 0.757 2.13 102.2 106.3 104.1 17 106.1 1.963 2.80 100.7 111.4 102.8 18 101.7 0.597 2.08 100.1 103.4 102.7 19 103.3 0.736 2.12 101.3 105.3 102.6 20 106.0 1.430 2.45 102.1 110.0 105.6 supply.se.fit supply.se.pred supply.lwr supply.upr 1 1.079 2.68 96.0 101.9 2 1.064 2.68 97.5 103.3 3 0.962 2.64 97.8 103.1 4 0.938 2.63 98.1 103.3 5 0.914 2.62 100.1 105.1 6 0.808 2.59 100.4 104.8 7 0.736 2.57 100.5 104.6 8 0.994 2.65 102.1 107.5 9 0.808 2.59 100.5 105.0 10 1.023 2.66 96.9 102.5 11 1.228 2.75 92.0 98.7 12 1.428 2.84 89.9 97.7 13 1.272 2.77 92.2 99.1 14 0.917 2.62 95.1 100.1 15 0.899 2.62 99.9 104.8 16 0.936 2.63 101.5 106.6 17 1.665 2.97 98.3 107.4 18 0.988 2.65 100.0 105.4 19 1.129 2.70 99.5 105.6 20 1.733 3.01 100.9 110.3 > print( predict( fit2slsd1$eq[[ 2 ]], se.fit = TRUE, se.pred = TRUE, + interval = "confidence", level = 0.99, useDfSys = TRUE ) ) fit se.fit se.pred lwr upr 1 98.9 1.079 2.68 96.0 101.9 2 100.4 1.064 2.68 97.5 103.3 3 100.5 0.962 2.64 97.8 103.1 4 100.7 0.938 2.63 98.1 103.3 5 102.6 0.914 2.62 100.1 105.1 6 102.6 0.808 2.59 100.4 104.8 7 102.6 0.736 2.57 100.5 104.6 8 104.8 0.994 2.65 102.1 107.5 9 102.7 0.808 2.59 100.5 105.0 10 99.7 1.023 2.66 96.9 102.5 11 95.4 1.228 2.75 92.0 98.7 12 93.8 1.428 2.84 89.9 97.7 13 95.6 1.272 2.77 92.2 99.1 14 97.6 0.917 2.62 95.1 100.1 15 102.3 0.899 2.62 99.9 104.8 16 104.1 0.936 2.63 101.5 106.6 17 102.8 1.665 2.97 98.3 107.4 18 102.7 0.988 2.65 100.0 105.4 19 102.6 1.129 2.70 99.5 105.6 20 105.6 1.733 3.01 100.9 110.3 > > print( predict( fit2slsd2r, se.fit = TRUE, interval = "prediction", + level = 0.9, newdata = predictData ) ) demand.pred demand.se.fit demand.lwr demand.upr supply.pred supply.se.fit 1 104 1.34 99.8 108 95.8 1.026 2 106 1.27 102.3 110 97.3 0.786 3 106 1.32 102.2 110 97.4 0.804 4 106 1.27 102.4 110 97.7 0.734 5 109 2.06 104.2 114 100.0 1.130 6 109 1.92 104.1 113 99.9 1.014 7 109 1.86 104.7 114 99.9 0.893 8 110 1.67 105.4 114 102.2 0.765 9 108 2.12 103.4 113 100.4 1.187 10 107 2.45 101.9 112 97.4 1.525 11 102 1.85 97.1 106 92.9 1.627 12 101 1.26 96.6 104 91.2 1.587 13 102 0.98 98.3 106 93.1 1.314 14 105 1.63 101.1 110 95.3 1.253 15 111 2.53 105.6 116 100.4 1.269 16 111 2.23 105.7 116 102.1 1.075 17 111 3.28 104.9 118 101.3 1.888 18 109 1.59 104.5 113 100.7 0.796 19 110 1.70 106.1 115 100.5 0.772 20 114 1.87 109.4 119 103.6 0.656 supply.lwr supply.upr 1 91.2 100.4 2 92.8 101.7 3 93.0 101.9 4 93.3 102.1 5 95.3 104.6 6 95.4 104.5 7 95.4 104.4 8 97.8 106.6 9 95.7 105.1 10 92.5 102.4 11 87.9 98.0 12 86.2 96.2 13 88.3 97.9 14 90.5 100.0 15 95.6 105.1 16 97.5 106.7 17 96.0 106.6 18 96.2 105.1 19 96.1 105.0 20 99.2 107.9 > print( predict( fit2slsd2r$eq[[ 1 ]], se.fit = TRUE, interval = "prediction", + level = 0.9, newdata = predictData ) ) fit se.fit lwr upr 1 104 1.34 99.8 108 2 106 1.27 102.3 110 3 106 1.32 102.2 110 4 106 1.27 102.4 110 5 109 2.06 104.2 114 6 109 1.92 104.1 113 7 109 1.86 104.7 114 8 110 1.67 105.4 114 9 108 2.12 103.4 113 10 107 2.45 101.9 112 11 102 1.85 97.1 106 12 101 1.26 96.6 104 13 102 0.98 98.3 106 14 105 1.63 101.1 110 15 111 2.53 105.6 116 16 111 2.23 105.7 116 17 111 3.28 104.9 118 18 109 1.59 104.5 113 19 110 1.70 106.1 115 20 114 1.87 109.4 119 > > # predict just one observation > smallData <- data.frame( price = 130, income = 150, farmPrice = 120, + trend = 25 ) > > print( predict( fit2sls1rs, newdata = smallData ) ) demand.pred supply.pred 1 110 118 > print( predict( fit2sls1rs$eq[[ 1 ]], newdata = smallData ) ) fit 1 110 > > print( predict( fit2sls2, se.fit = TRUE, level = 0.9, + newdata = smallData ) ) demand.pred demand.se.fit supply.pred supply.se.fit 1 110 2.79 119 3.18 > print( predict( fit2sls2$eq[[ 1 ]], se.pred = TRUE, level = 0.99, + newdata = smallData ) ) fit se.pred 1 110 3.42 > > print( predict( fit2sls3, interval = "prediction", level = 0.975, + newdata = smallData ) ) demand.pred demand.lwr demand.upr supply.pred supply.lwr supply.upr 1 110 102 117 119 110 128 > print( predict( fit2sls3$eq[[ 1 ]], interval = "confidence", level = 0.8, + newdata = smallData ) ) fit lwr upr 1 110 106 113 > > print( predict( fit2sls4r, se.fit = TRUE, interval = "confidence", + level = 0.999, newdata = smallData ) ) demand.pred demand.se.fit demand.lwr demand.upr supply.pred supply.se.fit 1 109 2.24 101 118 119 2.09 supply.lwr supply.upr 1 112 127 > print( predict( fit2sls4r$eq[[ 2 ]], se.pred = TRUE, interval = "prediction", + level = 0.75, newdata = smallData ) ) fit se.pred lwr upr 1 119 3.26 115 123 > > print( predict( fit2sls5s, se.fit = TRUE, interval = "prediction", + newdata = smallData ) ) demand.pred demand.se.fit demand.lwr demand.upr supply.pred supply.se.fit 1 109 2.26 103 116 119 2.33 supply.lwr supply.upr 1 112 126 > print( predict( fit2sls5s$eq[[ 1 ]], se.pred = TRUE, interval = "confidence", + newdata = smallData ) ) fit se.pred lwr upr 1 109 3 105 114 > > print( predict( fit2slsd3, se.fit = TRUE, se.pred = TRUE, + interval = "prediction", level = 0.5, newdata = smallData ) ) demand.pred demand.se.fit demand.se.pred demand.lwr demand.upr supply.pred 1 108 3.33 3.86 105 110 119 supply.se.fit supply.se.pred supply.lwr supply.upr 1 3.2 4.07 116 122 > print( predict( fit2slsd3$eq[[ 1 ]], se.fit = TRUE, se.pred = TRUE, + interval = "confidence", level = 0.25, newdata = smallData ) ) fit se.fit se.pred lwr upr 1 108 3.33 3.86 107 109 > > > ## ************ correlation of predicted values *************** > print( correlation.systemfit( fit2sls1, 1, 2 ) ) [,1] [1,] 0 [2,] 0 [3,] 0 [4,] 0 [5,] 0 [6,] 0 [7,] 0 [8,] 0 [9,] 0 [10,] 0 [11,] 0 [12,] 0 [13,] 0 [14,] 0 [15,] 0 [16,] 0 [17,] 0 [18,] 0 [19,] 0 [20,] 0 > > print( correlation.systemfit( fit2sls2s, 2, 1 ) ) [,1] [1,] 0.413453 [2,] 0.153759 [3,] 0.152962 [4,] 0.112671 [5,] -0.071442 [6,] -0.053943 [7,] -0.050961 [8,] -0.005442 [9,] -0.000476 [10,] -0.001894 [11,] 0.047351 [12,] 0.064973 [13,] 0.024591 [14,] -0.028036 [15,] 0.175326 [16,] 0.254878 [17,] 0.104540 [18,] 0.065579 [19,] 0.147008 [20,] 0.124593 > > print( correlation.systemfit( fit2sls3, 1, 2 ) ) [,1] [1,] 0.44877 [2,] 0.16875 [3,] 0.16850 [4,] 0.12519 [5,] -0.08079 [6,] -0.06096 [7,] -0.05780 [8,] -0.00618 [9,] -0.00054 [10,] -0.00214 [11,] 0.05454 [12,] 0.07607 [13,] 0.02868 [14,] -0.03197 [15,] 0.19899 [16,] 0.28551 [17,] 0.11838 [18,] 0.07184 [19,] 0.16271 [20,] 0.13995 > > print( correlation.systemfit( fit2sls4r, 2, 1 ) ) [,1] [1,] 0.4078 [2,] 0.2866 [3,] 0.2528 [4,] 0.2836 [5,] -0.0300 [6,] -0.0537 [7,] -0.0627 [8,] 0.1044 [9,] 0.1003 [10,] 0.4530 [11,] 0.1293 [12,] 0.0184 [13,] 0.0449 [14,] -0.0409 [15,] 0.4229 [16,] 0.2649 [17,] 0.6554 [18,] 0.2693 [19,] 0.3831 [20,] 0.5784 > > print( correlation.systemfit( fit2sls5rs, 1, 2 ) ) [,1] [1,] 0.38438 [2,] 0.30697 [3,] 0.26690 [4,] 0.30163 [5,] -0.02768 [6,] -0.05086 [7,] -0.05895 [8,] 0.10102 [9,] 0.10072 [10,] 0.45547 [11,] 0.10817 [12,] 0.00552 [13,] 0.04219 [14,] -0.04054 [15,] 0.42100 [16,] 0.24974 [17,] 0.65722 [18,] 0.24286 [19,] 0.34336 [20,] 0.54717 > > print( correlation.systemfit( fit2slsd1, 2, 1 ) ) [,1] [1,] 0 [2,] 0 [3,] 0 [4,] 0 [5,] 0 [6,] 0 [7,] 0 [8,] 0 [9,] 0 [10,] 0 [11,] 0 [12,] 0 [13,] 0 [14,] 0 [15,] 0 [16,] 0 [17,] 0 [18,] 0 [19,] 0 [20,] 0 > > print( correlation.systemfit( fit2slsd2r, 1, 2 ) ) [,1] [1,] 0.51320 [2,] 0.27263 [3,] 0.26221 [4,] 0.21307 [5,] -0.11973 [6,] -0.08282 [7,] -0.06158 [8,] -0.00225 [9,] -0.00103 [10,] -0.00892 [11,] 0.04576 [12,] 0.08710 [13,] 0.03423 [14,] -0.03425 [15,] 0.25625 [16,] 0.35070 [17,] 0.17505 [18,] -0.02443 [19,] 0.07277 [20,] 0.05142 > > > ## ************ Log-Likelihood values *************** > print( logLik( fit2sls1 ) ) 'log Lik.' -67.6 (df=8) > print( logLik( fit2sls1, residCovDiag = TRUE ) ) 'log Lik.' -84.4 (df=8) > > print( logLik( fit2sls2s ) ) 'log Lik.' -65.7 (df=7) > print( logLik( fit2sls2s, residCovDiag = TRUE ) ) 'log Lik.' -84.8 (df=7) > > print( logLik( fit2sls3 ) ) 'log Lik.' -65.7 (df=7) > print( logLik( fit2sls3, residCovDiag = TRUE ) ) 'log Lik.' -84.8 (df=7) > > print( logLik( fit2sls4r ) ) 'log Lik.' -66.2 (df=6) > print( logLik( fit2sls4r, residCovDiag = TRUE ) ) 'log Lik.' -84.8 (df=6) > > print( logLik( fit2sls5rs ) ) 'log Lik.' -66.2 (df=6) > print( logLik( fit2sls5rs, residCovDiag = TRUE ) ) 'log Lik.' -84.8 (df=6) > > print( logLik( fit2slsd1 ) ) 'log Lik.' -75.1 (df=8) > print( logLik( fit2slsd1, residCovDiag = TRUE ) ) 'log Lik.' -84.7 (df=8) > > print( logLik( fit2slsd2r ) ) 'log Lik.' -68.8 (df=7) > print( logLik( fit2slsd2r, residCovDiag = TRUE ) ) 'log Lik.' -84.6 (df=7) > > > ## ************** F tests **************** > # testing first restriction > print( linearHypothesis( fit2sls1, restrm ) ) Linear hypothesis test (Theil's F test) Hypothesis: demand_income - supply_trend = 0 Model 1: restricted model Model 2: fit2sls1 Res.Df Df F Pr(>F) 1 34 2 33 1 0.06 0.8 > linearHypothesis( fit2sls1, restrict ) Linear hypothesis test (Theil's F test) Hypothesis: demand_income - supply_trend = 0 Model 1: restricted model Model 2: fit2sls1 Res.Df Df F Pr(>F) 1 34 2 33 1 0.06 0.8 > > print( linearHypothesis( fit2sls1s, restrm ) ) Linear hypothesis test (Theil's F test) Hypothesis: demand_income - supply_trend = 0 Model 1: restricted model Model 2: fit2sls1s Res.Df Df F Pr(>F) 1 34 2 33 1 0.07 0.79 > linearHypothesis( fit2sls1s, restrict ) Linear hypothesis test (Theil's F test) Hypothesis: demand_income - supply_trend = 0 Model 1: restricted model Model 2: fit2sls1s Res.Df Df F Pr(>F) 1 34 2 33 1 0.07 0.79 > > print( linearHypothesis( fit2sls1, restrm ) ) Linear hypothesis test (Theil's F test) Hypothesis: demand_income - supply_trend = 0 Model 1: restricted model Model 2: fit2sls1 Res.Df Df F Pr(>F) 1 34 2 33 1 0.06 0.8 > linearHypothesis( fit2sls1, restrict ) Linear hypothesis test (Theil's F test) Hypothesis: demand_income - supply_trend = 0 Model 1: restricted model Model 2: fit2sls1 Res.Df Df F Pr(>F) 1 34 2 33 1 0.06 0.8 > > print( linearHypothesis( fit2sls1r, restrm ) ) Linear hypothesis test (Theil's F test) Hypothesis: demand_income - supply_trend = 0 Model 1: restricted model Model 2: fit2sls1r Res.Df Df F Pr(>F) 1 34 2 33 1 0.08 0.78 > linearHypothesis( fit2sls1r, restrict ) Linear hypothesis test (Theil's F test) Hypothesis: demand_income - supply_trend = 0 Model 1: restricted model Model 2: fit2sls1r Res.Df Df F Pr(>F) 1 34 2 33 1 0.08 0.78 > > # testing second restriction > restrOnly2m <- matrix(0,1,7) > restrOnly2q <- 0.5 > restrOnly2m[1,2] <- -1 > restrOnly2m[1,5] <- 1 > restrictOnly2 <- "- demand_price + supply_price = 0.5" > # first restriction not imposed > print( linearHypothesis( fit2sls1, restrOnly2m, restrOnly2q ) ) Linear hypothesis test (Theil's F test) Hypothesis: - demand_price + supply_price = 0.5 Model 1: restricted model Model 2: fit2sls1 Res.Df Df F Pr(>F) 1 34 2 33 1 0 0.96 > linearHypothesis( fit2sls1, restrictOnly2 ) Linear hypothesis test (Theil's F test) Hypothesis: - demand_price + supply_price = 0.5 Model 1: restricted model Model 2: fit2sls1 Res.Df Df F Pr(>F) 1 34 2 33 1 0 0.96 > > # first restriction imposed > print( linearHypothesis( fit2sls2, restrOnly2m, restrOnly2q ) ) Linear hypothesis test (Theil's F test) Hypothesis: - demand_price + supply_price = 0.5 Model 1: restricted model Model 2: fit2sls2 Res.Df Df F Pr(>F) 1 35 2 34 1 0.01 0.92 > linearHypothesis( fit2sls2, restrictOnly2 ) Linear hypothesis test (Theil's F test) Hypothesis: - demand_price + supply_price = 0.5 Model 1: restricted model Model 2: fit2sls2 Res.Df Df F Pr(>F) 1 35 2 34 1 0.01 0.92 > > print( linearHypothesis( fit2sls2r, restrOnly2m, restrOnly2q ) ) Linear hypothesis test (Theil's F test) Hypothesis: - demand_price + supply_price = 0.5 Model 1: restricted model Model 2: fit2sls2r Res.Df Df F Pr(>F) 1 35 2 34 1 0.01 0.91 > linearHypothesis( fit2sls2r, restrictOnly2 ) Linear hypothesis test (Theil's F test) Hypothesis: - demand_price + supply_price = 0.5 Model 1: restricted model Model 2: fit2sls2r Res.Df Df F Pr(>F) 1 35 2 34 1 0.01 0.91 > > print( linearHypothesis( fit2sls3, restrOnly2m, restrOnly2q ) ) Linear hypothesis test (Theil's F test) Hypothesis: - demand_price + supply_price = 0.5 Model 1: restricted model Model 2: fit2sls3 Res.Df Df F Pr(>F) 1 35 2 34 1 0.01 0.91 > linearHypothesis( fit2sls3, restrictOnly2 ) Linear hypothesis test (Theil's F test) Hypothesis: - demand_price + supply_price = 0.5 Model 1: restricted model Model 2: fit2sls3 Res.Df Df F Pr(>F) 1 35 2 34 1 0.01 0.91 > > # testing both of the restrictions > print( linearHypothesis( fit2sls1, restr2m, restr2q ) ) Linear hypothesis test (Theil's F test) Hypothesis: demand_income - supply_trend = 0 - demand_price + supply_price = 0.5 Model 1: restricted model Model 2: fit2sls1 Res.Df Df F Pr(>F) 1 35 2 33 2 0.04 0.97 > linearHypothesis( fit2sls1, restrict2 ) Linear hypothesis test (Theil's F test) Hypothesis: demand_income - supply_trend = 0 - demand_price + supply_price = 0.5 Model 1: restricted model Model 2: fit2sls1 Res.Df Df F Pr(>F) 1 35 2 33 2 0.04 0.97 > > > ## ************** Wald tests **************** > # testing first restriction > print( linearHypothesis( fit2sls1, restrm, test = "Chisq" ) ) Linear hypothesis test (Chi^2 statistic of a Wald test) Hypothesis: demand_income - supply_trend = 0 Model 1: restricted model Model 2: fit2sls1 Res.Df Df Chisq Pr(>Chisq) 1 34 2 33 1 0.31 0.58 > linearHypothesis( fit2sls1, restrict, test = "Chisq" ) Linear hypothesis test (Chi^2 statistic of a Wald test) Hypothesis: demand_income - supply_trend = 0 Model 1: restricted model Model 2: fit2sls1 Res.Df Df Chisq Pr(>Chisq) 1 34 2 33 1 0.31 0.58 > > print( linearHypothesis( fit2sls1s, restrm, test = "Chisq" ) ) Linear hypothesis test (Chi^2 statistic of a Wald test) Hypothesis: demand_income - supply_trend = 0 Model 1: restricted model Model 2: fit2sls1s Res.Df Df Chisq Pr(>Chisq) 1 34 2 33 1 0.34 0.56 > linearHypothesis( fit2sls1s, restrict, test = "Chisq" ) Linear hypothesis test (Chi^2 statistic of a Wald test) Hypothesis: demand_income - supply_trend = 0 Model 1: restricted model Model 2: fit2sls1s Res.Df Df Chisq Pr(>Chisq) 1 34 2 33 1 0.34 0.56 > > print( linearHypothesis( fit2sls1, restrm, test = "Chisq" ) ) Linear hypothesis test (Chi^2 statistic of a Wald test) Hypothesis: demand_income - supply_trend = 0 Model 1: restricted model Model 2: fit2sls1 Res.Df Df Chisq Pr(>Chisq) 1 34 2 33 1 0.31 0.58 > linearHypothesis( fit2sls1, restrict, test = "Chisq" ) Linear hypothesis test (Chi^2 statistic of a Wald test) Hypothesis: demand_income - supply_trend = 0 Model 1: restricted model Model 2: fit2sls1 Res.Df Df Chisq Pr(>Chisq) 1 34 2 33 1 0.31 0.58 > > print( linearHypothesis( fit2sls1r, restrm, test = "Chisq" ) ) Linear hypothesis test (Chi^2 statistic of a Wald test) Hypothesis: demand_income - supply_trend = 0 Model 1: restricted model Model 2: fit2sls1r Res.Df Df Chisq Pr(>Chisq) 1 34 2 33 1 0.38 0.54 > linearHypothesis( fit2sls1r, restrict, test = "Chisq" ) Linear hypothesis test (Chi^2 statistic of a Wald test) Hypothesis: demand_income - supply_trend = 0 Model 1: restricted model Model 2: fit2sls1r Res.Df Df Chisq Pr(>Chisq) 1 34 2 33 1 0.38 0.54 > > # testing second restriction > # first restriction not imposed > print( linearHypothesis( fit2sls1, restrOnly2m, restrOnly2q, test = "Chisq" ) ) Linear hypothesis test (Chi^2 statistic of a Wald test) Hypothesis: - demand_price + supply_price = 0.5 Model 1: restricted model Model 2: fit2sls1 Res.Df Df Chisq Pr(>Chisq) 1 34 2 33 1 0.01 0.91 > linearHypothesis( fit2sls1, restrictOnly2, test = "Chisq" ) Linear hypothesis test (Chi^2 statistic of a Wald test) Hypothesis: - demand_price + supply_price = 0.5 Model 1: restricted model Model 2: fit2sls1 Res.Df Df Chisq Pr(>Chisq) 1 34 2 33 1 0.01 0.91 > # first restriction imposed > print( linearHypothesis( fit2sls2, restrOnly2m, restrOnly2q, test = "Chisq" ) ) Linear hypothesis test (Chi^2 statistic of a Wald test) Hypothesis: - demand_price + supply_price = 0.5 Model 1: restricted model Model 2: fit2sls2 Res.Df Df Chisq Pr(>Chisq) 1 35 2 34 1 0.06 0.81 > linearHypothesis( fit2sls2, restrictOnly2, test = "Chisq" ) Linear hypothesis test (Chi^2 statistic of a Wald test) Hypothesis: - demand_price + supply_price = 0.5 Model 1: restricted model Model 2: fit2sls2 Res.Df Df Chisq Pr(>Chisq) 1 35 2 34 1 0.06 0.81 > > print( linearHypothesis( fit2sls2r, restrOnly2m, restrOnly2q, test = "Chisq" ) ) Linear hypothesis test (Chi^2 statistic of a Wald test) Hypothesis: - demand_price + supply_price = 0.5 Model 1: restricted model Model 2: fit2sls2r Res.Df Df Chisq Pr(>Chisq) 1 35 2 34 1 0.07 0.8 > linearHypothesis( fit2sls2r, restrictOnly2, test = "Chisq" ) Linear hypothesis test (Chi^2 statistic of a Wald test) Hypothesis: - demand_price + supply_price = 0.5 Model 1: restricted model Model 2: fit2sls2r Res.Df Df Chisq Pr(>Chisq) 1 35 2 34 1 0.07 0.8 > > print( linearHypothesis( fit2sls3, restrOnly2m, restrOnly2q, test = "Chisq" ) ) Linear hypothesis test (Chi^2 statistic of a Wald test) Hypothesis: - demand_price + supply_price = 0.5 Model 1: restricted model Model 2: fit2sls3 Res.Df Df Chisq Pr(>Chisq) 1 35 2 34 1 0.07 0.8 > linearHypothesis( fit2sls3, restrictOnly2, test = "Chisq" ) Linear hypothesis test (Chi^2 statistic of a Wald test) Hypothesis: - demand_price + supply_price = 0.5 Model 1: restricted model Model 2: fit2sls3 Res.Df Df Chisq Pr(>Chisq) 1 35 2 34 1 0.07 0.8 > > # testing both of the restrictions > print( linearHypothesis( fit2sls1, restr2m, restr2q, test = "Chisq" ) ) Linear hypothesis test (Chi^2 statistic of a Wald test) Hypothesis: demand_income - supply_trend = 0 - demand_price + supply_price = 0.5 Model 1: restricted model Model 2: fit2sls1 Res.Df Df Chisq Pr(>Chisq) 1 35 2 33 2 0.35 0.84 > linearHypothesis( fit2sls1, restrict2, test = "Chisq" ) Linear hypothesis test (Chi^2 statistic of a Wald test) Hypothesis: demand_income - supply_trend = 0 - demand_price + supply_price = 0.5 Model 1: restricted model Model 2: fit2sls1 Res.Df Df Chisq Pr(>Chisq) 1 35 2 33 2 0.35 0.84 > > > ## **************** model frame ************************ > print( mf <- model.frame( fit2sls1 ) ) consump price income farmPrice trend 1 98.5 100.3 87.4 98.0 1 2 99.2 104.3 97.6 99.1 2 3 102.2 103.4 96.7 99.1 3 4 101.5 104.5 98.2 98.1 4 5 104.2 98.0 99.8 110.8 5 6 103.2 99.5 100.5 108.2 6 7 104.0 101.1 103.2 105.6 7 8 99.9 104.8 107.8 109.8 8 9 100.3 96.4 96.6 108.7 9 10 102.8 91.2 88.9 100.6 10 11 95.4 93.1 75.1 81.0 11 12 92.4 98.8 76.9 68.6 12 13 94.5 102.9 84.6 70.9 13 14 98.8 98.8 90.6 81.4 14 15 105.8 95.1 103.1 102.3 15 16 100.2 98.5 105.1 105.0 16 17 103.5 86.5 96.4 110.5 17 18 99.9 104.0 104.4 92.5 18 19 105.2 105.8 110.7 89.3 19 20 106.2 113.5 127.1 93.0 20 > print( mf1 <- model.frame( fit2sls1$eq[[ 1 ]] ) ) consump price income 1 98.5 100.3 87.4 2 99.2 104.3 97.6 3 102.2 103.4 96.7 4 101.5 104.5 98.2 5 104.2 98.0 99.8 6 103.2 99.5 100.5 7 104.0 101.1 103.2 8 99.9 104.8 107.8 9 100.3 96.4 96.6 10 102.8 91.2 88.9 11 95.4 93.1 75.1 12 92.4 98.8 76.9 13 94.5 102.9 84.6 14 98.8 98.8 90.6 15 105.8 95.1 103.1 16 100.2 98.5 105.1 17 103.5 86.5 96.4 18 99.9 104.0 104.4 19 105.2 105.8 110.7 20 106.2 113.5 127.1 > print( attributes( mf1 )$terms ) consump ~ price + income attr(,"variables") list(consump, price, income) attr(,"factors") price income consump 0 0 price 1 0 income 0 1 attr(,"term.labels") [1] "price" "income" attr(,"order") [1] 1 1 attr(,"intercept") [1] 1 attr(,"response") [1] 1 attr(,".Environment") attr(,"predvars") list(consump, price, income) attr(,"dataClasses") consump price income "numeric" "numeric" "numeric" > print( mf2 <- model.frame( fit2sls1$eq[[ 2 ]] ) ) consump price farmPrice trend 1 98.5 100.3 98.0 1 2 99.2 104.3 99.1 2 3 102.2 103.4 99.1 3 4 101.5 104.5 98.1 4 5 104.2 98.0 110.8 5 6 103.2 99.5 108.2 6 7 104.0 101.1 105.6 7 8 99.9 104.8 109.8 8 9 100.3 96.4 108.7 9 10 102.8 91.2 100.6 10 11 95.4 93.1 81.0 11 12 92.4 98.8 68.6 12 13 94.5 102.9 70.9 13 14 98.8 98.8 81.4 14 15 105.8 95.1 102.3 15 16 100.2 98.5 105.0 16 17 103.5 86.5 110.5 17 18 99.9 104.0 92.5 18 19 105.2 105.8 89.3 19 20 106.2 113.5 93.0 20 > print( attributes( mf2 )$terms ) consump ~ price + farmPrice + trend attr(,"variables") list(consump, price, farmPrice, trend) attr(,"factors") price farmPrice trend consump 0 0 0 price 1 0 0 farmPrice 0 1 0 trend 0 0 1 attr(,"term.labels") [1] "price" "farmPrice" "trend" attr(,"order") [1] 1 1 1 attr(,"intercept") [1] 1 attr(,"response") [1] 1 attr(,".Environment") attr(,"predvars") list(consump, price, farmPrice, trend) attr(,"dataClasses") consump price farmPrice trend "numeric" "numeric" "numeric" "numeric" > > print( all.equal( mf, model.frame( fit2sls2s ) ) ) [1] TRUE > print( all.equal( mf2, model.frame( fit2sls2s$eq[[ 2 ]] ) ) ) [1] TRUE > > print( all.equal( mf, model.frame( fit2sls3 ) ) ) [1] TRUE > print( all.equal( mf1, model.frame( fit2sls3$eq[[ 1 ]] ) ) ) [1] TRUE > > print( all.equal( mf, model.frame( fit2sls4r ) ) ) [1] TRUE > print( all.equal( mf2, model.frame( fit2sls4r$eq[[ 2 ]] ) ) ) [1] TRUE > > print( all.equal( mf, model.frame( fit2sls5rs ) ) ) [1] TRUE > print( all.equal( mf1, model.frame( fit2sls5rs$eq[[ 1 ]] ) ) ) [1] TRUE > > fit2sls1$eq[[ 1 ]]$modelInst income farmPrice trend 1 87.4 98.0 1 2 97.6 99.1 2 3 96.7 99.1 3 4 98.2 98.1 4 5 99.8 110.8 5 6 100.5 108.2 6 7 103.2 105.6 7 8 107.8 109.8 8 9 96.6 108.7 9 10 88.9 100.6 10 11 75.1 81.0 11 12 76.9 68.6 12 13 84.6 70.9 13 14 90.6 81.4 14 15 103.1 102.3 15 16 105.1 105.0 16 17 96.4 110.5 17 18 104.4 92.5 18 19 110.7 89.3 19 20 127.1 93.0 20 > fit2sls1$eq[[ 2 ]]$modelInst income farmPrice trend 1 87.4 98.0 1 2 97.6 99.1 2 3 96.7 99.1 3 4 98.2 98.1 4 5 99.8 110.8 5 6 100.5 108.2 6 7 103.2 105.6 7 8 107.8 109.8 8 9 96.6 108.7 9 10 88.9 100.6 10 11 75.1 81.0 11 12 76.9 68.6 12 13 84.6 70.9 13 14 90.6 81.4 14 15 103.1 102.3 15 16 105.1 105.0 16 17 96.4 110.5 17 18 104.4 92.5 18 19 110.7 89.3 19 20 127.1 93.0 20 > > fit2sls2s$eq[[ 1 ]]$modelInst income farmPrice trend 1 87.4 98.0 1 2 97.6 99.1 2 3 96.7 99.1 3 4 98.2 98.1 4 5 99.8 110.8 5 6 100.5 108.2 6 7 103.2 105.6 7 8 107.8 109.8 8 9 96.6 108.7 9 10 88.9 100.6 10 11 75.1 81.0 11 12 76.9 68.6 12 13 84.6 70.9 13 14 90.6 81.4 14 15 103.1 102.3 15 16 105.1 105.0 16 17 96.4 110.5 17 18 104.4 92.5 18 19 110.7 89.3 19 20 127.1 93.0 20 > fit2sls2s$eq[[ 2 ]]$modelInst income farmPrice trend 1 87.4 98.0 1 2 97.6 99.1 2 3 96.7 99.1 3 4 98.2 98.1 4 5 99.8 110.8 5 6 100.5 108.2 6 7 103.2 105.6 7 8 107.8 109.8 8 9 96.6 108.7 9 10 88.9 100.6 10 11 75.1 81.0 11 12 76.9 68.6 12 13 84.6 70.9 13 14 90.6 81.4 14 15 103.1 102.3 15 16 105.1 105.0 16 17 96.4 110.5 17 18 104.4 92.5 18 19 110.7 89.3 19 20 127.1 93.0 20 > > fit2sls5rs$eq[[ 1 ]]$modelInst income farmPrice trend 1 87.4 98.0 1 2 97.6 99.1 2 3 96.7 99.1 3 4 98.2 98.1 4 5 99.8 110.8 5 6 100.5 108.2 6 7 103.2 105.6 7 8 107.8 109.8 8 9 96.6 108.7 9 10 88.9 100.6 10 11 75.1 81.0 11 12 76.9 68.6 12 13 84.6 70.9 13 14 90.6 81.4 14 15 103.1 102.3 15 16 105.1 105.0 16 17 96.4 110.5 17 18 104.4 92.5 18 19 110.7 89.3 19 20 127.1 93.0 20 > fit2sls5rs$eq[[ 2 ]]$modelInst income farmPrice trend 1 87.4 98.0 1 2 97.6 99.1 2 3 96.7 99.1 3 4 98.2 98.1 4 5 99.8 110.8 5 6 100.5 108.2 6 7 103.2 105.6 7 8 107.8 109.8 8 9 96.6 108.7 9 10 88.9 100.6 10 11 75.1 81.0 11 12 76.9 68.6 12 13 84.6 70.9 13 14 90.6 81.4 14 15 103.1 102.3 15 16 105.1 105.0 16 17 96.4 110.5 17 18 104.4 92.5 18 19 110.7 89.3 19 20 127.1 93.0 20 > > > ## **************** model matrix ************************ > # with x (returnModelMatrix) = TRUE > print( !is.null( fit2sls1$eq[[ 1 ]]$x ) ) [1] TRUE > print( mm <- model.matrix( fit2sls1 ) ) demand_(Intercept) demand_price demand_income supply_(Intercept) demand_1 1 100.3 87.4 0 demand_2 1 104.3 97.6 0 demand_3 1 103.4 96.7 0 demand_4 1 104.5 98.2 0 demand_5 1 98.0 99.8 0 demand_6 1 99.5 100.5 0 demand_7 1 101.1 103.2 0 demand_8 1 104.8 107.8 0 demand_9 1 96.4 96.6 0 demand_10 1 91.2 88.9 0 demand_11 1 93.1 75.1 0 demand_12 1 98.8 76.9 0 demand_13 1 102.9 84.6 0 demand_14 1 98.8 90.6 0 demand_15 1 95.1 103.1 0 demand_16 1 98.5 105.1 0 demand_17 1 86.5 96.4 0 demand_18 1 104.0 104.4 0 demand_19 1 105.8 110.7 0 demand_20 1 113.5 127.1 0 supply_1 0 0.0 0.0 1 supply_2 0 0.0 0.0 1 supply_3 0 0.0 0.0 1 supply_4 0 0.0 0.0 1 supply_5 0 0.0 0.0 1 supply_6 0 0.0 0.0 1 supply_7 0 0.0 0.0 1 supply_8 0 0.0 0.0 1 supply_9 0 0.0 0.0 1 supply_10 0 0.0 0.0 1 supply_11 0 0.0 0.0 1 supply_12 0 0.0 0.0 1 supply_13 0 0.0 0.0 1 supply_14 0 0.0 0.0 1 supply_15 0 0.0 0.0 1 supply_16 0 0.0 0.0 1 supply_17 0 0.0 0.0 1 supply_18 0 0.0 0.0 1 supply_19 0 0.0 0.0 1 supply_20 0 0.0 0.0 1 supply_price supply_farmPrice supply_trend demand_1 0.0 0.0 0 demand_2 0.0 0.0 0 demand_3 0.0 0.0 0 demand_4 0.0 0.0 0 demand_5 0.0 0.0 0 demand_6 0.0 0.0 0 demand_7 0.0 0.0 0 demand_8 0.0 0.0 0 demand_9 0.0 0.0 0 demand_10 0.0 0.0 0 demand_11 0.0 0.0 0 demand_12 0.0 0.0 0 demand_13 0.0 0.0 0 demand_14 0.0 0.0 0 demand_15 0.0 0.0 0 demand_16 0.0 0.0 0 demand_17 0.0 0.0 0 demand_18 0.0 0.0 0 demand_19 0.0 0.0 0 demand_20 0.0 0.0 0 supply_1 100.3 98.0 1 supply_2 104.3 99.1 2 supply_3 103.4 99.1 3 supply_4 104.5 98.1 4 supply_5 98.0 110.8 5 supply_6 99.5 108.2 6 supply_7 101.1 105.6 7 supply_8 104.8 109.8 8 supply_9 96.4 108.7 9 supply_10 91.2 100.6 10 supply_11 93.1 81.0 11 supply_12 98.8 68.6 12 supply_13 102.9 70.9 13 supply_14 98.8 81.4 14 supply_15 95.1 102.3 15 supply_16 98.5 105.0 16 supply_17 86.5 110.5 17 supply_18 104.0 92.5 18 supply_19 105.8 89.3 19 supply_20 113.5 93.0 20 > print( mm1 <- model.matrix( fit2sls1$eq[[ 1 ]] ) ) (Intercept) price income 1 1 100.3 87.4 2 1 104.3 97.6 3 1 103.4 96.7 4 1 104.5 98.2 5 1 98.0 99.8 6 1 99.5 100.5 7 1 101.1 103.2 8 1 104.8 107.8 9 1 96.4 96.6 10 1 91.2 88.9 11 1 93.1 75.1 12 1 98.8 76.9 13 1 102.9 84.6 14 1 98.8 90.6 15 1 95.1 103.1 16 1 98.5 105.1 17 1 86.5 96.4 18 1 104.0 104.4 19 1 105.8 110.7 20 1 113.5 127.1 attr(,"assign") [1] 0 1 2 > print( mm2 <- model.matrix( fit2sls1$eq[[ 2 ]] ) ) (Intercept) price farmPrice trend 1 1 100.3 98.0 1 2 1 104.3 99.1 2 3 1 103.4 99.1 3 4 1 104.5 98.1 4 5 1 98.0 110.8 5 6 1 99.5 108.2 6 7 1 101.1 105.6 7 8 1 104.8 109.8 8 9 1 96.4 108.7 9 10 1 91.2 100.6 10 11 1 93.1 81.0 11 12 1 98.8 68.6 12 13 1 102.9 70.9 13 14 1 98.8 81.4 14 15 1 95.1 102.3 15 16 1 98.5 105.0 16 17 1 86.5 110.5 17 18 1 104.0 92.5 18 19 1 105.8 89.3 19 20 1 113.5 93.0 20 attr(,"assign") [1] 0 1 2 3 > > # with x (returnModelMatrix) = FALSE > print( all.equal( mm, model.matrix( fit2sls1s ) ) ) [1] TRUE > print( all.equal( mm1, model.matrix( fit2sls1s$eq[[ 1 ]] ) ) ) [1] TRUE > print( all.equal( mm2, model.matrix( fit2sls1s$eq[[ 2 ]] ) ) ) [1] TRUE > print( !is.null( fit2sls1s$eq[[ 1 ]]$x ) ) [1] FALSE > > # with x (returnModelMatrix) = TRUE > print( !is.null( fit2sls2s$eq[[ 1 ]]$x ) ) [1] TRUE > print( all.equal( mm, model.matrix( fit2sls2s ) ) ) [1] TRUE > print( all.equal( mm1, model.matrix( fit2sls2s$eq[[ 1 ]] ) ) ) [1] TRUE > print( all.equal( mm2, model.matrix( fit2sls2s$eq[[ 2 ]] ) ) ) [1] TRUE > > # with x (returnModelMatrix) = FALSE > print( all.equal( mm, model.matrix( fit2sls2Sym ) ) ) [1] TRUE > print( all.equal( mm1, model.matrix( fit2sls2Sym$eq[[ 1 ]] ) ) ) [1] TRUE > print( all.equal( mm2, model.matrix( fit2sls2Sym$eq[[ 2 ]] ) ) ) [1] TRUE > print( !is.null( fit2sls2Sym$eq[[ 1 ]]$x ) ) [1] FALSE > > # with x (returnModelMatrix) = FALSE > print( all.equal( mm, model.matrix( fit2sls3 ) ) ) [1] TRUE > print( all.equal( mm1, model.matrix( fit2sls3$eq[[ 1 ]] ) ) ) [1] TRUE > print( all.equal( mm2, model.matrix( fit2sls3$eq[[ 2 ]] ) ) ) [1] TRUE > print( !is.null( fit2sls3$eq[[ 1 ]]$x ) ) [1] FALSE > > # with x (returnModelMatrix) = TRUE > print( !is.null( fit2sls4r$eq[[ 1 ]]$x ) ) [1] TRUE > print( all.equal( mm, model.matrix( fit2sls4r ) ) ) [1] TRUE > print( all.equal( mm1, model.matrix( fit2sls4r$eq[[ 1 ]] ) ) ) [1] TRUE > print( all.equal( mm2, model.matrix( fit2sls4r$eq[[ 2 ]] ) ) ) [1] TRUE > > # with x (returnModelMatrix) = FALSE > print( all.equal( mm, model.matrix( fit2sls4s ) ) ) [1] TRUE > print( all.equal( mm1, model.matrix( fit2sls4s$eq[[ 1 ]] ) ) ) [1] TRUE > print( all.equal( mm2, model.matrix( fit2sls4s$eq[[ 2 ]] ) ) ) [1] TRUE > print( !is.null( fit2sls4s$eq[[ 1 ]]$x ) ) [1] FALSE > > # with x (returnModelMatrix) = TRUE > print( !is.null( fit2sls5rs$eq[[ 1 ]]$x ) ) [1] TRUE > print( all.equal( mm, model.matrix( fit2sls5rs ) ) ) [1] TRUE > print( all.equal( mm1, model.matrix( fit2sls5rs$eq[[ 1 ]] ) ) ) [1] TRUE > print( all.equal( mm2, model.matrix( fit2sls5rs$eq[[ 2 ]] ) ) ) [1] TRUE > > # with x (returnModelMatrix) = FALSE > print( all.equal( mm, model.matrix( fit2sls5r ) ) ) [1] TRUE > print( all.equal( mm1, model.matrix( fit2sls5r$eq[[ 1 ]] ) ) ) [1] TRUE > print( all.equal( mm2, model.matrix( fit2sls5r$eq[[ 2 ]] ) ) ) [1] TRUE > print( !is.null( fit2sls5r$eq[[ 1 ]]$x ) ) [1] FALSE > > # matrices of instrumental variables > model.matrix( fit2sls1, which = "z" ) demand_(Intercept) demand_income demand_farmPrice demand_trend demand_1 1 87.4 98.0 1 demand_2 1 97.6 99.1 2 demand_3 1 96.7 99.1 3 demand_4 1 98.2 98.1 4 demand_5 1 99.8 110.8 5 demand_6 1 100.5 108.2 6 demand_7 1 103.2 105.6 7 demand_8 1 107.8 109.8 8 demand_9 1 96.6 108.7 9 demand_10 1 88.9 100.6 10 demand_11 1 75.1 81.0 11 demand_12 1 76.9 68.6 12 demand_13 1 84.6 70.9 13 demand_14 1 90.6 81.4 14 demand_15 1 103.1 102.3 15 demand_16 1 105.1 105.0 16 demand_17 1 96.4 110.5 17 demand_18 1 104.4 92.5 18 demand_19 1 110.7 89.3 19 demand_20 1 127.1 93.0 20 supply_1 0 0.0 0.0 0 supply_2 0 0.0 0.0 0 supply_3 0 0.0 0.0 0 supply_4 0 0.0 0.0 0 supply_5 0 0.0 0.0 0 supply_6 0 0.0 0.0 0 supply_7 0 0.0 0.0 0 supply_8 0 0.0 0.0 0 supply_9 0 0.0 0.0 0 supply_10 0 0.0 0.0 0 supply_11 0 0.0 0.0 0 supply_12 0 0.0 0.0 0 supply_13 0 0.0 0.0 0 supply_14 0 0.0 0.0 0 supply_15 0 0.0 0.0 0 supply_16 0 0.0 0.0 0 supply_17 0 0.0 0.0 0 supply_18 0 0.0 0.0 0 supply_19 0 0.0 0.0 0 supply_20 0 0.0 0.0 0 supply_(Intercept) supply_income supply_farmPrice supply_trend demand_1 0 0.0 0.0 0 demand_2 0 0.0 0.0 0 demand_3 0 0.0 0.0 0 demand_4 0 0.0 0.0 0 demand_5 0 0.0 0.0 0 demand_6 0 0.0 0.0 0 demand_7 0 0.0 0.0 0 demand_8 0 0.0 0.0 0 demand_9 0 0.0 0.0 0 demand_10 0 0.0 0.0 0 demand_11 0 0.0 0.0 0 demand_12 0 0.0 0.0 0 demand_13 0 0.0 0.0 0 demand_14 0 0.0 0.0 0 demand_15 0 0.0 0.0 0 demand_16 0 0.0 0.0 0 demand_17 0 0.0 0.0 0 demand_18 0 0.0 0.0 0 demand_19 0 0.0 0.0 0 demand_20 0 0.0 0.0 0 supply_1 1 87.4 98.0 1 supply_2 1 97.6 99.1 2 supply_3 1 96.7 99.1 3 supply_4 1 98.2 98.1 4 supply_5 1 99.8 110.8 5 supply_6 1 100.5 108.2 6 supply_7 1 103.2 105.6 7 supply_8 1 107.8 109.8 8 supply_9 1 96.6 108.7 9 supply_10 1 88.9 100.6 10 supply_11 1 75.1 81.0 11 supply_12 1 76.9 68.6 12 supply_13 1 84.6 70.9 13 supply_14 1 90.6 81.4 14 supply_15 1 103.1 102.3 15 supply_16 1 105.1 105.0 16 supply_17 1 96.4 110.5 17 supply_18 1 104.4 92.5 18 supply_19 1 110.7 89.3 19 supply_20 1 127.1 93.0 20 > model.matrix( fit2sls1$eq[[ 1 ]], which = "z" ) (Intercept) income farmPrice trend 1 1 87.4 98.0 1 2 1 97.6 99.1 2 3 1 96.7 99.1 3 4 1 98.2 98.1 4 5 1 99.8 110.8 5 6 1 100.5 108.2 6 7 1 103.2 105.6 7 8 1 107.8 109.8 8 9 1 96.6 108.7 9 10 1 88.9 100.6 10 11 1 75.1 81.0 11 12 1 76.9 68.6 12 13 1 84.6 70.9 13 14 1 90.6 81.4 14 15 1 103.1 102.3 15 16 1 105.1 105.0 16 17 1 96.4 110.5 17 18 1 104.4 92.5 18 19 1 110.7 89.3 19 20 1 127.1 93.0 20 attr(,"assign") [1] 0 1 2 3 > model.matrix( fit2sls1$eq[[ 2 ]], which = "z" ) (Intercept) income farmPrice trend 1 1 87.4 98.0 1 2 1 97.6 99.1 2 3 1 96.7 99.1 3 4 1 98.2 98.1 4 5 1 99.8 110.8 5 6 1 100.5 108.2 6 7 1 103.2 105.6 7 8 1 107.8 109.8 8 9 1 96.6 108.7 9 10 1 88.9 100.6 10 11 1 75.1 81.0 11 12 1 76.9 68.6 12 13 1 84.6 70.9 13 14 1 90.6 81.4 14 15 1 103.1 102.3 15 16 1 105.1 105.0 16 17 1 96.4 110.5 17 18 1 104.4 92.5 18 19 1 110.7 89.3 19 20 1 127.1 93.0 20 attr(,"assign") [1] 0 1 2 3 > > # matrices of fitted regressors > model.matrix( fit2sls5r, which = "xHat" ) demand_(Intercept) demand_price demand_income supply_(Intercept) demand_1 1 99.6 87.4 0 demand_2 1 105.1 97.6 0 demand_3 1 103.8 96.7 0 demand_4 1 104.5 98.2 0 demand_5 1 98.7 99.8 0 demand_6 1 99.6 100.5 0 demand_7 1 102.0 103.2 0 demand_8 1 102.2 107.8 0 demand_9 1 94.6 96.6 0 demand_10 1 92.7 88.9 0 demand_11 1 92.4 75.1 0 demand_12 1 98.9 76.9 0 demand_13 1 102.2 84.6 0 demand_14 1 100.3 90.6 0 demand_15 1 97.6 103.1 0 demand_16 1 96.9 105.1 0 demand_17 1 87.7 96.4 0 demand_18 1 101.1 104.4 0 demand_19 1 106.1 110.7 0 demand_20 1 114.4 127.1 0 supply_1 0 0.0 0.0 1 supply_2 0 0.0 0.0 1 supply_3 0 0.0 0.0 1 supply_4 0 0.0 0.0 1 supply_5 0 0.0 0.0 1 supply_6 0 0.0 0.0 1 supply_7 0 0.0 0.0 1 supply_8 0 0.0 0.0 1 supply_9 0 0.0 0.0 1 supply_10 0 0.0 0.0 1 supply_11 0 0.0 0.0 1 supply_12 0 0.0 0.0 1 supply_13 0 0.0 0.0 1 supply_14 0 0.0 0.0 1 supply_15 0 0.0 0.0 1 supply_16 0 0.0 0.0 1 supply_17 0 0.0 0.0 1 supply_18 0 0.0 0.0 1 supply_19 0 0.0 0.0 1 supply_20 0 0.0 0.0 1 supply_price supply_farmPrice supply_trend demand_1 0.0 0.0 0 demand_2 0.0 0.0 0 demand_3 0.0 0.0 0 demand_4 0.0 0.0 0 demand_5 0.0 0.0 0 demand_6 0.0 0.0 0 demand_7 0.0 0.0 0 demand_8 0.0 0.0 0 demand_9 0.0 0.0 0 demand_10 0.0 0.0 0 demand_11 0.0 0.0 0 demand_12 0.0 0.0 0 demand_13 0.0 0.0 0 demand_14 0.0 0.0 0 demand_15 0.0 0.0 0 demand_16 0.0 0.0 0 demand_17 0.0 0.0 0 demand_18 0.0 0.0 0 demand_19 0.0 0.0 0 demand_20 0.0 0.0 0 supply_1 99.6 98.0 1 supply_2 105.1 99.1 2 supply_3 103.8 99.1 3 supply_4 104.5 98.1 4 supply_5 98.7 110.8 5 supply_6 99.6 108.2 6 supply_7 102.0 105.6 7 supply_8 102.2 109.8 8 supply_9 94.6 108.7 9 supply_10 92.7 100.6 10 supply_11 92.4 81.0 11 supply_12 98.9 68.6 12 supply_13 102.2 70.9 13 supply_14 100.3 81.4 14 supply_15 97.6 102.3 15 supply_16 96.9 105.0 16 supply_17 87.7 110.5 17 supply_18 101.1 92.5 18 supply_19 106.1 89.3 19 supply_20 114.4 93.0 20 > model.matrix( fit2sls5r$eq[[ 1 ]], which = "xHat" ) (Intercept) price income 1 1 99.6 87.4 2 1 105.1 97.6 3 1 103.8 96.7 4 1 104.5 98.2 5 1 98.7 99.8 6 1 99.6 100.5 7 1 102.0 103.2 8 1 102.2 107.8 9 1 94.6 96.6 10 1 92.7 88.9 11 1 92.4 75.1 12 1 98.9 76.9 13 1 102.2 84.6 14 1 100.3 90.6 15 1 97.6 103.1 16 1 96.9 105.1 17 1 87.7 96.4 18 1 101.1 104.4 19 1 106.1 110.7 20 1 114.4 127.1 > model.matrix( fit2sls5r$eq[[ 2 ]], which = "xHat" ) (Intercept) price farmPrice trend 1 1 99.6 98.0 1 2 1 105.1 99.1 2 3 1 103.8 99.1 3 4 1 104.5 98.1 4 5 1 98.7 110.8 5 6 1 99.6 108.2 6 7 1 102.0 105.6 7 8 1 102.2 109.8 8 9 1 94.6 108.7 9 10 1 92.7 100.6 10 11 1 92.4 81.0 11 12 1 98.9 68.6 12 13 1 102.2 70.9 13 14 1 100.3 81.4 14 15 1 97.6 102.3 15 16 1 96.9 105.0 16 17 1 87.7 110.5 17 18 1 101.1 92.5 18 19 1 106.1 89.3 19 20 1 114.4 93.0 20 > > > ## **************** formulas ************************ > formula( fit2sls1 ) $demand consump ~ price + income $supply consump ~ price + farmPrice + trend > formula( fit2sls1$eq[[ 1 ]] ) consump ~ price + income > > formula( fit2sls2s ) $demand consump ~ price + income $supply consump ~ price + farmPrice + trend > formula( fit2sls2s$eq[[ 2 ]] ) consump ~ price + farmPrice + trend > > formula( fit2sls3 ) $demand consump ~ price + income $supply consump ~ price + farmPrice + trend > formula( fit2sls3$eq[[ 1 ]] ) consump ~ price + income > > formula( fit2sls4r ) $demand consump ~ price + income $supply consump ~ price + farmPrice + trend > formula( fit2sls4r$eq[[ 2 ]] ) consump ~ price + farmPrice + trend > > formula( fit2sls5rs ) $demand consump ~ price + income $supply consump ~ price + farmPrice + trend > formula( fit2sls5rs$eq[[ 1 ]] ) consump ~ price + income > > formula( fit2slsd1 ) $demand consump ~ price + income $supply consump ~ price + farmPrice + trend > formula( fit2slsd1$eq[[ 2 ]] ) consump ~ price + farmPrice + trend > > formula( fit2slsd2r ) $demand consump ~ price + income $supply consump ~ price + farmPrice + trend > formula( fit2slsd2r$eq[[ 1 ]] ) consump ~ price + income > > > ## **************** model terms ******************* > terms( fit2sls1 ) $demand consump ~ price + income attr(,"variables") list(consump, price, income) attr(,"factors") price income consump 0 0 price 1 0 income 0 1 attr(,"term.labels") [1] "price" "income" attr(,"order") [1] 1 1 attr(,"intercept") [1] 1 attr(,"response") [1] 1 attr(,".Environment") attr(,"predvars") list(consump, price, income) attr(,"dataClasses") consump price income "numeric" "numeric" "numeric" $supply consump ~ price + farmPrice + trend attr(,"variables") list(consump, price, farmPrice, trend) attr(,"factors") price farmPrice trend consump 0 0 0 price 1 0 0 farmPrice 0 1 0 trend 0 0 1 attr(,"term.labels") [1] "price" "farmPrice" "trend" attr(,"order") [1] 1 1 1 attr(,"intercept") [1] 1 attr(,"response") [1] 1 attr(,".Environment") attr(,"predvars") list(consump, price, farmPrice, trend) attr(,"dataClasses") consump price farmPrice trend "numeric" "numeric" "numeric" "numeric" > terms( fit2sls1$eq[[ 1 ]] ) consump ~ price + income attr(,"variables") list(consump, price, income) attr(,"factors") price income consump 0 0 price 1 0 income 0 1 attr(,"term.labels") [1] "price" "income" attr(,"order") [1] 1 1 attr(,"intercept") [1] 1 attr(,"response") [1] 1 attr(,".Environment") attr(,"predvars") list(consump, price, income) attr(,"dataClasses") consump price income "numeric" "numeric" "numeric" > > terms( fit2sls2s ) $demand consump ~ price + income attr(,"variables") list(consump, price, income) attr(,"factors") price income consump 0 0 price 1 0 income 0 1 attr(,"term.labels") [1] "price" "income" attr(,"order") [1] 1 1 attr(,"intercept") [1] 1 attr(,"response") [1] 1 attr(,".Environment") attr(,"predvars") list(consump, price, income) attr(,"dataClasses") consump price income "numeric" "numeric" "numeric" $supply consump ~ price + farmPrice + trend attr(,"variables") list(consump, price, farmPrice, trend) attr(,"factors") price farmPrice trend consump 0 0 0 price 1 0 0 farmPrice 0 1 0 trend 0 0 1 attr(,"term.labels") [1] "price" "farmPrice" "trend" attr(,"order") [1] 1 1 1 attr(,"intercept") [1] 1 attr(,"response") [1] 1 attr(,".Environment") attr(,"predvars") list(consump, price, farmPrice, trend) attr(,"dataClasses") consump price farmPrice trend "numeric" "numeric" "numeric" "numeric" > terms( fit2sls2s$eq[[ 2 ]] ) consump ~ price + farmPrice + trend attr(,"variables") list(consump, price, farmPrice, trend) attr(,"factors") price farmPrice trend consump 0 0 0 price 1 0 0 farmPrice 0 1 0 trend 0 0 1 attr(,"term.labels") [1] "price" "farmPrice" "trend" attr(,"order") [1] 1 1 1 attr(,"intercept") [1] 1 attr(,"response") [1] 1 attr(,".Environment") attr(,"predvars") list(consump, price, farmPrice, trend) attr(,"dataClasses") consump price farmPrice trend "numeric" "numeric" "numeric" "numeric" > > terms( fit2sls3 ) $demand consump ~ price + income attr(,"variables") list(consump, price, income) attr(,"factors") price income consump 0 0 price 1 0 income 0 1 attr(,"term.labels") [1] "price" "income" attr(,"order") [1] 1 1 attr(,"intercept") [1] 1 attr(,"response") [1] 1 attr(,".Environment") attr(,"predvars") list(consump, price, income) attr(,"dataClasses") consump price income "numeric" "numeric" "numeric" $supply consump ~ price + farmPrice + trend attr(,"variables") list(consump, price, farmPrice, trend) attr(,"factors") price farmPrice trend consump 0 0 0 price 1 0 0 farmPrice 0 1 0 trend 0 0 1 attr(,"term.labels") [1] "price" "farmPrice" "trend" attr(,"order") [1] 1 1 1 attr(,"intercept") [1] 1 attr(,"response") [1] 1 attr(,".Environment") attr(,"predvars") list(consump, price, farmPrice, trend) attr(,"dataClasses") consump price farmPrice trend "numeric" "numeric" "numeric" "numeric" > terms( fit2sls3$eq[[ 1 ]] ) consump ~ price + income attr(,"variables") list(consump, price, income) attr(,"factors") price income consump 0 0 price 1 0 income 0 1 attr(,"term.labels") [1] "price" "income" attr(,"order") [1] 1 1 attr(,"intercept") [1] 1 attr(,"response") [1] 1 attr(,".Environment") attr(,"predvars") list(consump, price, income) attr(,"dataClasses") consump price income "numeric" "numeric" "numeric" > > terms( fit2sls4r ) $demand consump ~ price + income attr(,"variables") list(consump, price, income) attr(,"factors") price income consump 0 0 price 1 0 income 0 1 attr(,"term.labels") [1] "price" "income" attr(,"order") [1] 1 1 attr(,"intercept") [1] 1 attr(,"response") [1] 1 attr(,".Environment") attr(,"predvars") list(consump, price, income) attr(,"dataClasses") consump price income "numeric" "numeric" "numeric" $supply consump ~ price + farmPrice + trend attr(,"variables") list(consump, price, farmPrice, trend) attr(,"factors") price farmPrice trend consump 0 0 0 price 1 0 0 farmPrice 0 1 0 trend 0 0 1 attr(,"term.labels") [1] "price" "farmPrice" "trend" attr(,"order") [1] 1 1 1 attr(,"intercept") [1] 1 attr(,"response") [1] 1 attr(,".Environment") attr(,"predvars") list(consump, price, farmPrice, trend) attr(,"dataClasses") consump price farmPrice trend "numeric" "numeric" "numeric" "numeric" > terms( fit2sls4r$eq[[ 2 ]] ) consump ~ price + farmPrice + trend attr(,"variables") list(consump, price, farmPrice, trend) attr(,"factors") price farmPrice trend consump 0 0 0 price 1 0 0 farmPrice 0 1 0 trend 0 0 1 attr(,"term.labels") [1] "price" "farmPrice" "trend" attr(,"order") [1] 1 1 1 attr(,"intercept") [1] 1 attr(,"response") [1] 1 attr(,".Environment") attr(,"predvars") list(consump, price, farmPrice, trend) attr(,"dataClasses") consump price farmPrice trend "numeric" "numeric" "numeric" "numeric" > > terms( fit2sls5rs ) $demand consump ~ price + income attr(,"variables") list(consump, price, income) attr(,"factors") price income consump 0 0 price 1 0 income 0 1 attr(,"term.labels") [1] "price" "income" attr(,"order") [1] 1 1 attr(,"intercept") [1] 1 attr(,"response") [1] 1 attr(,".Environment") attr(,"predvars") list(consump, price, income) attr(,"dataClasses") consump price income "numeric" "numeric" "numeric" $supply consump ~ price + farmPrice + trend attr(,"variables") list(consump, price, farmPrice, trend) attr(,"factors") price farmPrice trend consump 0 0 0 price 1 0 0 farmPrice 0 1 0 trend 0 0 1 attr(,"term.labels") [1] "price" "farmPrice" "trend" attr(,"order") [1] 1 1 1 attr(,"intercept") [1] 1 attr(,"response") [1] 1 attr(,".Environment") attr(,"predvars") list(consump, price, farmPrice, trend) attr(,"dataClasses") consump price farmPrice trend "numeric" "numeric" "numeric" "numeric" > terms( fit2sls5rs$eq[[ 1 ]] ) consump ~ price + income attr(,"variables") list(consump, price, income) attr(,"factors") price income consump 0 0 price 1 0 income 0 1 attr(,"term.labels") [1] "price" "income" attr(,"order") [1] 1 1 attr(,"intercept") [1] 1 attr(,"response") [1] 1 attr(,".Environment") attr(,"predvars") list(consump, price, income) attr(,"dataClasses") consump price income "numeric" "numeric" "numeric" > > terms( fit2slsd1 ) $demand consump ~ price + income attr(,"variables") list(consump, price, income) attr(,"factors") price income consump 0 0 price 1 0 income 0 1 attr(,"term.labels") [1] "price" "income" attr(,"order") [1] 1 1 attr(,"intercept") [1] 1 attr(,"response") [1] 1 attr(,".Environment") attr(,"predvars") list(consump, price, income) attr(,"dataClasses") consump price income "numeric" "numeric" "numeric" $supply consump ~ price + farmPrice + trend attr(,"variables") list(consump, price, farmPrice, trend) attr(,"factors") price farmPrice trend consump 0 0 0 price 1 0 0 farmPrice 0 1 0 trend 0 0 1 attr(,"term.labels") [1] "price" "farmPrice" "trend" attr(,"order") [1] 1 1 1 attr(,"intercept") [1] 1 attr(,"response") [1] 1 attr(,".Environment") attr(,"predvars") list(consump, price, farmPrice, trend) attr(,"dataClasses") consump price farmPrice trend "numeric" "numeric" "numeric" "numeric" > terms( fit2slsd1$eq[[ 2 ]] ) consump ~ price + farmPrice + trend attr(,"variables") list(consump, price, farmPrice, trend) attr(,"factors") price farmPrice trend consump 0 0 0 price 1 0 0 farmPrice 0 1 0 trend 0 0 1 attr(,"term.labels") [1] "price" "farmPrice" "trend" attr(,"order") [1] 1 1 1 attr(,"intercept") [1] 1 attr(,"response") [1] 1 attr(,".Environment") attr(,"predvars") list(consump, price, farmPrice, trend) attr(,"dataClasses") consump price farmPrice trend "numeric" "numeric" "numeric" "numeric" > > terms( fit2slsd2r ) $demand consump ~ price + income attr(,"variables") list(consump, price, income) attr(,"factors") price income consump 0 0 price 1 0 income 0 1 attr(,"term.labels") [1] "price" "income" attr(,"order") [1] 1 1 attr(,"intercept") [1] 1 attr(,"response") [1] 1 attr(,".Environment") attr(,"predvars") list(consump, price, income) attr(,"dataClasses") consump price income "numeric" "numeric" "numeric" $supply consump ~ price + farmPrice + trend attr(,"variables") list(consump, price, farmPrice, trend) attr(,"factors") price farmPrice trend consump 0 0 0 price 1 0 0 farmPrice 0 1 0 trend 0 0 1 attr(,"term.labels") [1] "price" "farmPrice" "trend" attr(,"order") [1] 1 1 1 attr(,"intercept") [1] 1 attr(,"response") [1] 1 attr(,".Environment") attr(,"predvars") list(consump, price, farmPrice, trend) attr(,"dataClasses") consump price farmPrice trend "numeric" "numeric" "numeric" "numeric" > terms( fit2slsd2r$eq[[ 1 ]] ) consump ~ price + income attr(,"variables") list(consump, price, income) attr(,"factors") price income consump 0 0 price 1 0 income 0 1 attr(,"term.labels") [1] "price" "income" attr(,"order") [1] 1 1 attr(,"intercept") [1] 1 attr(,"response") [1] 1 attr(,".Environment") attr(,"predvars") list(consump, price, income) attr(,"dataClasses") consump price income "numeric" "numeric" "numeric" > > > ## **************** terms of instruments ******************* > fit2sls1$eq[[ 1 ]]$termsInst ~income + farmPrice + trend attr(,"variables") list(income, farmPrice, trend) attr(,"factors") income farmPrice trend income 1 0 0 farmPrice 0 1 0 trend 0 0 1 attr(,"term.labels") [1] "income" "farmPrice" "trend" attr(,"order") [1] 1 1 1 attr(,"intercept") [1] 1 attr(,"response") [1] 0 attr(,".Environment") attr(,"predvars") list(income, farmPrice, trend) attr(,"dataClasses") income farmPrice trend "numeric" "numeric" "numeric" > > fit2sls2s$eq[[ 2 ]]$termsInst ~income + farmPrice + trend attr(,"variables") list(income, farmPrice, trend) attr(,"factors") income farmPrice trend income 1 0 0 farmPrice 0 1 0 trend 0 0 1 attr(,"term.labels") [1] "income" "farmPrice" "trend" attr(,"order") [1] 1 1 1 attr(,"intercept") [1] 1 attr(,"response") [1] 0 attr(,".Environment") attr(,"predvars") list(income, farmPrice, trend) attr(,"dataClasses") income farmPrice trend "numeric" "numeric" "numeric" > > fit2sls3$eq[[ 1 ]]$termsInst ~income + farmPrice + trend attr(,"variables") list(income, farmPrice, trend) attr(,"factors") income farmPrice trend income 1 0 0 farmPrice 0 1 0 trend 0 0 1 attr(,"term.labels") [1] "income" "farmPrice" "trend" attr(,"order") [1] 1 1 1 attr(,"intercept") [1] 1 attr(,"response") [1] 0 attr(,".Environment") attr(,"predvars") list(income, farmPrice, trend) attr(,"dataClasses") income farmPrice trend "numeric" "numeric" "numeric" > > fit2sls4r$eq[[ 2 ]]$termsInst ~income + farmPrice + trend attr(,"variables") list(income, farmPrice, trend) attr(,"factors") income farmPrice trend income 1 0 0 farmPrice 0 1 0 trend 0 0 1 attr(,"term.labels") [1] "income" "farmPrice" "trend" attr(,"order") [1] 1 1 1 attr(,"intercept") [1] 1 attr(,"response") [1] 0 attr(,".Environment") attr(,"predvars") list(income, farmPrice, trend) attr(,"dataClasses") income farmPrice trend "numeric" "numeric" "numeric" > > fit2sls5rs$eq[[ 1 ]]$termsInst ~income + farmPrice + trend attr(,"variables") list(income, farmPrice, trend) attr(,"factors") income farmPrice trend income 1 0 0 farmPrice 0 1 0 trend 0 0 1 attr(,"term.labels") [1] "income" "farmPrice" "trend" attr(,"order") [1] 1 1 1 attr(,"intercept") [1] 1 attr(,"response") [1] 0 attr(,".Environment") attr(,"predvars") list(income, farmPrice, trend) attr(,"dataClasses") income farmPrice trend "numeric" "numeric" "numeric" > > fit2slsd1$eq[[ 2 ]]$termsInst ~income + farmPrice + trend attr(,"variables") list(income, farmPrice, trend) attr(,"factors") income farmPrice trend income 1 0 0 farmPrice 0 1 0 trend 0 0 1 attr(,"term.labels") [1] "income" "farmPrice" "trend" attr(,"order") [1] 1 1 1 attr(,"intercept") [1] 1 attr(,"response") [1] 0 attr(,".Environment") attr(,"predvars") list(income, farmPrice, trend) attr(,"dataClasses") income farmPrice trend "numeric" "numeric" "numeric" > > fit2slsd2r$eq[[ 1 ]]$termsInst ~income + farmPrice attr(,"variables") list(income, farmPrice) attr(,"factors") income farmPrice income 1 0 farmPrice 0 1 attr(,"term.labels") [1] "income" "farmPrice" attr(,"order") [1] 1 1 attr(,"intercept") [1] 1 attr(,"response") [1] 0 attr(,".Environment") attr(,"predvars") list(income, farmPrice) attr(,"dataClasses") income farmPrice "numeric" "numeric" > > > ## **************** estfun ************************ > library( "sandwich" ) > > estfun( fit2sls1 ) demand_(Intercept) demand_price demand_income supply_(Intercept) demand_1 0.6738 67.13 58.89 0.000 demand_2 -0.4897 -51.48 -47.80 0.000 demand_3 2.4440 253.65 236.33 0.000 demand_4 1.4958 156.35 146.88 0.000 demand_5 2.2975 226.65 229.29 0.000 demand_6 1.3235 131.89 133.02 0.000 demand_7 1.7917 182.70 184.90 0.000 demand_8 -3.6818 -376.41 -396.90 0.000 demand_9 -1.5729 -148.80 -151.94 0.000 demand_10 2.8552 264.73 253.83 0.000 demand_11 -0.2736 -25.29 -20.55 0.000 demand_12 -2.2634 -223.89 -174.06 0.000 demand_13 -1.7795 -181.80 -150.55 0.000 demand_14 0.0991 9.93 8.98 0.000 demand_15 2.5674 250.64 264.70 0.000 demand_16 -3.8102 -369.18 -400.45 0.000 demand_17 -0.0206 -1.81 -1.99 0.000 demand_18 -2.8715 -290.19 -299.78 0.000 demand_19 1.6632 176.41 184.12 0.000 demand_20 -0.4478 -51.23 -56.92 0.000 supply_1 0.0000 0.00 0.00 -0.268 supply_2 0.0000 0.00 0.00 -1.418 supply_3 0.0000 0.00 0.00 1.625 supply_4 0.0000 0.00 0.00 0.790 supply_5 0.0000 0.00 0.00 1.438 supply_6 0.0000 0.00 0.00 0.613 supply_7 0.0000 0.00 0.00 1.217 supply_8 0.0000 0.00 0.00 -4.265 supply_9 0.0000 0.00 0.00 -1.956 supply_10 0.0000 0.00 0.00 2.785 supply_11 0.0000 0.00 0.00 0.233 supply_12 0.0000 0.00 0.00 -1.426 supply_13 0.0000 0.00 0.00 -0.935 supply_14 0.0000 0.00 0.00 0.803 supply_15 0.0000 0.00 0.00 2.886 supply_16 0.0000 0.00 0.00 -3.454 supply_17 0.0000 0.00 0.00 0.391 supply_18 0.0000 0.00 0.00 -2.061 supply_19 0.0000 0.00 0.00 2.596 supply_20 0.0000 0.00 0.00 0.406 supply_price supply_farmPrice supply_trend demand_1 0.0 0.0 0.000 demand_2 0.0 0.0 0.000 demand_3 0.0 0.0 0.000 demand_4 0.0 0.0 0.000 demand_5 0.0 0.0 0.000 demand_6 0.0 0.0 0.000 demand_7 0.0 0.0 0.000 demand_8 0.0 0.0 0.000 demand_9 0.0 0.0 0.000 demand_10 0.0 0.0 0.000 demand_11 0.0 0.0 0.000 demand_12 0.0 0.0 0.000 demand_13 0.0 0.0 0.000 demand_14 0.0 0.0 0.000 demand_15 0.0 0.0 0.000 demand_16 0.0 0.0 0.000 demand_17 0.0 0.0 0.000 demand_18 0.0 0.0 0.000 demand_19 0.0 0.0 0.000 demand_20 0.0 0.0 0.000 supply_1 -26.7 -26.3 -0.268 supply_2 -149.1 -140.5 -2.836 supply_3 168.7 161.1 4.876 supply_4 82.6 77.5 3.159 supply_5 141.9 159.3 7.190 supply_6 61.1 66.4 3.680 supply_7 124.1 128.5 8.520 supply_8 -436.1 -468.3 -34.122 supply_9 -185.0 -212.6 -17.602 supply_10 258.2 280.1 27.848 supply_11 21.5 18.8 2.558 supply_12 -141.0 -97.8 -17.107 supply_13 -95.5 -66.3 -12.152 supply_14 80.6 65.4 11.246 supply_15 281.7 295.2 43.286 supply_16 -334.7 -362.7 -55.267 supply_17 34.3 43.2 6.650 supply_18 -208.3 -190.7 -37.106 supply_19 275.4 231.8 49.327 supply_20 46.5 37.8 8.122 > round( colSums( estfun( fit2sls1 ) ), digits = 7 ) demand_(Intercept) demand_price demand_income supply_(Intercept) 0 0 0 0 supply_price supply_farmPrice supply_trend 0 0 0 > > estfun( fit2sls1s ) demand_(Intercept) demand_price demand_income supply_(Intercept) demand_1 0.6738 67.13 58.89 0.000 demand_2 -0.4897 -51.48 -47.80 0.000 demand_3 2.4440 253.65 236.33 0.000 demand_4 1.4958 156.35 146.88 0.000 demand_5 2.2975 226.65 229.29 0.000 demand_6 1.3235 131.89 133.02 0.000 demand_7 1.7917 182.70 184.90 0.000 demand_8 -3.6818 -376.41 -396.90 0.000 demand_9 -1.5729 -148.80 -151.94 0.000 demand_10 2.8552 264.73 253.83 0.000 demand_11 -0.2736 -25.29 -20.55 0.000 demand_12 -2.2634 -223.89 -174.06 0.000 demand_13 -1.7795 -181.80 -150.55 0.000 demand_14 0.0991 9.93 8.98 0.000 demand_15 2.5674 250.64 264.70 0.000 demand_16 -3.8102 -369.18 -400.45 0.000 demand_17 -0.0206 -1.81 -1.99 0.000 demand_18 -2.8715 -290.19 -299.78 0.000 demand_19 1.6632 176.41 184.12 0.000 demand_20 -0.4478 -51.23 -56.92 0.000 supply_1 0.0000 0.00 0.00 -0.268 supply_2 0.0000 0.00 0.00 -1.418 supply_3 0.0000 0.00 0.00 1.625 supply_4 0.0000 0.00 0.00 0.790 supply_5 0.0000 0.00 0.00 1.438 supply_6 0.0000 0.00 0.00 0.613 supply_7 0.0000 0.00 0.00 1.217 supply_8 0.0000 0.00 0.00 -4.265 supply_9 0.0000 0.00 0.00 -1.956 supply_10 0.0000 0.00 0.00 2.785 supply_11 0.0000 0.00 0.00 0.233 supply_12 0.0000 0.00 0.00 -1.426 supply_13 0.0000 0.00 0.00 -0.935 supply_14 0.0000 0.00 0.00 0.803 supply_15 0.0000 0.00 0.00 2.886 supply_16 0.0000 0.00 0.00 -3.454 supply_17 0.0000 0.00 0.00 0.391 supply_18 0.0000 0.00 0.00 -2.061 supply_19 0.0000 0.00 0.00 2.596 supply_20 0.0000 0.00 0.00 0.406 supply_price supply_farmPrice supply_trend demand_1 0.0 0.0 0.000 demand_2 0.0 0.0 0.000 demand_3 0.0 0.0 0.000 demand_4 0.0 0.0 0.000 demand_5 0.0 0.0 0.000 demand_6 0.0 0.0 0.000 demand_7 0.0 0.0 0.000 demand_8 0.0 0.0 0.000 demand_9 0.0 0.0 0.000 demand_10 0.0 0.0 0.000 demand_11 0.0 0.0 0.000 demand_12 0.0 0.0 0.000 demand_13 0.0 0.0 0.000 demand_14 0.0 0.0 0.000 demand_15 0.0 0.0 0.000 demand_16 0.0 0.0 0.000 demand_17 0.0 0.0 0.000 demand_18 0.0 0.0 0.000 demand_19 0.0 0.0 0.000 demand_20 0.0 0.0 0.000 supply_1 -26.7 -26.3 -0.268 supply_2 -149.1 -140.5 -2.836 supply_3 168.7 161.1 4.876 supply_4 82.6 77.5 3.159 supply_5 141.9 159.3 7.190 supply_6 61.1 66.4 3.680 supply_7 124.1 128.5 8.520 supply_8 -436.1 -468.3 -34.122 supply_9 -185.0 -212.6 -17.602 supply_10 258.2 280.1 27.848 supply_11 21.5 18.8 2.558 supply_12 -141.0 -97.8 -17.107 supply_13 -95.5 -66.3 -12.152 supply_14 80.6 65.4 11.246 supply_15 281.7 295.2 43.286 supply_16 -334.7 -362.7 -55.267 supply_17 34.3 43.2 6.650 supply_18 -208.3 -190.7 -37.106 supply_19 275.4 231.8 49.327 supply_20 46.5 37.8 8.122 > round( colSums( estfun( fit2sls1s ) ), digits = 7 ) demand_(Intercept) demand_price demand_income supply_(Intercept) 0 0 0 0 supply_price supply_farmPrice supply_trend 0 0 0 > > estfun( fit2sls1r ) demand_(Intercept) demand_price demand_income supply_(Intercept) demand_1 0.6738 67.13 58.89 0.000 demand_2 -0.4897 -51.48 -47.80 0.000 demand_3 2.4440 253.65 236.33 0.000 demand_4 1.4958 156.35 146.88 0.000 demand_5 2.2975 226.65 229.29 0.000 demand_6 1.3235 131.89 133.02 0.000 demand_7 1.7917 182.70 184.90 0.000 demand_8 -3.6818 -376.41 -396.90 0.000 demand_9 -1.5729 -148.80 -151.94 0.000 demand_10 2.8552 264.73 253.83 0.000 demand_11 -0.2736 -25.29 -20.55 0.000 demand_12 -2.2634 -223.89 -174.06 0.000 demand_13 -1.7795 -181.80 -150.55 0.000 demand_14 0.0991 9.93 8.98 0.000 demand_15 2.5674 250.64 264.70 0.000 demand_16 -3.8102 -369.18 -400.45 0.000 demand_17 -0.0206 -1.81 -1.99 0.000 demand_18 -2.8715 -290.19 -299.78 0.000 demand_19 1.6632 176.41 184.12 0.000 demand_20 -0.4478 -51.23 -56.92 0.000 supply_1 0.0000 0.00 0.00 -0.268 supply_2 0.0000 0.00 0.00 -1.418 supply_3 0.0000 0.00 0.00 1.625 supply_4 0.0000 0.00 0.00 0.790 supply_5 0.0000 0.00 0.00 1.438 supply_6 0.0000 0.00 0.00 0.613 supply_7 0.0000 0.00 0.00 1.217 supply_8 0.0000 0.00 0.00 -4.265 supply_9 0.0000 0.00 0.00 -1.956 supply_10 0.0000 0.00 0.00 2.785 supply_11 0.0000 0.00 0.00 0.233 supply_12 0.0000 0.00 0.00 -1.426 supply_13 0.0000 0.00 0.00 -0.935 supply_14 0.0000 0.00 0.00 0.803 supply_15 0.0000 0.00 0.00 2.886 supply_16 0.0000 0.00 0.00 -3.454 supply_17 0.0000 0.00 0.00 0.391 supply_18 0.0000 0.00 0.00 -2.061 supply_19 0.0000 0.00 0.00 2.596 supply_20 0.0000 0.00 0.00 0.406 supply_price supply_farmPrice supply_trend demand_1 0.0 0.0 0.000 demand_2 0.0 0.0 0.000 demand_3 0.0 0.0 0.000 demand_4 0.0 0.0 0.000 demand_5 0.0 0.0 0.000 demand_6 0.0 0.0 0.000 demand_7 0.0 0.0 0.000 demand_8 0.0 0.0 0.000 demand_9 0.0 0.0 0.000 demand_10 0.0 0.0 0.000 demand_11 0.0 0.0 0.000 demand_12 0.0 0.0 0.000 demand_13 0.0 0.0 0.000 demand_14 0.0 0.0 0.000 demand_15 0.0 0.0 0.000 demand_16 0.0 0.0 0.000 demand_17 0.0 0.0 0.000 demand_18 0.0 0.0 0.000 demand_19 0.0 0.0 0.000 demand_20 0.0 0.0 0.000 supply_1 -26.7 -26.3 -0.268 supply_2 -149.1 -140.5 -2.836 supply_3 168.7 161.1 4.876 supply_4 82.6 77.5 3.159 supply_5 141.9 159.3 7.190 supply_6 61.1 66.4 3.680 supply_7 124.1 128.5 8.520 supply_8 -436.1 -468.3 -34.122 supply_9 -185.0 -212.6 -17.602 supply_10 258.2 280.1 27.848 supply_11 21.5 18.8 2.558 supply_12 -141.0 -97.8 -17.107 supply_13 -95.5 -66.3 -12.152 supply_14 80.6 65.4 11.246 supply_15 281.7 295.2 43.286 supply_16 -334.7 -362.7 -55.267 supply_17 34.3 43.2 6.650 supply_18 -208.3 -190.7 -37.106 supply_19 275.4 231.8 49.327 supply_20 46.5 37.8 8.122 > round( colSums( estfun( fit2sls1r ) ), digits = 7 ) demand_(Intercept) demand_price demand_income supply_(Intercept) 0 0 0 0 supply_price supply_farmPrice supply_trend 0 0 0 > > > ## **************** bread ************************ > bread( fit2sls1 ) demand_(Intercept) demand_price demand_income demand_(Intercept) 649.07 -6.9669 0.5100 demand_price -6.97 0.0963 -0.0273 demand_income 0.51 -0.0273 0.0228 supply_(Intercept) 0.00 0.0000 0.0000 supply_price 0.00 0.0000 0.0000 supply_farmPrice 0.00 0.0000 0.0000 supply_trend 0.00 0.0000 0.0000 supply_(Intercept) supply_price supply_farmPrice demand_(Intercept) 0.00 0.00000 0.00000 demand_price 0.00 0.00000 0.00000 demand_income 0.00 0.00000 0.00000 supply_(Intercept) 955.38 -7.25488 -2.14464 supply_price -7.25 0.06614 0.00620 supply_farmPrice -2.14 0.00620 0.01479 supply_trend -1.96 0.00384 0.00912 supply_trend demand_(Intercept) 0.00000 demand_price 0.00000 demand_income 0.00000 supply_(Intercept) -1.95529 supply_price 0.00384 supply_farmPrice 0.00912 supply_trend 0.06577 > > bread( fit2sls1s ) demand_(Intercept) demand_price demand_income demand_(Intercept) 649.07 -6.9669 0.5100 demand_price -6.97 0.0963 -0.0273 demand_income 0.51 -0.0273 0.0228 supply_(Intercept) 0.00 0.0000 0.0000 supply_price 0.00 0.0000 0.0000 supply_farmPrice 0.00 0.0000 0.0000 supply_trend 0.00 0.0000 0.0000 supply_(Intercept) supply_price supply_farmPrice demand_(Intercept) 0.00 0.00000 0.00000 demand_price 0.00 0.00000 0.00000 demand_income 0.00 0.00000 0.00000 supply_(Intercept) 955.38 -7.25488 -2.14464 supply_price -7.25 0.06614 0.00620 supply_farmPrice -2.14 0.00620 0.01479 supply_trend -1.96 0.00384 0.00912 supply_trend demand_(Intercept) 0.00000 demand_price 0.00000 demand_income 0.00000 supply_(Intercept) -1.95529 supply_price 0.00384 supply_farmPrice 0.00912 supply_trend 0.06577 > > bread( fit2sls1r ) demand_(Intercept) demand_price demand_income demand_(Intercept) 649.07 -6.9669 0.5100 demand_price -6.97 0.0963 -0.0273 demand_income 0.51 -0.0273 0.0228 supply_(Intercept) 0.00 0.0000 0.0000 supply_price 0.00 0.0000 0.0000 supply_farmPrice 0.00 0.0000 0.0000 supply_trend 0.00 0.0000 0.0000 supply_(Intercept) supply_price supply_farmPrice demand_(Intercept) 0.00 0.00000 0.00000 demand_price 0.00 0.00000 0.00000 demand_income 0.00 0.00000 0.00000 supply_(Intercept) 955.38 -7.25488 -2.14464 supply_price -7.25 0.06614 0.00620 supply_farmPrice -2.14 0.00620 0.01479 supply_trend -1.96 0.00384 0.00912 supply_trend demand_(Intercept) 0.00000 demand_price 0.00000 demand_income 0.00000 supply_(Intercept) -1.95529 supply_price 0.00384 supply_farmPrice 0.00912 supply_trend 0.06577 > > proc.time() user system elapsed 2.412 0.068 2.478 systemfit/tests/KleinI.R0000644000176200001440000001043212565347634014760 0ustar liggesuserslibrary( "systemfit" ) library( "sandwich" ) options( warn = 1 ) options( digits = 3 ) data( "KleinI" ) eqConsump <- consump ~ corpProf + corpProfLag + wages eqInvest <- invest ~ corpProf + corpProfLag + capitalLag eqPrivWage <- privWage ~ gnp + gnpLag + trend inst <- ~ govExp + taxes + govWage + trend + capitalLag + corpProfLag + gnpLag system <- list( Consumption = eqConsump, Investment = eqInvest, PrivateWages = eqPrivWage ) restrict <- c( "Consumption_corpProf + Investment_capitalLag = 0" ) restrict2 <- c( restrict, "Consumption_corpProfLag - PrivateWages_trend = 0" ) for( dataNo in 1:5 ) { # set some values of some variables to NA if( dataNo == 2 ) { KleinI$gnpLag[ 7 ] <- NA } else if( dataNo == 3 ) { KleinI$wages[ 10 ] <- NA } else if( dataNo == 4 ) { KleinI$corpProf[ 13 ] <- NA } else if( dataNo == 5 ) { KleinI$invest[ 16 ] <- NA } # single-equation OLS lmConsump <- lm( eqConsump, data = KleinI ) lmInvest <- lm( eqInvest, data = KleinI ) lmPrivWage <- lm( eqPrivWage, data = KleinI ) for( methodNo in 1:5 ) { method <- c( "OLS", "2SLS", "SUR", "3SLS", "3SLS" )[ methodNo ] maxit <- ifelse( methodNo == 5, 500, 1 ) cat( "> \n> # ", ifelse( maxit == 1, "", "I" ), method, "\n", sep = "" ) if( method %in% c( "OLS", "WLS", "SUR" ) ) { kleinModel <- systemfit( system, method = method, data = KleinI, methodResidCov = ifelse( method == "OLS", "geomean", "noDfCor" ), maxit = maxit ) } else { kleinModel <- systemfit( system, method = method, data = KleinI, inst = inst, methodResidCov = "noDfCor", maxit = maxit ) } cat( "> summary\n" ) print( summary( kleinModel ) ) if( method == "OLS" ) { cat( "compare coef with single-equation OLS\n" ) print( all.equal( coef( kleinModel ), c( coef( lmConsump ), coef( lmInvest ), coef( lmPrivWage ) ), check.attributes = FALSE ) ) } cat( "> residuals\n" ) print( residuals( kleinModel ) ) cat( "> fitted\n" ) print( fitted( kleinModel ) ) cat( "> predict\n" ) print( predict( kleinModel, se.fit = TRUE, interval = ifelse( methodNo %in% c( 1, 4 ), "prediction", "confidence" ), useDfSys = methodNo %in% c( 1, 3, 5 ) ) ) cat( "> model.frame\n" ) if( methodNo == 1 ) { mfOls <- model.frame( kleinModel ) print( mfOls ) } else if( methodNo == 2 ) { mf2sls <- model.frame( kleinModel ) print( mf2sls ) cat( "> Frames of instrumental variables\n" ) for( i in 1:3 ){ print( kleinModel$eq[[ i ]]$modelInst ) } } else if( methodNo == 3 ) { print( all.equal( mfOls, model.frame( kleinModel ) ) ) } else { print( all.equal( mf2sls, model.frame( kleinModel ) ) ) } cat( "> model.matrix\n" ) if( methodNo == 1 ) { mmOls <- model.matrix( kleinModel ) print( mmOls ) } else { print( all.equal( mmOls, model.matrix( kleinModel ) ) ) } if( methodNo == 2 ) { cat( "> matrix of instrumental variables\n" ) print( model.matrix( kleinModel, which = "z" ) ) cat( "> matrix of fitted regressors\n" ) print( round( model.matrix( kleinModel, which = "xHat" ), digits = 7 ) ) } cat( "> nobs\n" ) print( nobs( kleinModel ) ) cat( "> linearHypothesis\n" ) print( linearHypothesis( kleinModel, restrict ) ) print( linearHypothesis( kleinModel, restrict, test = "F" ) ) print( linearHypothesis( kleinModel, restrict, test = "Chisq" ) ) print( linearHypothesis( kleinModel, restrict2 ) ) print( linearHypothesis( kleinModel, restrict2, test = "F" ) ) print( linearHypothesis( kleinModel, restrict2, test = "Chisq" ) ) cat( "> logLik\n" ) print( logLik( kleinModel ) ) print( logLik( kleinModel, residCovDiag = TRUE ) ) if( method == "OLS" ) { cat( "compare log likelihood value with single-equation OLS\n" ) print( all.equal( logLik( kleinModel, residCovDiag = TRUE ), logLik( lmConsump ) + logLik( lmInvest ) + logLik( lmPrivWage ), check.attributes = FALSE ) ) } cat( "Estimating function\n" ) print( round( estfun( kleinModel ), digits = 7 ) ) print( all.equal( colSums( estfun( kleinModel ) ), rep( 0, ncol( estfun( kleinModel ) ) ), check.attributes = FALSE ) ) cat( "> Bread\n" ) print( bread( kleinModel ) ) } } systemfit/tests/test_w2sls.Rout.save0000644000176200001440000063456513060100647017404 0ustar liggesusers R version 3.3.2 (2016-10-31) -- "Sincere Pumpkin Patch" Copyright (C) 2016 The R Foundation for Statistical Computing Platform: x86_64-pc-linux-gnu (64-bit) R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > library( systemfit ) Loading required package: Matrix Loading required package: car Loading required package: lmtest Loading required package: zoo Attaching package: 'zoo' The following objects are masked from 'package:base': as.Date, as.Date.numeric Please cite the 'systemfit' package as: Arne Henningsen and Jeff D. Hamann (2007). systemfit: A Package for Estimating Systems of Simultaneous Equations in R. Journal of Statistical Software 23(4), 1-40. http://www.jstatsoft.org/v23/i04/. If you have questions, suggestions, or comments regarding the 'systemfit' package, please use a forum or 'tracker' at systemfit's R-Forge site: https://r-forge.r-project.org/projects/systemfit/ > options( digits = 3 ) > > data( "Kmenta" ) > useMatrix <- FALSE > > demand <- consump ~ price + income > supply <- consump ~ price + farmPrice + trend > inst <- ~ income + farmPrice + trend > inst1 <- ~ income + farmPrice > instlist <- list( inst1, inst ) > system <- list( demand = demand, supply = supply ) > restrm <- matrix(0,1,7) # restriction matrix "R" > restrm[1,3] <- 1 > restrm[1,7] <- -1 > restrict <- "demand_income - supply_trend = 0" > restr2m <- matrix(0,2,7) # restriction matrix "R" 2 > restr2m[1,3] <- 1 > restr2m[1,7] <- -1 > restr2m[2,2] <- -1 > restr2m[2,5] <- 1 > restr2q <- c( 0, 0.5 ) # restriction vector "q" 2 > restrict2 <- c( "demand_income - supply_trend = 0", + "- demand_price + supply_price = 0.5" ) > tc <- matrix(0,7,6) > tc[1,1] <- 1 > tc[2,2] <- 1 > tc[3,3] <- 1 > tc[4,4] <- 1 > tc[5,5] <- 1 > tc[6,6] <- 1 > tc[7,3] <- 1 > restr3m <- matrix(0,1,6) # restriction matrix "R" 2 > restr3m[1,2] <- -1 > restr3m[1,5] <- 1 > restr3q <- c( 0.5 ) # restriction vector "q" 2 > restrict3 <- "- C2 + C5 = 0.5" > > > ## ********************* W2SLS ***************** > fitw2sls1 <- systemfit( system, "W2SLS", data = Kmenta, inst = inst, + useMatrix = useMatrix ) > print( summary( fitw2sls1 ) ) systemfit results method: W2SLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 33 162 4.36 0.697 0.548 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 65.7 3.87 1.97 0.755 0.726 supply 20 16 96.6 6.04 2.46 0.640 0.572 The covariance matrix of the residuals used for estimation demand supply demand 3.87 0.00 supply 0.00 6.04 The covariance matrix of the residuals demand supply demand 3.87 4.36 supply 4.36 6.04 The correlations of the residuals demand supply demand 1.000 0.902 supply 0.902 1.000 W2SLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 94.6333 7.9208 11.95 1.1e-09 *** price -0.2436 0.0965 -2.52 0.022 * income 0.3140 0.0469 6.69 3.8e-06 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.966 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 65.729 MSE: 3.866 Root MSE: 1.966 Multiple R-Squared: 0.755 Adjusted R-Squared: 0.726 W2SLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 49.5324 12.0105 4.12 0.0008 *** price 0.2401 0.0999 2.40 0.0288 * farmPrice 0.2556 0.0473 5.41 5.8e-05 *** trend 0.2529 0.0997 2.54 0.0219 * --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.458 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 96.633 MSE: 6.04 Root MSE: 2.458 Multiple R-Squared: 0.64 Adjusted R-Squared: 0.572 > > ## ********************* W2SLS (EViews-like) ***************** > fitw2sls1e <- systemfit( system, "W2SLS", data = Kmenta, inst = inst, + methodResidCov = "noDfCor", x = TRUE, + useMatrix = useMatrix ) > print( summary( fitw2sls1e, useDfSys = TRUE ) ) systemfit results method: W2SLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 33 162 2.97 0.697 0.525 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 65.7 3.87 1.97 0.755 0.726 supply 20 16 96.6 6.04 2.46 0.640 0.572 The covariance matrix of the residuals used for estimation demand supply demand 3.29 0.00 supply 0.00 4.83 The covariance matrix of the residuals demand supply demand 3.29 3.59 supply 3.59 4.83 The correlations of the residuals demand supply demand 1.000 0.902 supply 0.902 1.000 W2SLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 94.6333 7.3027 12.96 1.7e-14 *** price -0.2436 0.0890 -2.74 0.0099 ** income 0.3140 0.0433 7.25 2.5e-08 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.966 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 65.729 MSE: 3.866 Root MSE: 1.966 Multiple R-Squared: 0.755 Adjusted R-Squared: 0.726 W2SLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 49.5324 10.7425 4.61 5.8e-05 *** price 0.2401 0.0894 2.69 0.0112 * farmPrice 0.2556 0.0423 6.05 8.4e-07 *** trend 0.2529 0.0891 2.84 0.0077 ** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.458 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 96.633 MSE: 6.04 Root MSE: 2.458 Multiple R-Squared: 0.64 Adjusted R-Squared: 0.572 > > ## ********************* W2SLS with restriction ******************* > fitw2sls2 <- systemfit( system, "W2SLS", data = Kmenta, restrict.matrix = restrm, + inst = inst, useMatrix = useMatrix ) > print( summary( fitw2sls2 ) ) systemfit results method: W2SLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 34 165 3.41 0.692 0.565 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 66.8 3.93 1.98 0.751 0.721 supply 20 16 98.4 6.15 2.48 0.633 0.564 The covariance matrix of the residuals used for estimation demand supply demand 3.97 0.00 supply 0.00 6.13 The covariance matrix of the residuals demand supply demand 3.93 4.56 supply 4.56 6.15 The correlations of the residuals demand supply demand 1.000 0.927 supply 0.927 1.000 W2SLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 94.3832 8.0090 11.78 1.5e-13 *** price -0.2302 0.0946 -2.43 0.02 * income 0.3028 0.0430 7.05 3.9e-08 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.983 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 66.838 MSE: 3.932 Root MSE: 1.983 Multiple R-Squared: 0.751 Adjusted R-Squared: 0.721 W2SLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 48.0494 11.8001 4.07 0.00026 *** price 0.2430 0.1006 2.42 0.02122 * farmPrice 0.2625 0.0459 5.72 2.0e-06 *** trend 0.3028 0.0430 7.05 3.9e-08 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.48 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 98.445 MSE: 6.153 Root MSE: 2.48 Multiple R-Squared: 0.633 Adjusted R-Squared: 0.564 > # the same with symbolically specified restrictions > fitw2sls2Sym <- systemfit( system, "W2SLS", data = Kmenta, + restrict.matrix = restrict, inst = inst, useMatrix = useMatrix ) > all.equal( fitw2sls2, fitw2sls2Sym ) [1] "Component \"call\": target, current do not match when deparsed" > > ## ********************* W2SLS with restriction (EViews-like) ************** > fitw2sls2e <- systemfit( system, "W2SLS", data = Kmenta, restrict.matrix = restrm, + inst = inst, methodResidCov = "noDfCor", x = TRUE, + useMatrix = useMatrix ) > print( summary( fitw2sls2e, useDfSys = TRUE ) ) systemfit results method: W2SLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 34 165 2.33 0.692 0.535 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 66.9 3.94 1.98 0.750 0.721 supply 20 16 98.4 6.15 2.48 0.633 0.564 The covariance matrix of the residuals used for estimation demand supply demand 3.37 0.00 supply 0.00 4.91 The covariance matrix of the residuals demand supply demand 3.35 3.76 supply 3.76 4.92 The correlations of the residuals demand supply demand 1.000 0.926 supply 0.926 1.000 W2SLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 94.3706 7.3834 12.78 1.6e-14 *** price -0.2295 0.0871 -2.63 0.013 * income 0.3022 0.0394 7.67 6.4e-09 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.984 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 66.906 MSE: 3.936 Root MSE: 1.984 Multiple R-Squared: 0.75 Adjusted R-Squared: 0.721 W2SLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 48.0661 10.5574 4.55 6.5e-05 *** price 0.2430 0.0900 2.70 0.011 * farmPrice 0.2624 0.0411 6.39 2.7e-07 *** trend 0.3022 0.0394 7.67 6.4e-09 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.48 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 98.408 MSE: 6.15 Root MSE: 2.48 Multiple R-Squared: 0.633 Adjusted R-Squared: 0.564 > nobs( fitw2sls2e ) [1] 40 > > ## ********************* W2SLS with restriction via restrict.regMat ******************* > fitw2sls3 <- systemfit( system, "W2SLS", data = Kmenta, restrict.regMat = tc, + inst = inst, x = TRUE, useMatrix = useMatrix ) > print( summary( fitw2sls3 ) ) systemfit results method: W2SLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 34 165 3.41 0.692 0.565 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 66.8 3.93 1.98 0.751 0.721 supply 20 16 98.4 6.15 2.48 0.633 0.564 The covariance matrix of the residuals used for estimation demand supply demand 3.97 0.00 supply 0.00 6.13 The covariance matrix of the residuals demand supply demand 3.93 4.56 supply 4.56 6.15 The correlations of the residuals demand supply demand 1.000 0.927 supply 0.927 1.000 W2SLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 94.3832 8.0090 11.78 1.5e-13 *** price -0.2302 0.0946 -2.43 0.02 * income 0.3028 0.0430 7.05 3.9e-08 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.983 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 66.838 MSE: 3.932 Root MSE: 1.983 Multiple R-Squared: 0.751 Adjusted R-Squared: 0.721 W2SLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 48.0494 11.8001 4.07 0.00026 *** price 0.2430 0.1006 2.42 0.02122 * farmPrice 0.2625 0.0459 5.72 2.0e-06 *** trend 0.3028 0.0430 7.05 3.9e-08 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.48 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 98.445 MSE: 6.153 Root MSE: 2.48 Multiple R-Squared: 0.633 Adjusted R-Squared: 0.564 > > ## ********************* W2SLS with restriction via restrict.regMat (EViews-like) ************** > fitw2sls3e <- systemfit( system, "W2SLS", data = Kmenta, restrict.regMat = tc, + inst = inst, methodResidCov = "noDfCor", useMatrix = useMatrix ) > print( summary( fitw2sls3e, useDfSys = TRUE ) ) systemfit results method: W2SLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 34 165 2.33 0.692 0.535 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 66.9 3.94 1.98 0.750 0.721 supply 20 16 98.4 6.15 2.48 0.633 0.564 The covariance matrix of the residuals used for estimation demand supply demand 3.37 0.00 supply 0.00 4.91 The covariance matrix of the residuals demand supply demand 3.35 3.76 supply 3.76 4.92 The correlations of the residuals demand supply demand 1.000 0.926 supply 0.926 1.000 W2SLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 94.3706 7.3834 12.78 1.6e-14 *** price -0.2295 0.0871 -2.63 0.013 * income 0.3022 0.0394 7.67 6.4e-09 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.984 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 66.906 MSE: 3.936 Root MSE: 1.984 Multiple R-Squared: 0.75 Adjusted R-Squared: 0.721 W2SLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 48.0661 10.5574 4.55 6.5e-05 *** price 0.2430 0.0900 2.70 0.011 * farmPrice 0.2624 0.0411 6.39 2.7e-07 *** trend 0.3022 0.0394 7.67 6.4e-09 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.48 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 98.408 MSE: 6.15 Root MSE: 2.48 Multiple R-Squared: 0.633 Adjusted R-Squared: 0.564 > > ## ***************** W2SLS with 2 restrictions ******************** > fitw2sls4 <- systemfit( system, "W2SLS", data = Kmenta, restrict.matrix = restr2m, + restrict.rhs = restr2q, inst = inst, x = TRUE, + useMatrix = useMatrix ) > print( summary( fitw2sls4 ) ) systemfit results method: W2SLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 35 166 3.57 0.69 0.575 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 65.9 3.88 1.97 0.754 0.725 supply 20 16 100.3 6.27 2.50 0.626 0.556 The covariance matrix of the residuals used for estimation demand supply demand 3.89 0.00 supply 0.00 6.25 The covariance matrix of the residuals demand supply demand 3.88 4.55 supply 4.55 6.27 The correlations of the residuals demand supply demand 1.000 0.924 supply 0.924 1.000 W2SLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 95.3043 6.3056 15.11 < 2e-16 *** price -0.2428 0.0684 -3.55 0.0011 ** income 0.3063 0.0394 7.78 3.9e-09 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.969 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 65.931 MSE: 3.878 Root MSE: 1.969 Multiple R-Squared: 0.754 Adjusted R-Squared: 0.725 W2SLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 46.4229 8.3296 5.57 2.8e-06 *** price 0.2572 0.0684 3.76 0.00062 *** farmPrice 0.2642 0.0455 5.80 1.4e-06 *** trend 0.3063 0.0394 7.78 3.9e-09 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.503 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 100.255 MSE: 6.266 Root MSE: 2.503 Multiple R-Squared: 0.626 Adjusted R-Squared: 0.556 > # the same with symbolically specified restrictions > fitw2sls4Sym <- systemfit( system, "W2SLS", data = Kmenta, + restrict.matrix = restrict2, inst = inst, x = TRUE, + useMatrix = useMatrix ) > all.equal( fitw2sls4, fitw2sls4Sym ) [1] "Component \"call\": target, current do not match when deparsed" > > ## ***************** W2SLS with 2 restrictions (EViews-like) ************** > fitw2sls4e <- systemfit( system, "W2SLS", data = Kmenta, restrict.matrix = restr2m, + restrict.rhs = restr2q, inst = inst, methodResidCov = "noDfCor", + useMatrix = useMatrix ) > print( summary( fitw2sls4e, useDfSys = TRUE ) ) systemfit results method: W2SLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 35 166 2.44 0.69 0.546 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 65.9 3.88 1.97 0.754 0.725 supply 20 16 100.2 6.26 2.50 0.626 0.556 The covariance matrix of the residuals used for estimation demand supply demand 3.3 0 supply 0.0 5 The covariance matrix of the residuals demand supply demand 3.30 3.75 supply 3.75 5.01 The correlations of the residuals demand supply demand 1.000 0.923 supply 0.923 1.000 W2SLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 95.3470 5.7579 16.56 < 2e-16 *** price -0.2428 0.0621 -3.91 0.00041 *** income 0.3059 0.0360 8.49 5.1e-10 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.97 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 65.945 MSE: 3.879 Root MSE: 1.97 Multiple R-Squared: 0.754 Adjusted R-Squared: 0.725 W2SLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 46.4366 7.5360 6.16 4.7e-07 *** price 0.2572 0.0621 4.14 0.00021 *** farmPrice 0.2642 0.0407 6.48 1.8e-07 *** trend 0.3059 0.0360 8.49 5.1e-10 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.503 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 100.225 MSE: 6.264 Root MSE: 2.503 Multiple R-Squared: 0.626 Adjusted R-Squared: 0.556 > > ## ***************** W2SLS with 2 restrictions via R and restrict.regMat ****************** > fitw2sls5 <- systemfit( system, "W2SLS", data = Kmenta, restrict.matrix = restr3m, + restrict.rhs = restr3q, restrict.regMat = tc, inst = inst, + x = TRUE, useMatrix = useMatrix ) > print( summary( fitw2sls5 ) ) systemfit results method: W2SLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 35 166 3.57 0.69 0.575 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 65.9 3.88 1.97 0.754 0.725 supply 20 16 100.3 6.27 2.50 0.626 0.556 The covariance matrix of the residuals used for estimation demand supply demand 3.89 0.00 supply 0.00 6.25 The covariance matrix of the residuals demand supply demand 3.88 4.55 supply 4.55 6.27 The correlations of the residuals demand supply demand 1.000 0.924 supply 0.924 1.000 W2SLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 95.3043 6.3056 15.11 < 2e-16 *** price -0.2428 0.0684 -3.55 0.0011 ** income 0.3063 0.0394 7.78 3.9e-09 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.969 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 65.931 MSE: 3.878 Root MSE: 1.969 Multiple R-Squared: 0.754 Adjusted R-Squared: 0.725 W2SLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 46.4229 8.3296 5.57 2.8e-06 *** price 0.2572 0.0684 3.76 0.00062 *** farmPrice 0.2642 0.0455 5.80 1.4e-06 *** trend 0.3063 0.0394 7.78 3.9e-09 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.503 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 100.255 MSE: 6.266 Root MSE: 2.503 Multiple R-Squared: 0.626 Adjusted R-Squared: 0.556 > # the same with symbolically specified restrictions > fitw2sls5Sym <- systemfit( system, "W2SLS", data = Kmenta, + restrict.matrix = restrict3, restrict.regMat = tc, inst = inst, + x = TRUE, useMatrix = useMatrix ) > all.equal( fitw2sls5, fitw2sls5Sym ) [1] "Component \"call\": target, current do not match when deparsed" > > ## ***************** W2SLS with 2 restrictions via R and restrict.regMat (EViews-like) ************** > fitw2sls5e <- systemfit( system, "W2SLS", data = Kmenta, restrict.matrix = restr3m, + restrict.rhs = restr3q, restrict.regMat = tc, inst = inst, + methodResidCov = "noDfCor", useMatrix = useMatrix ) > print( summary( fitw2sls5e, useDfSys = TRUE ) ) systemfit results method: W2SLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 35 166 2.44 0.69 0.546 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 65.9 3.88 1.97 0.754 0.725 supply 20 16 100.2 6.26 2.50 0.626 0.556 The covariance matrix of the residuals used for estimation demand supply demand 3.3 0 supply 0.0 5 The covariance matrix of the residuals demand supply demand 3.30 3.75 supply 3.75 5.01 The correlations of the residuals demand supply demand 1.000 0.923 supply 0.923 1.000 W2SLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 95.3470 5.7579 16.56 < 2e-16 *** price -0.2428 0.0621 -3.91 0.00041 *** income 0.3059 0.0360 8.49 5.1e-10 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.97 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 65.945 MSE: 3.879 Root MSE: 1.97 Multiple R-Squared: 0.754 Adjusted R-Squared: 0.725 W2SLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 46.4366 7.5360 6.16 4.7e-07 *** price 0.2572 0.0621 4.14 0.00021 *** farmPrice 0.2642 0.0407 6.48 1.8e-07 *** trend 0.3059 0.0360 8.49 5.1e-10 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.503 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 100.225 MSE: 6.264 Root MSE: 2.503 Multiple R-Squared: 0.626 Adjusted R-Squared: 0.556 > > ## ****** 2SLS estimation with different instruments ********************** > fitw2slsd1 <- systemfit( system, "W2SLS", data = Kmenta, inst = instlist, + useMatrix = useMatrix ) > print( summary( fitw2slsd1 ) ) systemfit results method: W2SLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 33 164 9.25 0.694 0.512 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 67.4 3.97 1.99 0.748 0.719 supply 20 16 96.6 6.04 2.46 0.640 0.572 The covariance matrix of the residuals used for estimation demand supply demand 3.97 0.00 supply 0.00 6.04 The covariance matrix of the residuals demand supply demand 3.97 3.84 supply 3.84 6.04 The correlations of the residuals demand supply demand 1.000 0.784 supply 0.784 1.000 W2SLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Instruments: ~income + farmPrice Estimate Std. Error t value Pr(>|t|) (Intercept) 106.7894 11.1435 9.58 2.9e-08 *** price -0.4116 0.1448 -2.84 0.011 * income 0.3617 0.0564 6.41 6.4e-06 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.992 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 67.447 MSE: 3.967 Root MSE: 1.992 Multiple R-Squared: 0.748 Adjusted R-Squared: 0.719 W2SLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 49.5324 12.0105 4.12 0.0008 *** price 0.2401 0.0999 2.40 0.0288 * farmPrice 0.2556 0.0473 5.41 5.8e-05 *** trend 0.2529 0.0997 2.54 0.0219 * --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.458 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 96.633 MSE: 6.04 Root MSE: 2.458 Multiple R-Squared: 0.64 Adjusted R-Squared: 0.572 > > ## ****** 2SLS estimation with different instruments (EViews-like)****************** > fitw2slsd1e <- systemfit( system, "W2SLS", data = Kmenta, inst = instlist, + methodResidCov = "noDfCor", x = TRUE, + useMatrix = useMatrix ) > print( summary( fitw2slsd1e, useDfSys = TRUE ) ) systemfit results method: W2SLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 33 164 6.29 0.694 0.5 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 67.4 3.97 1.99 0.748 0.719 supply 20 16 96.6 6.04 2.46 0.640 0.572 The covariance matrix of the residuals used for estimation demand supply demand 3.37 0.00 supply 0.00 4.83 The covariance matrix of the residuals demand supply demand 3.37 3.16 supply 3.16 4.83 The correlations of the residuals demand supply demand 1.000 0.784 supply 0.784 1.000 W2SLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Instruments: ~income + farmPrice Estimate Std. Error t value Pr(>|t|) (Intercept) 106.789 10.274 10.39 6.1e-12 *** price -0.412 0.134 -3.08 0.0041 ** income 0.362 0.052 6.95 6.0e-08 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.992 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 67.447 MSE: 3.967 Root MSE: 1.992 Multiple R-Squared: 0.748 Adjusted R-Squared: 0.719 W2SLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 49.5324 10.7425 4.61 5.8e-05 *** price 0.2401 0.0894 2.69 0.0112 * farmPrice 0.2556 0.0423 6.05 8.4e-07 *** trend 0.2529 0.0891 2.84 0.0077 ** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.458 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 96.633 MSE: 6.04 Root MSE: 2.458 Multiple R-Squared: 0.64 Adjusted R-Squared: 0.572 > > ## **** W2SLS estimation with different instruments and restriction ******** > fitw2slsd2 <- systemfit( system, "W2SLS", data = Kmenta, restrict.matrix = restrm, + inst = instlist, useMatrix = useMatrix ) > print( summary( fitw2slsd2 ) ) systemfit results method: W2SLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 34 166 5.11 0.69 0.557 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 64.8 3.81 1.95 0.758 0.730 supply 20 16 101.4 6.34 2.52 0.622 0.551 The covariance matrix of the residuals used for estimation demand supply demand 3.79 0.00 supply 0.00 6.27 The covariance matrix of the residuals demand supply demand 3.81 4.36 supply 4.36 6.34 The correlations of the residuals demand supply demand 1.000 0.888 supply 0.888 1.000 W2SLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Instruments: ~income + farmPrice Estimate Std. Error t value Pr(>|t|) (Intercept) 104.5695 10.6344 9.83 1.8e-11 *** price -0.3653 0.1327 -2.75 0.0094 ** income 0.3369 0.0485 6.95 5.1e-08 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.952 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 64.776 MSE: 3.81 Root MSE: 1.952 Multiple R-Squared: 0.758 Adjusted R-Squared: 0.73 W2SLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 47.0356 11.9466 3.94 0.00039 *** price 0.2450 0.1017 2.41 0.02156 * farmPrice 0.2672 0.0465 5.74 1.9e-06 *** trend 0.3369 0.0485 6.95 5.1e-08 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.518 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 101.426 MSE: 6.339 Root MSE: 2.518 Multiple R-Squared: 0.622 Adjusted R-Squared: 0.551 > > ## **** W2SLS estimation with different instruments and restriction (EViews-like)* > fitw2slsd2e <- systemfit( system, "W2SLS", data = Kmenta, restrict.matrix = restrm, + inst = instlist, methodResidCov = "noDfCor", x = TRUE, + useMatrix = useMatrix ) > print( summary( fitw2slsd2e, useDfSys = TRUE ) ) systemfit results method: W2SLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 34 166 3.45 0.69 0.535 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 64.7 3.81 1.95 0.759 0.730 supply 20 16 101.3 6.33 2.52 0.622 0.551 The covariance matrix of the residuals used for estimation demand supply demand 3.22 0.00 supply 0.00 5.02 The covariance matrix of the residuals demand supply demand 3.24 3.60 supply 3.60 5.06 The correlations of the residuals demand supply demand 1.000 0.888 supply 0.888 1.000 W2SLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Instruments: ~income + farmPrice Estimate Std. Error t value Pr(>|t|) (Intercept) 104.4638 9.7929 10.67 2.2e-12 *** price -0.3630 0.1220 -2.98 0.0053 ** income 0.3357 0.0444 7.57 8.6e-09 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.951 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 64.715 MSE: 3.807 Root MSE: 1.951 Multiple R-Squared: 0.759 Adjusted R-Squared: 0.73 W2SLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 47.0706 10.6890 4.40 0.0001 *** price 0.2449 0.0910 2.69 0.0109 * farmPrice 0.2671 0.0416 6.41 2.5e-07 *** trend 0.3357 0.0444 7.57 8.6e-09 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.516 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 101.299 MSE: 6.331 Root MSE: 2.516 Multiple R-Squared: 0.622 Adjusted R-Squared: 0.551 > > ## ** W2SLS estimation with different instruments and restriction via restrict.regMat **** > fitw2slsd3 <- systemfit( system, "W2SLS", data = Kmenta, restrict.regMat = tc, + inst = instlist, x = TRUE, useMatrix = useMatrix ) > print( summary( fitw2slsd3 ) ) systemfit results method: W2SLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 34 166 5.11 0.69 0.557 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 64.8 3.81 1.95 0.758 0.730 supply 20 16 101.4 6.34 2.52 0.622 0.551 The covariance matrix of the residuals used for estimation demand supply demand 3.79 0.00 supply 0.00 6.27 The covariance matrix of the residuals demand supply demand 3.81 4.36 supply 4.36 6.34 The correlations of the residuals demand supply demand 1.000 0.888 supply 0.888 1.000 W2SLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Instruments: ~income + farmPrice Estimate Std. Error t value Pr(>|t|) (Intercept) 104.5695 10.6344 9.83 1.8e-11 *** price -0.3653 0.1327 -2.75 0.0094 ** income 0.3369 0.0485 6.95 5.1e-08 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.952 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 64.776 MSE: 3.81 Root MSE: 1.952 Multiple R-Squared: 0.758 Adjusted R-Squared: 0.73 W2SLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 47.0356 11.9466 3.94 0.00039 *** price 0.2450 0.1017 2.41 0.02156 * farmPrice 0.2672 0.0465 5.74 1.9e-06 *** trend 0.3369 0.0485 6.95 5.1e-08 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.518 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 101.426 MSE: 6.339 Root MSE: 2.518 Multiple R-Squared: 0.622 Adjusted R-Squared: 0.551 > > ## W2SLS estimation with different instruments and restriction via restrict.regMat (EViews-like) > fitw2slsd3e <- systemfit( system, "W2SLS", data = Kmenta, restrict.regMat = tc, + inst = instlist, methodResidCov = "noDfCor", useMatrix = useMatrix ) > print( summary( fitw2slsd3e, useDfSys = TRUE ) ) systemfit results method: W2SLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 34 166 3.45 0.69 0.535 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 64.7 3.81 1.95 0.759 0.730 supply 20 16 101.3 6.33 2.52 0.622 0.551 The covariance matrix of the residuals used for estimation demand supply demand 3.22 0.00 supply 0.00 5.02 The covariance matrix of the residuals demand supply demand 3.24 3.60 supply 3.60 5.06 The correlations of the residuals demand supply demand 1.000 0.888 supply 0.888 1.000 W2SLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Instruments: ~income + farmPrice Estimate Std. Error t value Pr(>|t|) (Intercept) 104.4638 9.7929 10.67 2.2e-12 *** price -0.3630 0.1220 -2.98 0.0053 ** income 0.3357 0.0444 7.57 8.6e-09 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.951 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 64.715 MSE: 3.807 Root MSE: 1.951 Multiple R-Squared: 0.759 Adjusted R-Squared: 0.73 W2SLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 47.0706 10.6890 4.40 0.0001 *** price 0.2449 0.0910 2.69 0.0109 * farmPrice 0.2671 0.0416 6.41 2.5e-07 *** trend 0.3357 0.0444 7.57 8.6e-09 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.516 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 101.299 MSE: 6.331 Root MSE: 2.516 Multiple R-Squared: 0.622 Adjusted R-Squared: 0.551 > > > ## *********** estimations with a single regressor ************ > fitw2slsS1 <- systemfit( + list( consump ~ price - 1, price ~ consump + trend ), "W2SLS", + data = Kmenta, inst = ~ farmPrice + trend + income, useMatrix = useMatrix ) > print( summary( fitw2slsS1 ) ) systemfit results method: W2SLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 36 1544 179 -0.65 0.852 N DF SSR MSE RMSE R2 Adj R2 eq1 20 19 861 45.3 6.73 -2.213 -2.213 eq2 20 17 682 40.1 6.33 -0.022 -0.143 The covariance matrix of the residuals used for estimation eq1 eq2 eq1 45.3 0.0 eq2 0.0 40.1 The covariance matrix of the residuals eq1 eq2 eq1 45.3 -40.5 eq2 -40.5 40.1 The correlations of the residuals eq1 eq2 eq1 1.00 -0.95 eq2 -0.95 1.00 W2SLS estimates for 'eq1' (equation 1) Model Formula: consump ~ price - 1 Instruments: ~farmPrice + trend + income Estimate Std. Error t value Pr(>|t|) price 1.006 0.015 66.9 <2e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 6.734 on 19 degrees of freedom Number of observations: 20 Degrees of Freedom: 19 SSR: 861.48 MSE: 45.341 Root MSE: 6.734 Multiple R-Squared: -2.213 Adjusted R-Squared: -2.213 W2SLS estimates for 'eq2' (equation 2) Model Formula: price ~ consump + trend Instruments: ~farmPrice + trend + income Estimate Std. Error t value Pr(>|t|) (Intercept) 55.5365 46.2668 1.20 0.25 consump 0.4453 0.4622 0.96 0.35 trend -0.0426 0.2496 -0.17 0.87 Residual standard error: 6.335 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 682.257 MSE: 40.133 Root MSE: 6.335 Multiple R-Squared: -0.022 Adjusted R-Squared: -0.143 > fitw2slsS2 <- systemfit( + list( consump ~ price - 1, consump ~ trend - 1 ), "W2SLS", + data = Kmenta, inst = ~ farmPrice + price + income, useMatrix = useMatrix ) > print( summary( fitw2slsS2 ) ) systemfit results method: W2SLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 38 47456 111148 -87.5 -5.28 N DF SSR MSE RMSE R2 Adj R2 eq1 20 19 861 45.3 6.73 -2.21 -2.21 eq2 20 19 46595 2452.3 49.52 -172.79 -172.79 The covariance matrix of the residuals used for estimation eq1 eq2 eq1 45.3 0 eq2 0.0 2452 The covariance matrix of the residuals eq1 eq2 eq1 45.34 -6.33 eq2 -6.33 2452.34 The correlations of the residuals eq1 eq2 eq1 1.0000 -0.0448 eq2 -0.0448 1.0000 W2SLS estimates for 'eq1' (equation 1) Model Formula: consump ~ price - 1 Instruments: ~farmPrice + price + income Estimate Std. Error t value Pr(>|t|) price 1.006 0.015 66.9 <2e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 6.733 on 19 degrees of freedom Number of observations: 20 Degrees of Freedom: 19 SSR: 861.449 MSE: 45.339 Root MSE: 6.733 Multiple R-Squared: -2.213 Adjusted R-Squared: -2.213 W2SLS estimates for 'eq2' (equation 2) Model Formula: consump ~ trend - 1 Instruments: ~farmPrice + price + income Estimate Std. Error t value Pr(>|t|) trend 7.578 0.934 8.11 1.4e-07 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 49.521 on 19 degrees of freedom Number of observations: 20 Degrees of Freedom: 19 SSR: 46594.549 MSE: 2452.345 Root MSE: 49.521 Multiple R-Squared: -172.786 Adjusted R-Squared: -172.786 > fitw2slsS3 <- systemfit( + list( consump ~ trend - 1, price ~ trend - 1 ), "W2SLS", + data = Kmenta, inst = instlist, useMatrix = useMatrix ) > print( summary( fitw2slsS3 ) ) systemfit results method: W2SLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 38 97978 687515 -104 -10.6 N DF SSR MSE RMSE R2 Adj R2 eq1 20 19 50950 2682 51.8 -189.0 -189.0 eq2 20 19 47028 2475 49.8 -69.5 -69.5 The covariance matrix of the residuals used for estimation eq1 eq2 eq1 2682 0 eq2 0 2475 The covariance matrix of the residuals eq1 eq2 eq1 2682 2439 eq2 2439 2475 The correlations of the residuals eq1 eq2 eq1 1.000 0.989 eq2 0.989 1.000 W2SLS estimates for 'eq1' (equation 1) Model Formula: consump ~ trend - 1 Instruments: ~income + farmPrice Estimate Std. Error t value Pr(>|t|) trend 8.65 1.05 8.27 1e-07 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 51.784 on 19 degrees of freedom Number of observations: 20 Degrees of Freedom: 19 SSR: 50949.985 MSE: 2681.578 Root MSE: 51.784 Multiple R-Squared: -189.031 Adjusted R-Squared: -189.031 W2SLS estimates for 'eq2' (equation 2) Model Formula: price ~ trend - 1 Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) trend 7.318 0.929 7.88 2.1e-07 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 49.751 on 19 degrees of freedom Number of observations: 20 Degrees of Freedom: 19 SSR: 47028.107 MSE: 2475.164 Root MSE: 49.751 Multiple R-Squared: -69.48 Adjusted R-Squared: -69.48 > fitw2slsS4 <- systemfit( + list( consump ~ trend - 1, price ~ trend - 1 ), "W2SLS", + data = Kmenta, inst = ~ farmPrice + trend + income, + restrict.matrix = matrix( c( 1, -1 ), nrow = 1 ), useMatrix = useMatrix ) > print( summary( fitw2slsS4 ) ) systemfit results method: W2SLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 39 93548 111736 -99 -1.03 N DF SSR MSE RMSE R2 Adj R2 eq1 20 19 46514 2448 49.5 -172.5 -172.5 eq2 20 19 47034 2475 49.8 -69.5 -69.5 The covariance matrix of the residuals used for estimation eq1 eq2 eq1 2448 0 eq2 0 2475 The covariance matrix of the residuals eq1 eq2 eq1 2448 2439 eq2 2439 2475 The correlations of the residuals eq1 eq2 eq1 1.000 0.988 eq2 0.988 1.000 W2SLS estimates for 'eq1' (equation 1) Model Formula: consump ~ trend - 1 Instruments: ~farmPrice + trend + income Estimate Std. Error t value Pr(>|t|) trend 7.362 0.655 11.2 8.4e-14 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 49.478 on 19 degrees of freedom Number of observations: 20 Degrees of Freedom: 19 SSR: 46514.224 MSE: 2448.117 Root MSE: 49.478 Multiple R-Squared: -172.487 Adjusted R-Squared: -172.487 W2SLS estimates for 'eq2' (equation 2) Model Formula: price ~ trend - 1 Instruments: ~farmPrice + trend + income Estimate Std. Error t value Pr(>|t|) trend 7.362 0.655 11.2 8.4e-14 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 49.754 on 19 degrees of freedom Number of observations: 20 Degrees of Freedom: 19 SSR: 47033.528 MSE: 2475.449 Root MSE: 49.754 Multiple R-Squared: -69.488 Adjusted R-Squared: -69.488 > fitw2slsS5 <- systemfit( + list( consump ~ 1, price ~ 1 ), "W2SLS", + data = Kmenta, inst = instlist, useMatrix = useMatrix ) > print( summary( fitw2slsS5 ) ) systemfit results method: W2SLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 38 935 491 0 0 N DF SSR MSE RMSE R2 Adj R2 eq1 20 19 268 14.1 3.76 0 0 eq2 20 19 667 35.1 5.93 0 0 The covariance matrix of the residuals used for estimation eq1 eq2 eq1 14.1 0.0 eq2 0.0 35.1 The covariance matrix of the residuals eq1 eq2 eq1 14.11 2.18 eq2 2.18 35.12 The correlations of the residuals eq1 eq2 eq1 1.0000 0.0981 eq2 0.0981 1.0000 W2SLS estimates for 'eq1' (equation 1) Model Formula: consump ~ 1 Instruments: ~income + farmPrice Estimate Std. Error t value Pr(>|t|) (Intercept) 100.90 0.84 120 <2e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 3.756 on 19 degrees of freedom Number of observations: 20 Degrees of Freedom: 19 SSR: 268.114 MSE: 14.111 Root MSE: 3.756 Multiple R-Squared: 0 Adjusted R-Squared: 0 W2SLS estimates for 'eq2' (equation 2) Model Formula: price ~ 1 Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 100.02 1.33 75.5 <2e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 5.926 on 19 degrees of freedom Number of observations: 20 Degrees of Freedom: 19 SSR: 667.251 MSE: 35.118 Root MSE: 5.926 Multiple R-Squared: 0 Adjusted R-Squared: 0 > > > ## **************** shorter summaries ********************** > print( summary( fitw2sls1e, residCov = FALSE ) ) systemfit results method: W2SLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 33 162 2.97 0.697 0.525 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 65.7 3.87 1.97 0.755 0.726 supply 20 16 96.6 6.04 2.46 0.640 0.572 W2SLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 94.6333 7.3027 12.96 3.1e-10 *** price -0.2436 0.0890 -2.74 0.014 * income 0.3140 0.0433 7.25 1.3e-06 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.966 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 65.729 MSE: 3.866 Root MSE: 1.966 Multiple R-Squared: 0.755 Adjusted R-Squared: 0.726 W2SLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 49.5324 10.7425 4.61 0.00029 *** price 0.2401 0.0894 2.69 0.01623 * farmPrice 0.2556 0.0423 6.05 1.7e-05 *** trend 0.2529 0.0891 2.84 0.01188 * --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.458 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 96.633 MSE: 6.04 Root MSE: 2.458 Multiple R-Squared: 0.64 Adjusted R-Squared: 0.572 > > print( summary( fitw2sls2, residCov = FALSE, equations = FALSE ) ) systemfit results method: W2SLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 34 165 3.41 0.692 0.565 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 66.8 3.93 1.98 0.751 0.721 supply 20 16 98.4 6.15 2.48 0.633 0.564 Coefficients: Estimate Std. Error t value Pr(>|t|) demand_(Intercept) 94.3832 8.0090 11.78 1.5e-13 *** demand_price -0.2302 0.0946 -2.43 0.02042 * demand_income 0.3028 0.0430 7.05 3.9e-08 *** supply_(Intercept) 48.0494 11.8001 4.07 0.00026 *** supply_price 0.2430 0.1006 2.42 0.02122 * supply_farmPrice 0.2625 0.0459 5.72 2.0e-06 *** supply_trend 0.3028 0.0430 7.05 3.9e-08 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 > > print( summary( fitw2sls3, useDfSys = FALSE ), equations = FALSE ) systemfit results method: W2SLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 34 165 3.41 0.692 0.565 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 66.8 3.93 1.98 0.751 0.721 supply 20 16 98.4 6.15 2.48 0.633 0.564 The covariance matrix of the residuals used for estimation demand supply demand 3.97 0.00 supply 0.00 6.13 The covariance matrix of the residuals demand supply demand 3.93 4.56 supply 4.56 6.15 The correlations of the residuals demand supply demand 1.000 0.927 supply 0.927 1.000 Coefficients: Estimate Std. Error t value Pr(>|t|) demand_(Intercept) 94.3832 8.0090 11.78 1.3e-09 *** demand_price -0.2302 0.0946 -2.43 0.02634 * demand_income 0.3028 0.0430 7.05 2.0e-06 *** supply_(Intercept) 48.0494 11.8001 4.07 0.00089 *** supply_price 0.2430 0.1006 2.42 0.02802 * supply_farmPrice 0.2625 0.0459 5.72 3.2e-05 *** supply_trend 0.3028 0.0430 7.05 2.8e-06 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 > > print( summary( fitw2sls4e ), residCov = FALSE ) systemfit results method: W2SLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 35 166 2.44 0.69 0.546 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 65.9 3.88 1.97 0.754 0.725 supply 20 16 100.2 6.26 2.50 0.626 0.556 W2SLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 95.3470 5.7579 16.56 < 2e-16 *** price -0.2428 0.0621 -3.91 0.00041 *** income 0.3059 0.0360 8.49 5.1e-10 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.97 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 65.945 MSE: 3.879 Root MSE: 1.97 Multiple R-Squared: 0.754 Adjusted R-Squared: 0.725 W2SLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 46.4366 7.5360 6.16 4.7e-07 *** price 0.2572 0.0621 4.14 0.00021 *** farmPrice 0.2642 0.0407 6.48 1.8e-07 *** trend 0.3059 0.0360 8.49 5.1e-10 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.503 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 100.225 MSE: 6.264 Root MSE: 2.503 Multiple R-Squared: 0.626 Adjusted R-Squared: 0.556 > > print( summary( fitw2sls5, useDfSys = FALSE, residCov = FALSE ) ) systemfit results method: W2SLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 35 166 3.57 0.69 0.575 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 65.9 3.88 1.97 0.754 0.725 supply 20 16 100.3 6.27 2.50 0.626 0.556 W2SLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 95.3043 6.3056 15.11 2.7e-11 *** price -0.2428 0.0684 -3.55 0.0025 ** income 0.3063 0.0394 7.78 5.4e-07 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.969 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 65.931 MSE: 3.878 Root MSE: 1.969 Multiple R-Squared: 0.754 Adjusted R-Squared: 0.725 W2SLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 46.4229 8.3296 5.57 4.2e-05 *** price 0.2572 0.0684 3.76 0.0017 ** farmPrice 0.2642 0.0455 5.80 2.7e-05 *** trend 0.3063 0.0394 7.78 8.0e-07 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.503 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 100.255 MSE: 6.266 Root MSE: 2.503 Multiple R-Squared: 0.626 Adjusted R-Squared: 0.556 > > print( summary( fitw2slsd1, useDfSys = TRUE ), residCov = FALSE, + equations = FALSE ) systemfit results method: W2SLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 33 164 9.25 0.694 0.512 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 67.4 3.97 1.99 0.748 0.719 supply 20 16 96.6 6.04 2.46 0.640 0.572 Coefficients: Estimate Std. Error t value Pr(>|t|) demand_(Intercept) 106.7894 11.1435 9.58 4.7e-11 *** demand_price -0.4116 0.1448 -2.84 0.00764 ** demand_income 0.3617 0.0564 6.41 2.9e-07 *** supply_(Intercept) 49.5324 12.0105 4.12 0.00024 *** supply_price 0.2401 0.0999 2.40 0.02208 * supply_farmPrice 0.2556 0.0473 5.41 5.5e-06 *** supply_trend 0.2529 0.0997 2.54 0.01605 * --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 > > print( summary( fitw2slsd2e, equations = TRUE ), equations = FALSE ) systemfit results method: W2SLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 34 166 3.45 0.69 0.535 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 64.7 3.81 1.95 0.759 0.730 supply 20 16 101.3 6.33 2.52 0.622 0.551 The covariance matrix of the residuals used for estimation demand supply demand 3.22 0.00 supply 0.00 5.02 The covariance matrix of the residuals demand supply demand 3.24 3.60 supply 3.60 5.06 The correlations of the residuals demand supply demand 1.000 0.888 supply 0.888 1.000 Coefficients: Estimate Std. Error t value Pr(>|t|) demand_(Intercept) 104.4638 9.7929 10.67 2.2e-12 *** demand_price -0.3630 0.1220 -2.98 0.0053 ** demand_income 0.3357 0.0444 7.57 8.6e-09 *** supply_(Intercept) 47.0706 10.6890 4.40 0.0001 *** supply_price 0.2449 0.0910 2.69 0.0109 * supply_farmPrice 0.2671 0.0416 6.41 2.5e-07 *** supply_trend 0.3357 0.0444 7.57 8.6e-09 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 > > print( summary( fitw2slsd3e, equations = FALSE ), residCov = FALSE ) systemfit results method: W2SLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 34 166 3.45 0.69 0.535 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 64.7 3.81 1.95 0.759 0.730 supply 20 16 101.3 6.33 2.52 0.622 0.551 Coefficients: Estimate Std. Error t value Pr(>|t|) demand_(Intercept) 104.4638 9.7929 10.67 2.2e-12 *** demand_price -0.3630 0.1220 -2.98 0.0053 ** demand_income 0.3357 0.0444 7.57 8.6e-09 *** supply_(Intercept) 47.0706 10.6890 4.40 0.0001 *** supply_price 0.2449 0.0910 2.69 0.0109 * supply_farmPrice 0.2671 0.0416 6.41 2.5e-07 *** supply_trend 0.3357 0.0444 7.57 8.6e-09 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 > > > ## ****************** residuals ************************** > print( residuals( fitw2sls1e ) ) demand supply 1 0.843 -0.4348 2 -0.698 -1.2131 3 2.359 1.7090 4 1.490 0.7956 5 2.139 1.5942 6 1.277 0.6595 7 1.571 1.4346 8 -3.066 -4.8724 9 -1.125 -2.3975 10 2.492 3.1427 11 -0.108 0.0689 12 -2.292 -1.3978 13 -1.598 -1.1136 14 -0.271 1.1684 15 1.958 3.4865 16 -3.430 -3.8285 17 -0.313 0.6793 18 -2.151 -2.7713 19 1.592 2.6668 20 -0.668 0.6235 > print( residuals( fitw2sls1e$eq[[ 1 ]] ) ) 1 2 3 4 5 6 7 8 9 10 11 0.843 -0.698 2.359 1.490 2.139 1.277 1.571 -3.066 -1.125 2.492 -0.108 12 13 14 15 16 17 18 19 20 -2.292 -1.598 -0.271 1.958 -3.430 -0.313 -2.151 1.592 -0.668 > > print( residuals( fitw2sls2 ) ) demand supply 1 0.726 0.0287 2 -0.754 -0.8185 3 2.304 2.0561 4 1.437 1.0966 5 2.191 1.7764 6 1.317 0.8056 7 1.620 1.5441 8 -3.015 -4.8526 9 -1.087 -2.3957 10 2.513 3.1658 11 -0.265 0.1722 12 -2.506 -1.2753 13 -1.781 -1.0688 14 -0.332 1.1028 15 2.086 3.2370 16 -3.325 -4.1563 17 -0.144 0.2984 18 -2.128 -3.1286 19 1.662 2.2767 20 -0.518 0.1355 > print( residuals( fitw2sls2$eq[[ 2 ]] ) ) 1 2 3 4 5 6 7 8 9 10 0.0287 -0.8185 2.0561 1.0966 1.7764 0.8056 1.5441 -4.8526 -2.3957 3.1658 11 12 13 14 15 16 17 18 19 20 0.1722 -1.2753 -1.0688 1.1028 3.2370 -4.1563 0.2984 -3.1286 2.2767 0.1355 > > print( residuals( fitw2sls3 ) ) demand supply 1 0.726 0.0287 2 -0.754 -0.8185 3 2.304 2.0561 4 1.437 1.0966 5 2.191 1.7764 6 1.317 0.8056 7 1.620 1.5441 8 -3.015 -4.8526 9 -1.087 -2.3957 10 2.513 3.1658 11 -0.265 0.1722 12 -2.506 -1.2753 13 -1.781 -1.0688 14 -0.332 1.1028 15 2.086 3.2370 16 -3.325 -4.1563 17 -0.144 0.2984 18 -2.128 -3.1286 19 1.662 2.2767 20 -0.518 0.1355 > print( residuals( fitw2sls3$eq[[ 1 ]] ) ) 1 2 3 4 5 6 7 8 9 10 11 0.726 -0.754 2.304 1.437 2.191 1.317 1.620 -3.015 -1.087 2.513 -0.265 12 13 14 15 16 17 18 19 20 -2.506 -1.781 -0.332 2.086 -3.325 -0.144 -2.128 1.662 -0.518 > > print( residuals( fitw2sls4e ) ) demand supply 1 0.761 0.0514 2 -0.700 -0.8567 3 2.350 2.0266 4 1.492 1.0504 5 2.159 1.7988 6 1.301 0.8085 7 1.616 1.5253 8 -2.986 -4.9339 9 -1.130 -2.3600 10 2.429 3.2858 11 -0.284 0.2948 12 -2.458 -1.2168 13 -1.705 -1.0756 14 -0.327 1.1348 15 2.007 3.2835 16 -3.368 -4.1646 17 -0.312 0.4480 18 -2.099 -3.2018 19 1.694 2.1807 20 -0.439 -0.0794 > print( residuals( fitw2sls4e$eq[[ 2 ]] ) ) 1 2 3 4 5 6 7 8 9 10 0.0514 -0.8567 2.0266 1.0504 1.7988 0.8085 1.5253 -4.9339 -2.3600 3.2858 11 12 13 14 15 16 17 18 19 20 0.2948 -1.2168 -1.0756 1.1348 3.2835 -4.1646 0.4480 -3.2018 2.1807 -0.0794 > > print( residuals( fitw2sls5 ) ) demand supply 1 0.765 0.0551 2 -0.701 -0.8537 3 2.350 2.0293 4 1.491 1.0527 5 2.158 1.8003 6 1.300 0.8097 7 1.614 1.5262 8 -2.991 -4.9339 9 -1.129 -2.3600 10 2.433 3.2862 11 -0.275 0.2958 12 -2.450 -1.2157 13 -1.700 -1.0752 14 -0.324 1.1344 15 2.005 3.2816 16 -3.371 -4.1672 17 -0.311 0.4452 18 -2.102 -3.2047 19 1.688 2.1776 20 -0.451 -0.0835 > print( residuals( fitw2sls5$eq[[ 1 ]] ) ) 1 2 3 4 5 6 7 8 9 10 11 0.765 -0.701 2.350 1.491 2.158 1.300 1.614 -2.991 -1.129 2.433 -0.275 12 13 14 15 16 17 18 19 20 -2.450 -1.700 -0.324 2.005 -3.371 -0.311 -2.102 1.688 -0.451 > > print( residuals( fitw2slsd1 ) ) demand supply 1 1.3775 -0.4348 2 0.0125 -1.2131 3 2.9728 1.7090 4 2.2121 0.7956 5 1.6920 1.5942 6 1.0407 0.6595 7 1.4768 1.4346 8 -2.7583 -4.8724 9 -1.6807 -2.3975 10 1.4265 3.1427 11 -0.2029 0.0689 12 -1.5123 -1.3978 13 -0.4958 -1.1136 14 -0.1528 1.1684 15 0.8692 3.4865 16 -4.0547 -3.8285 17 -2.5309 0.6793 18 -1.8070 -2.7713 19 1.9299 2.6668 20 0.1853 0.6235 > print( residuals( fitw2slsd1$eq[[ 2 ]] ) ) 1 2 3 4 5 6 7 8 9 10 -0.4348 -1.2131 1.7090 0.7956 1.5942 0.6595 1.4346 -4.8724 -2.3975 3.1427 11 12 13 14 15 16 17 18 19 20 0.0689 -1.3978 -1.1136 1.1684 3.4865 -3.8285 0.6793 -2.7713 2.6668 0.6235 > > print( residuals( fitw2slsd2e ) ) demand supply 1 1.100 0.3346 2 -0.192 -0.5581 3 2.785 2.2852 4 2.012 1.2953 5 1.849 1.8966 6 1.145 0.9020 7 1.573 1.6164 8 -2.722 -4.8395 9 -1.531 -2.3946 10 1.629 3.1810 11 -0.448 0.2403 12 -1.988 -1.1944 13 -0.972 -1.0393 14 -0.271 1.0594 15 1.251 3.0723 16 -3.782 -4.3726 17 -1.904 0.0471 18 -1.823 -3.3644 19 1.992 2.0193 20 0.298 -0.1866 > print( residuals( fitw2slsd2e$eq[[ 1 ]] ) ) 1 2 3 4 5 6 7 8 9 10 11 1.100 -0.192 2.785 2.012 1.849 1.145 1.573 -2.722 -1.531 1.629 -0.448 12 13 14 15 16 17 18 19 20 -1.988 -0.972 -0.271 1.251 -3.782 -1.904 -1.823 1.992 0.298 > > print( residuals( fitw2slsd3e ) ) demand supply 1 1.100 0.3346 2 -0.192 -0.5581 3 2.785 2.2852 4 2.012 1.2953 5 1.849 1.8966 6 1.145 0.9020 7 1.573 1.6164 8 -2.722 -4.8395 9 -1.531 -2.3946 10 1.629 3.1810 11 -0.448 0.2403 12 -1.988 -1.1944 13 -0.972 -1.0393 14 -0.271 1.0594 15 1.251 3.0723 16 -3.782 -4.3726 17 -1.904 0.0471 18 -1.823 -3.3644 19 1.992 2.0193 20 0.298 -0.1866 > print( residuals( fitw2slsd3e$eq[[ 2 ]] ) ) 1 2 3 4 5 6 7 8 9 10 0.3346 -0.5581 2.2852 1.2953 1.8966 0.9020 1.6164 -4.8395 -2.3946 3.1810 11 12 13 14 15 16 17 18 19 20 0.2403 -1.1944 -1.0393 1.0594 3.0723 -4.3726 0.0471 -3.3644 2.0193 -0.1866 > > > ## *************** coefficients ********************* > print( round( coef( fitw2sls1e ), digits = 6 ) ) demand_(Intercept) demand_price demand_income supply_(Intercept) 94.633 -0.244 0.314 49.532 supply_price supply_farmPrice supply_trend 0.240 0.256 0.253 > print( round( coef( fitw2sls1e$eq[[ 2 ]] ), digits = 6 ) ) (Intercept) price farmPrice trend 49.532 0.240 0.256 0.253 > > print( round( coef( fitw2slsd2e ), digits = 6 ) ) demand_(Intercept) demand_price demand_income supply_(Intercept) 104.464 -0.363 0.336 47.071 supply_price supply_farmPrice supply_trend 0.245 0.267 0.336 > print( round( coef( fitw2slsd2e$eq[[ 1 ]] ), digits = 6 ) ) (Intercept) price income 104.464 -0.363 0.336 > > print( round( coef( fitw2slsd3e ), digits = 6 ) ) demand_(Intercept) demand_price demand_income supply_(Intercept) 104.464 -0.363 0.336 47.071 supply_price supply_farmPrice supply_trend 0.245 0.267 0.336 > print( round( coef( fitw2slsd3e, modified.regMat = TRUE ), digits = 6 ) ) C1 C2 C3 C4 C5 C6 104.464 -0.363 0.336 47.071 0.245 0.267 > print( round( coef( fitw2slsd3e$eq[[ 2 ]] ), digits = 6 ) ) (Intercept) price farmPrice trend 47.071 0.245 0.267 0.336 > > print( round( coef( fitw2sls4 ), digits = 6 ) ) demand_(Intercept) demand_price demand_income supply_(Intercept) 95.304 -0.243 0.306 46.423 supply_price supply_farmPrice supply_trend 0.257 0.264 0.306 > print( round( coef( fitw2sls4$eq[[ 1 ]] ), digits = 6 ) ) (Intercept) price income 95.304 -0.243 0.306 > > print( round( coef( fitw2sls5 ), digits = 6 ) ) demand_(Intercept) demand_price demand_income supply_(Intercept) 95.304 -0.243 0.306 46.423 supply_price supply_farmPrice supply_trend 0.257 0.264 0.306 > print( round( coef( fitw2sls5, modified.regMat = TRUE ), digits = 6 ) ) C1 C2 C3 C4 C5 C6 95.304 -0.243 0.306 46.423 0.257 0.264 > print( round( coef( fitw2sls5$eq[[ 2 ]] ), digits = 6 ) ) (Intercept) price farmPrice trend 46.423 0.257 0.264 0.306 > > > ## *************** coefficients with stats ********************* > print( round( coef( summary( fitw2sls1e, useDfSys = FALSE ) ), digits = 6 ) ) Estimate Std. Error t value Pr(>|t|) demand_(Intercept) 94.633 7.3027 12.96 0.000000 demand_price -0.244 0.0890 -2.74 0.014016 demand_income 0.314 0.0433 7.25 0.000001 supply_(Intercept) 49.532 10.7425 4.61 0.000289 supply_price 0.240 0.0894 2.69 0.016234 supply_farmPrice 0.256 0.0423 6.05 0.000017 supply_trend 0.253 0.0891 2.84 0.011883 > print( round( coef( summary( fitw2sls1e$eq[[ 2 ]], useDfSys = FALSE ) ), + digits = 6 ) ) Estimate Std. Error t value Pr(>|t|) (Intercept) 49.532 10.7425 4.61 0.000289 price 0.240 0.0894 2.69 0.016234 farmPrice 0.256 0.0423 6.05 0.000017 trend 0.253 0.0891 2.84 0.011883 > > print( round( coef( summary( fitw2slsd2e ) ), digits = 6 ) ) Estimate Std. Error t value Pr(>|t|) demand_(Intercept) 104.464 9.7929 10.67 0.00000 demand_price -0.363 0.1220 -2.98 0.00534 demand_income 0.336 0.0444 7.57 0.00000 supply_(Intercept) 47.071 10.6890 4.40 0.00010 supply_price 0.245 0.0910 2.69 0.01093 supply_farmPrice 0.267 0.0416 6.41 0.00000 supply_trend 0.336 0.0444 7.57 0.00000 > print( round( coef( summary( fitw2slsd2e$eq[[ 1 ]] ) ), digits = 6 ) ) Estimate Std. Error t value Pr(>|t|) (Intercept) 104.464 9.7929 10.67 0.00000 price -0.363 0.1220 -2.98 0.00534 income 0.336 0.0444 7.57 0.00000 > > print( round( coef( summary( fitw2slsd3e, useDfSys = FALSE ) ), digits = 6 ) ) Estimate Std. Error t value Pr(>|t|) demand_(Intercept) 104.464 9.7929 10.67 0.000000 demand_price -0.363 0.1220 -2.98 0.008475 demand_income 0.336 0.0444 7.57 0.000001 supply_(Intercept) 47.071 10.6890 4.40 0.000444 supply_price 0.245 0.0910 2.69 0.016014 supply_farmPrice 0.267 0.0416 6.41 0.000009 supply_trend 0.336 0.0444 7.57 0.000001 > print( round( coef( summary( fitw2slsd3e, useDfSys = FALSE ), + modified.regMat = TRUE ), digits = 6 ) ) Estimate Std. Error t value Pr(>|t|) C1 104.464 9.7929 10.67 NA C2 -0.363 0.1220 -2.98 NA C3 0.336 0.0444 7.57 NA C4 47.071 10.6890 4.40 NA C5 0.245 0.0910 2.69 NA C6 0.267 0.0416 6.41 NA > print( round( coef( summary( fitw2slsd3e$eq[[ 2 ]], useDfSys = FALSE ) ), + digits = 6 ) ) Estimate Std. Error t value Pr(>|t|) (Intercept) 47.071 10.6890 4.40 0.000444 price 0.245 0.0910 2.69 0.016014 farmPrice 0.267 0.0416 6.41 0.000009 trend 0.336 0.0444 7.57 0.000001 > > print( round( coef( summary( fitw2sls4 ) ), digits = 6 ) ) Estimate Std. Error t value Pr(>|t|) demand_(Intercept) 95.304 6.3056 15.11 0.000000 demand_price -0.243 0.0684 -3.55 0.001128 demand_income 0.306 0.0394 7.78 0.000000 supply_(Intercept) 46.423 8.3296 5.57 0.000003 supply_price 0.257 0.0684 3.76 0.000622 supply_farmPrice 0.264 0.0455 5.80 0.000001 supply_trend 0.306 0.0394 7.78 0.000000 > print( round( coef( summary( fitw2sls4$eq[[ 1 ]] ) ), digits = 6 ) ) Estimate Std. Error t value Pr(>|t|) (Intercept) 95.304 6.3056 15.11 0.00000 price -0.243 0.0684 -3.55 0.00113 income 0.306 0.0394 7.78 0.00000 > > print( round( coef( summary( fitw2sls5 ) ), digits = 6 ) ) Estimate Std. Error t value Pr(>|t|) demand_(Intercept) 95.304 6.3056 15.11 0.000000 demand_price -0.243 0.0684 -3.55 0.001128 demand_income 0.306 0.0394 7.78 0.000000 supply_(Intercept) 46.423 8.3296 5.57 0.000003 supply_price 0.257 0.0684 3.76 0.000622 supply_farmPrice 0.264 0.0455 5.80 0.000001 supply_trend 0.306 0.0394 7.78 0.000000 > print( round( coef( summary( fitw2sls5 ), modified.regMat = TRUE ), digits = 6 ) ) Estimate Std. Error t value Pr(>|t|) C1 95.304 6.3056 15.11 0.000000 C2 -0.243 0.0684 -3.55 0.001128 C3 0.306 0.0394 7.78 0.000000 C4 46.423 8.3296 5.57 0.000003 C5 0.257 0.0684 3.76 0.000622 C6 0.264 0.0455 5.80 0.000001 > print( round( coef( summary( fitw2sls5$eq[[ 2 ]] ) ), digits = 6 ) ) Estimate Std. Error t value Pr(>|t|) (Intercept) 46.423 8.3296 5.57 0.000003 price 0.257 0.0684 3.76 0.000622 farmPrice 0.264 0.0455 5.80 0.000001 trend 0.306 0.0394 7.78 0.000000 > > > ## *********** variance covariance matrix of the coefficients ******* > print( round( vcov( fitw2sls1e ), digits = 6 ) ) demand_(Intercept) demand_price demand_income demand_(Intercept) 53.3287 -0.57241 0.04191 demand_price -0.5724 0.00791 -0.00225 demand_income 0.0419 -0.00225 0.00187 supply_(Intercept) 0.0000 0.00000 0.00000 supply_price 0.0000 0.00000 0.00000 supply_farmPrice 0.0000 0.00000 0.00000 supply_trend 0.0000 0.00000 0.00000 supply_(Intercept) supply_price supply_farmPrice demand_(Intercept) 0.000 0.000000 0.000000 demand_price 0.000 0.000000 0.000000 demand_income 0.000 0.000000 0.000000 supply_(Intercept) 115.402 -0.876328 -0.259055 supply_price -0.876 0.007989 0.000749 supply_farmPrice -0.259 0.000749 0.001786 supply_trend -0.236 0.000463 0.001101 supply_trend demand_(Intercept) 0.000000 demand_price 0.000000 demand_income 0.000000 supply_(Intercept) -0.236183 supply_price 0.000463 supply_farmPrice 0.001101 supply_trend 0.007945 > print( round( vcov( fitw2sls1e$eq[[ 2 ]] ), digits = 6 ) ) (Intercept) price farmPrice trend (Intercept) 115.402 -0.876328 -0.259055 -0.236183 price -0.876 0.007989 0.000749 0.000463 farmPrice -0.259 0.000749 0.001786 0.001101 trend -0.236 0.000463 0.001101 0.007945 > > print( round( vcov( fitw2sls2 ), digits = 6 ) ) demand_(Intercept) demand_price demand_income demand_(Intercept) 64.14482 -0.679629 0.041312 demand_price -0.67963 0.008954 -0.002214 demand_income 0.04131 -0.002214 0.001847 supply_(Intercept) -1.22810 0.065809 -0.054894 supply_price 0.00241 -0.000129 0.000108 supply_farmPrice 0.00573 -0.000307 0.000256 supply_trend 0.04131 -0.002214 0.001847 supply_(Intercept) supply_price supply_farmPrice demand_(Intercept) -1.2281 0.002409 0.005727 demand_price 0.0658 -0.000129 -0.000307 demand_income -0.0549 0.000108 0.000256 supply_(Intercept) 139.2416 -1.098376 -0.294954 supply_price -1.0984 0.010116 0.000884 supply_farmPrice -0.2950 0.000884 0.002109 supply_trend -0.0549 0.000108 0.000256 supply_trend demand_(Intercept) 0.041312 demand_price -0.002214 demand_income 0.001847 supply_(Intercept) -0.054894 supply_price 0.000108 supply_farmPrice 0.000256 supply_trend 0.001847 > print( round( vcov( fitw2sls2$eq[[ 1 ]] ), digits = 6 ) ) (Intercept) price income (Intercept) 64.1448 -0.67963 0.04131 price -0.6796 0.00895 -0.00221 income 0.0413 -0.00221 0.00185 > > print( round( vcov( fitw2sls3e ), digits = 6 ) ) demand_(Intercept) demand_price demand_income demand_(Intercept) 54.51421 -0.577209 0.034718 demand_price -0.57721 0.007585 -0.001860 demand_income 0.03472 -0.001860 0.001552 supply_(Intercept) -1.03208 0.055305 -0.046132 supply_price 0.00202 -0.000108 0.000090 supply_farmPrice 0.00481 -0.000258 0.000215 supply_trend 0.03472 -0.001860 0.001552 supply_(Intercept) supply_price supply_farmPrice demand_(Intercept) -1.0321 0.002024 0.004813 demand_price 0.0553 -0.000108 -0.000258 demand_income -0.0461 0.000090 0.000215 supply_(Intercept) 111.4592 -0.878830 -0.236271 supply_price -0.8788 0.008093 0.000708 supply_farmPrice -0.2363 0.000708 0.001689 supply_trend -0.0461 0.000090 0.000215 supply_trend demand_(Intercept) 0.034718 demand_price -0.001860 demand_income 0.001552 supply_(Intercept) -0.046132 supply_price 0.000090 supply_farmPrice 0.000215 supply_trend 0.001552 > print( round( vcov( fitw2sls3e, modified.regMat = TRUE ), digits = 6 ) ) C1 C2 C3 C4 C5 C6 C1 54.51421 -0.577209 0.034718 -1.0321 0.002024 0.004813 C2 -0.57721 0.007585 -0.001860 0.0553 -0.000108 -0.000258 C3 0.03472 -0.001860 0.001552 -0.0461 0.000090 0.000215 C4 -1.03208 0.055305 -0.046132 111.4592 -0.878830 -0.236271 C5 0.00202 -0.000108 0.000090 -0.8788 0.008093 0.000708 C6 0.00481 -0.000258 0.000215 -0.2363 0.000708 0.001689 > print( round( vcov( fitw2sls3e$eq[[ 2 ]] ), digits = 6 ) ) (Intercept) price farmPrice trend (Intercept) 111.4592 -0.878830 -0.236271 -0.046132 price -0.8788 0.008093 0.000708 0.000090 farmPrice -0.2363 0.000708 0.001689 0.000215 trend -0.0461 0.000090 0.000215 0.001552 > > print( round( vcov( fitw2sls4 ), digits = 6 ) ) demand_(Intercept) demand_price demand_income demand_(Intercept) 39.7610 -0.358128 -0.03842 demand_price -0.3581 0.004681 -0.00113 demand_income -0.0384 -0.001129 0.00155 supply_(Intercept) 39.6949 -0.480685 0.08595 supply_price -0.3581 0.004681 -0.00113 supply_farmPrice -0.0359 0.000252 0.00011 supply_trend -0.0384 -0.001129 0.00155 supply_(Intercept) supply_price supply_farmPrice demand_(Intercept) 39.6949 -0.358128 -0.035932 demand_price -0.4807 0.004681 0.000252 demand_income 0.0859 -0.001129 0.000110 supply_(Intercept) 69.3817 -0.480685 -0.226588 supply_price -0.4807 0.004681 0.000252 supply_farmPrice -0.2266 0.000252 0.002072 supply_trend 0.0859 -0.001129 0.000110 supply_trend demand_(Intercept) -0.03842 demand_price -0.00113 demand_income 0.00155 supply_(Intercept) 0.08595 supply_price -0.00113 supply_farmPrice 0.00011 supply_trend 0.00155 > print( round( vcov( fitw2sls4$eq[[ 1 ]] ), digits = 6 ) ) (Intercept) price income (Intercept) 39.7610 -0.35813 -0.03842 price -0.3581 0.00468 -0.00113 income -0.0384 -0.00113 0.00155 > > print( round( vcov( fitw2sls5 ), digits = 6 ) ) demand_(Intercept) demand_price demand_income demand_(Intercept) 39.7610 -0.358128 -0.03842 demand_price -0.3581 0.004681 -0.00113 demand_income -0.0384 -0.001129 0.00155 supply_(Intercept) 39.6949 -0.480685 0.08595 supply_price -0.3581 0.004681 -0.00113 supply_farmPrice -0.0359 0.000252 0.00011 supply_trend -0.0384 -0.001129 0.00155 supply_(Intercept) supply_price supply_farmPrice demand_(Intercept) 39.6949 -0.358128 -0.035932 demand_price -0.4807 0.004681 0.000252 demand_income 0.0859 -0.001129 0.000110 supply_(Intercept) 69.3817 -0.480685 -0.226588 supply_price -0.4807 0.004681 0.000252 supply_farmPrice -0.2266 0.000252 0.002072 supply_trend 0.0859 -0.001129 0.000110 supply_trend demand_(Intercept) -0.03842 demand_price -0.00113 demand_income 0.00155 supply_(Intercept) 0.08595 supply_price -0.00113 supply_farmPrice 0.00011 supply_trend 0.00155 > print( round( vcov( fitw2sls5, modified.regMat = TRUE ), digits = 6 ) ) C1 C2 C3 C4 C5 C6 C1 39.7610 -0.358128 -0.03842 39.6949 -0.358128 -0.035932 C2 -0.3581 0.004681 -0.00113 -0.4807 0.004681 0.000252 C3 -0.0384 -0.001129 0.00155 0.0859 -0.001129 0.000110 C4 39.6949 -0.480685 0.08595 69.3817 -0.480685 -0.226588 C5 -0.3581 0.004681 -0.00113 -0.4807 0.004681 0.000252 C6 -0.0359 0.000252 0.00011 -0.2266 0.000252 0.002072 > print( round( vcov( fitw2sls5$eq[[ 2 ]] ), digits = 6 ) ) (Intercept) price farmPrice trend (Intercept) 69.3817 -0.480685 -0.226588 0.08595 price -0.4807 0.004681 0.000252 -0.00113 farmPrice -0.2266 0.000252 0.002072 0.00011 trend 0.0859 -0.001129 0.000110 0.00155 > > print( round( vcov( fitw2slsd1 ), digits = 6 ) ) demand_(Intercept) demand_price demand_income demand_(Intercept) 124.179 -1.51767 0.28519 demand_price -1.518 0.02098 -0.00595 demand_income 0.285 -0.00595 0.00318 supply_(Intercept) 0.000 0.00000 0.00000 supply_price 0.000 0.00000 0.00000 supply_farmPrice 0.000 0.00000 0.00000 supply_trend 0.000 0.00000 0.00000 supply_(Intercept) supply_price supply_farmPrice demand_(Intercept) 0.000 0.000000 0.000000 demand_price 0.000 0.000000 0.000000 demand_income 0.000 0.000000 0.000000 supply_(Intercept) 144.253 -1.095410 -0.323818 supply_price -1.095 0.009987 0.000936 supply_farmPrice -0.324 0.000936 0.002233 supply_trend -0.295 0.000579 0.001377 supply_trend demand_(Intercept) 0.000000 demand_price 0.000000 demand_income 0.000000 supply_(Intercept) -0.295229 supply_price 0.000579 supply_farmPrice 0.001377 supply_trend 0.009931 > print( round( vcov( fitw2slsd1$eq[[ 1 ]] ), digits = 6 ) ) (Intercept) price income (Intercept) 124.179 -1.51767 0.28519 price -1.518 0.02098 -0.00595 income 0.285 -0.00595 0.00318 > > print( round( vcov( fitw2slsd2e ), digits = 6 ) ) demand_(Intercept) demand_price demand_income demand_(Intercept) 95.9017 -1.129212 0.176368 demand_price -1.1292 0.014881 -0.003682 demand_income 0.1764 -0.003682 0.001968 supply_(Intercept) -5.2430 0.109460 -0.058492 supply_price 0.0103 -0.000215 0.000115 supply_farmPrice 0.0245 -0.000510 0.000273 supply_trend 0.1764 -0.003682 0.001968 supply_(Intercept) supply_price supply_farmPrice demand_(Intercept) -5.2430 0.010284 0.024451 demand_price 0.1095 -0.000215 -0.000510 demand_income -0.0585 0.000115 0.000273 supply_(Intercept) 114.2555 -0.898881 -0.243056 supply_price -0.8989 0.008273 0.000727 supply_farmPrice -0.2431 0.000727 0.001733 supply_trend -0.0585 0.000115 0.000273 supply_trend demand_(Intercept) 0.176368 demand_price -0.003682 demand_income 0.001968 supply_(Intercept) -0.058492 supply_price 0.000115 supply_farmPrice 0.000273 supply_trend 0.001968 > print( round( vcov( fitw2slsd2e$eq[[ 2 ]] ), digits = 6 ) ) (Intercept) price farmPrice trend (Intercept) 114.2555 -0.898881 -0.243056 -0.058492 price -0.8989 0.008273 0.000727 0.000115 farmPrice -0.2431 0.000727 0.001733 0.000273 trend -0.0585 0.000115 0.000273 0.001968 > > print( round( vcov( fitw2slsd3 ), digits = 6 ) ) demand_(Intercept) demand_price demand_income demand_(Intercept) 113.0903 -1.334011 0.210445 demand_price -1.3340 0.017622 -0.004394 demand_income 0.2104 -0.004394 0.002348 supply_(Intercept) -6.2560 0.130609 -0.069794 supply_price 0.0123 -0.000256 0.000137 supply_farmPrice 0.0292 -0.000609 0.000325 supply_trend 0.2104 -0.004394 0.002348 supply_(Intercept) supply_price supply_farmPrice demand_(Intercept) -6.2560 0.012271 0.029175 demand_price 0.1306 -0.000256 -0.000609 demand_income -0.0698 0.000137 0.000325 supply_(Intercept) 142.7207 -1.123408 -0.303360 supply_price -1.1234 0.010341 0.000908 supply_farmPrice -0.3034 0.000908 0.002165 supply_trend -0.0698 0.000137 0.000325 supply_trend demand_(Intercept) 0.210445 demand_price -0.004394 demand_income 0.002348 supply_(Intercept) -0.069794 supply_price 0.000137 supply_farmPrice 0.000325 supply_trend 0.002348 > print( round( vcov( fitw2slsd3, modified.regMat = TRUE ), digits = 6 ) ) C1 C2 C3 C4 C5 C6 C1 113.0903 -1.334011 0.210445 -6.2560 0.012271 0.029175 C2 -1.3340 0.017622 -0.004394 0.1306 -0.000256 -0.000609 C3 0.2104 -0.004394 0.002348 -0.0698 0.000137 0.000325 C4 -6.2560 0.130609 -0.069794 142.7207 -1.123408 -0.303360 C5 0.0123 -0.000256 0.000137 -1.1234 0.010341 0.000908 C6 0.0292 -0.000609 0.000325 -0.3034 0.000908 0.002165 > print( round( vcov( fitw2slsd3$eq[[ 1 ]] ), digits = 6 ) ) (Intercept) price income (Intercept) 113.09 -1.33401 0.21044 price -1.33 0.01762 -0.00439 income 0.21 -0.00439 0.00235 > > > ## *********** confidence intervals of coefficients ************* > print( confint( fitw2sls1e, useDfSys = TRUE ) ) 2.5 % 97.5 % demand_(Intercept) 79.776 109.491 demand_price -0.425 -0.063 demand_income 0.226 0.402 supply_(Intercept) 27.677 71.388 supply_price 0.058 0.422 supply_farmPrice 0.170 0.342 supply_trend 0.072 0.434 > print( confint( fitw2sls1e$eq[[ 1 ]], level = 0.9, useDfSys = TRUE ) ) 5 % 95 % (Intercept) 82.275 106.992 price -0.394 -0.093 income 0.241 0.387 > > print( confint( fitw2sls2, level = 0.9 ) ) 5 % 95 % demand_(Intercept) 78.107 110.660 demand_price -0.422 -0.038 demand_income 0.215 0.390 supply_(Intercept) 24.069 72.030 supply_price 0.039 0.447 supply_farmPrice 0.169 0.356 supply_trend 0.215 0.390 > print( confint( fitw2sls2$eq[[ 2 ]], level = 0.99 ) ) 0.5 % 99.5 % (Intercept) 15.854 80.245 price -0.031 0.517 farmPrice 0.137 0.388 trend 0.186 0.420 > > print( confint( fitw2sls3, level = 0.99 ) ) 0.5 % 99.5 % demand_(Intercept) 78.107 110.660 demand_price -0.422 -0.038 demand_income 0.215 0.390 supply_(Intercept) 24.069 72.030 supply_price 0.039 0.447 supply_farmPrice 0.169 0.356 supply_trend 0.215 0.390 > print( confint( fitw2sls3$eq[[ 1 ]], level = 0.5 ) ) 25 % 75 % (Intercept) 88.923 99.844 price -0.295 -0.166 income 0.274 0.332 > > print( confint( fitw2sls4e, level = 0.5, useDfSys = TRUE ) ) 25 % 75 % demand_(Intercept) 83.658 107.036 demand_price -0.369 -0.117 demand_income 0.233 0.379 supply_(Intercept) 31.138 61.736 supply_price 0.131 0.383 supply_farmPrice 0.181 0.347 supply_trend 0.233 0.379 > print( confint( fitw2sls4e$eq[[ 2 ]], level = 0.25, useDfSys = TRUE ) ) 37.5 % 62.5 % (Intercept) 44.016 48.857 price 0.237 0.277 farmPrice 0.251 0.277 trend 0.294 0.317 > > print( confint( fitw2sls5, level = 0.25 ) ) 37.5 % 62.5 % demand_(Intercept) 82.503 108.105 demand_price -0.382 -0.104 demand_income 0.226 0.386 supply_(Intercept) 29.513 63.333 supply_price 0.118 0.396 supply_farmPrice 0.172 0.357 supply_trend 0.226 0.386 > print( confint( fitw2sls5$eq[[ 1 ]], level = 0.975 ) ) 1.3 % 98.8 % (Intercept) 80.537 110.072 price -0.403 -0.083 income 0.214 0.399 > > print( confint( fitw2slsd1, level = 0.975 ) ) 1.3 % 98.8 % demand_(Intercept) 83.279 130.300 demand_price -0.717 -0.106 demand_income 0.243 0.481 supply_(Intercept) 24.071 74.994 supply_price 0.028 0.452 supply_farmPrice 0.155 0.356 supply_trend 0.042 0.464 > print( confint( fitw2slsd1$eq[[ 2 ]], level = 0.999 ) ) 0.1 % 100 % (Intercept) 1.310 97.755 price -0.161 0.641 farmPrice 0.066 0.445 trend -0.147 0.653 > > print( confint( fitw2slsd2e, level = 0.999, useDfSys = TRUE ) ) 0.1 % 100 % demand_(Intercept) 84.562 124.365 demand_price -0.611 -0.115 demand_income 0.246 0.426 supply_(Intercept) 25.348 68.793 supply_price 0.060 0.430 supply_farmPrice 0.182 0.352 supply_trend 0.246 0.426 > print( confint( fitw2slsd2e$eq[[ 1 ]], level = 0.01, useDfSys = TRUE ) ) 49.5 % 50.5 % (Intercept) 104.340 104.587 price -0.365 -0.362 income 0.335 0.336 > > print( confint( fitw2slsd3e, level = 0.01, useDfSys = TRUE ) ) 49.5 % 50.5 % demand_(Intercept) 84.562 124.365 demand_price -0.611 -0.115 demand_income 0.246 0.426 supply_(Intercept) 25.348 68.793 supply_price 0.060 0.430 supply_farmPrice 0.182 0.352 supply_trend 0.246 0.426 > print( confint( fitw2slsd3e$eq[[ 2 ]], useDfSys = TRUE ) ) 2.5 % 97.5 % (Intercept) 25.348 68.793 price 0.060 0.430 farmPrice 0.182 0.352 trend 0.246 0.426 > > > ## *********** fitted values ************* > print( fitted( fitw2sls1e ) ) demand supply 1 97.6 98.9 2 99.9 100.4 3 99.8 100.5 4 100.0 100.7 5 102.1 102.6 6 102.0 102.6 7 102.4 102.6 8 103.0 104.8 9 101.5 102.7 10 100.3 99.7 11 95.5 95.4 12 94.7 93.8 13 96.1 95.6 14 99.0 97.6 15 103.8 102.3 16 103.7 104.1 17 103.8 102.8 18 102.1 102.7 19 103.6 102.6 20 106.9 105.6 > print( fitted( fitw2sls1e$eq[[ 1 ]] ) ) 1 2 3 4 5 6 7 8 9 10 11 12 13 97.6 99.9 99.8 100.0 102.1 102.0 102.4 103.0 101.5 100.3 95.5 94.7 96.1 14 15 16 17 18 19 20 99.0 103.8 103.7 103.8 102.1 103.6 106.9 > > print( fitted( fitw2sls2 ) ) demand supply 1 97.8 98.5 2 99.9 100.0 3 99.9 100.1 4 100.1 100.4 5 102.0 102.5 6 101.9 102.4 7 102.4 102.4 8 102.9 104.8 9 101.4 102.7 10 100.3 99.7 11 95.7 95.3 12 94.9 93.7 13 96.3 95.6 14 99.1 97.7 15 103.7 102.6 16 103.5 104.4 17 103.7 103.2 18 102.1 103.1 19 103.6 102.9 20 106.8 106.1 > print( fitted( fitw2sls2$eq[[ 2 ]] ) ) 1 2 3 4 5 6 7 8 9 10 11 12 13 98.5 100.0 100.1 100.4 102.5 102.4 102.4 104.8 102.7 99.7 95.3 93.7 95.6 14 15 16 17 18 19 20 97.7 102.6 104.4 103.2 103.1 102.9 106.1 > > print( fitted( fitw2sls3 ) ) demand supply 1 97.8 98.5 2 99.9 100.0 3 99.9 100.1 4 100.1 100.4 5 102.0 102.5 6 101.9 102.4 7 102.4 102.4 8 102.9 104.8 9 101.4 102.7 10 100.3 99.7 11 95.7 95.3 12 94.9 93.7 13 96.3 95.6 14 99.1 97.7 15 103.7 102.6 16 103.5 104.4 17 103.7 103.2 18 102.1 103.1 19 103.6 102.9 20 106.8 106.1 > print( fitted( fitw2sls3$eq[[ 1 ]] ) ) 1 2 3 4 5 6 7 8 9 10 11 12 13 97.8 99.9 99.9 100.1 102.0 101.9 102.4 102.9 101.4 100.3 95.7 94.9 96.3 14 15 16 17 18 19 20 99.1 103.7 103.5 103.7 102.1 103.6 106.8 > > print( fitted( fitw2sls4e ) ) demand supply 1 97.7 98.4 2 99.9 100.0 3 99.8 100.1 4 100.0 100.5 5 102.1 102.4 6 101.9 102.4 7 102.4 102.5 8 102.9 104.8 9 101.5 102.7 10 100.4 99.5 11 95.7 95.1 12 94.9 93.6 13 96.2 95.6 14 99.1 97.6 15 103.8 102.5 16 103.6 104.4 17 103.8 103.1 18 102.0 103.1 19 103.5 103.0 20 106.7 106.3 > print( fitted( fitw2sls4e$eq[[ 2 ]] ) ) 1 2 3 4 5 6 7 8 9 10 11 12 13 98.4 100.0 100.1 100.5 102.4 102.4 102.5 104.8 102.7 99.5 95.1 93.6 95.6 14 15 16 17 18 19 20 97.6 102.5 104.4 103.1 103.1 103.0 106.3 > > print( fitted( fitw2sls5 ) ) demand supply 1 97.7 98.4 2 99.9 100.0 3 99.8 100.1 4 100.0 100.5 5 102.1 102.4 6 101.9 102.4 7 102.4 102.5 8 102.9 104.8 9 101.5 102.7 10 100.4 99.5 11 95.7 95.1 12 94.9 93.6 13 96.2 95.6 14 99.1 97.6 15 103.8 102.5 16 103.6 104.4 17 103.8 103.1 18 102.0 103.1 19 103.5 103.0 20 106.7 106.3 > print( fitted( fitw2sls5$eq[[ 1 ]] ) ) 1 2 3 4 5 6 7 8 9 10 11 12 13 97.7 99.9 99.8 100.0 102.1 101.9 102.4 102.9 101.5 100.4 95.7 94.9 96.2 14 15 16 17 18 19 20 99.1 103.8 103.6 103.8 102.0 103.5 106.7 > > print( fitted( fitw2slsd1 ) ) demand supply 1 97.1 98.9 2 99.2 100.4 3 99.2 100.5 4 99.3 100.7 5 102.5 102.6 6 102.2 102.6 7 102.5 102.6 8 102.7 104.8 9 102.0 102.7 10 101.4 99.7 11 95.6 95.4 12 93.9 93.8 13 95.0 95.6 14 98.9 97.6 15 104.9 102.3 16 104.3 104.1 17 106.1 102.8 18 101.7 102.7 19 103.3 102.6 20 106.0 105.6 > print( fitted( fitw2slsd1$eq[[ 2 ]] ) ) 1 2 3 4 5 6 7 8 9 10 11 12 13 98.9 100.4 100.5 100.7 102.6 102.6 102.6 104.8 102.7 99.7 95.4 93.8 95.6 14 15 16 17 18 19 20 97.6 102.3 104.1 102.8 102.7 102.6 105.6 > > print( fitted( fitw2slsd2e ) ) demand supply 1 97.4 98.2 2 99.4 99.7 3 99.4 99.9 4 99.5 100.2 5 102.4 102.3 6 102.1 102.3 7 102.4 102.4 8 102.6 104.7 9 101.9 102.7 10 101.2 99.6 11 95.9 95.2 12 94.4 93.6 13 95.5 95.6 14 99.0 97.7 15 104.5 102.7 16 104.0 104.6 17 105.4 103.5 18 101.8 103.3 19 103.2 103.2 20 105.9 106.4 > print( fitted( fitw2slsd2e$eq[[ 1 ]] ) ) 1 2 3 4 5 6 7 8 9 10 11 12 13 97.4 99.4 99.4 99.5 102.4 102.1 102.4 102.6 101.9 101.2 95.9 94.4 95.5 14 15 16 17 18 19 20 99.0 104.5 104.0 105.4 101.8 103.2 105.9 > > print( fitted( fitw2slsd3e ) ) demand supply 1 97.4 98.2 2 99.4 99.7 3 99.4 99.9 4 99.5 100.2 5 102.4 102.3 6 102.1 102.3 7 102.4 102.4 8 102.6 104.7 9 101.9 102.7 10 101.2 99.6 11 95.9 95.2 12 94.4 93.6 13 95.5 95.6 14 99.0 97.7 15 104.5 102.7 16 104.0 104.6 17 105.4 103.5 18 101.8 103.3 19 103.2 103.2 20 105.9 106.4 > print( fitted( fitw2slsd3e$eq[[ 2 ]] ) ) 1 2 3 4 5 6 7 8 9 10 11 12 13 98.2 99.7 99.9 100.2 102.3 102.3 102.4 104.7 102.7 99.6 95.2 93.6 95.6 14 15 16 17 18 19 20 97.7 102.7 104.6 103.5 103.3 103.2 106.4 > > > ## *********** predicted values ************* > predictData <- Kmenta > predictData$consump <- NULL > predictData$price <- Kmenta$price * 0.9 > predictData$income <- Kmenta$income * 1.1 > > print( predict( fitw2sls1e, se.fit = TRUE, interval = "prediction", + useDfSys = TRUE ) ) demand.pred demand.se.fit demand.lwr demand.upr supply.pred supply.se.fit 1 97.6 0.609 93.5 101.8 98.9 0.965 2 99.9 0.553 95.7 104.0 100.4 0.952 3 99.8 0.520 95.7 103.9 100.5 0.861 4 100.0 0.558 95.9 104.2 100.7 0.839 5 102.1 0.476 98.0 106.2 102.6 0.818 6 102.0 0.437 97.9 106.1 102.6 0.723 7 102.4 0.454 98.3 106.5 102.6 0.658 8 103.0 0.567 98.8 107.1 104.8 0.889 9 101.5 0.502 97.3 105.6 102.7 0.723 10 100.3 0.758 96.0 104.6 99.7 0.915 11 95.5 0.888 91.2 99.9 95.4 1.098 12 94.7 0.928 90.3 99.1 93.8 1.277 13 96.1 0.844 91.8 100.5 95.6 1.137 14 99.0 0.477 94.9 103.1 97.6 0.820 15 103.8 0.731 99.6 108.1 102.3 0.804 16 103.7 0.587 99.5 107.8 104.1 0.837 17 103.8 1.243 99.1 108.6 102.8 1.489 18 102.1 0.506 97.9 106.2 102.7 0.884 19 103.6 0.641 99.4 107.8 102.6 1.010 20 106.9 1.204 102.2 111.6 105.6 1.550 supply.lwr supply.upr 1 93.5 104.3 2 95.0 105.8 3 95.2 105.8 4 95.4 106.0 5 97.4 107.9 6 97.4 107.8 7 97.4 107.7 8 99.5 110.1 9 97.5 108.0 10 94.3 105.0 11 89.9 100.8 12 88.2 99.5 13 90.1 101.2 14 92.3 102.9 15 97.1 107.6 16 98.8 109.3 17 97.0 108.7 18 97.4 108.0 19 97.2 108.0 20 99.7 111.5 > print( predict( fitw2sls1e$eq[[ 1 ]], se.fit = TRUE, interval = "prediction", + useDfSys = TRUE ) ) fit se.fit lwr upr 1 97.6 0.609 93.5 101.8 2 99.9 0.553 95.7 104.0 3 99.8 0.520 95.7 103.9 4 100.0 0.558 95.9 104.2 5 102.1 0.476 98.0 106.2 6 102.0 0.437 97.9 106.1 7 102.4 0.454 98.3 106.5 8 103.0 0.567 98.8 107.1 9 101.5 0.502 97.3 105.6 10 100.3 0.758 96.0 104.6 11 95.5 0.888 91.2 99.9 12 94.7 0.928 90.3 99.1 13 96.1 0.844 91.8 100.5 14 99.0 0.477 94.9 103.1 15 103.8 0.731 99.6 108.1 16 103.7 0.587 99.5 107.8 17 103.8 1.243 99.1 108.6 18 102.1 0.506 97.9 106.2 19 103.6 0.641 99.4 107.8 20 106.9 1.204 102.2 111.6 > > print( predict( fitw2sls2, se.pred = TRUE, interval = "confidence", + level = 0.999, newdata = predictData ) ) demand.pred demand.se.pred demand.lwr demand.upr supply.pred supply.se.pred 1 102.7 2.22 99.1 106 96.0 2.75 2 105.3 2.22 101.7 109 97.5 2.64 3 105.2 2.23 101.5 109 97.6 2.65 4 105.4 2.22 101.9 109 97.9 2.62 5 107.3 2.51 101.8 113 100.1 2.83 6 107.3 2.46 102.0 112 100.0 2.77 7 107.8 2.44 102.7 113 100.0 2.71 8 108.6 2.40 103.7 113 102.2 2.65 9 106.6 2.52 101.0 112 100.4 2.87 10 105.1 2.65 98.8 111 97.4 3.10 11 100.1 2.41 95.2 105 93.0 3.18 12 99.5 2.21 96.0 103 91.3 3.15 13 101.2 2.12 98.5 104 93.1 2.95 14 104.1 2.31 99.8 108 95.3 2.91 15 109.0 2.73 102.3 116 100.2 2.92 16 109.0 2.61 102.9 115 102.0 2.80 17 108.6 3.08 100.1 117 101.1 3.37 18 107.6 2.35 103.0 112 100.5 2.65 19 109.3 2.44 104.2 114 100.4 2.64 20 113.2 2.66 106.8 120 103.3 2.58 supply.lwr supply.upr 1 91.7 100.3 2 94.2 100.7 3 94.2 101.0 4 94.8 101.0 5 95.1 105.0 6 95.6 104.4 7 96.1 103.9 8 98.8 105.6 9 95.2 105.6 10 90.7 104.1 11 85.9 100.1 12 84.3 98.3 13 87.3 98.9 14 89.7 100.8 15 94.7 105.8 16 97.3 106.6 17 92.9 109.4 18 97.1 103.9 19 97.1 103.6 20 100.7 105.9 > print( predict( fitw2sls2$eq[[ 2 ]], se.pred = TRUE, interval = "confidence", + level = 0.999, newdata = predictData ) ) fit se.pred lwr upr 1 96.0 2.75 91.7 100.3 2 97.5 2.64 94.2 100.7 3 97.6 2.65 94.2 101.0 4 97.9 2.62 94.8 101.0 5 100.1 2.83 95.1 105.0 6 100.0 2.77 95.6 104.4 7 100.0 2.71 96.1 103.9 8 102.2 2.65 98.8 105.6 9 100.4 2.87 95.2 105.6 10 97.4 3.10 90.7 104.1 11 93.0 3.18 85.9 100.1 12 91.3 3.15 84.3 98.3 13 93.1 2.95 87.3 98.9 14 95.3 2.91 89.7 100.8 15 100.2 2.92 94.7 105.8 16 102.0 2.80 97.3 106.6 17 101.1 3.37 92.9 109.4 18 100.5 2.65 97.1 103.9 19 100.4 2.64 97.1 103.6 20 103.3 2.58 100.7 105.9 > > print( predict( fitw2sls3, se.pred = TRUE, interval = "prediction", + level = 0.975 ) ) demand.pred demand.se.pred demand.lwr demand.upr supply.pred supply.se.pred 1 97.8 2.08 92.9 103 98.5 2.57 2 99.9 2.07 95.1 105 100.0 2.61 3 99.9 2.06 95.0 105 100.1 2.59 4 100.1 2.07 95.2 105 100.4 2.60 5 102.0 2.05 97.2 107 102.5 2.63 6 101.9 2.04 97.1 107 102.4 2.60 7 102.4 2.04 97.6 107 102.4 2.58 8 102.9 2.08 98.0 108 104.8 2.68 9 101.4 2.06 96.6 106 102.7 2.61 10 100.3 2.15 95.3 105 99.7 2.69 11 95.7 2.19 90.6 101 95.3 2.77 12 94.9 2.20 89.8 100 93.7 2.86 13 96.3 2.16 91.2 101 95.6 2.79 14 99.1 2.05 94.3 104 97.7 2.64 15 103.7 2.13 98.7 109 102.6 2.60 16 103.5 2.08 98.7 108 104.4 2.59 17 103.7 2.39 98.1 109 103.2 2.91 18 102.1 2.06 97.2 107 103.1 2.59 19 103.6 2.10 98.6 108 102.9 2.64 20 106.8 2.37 101.2 112 106.1 2.90 supply.lwr supply.upr 1 92.4 104 2 93.9 106 3 94.0 106 4 94.3 106 5 96.3 109 6 96.3 109 7 96.4 109 8 98.5 111 9 96.6 109 10 93.4 106 11 88.8 102 12 87.0 100 13 89.1 102 14 91.5 104 15 96.5 109 16 98.3 110 17 96.4 110 18 97.0 109 19 96.8 109 20 99.3 113 > print( predict( fitw2sls3$eq[[ 1 ]], se.pred = TRUE, interval = "prediction", + level = 0.975 ) ) fit se.pred lwr upr 1 97.8 2.08 92.9 103 2 99.9 2.07 95.1 105 3 99.9 2.06 95.0 105 4 100.1 2.07 95.2 105 5 102.0 2.05 97.2 107 6 101.9 2.04 97.1 107 7 102.4 2.04 97.6 107 8 102.9 2.08 98.0 108 9 101.4 2.06 96.6 106 10 100.3 2.15 95.3 105 11 95.7 2.19 90.6 101 12 94.9 2.20 89.8 100 13 96.3 2.16 91.2 101 14 99.1 2.05 94.3 104 15 103.7 2.13 98.7 109 16 103.5 2.08 98.7 108 17 103.7 2.39 98.1 109 18 102.1 2.06 97.2 107 19 103.6 2.10 98.6 108 20 106.8 2.37 101.2 112 > > print( predict( fitw2sls4e, se.fit = TRUE, interval = "confidence", + level = 0.25, useDfSys = TRUE ) ) demand.pred demand.se.fit demand.lwr demand.upr supply.pred supply.se.fit 1 97.7 0.552 97.5 97.9 98.4 0.611 2 99.9 0.484 99.7 100.0 100.0 0.700 3 99.8 0.465 99.7 100.0 100.1 0.652 4 100.0 0.488 99.9 100.2 100.5 0.664 5 102.1 0.443 101.9 102.2 102.4 0.769 6 101.9 0.425 101.8 102.1 102.4 0.695 7 102.4 0.447 102.2 102.5 102.5 0.639 8 102.9 0.547 102.7 103.1 104.8 0.821 9 101.5 0.458 101.3 101.6 102.7 0.716 10 100.4 0.648 100.2 100.6 99.5 0.743 11 95.7 0.847 95.4 96.0 95.1 0.944 12 94.9 0.823 94.6 95.1 93.6 1.254 13 96.2 0.695 96.0 96.5 95.6 1.154 14 99.1 0.467 98.9 99.2 97.6 0.814 15 103.8 0.590 103.6 104.0 102.5 0.675 16 103.6 0.520 103.4 103.8 104.4 0.659 17 103.8 0.919 103.5 104.1 103.1 1.196 18 102.0 0.487 101.9 102.2 103.1 0.587 19 103.5 0.615 103.3 103.7 103.0 0.664 20 106.7 1.126 106.3 107.0 106.3 0.909 supply.lwr supply.upr 1 98.2 98.6 2 99.8 100.3 3 99.9 100.3 4 100.2 100.7 5 102.2 102.7 6 102.2 102.7 7 102.3 102.7 8 104.6 105.1 9 102.5 102.9 10 99.3 99.8 11 94.8 95.4 12 93.2 94.0 13 95.2 96.0 14 97.4 97.9 15 102.3 102.7 16 104.2 104.6 17 102.7 103.5 18 102.9 103.3 19 102.8 103.3 20 106.0 106.6 > print( predict( fitw2sls4e$eq[[ 2 ]], se.fit = TRUE, interval = "confidence", + level = 0.25, useDfSys = TRUE ) ) fit se.fit lwr upr 1 98.4 0.611 98.2 98.6 2 100.0 0.700 99.8 100.3 3 100.1 0.652 99.9 100.3 4 100.5 0.664 100.2 100.7 5 102.4 0.769 102.2 102.7 6 102.4 0.695 102.2 102.7 7 102.5 0.639 102.3 102.7 8 104.8 0.821 104.6 105.1 9 102.7 0.716 102.5 102.9 10 99.5 0.743 99.3 99.8 11 95.1 0.944 94.8 95.4 12 93.6 1.254 93.2 94.0 13 95.6 1.154 95.2 96.0 14 97.6 0.814 97.4 97.9 15 102.5 0.675 102.3 102.7 16 104.4 0.659 104.2 104.6 17 103.1 1.196 102.7 103.5 18 103.1 0.587 102.9 103.3 19 103.0 0.664 102.8 103.3 20 106.3 0.909 106.0 106.6 > > print( predict( fitw2sls5, se.fit = TRUE, se.pred = TRUE, + interval = "prediction", level = 0.5, newdata = predictData ) ) demand.pred demand.se.fit demand.se.pred demand.lwr demand.upr supply.pred 1 102.8 0.781 2.12 101.4 104 95.8 2 105.4 0.812 2.13 104.0 107 97.4 3 105.3 0.824 2.13 103.8 107 97.5 4 105.6 0.820 2.13 104.1 107 97.8 5 107.5 1.186 2.30 106.0 109 99.9 6 107.4 1.133 2.27 105.9 109 99.9 7 108.0 1.141 2.28 106.4 110 99.9 8 108.7 1.143 2.28 107.2 110 102.1 9 106.8 1.179 2.30 105.2 108 100.2 10 105.3 1.307 2.36 103.7 107 97.2 11 100.3 1.108 2.26 98.7 102 92.7 12 99.6 0.841 2.14 98.2 101 91.1 13 101.3 0.638 2.07 99.9 103 93.0 14 104.3 0.914 2.17 102.8 106 95.1 15 109.3 1.440 2.44 107.6 111 100.1 16 109.2 1.333 2.38 107.6 111 101.9 17 108.9 1.742 2.63 107.1 111 100.9 18 107.8 1.049 2.23 106.2 109 100.5 19 109.5 1.216 2.31 107.9 111 100.3 20 113.3 1.669 2.58 111.6 115 103.4 supply.se.fit supply.se.pred supply.lwr supply.upr 1 0.825 2.64 94.1 97.6 2 0.696 2.60 95.6 99.1 3 0.712 2.60 95.7 99.2 4 0.674 2.59 96.0 99.5 5 1.087 2.73 98.1 101.8 6 0.979 2.69 98.0 101.7 7 0.874 2.65 98.1 101.7 8 0.871 2.65 100.3 103.9 9 1.143 2.75 98.4 102.1 10 1.338 2.84 95.3 99.1 11 1.483 2.91 90.8 94.7 12 1.645 3.00 89.1 93.1 13 1.440 2.89 91.0 94.9 14 1.247 2.80 93.2 97.0 15 1.222 2.79 98.2 102.0 16 1.104 2.74 100.0 103.7 17 1.808 3.09 98.7 103.0 18 0.861 2.65 98.7 102.3 19 0.861 2.65 98.5 102.1 20 0.666 2.59 101.6 105.2 > print( predict( fitw2sls5$eq[[ 1 ]], se.fit = TRUE, se.pred = TRUE, + interval = "prediction", level = 0.5, newdata = predictData ) ) fit se.fit se.pred lwr upr 1 102.8 0.781 2.12 101.4 104 2 105.4 0.812 2.13 104.0 107 3 105.3 0.824 2.13 103.8 107 4 105.6 0.820 2.13 104.1 107 5 107.5 1.186 2.30 106.0 109 6 107.4 1.133 2.27 105.9 109 7 108.0 1.141 2.28 106.4 110 8 108.7 1.143 2.28 107.2 110 9 106.8 1.179 2.30 105.2 108 10 105.3 1.307 2.36 103.7 107 11 100.3 1.108 2.26 98.7 102 12 99.6 0.841 2.14 98.2 101 13 101.3 0.638 2.07 99.9 103 14 104.3 0.914 2.17 102.8 106 15 109.3 1.440 2.44 107.6 111 16 109.2 1.333 2.38 107.6 111 17 108.9 1.742 2.63 107.1 111 18 107.8 1.049 2.23 106.2 109 19 109.5 1.216 2.31 107.9 111 20 113.3 1.669 2.58 111.6 115 > > print( predict( fitw2slsd1, se.fit = TRUE, se.pred = TRUE, + interval = "confidence", level = 0.99 ) ) demand.pred demand.se.fit demand.se.pred demand.lwr demand.upr supply.pred 1 97.1 0.751 2.13 94.9 99.3 98.9 2 99.2 0.757 2.13 97.0 101.4 100.4 3 99.2 0.692 2.11 97.2 101.2 100.5 4 99.3 0.766 2.13 97.1 101.5 100.7 5 102.5 0.595 2.08 100.8 104.3 102.6 6 102.2 0.503 2.05 100.7 103.7 102.6 7 102.5 0.503 2.05 101.1 104.0 102.6 8 102.7 0.653 2.10 100.8 104.5 104.8 9 102.0 0.655 2.10 100.1 103.9 102.7 10 101.4 1.074 2.26 98.3 104.5 99.7 11 95.6 0.978 2.22 92.8 98.5 95.4 12 93.9 1.134 2.29 90.7 97.2 93.8 13 95.0 1.162 2.31 91.7 98.4 95.6 14 98.9 0.530 2.06 97.4 100.4 97.6 15 104.9 1.061 2.26 101.9 108.0 102.3 16 104.3 0.757 2.13 102.1 106.5 104.1 17 106.1 1.963 2.80 100.4 111.7 102.8 18 101.7 0.597 2.08 100.0 103.5 102.7 19 103.3 0.736 2.12 101.2 105.4 102.6 20 106.0 1.430 2.45 101.9 110.2 105.6 supply.se.fit supply.se.pred supply.lwr supply.upr 1 1.079 2.68 95.8 102.1 2 1.064 2.68 97.3 103.5 3 0.962 2.64 97.6 103.3 4 0.938 2.63 98.0 103.4 5 0.914 2.62 100.0 105.3 6 0.808 2.59 100.2 104.9 7 0.736 2.57 100.4 104.7 8 0.994 2.65 101.9 107.7 9 0.808 2.59 100.4 105.1 10 1.023 2.66 96.7 102.7 11 1.228 2.75 91.8 99.0 12 1.428 2.84 89.7 98.0 13 1.272 2.77 91.9 99.4 14 0.917 2.62 94.9 100.3 15 0.899 2.62 99.7 104.9 16 0.936 2.63 101.3 106.8 17 1.665 2.97 98.0 107.7 18 0.988 2.65 99.8 105.6 19 1.129 2.70 99.3 105.9 20 1.733 3.01 100.5 110.7 > print( predict( fitw2slsd1$eq[[ 2 ]], se.fit = TRUE, se.pred = TRUE, + interval = "confidence", level = 0.99 ) ) fit se.fit se.pred lwr upr 1 98.9 1.079 2.68 95.8 102.1 2 100.4 1.064 2.68 97.3 103.5 3 100.5 0.962 2.64 97.6 103.3 4 100.7 0.938 2.63 98.0 103.4 5 102.6 0.914 2.62 100.0 105.3 6 102.6 0.808 2.59 100.2 104.9 7 102.6 0.736 2.57 100.4 104.7 8 104.8 0.994 2.65 101.9 107.7 9 102.7 0.808 2.59 100.4 105.1 10 99.7 1.023 2.66 96.7 102.7 11 95.4 1.228 2.75 91.8 99.0 12 93.8 1.428 2.84 89.7 98.0 13 95.6 1.272 2.77 91.9 99.4 14 97.6 0.917 2.62 94.9 100.3 15 102.3 0.899 2.62 99.7 104.9 16 104.1 0.936 2.63 101.3 106.8 17 102.8 1.665 2.97 98.0 107.7 18 102.7 0.988 2.65 99.8 105.6 19 102.6 1.129 2.70 99.3 105.9 20 105.6 1.733 3.01 100.5 110.7 > > print( predict( fitw2slsd2e, se.fit = TRUE, interval = "prediction", + level = 0.9, newdata = predictData, useDfSys = TRUE ) ) demand.pred demand.se.fit demand.lwr demand.upr supply.pred supply.se.fit 1 104 1.214 100.1 108 95.7 1.100 2 106 1.169 102.6 110 97.2 0.835 3 106 1.216 102.5 110 97.3 0.864 4 107 1.169 102.7 110 97.6 0.789 5 109 1.897 104.7 114 99.9 1.242 6 109 1.773 104.6 114 99.9 1.115 7 110 1.718 105.2 114 99.9 0.983 8 110 1.552 105.8 114 102.2 0.843 9 109 1.939 104.0 113 100.4 1.310 10 107 2.229 102.5 112 97.4 1.683 11 102 1.655 97.5 106 92.9 1.794 12 101 1.125 96.8 104 91.2 1.750 13 102 0.879 98.5 106 93.1 1.449 14 106 1.480 101.5 110 95.3 1.383 15 111 2.331 106.3 117 100.4 1.395 16 111 2.064 106.3 116 102.2 1.175 17 112 3.001 105.7 118 101.4 2.074 18 109 1.475 104.9 113 100.7 0.861 19 111 1.589 106.5 115 100.6 0.829 20 114 1.756 109.9 119 103.6 0.680 supply.lwr supply.upr 1 91.1 100.3 2 92.7 101.7 3 92.8 101.8 4 93.2 102.1 5 95.2 104.7 6 95.3 104.6 7 95.3 104.5 8 97.7 106.7 9 95.6 105.2 10 92.3 102.5 11 87.7 98.1 12 86.0 96.4 13 88.1 98.0 14 90.4 100.1 15 95.5 105.3 16 97.5 106.9 17 95.8 106.9 18 96.2 105.2 19 96.1 105.1 20 99.2 108.0 > print( predict( fitw2slsd2e$eq[[ 1 ]], se.fit = TRUE, interval = "prediction", + level = 0.9, newdata = predictData, useDfSys = TRUE ) ) fit se.fit lwr upr 1 104 1.214 100.1 108 2 106 1.169 102.6 110 3 106 1.216 102.5 110 4 107 1.169 102.7 110 5 109 1.897 104.7 114 6 109 1.773 104.6 114 7 110 1.718 105.2 114 8 110 1.552 105.8 114 9 109 1.939 104.0 113 10 107 2.229 102.5 112 11 102 1.655 97.5 106 12 101 1.125 96.8 104 13 102 0.879 98.5 106 14 106 1.480 101.5 110 15 111 2.331 106.3 117 16 111 2.064 106.3 116 17 112 3.001 105.7 118 18 109 1.475 104.9 113 19 111 1.589 106.5 115 20 114 1.756 109.9 119 > > print( predict( fitw2slsd3e, se.fit = TRUE, se.pred = TRUE, + interval = "prediction", level = 0.01, useDfSys = TRUE ) ) demand.pred demand.se.fit demand.se.pred demand.lwr demand.upr supply.pred 1 97.4 0.622 2.05 97.4 97.4 98.2 2 99.4 0.654 2.06 99.4 99.4 99.7 3 99.4 0.598 2.04 99.4 99.4 99.9 4 99.5 0.663 2.06 99.5 99.5 100.2 5 102.4 0.515 2.02 102.4 102.4 102.3 6 102.1 0.442 2.00 102.1 102.1 102.3 7 102.4 0.444 2.00 102.4 102.4 102.4 8 102.6 0.587 2.04 102.6 102.6 104.7 9 101.9 0.573 2.03 101.9 101.9 102.7 10 101.2 0.948 2.17 101.2 101.2 99.6 11 95.9 0.849 2.13 95.9 95.9 95.2 12 94.4 0.914 2.15 94.4 94.4 93.6 13 95.5 0.943 2.17 95.5 95.5 95.6 14 99.0 0.464 2.01 99.0 99.1 97.7 15 104.5 0.883 2.14 104.5 104.6 102.7 16 104.0 0.631 2.05 104.0 104.0 104.6 17 105.4 1.665 2.56 105.4 105.5 103.5 18 101.8 0.538 2.02 101.7 101.8 103.3 19 103.2 0.661 2.06 103.2 103.3 103.2 20 105.9 1.284 2.34 105.9 106.0 106.4 supply.se.fit supply.se.pred supply.lwr supply.upr 1 0.652 2.60 98.1 98.2 2 0.740 2.62 99.7 99.8 3 0.682 2.61 99.8 99.9 4 0.708 2.61 100.2 100.2 5 0.782 2.63 102.3 102.4 6 0.699 2.61 102.3 102.4 7 0.648 2.60 102.3 102.4 8 0.906 2.67 104.7 104.8 9 0.736 2.62 102.7 102.8 10 0.931 2.68 99.6 99.7 11 1.107 2.75 95.2 95.2 12 1.287 2.83 93.6 93.7 13 1.157 2.77 95.5 95.6 14 0.829 2.65 97.7 97.7 15 0.717 2.62 102.7 102.8 16 0.676 2.61 104.6 104.6 17 1.392 2.88 103.4 103.5 18 0.699 2.61 103.3 103.3 19 0.822 2.65 103.2 103.2 20 1.376 2.87 106.4 106.5 > print( predict( fitw2slsd3e$eq[[ 2 ]], se.fit = TRUE, se.pred = TRUE, + interval = "prediction", level = 0.01, useDfSys = TRUE ) ) fit se.fit se.pred lwr upr 1 98.2 0.652 2.60 98.1 98.2 2 99.7 0.740 2.62 99.7 99.8 3 99.9 0.682 2.61 99.8 99.9 4 100.2 0.708 2.61 100.2 100.2 5 102.3 0.782 2.63 102.3 102.4 6 102.3 0.699 2.61 102.3 102.4 7 102.4 0.648 2.60 102.3 102.4 8 104.7 0.906 2.67 104.7 104.8 9 102.7 0.736 2.62 102.7 102.8 10 99.6 0.931 2.68 99.6 99.7 11 95.2 1.107 2.75 95.2 95.2 12 93.6 1.287 2.83 93.6 93.7 13 95.6 1.157 2.77 95.5 95.6 14 97.7 0.829 2.65 97.7 97.7 15 102.7 0.717 2.62 102.7 102.8 16 104.6 0.676 2.61 104.6 104.6 17 103.5 1.392 2.88 103.4 103.5 18 103.3 0.699 2.61 103.3 103.3 19 103.2 0.822 2.65 103.2 103.2 20 106.4 1.376 2.87 106.4 106.5 > > # predict just one observation > smallData <- data.frame( price = 130, income = 150, farmPrice = 120, + trend = 25 ) > > print( predict( fitw2sls1e, newdata = smallData ) ) demand.pred supply.pred 1 110 118 > print( predict( fitw2sls1e$eq[[ 1 ]], newdata = smallData ) ) fit 1 110 > > print( predict( fitw2sls2, se.fit = TRUE, level = 0.9, + newdata = smallData ) ) demand.pred demand.se.fit supply.pred supply.se.fit 1 110 2.52 119 3.53 > print( predict( fitw2sls2$eq[[ 1 ]], se.pred = TRUE, level = 0.99, + newdata = smallData ) ) fit se.pred 1 110 3.21 > > print( predict( fitw2sls3, interval = "prediction", level = 0.975, + newdata = smallData ) ) demand.pred demand.lwr demand.upr supply.pred supply.lwr supply.upr 1 110 102 117 119 109 129 > print( predict( fitw2sls3$eq[[ 1 ]], interval = "confidence", level = 0.8, + newdata = smallData ) ) fit lwr upr 1 110 107 113 > > print( predict( fitw2sls4e, se.fit = TRUE, interval = "confidence", + level = 0.999, newdata = smallData ) ) demand.pred demand.se.fit demand.lwr demand.upr supply.pred supply.se.fit 1 110 2.08 102 117 119 2.11 supply.lwr supply.upr 1 112 127 > print( predict( fitw2sls4e$eq[[ 2 ]], se.pred = TRUE, interval = "prediction", + level = 0.75, newdata = smallData ) ) fit se.pred lwr upr 1 119 3.27 115 123 > > print( predict( fitw2sls5, se.fit = TRUE, interval = "prediction", + newdata = smallData ) ) demand.pred demand.se.fit demand.lwr demand.upr supply.pred supply.se.fit 1 110 2.26 104 116 119 2.33 supply.lwr supply.upr 1 112 126 > print( predict( fitw2sls5$eq[[ 1 ]], se.pred = TRUE, interval = "confidence", + newdata = smallData ) ) fit se.pred lwr upr 1 110 3 105 114 > > print( predict( fitw2slsd2e, se.fit = TRUE, se.pred = TRUE, + interval = "prediction", level = 0.5, newdata = smallData ) ) demand.pred demand.se.fit demand.se.pred demand.lwr demand.upr supply.pred 1 108 2.71 3.34 105 110 119 supply.se.fit supply.se.pred supply.lwr supply.upr 1 3.22 4.08 117 122 > print( predict( fitw2slsd2e$eq[[ 1 ]], se.fit = TRUE, se.pred = TRUE, + interval = "confidence", level = 0.25, newdata = smallData ) ) fit se.fit se.pred lwr upr 1 108 2.71 3.34 107 109 > > > ## ************ correlation of predicted values *************** > print( correlation.systemfit( fitw2sls1e, 1, 2 ) ) [,1] [1,] 0 [2,] 0 [3,] 0 [4,] 0 [5,] 0 [6,] 0 [7,] 0 [8,] 0 [9,] 0 [10,] 0 [11,] 0 [12,] 0 [13,] 0 [14,] 0 [15,] 0 [16,] 0 [17,] 0 [18,] 0 [19,] 0 [20,] 0 > > print( correlation.systemfit( fitw2sls2, 2, 1 ) ) [,1] [1,] 0.413453 [2,] 0.153759 [3,] 0.152962 [4,] 0.112671 [5,] -0.071442 [6,] -0.053943 [7,] -0.050961 [8,] -0.005442 [9,] -0.000476 [10,] -0.001894 [11,] 0.047351 [12,] 0.064973 [13,] 0.024591 [14,] -0.028036 [15,] 0.175326 [16,] 0.254878 [17,] 0.104540 [18,] 0.065579 [19,] 0.147008 [20,] 0.124593 > > print( correlation.systemfit( fitw2sls3, 1, 2 ) ) [,1] [1,] 0.413453 [2,] 0.153759 [3,] 0.152962 [4,] 0.112671 [5,] -0.071442 [6,] -0.053943 [7,] -0.050961 [8,] -0.005442 [9,] -0.000476 [10,] -0.001894 [11,] 0.047351 [12,] 0.064973 [13,] 0.024591 [14,] -0.028036 [15,] 0.175326 [16,] 0.254878 [17,] 0.104540 [18,] 0.065579 [19,] 0.147008 [20,] 0.124593 > > print( correlation.systemfit( fitw2sls4e, 2, 1 ) ) [,1] [1,] 0.38438 [2,] 0.30697 [3,] 0.26690 [4,] 0.30163 [5,] -0.02768 [6,] -0.05086 [7,] -0.05895 [8,] 0.10102 [9,] 0.10072 [10,] 0.45547 [11,] 0.10817 [12,] 0.00552 [13,] 0.04219 [14,] -0.04054 [15,] 0.42100 [16,] 0.24974 [17,] 0.65722 [18,] 0.24286 [19,] 0.34336 [20,] 0.54717 > > print( correlation.systemfit( fitw2sls5, 1, 2 ) ) [,1] [1,] 0.38030 [2,] 0.30892 [3,] 0.26808 [4,] 0.30325 [5,] -0.02730 [6,] -0.05035 [7,] -0.05831 [8,] 0.10036 [9,] 0.10045 [10,] 0.45492 [11,] 0.10525 [12,] 0.00394 [13,] 0.04171 [14,] -0.04037 [15,] 0.41958 [16,] 0.24706 [17,] 0.65619 [18,] 0.23872 [19,] 0.33729 [20,] 0.54239 > > print( correlation.systemfit( fitw2slsd1, 2, 1 ) ) [,1] [1,] 0 [2,] 0 [3,] 0 [4,] 0 [5,] 0 [6,] 0 [7,] 0 [8,] 0 [9,] 0 [10,] 0 [11,] 0 [12,] 0 [13,] 0 [14,] 0 [15,] 0 [16,] 0 [17,] 0 [18,] 0 [19,] 0 [20,] 0 > > print( correlation.systemfit( fitw2slsd2e, 1, 2 ) ) [,1] [1,] 0.482214 [2,] 0.253368 [3,] 0.242824 [4,] 0.195411 [5,] -0.107828 [6,] -0.074958 [7,] -0.055696 [8,] -0.002037 [9,] -0.000921 [10,] -0.008040 [11,] 0.040999 [12,] 0.075418 [13,] 0.029702 [14,] -0.030775 [15,] 0.229063 [16,] 0.318607 [17,] 0.156734 [18,] -0.023016 [19,] 0.068128 [20,] 0.047481 > > print( correlation.systemfit( fitw2slsd3e, 2, 1 ) ) [,1] [1,] 0.482214 [2,] 0.253368 [3,] 0.242824 [4,] 0.195411 [5,] -0.107828 [6,] -0.074958 [7,] -0.055696 [8,] -0.002037 [9,] -0.000921 [10,] -0.008040 [11,] 0.040999 [12,] 0.075418 [13,] 0.029702 [14,] -0.030775 [15,] 0.229063 [16,] 0.318607 [17,] 0.156734 [18,] -0.023016 [19,] 0.068128 [20,] 0.047481 > > > ## ************ LOG-Likelihood values *************** > print( logLik( fitw2sls1e ) ) 'log Lik.' -67.6 (df=9) > print( logLik( fitw2sls1e, residCovDiag = TRUE ) ) 'log Lik.' -84.4 (df=9) > > print( logLik( fitw2sls2 ) ) 'log Lik.' -65.2 (df=8) > print( logLik( fitw2sls2, residCovDiag = TRUE ) ) 'log Lik.' -84.8 (df=8) > > print( logLik( fitw2sls3 ) ) 'log Lik.' -65.2 (df=8) > print( logLik( fitw2sls3, residCovDiag = TRUE ) ) 'log Lik.' -84.8 (df=8) > > print( logLik( fitw2sls4e ) ) 'log Lik.' -65.7 (df=7) > print( logLik( fitw2sls4e, residCovDiag = TRUE ) ) 'log Lik.' -84.8 (df=7) > > print( logLik( fitw2sls5 ) ) 'log Lik.' -65.6 (df=7) > print( logLik( fitw2sls5, residCovDiag = TRUE ) ) 'log Lik.' -84.8 (df=7) > > print( logLik( fitw2slsd1 ) ) 'log Lik.' -75.1 (df=9) > print( logLik( fitw2slsd1, residCovDiag = TRUE ) ) 'log Lik.' -84.7 (df=9) > > print( logLik( fitw2slsd2e ) ) 'log Lik.' -69.1 (df=8) > print( logLik( fitw2slsd2e, residCovDiag = TRUE ) ) 'log Lik.' -84.7 (df=8) > > print( logLik( fitw2slsd3e ) ) 'log Lik.' -69.1 (df=8) > print( logLik( fitw2slsd3e, residCovDiag = TRUE ) ) 'log Lik.' -84.7 (df=8) > > > ## ************** F tests **************** > # testing first restriction > print( linearHypothesis( fitw2sls1, restrm ) ) Linear hypothesis test (Theil's F test) Hypothesis: demand_income - supply_trend = 0 Model 1: restricted model Model 2: fitw2sls1 Res.Df Df F Pr(>F) 1 34 2 33 1 0.31 0.58 > linearHypothesis( fitw2sls1, restrict ) Linear hypothesis test (Theil's F test) Hypothesis: demand_income - supply_trend = 0 Model 1: restricted model Model 2: fitw2sls1 Res.Df Df F Pr(>F) 1 34 2 33 1 0.31 0.58 > > print( linearHypothesis( fitw2slsd1e, restrm ) ) Linear hypothesis test (Theil's F test) Hypothesis: demand_income - supply_trend = 0 Model 1: restricted model Model 2: fitw2slsd1e Res.Df Df F Pr(>F) 1 34 2 33 1 0.92 0.35 > linearHypothesis( fitw2slsd1e, restrict ) Linear hypothesis test (Theil's F test) Hypothesis: demand_income - supply_trend = 0 Model 1: restricted model Model 2: fitw2slsd1e Res.Df Df F Pr(>F) 1 34 2 33 1 0.92 0.35 > > # testing second restriction > restrOnly2m <- matrix(0,1,7) > restrOnly2q <- 0.5 > restrOnly2m[1,2] <- -1 > restrOnly2m[1,5] <- 1 > restrictOnly2 <- "- demand_price + supply_price = 0.5" > # first restriction not imposed > print( linearHypothesis( fitw2sls1e, restrOnly2m, restrOnly2q ) ) Linear hypothesis test (Theil's F test) Hypothesis: - demand_price + supply_price = 0.5 Model 1: restricted model Model 2: fitw2sls1e Res.Df Df F Pr(>F) 1 34 2 33 1 0.01 0.91 > linearHypothesis( fitw2sls1e, restrictOnly2 ) Linear hypothesis test (Theil's F test) Hypothesis: - demand_price + supply_price = 0.5 Model 1: restricted model Model 2: fitw2sls1e Res.Df Df F Pr(>F) 1 34 2 33 1 0.01 0.91 > > print( linearHypothesis( fitw2slsd1, restrOnly2m, restrOnly2q ) ) Linear hypothesis test (Theil's F test) Hypothesis: - demand_price + supply_price = 0.5 Model 1: restricted model Model 2: fitw2slsd1 Res.Df Df F Pr(>F) 1 34 2 33 1 0.74 0.39 > linearHypothesis( fitw2slsd1, restrictOnly2 ) Linear hypothesis test (Theil's F test) Hypothesis: - demand_price + supply_price = 0.5 Model 1: restricted model Model 2: fitw2slsd1 Res.Df Df F Pr(>F) 1 34 2 33 1 0.74 0.39 > > # first restriction imposed > print( linearHypothesis( fitw2sls2, restrOnly2m, restrOnly2q ) ) Linear hypothesis test (Theil's F test) Hypothesis: - demand_price + supply_price = 0.5 Model 1: restricted model Model 2: fitw2sls2 Res.Df Df F Pr(>F) 1 35 2 34 1 0.04 0.85 > linearHypothesis( fitw2sls2, restrictOnly2 ) Linear hypothesis test (Theil's F test) Hypothesis: - demand_price + supply_price = 0.5 Model 1: restricted model Model 2: fitw2sls2 Res.Df Df F Pr(>F) 1 35 2 34 1 0.04 0.85 > > print( linearHypothesis( fitw2sls3, restrOnly2m, restrOnly2q ) ) Linear hypothesis test (Theil's F test) Hypothesis: - demand_price + supply_price = 0.5 Model 1: restricted model Model 2: fitw2sls3 Res.Df Df F Pr(>F) 1 35 2 34 1 0.04 0.85 > linearHypothesis( fitw2sls3, restrictOnly2 ) Linear hypothesis test (Theil's F test) Hypothesis: - demand_price + supply_price = 0.5 Model 1: restricted model Model 2: fitw2sls3 Res.Df Df F Pr(>F) 1 35 2 34 1 0.04 0.85 > > print( linearHypothesis( fitw2slsd2e, restrOnly2m, restrOnly2q ) ) Linear hypothesis test (Theil's F test) Hypothesis: - demand_price + supply_price = 0.5 Model 1: restricted model Model 2: fitw2slsd2e Res.Df Df F Pr(>F) 1 35 2 34 1 0.42 0.52 > linearHypothesis( fitw2slsd2e, restrictOnly2 ) Linear hypothesis test (Theil's F test) Hypothesis: - demand_price + supply_price = 0.5 Model 1: restricted model Model 2: fitw2slsd2e Res.Df Df F Pr(>F) 1 35 2 34 1 0.42 0.52 > > print( linearHypothesis( fitw2slsd3e, restrOnly2m, restrOnly2q ) ) Linear hypothesis test (Theil's F test) Hypothesis: - demand_price + supply_price = 0.5 Model 1: restricted model Model 2: fitw2slsd3e Res.Df Df F Pr(>F) 1 35 2 34 1 0.42 0.52 > linearHypothesis( fitw2slsd3e, restrictOnly2 ) Linear hypothesis test (Theil's F test) Hypothesis: - demand_price + supply_price = 0.5 Model 1: restricted model Model 2: fitw2slsd3e Res.Df Df F Pr(>F) 1 35 2 34 1 0.42 0.52 > > # testing both of the restrictions > print( linearHypothesis( fitw2sls1e, restr2m, restr2q ) ) Linear hypothesis test (Theil's F test) Hypothesis: demand_income - supply_trend = 0 - demand_price + supply_price = 0.5 Model 1: restricted model Model 2: fitw2sls1e Res.Df Df F Pr(>F) 1 35 2 33 2 0.18 0.84 > linearHypothesis( fitw2sls1e, restrict2 ) Linear hypothesis test (Theil's F test) Hypothesis: demand_income - supply_trend = 0 - demand_price + supply_price = 0.5 Model 1: restricted model Model 2: fitw2sls1e Res.Df Df F Pr(>F) 1 35 2 33 2 0.18 0.84 > > print( linearHypothesis( fitw2slsd1, restr2m, restr2q ) ) Linear hypothesis test (Theil's F test) Hypothesis: demand_income - supply_trend = 0 - demand_price + supply_price = 0.5 Model 1: restricted model Model 2: fitw2slsd1 Res.Df Df F Pr(>F) 1 35 2 33 2 0.65 0.53 > linearHypothesis( fitw2slsd1, restrict2 ) Linear hypothesis test (Theil's F test) Hypothesis: demand_income - supply_trend = 0 - demand_price + supply_price = 0.5 Model 1: restricted model Model 2: fitw2slsd1 Res.Df Df F Pr(>F) 1 35 2 33 2 0.65 0.53 > > > ## ************** Wald tests **************** > # testing first restriction > print( linearHypothesis( fitw2sls1, restrm, test = "Chisq" ) ) Linear hypothesis test (Chi^2 statistic of a Wald test) Hypothesis: demand_income - supply_trend = 0 Model 1: restricted model Model 2: fitw2sls1 Res.Df Df Chisq Pr(>Chisq) 1 34 2 33 1 0.31 0.58 > linearHypothesis( fitw2sls1, restrict, test = "Chisq" ) Linear hypothesis test (Chi^2 statistic of a Wald test) Hypothesis: demand_income - supply_trend = 0 Model 1: restricted model Model 2: fitw2sls1 Res.Df Df Chisq Pr(>Chisq) 1 34 2 33 1 0.31 0.58 > > print( linearHypothesis( fitw2slsd1e, restrm, test = "Chisq" ) ) Linear hypothesis test (Chi^2 statistic of a Wald test) Hypothesis: demand_income - supply_trend = 0 Model 1: restricted model Model 2: fitw2slsd1e Res.Df Df Chisq Pr(>Chisq) 1 34 2 33 1 1.11 0.29 > linearHypothesis( fitw2slsd1e, restrict, test = "Chisq" ) Linear hypothesis test (Chi^2 statistic of a Wald test) Hypothesis: demand_income - supply_trend = 0 Model 1: restricted model Model 2: fitw2slsd1e Res.Df Df Chisq Pr(>Chisq) 1 34 2 33 1 1.11 0.29 > > # testing second restriction > # first restriction not imposed > print( linearHypothesis( fitw2sls1e, restrOnly2m, restrOnly2q, test = "Chisq" ) ) Linear hypothesis test (Chi^2 statistic of a Wald test) Hypothesis: - demand_price + supply_price = 0.5 Model 1: restricted model Model 2: fitw2sls1e Res.Df Df Chisq Pr(>Chisq) 1 34 2 33 1 0.02 0.9 > linearHypothesis( fitw2sls1e, restrictOnly2, test = "Chisq" ) Linear hypothesis test (Chi^2 statistic of a Wald test) Hypothesis: - demand_price + supply_price = 0.5 Model 1: restricted model Model 2: fitw2sls1e Res.Df Df Chisq Pr(>Chisq) 1 34 2 33 1 0.02 0.9 > > print( linearHypothesis( fitw2slsd1, restrOnly2m, restrOnly2q, test = "Chisq" ) ) Linear hypothesis test (Chi^2 statistic of a Wald test) Hypothesis: - demand_price + supply_price = 0.5 Model 1: restricted model Model 2: fitw2slsd1 Res.Df Df Chisq Pr(>Chisq) 1 34 2 33 1 0.74 0.39 > linearHypothesis( fitw2slsd1, restrictOnly2, test = "Chisq" ) Linear hypothesis test (Chi^2 statistic of a Wald test) Hypothesis: - demand_price + supply_price = 0.5 Model 1: restricted model Model 2: fitw2slsd1 Res.Df Df Chisq Pr(>Chisq) 1 34 2 33 1 0.74 0.39 > # first restriction imposed > print( linearHypothesis( fitw2sls2, restrOnly2m, restrOnly2q, test = "Chisq" ) ) Linear hypothesis test (Chi^2 statistic of a Wald test) Hypothesis: - demand_price + supply_price = 0.5 Model 1: restricted model Model 2: fitw2sls2 Res.Df Df Chisq Pr(>Chisq) 1 35 2 34 1 0.04 0.85 > linearHypothesis( fitw2sls2, restrictOnly2, test = "Chisq" ) Linear hypothesis test (Chi^2 statistic of a Wald test) Hypothesis: - demand_price + supply_price = 0.5 Model 1: restricted model Model 2: fitw2sls2 Res.Df Df Chisq Pr(>Chisq) 1 35 2 34 1 0.04 0.85 > > print( linearHypothesis( fitw2sls3, restrOnly2m, restrOnly2q, test = "Chisq" ) ) Linear hypothesis test (Chi^2 statistic of a Wald test) Hypothesis: - demand_price + supply_price = 0.5 Model 1: restricted model Model 2: fitw2sls3 Res.Df Df Chisq Pr(>Chisq) 1 35 2 34 1 0.04 0.85 > linearHypothesis( fitw2sls3, restrictOnly2, test = "Chisq" ) Linear hypothesis test (Chi^2 statistic of a Wald test) Hypothesis: - demand_price + supply_price = 0.5 Model 1: restricted model Model 2: fitw2sls3 Res.Df Df Chisq Pr(>Chisq) 1 35 2 34 1 0.04 0.85 > > print( linearHypothesis( fitw2slsd2e, restrOnly2m, restrOnly2q, test = "Chisq" ) ) Linear hypothesis test (Chi^2 statistic of a Wald test) Hypothesis: - demand_price + supply_price = 0.5 Model 1: restricted model Model 2: fitw2slsd2e Res.Df Df Chisq Pr(>Chisq) 1 35 2 34 1 0.49 0.48 > linearHypothesis( fitw2slsd2e, restrictOnly2, test = "Chisq" ) Linear hypothesis test (Chi^2 statistic of a Wald test) Hypothesis: - demand_price + supply_price = 0.5 Model 1: restricted model Model 2: fitw2slsd2e Res.Df Df Chisq Pr(>Chisq) 1 35 2 34 1 0.49 0.48 > > print( linearHypothesis( fitw2slsd3e, restrOnly2m, restrOnly2q, test = "Chisq" ) ) Linear hypothesis test (Chi^2 statistic of a Wald test) Hypothesis: - demand_price + supply_price = 0.5 Model 1: restricted model Model 2: fitw2slsd3e Res.Df Df Chisq Pr(>Chisq) 1 35 2 34 1 0.49 0.48 > linearHypothesis( fitw2slsd3e, restrictOnly2, test = "Chisq" ) Linear hypothesis test (Chi^2 statistic of a Wald test) Hypothesis: - demand_price + supply_price = 0.5 Model 1: restricted model Model 2: fitw2slsd3e Res.Df Df Chisq Pr(>Chisq) 1 35 2 34 1 0.49 0.48 > > # testing both of the restrictions > print( linearHypothesis( fitw2sls1e, restr2m, restr2q, test = "Chisq" ) ) Linear hypothesis test (Chi^2 statistic of a Wald test) Hypothesis: demand_income - supply_trend = 0 - demand_price + supply_price = 0.5 Model 1: restricted model Model 2: fitw2sls1e Res.Df Df Chisq Pr(>Chisq) 1 35 2 33 2 0.43 0.81 > linearHypothesis( fitw2sls1e, restrict2, test = "Chisq" ) Linear hypothesis test (Chi^2 statistic of a Wald test) Hypothesis: demand_income - supply_trend = 0 - demand_price + supply_price = 0.5 Model 1: restricted model Model 2: fitw2sls1e Res.Df Df Chisq Pr(>Chisq) 1 35 2 33 2 0.43 0.81 > > print( linearHypothesis( fitw2slsd1, restr2m, restr2q, test = "Chisq" ) ) Linear hypothesis test (Chi^2 statistic of a Wald test) Hypothesis: demand_income - supply_trend = 0 - demand_price + supply_price = 0.5 Model 1: restricted model Model 2: fitw2slsd1 Res.Df Df Chisq Pr(>Chisq) 1 35 2 33 2 1.3 0.52 > linearHypothesis( fitw2slsd1, restrict2, test = "Chisq" ) Linear hypothesis test (Chi^2 statistic of a Wald test) Hypothesis: demand_income - supply_trend = 0 - demand_price + supply_price = 0.5 Model 1: restricted model Model 2: fitw2slsd1 Res.Df Df Chisq Pr(>Chisq) 1 35 2 33 2 1.3 0.52 > > > ## ****************** model frame ************************** > print( mf <- model.frame( fitw2sls1e ) ) consump price income farmPrice trend 1 98.5 100.3 87.4 98.0 1 2 99.2 104.3 97.6 99.1 2 3 102.2 103.4 96.7 99.1 3 4 101.5 104.5 98.2 98.1 4 5 104.2 98.0 99.8 110.8 5 6 103.2 99.5 100.5 108.2 6 7 104.0 101.1 103.2 105.6 7 8 99.9 104.8 107.8 109.8 8 9 100.3 96.4 96.6 108.7 9 10 102.8 91.2 88.9 100.6 10 11 95.4 93.1 75.1 81.0 11 12 92.4 98.8 76.9 68.6 12 13 94.5 102.9 84.6 70.9 13 14 98.8 98.8 90.6 81.4 14 15 105.8 95.1 103.1 102.3 15 16 100.2 98.5 105.1 105.0 16 17 103.5 86.5 96.4 110.5 17 18 99.9 104.0 104.4 92.5 18 19 105.2 105.8 110.7 89.3 19 20 106.2 113.5 127.1 93.0 20 > print( mf1 <- model.frame( fitw2sls1e$eq[[ 1 ]] ) ) consump price income 1 98.5 100.3 87.4 2 99.2 104.3 97.6 3 102.2 103.4 96.7 4 101.5 104.5 98.2 5 104.2 98.0 99.8 6 103.2 99.5 100.5 7 104.0 101.1 103.2 8 99.9 104.8 107.8 9 100.3 96.4 96.6 10 102.8 91.2 88.9 11 95.4 93.1 75.1 12 92.4 98.8 76.9 13 94.5 102.9 84.6 14 98.8 98.8 90.6 15 105.8 95.1 103.1 16 100.2 98.5 105.1 17 103.5 86.5 96.4 18 99.9 104.0 104.4 19 105.2 105.8 110.7 20 106.2 113.5 127.1 > print( attributes( mf1 )$terms ) consump ~ price + income attr(,"variables") list(consump, price, income) attr(,"factors") price income consump 0 0 price 1 0 income 0 1 attr(,"term.labels") [1] "price" "income" attr(,"order") [1] 1 1 attr(,"intercept") [1] 1 attr(,"response") [1] 1 attr(,".Environment") attr(,"predvars") list(consump, price, income) attr(,"dataClasses") consump price income "numeric" "numeric" "numeric" > print( mf2 <- model.frame( fitw2sls1e$eq[[ 2 ]] ) ) consump price farmPrice trend 1 98.5 100.3 98.0 1 2 99.2 104.3 99.1 2 3 102.2 103.4 99.1 3 4 101.5 104.5 98.1 4 5 104.2 98.0 110.8 5 6 103.2 99.5 108.2 6 7 104.0 101.1 105.6 7 8 99.9 104.8 109.8 8 9 100.3 96.4 108.7 9 10 102.8 91.2 100.6 10 11 95.4 93.1 81.0 11 12 92.4 98.8 68.6 12 13 94.5 102.9 70.9 13 14 98.8 98.8 81.4 14 15 105.8 95.1 102.3 15 16 100.2 98.5 105.0 16 17 103.5 86.5 110.5 17 18 99.9 104.0 92.5 18 19 105.2 105.8 89.3 19 20 106.2 113.5 93.0 20 > print( attributes( mf2 )$terms ) consump ~ price + farmPrice + trend attr(,"variables") list(consump, price, farmPrice, trend) attr(,"factors") price farmPrice trend consump 0 0 0 price 1 0 0 farmPrice 0 1 0 trend 0 0 1 attr(,"term.labels") [1] "price" "farmPrice" "trend" attr(,"order") [1] 1 1 1 attr(,"intercept") [1] 1 attr(,"response") [1] 1 attr(,".Environment") attr(,"predvars") list(consump, price, farmPrice, trend) attr(,"dataClasses") consump price farmPrice trend "numeric" "numeric" "numeric" "numeric" > > print( all.equal( mf, model.frame( fitw2sls2 ) ) ) [1] TRUE > print( all.equal( mf2, model.frame( fitw2sls2$eq[[ 2 ]] ) ) ) [1] TRUE > > print( all.equal( mf, model.frame( fitw2sls3 ) ) ) [1] TRUE > print( all.equal( mf1, model.frame( fitw2sls3$eq[[ 1 ]] ) ) ) [1] TRUE > > print( all.equal( mf, model.frame( fitw2sls4e ) ) ) [1] TRUE > print( all.equal( mf2, model.frame( fitw2sls4e$eq[[ 2 ]] ) ) ) [1] TRUE > > print( all.equal( mf, model.frame( fitw2sls5 ) ) ) [1] TRUE > print( all.equal( mf1, model.frame( fitw2sls5$eq[[ 1 ]] ) ) ) [1] TRUE > > print( all.equal( mf, model.frame( fitw2slsd1 ) ) ) [1] TRUE > print( all.equal( mf2, model.frame( fitw2slsd1$eq[[ 2 ]] ) ) ) [1] TRUE > > print( all.equal( mf, model.frame( fitw2slsd2e ) ) ) [1] TRUE > print( all.equal( mf1, model.frame( fitw2slsd2e$eq[[ 1 ]] ) ) ) [1] TRUE > > print( all.equal( mf, model.frame( fitw2slsd3e ) ) ) [1] TRUE > print( all.equal( mf2, model.frame( fitw2slsd3e$eq[[ 2 ]] ) ) ) [1] TRUE > > fitw2sls1e$eq[[ 1 ]]$modelInst income farmPrice trend 1 87.4 98.0 1 2 97.6 99.1 2 3 96.7 99.1 3 4 98.2 98.1 4 5 99.8 110.8 5 6 100.5 108.2 6 7 103.2 105.6 7 8 107.8 109.8 8 9 96.6 108.7 9 10 88.9 100.6 10 11 75.1 81.0 11 12 76.9 68.6 12 13 84.6 70.9 13 14 90.6 81.4 14 15 103.1 102.3 15 16 105.1 105.0 16 17 96.4 110.5 17 18 104.4 92.5 18 19 110.7 89.3 19 20 127.1 93.0 20 > fitw2sls1e$eq[[ 2 ]]$modelInst income farmPrice trend 1 87.4 98.0 1 2 97.6 99.1 2 3 96.7 99.1 3 4 98.2 98.1 4 5 99.8 110.8 5 6 100.5 108.2 6 7 103.2 105.6 7 8 107.8 109.8 8 9 96.6 108.7 9 10 88.9 100.6 10 11 75.1 81.0 11 12 76.9 68.6 12 13 84.6 70.9 13 14 90.6 81.4 14 15 103.1 102.3 15 16 105.1 105.0 16 17 96.4 110.5 17 18 104.4 92.5 18 19 110.7 89.3 19 20 127.1 93.0 20 > > fitw2sls4Sym$eq[[ 1 ]]$modelInst income farmPrice trend 1 87.4 98.0 1 2 97.6 99.1 2 3 96.7 99.1 3 4 98.2 98.1 4 5 99.8 110.8 5 6 100.5 108.2 6 7 103.2 105.6 7 8 107.8 109.8 8 9 96.6 108.7 9 10 88.9 100.6 10 11 75.1 81.0 11 12 76.9 68.6 12 13 84.6 70.9 13 14 90.6 81.4 14 15 103.1 102.3 15 16 105.1 105.0 16 17 96.4 110.5 17 18 104.4 92.5 18 19 110.7 89.3 19 20 127.1 93.0 20 > fitw2sls4Sym$eq[[ 2 ]]$modelInst income farmPrice trend 1 87.4 98.0 1 2 97.6 99.1 2 3 96.7 99.1 3 4 98.2 98.1 4 5 99.8 110.8 5 6 100.5 108.2 6 7 103.2 105.6 7 8 107.8 109.8 8 9 96.6 108.7 9 10 88.9 100.6 10 11 75.1 81.0 11 12 76.9 68.6 12 13 84.6 70.9 13 14 90.6 81.4 14 15 103.1 102.3 15 16 105.1 105.0 16 17 96.4 110.5 17 18 104.4 92.5 18 19 110.7 89.3 19 20 127.1 93.0 20 > > fitw2sls5$eq[[ 1 ]]$modelInst income farmPrice trend 1 87.4 98.0 1 2 97.6 99.1 2 3 96.7 99.1 3 4 98.2 98.1 4 5 99.8 110.8 5 6 100.5 108.2 6 7 103.2 105.6 7 8 107.8 109.8 8 9 96.6 108.7 9 10 88.9 100.6 10 11 75.1 81.0 11 12 76.9 68.6 12 13 84.6 70.9 13 14 90.6 81.4 14 15 103.1 102.3 15 16 105.1 105.0 16 17 96.4 110.5 17 18 104.4 92.5 18 19 110.7 89.3 19 20 127.1 93.0 20 > fitw2sls5$eq[[ 2 ]]$modelInst income farmPrice trend 1 87.4 98.0 1 2 97.6 99.1 2 3 96.7 99.1 3 4 98.2 98.1 4 5 99.8 110.8 5 6 100.5 108.2 6 7 103.2 105.6 7 8 107.8 109.8 8 9 96.6 108.7 9 10 88.9 100.6 10 11 75.1 81.0 11 12 76.9 68.6 12 13 84.6 70.9 13 14 90.6 81.4 14 15 103.1 102.3 15 16 105.1 105.0 16 17 96.4 110.5 17 18 104.4 92.5 18 19 110.7 89.3 19 20 127.1 93.0 20 > > > ## **************** model matrix ************************ > # with x (returnModelMatrix) = TRUE > print( !is.null( fitw2sls1e$eq[[ 1 ]]$x ) ) [1] TRUE > print( mm <- model.matrix( fitw2sls1e ) ) demand_(Intercept) demand_price demand_income supply_(Intercept) demand_1 1 100.3 87.4 0 demand_2 1 104.3 97.6 0 demand_3 1 103.4 96.7 0 demand_4 1 104.5 98.2 0 demand_5 1 98.0 99.8 0 demand_6 1 99.5 100.5 0 demand_7 1 101.1 103.2 0 demand_8 1 104.8 107.8 0 demand_9 1 96.4 96.6 0 demand_10 1 91.2 88.9 0 demand_11 1 93.1 75.1 0 demand_12 1 98.8 76.9 0 demand_13 1 102.9 84.6 0 demand_14 1 98.8 90.6 0 demand_15 1 95.1 103.1 0 demand_16 1 98.5 105.1 0 demand_17 1 86.5 96.4 0 demand_18 1 104.0 104.4 0 demand_19 1 105.8 110.7 0 demand_20 1 113.5 127.1 0 supply_1 0 0.0 0.0 1 supply_2 0 0.0 0.0 1 supply_3 0 0.0 0.0 1 supply_4 0 0.0 0.0 1 supply_5 0 0.0 0.0 1 supply_6 0 0.0 0.0 1 supply_7 0 0.0 0.0 1 supply_8 0 0.0 0.0 1 supply_9 0 0.0 0.0 1 supply_10 0 0.0 0.0 1 supply_11 0 0.0 0.0 1 supply_12 0 0.0 0.0 1 supply_13 0 0.0 0.0 1 supply_14 0 0.0 0.0 1 supply_15 0 0.0 0.0 1 supply_16 0 0.0 0.0 1 supply_17 0 0.0 0.0 1 supply_18 0 0.0 0.0 1 supply_19 0 0.0 0.0 1 supply_20 0 0.0 0.0 1 supply_price supply_farmPrice supply_trend demand_1 0.0 0.0 0 demand_2 0.0 0.0 0 demand_3 0.0 0.0 0 demand_4 0.0 0.0 0 demand_5 0.0 0.0 0 demand_6 0.0 0.0 0 demand_7 0.0 0.0 0 demand_8 0.0 0.0 0 demand_9 0.0 0.0 0 demand_10 0.0 0.0 0 demand_11 0.0 0.0 0 demand_12 0.0 0.0 0 demand_13 0.0 0.0 0 demand_14 0.0 0.0 0 demand_15 0.0 0.0 0 demand_16 0.0 0.0 0 demand_17 0.0 0.0 0 demand_18 0.0 0.0 0 demand_19 0.0 0.0 0 demand_20 0.0 0.0 0 supply_1 100.3 98.0 1 supply_2 104.3 99.1 2 supply_3 103.4 99.1 3 supply_4 104.5 98.1 4 supply_5 98.0 110.8 5 supply_6 99.5 108.2 6 supply_7 101.1 105.6 7 supply_8 104.8 109.8 8 supply_9 96.4 108.7 9 supply_10 91.2 100.6 10 supply_11 93.1 81.0 11 supply_12 98.8 68.6 12 supply_13 102.9 70.9 13 supply_14 98.8 81.4 14 supply_15 95.1 102.3 15 supply_16 98.5 105.0 16 supply_17 86.5 110.5 17 supply_18 104.0 92.5 18 supply_19 105.8 89.3 19 supply_20 113.5 93.0 20 > print( mm1 <- model.matrix( fitw2sls1e$eq[[ 1 ]] ) ) (Intercept) price income 1 1 100.3 87.4 2 1 104.3 97.6 3 1 103.4 96.7 4 1 104.5 98.2 5 1 98.0 99.8 6 1 99.5 100.5 7 1 101.1 103.2 8 1 104.8 107.8 9 1 96.4 96.6 10 1 91.2 88.9 11 1 93.1 75.1 12 1 98.8 76.9 13 1 102.9 84.6 14 1 98.8 90.6 15 1 95.1 103.1 16 1 98.5 105.1 17 1 86.5 96.4 18 1 104.0 104.4 19 1 105.8 110.7 20 1 113.5 127.1 attr(,"assign") [1] 0 1 2 > print( mm2 <- model.matrix( fitw2sls1e$eq[[ 2 ]] ) ) (Intercept) price farmPrice trend 1 1 100.3 98.0 1 2 1 104.3 99.1 2 3 1 103.4 99.1 3 4 1 104.5 98.1 4 5 1 98.0 110.8 5 6 1 99.5 108.2 6 7 1 101.1 105.6 7 8 1 104.8 109.8 8 9 1 96.4 108.7 9 10 1 91.2 100.6 10 11 1 93.1 81.0 11 12 1 98.8 68.6 12 13 1 102.9 70.9 13 14 1 98.8 81.4 14 15 1 95.1 102.3 15 16 1 98.5 105.0 16 17 1 86.5 110.5 17 18 1 104.0 92.5 18 19 1 105.8 89.3 19 20 1 113.5 93.0 20 attr(,"assign") [1] 0 1 2 3 > > # with x (returnModelMatrix) = FALSE > print( all.equal( mm, model.matrix( fitw2sls1 ) ) ) [1] TRUE > print( all.equal( mm1, model.matrix( fitw2sls1$eq[[ 1 ]] ) ) ) [1] TRUE > print( all.equal( mm2, model.matrix( fitw2sls1$eq[[ 2 ]] ) ) ) [1] TRUE > print( !is.null( fitw2sls1$eq[[ 1 ]]$x ) ) [1] FALSE > > # with x (returnModelMatrix) = TRUE > print( !is.null( fitw2sls2e$eq[[ 1 ]]$x ) ) [1] TRUE > print( all.equal( mm, model.matrix( fitw2sls2e ) ) ) [1] TRUE > print( all.equal( mm1, model.matrix( fitw2sls2e$eq[[ 1 ]] ) ) ) [1] TRUE > print( all.equal( mm2, model.matrix( fitw2sls2e$eq[[ 2 ]] ) ) ) [1] TRUE > > # with x (returnModelMatrix) = FALSE > print( all.equal( mm, model.matrix( fitw2sls2Sym ) ) ) [1] TRUE > print( all.equal( mm1, model.matrix( fitw2sls2Sym$eq[[ 1 ]] ) ) ) [1] TRUE > print( all.equal( mm2, model.matrix( fitw2sls2Sym$eq[[ 2 ]] ) ) ) [1] TRUE > print( !is.null( fitw2sls2Sym$eq[[ 1 ]]$x ) ) [1] FALSE > > # with x (returnModelMatrix) = TRUE > print( !is.null( fitw2slsd3$eq[[ 1 ]]$x ) ) [1] TRUE > print( all.equal( mm, model.matrix( fitw2slsd3 ) ) ) [1] TRUE > print( all.equal( mm1, model.matrix( fitw2slsd3$eq[[ 1 ]] ) ) ) [1] TRUE > print( all.equal( mm2, model.matrix( fitw2slsd3$eq[[ 2 ]] ) ) ) [1] TRUE > > # with x (returnModelMatrix) = FALSE > print( all.equal( mm, model.matrix( fitw2slsd3e ) ) ) [1] TRUE > print( all.equal( mm1, model.matrix( fitw2slsd3e$eq[[ 1 ]] ) ) ) [1] TRUE > print( all.equal( mm2, model.matrix( fitw2slsd3e$eq[[ 2 ]] ) ) ) [1] TRUE > print( !is.null( fitw2slsd3e$eq[[ 1 ]]$x ) ) [1] FALSE > > # with x (returnModelMatrix) = TRUE > print( !is.null( fitw2sls4$eq[[ 1 ]]$x ) ) [1] TRUE > print( all.equal( mm, model.matrix( fitw2sls4 ) ) ) [1] TRUE > print( all.equal( mm1, model.matrix( fitw2sls4$eq[[ 1 ]] ) ) ) [1] TRUE > print( all.equal( mm2, model.matrix( fitw2sls4$eq[[ 2 ]] ) ) ) [1] TRUE > > # with x (returnModelMatrix) = FALSE > print( all.equal( mm, model.matrix( fitw2sls4e ) ) ) [1] TRUE > print( all.equal( mm1, model.matrix( fitw2sls4e$eq[[ 1 ]] ) ) ) [1] TRUE > print( all.equal( mm2, model.matrix( fitw2sls4e$eq[[ 2 ]] ) ) ) [1] TRUE > print( !is.null( fitw2sls4e$eq[[ 1 ]]$x ) ) [1] FALSE > > # with x (returnModelMatrix) = TRUE > print( !is.null( fitw2sls5$eq[[ 1 ]]$x ) ) [1] TRUE > print( all.equal( mm, model.matrix( fitw2sls5 ) ) ) [1] TRUE > print( all.equal( mm1, model.matrix( fitw2sls5$eq[[ 1 ]] ) ) ) [1] TRUE > print( all.equal( mm2, model.matrix( fitw2sls5$eq[[ 2 ]] ) ) ) [1] TRUE > > # with x (returnModelMatrix) = FALSE > print( all.equal( mm, model.matrix( fitw2sls5e ) ) ) [1] TRUE > print( all.equal( mm1, model.matrix( fitw2sls5e$eq[[ 1 ]] ) ) ) [1] TRUE > print( all.equal( mm2, model.matrix( fitw2sls5e$eq[[ 2 ]] ) ) ) [1] TRUE > print( !is.null( fitw2sls5e$eq[[ 1 ]]$x ) ) [1] FALSE > > # matrices of instrumental variables > model.matrix( fitw2sls1, which = "z" ) demand_(Intercept) demand_income demand_farmPrice demand_trend demand_1 1 87.4 98.0 1 demand_2 1 97.6 99.1 2 demand_3 1 96.7 99.1 3 demand_4 1 98.2 98.1 4 demand_5 1 99.8 110.8 5 demand_6 1 100.5 108.2 6 demand_7 1 103.2 105.6 7 demand_8 1 107.8 109.8 8 demand_9 1 96.6 108.7 9 demand_10 1 88.9 100.6 10 demand_11 1 75.1 81.0 11 demand_12 1 76.9 68.6 12 demand_13 1 84.6 70.9 13 demand_14 1 90.6 81.4 14 demand_15 1 103.1 102.3 15 demand_16 1 105.1 105.0 16 demand_17 1 96.4 110.5 17 demand_18 1 104.4 92.5 18 demand_19 1 110.7 89.3 19 demand_20 1 127.1 93.0 20 supply_1 0 0.0 0.0 0 supply_2 0 0.0 0.0 0 supply_3 0 0.0 0.0 0 supply_4 0 0.0 0.0 0 supply_5 0 0.0 0.0 0 supply_6 0 0.0 0.0 0 supply_7 0 0.0 0.0 0 supply_8 0 0.0 0.0 0 supply_9 0 0.0 0.0 0 supply_10 0 0.0 0.0 0 supply_11 0 0.0 0.0 0 supply_12 0 0.0 0.0 0 supply_13 0 0.0 0.0 0 supply_14 0 0.0 0.0 0 supply_15 0 0.0 0.0 0 supply_16 0 0.0 0.0 0 supply_17 0 0.0 0.0 0 supply_18 0 0.0 0.0 0 supply_19 0 0.0 0.0 0 supply_20 0 0.0 0.0 0 supply_(Intercept) supply_income supply_farmPrice supply_trend demand_1 0 0.0 0.0 0 demand_2 0 0.0 0.0 0 demand_3 0 0.0 0.0 0 demand_4 0 0.0 0.0 0 demand_5 0 0.0 0.0 0 demand_6 0 0.0 0.0 0 demand_7 0 0.0 0.0 0 demand_8 0 0.0 0.0 0 demand_9 0 0.0 0.0 0 demand_10 0 0.0 0.0 0 demand_11 0 0.0 0.0 0 demand_12 0 0.0 0.0 0 demand_13 0 0.0 0.0 0 demand_14 0 0.0 0.0 0 demand_15 0 0.0 0.0 0 demand_16 0 0.0 0.0 0 demand_17 0 0.0 0.0 0 demand_18 0 0.0 0.0 0 demand_19 0 0.0 0.0 0 demand_20 0 0.0 0.0 0 supply_1 1 87.4 98.0 1 supply_2 1 97.6 99.1 2 supply_3 1 96.7 99.1 3 supply_4 1 98.2 98.1 4 supply_5 1 99.8 110.8 5 supply_6 1 100.5 108.2 6 supply_7 1 103.2 105.6 7 supply_8 1 107.8 109.8 8 supply_9 1 96.6 108.7 9 supply_10 1 88.9 100.6 10 supply_11 1 75.1 81.0 11 supply_12 1 76.9 68.6 12 supply_13 1 84.6 70.9 13 supply_14 1 90.6 81.4 14 supply_15 1 103.1 102.3 15 supply_16 1 105.1 105.0 16 supply_17 1 96.4 110.5 17 supply_18 1 104.4 92.5 18 supply_19 1 110.7 89.3 19 supply_20 1 127.1 93.0 20 > model.matrix( fitw2sls1$eq[[ 1 ]], which = "z" ) (Intercept) income farmPrice trend 1 1 87.4 98.0 1 2 1 97.6 99.1 2 3 1 96.7 99.1 3 4 1 98.2 98.1 4 5 1 99.8 110.8 5 6 1 100.5 108.2 6 7 1 103.2 105.6 7 8 1 107.8 109.8 8 9 1 96.6 108.7 9 10 1 88.9 100.6 10 11 1 75.1 81.0 11 12 1 76.9 68.6 12 13 1 84.6 70.9 13 14 1 90.6 81.4 14 15 1 103.1 102.3 15 16 1 105.1 105.0 16 17 1 96.4 110.5 17 18 1 104.4 92.5 18 19 1 110.7 89.3 19 20 1 127.1 93.0 20 attr(,"assign") [1] 0 1 2 3 > model.matrix( fitw2sls1$eq[[ 2 ]], which = "z" ) (Intercept) income farmPrice trend 1 1 87.4 98.0 1 2 1 97.6 99.1 2 3 1 96.7 99.1 3 4 1 98.2 98.1 4 5 1 99.8 110.8 5 6 1 100.5 108.2 6 7 1 103.2 105.6 7 8 1 107.8 109.8 8 9 1 96.6 108.7 9 10 1 88.9 100.6 10 11 1 75.1 81.0 11 12 1 76.9 68.6 12 13 1 84.6 70.9 13 14 1 90.6 81.4 14 15 1 103.1 102.3 15 16 1 105.1 105.0 16 17 1 96.4 110.5 17 18 1 104.4 92.5 18 19 1 110.7 89.3 19 20 1 127.1 93.0 20 attr(,"assign") [1] 0 1 2 3 > > # matrices of fitted regressors > model.matrix( fitw2sls5e, which = "xHat" ) demand_(Intercept) demand_price demand_income supply_(Intercept) demand_1 1 99.6 87.4 0 demand_2 1 105.1 97.6 0 demand_3 1 103.8 96.7 0 demand_4 1 104.5 98.2 0 demand_5 1 98.7 99.8 0 demand_6 1 99.6 100.5 0 demand_7 1 102.0 103.2 0 demand_8 1 102.2 107.8 0 demand_9 1 94.6 96.6 0 demand_10 1 92.7 88.9 0 demand_11 1 92.4 75.1 0 demand_12 1 98.9 76.9 0 demand_13 1 102.2 84.6 0 demand_14 1 100.3 90.6 0 demand_15 1 97.6 103.1 0 demand_16 1 96.9 105.1 0 demand_17 1 87.7 96.4 0 demand_18 1 101.1 104.4 0 demand_19 1 106.1 110.7 0 demand_20 1 114.4 127.1 0 supply_1 0 0.0 0.0 1 supply_2 0 0.0 0.0 1 supply_3 0 0.0 0.0 1 supply_4 0 0.0 0.0 1 supply_5 0 0.0 0.0 1 supply_6 0 0.0 0.0 1 supply_7 0 0.0 0.0 1 supply_8 0 0.0 0.0 1 supply_9 0 0.0 0.0 1 supply_10 0 0.0 0.0 1 supply_11 0 0.0 0.0 1 supply_12 0 0.0 0.0 1 supply_13 0 0.0 0.0 1 supply_14 0 0.0 0.0 1 supply_15 0 0.0 0.0 1 supply_16 0 0.0 0.0 1 supply_17 0 0.0 0.0 1 supply_18 0 0.0 0.0 1 supply_19 0 0.0 0.0 1 supply_20 0 0.0 0.0 1 supply_price supply_farmPrice supply_trend demand_1 0.0 0.0 0 demand_2 0.0 0.0 0 demand_3 0.0 0.0 0 demand_4 0.0 0.0 0 demand_5 0.0 0.0 0 demand_6 0.0 0.0 0 demand_7 0.0 0.0 0 demand_8 0.0 0.0 0 demand_9 0.0 0.0 0 demand_10 0.0 0.0 0 demand_11 0.0 0.0 0 demand_12 0.0 0.0 0 demand_13 0.0 0.0 0 demand_14 0.0 0.0 0 demand_15 0.0 0.0 0 demand_16 0.0 0.0 0 demand_17 0.0 0.0 0 demand_18 0.0 0.0 0 demand_19 0.0 0.0 0 demand_20 0.0 0.0 0 supply_1 99.6 98.0 1 supply_2 105.1 99.1 2 supply_3 103.8 99.1 3 supply_4 104.5 98.1 4 supply_5 98.7 110.8 5 supply_6 99.6 108.2 6 supply_7 102.0 105.6 7 supply_8 102.2 109.8 8 supply_9 94.6 108.7 9 supply_10 92.7 100.6 10 supply_11 92.4 81.0 11 supply_12 98.9 68.6 12 supply_13 102.2 70.9 13 supply_14 100.3 81.4 14 supply_15 97.6 102.3 15 supply_16 96.9 105.0 16 supply_17 87.7 110.5 17 supply_18 101.1 92.5 18 supply_19 106.1 89.3 19 supply_20 114.4 93.0 20 > model.matrix( fitw2sls5e$eq[[ 1 ]], which = "xHat" ) (Intercept) price income 1 1 99.6 87.4 2 1 105.1 97.6 3 1 103.8 96.7 4 1 104.5 98.2 5 1 98.7 99.8 6 1 99.6 100.5 7 1 102.0 103.2 8 1 102.2 107.8 9 1 94.6 96.6 10 1 92.7 88.9 11 1 92.4 75.1 12 1 98.9 76.9 13 1 102.2 84.6 14 1 100.3 90.6 15 1 97.6 103.1 16 1 96.9 105.1 17 1 87.7 96.4 18 1 101.1 104.4 19 1 106.1 110.7 20 1 114.4 127.1 > model.matrix( fitw2sls5e$eq[[ 2 ]], which = "xHat" ) (Intercept) price farmPrice trend 1 1 99.6 98.0 1 2 1 105.1 99.1 2 3 1 103.8 99.1 3 4 1 104.5 98.1 4 5 1 98.7 110.8 5 6 1 99.6 108.2 6 7 1 102.0 105.6 7 8 1 102.2 109.8 8 9 1 94.6 108.7 9 10 1 92.7 100.6 10 11 1 92.4 81.0 11 12 1 98.9 68.6 12 13 1 102.2 70.9 13 14 1 100.3 81.4 14 15 1 97.6 102.3 15 16 1 96.9 105.0 16 17 1 87.7 110.5 17 18 1 101.1 92.5 18 19 1 106.1 89.3 19 20 1 114.4 93.0 20 > > > ## **************** formulas ************************ > formula( fitw2sls1e ) $demand consump ~ price + income $supply consump ~ price + farmPrice + trend > formula( fitw2sls1e$eq[[ 1 ]] ) consump ~ price + income > > formula( fitw2sls2 ) $demand consump ~ price + income $supply consump ~ price + farmPrice + trend > formula( fitw2sls2$eq[[ 2 ]] ) consump ~ price + farmPrice + trend > > formula( fitw2sls3 ) $demand consump ~ price + income $supply consump ~ price + farmPrice + trend > formula( fitw2sls3$eq[[ 1 ]] ) consump ~ price + income > > formula( fitw2sls4e ) $demand consump ~ price + income $supply consump ~ price + farmPrice + trend > formula( fitw2sls4e$eq[[ 2 ]] ) consump ~ price + farmPrice + trend > > formula( fitw2sls5 ) $demand consump ~ price + income $supply consump ~ price + farmPrice + trend > formula( fitw2sls5$eq[[ 1 ]] ) consump ~ price + income > > formula( fitw2slsd1 ) $demand consump ~ price + income $supply consump ~ price + farmPrice + trend > formula( fitw2slsd1$eq[[ 2 ]] ) consump ~ price + farmPrice + trend > > formula( fitw2slsd2e ) $demand consump ~ price + income $supply consump ~ price + farmPrice + trend > formula( fitw2slsd2e$eq[[ 1 ]] ) consump ~ price + income > > formula( fitw2slsd3e ) $demand consump ~ price + income $supply consump ~ price + farmPrice + trend > formula( fitw2slsd3e$eq[[ 2 ]] ) consump ~ price + farmPrice + trend > > > ## **************** model terms ******************* > terms( fitw2sls1e ) $demand consump ~ price + income attr(,"variables") list(consump, price, income) attr(,"factors") price income consump 0 0 price 1 0 income 0 1 attr(,"term.labels") [1] "price" "income" attr(,"order") [1] 1 1 attr(,"intercept") [1] 1 attr(,"response") [1] 1 attr(,".Environment") attr(,"predvars") list(consump, price, income) attr(,"dataClasses") consump price income "numeric" "numeric" "numeric" $supply consump ~ price + farmPrice + trend attr(,"variables") list(consump, price, farmPrice, trend) attr(,"factors") price farmPrice trend consump 0 0 0 price 1 0 0 farmPrice 0 1 0 trend 0 0 1 attr(,"term.labels") [1] "price" "farmPrice" "trend" attr(,"order") [1] 1 1 1 attr(,"intercept") [1] 1 attr(,"response") [1] 1 attr(,".Environment") attr(,"predvars") list(consump, price, farmPrice, trend) attr(,"dataClasses") consump price farmPrice trend "numeric" "numeric" "numeric" "numeric" > terms( fitw2sls1e$eq[[ 1 ]] ) consump ~ price + income attr(,"variables") list(consump, price, income) attr(,"factors") price income consump 0 0 price 1 0 income 0 1 attr(,"term.labels") [1] "price" "income" attr(,"order") [1] 1 1 attr(,"intercept") [1] 1 attr(,"response") [1] 1 attr(,".Environment") attr(,"predvars") list(consump, price, income) attr(,"dataClasses") consump price income "numeric" "numeric" "numeric" > > terms( fitw2sls2 ) $demand consump ~ price + income attr(,"variables") list(consump, price, income) attr(,"factors") price income consump 0 0 price 1 0 income 0 1 attr(,"term.labels") [1] "price" "income" attr(,"order") [1] 1 1 attr(,"intercept") [1] 1 attr(,"response") [1] 1 attr(,".Environment") attr(,"predvars") list(consump, price, income) attr(,"dataClasses") consump price income "numeric" "numeric" "numeric" $supply consump ~ price + farmPrice + trend attr(,"variables") list(consump, price, farmPrice, trend) attr(,"factors") price farmPrice trend consump 0 0 0 price 1 0 0 farmPrice 0 1 0 trend 0 0 1 attr(,"term.labels") [1] "price" "farmPrice" "trend" attr(,"order") [1] 1 1 1 attr(,"intercept") [1] 1 attr(,"response") [1] 1 attr(,".Environment") attr(,"predvars") list(consump, price, farmPrice, trend) attr(,"dataClasses") consump price farmPrice trend "numeric" "numeric" "numeric" "numeric" > terms( fitw2sls2$eq[[ 2 ]] ) consump ~ price + farmPrice + trend attr(,"variables") list(consump, price, farmPrice, trend) attr(,"factors") price farmPrice trend consump 0 0 0 price 1 0 0 farmPrice 0 1 0 trend 0 0 1 attr(,"term.labels") [1] "price" "farmPrice" "trend" attr(,"order") [1] 1 1 1 attr(,"intercept") [1] 1 attr(,"response") [1] 1 attr(,".Environment") attr(,"predvars") list(consump, price, farmPrice, trend) attr(,"dataClasses") consump price farmPrice trend "numeric" "numeric" "numeric" "numeric" > > terms( fitw2sls3 ) $demand consump ~ price + income attr(,"variables") list(consump, price, income) attr(,"factors") price income consump 0 0 price 1 0 income 0 1 attr(,"term.labels") [1] "price" "income" attr(,"order") [1] 1 1 attr(,"intercept") [1] 1 attr(,"response") [1] 1 attr(,".Environment") attr(,"predvars") list(consump, price, income) attr(,"dataClasses") consump price income "numeric" "numeric" "numeric" $supply consump ~ price + farmPrice + trend attr(,"variables") list(consump, price, farmPrice, trend) attr(,"factors") price farmPrice trend consump 0 0 0 price 1 0 0 farmPrice 0 1 0 trend 0 0 1 attr(,"term.labels") [1] "price" "farmPrice" "trend" attr(,"order") [1] 1 1 1 attr(,"intercept") [1] 1 attr(,"response") [1] 1 attr(,".Environment") attr(,"predvars") list(consump, price, farmPrice, trend) attr(,"dataClasses") consump price farmPrice trend "numeric" "numeric" "numeric" "numeric" > terms( fitw2sls3$eq[[ 1 ]] ) consump ~ price + income attr(,"variables") list(consump, price, income) attr(,"factors") price income consump 0 0 price 1 0 income 0 1 attr(,"term.labels") [1] "price" "income" attr(,"order") [1] 1 1 attr(,"intercept") [1] 1 attr(,"response") [1] 1 attr(,".Environment") attr(,"predvars") list(consump, price, income) attr(,"dataClasses") consump price income "numeric" "numeric" "numeric" > > terms( fitw2sls4e ) $demand consump ~ price + income attr(,"variables") list(consump, price, income) attr(,"factors") price income consump 0 0 price 1 0 income 0 1 attr(,"term.labels") [1] "price" "income" attr(,"order") [1] 1 1 attr(,"intercept") [1] 1 attr(,"response") [1] 1 attr(,".Environment") attr(,"predvars") list(consump, price, income) attr(,"dataClasses") consump price income "numeric" "numeric" "numeric" $supply consump ~ price + farmPrice + trend attr(,"variables") list(consump, price, farmPrice, trend) attr(,"factors") price farmPrice trend consump 0 0 0 price 1 0 0 farmPrice 0 1 0 trend 0 0 1 attr(,"term.labels") [1] "price" "farmPrice" "trend" attr(,"order") [1] 1 1 1 attr(,"intercept") [1] 1 attr(,"response") [1] 1 attr(,".Environment") attr(,"predvars") list(consump, price, farmPrice, trend) attr(,"dataClasses") consump price farmPrice trend "numeric" "numeric" "numeric" "numeric" > terms( fitw2sls4e$eq[[ 2 ]] ) consump ~ price + farmPrice + trend attr(,"variables") list(consump, price, farmPrice, trend) attr(,"factors") price farmPrice trend consump 0 0 0 price 1 0 0 farmPrice 0 1 0 trend 0 0 1 attr(,"term.labels") [1] "price" "farmPrice" "trend" attr(,"order") [1] 1 1 1 attr(,"intercept") [1] 1 attr(,"response") [1] 1 attr(,".Environment") attr(,"predvars") list(consump, price, farmPrice, trend) attr(,"dataClasses") consump price farmPrice trend "numeric" "numeric" "numeric" "numeric" > > terms( fitw2sls5 ) $demand consump ~ price + income attr(,"variables") list(consump, price, income) attr(,"factors") price income consump 0 0 price 1 0 income 0 1 attr(,"term.labels") [1] "price" "income" attr(,"order") [1] 1 1 attr(,"intercept") [1] 1 attr(,"response") [1] 1 attr(,".Environment") attr(,"predvars") list(consump, price, income) attr(,"dataClasses") consump price income "numeric" "numeric" "numeric" $supply consump ~ price + farmPrice + trend attr(,"variables") list(consump, price, farmPrice, trend) attr(,"factors") price farmPrice trend consump 0 0 0 price 1 0 0 farmPrice 0 1 0 trend 0 0 1 attr(,"term.labels") [1] "price" "farmPrice" "trend" attr(,"order") [1] 1 1 1 attr(,"intercept") [1] 1 attr(,"response") [1] 1 attr(,".Environment") attr(,"predvars") list(consump, price, farmPrice, trend) attr(,"dataClasses") consump price farmPrice trend "numeric" "numeric" "numeric" "numeric" > terms( fitw2sls5$eq[[ 1 ]] ) consump ~ price + income attr(,"variables") list(consump, price, income) attr(,"factors") price income consump 0 0 price 1 0 income 0 1 attr(,"term.labels") [1] "price" "income" attr(,"order") [1] 1 1 attr(,"intercept") [1] 1 attr(,"response") [1] 1 attr(,".Environment") attr(,"predvars") list(consump, price, income) attr(,"dataClasses") consump price income "numeric" "numeric" "numeric" > > terms( fitw2slsd1 ) $demand consump ~ price + income attr(,"variables") list(consump, price, income) attr(,"factors") price income consump 0 0 price 1 0 income 0 1 attr(,"term.labels") [1] "price" "income" attr(,"order") [1] 1 1 attr(,"intercept") [1] 1 attr(,"response") [1] 1 attr(,".Environment") attr(,"predvars") list(consump, price, income) attr(,"dataClasses") consump price income "numeric" "numeric" "numeric" $supply consump ~ price + farmPrice + trend attr(,"variables") list(consump, price, farmPrice, trend) attr(,"factors") price farmPrice trend consump 0 0 0 price 1 0 0 farmPrice 0 1 0 trend 0 0 1 attr(,"term.labels") [1] "price" "farmPrice" "trend" attr(,"order") [1] 1 1 1 attr(,"intercept") [1] 1 attr(,"response") [1] 1 attr(,".Environment") attr(,"predvars") list(consump, price, farmPrice, trend) attr(,"dataClasses") consump price farmPrice trend "numeric" "numeric" "numeric" "numeric" > terms( fitw2slsd1$eq[[ 2 ]] ) consump ~ price + farmPrice + trend attr(,"variables") list(consump, price, farmPrice, trend) attr(,"factors") price farmPrice trend consump 0 0 0 price 1 0 0 farmPrice 0 1 0 trend 0 0 1 attr(,"term.labels") [1] "price" "farmPrice" "trend" attr(,"order") [1] 1 1 1 attr(,"intercept") [1] 1 attr(,"response") [1] 1 attr(,".Environment") attr(,"predvars") list(consump, price, farmPrice, trend) attr(,"dataClasses") consump price farmPrice trend "numeric" "numeric" "numeric" "numeric" > > terms( fitw2slsd2e ) $demand consump ~ price + income attr(,"variables") list(consump, price, income) attr(,"factors") price income consump 0 0 price 1 0 income 0 1 attr(,"term.labels") [1] "price" "income" attr(,"order") [1] 1 1 attr(,"intercept") [1] 1 attr(,"response") [1] 1 attr(,".Environment") attr(,"predvars") list(consump, price, income) attr(,"dataClasses") consump price income "numeric" "numeric" "numeric" $supply consump ~ price + farmPrice + trend attr(,"variables") list(consump, price, farmPrice, trend) attr(,"factors") price farmPrice trend consump 0 0 0 price 1 0 0 farmPrice 0 1 0 trend 0 0 1 attr(,"term.labels") [1] "price" "farmPrice" "trend" attr(,"order") [1] 1 1 1 attr(,"intercept") [1] 1 attr(,"response") [1] 1 attr(,".Environment") attr(,"predvars") list(consump, price, farmPrice, trend) attr(,"dataClasses") consump price farmPrice trend "numeric" "numeric" "numeric" "numeric" > terms( fitw2slsd2e$eq[[ 1 ]] ) consump ~ price + income attr(,"variables") list(consump, price, income) attr(,"factors") price income consump 0 0 price 1 0 income 0 1 attr(,"term.labels") [1] "price" "income" attr(,"order") [1] 1 1 attr(,"intercept") [1] 1 attr(,"response") [1] 1 attr(,".Environment") attr(,"predvars") list(consump, price, income) attr(,"dataClasses") consump price income "numeric" "numeric" "numeric" > > terms( fitw2slsd3e ) $demand consump ~ price + income attr(,"variables") list(consump, price, income) attr(,"factors") price income consump 0 0 price 1 0 income 0 1 attr(,"term.labels") [1] "price" "income" attr(,"order") [1] 1 1 attr(,"intercept") [1] 1 attr(,"response") [1] 1 attr(,".Environment") attr(,"predvars") list(consump, price, income) attr(,"dataClasses") consump price income "numeric" "numeric" "numeric" $supply consump ~ price + farmPrice + trend attr(,"variables") list(consump, price, farmPrice, trend) attr(,"factors") price farmPrice trend consump 0 0 0 price 1 0 0 farmPrice 0 1 0 trend 0 0 1 attr(,"term.labels") [1] "price" "farmPrice" "trend" attr(,"order") [1] 1 1 1 attr(,"intercept") [1] 1 attr(,"response") [1] 1 attr(,".Environment") attr(,"predvars") list(consump, price, farmPrice, trend) attr(,"dataClasses") consump price farmPrice trend "numeric" "numeric" "numeric" "numeric" > terms( fitw2slsd3e$eq[[ 2 ]] ) consump ~ price + farmPrice + trend attr(,"variables") list(consump, price, farmPrice, trend) attr(,"factors") price farmPrice trend consump 0 0 0 price 1 0 0 farmPrice 0 1 0 trend 0 0 1 attr(,"term.labels") [1] "price" "farmPrice" "trend" attr(,"order") [1] 1 1 1 attr(,"intercept") [1] 1 attr(,"response") [1] 1 attr(,".Environment") attr(,"predvars") list(consump, price, farmPrice, trend) attr(,"dataClasses") consump price farmPrice trend "numeric" "numeric" "numeric" "numeric" > > > ## **************** terms of instruments ******************* > fitw2sls1e$eq[[ 1 ]]$termsInst ~income + farmPrice + trend attr(,"variables") list(income, farmPrice, trend) attr(,"factors") income farmPrice trend income 1 0 0 farmPrice 0 1 0 trend 0 0 1 attr(,"term.labels") [1] "income" "farmPrice" "trend" attr(,"order") [1] 1 1 1 attr(,"intercept") [1] 1 attr(,"response") [1] 0 attr(,".Environment") attr(,"predvars") list(income, farmPrice, trend) attr(,"dataClasses") income farmPrice trend "numeric" "numeric" "numeric" > > fitw2sls2$eq[[ 2 ]]$termsInst ~income + farmPrice + trend attr(,"variables") list(income, farmPrice, trend) attr(,"factors") income farmPrice trend income 1 0 0 farmPrice 0 1 0 trend 0 0 1 attr(,"term.labels") [1] "income" "farmPrice" "trend" attr(,"order") [1] 1 1 1 attr(,"intercept") [1] 1 attr(,"response") [1] 0 attr(,".Environment") attr(,"predvars") list(income, farmPrice, trend) attr(,"dataClasses") income farmPrice trend "numeric" "numeric" "numeric" > > fitw2sls3$eq[[ 1 ]]$termsInst ~income + farmPrice + trend attr(,"variables") list(income, farmPrice, trend) attr(,"factors") income farmPrice trend income 1 0 0 farmPrice 0 1 0 trend 0 0 1 attr(,"term.labels") [1] "income" "farmPrice" "trend" attr(,"order") [1] 1 1 1 attr(,"intercept") [1] 1 attr(,"response") [1] 0 attr(,".Environment") attr(,"predvars") list(income, farmPrice, trend) attr(,"dataClasses") income farmPrice trend "numeric" "numeric" "numeric" > > fitw2sls4e$eq[[ 2 ]]$termsInst ~income + farmPrice + trend attr(,"variables") list(income, farmPrice, trend) attr(,"factors") income farmPrice trend income 1 0 0 farmPrice 0 1 0 trend 0 0 1 attr(,"term.labels") [1] "income" "farmPrice" "trend" attr(,"order") [1] 1 1 1 attr(,"intercept") [1] 1 attr(,"response") [1] 0 attr(,".Environment") attr(,"predvars") list(income, farmPrice, trend) attr(,"dataClasses") income farmPrice trend "numeric" "numeric" "numeric" > > fitw2sls5$eq[[ 1 ]]$termsInst ~income + farmPrice + trend attr(,"variables") list(income, farmPrice, trend) attr(,"factors") income farmPrice trend income 1 0 0 farmPrice 0 1 0 trend 0 0 1 attr(,"term.labels") [1] "income" "farmPrice" "trend" attr(,"order") [1] 1 1 1 attr(,"intercept") [1] 1 attr(,"response") [1] 0 attr(,".Environment") attr(,"predvars") list(income, farmPrice, trend) attr(,"dataClasses") income farmPrice trend "numeric" "numeric" "numeric" > > fitw2slsd1$eq[[ 2 ]]$termsInst ~income + farmPrice + trend attr(,"variables") list(income, farmPrice, trend) attr(,"factors") income farmPrice trend income 1 0 0 farmPrice 0 1 0 trend 0 0 1 attr(,"term.labels") [1] "income" "farmPrice" "trend" attr(,"order") [1] 1 1 1 attr(,"intercept") [1] 1 attr(,"response") [1] 0 attr(,".Environment") attr(,"predvars") list(income, farmPrice, trend) attr(,"dataClasses") income farmPrice trend "numeric" "numeric" "numeric" > > fitw2slsd2e$eq[[ 1 ]]$termsInst ~income + farmPrice attr(,"variables") list(income, farmPrice) attr(,"factors") income farmPrice income 1 0 farmPrice 0 1 attr(,"term.labels") [1] "income" "farmPrice" attr(,"order") [1] 1 1 attr(,"intercept") [1] 1 attr(,"response") [1] 0 attr(,".Environment") attr(,"predvars") list(income, farmPrice) attr(,"dataClasses") income farmPrice "numeric" "numeric" > > fitw2slsd3e$eq[[ 2 ]]$termsInst ~income + farmPrice + trend attr(,"variables") list(income, farmPrice, trend) attr(,"factors") income farmPrice trend income 1 0 0 farmPrice 0 1 0 trend 0 0 1 attr(,"term.labels") [1] "income" "farmPrice" "trend" attr(,"order") [1] 1 1 1 attr(,"intercept") [1] 1 attr(,"response") [1] 0 attr(,".Environment") attr(,"predvars") list(income, farmPrice, trend) attr(,"dataClasses") income farmPrice trend "numeric" "numeric" "numeric" > > > ## **************** estfun ************************ > library( "sandwich" ) > > estfun( fitw2sls1 ) demand_(Intercept) demand_price demand_income supply_(Intercept) demand_1 0.17426 17.362 15.231 0.0000 demand_2 -0.12666 -13.314 -12.362 0.0000 demand_3 0.63211 65.603 61.125 0.0000 demand_4 0.38686 40.439 37.990 0.0000 demand_5 0.59421 58.619 59.302 0.0000 demand_6 0.34231 34.111 34.403 0.0000 demand_7 0.46340 47.253 47.822 0.0000 demand_8 -0.95225 -97.353 -102.653 0.0000 demand_9 -0.40681 -38.486 -39.297 0.0000 demand_10 0.73846 68.469 65.649 0.0000 demand_11 -0.07078 -6.540 -5.315 0.0000 demand_12 -0.58541 -57.907 -45.018 0.0000 demand_13 -0.46025 -47.020 -38.937 0.0000 demand_14 0.02562 2.569 2.322 0.0000 demand_15 0.66403 64.824 68.462 0.0000 demand_16 -0.98546 -95.483 -103.572 0.0000 demand_17 -0.00533 -0.468 -0.514 0.0000 demand_18 -0.74266 -75.053 -77.534 0.0000 demand_19 0.43017 45.625 47.620 0.0000 demand_20 -0.11583 -13.250 -14.722 0.0000 supply_1 0.00000 0.000 0.000 -0.0444 supply_2 0.00000 0.000 0.000 -0.2348 supply_3 0.00000 0.000 0.000 0.2691 supply_4 0.00000 0.000 0.000 0.1308 supply_5 0.00000 0.000 0.000 0.2381 supply_6 0.00000 0.000 0.000 0.1015 supply_7 0.00000 0.000 0.000 0.2015 supply_8 0.00000 0.000 0.000 -0.7062 supply_9 0.00000 0.000 0.000 -0.3238 supply_10 0.00000 0.000 0.000 0.4611 supply_11 0.00000 0.000 0.000 0.0385 supply_12 0.00000 0.000 0.000 -0.2360 supply_13 0.00000 0.000 0.000 -0.1548 supply_14 0.00000 0.000 0.000 0.1330 supply_15 0.00000 0.000 0.000 0.4778 supply_16 0.00000 0.000 0.000 -0.5719 supply_17 0.00000 0.000 0.000 0.0648 supply_18 0.00000 0.000 0.000 -0.3413 supply_19 0.00000 0.000 0.000 0.4299 supply_20 0.00000 0.000 0.000 0.0672 supply_price supply_farmPrice supply_trend demand_1 0.00 0.00 0.0000 demand_2 0.00 0.00 0.0000 demand_3 0.00 0.00 0.0000 demand_4 0.00 0.00 0.0000 demand_5 0.00 0.00 0.0000 demand_6 0.00 0.00 0.0000 demand_7 0.00 0.00 0.0000 demand_8 0.00 0.00 0.0000 demand_9 0.00 0.00 0.0000 demand_10 0.00 0.00 0.0000 demand_11 0.00 0.00 0.0000 demand_12 0.00 0.00 0.0000 demand_13 0.00 0.00 0.0000 demand_14 0.00 0.00 0.0000 demand_15 0.00 0.00 0.0000 demand_16 0.00 0.00 0.0000 demand_17 0.00 0.00 0.0000 demand_18 0.00 0.00 0.0000 demand_19 0.00 0.00 0.0000 demand_20 0.00 0.00 0.0000 supply_1 -4.42 -4.35 -0.0444 supply_2 -24.68 -23.27 -0.4696 supply_3 27.93 26.67 0.8073 supply_4 13.67 12.83 0.5230 supply_5 23.49 26.38 1.1905 supply_6 10.12 10.99 0.6093 supply_7 20.55 21.28 1.4107 supply_8 -72.20 -77.54 -5.6498 supply_9 -30.64 -35.20 -2.9145 supply_10 42.75 46.39 4.6109 supply_11 3.56 3.12 0.4235 supply_12 -23.35 -16.19 -2.8326 supply_13 -15.81 -10.97 -2.0121 supply_14 13.34 10.83 1.8621 supply_15 46.64 48.88 7.1671 supply_16 -55.42 -60.05 -9.1508 supply_17 5.68 7.16 1.1011 supply_18 -34.49 -31.57 -6.1438 supply_19 45.59 38.39 8.1674 supply_20 7.69 6.25 1.3448 > round( colSums( estfun( fitw2sls1 ) ), digits = 7 ) demand_(Intercept) demand_price demand_income supply_(Intercept) 0 0 0 0 supply_price supply_farmPrice supply_trend 0 0 0 > > estfun( fitw2sls1e ) demand_(Intercept) demand_price demand_income supply_(Intercept) demand_1 0.20502 20.43 17.918 0.0000 demand_2 -0.14901 -15.66 -14.543 0.0000 demand_3 0.74366 77.18 71.912 0.0000 demand_4 0.45513 47.57 44.694 0.0000 demand_5 0.69907 68.96 69.767 0.0000 demand_6 0.40272 40.13 40.474 0.0000 demand_7 0.54517 55.59 56.262 0.0000 demand_8 -1.12030 -114.53 -120.768 0.0000 demand_9 -0.47860 -45.28 -46.232 0.0000 demand_10 0.86877 80.55 77.234 0.0000 demand_11 -0.08327 -7.69 -6.253 0.0000 demand_12 -0.68871 -68.13 -52.962 0.0000 demand_13 -0.54147 -55.32 -45.808 0.0000 demand_14 0.03015 3.02 2.731 0.0000 demand_15 0.78121 76.26 80.543 0.0000 demand_16 -1.15937 -112.33 -121.850 0.0000 demand_17 -0.00627 -0.55 -0.605 0.0000 demand_18 -0.87372 -88.30 -91.217 0.0000 demand_19 0.50608 53.68 56.023 0.0000 demand_20 -0.13627 -15.59 -17.320 0.0000 supply_1 0.00000 0.00 0.000 -0.0554 supply_2 0.00000 0.00 0.000 -0.2935 supply_3 0.00000 0.00 0.000 0.3364 supply_4 0.00000 0.00 0.000 0.1634 supply_5 0.00000 0.00 0.000 0.2976 supply_6 0.00000 0.00 0.000 0.1269 supply_7 0.00000 0.00 0.000 0.2519 supply_8 0.00000 0.00 0.000 -0.8828 supply_9 0.00000 0.00 0.000 -0.4048 supply_10 0.00000 0.00 0.000 0.5764 supply_11 0.00000 0.00 0.000 0.0481 supply_12 0.00000 0.00 0.000 -0.2951 supply_13 0.00000 0.00 0.000 -0.1935 supply_14 0.00000 0.00 0.000 0.1663 supply_15 0.00000 0.00 0.000 0.5973 supply_16 0.00000 0.00 0.000 -0.7149 supply_17 0.00000 0.00 0.000 0.0810 supply_18 0.00000 0.00 0.000 -0.4267 supply_19 0.00000 0.00 0.000 0.5373 supply_20 0.00000 0.00 0.000 0.0841 supply_price supply_farmPrice supply_trend demand_1 0.00 0.00 0.0000 demand_2 0.00 0.00 0.0000 demand_3 0.00 0.00 0.0000 demand_4 0.00 0.00 0.0000 demand_5 0.00 0.00 0.0000 demand_6 0.00 0.00 0.0000 demand_7 0.00 0.00 0.0000 demand_8 0.00 0.00 0.0000 demand_9 0.00 0.00 0.0000 demand_10 0.00 0.00 0.0000 demand_11 0.00 0.00 0.0000 demand_12 0.00 0.00 0.0000 demand_13 0.00 0.00 0.0000 demand_14 0.00 0.00 0.0000 demand_15 0.00 0.00 0.0000 demand_16 0.00 0.00 0.0000 demand_17 0.00 0.00 0.0000 demand_18 0.00 0.00 0.0000 demand_19 0.00 0.00 0.0000 demand_20 0.00 0.00 0.0000 supply_1 -5.52 -5.43 -0.0554 supply_2 -30.85 -29.09 -0.5870 supply_3 34.91 33.33 1.0091 supply_4 17.09 16.03 0.6538 supply_5 29.36 32.98 1.4882 supply_6 12.65 13.73 0.7616 supply_7 25.69 26.60 1.7633 supply_8 -90.25 -96.93 -7.0623 supply_9 -38.30 -44.00 -3.6431 supply_10 53.44 57.98 5.7636 supply_11 4.45 3.90 0.5294 supply_12 -29.19 -20.24 -3.5407 supply_13 -19.77 -13.72 -2.5151 supply_14 16.67 13.53 2.3277 supply_15 58.30 61.10 8.9588 supply_16 -69.27 -75.07 -11.4386 supply_17 7.10 8.95 1.3763 supply_18 -43.12 -39.47 -7.6797 supply_19 56.99 47.98 10.2092 supply_20 9.62 7.82 1.6810 > round( colSums( estfun( fitw2sls1e ) ), digits = 7 ) demand_(Intercept) demand_price demand_income supply_(Intercept) 0 0 0 0 supply_price supply_farmPrice supply_trend 0 0 0 > > estfun( fitw2slsd1e ) demand_(Intercept) demand_price demand_income supply_(Intercept) demand_1 -0.2141 -20.39 -18.71 0.0000 demand_2 -0.5971 -59.32 -58.28 0.0000 demand_3 0.3342 33.06 32.31 0.0000 demand_4 0.0923 9.21 9.06 0.0000 demand_5 0.3748 36.34 37.40 0.0000 demand_6 0.1317 12.91 13.23 0.0000 demand_7 0.2982 29.80 30.78 0.0000 demand_8 -1.3110 -132.05 -141.32 0.0000 demand_9 -0.5322 -51.18 -51.41 0.0000 demand_10 0.8995 85.57 79.97 0.0000 demand_11 0.1399 13.25 10.51 0.0000 demand_12 -0.4189 -41.49 -32.21 0.0000 demand_13 -0.2903 -29.54 -24.56 0.0000 demand_14 0.2709 27.46 24.55 0.0000 demand_15 0.9535 96.13 98.30 0.0000 demand_16 -0.9012 -90.95 -94.71 0.0000 demand_17 0.3566 34.08 34.37 0.0000 demand_18 -0.5159 -53.75 -53.86 0.0000 demand_19 0.8239 88.84 91.20 0.0000 demand_20 0.1054 12.00 13.39 0.0000 supply_1 0.0000 0.00 0.00 -0.0554 supply_2 0.0000 0.00 0.00 -0.2935 supply_3 0.0000 0.00 0.00 0.3364 supply_4 0.0000 0.00 0.00 0.1634 supply_5 0.0000 0.00 0.00 0.2976 supply_6 0.0000 0.00 0.00 0.1269 supply_7 0.0000 0.00 0.00 0.2519 supply_8 0.0000 0.00 0.00 -0.8828 supply_9 0.0000 0.00 0.00 -0.4048 supply_10 0.0000 0.00 0.00 0.5764 supply_11 0.0000 0.00 0.00 0.0481 supply_12 0.0000 0.00 0.00 -0.2951 supply_13 0.0000 0.00 0.00 -0.1935 supply_14 0.0000 0.00 0.00 0.1663 supply_15 0.0000 0.00 0.00 0.5973 supply_16 0.0000 0.00 0.00 -0.7149 supply_17 0.0000 0.00 0.00 0.0810 supply_18 0.0000 0.00 0.00 -0.4267 supply_19 0.0000 0.00 0.00 0.5373 supply_20 0.0000 0.00 0.00 0.0841 supply_price supply_farmPrice supply_trend demand_1 0.00 0.00 0.0000 demand_2 0.00 0.00 0.0000 demand_3 0.00 0.00 0.0000 demand_4 0.00 0.00 0.0000 demand_5 0.00 0.00 0.0000 demand_6 0.00 0.00 0.0000 demand_7 0.00 0.00 0.0000 demand_8 0.00 0.00 0.0000 demand_9 0.00 0.00 0.0000 demand_10 0.00 0.00 0.0000 demand_11 0.00 0.00 0.0000 demand_12 0.00 0.00 0.0000 demand_13 0.00 0.00 0.0000 demand_14 0.00 0.00 0.0000 demand_15 0.00 0.00 0.0000 demand_16 0.00 0.00 0.0000 demand_17 0.00 0.00 0.0000 demand_18 0.00 0.00 0.0000 demand_19 0.00 0.00 0.0000 demand_20 0.00 0.00 0.0000 supply_1 -5.52 -5.43 -0.0554 supply_2 -30.85 -29.09 -0.5870 supply_3 34.91 33.33 1.0091 supply_4 17.09 16.03 0.6538 supply_5 29.36 32.98 1.4882 supply_6 12.65 13.73 0.7616 supply_7 25.69 26.60 1.7633 supply_8 -90.25 -96.93 -7.0623 supply_9 -38.30 -44.00 -3.6431 supply_10 53.44 57.98 5.7636 supply_11 4.45 3.90 0.5294 supply_12 -29.19 -20.24 -3.5407 supply_13 -19.77 -13.72 -2.5151 supply_14 16.67 13.53 2.3277 supply_15 58.30 61.10 8.9588 supply_16 -69.27 -75.07 -11.4386 supply_17 7.10 8.95 1.3763 supply_18 -43.12 -39.47 -7.6797 supply_19 56.99 47.98 10.2092 supply_20 9.62 7.82 1.6810 > round( colSums( estfun( fitw2slsd1e ) ), digits = 7 ) demand_(Intercept) demand_price demand_income supply_(Intercept) 0 0 0 0 supply_price supply_farmPrice supply_trend 0 0 0 > > > ## **************** bread ************************ > bread( fitw2sls1 ) demand_(Intercept) demand_price demand_income supply_(Intercept) [1,] 2509.59 -26.937 1.9721 0.0 [2,] -26.94 0.372 -0.1057 0.0 [3,] 1.97 -0.106 0.0881 0.0 [4,] 0.00 0.000 0.0000 5770.1 [5,] 0.00 0.000 0.0000 -43.8 [6,] 0.00 0.000 0.0000 -13.0 [7,] 0.00 0.000 0.0000 -11.8 supply_price supply_farmPrice supply_trend [1,] 0.0000 0.0000 0.0000 [2,] 0.0000 0.0000 0.0000 [3,] 0.0000 0.0000 0.0000 [4,] -43.8164 -12.9527 -11.8092 [5,] 0.3995 0.0374 0.0232 [6,] 0.0374 0.0893 0.0551 [7,] 0.0232 0.0551 0.3972 > > bread( fitw2sls1e ) demand_(Intercept) demand_price demand_income supply_(Intercept) [1,] 2133.15 -22.8963 1.6763 0.00 [2,] -22.90 0.3165 -0.0898 0.00 [3,] 1.68 -0.0898 0.0749 0.00 [4,] 0.00 0.0000 0.0000 4616.09 [5,] 0.00 0.0000 0.0000 -35.05 [6,] 0.00 0.0000 0.0000 -10.36 [7,] 0.00 0.0000 0.0000 -9.45 supply_price supply_farmPrice supply_trend [1,] 0.0000 0.0000 0.0000 [2,] 0.0000 0.0000 0.0000 [3,] 0.0000 0.0000 0.0000 [4,] -35.0531 -10.3622 -9.4473 [5,] 0.3196 0.0300 0.0185 [6,] 0.0300 0.0714 0.0441 [7,] 0.0185 0.0441 0.3178 > > bread( fitw2slsd1e ) demand_(Intercept) demand_price demand_income supply_(Intercept) [1,] 4222.1 -51.601 9.696 0.00 [2,] -51.6 0.713 -0.202 0.00 [3,] 9.7 -0.202 0.108 0.00 [4,] 0.0 0.000 0.000 4616.09 [5,] 0.0 0.000 0.000 -35.05 [6,] 0.0 0.000 0.000 -10.36 [7,] 0.0 0.000 0.000 -9.45 supply_price supply_farmPrice supply_trend [1,] 0.0000 0.0000 0.0000 [2,] 0.0000 0.0000 0.0000 [3,] 0.0000 0.0000 0.0000 [4,] -35.0531 -10.3622 -9.4473 [5,] 0.3196 0.0300 0.0185 [6,] 0.0300 0.0714 0.0441 [7,] 0.0185 0.0441 0.3178 > > proc.time() user system elapsed 2.188 0.068 2.250 systemfit/tests/test_3sls.R0000644000176200001440000015103414305177525015526 0ustar liggesuserslibrary( systemfit ) options( digits = 3 ) data( "Kmenta" ) useMatrix <- FALSE demand <- consump ~ price + income supply <- consump ~ price + farmPrice + trend inst <- ~ income + farmPrice + trend inst1 <- ~ income + farmPrice instlist <- list( inst1, inst ) system <- list( demand = demand, supply = supply ) restrm <- matrix(0,1,7) # restriction matrix "R" restrm[1,3] <- 1 restrm[1,7] <- -1 restrict <- "demand_income - supply_trend = 0" restr2m <- matrix(0,2,7) # restriction matrix "R" 2 restr2m[1,3] <- 1 restr2m[1,7] <- -1 restr2m[2,2] <- -1 restr2m[2,5] <- 1 restr2q <- c( 0, 0.5 ) # restriction vector "q" 2 restrict2 <- c( "demand_income - supply_trend = 0", "- demand_price + supply_price = 0.5" ) tc <- matrix(0,7,6) tc[1,1] <- 1 tc[2,2] <- 1 tc[3,3] <- 1 tc[4,4] <- 1 tc[5,5] <- 1 tc[6,6] <- 1 tc[7,3] <- 1 restr3m <- matrix(0,1,6) # restriction matrix "R" 2 restr3m[1,2] <- -1 restr3m[1,5] <- 1 restr3q <- c( 0.5 ) # restriction vector "q" 2 restrict3 <- "- C2 + C5 = 0.5" ## *************** 3SLS estimation ************************ fit3sls <- list() formulas <- c( "GLS", "IV", "Schmidt", "GMM", "EViews" ) for( i in seq( along = formulas ) ) { fit3sls[[ i ]] <- list() print( "***************************************************" ) print( paste( "3SLS formula:", formulas[ i ] ) ) print( "************* 3SLS *********************************" ) fit3sls[[ i ]]$e1 <- systemfit( system, "3SLS", data = Kmenta, inst = inst, method3sls = formulas[ i ], useMatrix = useMatrix ) print( summary( fit3sls[[ i ]]$e1 ) ) print( "********************* 3SLS EViews-like *****************" ) fit3sls[[ i ]]$e1e <- systemfit( system, "3SLS", data = Kmenta, inst = inst, methodResidCov = "noDfCor", method3sls = formulas[ i ], useMatrix = useMatrix ) print( summary( fit3sls[[ i ]]$e1e, useDfSys = TRUE ) ) print( "********************* 3SLS with methodResidCov = Theil *****************" ) fit3sls[[ i ]]$e1c <- systemfit( system, "3SLS", data = Kmenta, inst = inst, methodResidCov = "Theil", method3sls = formulas[ i ], x = TRUE, useMatrix = useMatrix ) print( summary( fit3sls[[ i ]]$e1c, useDfSys = TRUE ) ) print( "*************** W3SLS with methodResidCov = Theil *****************" ) fit3sls[[ i ]]$e1wc <- systemfit( system, "3SLS", data = Kmenta, inst = inst, methodResidCov = "Theil", method3sls = formulas[ i ], residCovWeighted = TRUE, useMatrix = useMatrix ) print( summary( fit3sls[[ i ]]$e1wc, useDfSys = TRUE ) ) print( "*************** 3SLS with restriction *****************" ) fit3sls[[ i ]]$e2 <- systemfit( system, "3SLS", data = Kmenta, inst = inst, restrict.matrix = restrm, method3sls = formulas[ i ], x = TRUE, useMatrix = useMatrix ) print( summary( fit3sls[[ i ]]$e2 ) ) # the same with symbolically specified restrictions fit3sls[[ i ]]$e2Sym <- systemfit( system, "3SLS", data = Kmenta, inst = inst, restrict.matrix = restrict, method3sls = formulas[ i ], x = TRUE, useMatrix = useMatrix ) print( all.equal( fit3sls[[ i ]]$e2, fit3sls[[ i ]]$e2Sym ) ) print( "************** 3SLS with restriction (EViews-like) *****************" ) fit3sls[[ i ]]$e2e <- systemfit( system, "3SLS", data = Kmenta, inst = inst, methodResidCov = "noDfCor", restrict.matrix = restrm, method3sls = formulas[ i ], useMatrix = useMatrix ) print( summary( fit3sls[[ i ]]$e2e, useDfSys = TRUE ) ) print( nobs( fit3sls[[i]]$e2e )) print( "*************** W3SLS with restriction *****************" ) fit3sls[[ i ]]$e2w <- systemfit( system, "3SLS", data = Kmenta, inst = inst, restrict.matrix = restrm, method3sls = formulas[ i ], residCovWeighted = TRUE, useMatrix = useMatrix ) print( summary( fit3sls[[ i ]]$e2w ) ) print( "*************** 3SLS with restriction via restrict.regMat ********************" ) fit3sls[[ i ]]$e3 <- systemfit( system, "3SLS", data = Kmenta, inst = inst, restrict.regMat = tc, method3sls = formulas[ i ], useMatrix = useMatrix ) print( summary( fit3sls[[ i ]]$e3 ) ) print( "*************** 3SLS with restriction via restrict.regMat (EViews-like) *******" ) fit3sls[[ i ]]$e3e <- systemfit( system, "3SLS", data = Kmenta, inst = inst, methodResidCov = "noDfCor", restrict.regMat = tc, method3sls = formulas[ i ], x = TRUE, useMatrix = useMatrix ) print( summary( fit3sls[[ i ]]$e3e, useDfSys = TRUE ) ) print( "**** W3SLS with restriction via restrict.regMat (EViews-like) ****" ) fit3sls[[ i ]]$e3we <- systemfit( system, "3SLS", data = Kmenta, inst = inst, methodResidCov = "noDfCor", restrict.regMat = tc, method3sls = formulas[ i ], residCovWeighted = TRUE, useMatrix = useMatrix ) print( summary( fit3sls[[ i ]]$e3we, useDfSys = TRUE ) ) print( "*************** 3SLS with 2 restrictions **********************" ) fit3sls[[ i ]]$e4 <- systemfit( system, "3SLS", data = Kmenta, inst = inst, restrict.matrix = restr2m, restrict.rhs = restr2q, method3sls = formulas[ i ], x = TRUE, useMatrix = useMatrix ) print( summary( fit3sls[[ i ]]$e4 ) ) # the same with symbolically specified restrictions fit3sls[[ i ]]$e4Sym <- systemfit( system, "3SLS", data = Kmenta, inst = inst, restrict.matrix = restrict2, method3sls = formulas[ i ], x = TRUE, useMatrix = useMatrix ) print( all.equal( fit3sls[[ i ]]$e4, fit3sls[[ i ]]$e4Sym ) ) print( "*************** 3SLS with 2 restrictions (EViews-like) ************" ) fit3sls[[ i ]]$e4e <- systemfit( system, "3SLS", data = Kmenta, inst = inst, methodResidCov = "noDfCor", restrict.matrix = restr2m, restrict.rhs = restr2q, method3sls = formulas[ i ], useMatrix = useMatrix ) print( summary( fit3sls[[ i ]]$e4e, useDfSys = TRUE ) ) print( "********** W3SLS with 2 (symbolic) restrictions ***************" ) fit3sls[[ i ]]$e4wSym <- systemfit( system, "3SLS", data = Kmenta, inst = inst, restrict.matrix = restrict2, method3sls = formulas[ i ], residCovWeighted = TRUE, useMatrix = useMatrix ) print( summary( fit3sls[[ i ]]$e4wSym ) ) print( "*************** 3SLS with 2 restrictions via R and restrict.regMat **********" ) fit3sls[[ i ]]$e5 <- systemfit( system, "3SLS", data = Kmenta, inst = inst, restrict.regMat = tc, restrict.matrix = restr3m, restrict.rhs = restr3q, method3sls = formulas[ i ], useMatrix = useMatrix ) print( summary( fit3sls[[ i ]]$e5 ) ) # the same with symbolically specified restrictions fit3sls[[ i ]]$e5Sym <- systemfit( system, "3SLS", data = Kmenta, inst = inst, restrict.regMat = tc, restrict.matrix = restrict3, method3sls = formulas[ i ], useMatrix = useMatrix ) print( all.equal( fit3sls[[ i ]]$e5, fit3sls[[ i ]]$e5Sym ) ) print( "******** 3SLS with 2 restrictions via R and restrict.regMat (EViews-like)*****" ) fit3sls[[ i ]]$e5e <- systemfit( system, "3SLS", data = Kmenta, inst = inst, restrict.regMat = tc, methodResidCov = "noDfCor", restrict.matrix = restr3m, restrict.rhs = restr3q, method3sls = formulas[ i ], x = TRUE, useMatrix = useMatrix ) print( summary( fit3sls[[ i ]]$e5e, useDfSys = TRUE ) ) print( "*** W3SLS with 2 restrictions via R and restrict.regMat (EViews-like) ***" ) fit3sls[[ i ]]$e5we <- systemfit( system, "3SLS", data = Kmenta, inst = inst, restrict.regMat = tc, methodResidCov = "noDfCor", restrict.matrix = restr3m, restrict.rhs = restr3q, method3sls = formulas[ i ], residCovWeighted = TRUE, useMatrix = useMatrix ) print( summary( fit3sls[[ i ]]$e5we, useDfSys = TRUE ) ) ## *********** estimations with a single regressor ************ fit3sls[[ i ]]$S1 <- systemfit( list( farmPrice ~ consump - 1, price ~ consump + trend ), "3SLS", data = Kmenta, inst = ~ trend + income, useMatrix = useMatrix ) print( summary( fit3sls[[ i ]]$S1 ) ) fit3sls[[ i ]]$S2 <- systemfit( list( consump ~ farmPrice - 1, consump ~ trend - 1 ), "3SLS", data = Kmenta, inst = ~ price + income, useMatrix = useMatrix ) print( summary( fit3sls[[ i ]]$S2 ) ) fit3sls[[ i ]]$S3 <- systemfit( list( consump ~ trend - 1, farmPrice ~ trend - 1 ), "3SLS", data = Kmenta, inst = instlist, useMatrix = useMatrix ) print( summary( fit3sls[[ i ]]$S3 ) ) fit3sls[[ i ]]$S4 <- systemfit( list( consump ~ farmPrice - 1, price ~ trend - 1 ), "3SLS", data = Kmenta, inst = ~ farmPrice + trend + income, restrict.matrix = matrix( c( 1, -1 ), nrow = 1 ), useMatrix = useMatrix ) print( summary( fit3sls[[ i ]]$S4 ) ) fit3sls[[ i ]]$S5 <- systemfit( list( consump ~ 1, price ~ 1 ), "3SLS", data = Kmenta, inst = ~ income, useMatrix = useMatrix ) print( summary( fit3sls[[ i ]]$S5 ) ) } ## ******************** iterated 3SLS ********************** fit3slsi <- list() formulas <- c( "GLS", "IV", "Schmidt", "GMM", "EViews" ) for( i in seq( along = formulas ) ) { fit3slsi[[ i ]] <- list() print( "***************************************************" ) print( paste( "3SLS formula:", formulas[ i ] ) ) print( "************* 3SLS *********************************" ) fit3slsi[[ i ]]$e1 <- systemfit( system, "3SLS", data = Kmenta, inst = inst, method3sls = formulas[ i ], maxiter = 100, useMatrix = useMatrix ) print( summary( fit3slsi[[ i ]]$e1 ) ) print( "********************* iterated 3SLS EViews-like ****************" ) fit3slsi[[ i ]]$e1e <- systemfit( system, "3SLS", data = Kmenta, inst = inst, methodResidCov = "noDfCor", method3sls = formulas[ i ], maxiter = 100, useMatrix = useMatrix ) print( summary( fit3slsi[[ i ]]$e1e, useDfSys = TRUE ) ) print( "************** iterated 3SLS with methodResidCov = Theil **************" ) fit3slsi[[ i ]]$e1c <- systemfit( system, "3SLS", data = Kmenta, inst = inst, methodResidCov = "Theil", method3sls = formulas[ i ], maxiter = 100, x = TRUE, useMatrix = useMatrix ) print( summary( fit3slsi[[ i ]]$e1c, useDfSys = TRUE ) ) print( "**************** iterated W3SLS EViews-like ****************" ) fit3slsi[[ i ]]$e1we <- systemfit( system, "3SLS", data = Kmenta, inst = inst, methodResidCov = "noDfCor", method3sls = formulas[ i ], maxiter = 100, residCovWeighted = TRUE, useMatrix = useMatrix ) print( summary( fit3slsi[[ i ]]$e1we, useDfSys = TRUE ) ) print( "******* iterated 3SLS with restriction *****************" ) fit3slsi[[ i ]]$e2 <- systemfit( system, "3SLS", data = Kmenta, inst = inst, restrict.matrix = restrm, method3sls = formulas[ i ], maxiter = 100, x = TRUE, useMatrix = useMatrix ) print( summary( fit3slsi[[ i ]]$e2 ) ) print( "********* iterated 3SLS with restriction (EViews-like) *********" ) fit3slsi[[ i ]]$e2e <- systemfit( system, "3SLS", data = Kmenta, inst = inst, methodResidCov = "noDfCor", restrict.matrix = restrm, method3sls = formulas[ i ], maxiter = 100, useMatrix = useMatrix ) print( summary( fit3slsi[[ i ]]$e2e, useDfSys = TRUE ) ) print( "******** iterated W3SLS with restriction (EViews-like) *********" ) fit3slsi[[ i ]]$e2we <- systemfit( system, "3SLS", data = Kmenta, inst = inst, methodResidCov = "noDfCor", restrict.matrix = restrm, method3sls = formulas[ i ], maxiter = 100, residCovWeighted = TRUE, useMatrix = useMatrix ) print( summary( fit3slsi[[ i ]]$e2we, useDfSys = TRUE ) ) print( "********* iterated 3SLS with restriction via restrict.regMat *****************" ) fit3slsi[[ i ]]$e3 <- systemfit( system, "3SLS", data = Kmenta, inst = inst, restrict.regMat = tc, method3sls = formulas[ i ], maxiter = 100, useMatrix = useMatrix ) print( summary( fit3slsi[[ i ]]$e3 ) ) print( "********* iterated 3SLS with restriction via restrict.regMat (EViews-like) ***" ) fit3slsi[[ i ]]$e3e <- systemfit( system, "3SLS", data = Kmenta, inst = inst, methodResidCov = "noDfCor", restrict.regMat = tc, method3sls = formulas[ i ], maxiter = 100, x = TRUE, useMatrix = useMatrix ) print( summary( fit3slsi[[ i ]]$e3e, useDfSys = TRUE ) ) print( "***** iterated W3SLS with restriction via restrict.regMat ********" ) fit3slsi[[ i ]]$e3w <- systemfit( system, "3SLS", data = Kmenta, inst = inst, restrict.regMat = tc, method3sls = formulas[ i ], maxiter = 100, residCovWeighted = TRUE, x = TRUE, useMatrix = useMatrix ) print( summary( fit3slsi[[ i ]]$e3w ) ) print( "******** iterated 3SLS with 2 restrictions *********************" ) fit3slsi[[ i ]]$e4 <- systemfit( system, "3SLS", data = Kmenta, inst = inst, restrict.matrix = restr2m, restrict.rhs = restr2q, method3sls = formulas[ i ], maxiter = 100, x = TRUE, useMatrix = useMatrix ) print( summary( fit3slsi[[ i ]]$e4 ) ) print( "********* iterated 3SLS with 2 restrictions (EViews-like) *******" ) fit3slsi[[ i ]]$e4e <- systemfit( system, "3SLS", data = Kmenta, inst = inst, methodResidCov = "noDfCor", restrict.matrix = restr2m, restrict.rhs = restr2q, method3sls = formulas[ i ], maxiter = 100, useMatrix = useMatrix ) print( summary( fit3slsi[[ i ]]$e4e, useDfSys = TRUE ) ) print( "******** iterated W3SLS with 2 restrictions (EViews-like) *******" ) fit3slsi[[ i ]]$e4we <- systemfit( system, "3SLS", data = Kmenta, inst = inst, methodResidCov = "noDfCor", restrict.matrix = restr2m, restrict.rhs = restr2q, method3sls = formulas[ i ], maxiter = 100, residCovWeighted = TRUE, useMatrix = useMatrix ) print( summary( fit3slsi[[ i ]]$e4we, useDfSys = TRUE ) ) print( "******** iterated 3SLS with 2 restrictions via R and restrict.regMat *********" ) fit3slsi[[ i ]]$e5 <- systemfit( system, "3SLS", data = Kmenta, inst = inst, restrict.regMat = tc, restrict.matrix = restr3m, restrict.rhs = restr3q, method3sls = formulas[ i ], maxiter = 100, useMatrix = useMatrix ) print( summary( fit3slsi[[ i ]]$e5 ) ) print( "*** iterated 3SLS with 2 restrictions via R and restrict.regMat (EViews-like)**" ) fit3slsi[[ i ]]$e5e <- systemfit( system, "3SLS", data = Kmenta, inst = inst, restrict.regMat = tc, methodResidCov = "noDfCor", restrict.matrix = restr3m, restrict.rhs = restr3q, method3sls = formulas[ i ], maxiter = 100, useMatrix = useMatrix ) print( summary( fit3slsi[[ i ]]$e5e, useDfSys = TRUE ) ) print( "** iterated W3SLS with 2 restrictions via R and restrict.regMat ***" ) fit3slsi[[ i ]]$e5w <- systemfit( system, "3SLS", data = Kmenta, inst = inst, restrict.regMat = tc, restrict.matrix = restr3m, restrict.rhs = restr3q, method3sls = formulas[ i ], maxiter = 100, residCovWeighted = TRUE, x = TRUE, useMatrix = useMatrix ) print( summary( fit3slsi[[ i ]]$e5w ) ) } ## **************** 3SLS with different instruments ************* fit3slsd <- list() formulas <- c( "GLS", "IV", "Schmidt", "GMM", "EViews" ) for( i in seq( along = formulas ) ) { fit3slsd[[ i ]] <- list() print( "***************************************************" ) print( paste( "3SLS formula:", formulas[ i ] ) ) print( "************* 3SLS with different instruments **************" ) fit3slsd[[ i ]]$e1 <- systemfit( system, "3SLS", data = Kmenta, inst = instlist, method3sls = formulas[ i ], useMatrix = useMatrix ) print( summary( fit3slsd[[ i ]]$e1 ) ) print( "******* 3SLS with different instruments (EViews-like) **********" ) fit3slsd[[ i ]]$e1e <- systemfit( system, "3SLS", data = Kmenta, inst = instlist, methodResidCov = "noDfCor", method3sls = formulas[ i ], useMatrix = useMatrix ) print( summary( fit3slsd[[ i ]]$e1e, useDfSys = TRUE ) ) print( "**** 3SLS with different instruments and methodResidCov = Theil ***" ) fit3slsd[[ i ]]$e1c <- systemfit( system, "3SLS", data = Kmenta, inst = instlist, methodResidCov = "Theil", method3sls = formulas[ i ], x = TRUE, useMatrix = useMatrix ) print( summary( fit3slsd[[ i ]]$e1c, useDfSys = TRUE ) ) print( "************* W3SLS with different instruments **************" ) fit3slsd[[ i ]]$e1w <- systemfit( system, "3SLS", data = Kmenta, inst = instlist, method3sls = formulas[ i ], residCovWeighted = TRUE, useMatrix = useMatrix ) print( summary( fit3slsd[[ i ]]$e1w ) ) print( "******* 3SLS with different instruments and restriction ********" ) fit3slsd[[ i ]]$e2 <- systemfit( system, "3SLS", data = Kmenta, inst = instlist, restrict.matrix = restrm, method3sls = formulas[ i ], x = TRUE, useMatrix = useMatrix ) print( summary( fit3slsd[[ i ]]$e2 ) ) print( "** 3SLS with different instruments and restriction (EViews-like) *" ) fit3slsd[[ i ]]$e2e <- systemfit( system, "3SLS", data = Kmenta, inst = instlist, methodResidCov = "noDfCor", restrict.matrix = restrm, method3sls = formulas[ i ], useMatrix = useMatrix ) print( summary( fit3slsd[[ i ]]$e2e, useDfSys = TRUE ) ) print( "** W3SLS with different instruments and restriction (EViews-like) *" ) fit3slsd[[ i ]]$e2we <- systemfit( system, "3SLS", data = Kmenta, inst = instlist, methodResidCov = "noDfCor", restrict.matrix = restrm, method3sls = formulas[ i ], residCovWeighted = TRUE, useMatrix = useMatrix ) print( summary( fit3slsd[[ i ]]$e2we, useDfSys = TRUE ) ) print( "** 3SLS with different instruments and restriction via restrict.regMat *******" ) fit3slsd[[ i ]]$e3 <- systemfit( system, "3SLS", data = Kmenta, inst = instlist, restrict.regMat = tc, method3sls = formulas[ i ], useMatrix = useMatrix ) print( summary( fit3slsd[[ i ]]$e3 ) ) print( "3SLS with different instruments with restriction via restrict.regMat (EViews-like)" ) fit3slsd[[ i ]]$e3e <- systemfit( system, "3SLS", data = Kmenta, inst = instlist, methodResidCov = "noDfCor", restrict.regMat = tc, method3sls = formulas[ i ], x = TRUE, useMatrix = useMatrix ) print( summary( fit3slsd[[ i ]]$e3e, useDfSys = TRUE ) ) print( "** W3SLS with different instr. and restr. via restrict.regMat ****" ) fit3slsd[[ i ]]$e3w <- systemfit( system, "3SLS", data = Kmenta, inst = instlist, restrict.regMat = tc, method3sls = formulas[ i ], residCovWeighted = TRUE, x = TRUE, useMatrix = useMatrix ) print( summary( fit3slsd[[ i ]]$e3w ) ) print( "****** 3SLS with different instruments and 2 restrictions *********" ) fit3slsd[[ i ]]$e4 <- systemfit( system, "3SLS", data = Kmenta, inst = instlist, restrict.matrix = restr2m, restrict.rhs = restr2q, method3sls = formulas[ i ], x = TRUE, useMatrix = useMatrix ) print( summary( fit3slsd[[ i ]]$e4 ) ) print( "** 3SLS with different instruments and 2 restrictions (EViews-like) *" ) fit3slsd[[ i ]]$e4e <- systemfit( system, "3SLS", data = Kmenta, inst = instlist, methodResidCov = "noDfCor", restrict.matrix = restr2m, restrict.rhs = restr2q, method3sls = formulas[ i ], useMatrix = useMatrix ) print( summary( fit3slsd[[ i ]]$e4e, useDfSys = TRUE ) ) print( "**** W3SLS with different instruments and 2 restrictions *********" ) fit3slsd[[ i ]]$e4w <- systemfit( system, "3SLS", data = Kmenta, inst = instlist, restrict.matrix = restr2m, restrict.rhs = restr2q, method3sls = formulas[ i ], residCovWeighted = TRUE, useMatrix = useMatrix ) print( summary( fit3slsd[[ i ]]$e4w ) ) print( " 3SLS with different instruments with 2 restrictions via R and restrict.regMat" ) fit3slsd[[ i ]]$e5 <- systemfit( system, "3SLS", data = Kmenta, inst = instlist, restrict.regMat = tc, restrict.matrix = restr3m, restrict.rhs = restr3q, method3sls = formulas[ i ], useMatrix = useMatrix ) print( summary( fit3slsd[[ i ]]$e5 ) ) print( "3SLS with diff. instruments and 2 restr. via R and restrict.regMat (EViews-like)" ) fit3slsd[[ i ]]$e5e <- systemfit( system, "3SLS", data = Kmenta, inst = instlist, restrict.regMat = tc, methodResidCov = "noDfCor", restrict.matrix = restr3m, restrict.rhs = restr3q, method3sls = formulas[ i ], x = TRUE, useMatrix = useMatrix ) print( summary( fit3slsd[[ i ]]$e5e, useDfSys = TRUE ) ) print( "W3SLS with diff. instr. and 2 restr. via R and restrict.regMat (EViews-like)" ) fit3slsd[[ i ]]$e5we <- systemfit( system, "3SLS", data = Kmenta, inst = instlist, restrict.regMat = tc, methodResidCov = "noDfCor", restrict.matrix = restr3m, restrict.rhs = restr3q, method3sls = formulas[ i ], residCovWeighted = TRUE, useMatrix = useMatrix ) print( summary( fit3slsd[[ i ]]$e5we, useDfSys = TRUE ) ) } ## **************** shorter summaries ********************** print( summary( fit3sls[[ 2 ]]$e1c, equations = FALSE ) ) print( summary( fit3sls[[ 3 ]]$e2e ), residCov = FALSE ) print( summary( fit3sls[[ 4 ]]$e3, useDfSys = FALSE ), residCov = FALSE ) print( summary( fit3sls[[ 5 ]]$e4e, equations = FALSE ), equations = FALSE ) print( summary( fit3sls[[ 1 ]]$e4wSym, residCov = FALSE ), equations = FALSE ) print( summary( fit3sls[[ 2 ]]$e5, residCov = FALSE ), residCov = TRUE ) print( summary( fit3slsi[[ 3 ]]$e3e, residCov = FALSE, equations = FALSE ) ) print( summary( fit3slsi[[ 4 ]]$e1we ), equations = FALSE, residCov = FALSE ) print( summary( fit3slsd[[ 5 ]]$e4, residCov = FALSE ) ) print( summary( fit3slsd[[ 1 ]]$e2we, equations = FALSE ) ) ## ****************** residuals ************************** print( residuals( fit3sls[[ 1 ]]$e1c ) ) print( residuals( fit3sls[[ 1 ]]$e1c$eq[[ 1 ]] ) ) print( residuals( fit3sls[[ 4 ]]$e1wc ) ) print( residuals( fit3sls[[ 4 ]]$e1wc$eq[[ 1 ]] ) ) print( residuals( fit3sls[[ 2 ]]$e2e ) ) print( residuals( fit3sls[[ 2 ]]$e2e$eq[[ 2 ]] ) ) print( residuals( fit3sls[[ 3 ]]$e3 ) ) print( residuals( fit3sls[[ 3 ]]$e3$eq[[ 1 ]] ) ) print( residuals( fit3sls[[ 4 ]]$e4e ) ) print( residuals( fit3sls[[ 4 ]]$e4e$eq[[ 2 ]] ) ) print( residuals( fit3sls[[ 5 ]]$e5 ) ) print( residuals( fit3sls[[ 5 ]]$e5$eq[[ 1 ]] ) ) print( residuals( fit3slsi[[ 2 ]]$e3e ) ) print( residuals( fit3slsi[[ 2 ]]$e3e$eq[[ 1 ]] ) ) print( residuals( fit3slsi[[ 1 ]]$e2we ) ) print( residuals( fit3slsi[[ 1 ]]$e2we$eq[[ 1 ]] ) ) print( residuals( fit3slsd[[ 3 ]]$e4 ) ) print( residuals( fit3slsd[[ 3 ]]$e4$eq[[ 2 ]] ) ) print( residuals( fit3slsd[[ 5 ]]$e5we ) ) print( residuals( fit3slsd[[ 5 ]]$e5we$eq[[ 2 ]] ) ) ## *************** coefficients ********************* print( round( coef( fit3sls[[ 3 ]]$e1c ), digits = 6 ) ) print( round( coef( fit3sls[[ 4 ]]$e1c$eq[[ 2 ]] ), digits = 6 ) ) print( round( coef( fit3slsi[[ 4 ]]$e2 ), digits = 6 ) ) print( round( coef( fit3slsi[[ 5 ]]$e2$eq[[ 1 ]] ), digits = 6 ) ) print( round( coef( fit3sls[[ 2 ]]$e2w ), digits = 6 ) ) print( round( coef( fit3sls[[ 3 ]]$e2w$eq[[ 1 ]] ), digits = 6 ) ) print( round( coef( fit3slsd[[ 5 ]]$e3e ), digits = 6 ) ) print( round( coef( fit3slsd[[ 5 ]]$e3e, modified.regMat = TRUE ), digits = 6 ) ) print( round( coef( fit3slsd[[ 1 ]]$e3e$eq[[ 2 ]] ), digits = 6 ) ) print( round( coef( fit3slsd[[ 4 ]]$e3w ), digits = 6 ) ) print( round( coef( fit3slsd[[ 4 ]]$e3w, modified.regMat = TRUE ), digits = 6 ) ) print( round( coef( fit3slsd[[ 5 ]]$e3w$eq[[ 2 ]] ), digits = 6 ) ) print( round( coef( fit3sls[[ 1 ]]$e4 ), digits = 6 ) ) print( round( coef( fit3sls[[ 2 ]]$e4$eq[[ 1 ]] ), digits = 6 ) ) print( round( coef( fit3slsi[[ 2 ]]$e4we ), digits = 6 ) ) print( round( coef( fit3slsi[[ 1 ]]$e4we$eq[[ 1 ]] ), digits = 6 ) ) print( round( coef( fit3slsi[[ 2 ]]$e5e ), digits = 6 ) ) print( round( coef( fit3slsi[[ 2 ]]$e5e, modified.regMat = TRUE ), digits = 6 ) ) print( round( coef( fit3slsi[[ 3 ]]$e5e$eq[[ 2 ]] ), digits = 6 ) ) ## *************** coefficients with stats ********************* print( round( coef( summary( fit3sls[[ 3 ]]$e1c, useDfSys = FALSE ) ), digits = 6 ) ) print( round( coef( summary( fit3sls[[ 4 ]]$e1c$eq[[ 2 ]], useDfSys = FALSE ) ), digits = 6 ) ) print( round( coef( summary( fit3slsd[[ 2 ]]$e1w, useDfSys = FALSE ) ), digits = 6 ) ) print( round( coef( summary( fit3slsd[[ 3 ]]$e1w$eq[[ 2 ]], useDfSys = FALSE ) ), digits = 3 ) ) print( round( coef( summary( fit3slsi[[ 4 ]]$e2 ) ), digits = 6 ) ) print( round( coef( summary( fit3slsi[[ 5 ]]$e2$eq[[ 1 ]] ) ), digits = 6 ) ) print( round( coef( summary( fit3slsd[[ 5 ]]$e3e, useDfSys = FALSE ) ), digits = 6 ) ) print( round( coef( summary( fit3slsd[[ 5 ]]$e3e, useDfSys = FALSE ), modified.regMat = TRUE ), digits = 6 ) ) print( round( coef( summary( fit3slsd[[ 1 ]]$e3e$eq[[ 2 ]], useDfSys = FALSE ) ), digits = 6 ) ) print( round( coef( summary( fit3slsi[[ 4 ]]$e3w, useDfSys = FALSE ) ), digits = 6 ) ) print( round( coef( summary( fit3slsi[[ 4 ]]$e3w, useDfSys = FALSE ), modified.regMat = TRUE ), digits = 6 ) ) print( round( coef( summary( fit3slsi[[ 5 ]]$e3w$eq[[ 2 ]], useDfSys = FALSE ) ), digits = 6 ) ) print( round( coef( summary( fit3sls[[ 1 ]]$e4 ) ), digits = 6 ) ) print( round( coef( summary( fit3sls[[ 2 ]]$e4$eq[[ 1 ]] ) ), digits = 6 ) ) print( round( coef( summary( fit3slsi[[ 2 ]]$e5e ) ), digits = 6 ) ) print( round( coef( summary( fit3slsi[[ 2 ]]$e5e ), modified.regMat = TRUE ), digits = 6 ) ) print( round( coef( summary( fit3slsi[[ 3 ]]$e5e$eq[[ 2 ]] ) ), digits = 6 ) ) print( round( coef( summary( fit3sls[[ 2 ]]$e5we ) ), digits = 6 ) ) print( round( coef( summary( fit3sls[[ 2 ]]$e5we ), modified.regMat = TRUE ), digits = 6 ) ) print( round( coef( summary( fit3sls[[ 3 ]]$e5we$eq[[ 2 ]] ) ), digits = 6 ) ) ## *********** variance covariance matrix of the coefficients ******* print( round( vcov( fit3sls[[ 3 ]]$e1c ), digits = 5 ) ) print( round( vcov( fit3sls[[ 4 ]]$e1c$eq[[ 2 ]] ), digits = 5 ) ) print( round( vcov( fit3sls[[ 4 ]]$e2 ), digits = 5 ) ) print( round( vcov( fit3sls[[ 5 ]]$e2$eq[[ 1 ]] ), digits = 5 ) ) print( round( vcov( fit3sls[[ 5 ]]$e3e ), digits = 5 ) ) print( round( vcov( fit3sls[[ 5 ]]$e3e, modified.regMat = TRUE ), digits = 5 ) ) print( round( vcov( fit3sls[[ 1 ]]$e3e$eq[[ 2 ]] ), digits = 5 ) ) print( round( vcov( fit3sls[[ 1 ]]$e4 ), digits = 5 ) ) print( round( vcov( fit3sls[[ 2 ]]$e4$eq[[ 1 ]] ), digits = 5 ) ) print( round( vcov( fit3sls[[ 3 ]]$e4wSym ), digits = 5 ) ) print( round( vcov( fit3sls[[ 4 ]]$e4wSym$eq[[ 1 ]] ), digits = 5 ) ) print( round( vcov( fit3sls[[ 2 ]]$e5e ), digits = 5 ) ) print( round( vcov( fit3sls[[ 2 ]]$e5e, modified.regMat = TRUE ), digits = 5 ) ) print( round( vcov( fit3sls[[ 3 ]]$e5e$eq[[ 2 ]] ), digits = 5 ) ) print( round( vcov( fit3slsi[[ 4 ]]$e1e ), digits = 5 ) ) print( round( vcov( fit3slsi[[ 3 ]]$e1e$eq[[ 1 ]] ), digits = 5 ) ) print( round( vcov( fit3slsi[[ 5 ]]$e1we ), digits = 5 ) ) print( round( vcov( fit3slsi[[ 1 ]]$e1we$eq[[ 2 ]] ), digits = 5 ) ) print( round( vcov( fit3slsi[[ 5 ]]$e2e ), digits = 5 ) ) print( round( vcov( fit3slsi[[ 4 ]]$e2e$eq[[ 2 ]] ), digits = 5 ) ) print( round( vcov( fit3slsi[[ 1 ]]$e3 ), digits = 5 ) ) print( round( vcov( fit3slsi[[ 1 ]]$e3, modified.regMat = TRUE ), digits = 5 ) ) print( round( vcov( fit3slsi[[ 5 ]]$e3$eq[[ 1 ]] ), digits = 5 ) ) print( round( vcov( fit3slsi[[ 2 ]]$e4e ), digits = 5 ) ) print( round( vcov( fit3slsi[[ 1 ]]$e4e$eq[[ 2 ]] ), digits = 5 ) ) print( round( vcov( fit3slsi[[ 3 ]]$e5 ), digits = 5 ) ) print( round( vcov( fit3slsi[[ 3 ]]$e5, modified.regMat = TRUE ), digits = 5 ) ) print( round( vcov( fit3slsi[[ 2 ]]$e5$eq[[ 1 ]] ), digits = 5 ) ) print( round( vcov( fit3slsi[[ 5 ]]$e5w ), digits = 5 ) ) print( round( vcov( fit3slsi[[ 5 ]]$e5w, modified.regMat = TRUE ), digits = 5 ) ) print( round( vcov( fit3slsi[[ 4 ]]$e5w$eq[[ 1 ]] ), digits = 5 ) ) print( round( vcov( fit3slsd[[ 5 ]]$e1c ), digits = 5 ) ) print( round( vcov( fit3slsd[[ 2 ]]$e1c$eq[[ 2 ]] ), digits = 5 ) ) print( round( vcov( fit3slsd[[ 1 ]]$e2 ), digits = 5 ) ) print( round( vcov( fit3slsd[[ 3 ]]$e2$eq[[ 1 ]] ), digits = 5 ) ) print( round( vcov( fit3slsd[[ 5 ]]$e2we ), digits = 5 ) ) print( round( vcov( fit3slsd[[ 3 ]]$e2we$eq[[ 1 ]] ), digits = 5 ) ) print( round( vcov( fit3slsd[[ 2 ]]$e3 ), digits = 5 ) ) print( round( vcov( fit3slsd[[ 2 ]]$e3, modified.regMat = TRUE ), digits = 5 ) ) print( round( vcov( fit3slsd[[ 4 ]]$e3$eq[[ 2 ]] ), digits = 5 ) ) print( round( vcov( fit3slsd[[ 3 ]]$e4 ), digits = 5 ) ) print( round( vcov( fit3slsd[[ 5 ]]$e4$eq[[ 1 ]] ), digits = 5 ) ) print( round( vcov( fit3slsd[[ 4 ]]$e5e ), digits = 5 ) ) print( round( vcov( fit3slsd[[ 4 ]]$e5e, modified.regMat = TRUE ), digits = 5 ) ) print( round( vcov( fit3slsd[[ 1 ]]$e5e$eq[[ 2 ]] ), digits = 5 ) ) ## *********** confidence intervals of coefficients ************* print( confint( fit3sls[[ 1 ]]$e1c, useDfSys = TRUE ) ) print( confint( fit3sls[[ 1 ]]$e1c$eq[[ 1 ]], level = 0.9, useDfSys = TRUE ) ) print( confint( fit3sls[[ 2 ]]$e2e, level = 0.9, useDfSys = TRUE ) ) print( confint( fit3sls[[ 2 ]]$e2e$eq[[ 2 ]], level = 0.99, useDfSys = TRUE ) ) print( confint( fit3sls[[ 3 ]]$e3, level = 0.99 ) ) print( confint( fit3sls[[ 3 ]]$e3$eq[[ 1 ]], level = 0.5 ) ) print( confint( fit3sls[[ 5 ]]$e3we, level = 0.99 ) ) print( confint( fit3sls[[ 5 ]]$e3we$eq[[ 1 ]], level = 0.5 ) ) print( confint( fit3sls[[ 4 ]]$e4e, level = 0.5, useDfSys = TRUE ) ) print( confint( fit3sls[[ 4 ]]$e4e$eq[[ 2 ]], level = 0.25, useDfSys = TRUE ) ) print( confint( fit3sls[[ 5 ]]$e5, level = 0.25 ) ) print( confint( fit3sls[[ 5 ]]$e5$eq[[ 1 ]], level = 0.975 ) ) print( confint( fit3slsi[[ 2 ]]$e3e, level = 0.975, useDfSys = TRUE ) ) print( confint( fit3slsi[[ 2 ]]$e3e$eq[[ 1 ]], level = 0.999, useDfSys = TRUE ) ) print( confint( fit3slsi[[ 1 ]]$e5w, level = 0.975, useDfSys = TRUE ) ) print( confint( fit3slsi[[ 1 ]]$e5w$eq[[ 1 ]], level = 0.999, useDfSys = TRUE ) ) print( confint( fit3slsd[[ 3 ]]$e4, level = 0.999 ) ) print( confint( fit3slsd[[ 3 ]]$e4$eq[[ 2 ]] ) ) print( confint( fit3slsd[[ 2 ]]$e4w, level = 0.999 ) ) print( confint( fit3slsd[[ 2 ]]$e4w$eq[[ 2 ]] ) ) ## *********** fitted values ************* print( fitted( fit3sls[[ 2 ]]$e1c ) ) print( fitted( fit3sls[[ 2 ]]$e1c$eq[[ 1 ]] ) ) print( fitted( fit3sls[[ 1 ]]$e1wc ) ) print( fitted( fit3sls[[ 1 ]]$e1wc$eq[[ 1 ]] ) ) print( fitted( fit3sls[[ 3 ]]$e2e ) ) print( fitted( fit3sls[[ 3 ]]$e2e$eq[[ 2 ]] ) ) print( fitted( fit3sls[[ 4 ]]$e3 ) ) print( fitted( fit3sls[[ 4 ]]$e3$eq[[ 1 ]] ) ) print( fitted( fit3sls[[ 5 ]]$e4e ) ) print( fitted( fit3sls[[ 5 ]]$e4e$eq[[ 2 ]] ) ) print( fitted( fit3sls[[ 1 ]]$e5 ) ) print( fitted( fit3sls[[ 1 ]]$e5$eq[[ 1 ]] ) ) print( fitted( fit3slsi[[ 3 ]]$e3e ) ) print( fitted( fit3slsi[[ 3 ]]$e3e$eq[[ 1 ]] ) ) print( fitted( fit3slsd[[ 4 ]]$e4 ) ) print( fitted( fit3slsd[[ 4 ]]$e4$eq[[ 2 ]] ) ) print( fitted( fit3slsd[[ 2 ]]$e3w ) ) print( fitted( fit3slsd[[ 2 ]]$e3w$eq[[ 2 ]] ) ) ## *********** predicted values ************* predictData <- Kmenta predictData$consump <- NULL predictData$price <- Kmenta$price * 0.9 predictData$income <- Kmenta$income * 1.1 print( predict( fit3sls[[ 2 ]]$e1c, se.fit = TRUE, interval = "prediction", useDfSys = TRUE ) ) print( predict( fit3sls[[ 2 ]]$e1c$eq[[ 1 ]], se.fit = TRUE, interval = "prediction", useDfSys = TRUE ) ) print( predict( fit3sls[[ 3 ]]$e2e, se.pred = TRUE, interval = "confidence", level = 0.999, newdata = predictData, useDfSys = TRUE ) ) print( predict( fit3sls[[ 3 ]]$e2e$eq[[ 2 ]], se.pred = TRUE, interval = "confidence", level = 0.999, newdata = predictData, useDfSys = TRUE ) ) print( predict( fit3sls[[ 5 ]]$e2w, se.pred = TRUE, interval = "confidence", level = 0.999, newdata = predictData, useDfSys = TRUE ) ) print( predict( fit3sls[[ 5 ]]$e2w$eq[[ 2 ]], se.pred = TRUE, interval = "confidence", level = 0.999, newdata = predictData, useDfSys = TRUE ) ) print( predict( fit3sls[[ 4 ]]$e3, se.pred = TRUE, interval = "prediction", level = 0.975 ) ) print( predict( fit3sls[[ 4 ]]$e3$eq[[ 1 ]], se.pred = TRUE, interval = "prediction", level = 0.975 ) ) print( predict( fit3sls[[ 5 ]]$e4e, se.fit = TRUE, interval = "confidence", level = 0.25, useDfSys = TRUE ) ) print( predict( fit3sls[[ 5 ]]$e4e$eq[[ 2 ]], se.fit = TRUE, interval = "confidence", level = 0.25, useDfSys = TRUE ) ) print( predict( fit3sls[[ 1 ]]$e5, se.fit = TRUE, se.pred = TRUE, interval = "prediction", level = 0.5, newdata = predictData ) ) print( predict( fit3sls[[ 1 ]]$e5$eq[[ 1 ]], se.fit = TRUE, se.pred = TRUE, interval = "prediction", level = 0.5, newdata = predictData ) ) print( predict( fit3slsi[[ 3 ]]$e3e, se.fit = TRUE, se.pred = TRUE, interval = "confidence", level = 0.99, useDfSys = TRUE ) ) print( predict( fit3slsi[[ 3 ]]$e3e$eq[[ 1 ]], se.fit = TRUE, se.pred = TRUE, interval = "confidence", level = 0.99, useDfSys = TRUE ) ) print( predict( fit3slsi[[ 1 ]]$e5w, se.fit = TRUE, se.pred = TRUE, interval = "prediction", level = 0.5, newdata = predictData ) ) print( predict( fit3slsi[[ 1 ]]$e5w$eq[[ 1 ]], se.fit = TRUE, se.pred = TRUE, interval = "prediction", level = 0.5, newdata = predictData ) ) print( predict( fit3slsd[[ 4 ]]$e4, se.fit = TRUE, interval = "prediction", level = 0.9, newdata = predictData ) ) print( predict( fit3slsd[[ 4 ]]$e4$eq[[ 2 ]], se.fit = TRUE, interval = "prediction", level = 0.9, newdata = predictData ) ) print( predict( fit3slsd[[ 2 ]]$e3w, se.fit = TRUE, se.pred = TRUE, interval = "confidence", level = 0.99, useDfSys = TRUE ) ) print( predict( fit3slsd[[ 2 ]]$e3w$eq[[ 1 ]], se.fit = TRUE, se.pred = TRUE, interval = "confidence", level = 0.99, useDfSys = TRUE ) ) # predict just one observation smallData <- data.frame( price = 130, income = 150, farmPrice = 120, trend = 25 ) print( predict( fit3sls[[ 3 ]]$e1c, newdata = smallData ) ) print( predict( fit3sls[[ 3 ]]$e1c$eq[[ 1 ]], newdata = smallData ) ) print( predict( fit3sls[[ 4 ]]$e2e, se.fit = TRUE, level = 0.9, newdata = smallData ) ) print( predict( fit3sls[[ 5 ]]$e2e$eq[[ 1 ]], se.pred = TRUE, level = 0.99, newdata = smallData ) ) print( predict( fit3sls[[ 1]]$e3, interval = "prediction", level = 0.975, newdata = smallData ) ) print( predict( fit3sls[[ 1 ]]$e3$eq[[ 1 ]], interval = "confidence", level = 0.8, newdata = smallData ) ) print( predict( fit3sls[[ 4]]$e3we, interval = "prediction", level = 0.975, newdata = smallData ) ) print( predict( fit3sls[[ 4 ]]$e3we$eq[[ 1 ]], interval = "confidence", level = 0.8, newdata = smallData ) ) print( predict( fit3sls[[ 2 ]]$e4e, se.fit = TRUE, interval = "confidence", level = 0.999, newdata = smallData ) ) print( predict( fit3sls[[ 2 ]]$e4e$eq[[ 2 ]], se.pred = TRUE, interval = "prediction", level = 0.75, newdata = smallData ) ) print( predict( fit3sls[[ 3 ]]$e5, se.fit = TRUE, interval = "prediction", newdata = smallData ) ) print( predict( fit3sls[[ 3 ]]$e5$eq[[ 1 ]], se.pred = TRUE, interval = "confidence", newdata = smallData ) ) print( predict( fit3slsi[[ 4 ]]$e3e, se.fit = TRUE, se.pred = TRUE, interval = "prediction", level = 0.5, newdata = smallData ) ) print( predict( fit3slsd[[ 5 ]]$e4$eq[[ 1 ]], se.fit = TRUE, se.pred = TRUE, interval = "confidence", level = 0.25, newdata = smallData ) ) print( predict( fit3slsd[[ 2 ]]$e2we, se.fit = TRUE, se.pred = TRUE, interval = "prediction", level = 0.5, newdata = smallData ) ) print( predict( fit3slsi[[ 3 ]]$e4we$eq[[ 1 ]], se.fit = TRUE, se.pred = TRUE, interval = "confidence", level = 0.25, newdata = smallData ) ) ## ************ correlation of predicted values *************** print( correlation.systemfit( fit3sls[[ 1 ]]$e1c, 2, 1 ) ) print( correlation.systemfit( fit3sls[[ 2 ]]$e2e, 1, 2 ) ) print( correlation.systemfit( fit3sls[[ 5 ]]$e2w, 2, 1 ) ) print( correlation.systemfit( fit3sls[[ 3 ]]$e3, 2, 1 ) ) print( correlation.systemfit( fit3sls[[ 4 ]]$e4e, 1, 2 ) ) print( correlation.systemfit( fit3sls[[ 5 ]]$e5, 2, 1 ) ) print( correlation.systemfit( fit3slsi[[ 2 ]]$e3e, 1, 2 ) ) print( correlation.systemfit( fit3slsi[[ 4 ]]$e5w, 1, 2 ) ) print( correlation.systemfit( fit3slsd[[ 3 ]]$e4, 2, 1 ) ) ## ************ Log-Likelihood values *************** print( logLik( fit3sls[[ 1 ]]$e1c ) ) print( logLik( fit3sls[[ 1 ]]$e1c, residCovDiag = TRUE ) ) print( logLik( fit3sls[[ 2 ]]$e2e ) ) print( logLik( fit3sls[[ 2 ]]$e2e, residCovDiag = TRUE ) ) print( logLik( fit3sls[[ 3 ]]$e3 ) ) print( logLik( fit3sls[[ 3 ]]$e3, residCovDiag = TRUE ) ) print( logLik( fit3sls[[ 4 ]]$e4e ) ) print( logLik( fit3sls[[ 4 ]]$e4e, residCovDiag = TRUE ) ) print( logLik( fit3sls[[ 2 ]]$e4wSym ) ) print( logLik( fit3sls[[ 2 ]]$e4wSym, residCovDiag = TRUE ) ) print( logLik( fit3sls[[ 5 ]]$e5 ) ) print( logLik( fit3sls[[ 5 ]]$e5, residCovDiag = TRUE ) ) print( logLik( fit3slsi[[ 2 ]]$e3e ) ) print( logLik( fit3slsi[[ 2 ]]$e3e, residCovDiag = TRUE ) ) print( logLik( fit3slsi[[ 1 ]]$e1we ) ) print( logLik( fit3slsi[[ 1 ]]$e1we, residCovDiag = TRUE ) ) print( logLik( fit3slsd[[ 3 ]]$e4 ) ) print( logLik( fit3slsd[[ 3 ]]$e4, residCovDiag = TRUE ) ) print( logLik( fit3slsd[[ 5 ]]$e2we ) ) print( logLik( fit3slsd[[ 5 ]]$e2we, residCovDiag = TRUE ) ) ## ************** F tests **************** # testing first restriction print( linearHypothesis( fit3sls[[ 1 ]]$e1, restrm ) ) linearHypothesis( fit3sls[[ 1 ]]$e1, restrict ) print( linearHypothesis( fit3sls[[ 2 ]]$e1e, restrm ) ) linearHypothesis( fit3sls[[ 2 ]]$e1e, restrict ) print( linearHypothesis( fit3sls[[ 3 ]]$e1c, restrm ) ) linearHypothesis( fit3sls[[ 3 ]]$e1c, restrict ) print( linearHypothesis( fit3slsi[[ 4 ]]$e1, restrm ) ) linearHypothesis( fit3slsi[[ 4 ]]$e1, restrict ) print( linearHypothesis( fit3slsd[[ 5 ]]$e1e, restrm ) ) linearHypothesis( fit3slsd[[ 5 ]]$e1e, restrict ) print( linearHypothesis( fit3slsd[[ 2 ]]$e1w, restrm ) ) linearHypothesis( fit3slsd[[ 2 ]]$e1w, restrict ) # testing second restriction restrOnly2m <- matrix(0,1,7) restrOnly2q <- 0.5 restrOnly2m[1,2] <- -1 restrOnly2m[1,5] <- 1 restrictOnly2 <- "- demand_price + supply_price = 0.5" # first restriction not imposed print( linearHypothesis( fit3sls[[ 5 ]]$e1c, restrOnly2m, restrOnly2q ) ) linearHypothesis( fit3sls[[ 5 ]]$e1c, restrictOnly2 ) print( linearHypothesis( fit3slsi[[ 1 ]]$e1e, restrOnly2m, restrOnly2q ) ) linearHypothesis( fit3slsi[[ 1 ]]$e1e, restrictOnly2 ) print( linearHypothesis( fit3slsi[[ 3 ]]$e1we, restrOnly2m, restrOnly2q ) ) linearHypothesis( fit3slsi[[ 3 ]]$e1we, restrictOnly2 ) print( linearHypothesis( fit3slsd[[ 2 ]]$e1, restrOnly2m, restrOnly2q ) ) linearHypothesis( fit3slsd[[ 2 ]]$e1, restrictOnly2 ) # first restriction imposed print( linearHypothesis( fit3sls[[ 4 ]]$e2, restrOnly2m, restrOnly2q ) ) linearHypothesis( fit3sls[[ 4 ]]$e2, restrictOnly2 ) print( linearHypothesis( fit3sls[[ 4 ]]$e3, restrOnly2m, restrOnly2q ) ) linearHypothesis( fit3sls[[ 4 ]]$e3, restrictOnly2 ) print( linearHypothesis( fit3sls[[ 1 ]]$e2w, restrOnly2m, restrOnly2q ) ) linearHypothesis( fit3sls[[ 1 ]]$e2w, restrictOnly2 ) print( linearHypothesis( fit3sls[[ 1 ]]$e3we, restrOnly2m, restrOnly2q ) ) linearHypothesis( fit3sls[[ 1 ]]$e3we, restrictOnly2 ) print( linearHypothesis( fit3slsi[[ 5 ]]$e2e, restrOnly2m, restrOnly2q ) ) linearHypothesis( fit3slsi[[ 5 ]]$e2e, restrictOnly2 ) print( linearHypothesis( fit3slsi[[ 5 ]]$e3e, restrOnly2m, restrOnly2q ) ) linearHypothesis( fit3slsi[[ 5 ]]$e3e, restrictOnly2 ) print( linearHypothesis( fit3slsd[[ 1 ]]$e2, restrOnly2m, restrOnly2q ) ) linearHypothesis( fit3slsd[[ 1 ]]$e2, restrictOnly2 ) print( linearHypothesis( fit3slsd[[ 1 ]]$e3, restrOnly2m, restrOnly2q ) ) linearHypothesis( fit3slsd[[ 1 ]]$e3, restrictOnly2 ) # testing both of the restrictions print( linearHypothesis( fit3sls[[ 2 ]]$e1e, restr2m, restr2q ) ) linearHypothesis( fit3sls[[ 2 ]]$e1e, restrict2 ) print( linearHypothesis( fit3slsi[[ 3 ]]$e1, restr2m, restr2q ) ) linearHypothesis( fit3slsi[[ 3 ]]$e1, restrict2 ) print( linearHypothesis( fit3slsd[[ 4 ]]$e1e, restr2m, restr2q ) ) linearHypothesis( fit3slsd[[ 4 ]]$e1e, restrict2 ) print( linearHypothesis( fit3slsd[[ 5 ]]$e1w, restr2m, restr2q ) ) linearHypothesis( fit3slsd[[ 5 ]]$e1w, restrict2 ) ## ************** Wald tests **************** # testing first restriction print( linearHypothesis( fit3sls[[ 1 ]]$e1, restrm, test = "Chisq" ) ) linearHypothesis( fit3sls[[ 1 ]]$e1, restrict, test = "Chisq" ) print( linearHypothesis( fit3sls[[ 2 ]]$e1e, restrm, test = "Chisq" ) ) linearHypothesis( fit3sls[[ 2 ]]$e1e, restrict, test = "Chisq" ) print( linearHypothesis( fit3sls[[ 3 ]]$e1c, restrm, test = "Chisq" ) ) linearHypothesis( fit3sls[[ 3 ]]$e1c, restrict, test = "Chisq" ) print( linearHypothesis( fit3slsi[[ 4 ]]$e1, restrm, test = "Chisq" ) ) linearHypothesis( fit3slsi[[ 4 ]]$e1, restrict, test = "Chisq" ) print( linearHypothesis( fit3slsi[[ 2 ]]$e1we, restrm, test = "Chisq" ) ) linearHypothesis( fit3slsi[[ 2 ]]$e1we, restrict, test = "Chisq" ) print( linearHypothesis( fit3slsd[[ 5 ]]$e1e, restrm, test = "Chisq" ) ) linearHypothesis( fit3slsd[[ 5 ]]$e1e, restrict, test = "Chisq" ) # testing second restriction # first restriction not imposed print( linearHypothesis( fit3sls[[ 5 ]]$e1c, restrOnly2m, restrOnly2q, test = "Chisq" ) ) linearHypothesis( fit3sls[[ 5 ]]$e1c, restrictOnly2, test = "Chisq" ) print( linearHypothesis( fit3sls[[ 3 ]]$e1wc, restrOnly2m, restrOnly2q, test = "Chisq" ) ) linearHypothesis( fit3sls[[ 3 ]]$e1wc, restrictOnly2, test = "Chisq" ) print( linearHypothesis( fit3slsi[[ 1 ]]$e1e, restrOnly2m, restrOnly2q, test = "Chisq" ) ) linearHypothesis( fit3slsi[[ 1 ]]$e1e, restrictOnly2, test = "Chisq" ) print( linearHypothesis( fit3slsd[[ 2 ]]$e1, restrOnly2m, restrOnly2q, test = "Chisq" ) ) linearHypothesis( fit3slsd[[ 2 ]]$e1, restrictOnly2, test = "Chisq" ) # first restriction imposed print( linearHypothesis( fit3sls[[ 4 ]]$e2, restrOnly2m, restrOnly2q, test = "Chisq" ) ) linearHypothesis( fit3sls[[ 4 ]]$e2, restrictOnly2, test = "Chisq" ) print( linearHypothesis( fit3sls[[ 4 ]]$e3, restrOnly2m, restrOnly2q, test = "Chisq" ) ) linearHypothesis( fit3sls[[ 4 ]]$e3, restrictOnly2, test = "Chisq" ) print( linearHypothesis( fit3slsi[[ 5 ]]$e2e, restrOnly2m, restrOnly2q, test = "Chisq" ) ) linearHypothesis( fit3slsi[[ 5 ]]$e2e, restrictOnly2, test = "Chisq" ) print( linearHypothesis( fit3slsi[[ 5 ]]$e3e, restrOnly2m, restrOnly2q, test = "Chisq" ) ) linearHypothesis( fit3slsi[[ 5 ]]$e3e, restrictOnly2, test = "Chisq" ) print( linearHypothesis( fit3slsd[[ 1 ]]$e2, restrOnly2m, restrOnly2q, test = "Chisq" ) ) linearHypothesis( fit3slsd[[ 1 ]]$e2, restrictOnly2, test = "Chisq" ) print( linearHypothesis( fit3slsd[[ 1 ]]$e3, restrOnly2m, restrOnly2q, test = "Chisq" ) ) linearHypothesis( fit3slsd[[ 1 ]]$e3, restrictOnly2, test = "Chisq" ) print( linearHypothesis( fit3slsd[[ 2 ]]$e2we, restrOnly2m, restrOnly2q, test = "Chisq" ) ) linearHypothesis( fit3slsd[[ 2 ]]$e2we, restrictOnly2, test = "Chisq" ) print( linearHypothesis( fit3slsd[[ 3 ]]$e3w, restrOnly2m, restrOnly2q, test = "Chisq" ) ) linearHypothesis( fit3slsd[[ 3 ]]$e3w, restrictOnly2, test = "Chisq" ) # testing both of the restrictions print( linearHypothesis( fit3sls[[ 2 ]]$e1e, restr2m, restr2q, test = "Chisq" ) ) linearHypothesis( fit3sls[[ 2 ]]$e1e, restrict2, test = "Chisq" ) print( linearHypothesis( fit3sls[[ 5 ]]$e1wc, restr2m, restr2q, test = "Chisq" ) ) linearHypothesis( fit3sls[[ 5 ]]$e1wc, restrict2, test = "Chisq" ) print( linearHypothesis( fit3slsi[[ 3 ]]$e1, restr2m, restr2q, test = "Chisq" ) ) linearHypothesis( fit3slsi[[ 3 ]]$e1, restrict2, test = "Chisq" ) print( linearHypothesis( fit3slsd[[ 4 ]]$e1e, restr2m, restr2q, test = "Chisq" ) ) linearHypothesis( fit3slsd[[ 4 ]]$e1e, restrict2, test = "Chisq" ) ## *********** model frame ************* print( mf <- model.frame( fit3sls[[ 3 ]]$e1c ) ) print( mf1 <- model.frame( fit3sls[[ 3 ]]$e1c$eq[[ 1 ]] ) ) print( attributes( mf1 )$terms ) print( mf2 <- model.frame( fit3sls[[ 3 ]]$e1c$eq[[ 2 ]] ) ) print( attributes( mf2 )$terms ) print( all.equal( mf, model.frame( fit3sls[[ 3 ]]$e1wc ) ) ) print( all.equal( mf2, model.frame( fit3sls[[ 3 ]]$e1wc$eq[[ 2 ]] ) ) ) print( all.equal( mf, model.frame( fit3sls[[ 4 ]]$e2e ) ) ) print( all.equal( mf2, model.frame( fit3sls[[ 4 ]]$e2e$eq[[ 2 ]] ) ) ) print( all.equal( mf, model.frame( fit3sls[[ 5 ]]$e3 ) ) ) print( all.equal( mf1, model.frame( fit3sls[[ 5 ]]$e3$eq[[ 1 ]] ) ) ) print( all.equal( mf, model.frame( fit3sls[[ 1 ]]$e4e ) ) ) print( all.equal( mf2, model.frame( fit3sls[[ 1 ]]$e4e$eq[[ 2 ]] ) ) ) print( all.equal( mf, model.frame( fit3sls[[ 2 ]]$e5 ) ) ) print( all.equal( mf1, model.frame( fit3sls[[ 3 ]]$e5$eq[[ 1 ]] ) ) ) print( all.equal( mf, model.frame( fit3slsi[[ 4 ]]$e3e ) ) ) print( all.equal( mf1, model.frame( fit3slsi[[ 4 ]]$e3e$eq[[ 1 ]] ) ) ) print( all.equal( mf, model.frame( fit3slsd[[ 5 ]]$e4 ) ) ) print( all.equal( mf2, model.frame( fit3slsd[[ 5 ]]$e4$eq[[ 2 ]] ) ) ) fit3sls[[ 3 ]]$e1c$eq[[ 1 ]]$modelInst fit3sls[[ 3 ]]$e1c$eq[[ 2 ]]$modelInst fit3sls[[ 1 ]]$e3$eq[[ 1 ]]$modelInst fit3sls[[ 1 ]]$e3$eq[[ 2 ]]$modelInst fit3slsd[[ 5 ]]$e4$eq[[ 1 ]]$modelInst fit3slsd[[ 5 ]]$e4$eq[[ 2 ]]$modelInst ## **************** model matrix ************************ # with x (returnModelMatrix) = TRUE print( !is.null( fit3sls[[ 4 ]]$e1c$eq[[ 1 ]]$x ) ) print( mm <- model.matrix( fit3sls[[ 4 ]]$e1c ) ) print( mm1 <- model.matrix( fit3sls[[ 4 ]]$e1c$eq[[ 1 ]] ) ) print( mm2 <- model.matrix( fit3sls[[ 4 ]]$e1c$eq[[ 2 ]] ) ) # with x (returnModelMatrix) = FALSE print( all.equal( mm, model.matrix( fit3sls[[ 4 ]]$e1wc ) ) ) print( all.equal( mm1, model.matrix( fit3sls[[ 4 ]]$e1wc$eq[[ 1 ]] ) ) ) print( all.equal( mm2, model.matrix( fit3sls[[ 4 ]]$e1wc$eq[[ 2 ]] ) ) ) print( !is.null( fit3sls[[ 4 ]]$e1wc$eq[[ 1 ]]$x ) ) # with x (returnModelMatrix) = TRUE print( !is.null( fit3sls[[ 5 ]]$e2$eq[[ 1 ]]$x ) ) print( all.equal( mm, model.matrix( fit3sls[[ 5 ]]$e2 ) ) ) print( all.equal( mm1, model.matrix( fit3sls[[ 5 ]]$e2$eq[[ 1 ]] ) ) ) print( all.equal( mm2, model.matrix( fit3sls[[ 5 ]]$e2$eq[[ 2 ]] ) ) ) # with x (returnModelMatrix) = FALSE print( all.equal( mm, model.matrix( fit3sls[[ 5 ]]$e2e ) ) ) print( all.equal( mm1, model.matrix( fit3sls[[ 5 ]]$e2e$eq[[ 1 ]] ) ) ) print( all.equal( mm2, model.matrix( fit3sls[[ 5 ]]$e2e$eq[[ 2 ]] ) ) ) print( !is.null( fit3sls[[ 5 ]]$e1wc$e2e[[ 1 ]]$x ) ) # with x (returnModelMatrix) = TRUE print( !is.null( fit3sls[[ 1 ]]$e3e$eq[[ 1 ]]$x ) ) print( all.equal( mm, model.matrix( fit3sls[[ 1 ]]$e3e ) ) ) print( all.equal( mm1, model.matrix( fit3sls[[ 1 ]]$e3e$eq[[ 1 ]] ) ) ) print( all.equal( mm2, model.matrix( fit3sls[[ 1 ]]$e3e$eq[[ 2 ]] ) ) ) # with x (returnModelMatrix) = FALSE print( all.equal( mm, model.matrix( fit3sls[[ 1 ]]$e3 ) ) ) print( all.equal( mm1, model.matrix( fit3sls[[ 1 ]]$e3$eq[[ 1 ]] ) ) ) print( all.equal( mm2, model.matrix( fit3sls[[ 1 ]]$e3$eq[[ 2 ]] ) ) ) print( !is.null( fit3sls[[ 1 ]]$e3$eq[[ 1 ]]$x ) ) # with x (returnModelMatrix) = TRUE print( !is.null( fit3slsi[[ 2 ]]$e4$eq[[ 1 ]]$x ) ) print( all.equal( mm, model.matrix( fit3slsi[[ 2 ]]$e4 ) ) ) print( all.equal( mm1, model.matrix( fit3slsi[[ 2 ]]$e4$eq[[ 1 ]] ) ) ) print( all.equal( mm2, model.matrix( fit3slsi[[ 2 ]]$e4$eq[[ 2 ]] ) ) ) # with x (returnModelMatrix) = FALSE print( all.equal( mm, model.matrix( fit3slsi[[ 2 ]]$e4we ) ) ) print( all.equal( mm1, model.matrix( fit3slsi[[ 2 ]]$e4we$eq[[ 1 ]] ) ) ) print( all.equal( mm2, model.matrix( fit3slsi[[ 2 ]]$e4we$eq[[ 2 ]] ) ) ) print( !is.null( fit3slsi[[ 2 ]]$e1wc$e4we[[ 1 ]]$x ) ) # with x (returnModelMatrix) = TRUE print( !is.null( fit3slsi[[ 5 ]]$e5w$eq[[ 1 ]]$x ) ) print( all.equal( mm, model.matrix( fit3slsi[[ 5 ]]$e5w ) ) ) print( all.equal( mm1, model.matrix( fit3slsi[[ 5 ]]$e5w$eq[[ 1 ]] ) ) ) print( all.equal( mm2, model.matrix( fit3slsi[[ 5 ]]$e5w$eq[[ 2 ]] ) ) ) # with x (returnModelMatrix) = FALSE print( all.equal( mm, model.matrix( fit3slsi[[ 5 ]]$e5 ) ) ) print( all.equal( mm1, model.matrix( fit3slsi[[ 5 ]]$e5$eq[[ 1 ]] ) ) ) print( all.equal( mm2, model.matrix( fit3slsi[[ 5 ]]$e5$eq[[ 2 ]] ) ) ) print( !is.null( fit3slsi[[ 5 ]]$e5$eq[[ 1 ]]$x ) ) # with x (returnModelMatrix) = TRUE print( !is.null( fit3slsd[[ 3 ]]$e5e$eq[[ 1 ]]$x ) ) print( all.equal( mm, model.matrix( fit3slsd[[ 3 ]]$e5e ) ) ) print( all.equal( mm1, model.matrix( fit3slsd[[ 3 ]]$e5e$eq[[ 1 ]] ) ) ) print( all.equal( mm2, model.matrix( fit3slsd[[ 3 ]]$e5e$eq[[ 2 ]] ) ) ) # with x (returnModelMatrix) = FALSE print( all.equal( mm, model.matrix( fit3slsd[[ 3 ]]$e5we ) ) ) print( all.equal( mm1, model.matrix( fit3slsd[[ 3 ]]$e5we$eq[[ 1 ]] ) ) ) print( all.equal( mm2, model.matrix( fit3slsd[[ 3 ]]$e5we$eq[[ 2 ]] ) ) ) print( !is.null( fit3sls[[ 3 ]]$e5we$eq[[ 1 ]]$x ) ) # with x (returnModelMatrix) = TRUE print( !is.null( fit3slsd[[ 2 ]]$e3w$eq[[ 1 ]]$x ) ) print( all.equal( mm, model.matrix( fit3slsd[[ 2 ]]$e3w ) ) ) print( all.equal( mm1, model.matrix( fit3slsd[[ 2 ]]$e3w$eq[[ 1 ]] ) ) ) print( all.equal( mm2, model.matrix( fit3slsd[[ 2 ]]$e3w$eq[[ 2 ]] ) ) ) # with x (returnModelMatrix) = FALSE print( all.equal( mm, model.matrix( fit3slsd[[ 2 ]]$e3 ) ) ) print( all.equal( mm1, model.matrix( fit3slsd[[ 2 ]]$e3$eq[[ 1 ]] ) ) ) print( all.equal( mm2, model.matrix( fit3slsd[[ 2 ]]$e3$eq[[ 2 ]] ) ) ) print( !is.null( fit3slsd[[ 2 ]]$e3$eq[[ 1 ]]$x ) ) # matrices of instrumental variables model.matrix( fit3sls[[ 1 ]]$e1c, which = "z" ) model.matrix( fit3sls[[ 3 ]]$e1c$eq[[ 1 ]], which = "z" ) model.matrix( fit3sls[[ 4 ]]$e1c$eq[[ 2 ]], which = "z" ) # matrices of fitted regressors model.matrix( fit3slsd[[ 1 ]]$e3w, which = "xHat" ) model.matrix( fit3slsd[[ 3 ]]$e3w$eq[[ 1 ]], which = "xHat" ) model.matrix( fit3slsd[[ 4 ]]$e3w$eq[[ 2 ]], which = "xHat" ) ## **************** formulas ************************ formula( fit3sls[[ 2 ]]$e1c ) formula( fit3sls[[ 2 ]]$e1c$eq[[ 1 ]] ) formula( fit3sls[[ 3 ]]$e2e ) formula( fit3sls[[ 3 ]]$e2e$eq[[ 2 ]] ) formula( fit3sls[[ 4 ]]$e3 ) formula( fit3sls[[ 4 ]]$e3$eq[[ 1 ]] ) formula( fit3sls[[ 5 ]]$e4e ) formula( fit3sls[[ 5 ]]$e4e$eq[[ 2 ]] ) formula( fit3sls[[ 1 ]]$e5 ) formula( fit3sls[[ 1 ]]$e5$eq[[ 1 ]] ) formula( fit3slsi[[ 3 ]]$e3e ) formula( fit3slsi[[ 3 ]]$e3e$eq[[ 1 ]] ) formula( fit3slsd[[ 4 ]]$e4 ) formula( fit3slsd[[ 4 ]]$e4$eq[[ 2 ]] ) formula( fit3slsd[[ 2 ]]$e1w ) formula( fit3slsd[[ 2 ]]$e1w$eq[[ 1 ]] ) ## **************** model terms ******************* terms( fit3sls[[ 2 ]]$e1c ) terms( fit3sls[[ 2 ]]$e1c$eq[[ 1 ]] ) terms( fit3sls[[ 3 ]]$e2e ) terms( fit3sls[[ 3 ]]$e2e$eq[[ 2 ]] ) terms( fit3sls[[ 4 ]]$e3 ) terms( fit3sls[[ 4 ]]$e3$eq[[ 1 ]] ) terms( fit3sls[[ 5 ]]$e4e ) terms( fit3sls[[ 5 ]]$e4e$eq[[ 2 ]] ) terms( fit3sls[[ 1 ]]$e5 ) terms( fit3sls[[ 1 ]]$e5$eq[[ 1 ]] ) terms( fit3sls[[ 2 ]]$e4wSym ) terms( fit3sls[[ 2 ]]$e4wSym$eq[[ 1 ]] ) terms( fit3slsi[[ 3 ]]$e3e ) terms( fit3slsi[[ 3 ]]$e3e$eq[[ 1 ]] ) terms( fit3slsd[[ 4 ]]$e4 ) terms( fit3slsd[[ 4 ]]$e4$eq[[ 2 ]] ) terms( fit3slsd[[ 5 ]]$e5we ) terms( fit3slsd[[ 5 ]]$e5we$eq[[ 2 ]] ) ## **************** terms of instruments ******************* fit3sls[[ 2 ]]$e1c$eq[[ 1 ]]$termsInst fit3sls[[ 3 ]]$e2e$eq[[ 2 ]]$termsInst fit3sls[[ 4 ]]$e3$eq[[ 1 ]]$termsInst fit3sls[[ 5 ]]$e4e$eq[[ 2 ]]$termsInst fit3sls[[ 1 ]]$e5$eq[[ 1 ]]$termsInst fit3sls[[ 2 ]]$e4wSym$eq[[ 1 ]]$termsInst fit3slsi[[ 3 ]]$e3e$eq[[ 1 ]]$termsInst fit3slsd[[ 4 ]]$e4$eq[[ 2 ]]$termsInst fit3slsd[[ 5 ]]$e5we$eq[[ 2 ]]$termsInst ## **************** estfun ************************ library( "sandwich" ) estfun( fit3sls[[ 1 ]]$e1 ) round( colSums( estfun( fit3sls[[ 1 ]]$e1 ) ), digits = 7 ) estfun( fit3sls[[ 2 ]]$e1e ) round( colSums( estfun( fit3sls[[ 2 ]]$e1e ) ), digits = 7 ) estfun( fit3sls[[ 3 ]]$e1c ) round( colSums( estfun( fit3sls[[ 3 ]]$e1c ) ), digits = 7 ) estfun( fit3sls[[ 4 ]]$e1wc ) round( colSums( estfun( fit3sls[[ 5 ]]$e1wc ) ), digits = 7 ) round( colSums( estfun( fit3sls[[ 5 ]]$e1wc, residFit = FALSE ) ), digits = 7 ) round( colSums( estfun( fit3sls[[ 4 ]]$e1wc ) ), digits = 7 ) round( colSums( estfun( fit3sls[[ 4 ]]$e1wc, residFit = FALSE ) ), digits = 7 ) round( colSums( estfun( fit3sls[[ 3 ]]$e1wc ) ), digits = 7 ) round( colSums( estfun( fit3sls[[ 3 ]]$e1wc, residFit = FALSE ) ), digits = 7 ) round( colSums( estfun( fit3sls[[ 2 ]]$e1wc ) ), digits = 7 ) round( colSums( estfun( fit3sls[[ 2 ]]$e1wc, residFit = FALSE ) ), digits = 7 ) round( colSums( estfun( fit3sls[[ 1 ]]$e1wc ) ), digits = 7 ) round( colSums( estfun( fit3sls[[ 1 ]]$e1wc, residFit = FALSE ) ), digits = 7 ) estfun( fit3slsd[[ 5 ]]$e1w ) estfun( fit3slsd[[ 5 ]]$e1w, residFit = FALSE ) round( colSums( estfun( fit3slsd[[ 5 ]]$e1w ) ), digits = 7 ) round( colSums( estfun( fit3slsd[[ 5 ]]$e1w, residFit = FALSE ) ), digits = 7 ) round( colSums( estfun( fit3slsd[[ 4 ]]$e1w ) ), digits = 7 ) round( colSums( estfun( fit3slsd[[ 4 ]]$e1w, residFit = FALSE ) ), digits = 7 ) round( colSums( estfun( fit3slsd[[ 3 ]]$e1w ) ), digits = 7 ) round( colSums( estfun( fit3slsd[[ 3 ]]$e1w, residFit = FALSE ) ), digits = 7 ) round( colSums( estfun( fit3slsd[[ 2 ]]$e1w ) ), digits = 7 ) round( colSums( estfun( fit3slsd[[ 2 ]]$e1w, residFit = FALSE ) ), digits = 7 ) round( colSums( estfun( fit3slsd[[ 1 ]]$e1w ) ), digits = 7 ) round( colSums( estfun( fit3slsd[[ 1 ]]$e1w, residFit = FALSE ) ), digits = 7 ) ## **************** bread ************************ bread( fit3sls[[ 1 ]]$e1 ) bread( fit3sls[[ 2 ]]$e1e ) bread( fit3sls[[ 3 ]]$e1c ) bread( fit3sls[[ 4 ]]$e1wc ) bread( fit3slsd[[ 5 ]]$e1w ) bread( fit3slsd[[ 4 ]]$e1w ) bread( fit3slsd[[ 3 ]]$e1w ) bread( fit3slsd[[ 2 ]]$e1w ) bread( fit3slsd[[ 1 ]]$e1w ) systemfit/tests/KleinI_noMat.R0000644000176200001440000000723212565323166016114 0ustar liggesuserslibrary( "systemfit" ) options( warn = 1 ) options( digits = 3 ) data( "KleinI" ) eqConsump <- consump ~ corpProf + corpProfLag + wages eqInvest <- invest ~ corpProf + corpProfLag + capitalLag eqPrivWage <- privWage ~ gnp + gnpLag + trend inst <- ~ govExp + taxes + govWage + trend + capitalLag + corpProfLag + gnpLag system <- list( Consumption = eqConsump, Investment = eqInvest, PrivateWages = eqPrivWage ) restrict <- c( "Consumption_corpProf + Investment_capitalLag = 0" ) restrict2 <- c( restrict, "Consumption_corpProfLag - PrivateWages_trend = 0" ) for( dataNo in 1:5 ) { # set some values of some variables to NA if( dataNo == 2 ) { KleinI$gnpLag[ 7 ] <- NA } else if( dataNo == 3 ) { KleinI$wages[ 10 ] <- NA } else if( dataNo == 4 ) { KleinI$corpProf[ 13 ] <- NA } else if( dataNo == 5 ) { KleinI$invest[ 16 ] <- NA } # single-equation OLS lmConsump <- lm( eqConsump, data = KleinI ) lmInvest <- lm( eqInvest, data = KleinI ) lmPrivWage <- lm( eqPrivWage, data = KleinI ) for( methodNo in 1:5 ) { method <- c( "OLS", "2SLS", "SUR", "3SLS", "3SLS" )[ methodNo ] maxit <- ifelse( methodNo == 5, 500, 1 ) cat( "> \n> # ", ifelse( maxit == 1, "", "I" ), method, "\n", sep = "" ) if( method %in% c( "OLS", "WLS", "SUR" ) ) { kleinModel <- systemfit( system, method = method, data = KleinI, methodResidCov = ifelse( method == "OLS", "geomean", "noDfCor" ), maxit = maxit, useMatrix = FALSE ) } else { kleinModel <- systemfit( system, method = method, data = KleinI, inst = inst, methodResidCov = "noDfCor", maxit = maxit, useMatrix = FALSE ) } cat( "> summary\n" ) print( summary( kleinModel ) ) if( method == "OLS" ) { cat( "compare coef with single-equation OLS\n" ) print( all.equal( coef( kleinModel ), c( coef( lmConsump ), coef( lmInvest ), coef( lmPrivWage ) ), check.attributes = FALSE ) ) } cat( "> residuals\n" ) print( residuals( kleinModel ) ) cat( "> fitted\n" ) print( fitted( kleinModel ) ) cat( "> predict\n" ) print( predict( kleinModel, se.fit = TRUE, interval = ifelse( methodNo %in% c( 1, 4 ), "prediction", "confidence" ), useDfSys = methodNo %in% c( 1, 3, 5 ) ) ) cat( "> model.frame\n" ) if( methodNo == 1 ) { mfOls <- model.frame( kleinModel ) print( mfOls ) } else if( methodNo == 2 ) { mf2sls <- model.frame( kleinModel ) print( mf2sls ) } else if( methodNo == 3 ) { print( all.equal( mfOls, model.frame( kleinModel ) ) ) } else { print( all.equal( mf2sls, model.frame( kleinModel ) ) ) } cat( "> model.matrix\n" ) if( methodNo == 1 ) { mmOls <- model.matrix( kleinModel ) print( mmOls ) } else { print( all.equal( mmOls, model.matrix( kleinModel ) ) ) } cat( "> nobs\n" ) print( nobs( kleinModel ) ) cat( "> linearHypothesis\n" ) print( linearHypothesis( kleinModel, restrict ) ) print( linearHypothesis( kleinModel, restrict, test = "F" ) ) print( linearHypothesis( kleinModel, restrict, test = "Chisq" ) ) print( linearHypothesis( kleinModel, restrict2 ) ) print( linearHypothesis( kleinModel, restrict2, test = "F" ) ) print( linearHypothesis( kleinModel, restrict2, test = "Chisq" ) ) cat( "> logLik\n" ) print( logLik( kleinModel ) ) print( logLik( kleinModel, residCovDiag = TRUE ) ) if( method == "OLS" ) { cat( "compare log likelihood value with single-equation OLS\n" ) print( all.equal( logLik( kleinModel, residCovDiag = TRUE ), logLik( lmConsump ) + logLik( lmInvest ) + logLik( lmPrivWage ), check.attributes = FALSE ) ) } } } systemfit/tests/test_wls.R0000644000176200001440000006570312565330201015442 0ustar liggesuserslibrary( systemfit ) options( digits = 3 ) data( "Kmenta" ) useMatrix <- FALSE demand <- consump ~ price + income supply <- consump ~ price + farmPrice + trend system <- list( demand = demand, supply = supply ) restrm <- matrix(0,1,7) # restriction matrix "R" restrm[1,3] <- 1 restrm[1,7] <- -1 restrict <- "demand_income - supply_trend = 0" restr2m <- matrix(0,2,7) # restriction matrix "R" 2 restr2m[1,3] <- 1 restr2m[1,7] <- -1 restr2m[2,2] <- -1 restr2m[2,5] <- 1 restr2q <- c( 0, 0.5 ) # restriction vector "q" 2 restrict2 <- c( "demand_income - supply_trend = 0", "- demand_price + supply_price = 0.5" ) tc <- matrix(0,7,6) tc[1,1] <- 1 tc[2,2] <- 1 tc[3,3] <- 1 tc[4,4] <- 1 tc[5,5] <- 1 tc[6,6] <- 1 tc[7,3] <- 1 restr3m <- matrix(0,1,6) # restriction matrix "R" 2 restr3m[1,2] <- -1 restr3m[1,5] <- 1 restr3q <- c( 0.5 ) # restriction vector "q" 2 restrict3 <- "- C2 + C5 = 0.5" ## ******* single-equation OLS estimations ********************* lmDemand <- lm( demand, data = Kmenta ) lmSupply <- lm( supply, data = Kmenta ) ## *************** WLS estimation ************************ fitwls1 <- systemfit( system, "WLS", data = Kmenta, useMatrix = useMatrix ) print( summary( fitwls1 ) ) all.equal( coef( fitwls1 ), c( coef( lmDemand ), coef( lmSupply ) ), check.attributes = FALSE ) all.equal( coef( summary( fitwls1 ) ), rbind( coef( summary( lmDemand ) ), coef( summary( lmSupply ) ) ), check.attributes = FALSE ) all.equal( vcov( fitwls1 ), as.matrix( bdiag( vcov( lmDemand ), vcov( lmSupply ) ) ), check.attributes = FALSE ) ## *************** WLS estimation (EViews-like) ************************ fitwls1e <- systemfit( system, "WLS", data = Kmenta, methodResidCov = "noDfCor", x = TRUE, useMatrix = useMatrix ) print( summary( fitwls1e, useDfSys = TRUE ) ) all.equal( coef( fitwls1e ), c( coef( lmDemand ), coef( lmSupply ) ), check.attributes = FALSE ) ## ************** WLS with cross-equation restriction *************** fitwls2 <- systemfit( system, "WLS", data = Kmenta, restrict.matrix = restrm, x = TRUE, useMatrix = useMatrix ) print( summary( fitwls2 ) ) # the same with symbolically specified restrictions fitwls2Sym <- systemfit( system, "WLS", data = Kmenta, restrict.matrix = restrict, x = TRUE, useMatrix = useMatrix ) all.equal( fitwls2, fitwls2Sym ) ## ************** WLS with cross-equation restriction (EViews-like) ******* fitwls2e <- systemfit( system, "WLS", data = Kmenta, restrict.matrix = restrm, methodResidCov = "noDfCor", useMatrix = useMatrix ) print( summary( fitwls2e ) ) ## ******* WLS with cross-equation restriction via restrict.regMat ********** fitwls3 <- systemfit( system,"WLS", data = Kmenta, restrict.regMat = tc, x = TRUE, useMatrix = useMatrix ) print( summary( fitwls3 ) ) ## ******* WLS with cross-equation restriction via restrict.regMat (EViews-like) ***** fitwls3e <- systemfit( system,"WLS", data = Kmenta, restrict.regMat = tc, methodResidCov = "noDfCor", useMatrix = useMatrix ) print( summary( fitwls3e ) ) ## ***** WLS with 2 cross-equation restrictions *************** fitwls4 <- systemfit( system,"WLS", data = Kmenta, restrict.matrix = restr2m, restrict.rhs = restr2q, useMatrix = useMatrix ) print( summary( fitwls4 ) ) # the same with symbolically specified restrictions fitwls4Sym <- systemfit( system, "WLS", data = Kmenta, restrict.matrix = restrict2, useMatrix = useMatrix ) all.equal( fitwls4, fitwls4Sym ) ## ***** WLS with 2 cross-equation restrictions (EViews-like) ********** fitwls4e <- systemfit( system,"WLS", data = Kmenta, methodResidCov = "noDfCor", restrict.matrix = restr2m, restrict.rhs = restr2q, x = TRUE, useMatrix = useMatrix ) print( summary( fitwls4e ) ) ## *********** WLS with 2 cross-equation restrictions via R and restrict.regMat ****** fitwls5 <- systemfit( system, "WLS", data = Kmenta, restrict.matrix = restr3m, restrict.rhs = restr3q, restrict.regMat = tc, x = TRUE, useMatrix = useMatrix ) print( summary( fitwls5 ) ) # the same with symbolically specified restrictions fitwls5Sym <- systemfit( system, "WLS", data = Kmenta, restrict.matrix = restrict3, restrict.regMat = tc, x = TRUE, useMatrix = useMatrix ) all.equal( fitwls5, fitwls5Sym ) ## *********** WLS with 2 cross-equation restrictions via R and restrict.regMat (EViews-like) fitwls5e <- systemfit( system, "WLS", data = Kmenta, methodResidCov = "noDfCor", restrict.matrix = restr3m, restrict.rhs = restr3q, restrict.regMat = tc, useMatrix = useMatrix ) print( summary( fitwls5e ) ) ## *************** iterated WLS estimation ********************* fitwlsi1 <- systemfit( system, "WLS", data = Kmenta, maxit = 100, useMatrix = useMatrix ) print( summary( fitwlsi1, useDfSys = TRUE ) ) ## *************** iterated WLS estimation (EViews-like) ************ fitwlsi1e <- systemfit( system, "WLS", data = Kmenta, methodResidCov = "noDfCor", maxit = 100, x = TRUE, useMatrix = useMatrix ) print( summary( fitwlsi1e, useDfSys = TRUE ) ) ## ****** iterated WLS with cross-equation restriction *************** fitwlsi2 <- systemfit( system, "WLS", data = Kmenta, restrict.matrix = restrm, maxit = 100, x = TRUE, useMatrix = useMatrix ) print( summary( fitwlsi2 ) ) ## ****** iterated WLS with cross-equation restriction (EViews-like) ******** fitwlsi2e <- systemfit( system, "WLS", data = Kmenta, restrict.matrix = restrm, methodResidCov = "noDfCor", maxit = 100, useMatrix = useMatrix ) print( summary( fitwlsi2e ) ) ## ******* iterated WLS with cross-equation restriction via restrict.regMat ********** fitwlsi3 <- systemfit( system, "WLS", data = Kmenta, restrict.regMat = tc, maxit = 100, x = TRUE, useMatrix = useMatrix ) print( summary( fitwlsi3 ) ) ## ******* iterated WLS with cross-equation restriction via restrict.regMat (EViews-like) *** fitwlsi3e <- systemfit( system, "WLS", data = Kmenta, restrict.regMat = tc, methodResidCov = "noDfCor", maxit = 100, useMatrix = useMatrix ) print( summary( fitwlsi3e ) ) nobs( fitwlsi3e ) ## ******* iterated WLS with 2 cross-equation restrictions *********** fitwlsi4 <- systemfit( system, "WLS", data = Kmenta, restrict.matrix = restr2m, restrict.rhs = restr2q, maxit = 100, useMatrix = useMatrix ) print( summary( fitwlsi4 ) ) ## ******* iterated WLS with 2 cross-equation restrictions (EViews-like) ***** fitwlsi4e <- systemfit( system, "WLS", data = Kmenta, methodResidCov = "noDfCor", restrict.matrix = restr2m, restrict.rhs = restr2q, maxit = 100, x = TRUE, useMatrix = useMatrix ) print( summary( fitwlsi4e ) ) ## ***** iterated WLS with 2 cross-equation restrictions via R and restrict.regMat ****** fitwlsi5 <- systemfit( system, "WLS", data = Kmenta, restrict.matrix = restr3m, restrict.rhs = restr3q, restrict.regMat = tc, maxit = 100, x = TRUE, useMatrix = useMatrix ) print( summary( fitwlsi5 ) ) ## *** iterated WLS with 2 cross-equation restrictions via R and restrict.regMat (EViews-like) fitwlsi5e <- systemfit( system, "WLS", data = Kmenta, methodResidCov = "noDfCor", restrict.matrix = restr3m, restrict.rhs = restr3q, restrict.regMat = tc, maxit = 100, useMatrix = useMatrix ) print( summary( fitwlsi5e ) ) ## *********** estimations with a single regressor ************ fitwlsS1 <- systemfit( list( consump ~ price - 1, consump ~ price + trend ), "WLS", data = Kmenta, useMatrix = useMatrix ) print( summary( fitwlsS1 ) ) fitwlsS2 <- systemfit( list( consump ~ price - 1, consump ~ trend - 1 ), "WLS", data = Kmenta, useMatrix = useMatrix ) print( summary( fitwlsS2 ) ) fitwlsS3 <- systemfit( list( consump ~ trend - 1, price ~ trend - 1 ), "WLS", data = Kmenta, useMatrix = useMatrix ) print( summary( fitwlsS3 ) ) fitwlsS4 <- systemfit( list( consump ~ trend - 1, price ~ trend - 1 ), "WLS", data = Kmenta, restrict.matrix = matrix( c( 1, -1 ), nrow = 1 ), useMatrix = useMatrix ) print( summary( fitwlsS4 ) ) fitwlsS5 <- systemfit( list( consump ~ 1, price ~ 1 ), "WLS", data = Kmenta, useMatrix = useMatrix ) print( summary( fitwlsS5) ) ## **************** shorter summaries ********************** print( summary( fitwls1 ), residCov = FALSE, equations = FALSE ) print( summary( fitwls2e, useDfSys = FALSE, residCov = FALSE ), equations = FALSE ) print( summary( fitwls3 ), residCov = FALSE ) print( summary( fitwls4e, residCov = FALSE, equations = FALSE ) ) print( summary( fitwls5, useDfSys = FALSE ), residCov = FALSE ) print( summary( fitwlsi1e, useDfSys = TRUE, equations = FALSE ) ) print( summary( fitwlsi2, equations = FALSE, residCov = FALSE ), residCov = TRUE ) print( summary( fitwlsi3e ), equations = FALSE, residCov = FALSE ) print( summary( fitwlsi4, equations = FALSE ), equations = TRUE ) print( summary( fitwlsi5e, useDfSys = FALSE, residCov = FALSE ) ) ## ****************** residuals ************************** print( residuals( fitwls1 ) ) print( residuals( fitwls1$eq[[ 2 ]] ) ) print( residuals( fitwls2e ) ) print( residuals( fitwls2e$eq[[ 1 ]] ) ) print( residuals( fitwls3 ) ) print( residuals( fitwls3$eq[[ 2 ]] ) ) print( residuals( fitwls4e ) ) print( residuals( fitwls4e$eq[[ 1 ]] ) ) print( residuals( fitwls5 ) ) print( residuals( fitwls5$eq[[ 2 ]] ) ) print( residuals( fitwlsi1e ) ) print( residuals( fitwlsi1e$eq[[ 1 ]] ) ) print( residuals( fitwlsi2 ) ) print( residuals( fitwlsi2$eq[[ 2 ]] ) ) print( residuals( fitwlsi3e ) ) print( residuals( fitwlsi3e$eq[[ 1 ]] ) ) print( residuals( fitwlsi4 ) ) print( residuals( fitwlsi4$eq[[ 2 ]] ) ) print( residuals( fitwlsi5e ) ) print( residuals( fitwlsi5e$eq[[ 1 ]] ) ) ## *************** coefficients ********************* print( round( coef( fitwls1e ), digits = 6 ) ) print( round( coef( fitwls1e$eq[[ 1 ]] ), digits = 6 ) ) print( round( coef( fitwlsi2 ), digits = 6 ) ) print( round( coef( fitwlsi2$eq[[ 2 ]] ), digits = 6 ) ) print( round( coef( fitwls3e ), digits = 6 ) ) print( round( coef( fitwls3e, modified.regMat = TRUE ), digits = 6 ) ) print( round( coef( fitwls3e$eq[[ 1 ]] ), digits = 6 ) ) print( round( coef( fitwls4 ), digits = 6 ) ) print( round( coef( fitwls4$eq[[ 2 ]] ), digits = 6 ) ) print( round( coef( fitwlsi5 ), digits = 6 ) ) print( round( coef( fitwlsi5, modified.regMat = TRUE ), digits = 6 ) ) print( round( coef( fitwlsi5$eq[[ 1 ]] ), digits = 6 ) ) ## *************** coefficients with stats ********************* print( round( coef( summary( fitwls1e ) ), digits = 6 ) ) print( round( coef( summary( fitwls1e$eq[[ 1 ]] ) ), digits = 6 ) ) print( round( coef( summary( fitwlsi2 ) ), digits = 6 ) ) print( round( coef( summary( fitwlsi2$eq[[ 2 ]] ) ), digits = 6 ) ) print( round( coef( summary( fitwls3e ) ), digits = 6 ) ) print( round( coef( summary( fitwls3e ), modified.regMat = TRUE ), digits = 6 ) ) print( round( coef( summary( fitwls3e$eq[[ 1 ]] ) ), digits = 6 ) ) print( round( coef( summary( fitwls4, useDfSys = FALSE ) ), digits = 6 ) ) print( round( coef( summary( fitwls4$eq[[ 2 ]], useDfSys = FALSE ) ), digits = 6 ) ) print( round( coef( summary( fitwlsi5, useDfSys = FALSE ) ), digits = 6 ) ) print( round( coef( summary( fitwlsi5, useDfSys = FALSE ), modified.regMat = TRUE ), digits = 6 ) ) print( round( coef( summary( fitwlsi5$eq[[ 1 ]], useDfSys = FALSE ) ), digits = 6 ) ) ## *********** variance covariance matrix of the coefficients ******* print( round( vcov( fitwls1e ), digits = 6 ) ) print( round( vcov( fitwls1e$eq[[ 1 ]] ), digits = 6 ) ) print( round( vcov( fitwls2 ), digits = 6 ) ) print( round( vcov( fitwls2$eq[[ 2 ]] ), digits = 6 ) ) print( round( vcov( fitwls3e ), digits = 6 ) ) print( round( vcov( fitwls3e, modified.regMat = TRUE ), digits = 6 ) ) print( round( vcov( fitwls3e$eq[[ 1 ]] ), digits = 6 ) ) print( round( vcov( fitwls4 ), digits = 6 ) ) print( round( vcov( fitwls4$eq[[ 2 ]] ), digits = 6 ) ) print( round( vcov( fitwls5 ), digits = 6 ) ) print( round( vcov( fitwls5, modified.regMat = TRUE ), digits = 6 ) ) print( round( vcov( fitwls5$eq[[ 1 ]] ), digits = 6 ) ) print( round( vcov( fitwlsi1 ), digits = 6 ) ) print( round( vcov( fitwlsi1$eq[[ 2 ]] ), digits = 6 ) ) print( round( vcov( fitwlsi2e ), digits = 6 ) ) print( round( vcov( fitwlsi2e$eq[[ 1 ]] ), digits = 6 ) ) print( round( vcov( fitwlsi3 ), digits = 6 ) ) print( round( vcov( fitwlsi3, modified.regMat = TRUE ), digits = 6 ) ) print( round( vcov( fitwlsi3$eq[[ 2 ]] ), digits = 6 ) ) print( round( vcov( fitwlsi4e ), digits = 6 ) ) print( round( vcov( fitwlsi4e$eq[[ 1 ]] ), digits = 6 ) ) print( round( vcov( fitwlsi5e ), digits = 6 ) ) print( round( vcov( fitwlsi5e, modified.regMat = TRUE ), digits = 6 ) ) print( round( vcov( fitwlsi5e$eq[[ 2 ]] ), digits = 6 ) ) ## *********** confidence intervals of coefficients ************* print( confint( fitwls1 ) ) print( confint( fitwls1$eq[[ 2 ]], level = 0.9 ) ) print( confint( fitwls2e, level = 0.9 ) ) print( confint( fitwls2e$eq[[ 1 ]], level = 0.99 ) ) print( confint( fitwls3, level = 0.99 ) ) print( confint( fitwls3$eq[[ 2 ]], level = 0.5 ) ) print( confint( fitwls4e, level = 0.5 ) ) print( confint( fitwls4e$eq[[ 1 ]], level = 0.25 ) ) print( confint( fitwls5, level = 0.25 ) ) print( confint( fitwls5$eq[[ 2 ]], level = 0.975 ) ) print( confint( fitwlsi1e, level = 0.975, useDfSys = TRUE ) ) print( confint( fitwlsi1e$eq[[ 1 ]], level = 0.999, useDfSys = TRUE ) ) print( confint( fitwlsi2, level = 0.999 ) ) print( confint( fitwlsi2$eq[[ 2 ]], level = 0.1 ) ) print( confint( fitwlsi3e, level = 0.1 ) ) print( confint( fitwlsi3e$eq[[ 1 ]], level = 0.01 ) ) print( confint( fitwlsi4, level = 0.01 ) ) print( confint( fitwlsi4$eq[[ 2 ]], level = 0.33 ) ) print( confint( fitwlsi5e, level = 0.33 ) ) print( confint( fitwlsi5e$eq[[ 1 ]] ) ) ## *********** fitted values ************* print( fitted( fitwls1 ) ) print( fitted( fitwls1$eq[[ 2 ]] ) ) print( fitted( fitwls2e ) ) print( fitted( fitwls2e$eq[[ 1 ]] ) ) print( fitted( fitwls3 ) ) print( fitted( fitwls3$eq[[ 2 ]] ) ) print( fitted( fitwls4e ) ) print( fitted( fitwls4e$eq[[ 1 ]] ) ) print( fitted( fitwls5 ) ) print( fitted( fitwls5$eq[[ 2 ]] ) ) print( fitted( fitwlsi1e ) ) print( fitted( fitwlsi1e$eq[[ 1 ]] ) ) print( fitted( fitwlsi2 ) ) print( fitted( fitwlsi2$eq[[ 2 ]] ) ) print( fitted( fitwlsi3e ) ) print( fitted( fitwlsi3e$eq[[ 1 ]] ) ) print( fitted( fitwlsi4 ) ) print( fitted( fitwlsi4$eq[[ 2 ]] ) ) print( fitted( fitwlsi5e ) ) print( fitted( fitwlsi5e$eq[[ 1 ]] ) ) ## *********** predicted values ************* predictData <- Kmenta predictData$consump <- NULL predictData$price <- Kmenta$price * 0.9 predictData$income <- Kmenta$income * 1.1 print( predict( fitwls1, se.fit = TRUE, interval = "prediction" ) ) print( predict( fitwls1$eq[[ 2 ]], se.fit = TRUE, interval = "prediction" ) ) print( predict( fitwls2e, se.pred = TRUE, interval = "confidence", level = 0.999, newdata = predictData ) ) print( predict( fitwls2e$eq[[ 1 ]], se.pred = TRUE, interval = "confidence", level = 0.999, newdata = predictData ) ) print( predict( fitwls3, se.pred = TRUE, interval = "prediction", level = 0.975 ) ) print( predict( fitwls3$eq[[ 2 ]], se.pred = TRUE, interval = "prediction", level = 0.975 ) ) print( predict( fitwls4e, se.fit = TRUE, interval = "confidence", level = 0.25 ) ) print( predict( fitwls4e$eq[[ 1 ]], se.fit = TRUE, interval = "confidence", level = 0.25 ) ) print( predict( fitwls5, se.fit = TRUE, se.pred = TRUE, interval = "prediction", level = 0.5, newdata = predictData ) ) print( predict( fitwls5$eq[[ 2 ]], se.fit = TRUE, se.pred = TRUE, interval = "prediction", level = 0.5, newdata = predictData ) ) print( predict( fitwlsi1e, se.fit = TRUE, se.pred = TRUE, interval = "confidence", level = 0.99, useDfSys = TRUE ) ) print( predict( fitwlsi1e$eq[[ 1 ]], se.fit = TRUE, se.pred = TRUE, interval = "confidence", level = 0.99, useDfSys = TRUE ) ) print( predict( fitwlsi2, se.fit = TRUE, interval = "prediction", level = 0.9, newdata = predictData ) ) print( predict( fitwlsi2$eq[[ 2 ]], se.fit = TRUE, interval = "prediction", level = 0.9, newdata = predictData ) ) print( predict( fitwlsi3e, interval = "prediction", level = 0.925 ) ) print( predict( fitwlsi3e$eq[[ 1 ]], interval = "prediction", level = 0.925 ) ) print( predict( fitwlsi4, interval = "confidence", newdata = predictData ) ) print( predict( fitwlsi4$eq[[ 2 ]], interval = "confidence", newdata = predictData ) ) print( predict( fitwlsi5e, se.fit = TRUE, se.pred = TRUE, interval = "prediction", level = 0.01 ) ) print( predict( fitwlsi5e$eq[[ 1 ]], se.fit = TRUE, se.pred = TRUE, interval = "prediction", level = 0.01 ) ) # predict just one observation smallData <- data.frame( price = 130, income = 150, farmPrice = 120, trend = 25 ) print( predict( fitwls1, newdata = smallData ) ) print( predict( fitwls1$eq[[ 1 ]], newdata = smallData ) ) print( predict( fitwls2e, se.fit = TRUE, level = 0.9, newdata = smallData ) ) print( predict( fitwls2e$eq[[ 1 ]], se.pred = TRUE, level = 0.99, newdata = smallData ) ) print( predict( fitwls3, interval = "prediction", level = 0.975, newdata = smallData ) ) print( predict( fitwls3$eq[[ 1 ]], interval = "confidence", level = 0.8, newdata = smallData ) ) print( predict( fitwls4e, se.fit = TRUE, interval = "confidence", level = 0.999, newdata = smallData ) ) print( predict( fitwls4e$eq[[ 2 ]], se.pred = TRUE, interval = "prediction", level = 0.75, newdata = smallData ) ) print( predict( fitwls5, se.fit = TRUE, interval = "prediction", newdata = smallData ) ) print( predict( fitwls5$eq[[ 1 ]], se.pred = TRUE, interval = "confidence", newdata = smallData ) ) print( predict( fitwlsi3e, se.fit = TRUE, se.pred = TRUE, interval = "prediction", level = 0.5, newdata = smallData ) ) print( predict( fitwlsi3e$eq[[ 1 ]], se.fit = TRUE, se.pred = TRUE, interval = "confidence", level = 0.25, newdata = smallData ) ) ## ************ correlation of predicted values *************** print( correlation.systemfit( fitwls1, 2, 1 ) ) print( correlation.systemfit( fitwls2e, 1, 2 ) ) print( correlation.systemfit( fitwls3, 2, 1 ) ) print( correlation.systemfit( fitwls4e, 1, 2 ) ) print( correlation.systemfit( fitwls5, 2, 1 ) ) print( correlation.systemfit( fitwlsi1e, 1, 2 ) ) print( correlation.systemfit( fitwlsi2, 2, 1 ) ) print( correlation.systemfit( fitwlsi3e, 1, 2 ) ) print( correlation.systemfit( fitwlsi4, 2, 1 ) ) print( correlation.systemfit( fitwlsi5e, 1, 2 ) ) ## ************ Log-Likelihood values *************** print( logLik( fitwls1 ) ) print( logLik( fitwls1, residCovDiag = TRUE ) ) all.equal( logLik( fitwls1, residCovDiag = TRUE ), logLik( lmDemand ) + logLik( lmSupply ), check.attributes = FALSE ) print( logLik( fitwls2e ) ) print( logLik( fitwls2e, residCovDiag = TRUE ) ) print( logLik( fitwls3 ) ) print( logLik( fitwls3, residCovDiag = TRUE ) ) print( logLik( fitwls4e ) ) print( logLik( fitwls4e, residCovDiag = TRUE ) ) print( logLik( fitwls5 ) ) print( logLik( fitwls5, residCovDiag = TRUE ) ) print( logLik( fitwlsi1e ) ) print( logLik( fitwlsi1e, residCovDiag = TRUE ) ) print( logLik( fitwlsi2 ) ) print( logLik( fitwlsi2, residCovDiag = TRUE ) ) print( logLik( fitwlsi3e ) ) print( logLik( fitwlsi3e, residCovDiag = TRUE ) ) print( logLik( fitwlsi4 ) ) print( logLik( fitwlsi4, residCovDiag = TRUE ) ) print( logLik( fitwlsi5e ) ) print( logLik( fitwlsi5e, residCovDiag = TRUE ) ) ## ************** F tests **************** # testing first restriction print( linearHypothesis( fitwls1, restrm ) ) linearHypothesis( fitwls1, restrict ) print( linearHypothesis( fitwlsi1e, restrm ) ) linearHypothesis( fitwlsi1e, restrict ) # testing second restriction restrOnly2m <- matrix(0,1,7) restrOnly2q <- 0.5 restrOnly2m[1,2] <- -1 restrOnly2m[1,5] <- 1 restrictOnly2 <- "- demand_price + supply_price = 0.5" # first restriction not imposed print( linearHypothesis( fitwls1e, restrOnly2m, restrOnly2q ) ) linearHypothesis( fitwls1e, restrictOnly2 ) print( linearHypothesis( fitwlsi1, restrOnly2m, restrOnly2q ) ) linearHypothesis( fitwlsi1, restrictOnly2 ) # first restriction imposed print( linearHypothesis( fitwls2, restrOnly2m, restrOnly2q ) ) linearHypothesis( fitwls2, restrictOnly2 ) print( linearHypothesis( fitwls3, restrOnly2m, restrOnly2q ) ) linearHypothesis( fitwls3, restrictOnly2 ) print( linearHypothesis( fitwlsi2e, restrOnly2m, restrOnly2q ) ) linearHypothesis( fitwlsi2e, restrictOnly2 ) print( linearHypothesis( fitwlsi3e, restrOnly2m, restrOnly2q ) ) linearHypothesis( fitwlsi3e, restrictOnly2 ) # testing both of the restrictions print( linearHypothesis( fitwls1e, restr2m, restr2q ) ) linearHypothesis( fitwls1e, restrict2 ) print( linearHypothesis( fitwlsi1, restr2m, restr2q ) ) linearHypothesis( fitwlsi1, restrict2 ) ## ************** Wald tests **************** # testing first restriction print( linearHypothesis( fitwls1, restrm, test = "Chisq" ) ) linearHypothesis( fitwls1, restrict, test = "Chisq" ) print( linearHypothesis( fitwlsi1e, restrm, test = "Chisq" ) ) linearHypothesis( fitwlsi1e, restrict, test = "Chisq" ) # testing second restriction # first restriction not imposed print( linearHypothesis( fitwls1e, restrOnly2m, restrOnly2q, test = "Chisq" ) ) linearHypothesis( fitwls1e, restrictOnly2, test = "Chisq" ) print( linearHypothesis( fitwlsi1, restrOnly2m, restrOnly2q, test = "Chisq" ) ) linearHypothesis( fitwlsi1, restrictOnly2, test = "Chisq" ) # first restriction imposed print( linearHypothesis( fitwls2, restrOnly2m, restrOnly2q, test = "Chisq" ) ) linearHypothesis( fitwls2, restrictOnly2, test = "Chisq" ) print( linearHypothesis( fitwls3, restrOnly2m, restrOnly2q, test = "Chisq" ) ) linearHypothesis( fitwls3, restrictOnly2, test = "Chisq" ) print( linearHypothesis( fitwlsi2e, restrOnly2m, restrOnly2q, test = "Chisq" ) ) linearHypothesis( fitwlsi2e, restrictOnly2, test = "Chisq" ) print( linearHypothesis( fitwlsi3e, restrOnly2m, restrOnly2q, test = "Chisq" ) ) linearHypothesis( fitwlsi3e, restrictOnly2, test = "Chisq" ) # testing both of the restrictions print( linearHypothesis( fitwls1e, restr2m, restr2q, test = "Chisq" ) ) linearHypothesis( fitwls1e, restrict2, test = "Chisq" ) print( linearHypothesis( fitwlsi1, restr2m, restr2q, test = "Chisq" ) ) linearHypothesis( fitwlsi1, restrict2, test = "Chisq" ) ## ****************** model frame ************************** print( mf <- model.frame( fitwls1 ) ) print( mf1 <- model.frame( fitwls1$eq[[ 1 ]] ) ) print( attributes( mf1 )$terms ) print( mf2 <- model.frame( fitwls1$eq[[ 2 ]] ) ) print( attributes( mf2 )$terms ) print( all.equal( mf, model.frame( fitwls2e ) ) ) print( all.equal( mf1, model.frame( fitwls2e$eq[[ 1 ]] ) ) ) print( all.equal( mf, model.frame( fitwls3 ) ) ) print( all.equal( mf2, model.frame( fitwls3$eq[[ 2 ]] ) ) ) print( all.equal( mf, model.frame( fitwls4e ) ) ) print( all.equal( mf1, model.frame( fitwls4e$eq[[ 1 ]] ) ) ) print( all.equal( mf, model.frame( fitwls5 ) ) ) print( all.equal( mf2, model.frame( fitwls5$eq[[ 2 ]] ) ) ) print( all.equal( mf, model.frame( fitwlsi1e ) ) ) print( all.equal( mf1, model.frame( fitwlsi1e$eq[[ 1 ]] ) ) ) print( all.equal( mf, model.frame( fitwlsi2 ) ) ) print( all.equal( mf2, model.frame( fitwlsi2$eq[[ 2 ]] ) ) ) print( all.equal( mf, model.frame( fitwlsi3e ) ) ) print( all.equal( mf1, model.frame( fitwlsi3e$eq[[ 1 ]] ) ) ) print( all.equal( mf, model.frame( fitwlsi4 ) ) ) print( all.equal( mf2, model.frame( fitwlsi4$eq[[ 2 ]] ) ) ) print( all.equal( mf, model.frame( fitwlsi5e ) ) ) print( all.equal( mf1, model.frame( fitwlsi5e$eq[[ 1 ]] ) ) ) ## **************** model matrix ************************ # with x (returnModelMatrix) = TRUE print( !is.null( fitwls1e$eq[[ 1 ]]$x ) ) print( mm <- model.matrix( fitwlsi1e ) ) print( mm1 <- model.matrix( fitwlsi1e$eq[[ 1 ]] ) ) print( mm2 <- model.matrix( fitwlsi1e$eq[[ 2 ]] ) ) # with x (returnModelMatrix) = FALSE print( all.equal( mm, model.matrix( fitwlsi1 ) ) ) print( all.equal( mm1, model.matrix( fitwlsi1$eq[[ 1 ]] ) ) ) print( all.equal( mm2, model.matrix( fitwlsi1$eq[[ 2 ]] ) ) ) print( !is.null( fitwls1$eq[[ 1 ]]$x ) ) # with x (returnModelMatrix) = TRUE print( !is.null( fitwls2$eq[[ 1 ]]$x ) ) print( all.equal( mm, model.matrix( fitwls2 ) ) ) print( all.equal( mm1, model.matrix( fitwls2$eq[[ 1 ]] ) ) ) print( all.equal( mm2, model.matrix( fitwls2$eq[[ 2 ]] ) ) ) # with x (returnModelMatrix) = FALSE print( all.equal( mm, model.matrix( fitwls2e ) ) ) print( all.equal( mm1, model.matrix( fitwls2e$eq[[ 1 ]] ) ) ) print( all.equal( mm2, model.matrix( fitwls2e$eq[[ 2 ]] ) ) ) print( !is.null( fitwls2e$eq[[ 1 ]]$x ) ) # with x (returnModelMatrix) = TRUE print( !is.null( fitwlsi3$eq[[ 1 ]]$x ) ) print( all.equal( mm, model.matrix( fitwlsi3 ) ) ) print( all.equal( mm1, model.matrix( fitwlsi3$eq[[ 1 ]] ) ) ) print( all.equal( mm2, model.matrix( fitwlsi3$eq[[ 2 ]] ) ) ) # with x (returnModelMatrix) = FALSE print( all.equal( mm, model.matrix( fitwlsi3e ) ) ) print( all.equal( mm1, model.matrix( fitwlsi3e$eq[[ 1 ]] ) ) ) print( all.equal( mm2, model.matrix( fitwlsi3e$eq[[ 2 ]] ) ) ) print( !is.null( fitwlsi3e$eq[[ 1 ]]$x ) ) # with x (returnModelMatrix) = TRUE print( !is.null( fitwls4e$eq[[ 1 ]]$x ) ) print( all.equal( mm, model.matrix( fitwls4e ) ) ) print( all.equal( mm1, model.matrix( fitwls4e$eq[[ 1 ]] ) ) ) print( all.equal( mm2, model.matrix( fitwls4e$eq[[ 2 ]] ) ) ) # with x (returnModelMatrix) = FALSE print( all.equal( mm, model.matrix( fitwls4Sym ) ) ) print( all.equal( mm1, model.matrix( fitwls4Sym$eq[[ 1 ]] ) ) ) print( all.equal( mm2, model.matrix( fitwls4Sym$eq[[ 2 ]] ) ) ) print( !is.null( fitwls4Sym$eq[[ 1 ]]$x ) ) # with x (returnModelMatrix) = TRUE print( !is.null( fitwls5$eq[[ 1 ]]$x ) ) print( all.equal( mm, model.matrix( fitwls5 ) ) ) print( all.equal( mm1, model.matrix( fitwls5$eq[[ 1 ]] ) ) ) print( all.equal( mm2, model.matrix( fitwls5$eq[[ 2 ]] ) ) ) # with x (returnModelMatrix) = FALSE print( all.equal( mm, model.matrix( fitwls5e ) ) ) print( all.equal( mm1, model.matrix( fitwls5e$eq[[ 1 ]] ) ) ) print( all.equal( mm2, model.matrix( fitwls5e$eq[[ 2 ]] ) ) ) print( !is.null( fitwls5e$eq[[ 1 ]]$x ) ) ## **************** formulas ************************ formula( fitwls1 ) formula( fitwls1$eq[[ 2 ]] ) formula( fitwls2e ) formula( fitwls2e$eq[[ 1 ]] ) formula( fitwls3 ) formula( fitwls3$eq[[ 2 ]] ) formula( fitwls4e ) formula( fitwls4e$eq[[ 1 ]] ) formula( fitwls5 ) formula( fitwls5$eq[[ 2 ]] ) formula( fitwlsi1e ) formula( fitwlsi1e$eq[[ 1 ]] ) formula( fitwlsi2 ) formula( fitwlsi2$eq[[ 2 ]] ) formula( fitwlsi3e ) formula( fitwlsi3e$eq[[ 1 ]] ) formula( fitwlsi4 ) formula( fitwlsi4$eq[[ 2 ]] ) formula( fitwlsi5e ) formula( fitwlsi5e$eq[[ 1 ]] ) ## **************** model terms ******************* terms( fitwls1 ) terms( fitwls1$eq[[ 2 ]] ) terms( fitwls2e ) terms( fitwls2e$eq[[ 1 ]] ) terms( fitwls3 ) terms( fitwls3$eq[[ 2 ]] ) terms( fitwls4e ) terms( fitwls4e$eq[[ 1 ]] ) terms( fitwls5 ) terms( fitwls5$eq[[ 2 ]] ) terms( fitwlsi1e ) terms( fitwlsi1e$eq[[ 1 ]] ) terms( fitwlsi2 ) terms( fitwlsi2$eq[[ 2 ]] ) terms( fitwlsi3e ) terms( fitwlsi3e$eq[[ 1 ]] ) terms( fitwlsi4 ) terms( fitwlsi4$eq[[ 2 ]] ) terms( fitwlsi5e ) terms( fitwlsi5e$eq[[ 1 ]] ) ## **************** estfun ************************ library( "sandwich" ) estfun( fitwls1 ) round( colSums( estfun( fitwls1 ) ), digits = 7 ) estfun( fitwlsi1e ) round( colSums( estfun( fitwlsi1e ) ), digits = 7 ) ## **************** bread ************************ bread( fitwls1 ) bread( fitwlsi1e ) systemfit/tests/KleinI.Rout.save0000644000176200001440000523055613060100647016443 0ustar liggesusers R version 3.3.2 (2016-10-31) -- "Sincere Pumpkin Patch" Copyright (C) 2016 The R Foundation for Statistical Computing Platform: x86_64-pc-linux-gnu (64-bit) R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > library( "systemfit" ) Loading required package: Matrix Loading required package: car Loading required package: lmtest Loading required package: zoo Attaching package: 'zoo' The following objects are masked from 'package:base': as.Date, as.Date.numeric Please cite the 'systemfit' package as: Arne Henningsen and Jeff D. Hamann (2007). systemfit: A Package for Estimating Systems of Simultaneous Equations in R. Journal of Statistical Software 23(4), 1-40. http://www.jstatsoft.org/v23/i04/. If you have questions, suggestions, or comments regarding the 'systemfit' package, please use a forum or 'tracker' at systemfit's R-Forge site: https://r-forge.r-project.org/projects/systemfit/ > library( "sandwich" ) > options( warn = 1 ) > options( digits = 3 ) > > data( "KleinI" ) > eqConsump <- consump ~ corpProf + corpProfLag + wages > eqInvest <- invest ~ corpProf + corpProfLag + capitalLag > eqPrivWage <- privWage ~ gnp + gnpLag + trend > inst <- ~ govExp + taxes + govWage + trend + capitalLag + corpProfLag + gnpLag > system <- list( Consumption = eqConsump, Investment = eqInvest, + PrivateWages = eqPrivWage ) > restrict <- c( "Consumption_corpProf + Investment_capitalLag = 0" ) > restrict2 <- c( restrict, "Consumption_corpProfLag - PrivateWages_trend = 0" ) > > for( dataNo in 1:5 ) { + # set some values of some variables to NA + if( dataNo == 2 ) { + KleinI$gnpLag[ 7 ] <- NA + } else if( dataNo == 3 ) { + KleinI$wages[ 10 ] <- NA + } else if( dataNo == 4 ) { + KleinI$corpProf[ 13 ] <- NA + } else if( dataNo == 5 ) { + KleinI$invest[ 16 ] <- NA + } + + # single-equation OLS + lmConsump <- lm( eqConsump, data = KleinI ) + lmInvest <- lm( eqInvest, data = KleinI ) + lmPrivWage <- lm( eqPrivWage, data = KleinI ) + + for( methodNo in 1:5 ) { + method <- c( "OLS", "2SLS", "SUR", "3SLS", "3SLS" )[ methodNo ] + maxit <- ifelse( methodNo == 5, 500, 1 ) + + cat( "> \n> # ", ifelse( maxit == 1, "", "I" ), method, "\n", sep = "" ) + if( method %in% c( "OLS", "WLS", "SUR" ) ) { + kleinModel <- systemfit( system, method = method, data = KleinI, + methodResidCov = ifelse( method == "OLS", "geomean", "noDfCor" ), + maxit = maxit ) + } else { + kleinModel <- systemfit( system, method = method, data = KleinI, + inst = inst, methodResidCov = "noDfCor", maxit = maxit ) + } + cat( "> summary\n" ) + print( summary( kleinModel ) ) + if( method == "OLS" ) { + cat( "compare coef with single-equation OLS\n" ) + print( all.equal( coef( kleinModel ), + c( coef( lmConsump ), coef( lmInvest ), coef( lmPrivWage ) ), + check.attributes = FALSE ) ) + } + cat( "> residuals\n" ) + print( residuals( kleinModel ) ) + cat( "> fitted\n" ) + print( fitted( kleinModel ) ) + cat( "> predict\n" ) + print( predict( kleinModel, se.fit = TRUE, + interval = ifelse( methodNo %in% c( 1, 4 ), "prediction", "confidence" ), + useDfSys = methodNo %in% c( 1, 3, 5 ) ) ) + cat( "> model.frame\n" ) + if( methodNo == 1 ) { + mfOls <- model.frame( kleinModel ) + print( mfOls ) + } else if( methodNo == 2 ) { + mf2sls <- model.frame( kleinModel ) + print( mf2sls ) + cat( "> Frames of instrumental variables\n" ) + for( i in 1:3 ){ + print( kleinModel$eq[[ i ]]$modelInst ) + } + } else if( methodNo == 3 ) { + print( all.equal( mfOls, model.frame( kleinModel ) ) ) + } else { + print( all.equal( mf2sls, model.frame( kleinModel ) ) ) + } + cat( "> model.matrix\n" ) + if( methodNo == 1 ) { + mmOls <- model.matrix( kleinModel ) + print( mmOls ) + } else { + print( all.equal( mmOls, model.matrix( kleinModel ) ) ) + } + if( methodNo == 2 ) { + cat( "> matrix of instrumental variables\n" ) + print( model.matrix( kleinModel, which = "z" ) ) + cat( "> matrix of fitted regressors\n" ) + print( round( model.matrix( kleinModel, which = "xHat" ), digits = 7 ) ) + } + cat( "> nobs\n" ) + print( nobs( kleinModel ) ) + cat( "> linearHypothesis\n" ) + print( linearHypothesis( kleinModel, restrict ) ) + print( linearHypothesis( kleinModel, restrict, test = "F" ) ) + print( linearHypothesis( kleinModel, restrict, test = "Chisq" ) ) + print( linearHypothesis( kleinModel, restrict2 ) ) + print( linearHypothesis( kleinModel, restrict2, test = "F" ) ) + print( linearHypothesis( kleinModel, restrict2, test = "Chisq" ) ) + cat( "> logLik\n" ) + print( logLik( kleinModel ) ) + print( logLik( kleinModel, residCovDiag = TRUE ) ) + if( method == "OLS" ) { + cat( "compare log likelihood value with single-equation OLS\n" ) + print( all.equal( logLik( kleinModel, residCovDiag = TRUE ), + logLik( lmConsump ) + logLik( lmInvest ) + logLik( lmPrivWage ), + check.attributes = FALSE ) ) + } + + cat( "Estimating function\n" ) + print( round( estfun( kleinModel ), digits = 7 ) ) + print( all.equal( colSums( estfun( kleinModel ) ), + rep( 0, ncol( estfun( kleinModel ) ) ), check.attributes = FALSE ) ) + + cat( "> Bread\n" ) + print( bread( kleinModel ) ) + } + } > > # OLS > summary systemfit results method: OLS N DF SSR detRCov OLS-R2 McElroy-R2 system 63 51 45.2 0.371 0.977 0.991 N DF SSR MSE RMSE R2 Adj R2 Consumption 21 17 17.9 1.052 1.026 0.981 0.978 Investment 21 17 17.3 1.019 1.009 0.931 0.919 PrivateWages 21 17 10.0 0.589 0.767 0.987 0.985 The covariance matrix of the residuals Consumption Investment PrivateWages Consumption 1.0517 0.0611 -0.470 Investment 0.0611 1.0190 0.150 PrivateWages -0.4704 0.1497 0.589 The correlations of the residuals Consumption Investment PrivateWages Consumption 1.0000 0.0591 -0.598 Investment 0.0591 1.0000 0.193 PrivateWages -0.5979 0.1933 1.000 OLS estimates for 'Consumption' (equation 1) Model Formula: consump ~ corpProf + corpProfLag + wages Estimate Std. Error t value Pr(>|t|) (Intercept) 16.2366 1.3027 12.46 5.6e-10 *** corpProf 0.1929 0.0912 2.12 0.049 * corpProfLag 0.0899 0.0906 0.99 0.335 wages 0.7962 0.0399 19.93 3.2e-13 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.026 on 17 degrees of freedom Number of observations: 21 Degrees of Freedom: 17 SSR: 17.879 MSE: 1.052 Root MSE: 1.026 Multiple R-Squared: 0.981 Adjusted R-Squared: 0.978 OLS estimates for 'Investment' (equation 2) Model Formula: invest ~ corpProf + corpProfLag + capitalLag Estimate Std. Error t value Pr(>|t|) (Intercept) 10.1258 5.4655 1.85 0.08137 . corpProf 0.4796 0.0971 4.94 0.00012 *** corpProfLag 0.3330 0.1009 3.30 0.00421 ** capitalLag -0.1118 0.0267 -4.18 0.00062 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.009 on 17 degrees of freedom Number of observations: 21 Degrees of Freedom: 17 SSR: 17.323 MSE: 1.019 Root MSE: 1.009 Multiple R-Squared: 0.931 Adjusted R-Squared: 0.919 OLS estimates for 'PrivateWages' (equation 3) Model Formula: privWage ~ gnp + gnpLag + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 1.4970 1.2700 1.18 0.25474 gnp 0.4395 0.0324 13.56 1.5e-10 *** gnpLag 0.1461 0.0374 3.90 0.00114 ** trend 0.1302 0.0319 4.08 0.00078 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 0.767 on 17 degrees of freedom Number of observations: 21 Degrees of Freedom: 17 SSR: 10.005 MSE: 0.589 Root MSE: 0.767 Multiple R-Squared: 0.987 Adjusted R-Squared: 0.985 compare coef with single-equation OLS [1] TRUE > residuals Consumption Investment PrivateWages 1 NA NA NA 2 -0.32389 -0.0668 -1.2942 3 -1.25001 -0.0476 0.2957 4 -1.56574 1.2467 1.1877 5 -0.49350 -1.3512 -0.1358 6 0.00761 0.4154 -0.4654 7 0.86910 1.4923 -0.4838 8 1.33848 0.7889 -0.7281 9 1.05498 -0.6317 0.3392 10 -0.58856 1.0830 1.1957 11 0.28231 0.2791 -0.1508 12 -0.22965 0.0369 0.5942 13 -0.32213 0.3659 0.1027 14 0.32228 0.2237 0.4503 15 -0.05801 -0.1728 0.2816 16 -0.03466 0.0101 0.0138 17 1.61650 0.9719 -0.8508 18 -0.43597 0.0516 0.9956 19 0.21005 -2.5656 -0.4688 20 0.98920 -0.6866 -0.3795 21 0.78508 -0.7807 -1.0909 22 -2.17345 -0.6623 0.5917 > fitted Consumption Investment PrivateWages 1 NA NA NA 2 42.2 -0.133 26.8 3 46.3 1.948 29.0 4 50.8 3.953 32.9 5 51.1 4.351 34.0 6 52.6 4.685 35.9 7 54.2 4.108 37.9 8 54.9 3.411 38.6 9 56.2 3.632 38.9 10 58.4 4.017 40.1 11 54.7 0.721 38.1 12 51.1 -3.437 33.9 13 45.9 -6.566 28.9 14 46.2 -5.324 28.0 15 48.8 -2.827 30.3 16 51.3 -1.310 33.2 17 56.1 1.128 37.7 18 59.1 1.948 40.0 19 57.3 0.666 38.7 20 60.6 1.987 42.0 21 64.2 4.081 46.1 22 71.9 5.562 52.7 > predict Consumption.pred Consumption.se.fit Consumption.lwr Consumption.upr 1 NA NA NA NA 2 42.2 0.462 40.0 44.5 3 46.3 0.518 43.9 48.6 4 50.8 0.341 48.6 52.9 5 51.1 0.396 48.9 53.3 6 52.6 0.397 50.4 54.8 7 54.2 0.359 52.0 56.4 8 54.9 0.327 52.7 57.0 9 56.2 0.350 54.1 58.4 10 58.4 0.370 56.2 60.6 11 54.7 0.606 52.3 57.1 12 51.1 0.484 48.9 53.4 13 45.9 0.629 43.5 48.3 14 46.2 0.602 43.8 48.6 15 48.8 0.374 46.6 50.9 16 51.3 0.333 49.2 53.5 17 56.1 0.366 53.9 58.3 18 59.1 0.321 57.0 61.3 19 57.3 0.371 55.1 59.5 20 60.6 0.434 58.4 62.8 21 64.2 0.425 62.0 66.4 22 71.9 0.666 69.4 74.3 Investment.pred Investment.se.fit Investment.lwr Investment.upr 1 NA NA NA NA 2 -0.133 0.607 -2.498 2.231 3 1.948 0.499 -0.313 4.208 4 3.953 0.449 1.735 6.171 5 4.351 0.371 2.192 6.510 6 4.685 0.349 2.540 6.829 7 4.108 0.329 1.976 6.239 8 3.411 0.292 1.301 5.521 9 3.632 0.389 1.460 5.804 10 4.017 0.447 1.801 6.233 11 0.721 0.601 -1.638 3.080 12 -3.437 0.507 -5.704 -1.169 13 -6.566 0.616 -8.940 -4.192 14 -5.324 0.694 -7.783 -2.865 15 -2.827 0.373 -4.988 -0.667 16 -1.310 0.320 -3.436 0.816 17 1.128 0.347 -1.015 3.271 18 1.948 0.243 -0.136 4.033 19 0.666 0.312 -1.456 2.787 20 1.987 0.366 -0.169 4.143 21 4.081 0.332 1.948 6.214 22 5.562 0.461 3.334 7.790 PrivateWages.pred PrivateWages.se.fit PrivateWages.lwr PrivateWages.upr 1 NA NA NA NA 2 26.8 0.354 25.1 28.5 3 29.0 0.355 27.3 30.7 4 32.9 0.354 31.2 34.6 5 34.0 0.269 32.4 35.7 6 35.9 0.266 34.2 37.5 7 37.9 0.266 36.3 39.5 8 38.6 0.273 37.0 40.3 9 38.9 0.261 37.2 40.5 10 40.1 0.247 38.5 41.7 11 38.1 0.354 36.4 39.7 12 33.9 0.363 32.2 35.6 13 28.9 0.429 27.1 30.7 14 28.0 0.376 26.3 29.8 15 30.3 0.371 28.6 32.0 16 33.2 0.310 31.5 34.8 17 37.7 0.305 36.0 39.3 18 40.0 0.238 38.4 41.6 19 38.7 0.357 37.0 40.4 20 42.0 0.321 40.3 43.6 21 46.1 0.335 44.4 47.8 22 52.7 0.502 50.9 54.5 > model.frame consump corpProf corpProfLag wages invest capitalLag privWage gnp gnpLag 1 39.8 12.7 NA 31.0 2.7 180 28.8 44.9 NA 2 41.9 12.4 12.7 28.2 -0.2 183 25.5 45.6 44.9 3 45.0 16.9 12.4 32.2 1.9 183 29.3 50.1 45.6 4 49.2 18.4 16.9 37.0 5.2 184 34.1 57.2 50.1 5 50.6 19.4 18.4 37.0 3.0 190 33.9 57.1 57.2 6 52.6 20.1 19.4 38.6 5.1 193 35.4 61.0 57.1 7 55.1 19.6 20.1 40.7 5.6 198 37.4 64.0 61.0 8 56.2 19.8 19.6 41.5 4.2 203 37.9 64.4 64.0 9 57.3 21.1 19.8 42.9 3.0 208 39.2 64.5 64.4 10 57.8 21.7 21.1 45.3 5.1 211 41.3 67.0 64.5 11 55.0 15.6 21.7 42.1 1.0 216 37.9 61.2 67.0 12 50.9 11.4 15.6 39.3 -3.4 217 34.5 53.4 61.2 13 45.6 7.0 11.4 34.3 -6.2 213 29.0 44.3 53.4 14 46.5 11.2 7.0 34.1 -5.1 207 28.5 45.1 44.3 15 48.7 12.3 11.2 36.6 -3.0 202 30.6 49.7 45.1 16 51.3 14.0 12.3 39.3 -1.3 199 33.2 54.4 49.7 17 57.7 17.6 14.0 44.2 2.1 198 36.8 62.7 54.4 18 58.7 17.3 17.6 47.7 2.0 200 41.0 65.0 62.7 19 57.5 15.3 17.3 45.9 -1.9 202 38.2 60.9 65.0 20 61.6 19.0 15.3 49.4 1.3 200 41.6 69.5 60.9 21 65.0 21.1 19.0 53.0 3.3 201 45.0 75.7 69.5 22 69.7 23.5 21.1 61.8 4.9 204 53.3 88.4 75.7 trend 1 -11 2 -10 3 -9 4 -8 5 -7 6 -6 7 -5 8 -4 9 -3 10 -2 11 -1 12 0 13 1 14 2 15 3 16 4 17 5 18 6 19 7 20 8 21 9 22 10 > model.matrix Consumption_(Intercept) Consumption_corpProf Consumption_2 1 12.4 Consumption_3 1 16.9 Consumption_4 1 18.4 Consumption_5 1 19.4 Consumption_6 1 20.1 Consumption_7 1 19.6 Consumption_8 1 19.8 Consumption_9 1 21.1 Consumption_10 1 21.7 Consumption_11 1 15.6 Consumption_12 1 11.4 Consumption_13 1 7.0 Consumption_14 1 11.2 Consumption_15 1 12.3 Consumption_16 1 14.0 Consumption_17 1 17.6 Consumption_18 1 17.3 Consumption_19 1 15.3 Consumption_20 1 19.0 Consumption_21 1 21.1 Consumption_22 1 23.5 Investment_2 0 0.0 Investment_3 0 0.0 Investment_4 0 0.0 Investment_5 0 0.0 Investment_6 0 0.0 Investment_7 0 0.0 Investment_8 0 0.0 Investment_9 0 0.0 Investment_10 0 0.0 Investment_11 0 0.0 Investment_12 0 0.0 Investment_13 0 0.0 Investment_14 0 0.0 Investment_15 0 0.0 Investment_16 0 0.0 Investment_17 0 0.0 Investment_18 0 0.0 Investment_19 0 0.0 Investment_20 0 0.0 Investment_21 0 0.0 Investment_22 0 0.0 PrivateWages_2 0 0.0 PrivateWages_3 0 0.0 PrivateWages_4 0 0.0 PrivateWages_5 0 0.0 PrivateWages_6 0 0.0 PrivateWages_7 0 0.0 PrivateWages_8 0 0.0 PrivateWages_9 0 0.0 PrivateWages_10 0 0.0 PrivateWages_11 0 0.0 PrivateWages_12 0 0.0 PrivateWages_13 0 0.0 PrivateWages_14 0 0.0 PrivateWages_15 0 0.0 PrivateWages_16 0 0.0 PrivateWages_17 0 0.0 PrivateWages_18 0 0.0 PrivateWages_19 0 0.0 PrivateWages_20 0 0.0 PrivateWages_21 0 0.0 PrivateWages_22 0 0.0 Consumption_corpProfLag Consumption_wages Consumption_2 12.7 28.2 Consumption_3 12.4 32.2 Consumption_4 16.9 37.0 Consumption_5 18.4 37.0 Consumption_6 19.4 38.6 Consumption_7 20.1 40.7 Consumption_8 19.6 41.5 Consumption_9 19.8 42.9 Consumption_10 21.1 45.3 Consumption_11 21.7 42.1 Consumption_12 15.6 39.3 Consumption_13 11.4 34.3 Consumption_14 7.0 34.1 Consumption_15 11.2 36.6 Consumption_16 12.3 39.3 Consumption_17 14.0 44.2 Consumption_18 17.6 47.7 Consumption_19 17.3 45.9 Consumption_20 15.3 49.4 Consumption_21 19.0 53.0 Consumption_22 21.1 61.8 Investment_2 0.0 0.0 Investment_3 0.0 0.0 Investment_4 0.0 0.0 Investment_5 0.0 0.0 Investment_6 0.0 0.0 Investment_7 0.0 0.0 Investment_8 0.0 0.0 Investment_9 0.0 0.0 Investment_10 0.0 0.0 Investment_11 0.0 0.0 Investment_12 0.0 0.0 Investment_13 0.0 0.0 Investment_14 0.0 0.0 Investment_15 0.0 0.0 Investment_16 0.0 0.0 Investment_17 0.0 0.0 Investment_18 0.0 0.0 Investment_19 0.0 0.0 Investment_20 0.0 0.0 Investment_21 0.0 0.0 Investment_22 0.0 0.0 PrivateWages_2 0.0 0.0 PrivateWages_3 0.0 0.0 PrivateWages_4 0.0 0.0 PrivateWages_5 0.0 0.0 PrivateWages_6 0.0 0.0 PrivateWages_7 0.0 0.0 PrivateWages_8 0.0 0.0 PrivateWages_9 0.0 0.0 PrivateWages_10 0.0 0.0 PrivateWages_11 0.0 0.0 PrivateWages_12 0.0 0.0 PrivateWages_13 0.0 0.0 PrivateWages_14 0.0 0.0 PrivateWages_15 0.0 0.0 PrivateWages_16 0.0 0.0 PrivateWages_17 0.0 0.0 PrivateWages_18 0.0 0.0 PrivateWages_19 0.0 0.0 PrivateWages_20 0.0 0.0 PrivateWages_21 0.0 0.0 PrivateWages_22 0.0 0.0 Investment_(Intercept) Investment_corpProf Consumption_2 0 0.0 Consumption_3 0 0.0 Consumption_4 0 0.0 Consumption_5 0 0.0 Consumption_6 0 0.0 Consumption_7 0 0.0 Consumption_8 0 0.0 Consumption_9 0 0.0 Consumption_10 0 0.0 Consumption_11 0 0.0 Consumption_12 0 0.0 Consumption_13 0 0.0 Consumption_14 0 0.0 Consumption_15 0 0.0 Consumption_16 0 0.0 Consumption_17 0 0.0 Consumption_18 0 0.0 Consumption_19 0 0.0 Consumption_20 0 0.0 Consumption_21 0 0.0 Consumption_22 0 0.0 Investment_2 1 12.4 Investment_3 1 16.9 Investment_4 1 18.4 Investment_5 1 19.4 Investment_6 1 20.1 Investment_7 1 19.6 Investment_8 1 19.8 Investment_9 1 21.1 Investment_10 1 21.7 Investment_11 1 15.6 Investment_12 1 11.4 Investment_13 1 7.0 Investment_14 1 11.2 Investment_15 1 12.3 Investment_16 1 14.0 Investment_17 1 17.6 Investment_18 1 17.3 Investment_19 1 15.3 Investment_20 1 19.0 Investment_21 1 21.1 Investment_22 1 23.5 PrivateWages_2 0 0.0 PrivateWages_3 0 0.0 PrivateWages_4 0 0.0 PrivateWages_5 0 0.0 PrivateWages_6 0 0.0 PrivateWages_7 0 0.0 PrivateWages_8 0 0.0 PrivateWages_9 0 0.0 PrivateWages_10 0 0.0 PrivateWages_11 0 0.0 PrivateWages_12 0 0.0 PrivateWages_13 0 0.0 PrivateWages_14 0 0.0 PrivateWages_15 0 0.0 PrivateWages_16 0 0.0 PrivateWages_17 0 0.0 PrivateWages_18 0 0.0 PrivateWages_19 0 0.0 PrivateWages_20 0 0.0 PrivateWages_21 0 0.0 PrivateWages_22 0 0.0 Investment_corpProfLag Investment_capitalLag Consumption_2 0.0 0 Consumption_3 0.0 0 Consumption_4 0.0 0 Consumption_5 0.0 0 Consumption_6 0.0 0 Consumption_7 0.0 0 Consumption_8 0.0 0 Consumption_9 0.0 0 Consumption_10 0.0 0 Consumption_11 0.0 0 Consumption_12 0.0 0 Consumption_13 0.0 0 Consumption_14 0.0 0 Consumption_15 0.0 0 Consumption_16 0.0 0 Consumption_17 0.0 0 Consumption_18 0.0 0 Consumption_19 0.0 0 Consumption_20 0.0 0 Consumption_21 0.0 0 Consumption_22 0.0 0 Investment_2 12.7 183 Investment_3 12.4 183 Investment_4 16.9 184 Investment_5 18.4 190 Investment_6 19.4 193 Investment_7 20.1 198 Investment_8 19.6 203 Investment_9 19.8 208 Investment_10 21.1 211 Investment_11 21.7 216 Investment_12 15.6 217 Investment_13 11.4 213 Investment_14 7.0 207 Investment_15 11.2 202 Investment_16 12.3 199 Investment_17 14.0 198 Investment_18 17.6 200 Investment_19 17.3 202 Investment_20 15.3 200 Investment_21 19.0 201 Investment_22 21.1 204 PrivateWages_2 0.0 0 PrivateWages_3 0.0 0 PrivateWages_4 0.0 0 PrivateWages_5 0.0 0 PrivateWages_6 0.0 0 PrivateWages_7 0.0 0 PrivateWages_8 0.0 0 PrivateWages_9 0.0 0 PrivateWages_10 0.0 0 PrivateWages_11 0.0 0 PrivateWages_12 0.0 0 PrivateWages_13 0.0 0 PrivateWages_14 0.0 0 PrivateWages_15 0.0 0 PrivateWages_16 0.0 0 PrivateWages_17 0.0 0 PrivateWages_18 0.0 0 PrivateWages_19 0.0 0 PrivateWages_20 0.0 0 PrivateWages_21 0.0 0 PrivateWages_22 0.0 0 PrivateWages_(Intercept) PrivateWages_gnp PrivateWages_gnpLag Consumption_2 0 0.0 0.0 Consumption_3 0 0.0 0.0 Consumption_4 0 0.0 0.0 Consumption_5 0 0.0 0.0 Consumption_6 0 0.0 0.0 Consumption_7 0 0.0 0.0 Consumption_8 0 0.0 0.0 Consumption_9 0 0.0 0.0 Consumption_10 0 0.0 0.0 Consumption_11 0 0.0 0.0 Consumption_12 0 0.0 0.0 Consumption_13 0 0.0 0.0 Consumption_14 0 0.0 0.0 Consumption_15 0 0.0 0.0 Consumption_16 0 0.0 0.0 Consumption_17 0 0.0 0.0 Consumption_18 0 0.0 0.0 Consumption_19 0 0.0 0.0 Consumption_20 0 0.0 0.0 Consumption_21 0 0.0 0.0 Consumption_22 0 0.0 0.0 Investment_2 0 0.0 0.0 Investment_3 0 0.0 0.0 Investment_4 0 0.0 0.0 Investment_5 0 0.0 0.0 Investment_6 0 0.0 0.0 Investment_7 0 0.0 0.0 Investment_8 0 0.0 0.0 Investment_9 0 0.0 0.0 Investment_10 0 0.0 0.0 Investment_11 0 0.0 0.0 Investment_12 0 0.0 0.0 Investment_13 0 0.0 0.0 Investment_14 0 0.0 0.0 Investment_15 0 0.0 0.0 Investment_16 0 0.0 0.0 Investment_17 0 0.0 0.0 Investment_18 0 0.0 0.0 Investment_19 0 0.0 0.0 Investment_20 0 0.0 0.0 Investment_21 0 0.0 0.0 Investment_22 0 0.0 0.0 PrivateWages_2 1 45.6 44.9 PrivateWages_3 1 50.1 45.6 PrivateWages_4 1 57.2 50.1 PrivateWages_5 1 57.1 57.2 PrivateWages_6 1 61.0 57.1 PrivateWages_7 1 64.0 61.0 PrivateWages_8 1 64.4 64.0 PrivateWages_9 1 64.5 64.4 PrivateWages_10 1 67.0 64.5 PrivateWages_11 1 61.2 67.0 PrivateWages_12 1 53.4 61.2 PrivateWages_13 1 44.3 53.4 PrivateWages_14 1 45.1 44.3 PrivateWages_15 1 49.7 45.1 PrivateWages_16 1 54.4 49.7 PrivateWages_17 1 62.7 54.4 PrivateWages_18 1 65.0 62.7 PrivateWages_19 1 60.9 65.0 PrivateWages_20 1 69.5 60.9 PrivateWages_21 1 75.7 69.5 PrivateWages_22 1 88.4 75.7 PrivateWages_trend Consumption_2 0 Consumption_3 0 Consumption_4 0 Consumption_5 0 Consumption_6 0 Consumption_7 0 Consumption_8 0 Consumption_9 0 Consumption_10 0 Consumption_11 0 Consumption_12 0 Consumption_13 0 Consumption_14 0 Consumption_15 0 Consumption_16 0 Consumption_17 0 Consumption_18 0 Consumption_19 0 Consumption_20 0 Consumption_21 0 Consumption_22 0 Investment_2 0 Investment_3 0 Investment_4 0 Investment_5 0 Investment_6 0 Investment_7 0 Investment_8 0 Investment_9 0 Investment_10 0 Investment_11 0 Investment_12 0 Investment_13 0 Investment_14 0 Investment_15 0 Investment_16 0 Investment_17 0 Investment_18 0 Investment_19 0 Investment_20 0 Investment_21 0 Investment_22 0 PrivateWages_2 -10 PrivateWages_3 -9 PrivateWages_4 -8 PrivateWages_5 -7 PrivateWages_6 -6 PrivateWages_7 -5 PrivateWages_8 -4 PrivateWages_9 -3 PrivateWages_10 -2 PrivateWages_11 -1 PrivateWages_12 0 PrivateWages_13 1 PrivateWages_14 2 PrivateWages_15 3 PrivateWages_16 4 PrivateWages_17 5 PrivateWages_18 6 PrivateWages_19 7 PrivateWages_20 8 PrivateWages_21 9 PrivateWages_22 10 > nobs [1] 63 > linearHypothesis Linear hypothesis test (Theil's F test) Hypothesis: Consumption_corpProf + Investment_capitalLag = 0 Model 1: restricted model Model 2: kleinModel Res.Df Df F Pr(>F) 1 52 2 51 1 0.82 0.37 Linear hypothesis test (F statistic of a Wald test) Hypothesis: Consumption_corpProf + Investment_capitalLag = 0 Model 1: restricted model Model 2: kleinModel Res.Df Df F Pr(>F) 1 52 2 51 1 0.73 0.4 Linear hypothesis test (Chi^2 statistic of a Wald test) Hypothesis: Consumption_corpProf + Investment_capitalLag = 0 Model 1: restricted model Model 2: kleinModel Res.Df Df Chisq Pr(>Chisq) 1 52 2 51 1 0.73 0.39 Linear hypothesis test (Theil's F test) Hypothesis: Consumption_corpProf + Investment_capitalLag = 0 Consumption_corpProfLag - PrivateWages_trend = 0 Model 1: restricted model Model 2: kleinModel Res.Df Df F Pr(>F) 1 53 2 51 2 0.42 0.66 Linear hypothesis test (F statistic of a Wald test) Hypothesis: Consumption_corpProf + Investment_capitalLag = 0 Consumption_corpProfLag - PrivateWages_trend = 0 Model 1: restricted model Model 2: kleinModel Res.Df Df F Pr(>F) 1 53 2 51 2 0.37 0.69 Linear hypothesis test (Chi^2 statistic of a Wald test) Hypothesis: Consumption_corpProf + Investment_capitalLag = 0 Consumption_corpProfLag - PrivateWages_trend = 0 Model 1: restricted model Model 2: kleinModel Res.Df Df Chisq Pr(>Chisq) 1 53 2 51 2 0.74 0.69 > logLik 'log Lik.' -72.3 (df=13) 'log Lik.' -77.9 (df=13) compare log likelihood value with single-equation OLS [1] TRUE Estimating function Consumption_(Intercept) Consumption_corpProf Consumption_2 -0.32389 -4.016 Consumption_3 -1.25001 -21.125 Consumption_4 -1.56574 -28.810 Consumption_5 -0.49350 -9.574 Consumption_6 0.00761 0.153 Consumption_7 0.86910 17.034 Consumption_8 1.33848 26.502 Consumption_9 1.05498 22.260 Consumption_10 -0.58856 -12.772 Consumption_11 0.28231 4.404 Consumption_12 -0.22965 -2.618 Consumption_13 -0.32213 -2.255 Consumption_14 0.32228 3.610 Consumption_15 -0.05801 -0.714 Consumption_16 -0.03466 -0.485 Consumption_17 1.61650 28.450 Consumption_18 -0.43597 -7.542 Consumption_19 0.21005 3.214 Consumption_20 0.98920 18.795 Consumption_21 0.78508 16.565 Consumption_22 -2.17345 -51.076 Investment_2 0.00000 0.000 Investment_3 0.00000 0.000 Investment_4 0.00000 0.000 Investment_5 0.00000 0.000 Investment_6 0.00000 0.000 Investment_7 0.00000 0.000 Investment_8 0.00000 0.000 Investment_9 0.00000 0.000 Investment_10 0.00000 0.000 Investment_11 0.00000 0.000 Investment_12 0.00000 0.000 Investment_13 0.00000 0.000 Investment_14 0.00000 0.000 Investment_15 0.00000 0.000 Investment_16 0.00000 0.000 Investment_17 0.00000 0.000 Investment_18 0.00000 0.000 Investment_19 0.00000 0.000 Investment_20 0.00000 0.000 Investment_21 0.00000 0.000 Investment_22 0.00000 0.000 PrivateWages_2 0.00000 0.000 PrivateWages_3 0.00000 0.000 PrivateWages_4 0.00000 0.000 PrivateWages_5 0.00000 0.000 PrivateWages_6 0.00000 0.000 PrivateWages_7 0.00000 0.000 PrivateWages_8 0.00000 0.000 PrivateWages_9 0.00000 0.000 PrivateWages_10 0.00000 0.000 PrivateWages_11 0.00000 0.000 PrivateWages_12 0.00000 0.000 PrivateWages_13 0.00000 0.000 PrivateWages_14 0.00000 0.000 PrivateWages_15 0.00000 0.000 PrivateWages_16 0.00000 0.000 PrivateWages_17 0.00000 0.000 PrivateWages_18 0.00000 0.000 PrivateWages_19 0.00000 0.000 PrivateWages_20 0.00000 0.000 PrivateWages_21 0.00000 0.000 PrivateWages_22 0.00000 0.000 Consumption_corpProfLag Consumption_wages Consumption_2 -4.113 -9.134 Consumption_3 -15.500 -40.250 Consumption_4 -26.461 -57.932 Consumption_5 -9.080 -18.260 Consumption_6 0.148 0.294 Consumption_7 17.469 35.372 Consumption_8 26.234 55.547 Consumption_9 20.889 45.259 Consumption_10 -12.419 -26.662 Consumption_11 6.126 11.885 Consumption_12 -3.583 -9.025 Consumption_13 -3.672 -11.049 Consumption_14 2.256 10.990 Consumption_15 -0.650 -2.123 Consumption_16 -0.426 -1.362 Consumption_17 22.631 71.449 Consumption_18 -7.673 -20.796 Consumption_19 3.634 9.641 Consumption_20 15.135 48.867 Consumption_21 14.916 41.609 Consumption_22 -45.860 -134.319 Investment_2 0.000 0.000 Investment_3 0.000 0.000 Investment_4 0.000 0.000 Investment_5 0.000 0.000 Investment_6 0.000 0.000 Investment_7 0.000 0.000 Investment_8 0.000 0.000 Investment_9 0.000 0.000 Investment_10 0.000 0.000 Investment_11 0.000 0.000 Investment_12 0.000 0.000 Investment_13 0.000 0.000 Investment_14 0.000 0.000 Investment_15 0.000 0.000 Investment_16 0.000 0.000 Investment_17 0.000 0.000 Investment_18 0.000 0.000 Investment_19 0.000 0.000 Investment_20 0.000 0.000 Investment_21 0.000 0.000 Investment_22 0.000 0.000 PrivateWages_2 0.000 0.000 PrivateWages_3 0.000 0.000 PrivateWages_4 0.000 0.000 PrivateWages_5 0.000 0.000 PrivateWages_6 0.000 0.000 PrivateWages_7 0.000 0.000 PrivateWages_8 0.000 0.000 PrivateWages_9 0.000 0.000 PrivateWages_10 0.000 0.000 PrivateWages_11 0.000 0.000 PrivateWages_12 0.000 0.000 PrivateWages_13 0.000 0.000 PrivateWages_14 0.000 0.000 PrivateWages_15 0.000 0.000 PrivateWages_16 0.000 0.000 PrivateWages_17 0.000 0.000 PrivateWages_18 0.000 0.000 PrivateWages_19 0.000 0.000 PrivateWages_20 0.000 0.000 PrivateWages_21 0.000 0.000 PrivateWages_22 0.000 0.000 Investment_(Intercept) Investment_corpProf Consumption_2 0.0000 0.000 Consumption_3 0.0000 0.000 Consumption_4 0.0000 0.000 Consumption_5 0.0000 0.000 Consumption_6 0.0000 0.000 Consumption_7 0.0000 0.000 Consumption_8 0.0000 0.000 Consumption_9 0.0000 0.000 Consumption_10 0.0000 0.000 Consumption_11 0.0000 0.000 Consumption_12 0.0000 0.000 Consumption_13 0.0000 0.000 Consumption_14 0.0000 0.000 Consumption_15 0.0000 0.000 Consumption_16 0.0000 0.000 Consumption_17 0.0000 0.000 Consumption_18 0.0000 0.000 Consumption_19 0.0000 0.000 Consumption_20 0.0000 0.000 Consumption_21 0.0000 0.000 Consumption_22 0.0000 0.000 Investment_2 -0.0668 -0.828 Investment_3 -0.0476 -0.804 Investment_4 1.2467 22.939 Investment_5 -1.3512 -26.213 Investment_6 0.4154 8.350 Investment_7 1.4923 29.248 Investment_8 0.7889 15.620 Investment_9 -0.6317 -13.329 Investment_10 1.0830 23.500 Investment_11 0.2791 4.353 Investment_12 0.0369 0.420 Investment_13 0.3659 2.561 Investment_14 0.2237 2.505 Investment_15 -0.1728 -2.126 Investment_16 0.0101 0.141 Investment_17 0.9719 17.105 Investment_18 0.0516 0.893 Investment_19 -2.5656 -39.254 Investment_20 -0.6866 -13.045 Investment_21 -0.7807 -16.474 Investment_22 -0.6623 -15.565 PrivateWages_2 0.0000 0.000 PrivateWages_3 0.0000 0.000 PrivateWages_4 0.0000 0.000 PrivateWages_5 0.0000 0.000 PrivateWages_6 0.0000 0.000 PrivateWages_7 0.0000 0.000 PrivateWages_8 0.0000 0.000 PrivateWages_9 0.0000 0.000 PrivateWages_10 0.0000 0.000 PrivateWages_11 0.0000 0.000 PrivateWages_12 0.0000 0.000 PrivateWages_13 0.0000 0.000 PrivateWages_14 0.0000 0.000 PrivateWages_15 0.0000 0.000 PrivateWages_16 0.0000 0.000 PrivateWages_17 0.0000 0.000 PrivateWages_18 0.0000 0.000 PrivateWages_19 0.0000 0.000 PrivateWages_20 0.0000 0.000 PrivateWages_21 0.0000 0.000 PrivateWages_22 0.0000 0.000 Investment_corpProfLag Investment_capitalLag Consumption_2 0.000 0.00 Consumption_3 0.000 0.00 Consumption_4 0.000 0.00 Consumption_5 0.000 0.00 Consumption_6 0.000 0.00 Consumption_7 0.000 0.00 Consumption_8 0.000 0.00 Consumption_9 0.000 0.00 Consumption_10 0.000 0.00 Consumption_11 0.000 0.00 Consumption_12 0.000 0.00 Consumption_13 0.000 0.00 Consumption_14 0.000 0.00 Consumption_15 0.000 0.00 Consumption_16 0.000 0.00 Consumption_17 0.000 0.00 Consumption_18 0.000 0.00 Consumption_19 0.000 0.00 Consumption_20 0.000 0.00 Consumption_21 0.000 0.00 Consumption_22 0.000 0.00 Investment_2 -0.848 -12.21 Investment_3 -0.590 -8.69 Investment_4 21.069 230.01 Investment_5 -24.862 -256.32 Investment_6 8.059 80.05 Investment_7 29.994 295.17 Investment_8 15.463 160.46 Investment_9 -12.507 -131.14 Investment_10 22.850 228.07 Investment_11 6.056 60.20 Investment_12 0.575 7.99 Investment_13 4.172 78.05 Investment_14 1.566 46.33 Investment_15 -1.936 -34.91 Investment_16 0.124 2.01 Investment_17 13.606 192.14 Investment_18 0.908 10.31 Investment_19 -44.385 -517.74 Investment_20 -10.505 -137.25 Investment_21 -14.834 -157.09 Investment_22 -13.975 -135.45 PrivateWages_2 0.000 0.00 PrivateWages_3 0.000 0.00 PrivateWages_4 0.000 0.00 PrivateWages_5 0.000 0.00 PrivateWages_6 0.000 0.00 PrivateWages_7 0.000 0.00 PrivateWages_8 0.000 0.00 PrivateWages_9 0.000 0.00 PrivateWages_10 0.000 0.00 PrivateWages_11 0.000 0.00 PrivateWages_12 0.000 0.00 PrivateWages_13 0.000 0.00 PrivateWages_14 0.000 0.00 PrivateWages_15 0.000 0.00 PrivateWages_16 0.000 0.00 PrivateWages_17 0.000 0.00 PrivateWages_18 0.000 0.00 PrivateWages_19 0.000 0.00 PrivateWages_20 0.000 0.00 PrivateWages_21 0.000 0.00 PrivateWages_22 0.000 0.00 PrivateWages_(Intercept) PrivateWages_gnp PrivateWages_gnpLag Consumption_2 0.0000 0.000 0.000 Consumption_3 0.0000 0.000 0.000 Consumption_4 0.0000 0.000 0.000 Consumption_5 0.0000 0.000 0.000 Consumption_6 0.0000 0.000 0.000 Consumption_7 0.0000 0.000 0.000 Consumption_8 0.0000 0.000 0.000 Consumption_9 0.0000 0.000 0.000 Consumption_10 0.0000 0.000 0.000 Consumption_11 0.0000 0.000 0.000 Consumption_12 0.0000 0.000 0.000 Consumption_13 0.0000 0.000 0.000 Consumption_14 0.0000 0.000 0.000 Consumption_15 0.0000 0.000 0.000 Consumption_16 0.0000 0.000 0.000 Consumption_17 0.0000 0.000 0.000 Consumption_18 0.0000 0.000 0.000 Consumption_19 0.0000 0.000 0.000 Consumption_20 0.0000 0.000 0.000 Consumption_21 0.0000 0.000 0.000 Consumption_22 0.0000 0.000 0.000 Investment_2 0.0000 0.000 0.000 Investment_3 0.0000 0.000 0.000 Investment_4 0.0000 0.000 0.000 Investment_5 0.0000 0.000 0.000 Investment_6 0.0000 0.000 0.000 Investment_7 0.0000 0.000 0.000 Investment_8 0.0000 0.000 0.000 Investment_9 0.0000 0.000 0.000 Investment_10 0.0000 0.000 0.000 Investment_11 0.0000 0.000 0.000 Investment_12 0.0000 0.000 0.000 Investment_13 0.0000 0.000 0.000 Investment_14 0.0000 0.000 0.000 Investment_15 0.0000 0.000 0.000 Investment_16 0.0000 0.000 0.000 Investment_17 0.0000 0.000 0.000 Investment_18 0.0000 0.000 0.000 Investment_19 0.0000 0.000 0.000 Investment_20 0.0000 0.000 0.000 Investment_21 0.0000 0.000 0.000 Investment_22 0.0000 0.000 0.000 PrivateWages_2 -1.2942 -59.015 -58.109 PrivateWages_3 0.2957 14.813 13.482 PrivateWages_4 1.1877 67.938 59.505 PrivateWages_5 -0.1358 -7.755 -7.768 PrivateWages_6 -0.4654 -28.390 -26.575 PrivateWages_7 -0.4838 -30.965 -29.514 PrivateWages_8 -0.7281 -46.892 -46.601 PrivateWages_9 0.3392 21.881 21.847 PrivateWages_10 1.1957 80.111 77.122 PrivateWages_11 -0.1508 -9.230 -10.105 PrivateWages_12 0.5942 31.729 36.364 PrivateWages_13 0.1027 4.549 5.483 PrivateWages_14 0.4503 20.307 19.947 PrivateWages_15 0.2816 13.993 12.698 PrivateWages_16 0.0138 0.748 0.684 PrivateWages_17 -0.8508 -53.343 -46.282 PrivateWages_18 0.9956 64.717 62.427 PrivateWages_19 -0.4688 -28.547 -30.469 PrivateWages_20 -0.3795 -26.378 -23.114 PrivateWages_21 -1.0909 -82.582 -75.818 PrivateWages_22 0.5917 52.309 44.794 PrivateWages_trend Consumption_2 0.000 Consumption_3 0.000 Consumption_4 0.000 Consumption_5 0.000 Consumption_6 0.000 Consumption_7 0.000 Consumption_8 0.000 Consumption_9 0.000 Consumption_10 0.000 Consumption_11 0.000 Consumption_12 0.000 Consumption_13 0.000 Consumption_14 0.000 Consumption_15 0.000 Consumption_16 0.000 Consumption_17 0.000 Consumption_18 0.000 Consumption_19 0.000 Consumption_20 0.000 Consumption_21 0.000 Consumption_22 0.000 Investment_2 0.000 Investment_3 0.000 Investment_4 0.000 Investment_5 0.000 Investment_6 0.000 Investment_7 0.000 Investment_8 0.000 Investment_9 0.000 Investment_10 0.000 Investment_11 0.000 Investment_12 0.000 Investment_13 0.000 Investment_14 0.000 Investment_15 0.000 Investment_16 0.000 Investment_17 0.000 Investment_18 0.000 Investment_19 0.000 Investment_20 0.000 Investment_21 0.000 Investment_22 0.000 PrivateWages_2 12.942 PrivateWages_3 -2.661 PrivateWages_4 -9.502 PrivateWages_5 0.951 PrivateWages_6 2.792 PrivateWages_7 2.419 PrivateWages_8 2.913 PrivateWages_9 -1.018 PrivateWages_10 -2.391 PrivateWages_11 0.151 PrivateWages_12 0.000 PrivateWages_13 0.103 PrivateWages_14 0.901 PrivateWages_15 0.845 PrivateWages_16 0.055 PrivateWages_17 -4.254 PrivateWages_18 5.974 PrivateWages_19 -3.281 PrivateWages_20 -3.036 PrivateWages_21 -9.818 PrivateWages_22 5.917 [1] TRUE > Bread Consumption_(Intercept) Consumption_corpProf Consumption_(Intercept) 101.65 0.030 Consumption_corpProf 0.03 0.498 Consumption_corpProfLag -1.06 -0.316 Consumption_wages -1.97 -0.079 Investment_(Intercept) 0.00 0.000 Investment_corpProf 0.00 0.000 Investment_corpProfLag 0.00 0.000 Investment_capitalLag 0.00 0.000 PrivateWages_(Intercept) 0.00 0.000 PrivateWages_gnp 0.00 0.000 PrivateWages_gnpLag 0.00 0.000 PrivateWages_trend 0.00 0.000 Consumption_corpProfLag Consumption_wages Consumption_(Intercept) -1.0607 -1.9718 Consumption_corpProf -0.3157 -0.0790 Consumption_corpProfLag 0.4922 -0.0402 Consumption_wages -0.0402 0.0956 Investment_(Intercept) 0.0000 0.0000 Investment_corpProf 0.0000 0.0000 Investment_corpProfLag 0.0000 0.0000 Investment_capitalLag 0.0000 0.0000 PrivateWages_(Intercept) 0.0000 0.0000 PrivateWages_gnp 0.0000 0.0000 PrivateWages_gnpLag 0.0000 0.0000 PrivateWages_trend 0.0000 0.0000 Investment_(Intercept) Investment_corpProf Consumption_(Intercept) 0.00 0.0000 Consumption_corpProf 0.00 0.0000 Consumption_corpProfLag 0.00 0.0000 Consumption_wages 0.00 0.0000 Investment_(Intercept) 1846.89 -17.9709 Investment_corpProf -17.97 0.5831 Investment_corpProfLag 14.67 -0.5008 Investment_capitalLag -8.88 0.0814 PrivateWages_(Intercept) 0.00 0.0000 PrivateWages_gnp 0.00 0.0000 PrivateWages_gnpLag 0.00 0.0000 PrivateWages_trend 0.00 0.0000 Investment_corpProfLag Investment_capitalLag Consumption_(Intercept) 0.0000 0.0000 Consumption_corpProf 0.0000 0.0000 Consumption_corpProfLag 0.0000 0.0000 Consumption_wages 0.0000 0.0000 Investment_(Intercept) 14.6742 -8.8813 Investment_corpProf -0.5008 0.0814 Investment_corpProfLag 0.6289 -0.0824 Investment_capitalLag -0.0824 0.0442 PrivateWages_(Intercept) 0.0000 0.0000 PrivateWages_gnp 0.0000 0.0000 PrivateWages_gnpLag 0.0000 0.0000 PrivateWages_trend 0.0000 0.0000 PrivateWages_(Intercept) PrivateWages_gnp Consumption_(Intercept) 0.000 0.0000 Consumption_corpProf 0.000 0.0000 Consumption_corpProfLag 0.000 0.0000 Consumption_wages 0.000 0.0000 Investment_(Intercept) 0.000 0.0000 Investment_corpProf 0.000 0.0000 Investment_corpProfLag 0.000 0.0000 Investment_capitalLag 0.000 0.0000 PrivateWages_(Intercept) 172.668 -0.5919 PrivateWages_gnp -0.592 0.1124 PrivateWages_gnpLag -2.313 -0.1062 PrivateWages_trend 1.993 -0.0274 PrivateWages_gnpLag PrivateWages_trend Consumption_(Intercept) 0.00000 0.00000 Consumption_corpProf 0.00000 0.00000 Consumption_corpProfLag 0.00000 0.00000 Consumption_wages 0.00000 0.00000 Investment_(Intercept) 0.00000 0.00000 Investment_corpProf 0.00000 0.00000 Investment_corpProfLag 0.00000 0.00000 Investment_capitalLag 0.00000 0.00000 PrivateWages_(Intercept) -2.31299 1.99284 PrivateWages_gnp -0.10624 -0.02738 PrivateWages_gnpLag 0.14992 -0.00601 PrivateWages_trend -0.00601 0.10900 > > # 2SLS > summary systemfit results method: 2SLS N DF SSR detRCov OLS-R2 McElroy-R2 system 63 51 61 0.288 0.969 0.992 N DF SSR MSE RMSE R2 Adj R2 Consumption 21 17 21.9 1.290 1.136 0.977 0.973 Investment 21 17 29.0 1.709 1.307 0.885 0.865 PrivateWages 21 17 10.0 0.589 0.767 0.987 0.985 The covariance matrix of the residuals Consumption Investment PrivateWages Consumption 1.044 0.438 -0.385 Investment 0.438 1.383 0.193 PrivateWages -0.385 0.193 0.476 The correlations of the residuals Consumption Investment PrivateWages Consumption 1.000 0.364 -0.546 Investment 0.364 1.000 0.237 PrivateWages -0.546 0.237 1.000 2SLS estimates for 'Consumption' (equation 1) Model Formula: consump ~ corpProf + corpProfLag + wages Instruments: ~govExp + taxes + govWage + trend + capitalLag + corpProfLag + gnpLag Estimate Std. Error t value Pr(>|t|) (Intercept) 16.5548 1.3208 12.53 5.2e-10 *** corpProf 0.0173 0.1180 0.15 0.89 corpProfLag 0.2162 0.1073 2.02 0.06 . wages 0.8102 0.0402 20.13 2.7e-13 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.136 on 17 degrees of freedom Number of observations: 21 Degrees of Freedom: 17 SSR: 21.925 MSE: 1.29 Root MSE: 1.136 Multiple R-Squared: 0.977 Adjusted R-Squared: 0.973 2SLS estimates for 'Investment' (equation 2) Model Formula: invest ~ corpProf + corpProfLag + capitalLag Instruments: ~govExp + taxes + govWage + trend + capitalLag + corpProfLag + gnpLag Estimate Std. Error t value Pr(>|t|) (Intercept) 20.2782 7.5427 2.69 0.01555 * corpProf 0.1502 0.1732 0.87 0.39792 corpProfLag 0.6159 0.1628 3.78 0.00148 ** capitalLag -0.1578 0.0361 -4.37 0.00042 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.307 on 17 degrees of freedom Number of observations: 21 Degrees of Freedom: 17 SSR: 29.047 MSE: 1.709 Root MSE: 1.307 Multiple R-Squared: 0.885 Adjusted R-Squared: 0.865 2SLS estimates for 'PrivateWages' (equation 3) Model Formula: privWage ~ gnp + gnpLag + trend Instruments: ~govExp + taxes + govWage + trend + capitalLag + corpProfLag + gnpLag Estimate Std. Error t value Pr(>|t|) (Intercept) 1.5003 1.1478 1.31 0.20857 gnp 0.4389 0.0356 12.32 6.8e-10 *** gnpLag 0.1467 0.0388 3.78 0.00150 ** trend 0.1304 0.0291 4.47 0.00033 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 0.767 on 17 degrees of freedom Number of observations: 21 Degrees of Freedom: 17 SSR: 10.005 MSE: 0.589 Root MSE: 0.767 Multiple R-Squared: 0.987 Adjusted R-Squared: 0.985 > residuals Consumption Investment PrivateWages 1 NA NA NA 2 -0.46263 -1.320 -1.2940 3 -0.61635 0.257 0.2981 4 -1.30423 0.860 1.1918 5 -0.24588 -1.594 -0.1361 6 0.22948 0.259 -0.4634 7 0.88538 1.207 -0.4824 8 1.44189 0.969 -0.7284 9 1.34190 0.113 0.3387 10 -0.39403 1.796 1.1965 11 -0.62564 -0.953 -0.1552 12 -1.06543 -0.807 0.5882 13 -1.33021 -0.895 0.0955 14 0.61059 1.306 0.4487 15 -0.14208 -0.151 0.2822 16 0.00315 0.142 0.0145 17 2.00337 1.749 -0.8478 18 -0.60552 -0.192 0.9950 19 -0.24771 -3.291 -0.4734 20 1.38510 0.285 -0.3766 21 1.03204 -0.104 -1.0893 22 -1.89319 0.363 0.5974 > fitted Consumption Investment PrivateWages 1 NA NA NA 2 42.4 1.120 26.8 3 45.6 1.643 29.0 4 50.5 4.340 32.9 5 50.8 4.594 34.0 6 52.4 4.841 35.9 7 54.2 4.393 37.9 8 54.8 3.231 38.6 9 56.0 2.887 38.9 10 58.2 3.304 40.1 11 55.6 1.953 38.1 12 52.0 -2.593 33.9 13 46.9 -5.305 28.9 14 45.9 -6.406 28.1 15 48.8 -2.849 30.3 16 51.3 -1.442 33.2 17 55.7 0.351 37.6 18 59.3 2.192 40.0 19 57.7 1.391 38.7 20 60.2 1.015 42.0 21 64.0 3.404 46.1 22 71.6 4.537 52.7 > predict Consumption.pred Consumption.se.fit Consumption.lwr Consumption.upr 1 NA NA NA NA 2 42.4 0.471 41.4 43.4 3 45.6 0.577 44.4 46.8 4 50.5 0.354 49.8 51.3 5 50.8 0.405 50.0 51.7 6 52.4 0.404 51.5 53.2 7 54.2 0.359 53.5 55.0 8 54.8 0.328 54.1 55.4 9 56.0 0.368 55.2 56.7 10 58.2 0.377 57.4 59.0 11 55.6 0.728 54.1 57.2 12 52.0 0.604 50.7 53.2 13 46.9 0.765 45.3 48.5 14 45.9 0.615 44.6 47.2 15 48.8 0.374 48.1 49.6 16 51.3 0.333 50.6 52.0 17 55.7 0.409 54.8 56.6 18 59.3 0.326 58.6 60.0 19 57.7 0.414 56.9 58.6 20 60.2 0.478 59.2 61.2 21 64.0 0.446 63.0 64.9 22 71.6 0.689 70.1 73.0 Investment.pred Investment.se.fit Investment.lwr Investment.upr 1 NA NA NA NA 2 1.120 0.865 -0.706 2.946 3 1.643 0.594 0.390 2.895 4 4.340 0.545 3.190 5.490 5 4.594 0.443 3.660 5.527 6 4.841 0.411 3.973 5.709 7 4.393 0.399 3.550 5.235 8 3.231 0.348 2.497 3.965 9 2.887 0.542 1.744 4.030 10 3.304 0.593 2.054 4.555 11 1.953 0.855 0.148 3.757 12 -2.593 0.679 -4.026 -1.160 13 -5.305 0.876 -7.152 -3.457 14 -6.406 0.916 -8.338 -4.473 15 -2.849 0.435 -3.765 -1.932 16 -1.442 0.376 -2.236 -0.649 17 0.351 0.510 -0.724 1.426 18 2.192 0.299 1.560 2.823 19 1.391 0.464 0.411 2.371 20 1.015 0.576 -0.201 2.230 21 3.404 0.471 2.410 4.398 22 4.537 0.675 3.114 5.961 PrivateWages.pred PrivateWages.se.fit PrivateWages.lwr PrivateWages.upr 1 NA NA NA NA 2 26.8 0.318 26.1 27.5 3 29.0 0.330 28.3 29.7 4 32.9 0.346 32.2 33.6 5 34.0 0.242 33.5 34.5 6 35.9 0.248 35.3 36.4 7 37.9 0.244 37.4 38.4 8 38.6 0.246 38.1 39.1 9 38.9 0.235 38.4 39.4 10 40.1 0.224 39.6 40.6 11 38.1 0.350 37.3 38.8 12 33.9 0.382 33.1 34.7 13 28.9 0.454 27.9 29.9 14 28.1 0.342 27.3 28.8 15 30.3 0.335 29.6 31.0 16 33.2 0.280 32.6 33.8 17 37.6 0.291 37.0 38.3 18 40.0 0.215 39.6 40.5 19 38.7 0.356 37.9 39.4 20 42.0 0.304 41.3 42.6 21 46.1 0.306 45.4 46.7 22 52.7 0.489 51.7 53.7 > model.frame consump corpProf corpProfLag wages invest capitalLag privWage gnp gnpLag 1 39.8 12.7 NA 31.0 2.7 180 28.8 44.9 NA 2 41.9 12.4 12.7 28.2 -0.2 183 25.5 45.6 44.9 3 45.0 16.9 12.4 32.2 1.9 183 29.3 50.1 45.6 4 49.2 18.4 16.9 37.0 5.2 184 34.1 57.2 50.1 5 50.6 19.4 18.4 37.0 3.0 190 33.9 57.1 57.2 6 52.6 20.1 19.4 38.6 5.1 193 35.4 61.0 57.1 7 55.1 19.6 20.1 40.7 5.6 198 37.4 64.0 61.0 8 56.2 19.8 19.6 41.5 4.2 203 37.9 64.4 64.0 9 57.3 21.1 19.8 42.9 3.0 208 39.2 64.5 64.4 10 57.8 21.7 21.1 45.3 5.1 211 41.3 67.0 64.5 11 55.0 15.6 21.7 42.1 1.0 216 37.9 61.2 67.0 12 50.9 11.4 15.6 39.3 -3.4 217 34.5 53.4 61.2 13 45.6 7.0 11.4 34.3 -6.2 213 29.0 44.3 53.4 14 46.5 11.2 7.0 34.1 -5.1 207 28.5 45.1 44.3 15 48.7 12.3 11.2 36.6 -3.0 202 30.6 49.7 45.1 16 51.3 14.0 12.3 39.3 -1.3 199 33.2 54.4 49.7 17 57.7 17.6 14.0 44.2 2.1 198 36.8 62.7 54.4 18 58.7 17.3 17.6 47.7 2.0 200 41.0 65.0 62.7 19 57.5 15.3 17.3 45.9 -1.9 202 38.2 60.9 65.0 20 61.6 19.0 15.3 49.4 1.3 200 41.6 69.5 60.9 21 65.0 21.1 19.0 53.0 3.3 201 45.0 75.7 69.5 22 69.7 23.5 21.1 61.8 4.9 204 53.3 88.4 75.7 trend 1 -11 2 -10 3 -9 4 -8 5 -7 6 -6 7 -5 8 -4 9 -3 10 -2 11 -1 12 0 13 1 14 2 15 3 16 4 17 5 18 6 19 7 20 8 21 9 22 10 > Frames of instrumental variables govExp taxes govWage trend capitalLag corpProfLag gnpLag 1 2.4 3.4 2.2 -11 180 NA NA 2 3.9 7.7 2.7 -10 183 12.7 44.9 3 3.2 3.9 2.9 -9 183 12.4 45.6 4 2.8 4.7 2.9 -8 184 16.9 50.1 5 3.5 3.8 3.1 -7 190 18.4 57.2 6 3.3 5.5 3.2 -6 193 19.4 57.1 7 3.3 7.0 3.3 -5 198 20.1 61.0 8 4.0 6.7 3.6 -4 203 19.6 64.0 9 4.2 4.2 3.7 -3 208 19.8 64.4 10 4.1 4.0 4.0 -2 211 21.1 64.5 11 5.2 7.7 4.2 -1 216 21.7 67.0 12 5.9 7.5 4.8 0 217 15.6 61.2 13 4.9 8.3 5.3 1 213 11.4 53.4 14 3.7 5.4 5.6 2 207 7.0 44.3 15 4.0 6.8 6.0 3 202 11.2 45.1 16 4.4 7.2 6.1 4 199 12.3 49.7 17 2.9 8.3 7.4 5 198 14.0 54.4 18 4.3 6.7 6.7 6 200 17.6 62.7 19 5.3 7.4 7.7 7 202 17.3 65.0 20 6.6 8.9 7.8 8 200 15.3 60.9 21 7.4 9.6 8.0 9 201 19.0 69.5 22 13.8 11.6 8.5 10 204 21.1 75.7 govExp taxes govWage trend capitalLag corpProfLag gnpLag 1 2.4 3.4 2.2 -11 180 NA NA 2 3.9 7.7 2.7 -10 183 12.7 44.9 3 3.2 3.9 2.9 -9 183 12.4 45.6 4 2.8 4.7 2.9 -8 184 16.9 50.1 5 3.5 3.8 3.1 -7 190 18.4 57.2 6 3.3 5.5 3.2 -6 193 19.4 57.1 7 3.3 7.0 3.3 -5 198 20.1 61.0 8 4.0 6.7 3.6 -4 203 19.6 64.0 9 4.2 4.2 3.7 -3 208 19.8 64.4 10 4.1 4.0 4.0 -2 211 21.1 64.5 11 5.2 7.7 4.2 -1 216 21.7 67.0 12 5.9 7.5 4.8 0 217 15.6 61.2 13 4.9 8.3 5.3 1 213 11.4 53.4 14 3.7 5.4 5.6 2 207 7.0 44.3 15 4.0 6.8 6.0 3 202 11.2 45.1 16 4.4 7.2 6.1 4 199 12.3 49.7 17 2.9 8.3 7.4 5 198 14.0 54.4 18 4.3 6.7 6.7 6 200 17.6 62.7 19 5.3 7.4 7.7 7 202 17.3 65.0 20 6.6 8.9 7.8 8 200 15.3 60.9 21 7.4 9.6 8.0 9 201 19.0 69.5 22 13.8 11.6 8.5 10 204 21.1 75.7 govExp taxes govWage trend capitalLag corpProfLag gnpLag 1 2.4 3.4 2.2 -11 180 NA NA 2 3.9 7.7 2.7 -10 183 12.7 44.9 3 3.2 3.9 2.9 -9 183 12.4 45.6 4 2.8 4.7 2.9 -8 184 16.9 50.1 5 3.5 3.8 3.1 -7 190 18.4 57.2 6 3.3 5.5 3.2 -6 193 19.4 57.1 7 3.3 7.0 3.3 -5 198 20.1 61.0 8 4.0 6.7 3.6 -4 203 19.6 64.0 9 4.2 4.2 3.7 -3 208 19.8 64.4 10 4.1 4.0 4.0 -2 211 21.1 64.5 11 5.2 7.7 4.2 -1 216 21.7 67.0 12 5.9 7.5 4.8 0 217 15.6 61.2 13 4.9 8.3 5.3 1 213 11.4 53.4 14 3.7 5.4 5.6 2 207 7.0 44.3 15 4.0 6.8 6.0 3 202 11.2 45.1 16 4.4 7.2 6.1 4 199 12.3 49.7 17 2.9 8.3 7.4 5 198 14.0 54.4 18 4.3 6.7 6.7 6 200 17.6 62.7 19 5.3 7.4 7.7 7 202 17.3 65.0 20 6.6 8.9 7.8 8 200 15.3 60.9 21 7.4 9.6 8.0 9 201 19.0 69.5 22 13.8 11.6 8.5 10 204 21.1 75.7 > model.matrix [1] TRUE > matrix of instrumental variables Consumption_(Intercept) Consumption_govExp Consumption_taxes Consumption_2 1 3.9 7.7 Consumption_3 1 3.2 3.9 Consumption_4 1 2.8 4.7 Consumption_5 1 3.5 3.8 Consumption_6 1 3.3 5.5 Consumption_7 1 3.3 7.0 Consumption_8 1 4.0 6.7 Consumption_9 1 4.2 4.2 Consumption_10 1 4.1 4.0 Consumption_11 1 5.2 7.7 Consumption_12 1 5.9 7.5 Consumption_13 1 4.9 8.3 Consumption_14 1 3.7 5.4 Consumption_15 1 4.0 6.8 Consumption_16 1 4.4 7.2 Consumption_17 1 2.9 8.3 Consumption_18 1 4.3 6.7 Consumption_19 1 5.3 7.4 Consumption_20 1 6.6 8.9 Consumption_21 1 7.4 9.6 Consumption_22 1 13.8 11.6 Investment_2 0 0.0 0.0 Investment_3 0 0.0 0.0 Investment_4 0 0.0 0.0 Investment_5 0 0.0 0.0 Investment_6 0 0.0 0.0 Investment_7 0 0.0 0.0 Investment_8 0 0.0 0.0 Investment_9 0 0.0 0.0 Investment_10 0 0.0 0.0 Investment_11 0 0.0 0.0 Investment_12 0 0.0 0.0 Investment_13 0 0.0 0.0 Investment_14 0 0.0 0.0 Investment_15 0 0.0 0.0 Investment_16 0 0.0 0.0 Investment_17 0 0.0 0.0 Investment_18 0 0.0 0.0 Investment_19 0 0.0 0.0 Investment_20 0 0.0 0.0 Investment_21 0 0.0 0.0 Investment_22 0 0.0 0.0 PrivateWages_2 0 0.0 0.0 PrivateWages_3 0 0.0 0.0 PrivateWages_4 0 0.0 0.0 PrivateWages_5 0 0.0 0.0 PrivateWages_6 0 0.0 0.0 PrivateWages_7 0 0.0 0.0 PrivateWages_8 0 0.0 0.0 PrivateWages_9 0 0.0 0.0 PrivateWages_10 0 0.0 0.0 PrivateWages_11 0 0.0 0.0 PrivateWages_12 0 0.0 0.0 PrivateWages_13 0 0.0 0.0 PrivateWages_14 0 0.0 0.0 PrivateWages_15 0 0.0 0.0 PrivateWages_16 0 0.0 0.0 PrivateWages_17 0 0.0 0.0 PrivateWages_18 0 0.0 0.0 PrivateWages_19 0 0.0 0.0 PrivateWages_20 0 0.0 0.0 PrivateWages_21 0 0.0 0.0 PrivateWages_22 0 0.0 0.0 Consumption_govWage Consumption_trend Consumption_capitalLag Consumption_2 2.7 -10 183 Consumption_3 2.9 -9 183 Consumption_4 2.9 -8 184 Consumption_5 3.1 -7 190 Consumption_6 3.2 -6 193 Consumption_7 3.3 -5 198 Consumption_8 3.6 -4 203 Consumption_9 3.7 -3 208 Consumption_10 4.0 -2 211 Consumption_11 4.2 -1 216 Consumption_12 4.8 0 217 Consumption_13 5.3 1 213 Consumption_14 5.6 2 207 Consumption_15 6.0 3 202 Consumption_16 6.1 4 199 Consumption_17 7.4 5 198 Consumption_18 6.7 6 200 Consumption_19 7.7 7 202 Consumption_20 7.8 8 200 Consumption_21 8.0 9 201 Consumption_22 8.5 10 204 Investment_2 0.0 0 0 Investment_3 0.0 0 0 Investment_4 0.0 0 0 Investment_5 0.0 0 0 Investment_6 0.0 0 0 Investment_7 0.0 0 0 Investment_8 0.0 0 0 Investment_9 0.0 0 0 Investment_10 0.0 0 0 Investment_11 0.0 0 0 Investment_12 0.0 0 0 Investment_13 0.0 0 0 Investment_14 0.0 0 0 Investment_15 0.0 0 0 Investment_16 0.0 0 0 Investment_17 0.0 0 0 Investment_18 0.0 0 0 Investment_19 0.0 0 0 Investment_20 0.0 0 0 Investment_21 0.0 0 0 Investment_22 0.0 0 0 PrivateWages_2 0.0 0 0 PrivateWages_3 0.0 0 0 PrivateWages_4 0.0 0 0 PrivateWages_5 0.0 0 0 PrivateWages_6 0.0 0 0 PrivateWages_7 0.0 0 0 PrivateWages_8 0.0 0 0 PrivateWages_9 0.0 0 0 PrivateWages_10 0.0 0 0 PrivateWages_11 0.0 0 0 PrivateWages_12 0.0 0 0 PrivateWages_13 0.0 0 0 PrivateWages_14 0.0 0 0 PrivateWages_15 0.0 0 0 PrivateWages_16 0.0 0 0 PrivateWages_17 0.0 0 0 PrivateWages_18 0.0 0 0 PrivateWages_19 0.0 0 0 PrivateWages_20 0.0 0 0 PrivateWages_21 0.0 0 0 PrivateWages_22 0.0 0 0 Consumption_corpProfLag Consumption_gnpLag Consumption_2 12.7 44.9 Consumption_3 12.4 45.6 Consumption_4 16.9 50.1 Consumption_5 18.4 57.2 Consumption_6 19.4 57.1 Consumption_7 20.1 61.0 Consumption_8 19.6 64.0 Consumption_9 19.8 64.4 Consumption_10 21.1 64.5 Consumption_11 21.7 67.0 Consumption_12 15.6 61.2 Consumption_13 11.4 53.4 Consumption_14 7.0 44.3 Consumption_15 11.2 45.1 Consumption_16 12.3 49.7 Consumption_17 14.0 54.4 Consumption_18 17.6 62.7 Consumption_19 17.3 65.0 Consumption_20 15.3 60.9 Consumption_21 19.0 69.5 Consumption_22 21.1 75.7 Investment_2 0.0 0.0 Investment_3 0.0 0.0 Investment_4 0.0 0.0 Investment_5 0.0 0.0 Investment_6 0.0 0.0 Investment_7 0.0 0.0 Investment_8 0.0 0.0 Investment_9 0.0 0.0 Investment_10 0.0 0.0 Investment_11 0.0 0.0 Investment_12 0.0 0.0 Investment_13 0.0 0.0 Investment_14 0.0 0.0 Investment_15 0.0 0.0 Investment_16 0.0 0.0 Investment_17 0.0 0.0 Investment_18 0.0 0.0 Investment_19 0.0 0.0 Investment_20 0.0 0.0 Investment_21 0.0 0.0 Investment_22 0.0 0.0 PrivateWages_2 0.0 0.0 PrivateWages_3 0.0 0.0 PrivateWages_4 0.0 0.0 PrivateWages_5 0.0 0.0 PrivateWages_6 0.0 0.0 PrivateWages_7 0.0 0.0 PrivateWages_8 0.0 0.0 PrivateWages_9 0.0 0.0 PrivateWages_10 0.0 0.0 PrivateWages_11 0.0 0.0 PrivateWages_12 0.0 0.0 PrivateWages_13 0.0 0.0 PrivateWages_14 0.0 0.0 PrivateWages_15 0.0 0.0 PrivateWages_16 0.0 0.0 PrivateWages_17 0.0 0.0 PrivateWages_18 0.0 0.0 PrivateWages_19 0.0 0.0 PrivateWages_20 0.0 0.0 PrivateWages_21 0.0 0.0 PrivateWages_22 0.0 0.0 Investment_(Intercept) Investment_govExp Investment_taxes Consumption_2 0 0.0 0.0 Consumption_3 0 0.0 0.0 Consumption_4 0 0.0 0.0 Consumption_5 0 0.0 0.0 Consumption_6 0 0.0 0.0 Consumption_7 0 0.0 0.0 Consumption_8 0 0.0 0.0 Consumption_9 0 0.0 0.0 Consumption_10 0 0.0 0.0 Consumption_11 0 0.0 0.0 Consumption_12 0 0.0 0.0 Consumption_13 0 0.0 0.0 Consumption_14 0 0.0 0.0 Consumption_15 0 0.0 0.0 Consumption_16 0 0.0 0.0 Consumption_17 0 0.0 0.0 Consumption_18 0 0.0 0.0 Consumption_19 0 0.0 0.0 Consumption_20 0 0.0 0.0 Consumption_21 0 0.0 0.0 Consumption_22 0 0.0 0.0 Investment_2 1 3.9 7.7 Investment_3 1 3.2 3.9 Investment_4 1 2.8 4.7 Investment_5 1 3.5 3.8 Investment_6 1 3.3 5.5 Investment_7 1 3.3 7.0 Investment_8 1 4.0 6.7 Investment_9 1 4.2 4.2 Investment_10 1 4.1 4.0 Investment_11 1 5.2 7.7 Investment_12 1 5.9 7.5 Investment_13 1 4.9 8.3 Investment_14 1 3.7 5.4 Investment_15 1 4.0 6.8 Investment_16 1 4.4 7.2 Investment_17 1 2.9 8.3 Investment_18 1 4.3 6.7 Investment_19 1 5.3 7.4 Investment_20 1 6.6 8.9 Investment_21 1 7.4 9.6 Investment_22 1 13.8 11.6 PrivateWages_2 0 0.0 0.0 PrivateWages_3 0 0.0 0.0 PrivateWages_4 0 0.0 0.0 PrivateWages_5 0 0.0 0.0 PrivateWages_6 0 0.0 0.0 PrivateWages_7 0 0.0 0.0 PrivateWages_8 0 0.0 0.0 PrivateWages_9 0 0.0 0.0 PrivateWages_10 0 0.0 0.0 PrivateWages_11 0 0.0 0.0 PrivateWages_12 0 0.0 0.0 PrivateWages_13 0 0.0 0.0 PrivateWages_14 0 0.0 0.0 PrivateWages_15 0 0.0 0.0 PrivateWages_16 0 0.0 0.0 PrivateWages_17 0 0.0 0.0 PrivateWages_18 0 0.0 0.0 PrivateWages_19 0 0.0 0.0 PrivateWages_20 0 0.0 0.0 PrivateWages_21 0 0.0 0.0 PrivateWages_22 0 0.0 0.0 Investment_govWage Investment_trend Investment_capitalLag Consumption_2 0.0 0 0 Consumption_3 0.0 0 0 Consumption_4 0.0 0 0 Consumption_5 0.0 0 0 Consumption_6 0.0 0 0 Consumption_7 0.0 0 0 Consumption_8 0.0 0 0 Consumption_9 0.0 0 0 Consumption_10 0.0 0 0 Consumption_11 0.0 0 0 Consumption_12 0.0 0 0 Consumption_13 0.0 0 0 Consumption_14 0.0 0 0 Consumption_15 0.0 0 0 Consumption_16 0.0 0 0 Consumption_17 0.0 0 0 Consumption_18 0.0 0 0 Consumption_19 0.0 0 0 Consumption_20 0.0 0 0 Consumption_21 0.0 0 0 Consumption_22 0.0 0 0 Investment_2 2.7 -10 183 Investment_3 2.9 -9 183 Investment_4 2.9 -8 184 Investment_5 3.1 -7 190 Investment_6 3.2 -6 193 Investment_7 3.3 -5 198 Investment_8 3.6 -4 203 Investment_9 3.7 -3 208 Investment_10 4.0 -2 211 Investment_11 4.2 -1 216 Investment_12 4.8 0 217 Investment_13 5.3 1 213 Investment_14 5.6 2 207 Investment_15 6.0 3 202 Investment_16 6.1 4 199 Investment_17 7.4 5 198 Investment_18 6.7 6 200 Investment_19 7.7 7 202 Investment_20 7.8 8 200 Investment_21 8.0 9 201 Investment_22 8.5 10 204 PrivateWages_2 0.0 0 0 PrivateWages_3 0.0 0 0 PrivateWages_4 0.0 0 0 PrivateWages_5 0.0 0 0 PrivateWages_6 0.0 0 0 PrivateWages_7 0.0 0 0 PrivateWages_8 0.0 0 0 PrivateWages_9 0.0 0 0 PrivateWages_10 0.0 0 0 PrivateWages_11 0.0 0 0 PrivateWages_12 0.0 0 0 PrivateWages_13 0.0 0 0 PrivateWages_14 0.0 0 0 PrivateWages_15 0.0 0 0 PrivateWages_16 0.0 0 0 PrivateWages_17 0.0 0 0 PrivateWages_18 0.0 0 0 PrivateWages_19 0.0 0 0 PrivateWages_20 0.0 0 0 PrivateWages_21 0.0 0 0 PrivateWages_22 0.0 0 0 Investment_corpProfLag Investment_gnpLag Consumption_2 0.0 0.0 Consumption_3 0.0 0.0 Consumption_4 0.0 0.0 Consumption_5 0.0 0.0 Consumption_6 0.0 0.0 Consumption_7 0.0 0.0 Consumption_8 0.0 0.0 Consumption_9 0.0 0.0 Consumption_10 0.0 0.0 Consumption_11 0.0 0.0 Consumption_12 0.0 0.0 Consumption_13 0.0 0.0 Consumption_14 0.0 0.0 Consumption_15 0.0 0.0 Consumption_16 0.0 0.0 Consumption_17 0.0 0.0 Consumption_18 0.0 0.0 Consumption_19 0.0 0.0 Consumption_20 0.0 0.0 Consumption_21 0.0 0.0 Consumption_22 0.0 0.0 Investment_2 12.7 44.9 Investment_3 12.4 45.6 Investment_4 16.9 50.1 Investment_5 18.4 57.2 Investment_6 19.4 57.1 Investment_7 20.1 61.0 Investment_8 19.6 64.0 Investment_9 19.8 64.4 Investment_10 21.1 64.5 Investment_11 21.7 67.0 Investment_12 15.6 61.2 Investment_13 11.4 53.4 Investment_14 7.0 44.3 Investment_15 11.2 45.1 Investment_16 12.3 49.7 Investment_17 14.0 54.4 Investment_18 17.6 62.7 Investment_19 17.3 65.0 Investment_20 15.3 60.9 Investment_21 19.0 69.5 Investment_22 21.1 75.7 PrivateWages_2 0.0 0.0 PrivateWages_3 0.0 0.0 PrivateWages_4 0.0 0.0 PrivateWages_5 0.0 0.0 PrivateWages_6 0.0 0.0 PrivateWages_7 0.0 0.0 PrivateWages_8 0.0 0.0 PrivateWages_9 0.0 0.0 PrivateWages_10 0.0 0.0 PrivateWages_11 0.0 0.0 PrivateWages_12 0.0 0.0 PrivateWages_13 0.0 0.0 PrivateWages_14 0.0 0.0 PrivateWages_15 0.0 0.0 PrivateWages_16 0.0 0.0 PrivateWages_17 0.0 0.0 PrivateWages_18 0.0 0.0 PrivateWages_19 0.0 0.0 PrivateWages_20 0.0 0.0 PrivateWages_21 0.0 0.0 PrivateWages_22 0.0 0.0 PrivateWages_(Intercept) PrivateWages_govExp PrivateWages_taxes Consumption_2 0 0.0 0.0 Consumption_3 0 0.0 0.0 Consumption_4 0 0.0 0.0 Consumption_5 0 0.0 0.0 Consumption_6 0 0.0 0.0 Consumption_7 0 0.0 0.0 Consumption_8 0 0.0 0.0 Consumption_9 0 0.0 0.0 Consumption_10 0 0.0 0.0 Consumption_11 0 0.0 0.0 Consumption_12 0 0.0 0.0 Consumption_13 0 0.0 0.0 Consumption_14 0 0.0 0.0 Consumption_15 0 0.0 0.0 Consumption_16 0 0.0 0.0 Consumption_17 0 0.0 0.0 Consumption_18 0 0.0 0.0 Consumption_19 0 0.0 0.0 Consumption_20 0 0.0 0.0 Consumption_21 0 0.0 0.0 Consumption_22 0 0.0 0.0 Investment_2 0 0.0 0.0 Investment_3 0 0.0 0.0 Investment_4 0 0.0 0.0 Investment_5 0 0.0 0.0 Investment_6 0 0.0 0.0 Investment_7 0 0.0 0.0 Investment_8 0 0.0 0.0 Investment_9 0 0.0 0.0 Investment_10 0 0.0 0.0 Investment_11 0 0.0 0.0 Investment_12 0 0.0 0.0 Investment_13 0 0.0 0.0 Investment_14 0 0.0 0.0 Investment_15 0 0.0 0.0 Investment_16 0 0.0 0.0 Investment_17 0 0.0 0.0 Investment_18 0 0.0 0.0 Investment_19 0 0.0 0.0 Investment_20 0 0.0 0.0 Investment_21 0 0.0 0.0 Investment_22 0 0.0 0.0 PrivateWages_2 1 3.9 7.7 PrivateWages_3 1 3.2 3.9 PrivateWages_4 1 2.8 4.7 PrivateWages_5 1 3.5 3.8 PrivateWages_6 1 3.3 5.5 PrivateWages_7 1 3.3 7.0 PrivateWages_8 1 4.0 6.7 PrivateWages_9 1 4.2 4.2 PrivateWages_10 1 4.1 4.0 PrivateWages_11 1 5.2 7.7 PrivateWages_12 1 5.9 7.5 PrivateWages_13 1 4.9 8.3 PrivateWages_14 1 3.7 5.4 PrivateWages_15 1 4.0 6.8 PrivateWages_16 1 4.4 7.2 PrivateWages_17 1 2.9 8.3 PrivateWages_18 1 4.3 6.7 PrivateWages_19 1 5.3 7.4 PrivateWages_20 1 6.6 8.9 PrivateWages_21 1 7.4 9.6 PrivateWages_22 1 13.8 11.6 PrivateWages_govWage PrivateWages_trend PrivateWages_capitalLag Consumption_2 0.0 0 0 Consumption_3 0.0 0 0 Consumption_4 0.0 0 0 Consumption_5 0.0 0 0 Consumption_6 0.0 0 0 Consumption_7 0.0 0 0 Consumption_8 0.0 0 0 Consumption_9 0.0 0 0 Consumption_10 0.0 0 0 Consumption_11 0.0 0 0 Consumption_12 0.0 0 0 Consumption_13 0.0 0 0 Consumption_14 0.0 0 0 Consumption_15 0.0 0 0 Consumption_16 0.0 0 0 Consumption_17 0.0 0 0 Consumption_18 0.0 0 0 Consumption_19 0.0 0 0 Consumption_20 0.0 0 0 Consumption_21 0.0 0 0 Consumption_22 0.0 0 0 Investment_2 0.0 0 0 Investment_3 0.0 0 0 Investment_4 0.0 0 0 Investment_5 0.0 0 0 Investment_6 0.0 0 0 Investment_7 0.0 0 0 Investment_8 0.0 0 0 Investment_9 0.0 0 0 Investment_10 0.0 0 0 Investment_11 0.0 0 0 Investment_12 0.0 0 0 Investment_13 0.0 0 0 Investment_14 0.0 0 0 Investment_15 0.0 0 0 Investment_16 0.0 0 0 Investment_17 0.0 0 0 Investment_18 0.0 0 0 Investment_19 0.0 0 0 Investment_20 0.0 0 0 Investment_21 0.0 0 0 Investment_22 0.0 0 0 PrivateWages_2 2.7 -10 183 PrivateWages_3 2.9 -9 183 PrivateWages_4 2.9 -8 184 PrivateWages_5 3.1 -7 190 PrivateWages_6 3.2 -6 193 PrivateWages_7 3.3 -5 198 PrivateWages_8 3.6 -4 203 PrivateWages_9 3.7 -3 208 PrivateWages_10 4.0 -2 211 PrivateWages_11 4.2 -1 216 PrivateWages_12 4.8 0 217 PrivateWages_13 5.3 1 213 PrivateWages_14 5.6 2 207 PrivateWages_15 6.0 3 202 PrivateWages_16 6.1 4 199 PrivateWages_17 7.4 5 198 PrivateWages_18 6.7 6 200 PrivateWages_19 7.7 7 202 PrivateWages_20 7.8 8 200 PrivateWages_21 8.0 9 201 PrivateWages_22 8.5 10 204 PrivateWages_corpProfLag PrivateWages_gnpLag Consumption_2 0.0 0.0 Consumption_3 0.0 0.0 Consumption_4 0.0 0.0 Consumption_5 0.0 0.0 Consumption_6 0.0 0.0 Consumption_7 0.0 0.0 Consumption_8 0.0 0.0 Consumption_9 0.0 0.0 Consumption_10 0.0 0.0 Consumption_11 0.0 0.0 Consumption_12 0.0 0.0 Consumption_13 0.0 0.0 Consumption_14 0.0 0.0 Consumption_15 0.0 0.0 Consumption_16 0.0 0.0 Consumption_17 0.0 0.0 Consumption_18 0.0 0.0 Consumption_19 0.0 0.0 Consumption_20 0.0 0.0 Consumption_21 0.0 0.0 Consumption_22 0.0 0.0 Investment_2 0.0 0.0 Investment_3 0.0 0.0 Investment_4 0.0 0.0 Investment_5 0.0 0.0 Investment_6 0.0 0.0 Investment_7 0.0 0.0 Investment_8 0.0 0.0 Investment_9 0.0 0.0 Investment_10 0.0 0.0 Investment_11 0.0 0.0 Investment_12 0.0 0.0 Investment_13 0.0 0.0 Investment_14 0.0 0.0 Investment_15 0.0 0.0 Investment_16 0.0 0.0 Investment_17 0.0 0.0 Investment_18 0.0 0.0 Investment_19 0.0 0.0 Investment_20 0.0 0.0 Investment_21 0.0 0.0 Investment_22 0.0 0.0 PrivateWages_2 12.7 44.9 PrivateWages_3 12.4 45.6 PrivateWages_4 16.9 50.1 PrivateWages_5 18.4 57.2 PrivateWages_6 19.4 57.1 PrivateWages_7 20.1 61.0 PrivateWages_8 19.6 64.0 PrivateWages_9 19.8 64.4 PrivateWages_10 21.1 64.5 PrivateWages_11 21.7 67.0 PrivateWages_12 15.6 61.2 PrivateWages_13 11.4 53.4 PrivateWages_14 7.0 44.3 PrivateWages_15 11.2 45.1 PrivateWages_16 12.3 49.7 PrivateWages_17 14.0 54.4 PrivateWages_18 17.6 62.7 PrivateWages_19 17.3 65.0 PrivateWages_20 15.3 60.9 PrivateWages_21 19.0 69.5 PrivateWages_22 21.1 75.7 > matrix of fitted regressors Consumption_(Intercept) Consumption_corpProf Consumption_2 1 13.26 Consumption_3 1 16.58 Consumption_4 1 19.28 Consumption_5 1 20.96 Consumption_6 1 19.77 Consumption_7 1 18.24 Consumption_8 1 17.57 Consumption_9 1 19.54 Consumption_10 1 20.38 Consumption_11 1 17.18 Consumption_12 1 12.71 Consumption_13 1 9.00 Consumption_14 1 9.05 Consumption_15 1 12.67 Consumption_16 1 14.42 Consumption_17 1 14.71 Consumption_18 1 19.80 Consumption_19 1 19.21 Consumption_20 1 17.42 Consumption_21 1 20.31 Consumption_22 1 22.66 Investment_2 0 0.00 Investment_3 0 0.00 Investment_4 0 0.00 Investment_5 0 0.00 Investment_6 0 0.00 Investment_7 0 0.00 Investment_8 0 0.00 Investment_9 0 0.00 Investment_10 0 0.00 Investment_11 0 0.00 Investment_12 0 0.00 Investment_13 0 0.00 Investment_14 0 0.00 Investment_15 0 0.00 Investment_16 0 0.00 Investment_17 0 0.00 Investment_18 0 0.00 Investment_19 0 0.00 Investment_20 0 0.00 Investment_21 0 0.00 Investment_22 0 0.00 PrivateWages_2 0 0.00 PrivateWages_3 0 0.00 PrivateWages_4 0 0.00 PrivateWages_5 0 0.00 PrivateWages_6 0 0.00 PrivateWages_7 0 0.00 PrivateWages_8 0 0.00 PrivateWages_9 0 0.00 PrivateWages_10 0 0.00 PrivateWages_11 0 0.00 PrivateWages_12 0 0.00 PrivateWages_13 0 0.00 PrivateWages_14 0 0.00 PrivateWages_15 0 0.00 PrivateWages_16 0 0.00 PrivateWages_17 0 0.00 PrivateWages_18 0 0.00 PrivateWages_19 0 0.00 PrivateWages_20 0 0.00 PrivateWages_21 0 0.00 PrivateWages_22 0 0.00 Consumption_corpProfLag Consumption_wages Consumption_2 12.7 29.4 Consumption_3 12.4 31.8 Consumption_4 16.9 35.8 Consumption_5 18.4 39.1 Consumption_6 19.4 39.1 Consumption_7 20.1 39.4 Consumption_8 19.6 40.2 Consumption_9 19.8 42.3 Consumption_10 21.1 44.0 Consumption_11 21.7 43.7 Consumption_12 15.6 39.5 Consumption_13 11.4 35.1 Consumption_14 7.0 32.8 Consumption_15 11.2 37.5 Consumption_16 12.3 40.1 Consumption_17 14.0 41.7 Consumption_18 17.6 47.9 Consumption_19 17.3 49.3 Consumption_20 15.3 48.4 Consumption_21 19.0 53.4 Consumption_22 21.1 60.7 Investment_2 0.0 0.0 Investment_3 0.0 0.0 Investment_4 0.0 0.0 Investment_5 0.0 0.0 Investment_6 0.0 0.0 Investment_7 0.0 0.0 Investment_8 0.0 0.0 Investment_9 0.0 0.0 Investment_10 0.0 0.0 Investment_11 0.0 0.0 Investment_12 0.0 0.0 Investment_13 0.0 0.0 Investment_14 0.0 0.0 Investment_15 0.0 0.0 Investment_16 0.0 0.0 Investment_17 0.0 0.0 Investment_18 0.0 0.0 Investment_19 0.0 0.0 Investment_20 0.0 0.0 Investment_21 0.0 0.0 Investment_22 0.0 0.0 PrivateWages_2 0.0 0.0 PrivateWages_3 0.0 0.0 PrivateWages_4 0.0 0.0 PrivateWages_5 0.0 0.0 PrivateWages_6 0.0 0.0 PrivateWages_7 0.0 0.0 PrivateWages_8 0.0 0.0 PrivateWages_9 0.0 0.0 PrivateWages_10 0.0 0.0 PrivateWages_11 0.0 0.0 PrivateWages_12 0.0 0.0 PrivateWages_13 0.0 0.0 PrivateWages_14 0.0 0.0 PrivateWages_15 0.0 0.0 PrivateWages_16 0.0 0.0 PrivateWages_17 0.0 0.0 PrivateWages_18 0.0 0.0 PrivateWages_19 0.0 0.0 PrivateWages_20 0.0 0.0 PrivateWages_21 0.0 0.0 PrivateWages_22 0.0 0.0 Investment_(Intercept) Investment_corpProf Consumption_2 0 0.00 Consumption_3 0 0.00 Consumption_4 0 0.00 Consumption_5 0 0.00 Consumption_6 0 0.00 Consumption_7 0 0.00 Consumption_8 0 0.00 Consumption_9 0 0.00 Consumption_10 0 0.00 Consumption_11 0 0.00 Consumption_12 0 0.00 Consumption_13 0 0.00 Consumption_14 0 0.00 Consumption_15 0 0.00 Consumption_16 0 0.00 Consumption_17 0 0.00 Consumption_18 0 0.00 Consumption_19 0 0.00 Consumption_20 0 0.00 Consumption_21 0 0.00 Consumption_22 0 0.00 Investment_2 1 13.26 Investment_3 1 16.58 Investment_4 1 19.28 Investment_5 1 20.96 Investment_6 1 19.77 Investment_7 1 18.24 Investment_8 1 17.57 Investment_9 1 19.54 Investment_10 1 20.38 Investment_11 1 17.18 Investment_12 1 12.71 Investment_13 1 9.00 Investment_14 1 9.05 Investment_15 1 12.67 Investment_16 1 14.42 Investment_17 1 14.71 Investment_18 1 19.80 Investment_19 1 19.21 Investment_20 1 17.42 Investment_21 1 20.31 Investment_22 1 22.66 PrivateWages_2 0 0.00 PrivateWages_3 0 0.00 PrivateWages_4 0 0.00 PrivateWages_5 0 0.00 PrivateWages_6 0 0.00 PrivateWages_7 0 0.00 PrivateWages_8 0 0.00 PrivateWages_9 0 0.00 PrivateWages_10 0 0.00 PrivateWages_11 0 0.00 PrivateWages_12 0 0.00 PrivateWages_13 0 0.00 PrivateWages_14 0 0.00 PrivateWages_15 0 0.00 PrivateWages_16 0 0.00 PrivateWages_17 0 0.00 PrivateWages_18 0 0.00 PrivateWages_19 0 0.00 PrivateWages_20 0 0.00 PrivateWages_21 0 0.00 PrivateWages_22 0 0.00 Investment_corpProfLag Investment_capitalLag Consumption_2 0.0 0 Consumption_3 0.0 0 Consumption_4 0.0 0 Consumption_5 0.0 0 Consumption_6 0.0 0 Consumption_7 0.0 0 Consumption_8 0.0 0 Consumption_9 0.0 0 Consumption_10 0.0 0 Consumption_11 0.0 0 Consumption_12 0.0 0 Consumption_13 0.0 0 Consumption_14 0.0 0 Consumption_15 0.0 0 Consumption_16 0.0 0 Consumption_17 0.0 0 Consumption_18 0.0 0 Consumption_19 0.0 0 Consumption_20 0.0 0 Consumption_21 0.0 0 Consumption_22 0.0 0 Investment_2 12.7 183 Investment_3 12.4 183 Investment_4 16.9 184 Investment_5 18.4 190 Investment_6 19.4 193 Investment_7 20.1 198 Investment_8 19.6 203 Investment_9 19.8 208 Investment_10 21.1 211 Investment_11 21.7 216 Investment_12 15.6 217 Investment_13 11.4 213 Investment_14 7.0 207 Investment_15 11.2 202 Investment_16 12.3 199 Investment_17 14.0 198 Investment_18 17.6 200 Investment_19 17.3 202 Investment_20 15.3 200 Investment_21 19.0 201 Investment_22 21.1 204 PrivateWages_2 0.0 0 PrivateWages_3 0.0 0 PrivateWages_4 0.0 0 PrivateWages_5 0.0 0 PrivateWages_6 0.0 0 PrivateWages_7 0.0 0 PrivateWages_8 0.0 0 PrivateWages_9 0.0 0 PrivateWages_10 0.0 0 PrivateWages_11 0.0 0 PrivateWages_12 0.0 0 PrivateWages_13 0.0 0 PrivateWages_14 0.0 0 PrivateWages_15 0.0 0 PrivateWages_16 0.0 0 PrivateWages_17 0.0 0 PrivateWages_18 0.0 0 PrivateWages_19 0.0 0 PrivateWages_20 0.0 0 PrivateWages_21 0.0 0 PrivateWages_22 0.0 0 PrivateWages_(Intercept) PrivateWages_gnp PrivateWages_gnpLag Consumption_2 0 0.0 0.0 Consumption_3 0 0.0 0.0 Consumption_4 0 0.0 0.0 Consumption_5 0 0.0 0.0 Consumption_6 0 0.0 0.0 Consumption_7 0 0.0 0.0 Consumption_8 0 0.0 0.0 Consumption_9 0 0.0 0.0 Consumption_10 0 0.0 0.0 Consumption_11 0 0.0 0.0 Consumption_12 0 0.0 0.0 Consumption_13 0 0.0 0.0 Consumption_14 0 0.0 0.0 Consumption_15 0 0.0 0.0 Consumption_16 0 0.0 0.0 Consumption_17 0 0.0 0.0 Consumption_18 0 0.0 0.0 Consumption_19 0 0.0 0.0 Consumption_20 0 0.0 0.0 Consumption_21 0 0.0 0.0 Consumption_22 0 0.0 0.0 Investment_2 0 0.0 0.0 Investment_3 0 0.0 0.0 Investment_4 0 0.0 0.0 Investment_5 0 0.0 0.0 Investment_6 0 0.0 0.0 Investment_7 0 0.0 0.0 Investment_8 0 0.0 0.0 Investment_9 0 0.0 0.0 Investment_10 0 0.0 0.0 Investment_11 0 0.0 0.0 Investment_12 0 0.0 0.0 Investment_13 0 0.0 0.0 Investment_14 0 0.0 0.0 Investment_15 0 0.0 0.0 Investment_16 0 0.0 0.0 Investment_17 0 0.0 0.0 Investment_18 0 0.0 0.0 Investment_19 0 0.0 0.0 Investment_20 0 0.0 0.0 Investment_21 0 0.0 0.0 Investment_22 0 0.0 0.0 PrivateWages_2 1 47.7 44.9 PrivateWages_3 1 49.3 45.6 PrivateWages_4 1 56.8 50.1 PrivateWages_5 1 60.7 57.2 PrivateWages_6 1 61.2 57.1 PrivateWages_7 1 61.3 61.0 PrivateWages_8 1 60.9 64.0 PrivateWages_9 1 62.4 64.4 PrivateWages_10 1 64.4 64.5 PrivateWages_11 1 64.4 67.0 PrivateWages_12 1 54.9 61.2 PrivateWages_13 1 47.1 53.4 PrivateWages_14 1 41.6 44.3 PrivateWages_15 1 51.0 45.1 PrivateWages_16 1 55.7 49.7 PrivateWages_17 1 57.3 54.4 PrivateWages_18 1 67.7 62.7 PrivateWages_19 1 68.2 65.0 PrivateWages_20 1 66.9 60.9 PrivateWages_21 1 75.3 69.5 PrivateWages_22 1 86.5 75.7 PrivateWages_trend Consumption_2 0 Consumption_3 0 Consumption_4 0 Consumption_5 0 Consumption_6 0 Consumption_7 0 Consumption_8 0 Consumption_9 0 Consumption_10 0 Consumption_11 0 Consumption_12 0 Consumption_13 0 Consumption_14 0 Consumption_15 0 Consumption_16 0 Consumption_17 0 Consumption_18 0 Consumption_19 0 Consumption_20 0 Consumption_21 0 Consumption_22 0 Investment_2 0 Investment_3 0 Investment_4 0 Investment_5 0 Investment_6 0 Investment_7 0 Investment_8 0 Investment_9 0 Investment_10 0 Investment_11 0 Investment_12 0 Investment_13 0 Investment_14 0 Investment_15 0 Investment_16 0 Investment_17 0 Investment_18 0 Investment_19 0 Investment_20 0 Investment_21 0 Investment_22 0 PrivateWages_2 -10 PrivateWages_3 -9 PrivateWages_4 -8 PrivateWages_5 -7 PrivateWages_6 -6 PrivateWages_7 -5 PrivateWages_8 -4 PrivateWages_9 -3 PrivateWages_10 -2 PrivateWages_11 -1 PrivateWages_12 0 PrivateWages_13 1 PrivateWages_14 2 PrivateWages_15 3 PrivateWages_16 4 PrivateWages_17 5 PrivateWages_18 6 PrivateWages_19 7 PrivateWages_20 8 PrivateWages_21 9 PrivateWages_22 10 > nobs [1] 63 > linearHypothesis Linear hypothesis test (Theil's F test) Hypothesis: Consumption_corpProf + Investment_capitalLag = 0 Model 1: restricted model Model 2: kleinModel Res.Df Df F Pr(>F) 1 52 2 51 1 1.08 0.3 Linear hypothesis test (F statistic of a Wald test) Hypothesis: Consumption_corpProf + Investment_capitalLag = 0 Model 1: restricted model Model 2: kleinModel Res.Df Df F Pr(>F) 1 52 2 51 1 1.29 0.26 Linear hypothesis test (Chi^2 statistic of a Wald test) Hypothesis: Consumption_corpProf + Investment_capitalLag = 0 Model 1: restricted model Model 2: kleinModel Res.Df Df Chisq Pr(>Chisq) 1 52 2 51 1 1.29 0.26 Linear hypothesis test (Theil's F test) Hypothesis: Consumption_corpProf + Investment_capitalLag = 0 Consumption_corpProfLag - PrivateWages_trend = 0 Model 1: restricted model Model 2: kleinModel Res.Df Df F Pr(>F) 1 53 2 51 2 0.54 0.58 Linear hypothesis test (F statistic of a Wald test) Hypothesis: Consumption_corpProf + Investment_capitalLag = 0 Consumption_corpProfLag - PrivateWages_trend = 0 Model 1: restricted model Model 2: kleinModel Res.Df Df F Pr(>F) 1 53 2 51 2 0.65 0.53 Linear hypothesis test (Chi^2 statistic of a Wald test) Hypothesis: Consumption_corpProf + Investment_capitalLag = 0 Consumption_corpProfLag - PrivateWages_trend = 0 Model 1: restricted model Model 2: kleinModel Res.Df Df Chisq Pr(>Chisq) 1 53 2 51 2 1.3 0.52 > logLik 'log Lik.' -76.3 (df=13) 'log Lik.' -85.5 (df=13) Estimating function Consumption_(Intercept) Consumption_corpProf Consumption_2 -1.455 -19.28 Consumption_3 -0.246 -4.08 Consumption_4 -0.309 -5.96 Consumption_5 -1.952 -40.92 Consumption_6 -0.199 -3.93 Consumption_7 2.000 36.47 Consumption_8 2.547 44.76 Consumption_9 1.829 35.74 Consumption_10 0.665 13.55 Consumption_11 -1.947 -33.46 Consumption_12 -1.232 -15.65 Consumption_13 -2.039 -18.35 Consumption_14 1.714 15.52 Consumption_15 -0.877 -11.11 Consumption_16 -0.684 -9.87 Consumption_17 4.077 59.98 Consumption_18 -0.793 -15.70 Consumption_19 -3.072 -59.01 Consumption_20 2.230 38.84 Consumption_21 0.744 15.11 Consumption_22 -1.000 -22.66 Investment_2 0.000 0.00 Investment_3 0.000 0.00 Investment_4 0.000 0.00 Investment_5 0.000 0.00 Investment_6 0.000 0.00 Investment_7 0.000 0.00 Investment_8 0.000 0.00 Investment_9 0.000 0.00 Investment_10 0.000 0.00 Investment_11 0.000 0.00 Investment_12 0.000 0.00 Investment_13 0.000 0.00 Investment_14 0.000 0.00 Investment_15 0.000 0.00 Investment_16 0.000 0.00 Investment_17 0.000 0.00 Investment_18 0.000 0.00 Investment_19 0.000 0.00 Investment_20 0.000 0.00 Investment_21 0.000 0.00 Investment_22 0.000 0.00 PrivateWages_2 0.000 0.00 PrivateWages_3 0.000 0.00 PrivateWages_4 0.000 0.00 PrivateWages_5 0.000 0.00 PrivateWages_6 0.000 0.00 PrivateWages_7 0.000 0.00 PrivateWages_8 0.000 0.00 PrivateWages_9 0.000 0.00 PrivateWages_10 0.000 0.00 PrivateWages_11 0.000 0.00 PrivateWages_12 0.000 0.00 PrivateWages_13 0.000 0.00 PrivateWages_14 0.000 0.00 PrivateWages_15 0.000 0.00 PrivateWages_16 0.000 0.00 PrivateWages_17 0.000 0.00 PrivateWages_18 0.000 0.00 PrivateWages_19 0.000 0.00 PrivateWages_20 0.000 0.00 PrivateWages_21 0.000 0.00 PrivateWages_22 0.000 0.00 Consumption_corpProfLag Consumption_wages Consumption_2 -18.47 -42.77 Consumption_3 -3.05 -7.82 Consumption_4 -5.22 -11.05 Consumption_5 -35.93 -76.29 Consumption_6 -3.85 -7.77 Consumption_7 40.20 78.70 Consumption_8 49.93 102.36 Consumption_9 36.21 77.42 Consumption_10 14.03 29.28 Consumption_11 -42.26 -85.10 Consumption_12 -19.22 -48.63 Consumption_13 -23.25 -71.64 Consumption_14 12.00 56.20 Consumption_15 -9.82 -32.89 Consumption_16 -8.42 -27.47 Consumption_17 57.07 170.01 Consumption_18 -13.96 -37.97 Consumption_19 -53.15 -151.48 Consumption_20 34.12 107.90 Consumption_21 14.14 39.73 Consumption_22 -21.10 -60.72 Investment_2 0.00 0.00 Investment_3 0.00 0.00 Investment_4 0.00 0.00 Investment_5 0.00 0.00 Investment_6 0.00 0.00 Investment_7 0.00 0.00 Investment_8 0.00 0.00 Investment_9 0.00 0.00 Investment_10 0.00 0.00 Investment_11 0.00 0.00 Investment_12 0.00 0.00 Investment_13 0.00 0.00 Investment_14 0.00 0.00 Investment_15 0.00 0.00 Investment_16 0.00 0.00 Investment_17 0.00 0.00 Investment_18 0.00 0.00 Investment_19 0.00 0.00 Investment_20 0.00 0.00 Investment_21 0.00 0.00 Investment_22 0.00 0.00 PrivateWages_2 0.00 0.00 PrivateWages_3 0.00 0.00 PrivateWages_4 0.00 0.00 PrivateWages_5 0.00 0.00 PrivateWages_6 0.00 0.00 PrivateWages_7 0.00 0.00 PrivateWages_8 0.00 0.00 PrivateWages_9 0.00 0.00 PrivateWages_10 0.00 0.00 PrivateWages_11 0.00 0.00 PrivateWages_12 0.00 0.00 PrivateWages_13 0.00 0.00 PrivateWages_14 0.00 0.00 PrivateWages_15 0.00 0.00 PrivateWages_16 0.00 0.00 PrivateWages_17 0.00 0.00 PrivateWages_18 0.00 0.00 PrivateWages_19 0.00 0.00 PrivateWages_20 0.00 0.00 PrivateWages_21 0.00 0.00 PrivateWages_22 0.00 0.00 Investment_(Intercept) Investment_corpProf Consumption_2 0.0000 0.000 Consumption_3 0.0000 0.000 Consumption_4 0.0000 0.000 Consumption_5 0.0000 0.000 Consumption_6 0.0000 0.000 Consumption_7 0.0000 0.000 Consumption_8 0.0000 0.000 Consumption_9 0.0000 0.000 Consumption_10 0.0000 0.000 Consumption_11 0.0000 0.000 Consumption_12 0.0000 0.000 Consumption_13 0.0000 0.000 Consumption_14 0.0000 0.000 Consumption_15 0.0000 0.000 Consumption_16 0.0000 0.000 Consumption_17 0.0000 0.000 Consumption_18 0.0000 0.000 Consumption_19 0.0000 0.000 Consumption_20 0.0000 0.000 Consumption_21 0.0000 0.000 Consumption_22 0.0000 0.000 Investment_2 -1.4484 -19.199 Investment_3 0.3058 5.070 Investment_4 0.7275 14.029 Investment_5 -1.8279 -38.314 Investment_6 0.3088 6.104 Investment_7 1.4119 25.751 Investment_8 1.3034 22.906 Investment_9 0.3472 6.785 Investment_10 1.9947 40.642 Investment_11 -1.1903 -20.449 Investment_12 -1.0029 -12.742 Investment_13 -1.1958 -10.762 Investment_14 1.6279 14.739 Investment_15 -0.2072 -2.625 Investment_16 0.0790 1.140 Investment_17 2.1831 32.118 Investment_18 -0.5667 -11.219 Investment_19 -3.8778 -74.479 Investment_20 0.5228 9.107 Investment_21 0.0154 0.312 Investment_22 0.4893 11.087 PrivateWages_2 0.0000 0.000 PrivateWages_3 0.0000 0.000 PrivateWages_4 0.0000 0.000 PrivateWages_5 0.0000 0.000 PrivateWages_6 0.0000 0.000 PrivateWages_7 0.0000 0.000 PrivateWages_8 0.0000 0.000 PrivateWages_9 0.0000 0.000 PrivateWages_10 0.0000 0.000 PrivateWages_11 0.0000 0.000 PrivateWages_12 0.0000 0.000 PrivateWages_13 0.0000 0.000 PrivateWages_14 0.0000 0.000 PrivateWages_15 0.0000 0.000 PrivateWages_16 0.0000 0.000 PrivateWages_17 0.0000 0.000 PrivateWages_18 0.0000 0.000 PrivateWages_19 0.0000 0.000 PrivateWages_20 0.0000 0.000 PrivateWages_21 0.0000 0.000 PrivateWages_22 0.0000 0.000 Investment_corpProfLag Investment_capitalLag Consumption_2 0.000 0.0 Consumption_3 0.000 0.0 Consumption_4 0.000 0.0 Consumption_5 0.000 0.0 Consumption_6 0.000 0.0 Consumption_7 0.000 0.0 Consumption_8 0.000 0.0 Consumption_9 0.000 0.0 Consumption_10 0.000 0.0 Consumption_11 0.000 0.0 Consumption_12 0.000 0.0 Consumption_13 0.000 0.0 Consumption_14 0.000 0.0 Consumption_15 0.000 0.0 Consumption_16 0.000 0.0 Consumption_17 0.000 0.0 Consumption_18 0.000 0.0 Consumption_19 0.000 0.0 Consumption_20 0.000 0.0 Consumption_21 0.000 0.0 Consumption_22 0.000 0.0 Investment_2 -18.395 -264.8 Investment_3 3.792 55.8 Investment_4 12.295 134.2 Investment_5 -33.634 -346.8 Investment_6 5.991 59.5 Investment_7 28.378 279.3 Investment_8 25.548 265.1 Investment_9 6.875 72.1 Investment_10 42.088 420.1 Investment_11 -25.829 -256.7 Investment_12 -15.646 -217.3 Investment_13 -13.632 -255.1 Investment_14 11.395 337.1 Investment_15 -2.320 -41.8 Investment_16 0.972 15.7 Investment_17 30.564 431.6 Investment_18 -9.974 -113.2 Investment_19 -67.085 -782.5 Investment_20 7.999 104.5 Investment_21 0.292 3.1 Investment_22 10.325 100.1 PrivateWages_2 0.000 0.0 PrivateWages_3 0.000 0.0 PrivateWages_4 0.000 0.0 PrivateWages_5 0.000 0.0 PrivateWages_6 0.000 0.0 PrivateWages_7 0.000 0.0 PrivateWages_8 0.000 0.0 PrivateWages_9 0.000 0.0 PrivateWages_10 0.000 0.0 PrivateWages_11 0.000 0.0 PrivateWages_12 0.000 0.0 PrivateWages_13 0.000 0.0 PrivateWages_14 0.000 0.0 PrivateWages_15 0.000 0.0 PrivateWages_16 0.000 0.0 PrivateWages_17 0.000 0.0 PrivateWages_18 0.000 0.0 PrivateWages_19 0.000 0.0 PrivateWages_20 0.000 0.0 PrivateWages_21 0.000 0.0 PrivateWages_22 0.000 0.0 PrivateWages_(Intercept) PrivateWages_gnp PrivateWages_gnpLag Consumption_2 0.0000 0.00 0.00 Consumption_3 0.0000 0.00 0.00 Consumption_4 0.0000 0.00 0.00 Consumption_5 0.0000 0.00 0.00 Consumption_6 0.0000 0.00 0.00 Consumption_7 0.0000 0.00 0.00 Consumption_8 0.0000 0.00 0.00 Consumption_9 0.0000 0.00 0.00 Consumption_10 0.0000 0.00 0.00 Consumption_11 0.0000 0.00 0.00 Consumption_12 0.0000 0.00 0.00 Consumption_13 0.0000 0.00 0.00 Consumption_14 0.0000 0.00 0.00 Consumption_15 0.0000 0.00 0.00 Consumption_16 0.0000 0.00 0.00 Consumption_17 0.0000 0.00 0.00 Consumption_18 0.0000 0.00 0.00 Consumption_19 0.0000 0.00 0.00 Consumption_20 0.0000 0.00 0.00 Consumption_21 0.0000 0.00 0.00 Consumption_22 0.0000 0.00 0.00 Investment_2 0.0000 0.00 0.00 Investment_3 0.0000 0.00 0.00 Investment_4 0.0000 0.00 0.00 Investment_5 0.0000 0.00 0.00 Investment_6 0.0000 0.00 0.00 Investment_7 0.0000 0.00 0.00 Investment_8 0.0000 0.00 0.00 Investment_9 0.0000 0.00 0.00 Investment_10 0.0000 0.00 0.00 Investment_11 0.0000 0.00 0.00 Investment_12 0.0000 0.00 0.00 Investment_13 0.0000 0.00 0.00 Investment_14 0.0000 0.00 0.00 Investment_15 0.0000 0.00 0.00 Investment_16 0.0000 0.00 0.00 Investment_17 0.0000 0.00 0.00 Investment_18 0.0000 0.00 0.00 Investment_19 0.0000 0.00 0.00 Investment_20 0.0000 0.00 0.00 Investment_21 0.0000 0.00 0.00 Investment_22 0.0000 0.00 0.00 PrivateWages_2 -2.1987 -104.79 -98.72 PrivateWages_3 0.6372 31.43 29.06 PrivateWages_4 1.3519 76.84 67.73 PrivateWages_5 -1.7306 -105.10 -98.99 PrivateWages_6 -0.5521 -33.79 -31.52 PrivateWages_7 0.7059 43.27 43.06 PrivateWages_8 0.8269 50.32 52.92 PrivateWages_9 1.2718 79.33 81.90 PrivateWages_10 2.3392 150.64 150.88 PrivateWages_11 -1.5500 -99.78 -103.85 PrivateWages_12 -0.0625 -3.43 -3.82 PrivateWages_13 -1.1474 -54.08 -61.27 PrivateWages_14 1.9682 81.95 87.19 PrivateWages_15 -0.2753 -14.03 -12.42 PrivateWages_16 -0.5389 -30.00 -26.78 PrivateWages_17 1.5156 86.87 82.45 PrivateWages_18 -0.1787 -12.09 -11.21 PrivateWages_19 -3.6814 -251.10 -239.29 PrivateWages_20 0.7597 50.83 46.27 PrivateWages_21 -0.9040 -68.05 -62.83 PrivateWages_22 1.4431 124.79 109.24 PrivateWages_trend Consumption_2 0.000 Consumption_3 0.000 Consumption_4 0.000 Consumption_5 0.000 Consumption_6 0.000 Consumption_7 0.000 Consumption_8 0.000 Consumption_9 0.000 Consumption_10 0.000 Consumption_11 0.000 Consumption_12 0.000 Consumption_13 0.000 Consumption_14 0.000 Consumption_15 0.000 Consumption_16 0.000 Consumption_17 0.000 Consumption_18 0.000 Consumption_19 0.000 Consumption_20 0.000 Consumption_21 0.000 Consumption_22 0.000 Investment_2 0.000 Investment_3 0.000 Investment_4 0.000 Investment_5 0.000 Investment_6 0.000 Investment_7 0.000 Investment_8 0.000 Investment_9 0.000 Investment_10 0.000 Investment_11 0.000 Investment_12 0.000 Investment_13 0.000 Investment_14 0.000 Investment_15 0.000 Investment_16 0.000 Investment_17 0.000 Investment_18 0.000 Investment_19 0.000 Investment_20 0.000 Investment_21 0.000 Investment_22 0.000 PrivateWages_2 21.987 PrivateWages_3 -5.735 PrivateWages_4 -10.815 PrivateWages_5 12.114 PrivateWages_6 3.312 PrivateWages_7 -3.529 PrivateWages_8 -3.307 PrivateWages_9 -3.815 PrivateWages_10 -4.678 PrivateWages_11 1.550 PrivateWages_12 0.000 PrivateWages_13 -1.147 PrivateWages_14 3.936 PrivateWages_15 -0.826 PrivateWages_16 -2.156 PrivateWages_17 7.578 PrivateWages_18 -1.072 PrivateWages_19 -25.769 PrivateWages_20 6.078 PrivateWages_21 -8.136 PrivateWages_22 14.431 [1] TRUE > Bread Consumption_(Intercept) Consumption_corpProf Consumption_(Intercept) 105.265 -0.9259 Consumption_corpProf -0.926 0.8409 Consumption_corpProfLag -0.287 -0.5775 Consumption_wages -1.975 -0.0921 Investment_(Intercept) 0.000 0.0000 Investment_corpProf 0.000 0.0000 Investment_corpProfLag 0.000 0.0000 Investment_capitalLag 0.000 0.0000 PrivateWages_(Intercept) 0.000 0.0000 PrivateWages_gnp 0.000 0.0000 PrivateWages_gnpLag 0.000 0.0000 PrivateWages_trend 0.000 0.0000 Consumption_corpProfLag Consumption_wages Consumption_(Intercept) -0.287 -1.9751 Consumption_corpProf -0.578 -0.0921 Consumption_corpProfLag 0.694 -0.0320 Consumption_wages -0.032 0.0978 Investment_(Intercept) 0.000 0.0000 Investment_corpProf 0.000 0.0000 Investment_corpProfLag 0.000 0.0000 Investment_capitalLag 0.000 0.0000 PrivateWages_(Intercept) 0.000 0.0000 PrivateWages_gnp 0.000 0.0000 PrivateWages_gnpLag 0.000 0.0000 PrivateWages_trend 0.000 0.0000 Investment_(Intercept) Investment_corpProf Consumption_(Intercept) 0.0 0.000 Consumption_corpProf 0.0 0.000 Consumption_corpProfLag 0.0 0.000 Consumption_wages 0.0 0.000 Investment_(Intercept) 2591.3 -42.124 Investment_corpProf -42.1 1.367 Investment_corpProfLag 35.4 -1.174 Investment_capitalLag -12.3 0.191 PrivateWages_(Intercept) 0.0 0.000 PrivateWages_gnp 0.0 0.000 PrivateWages_gnpLag 0.0 0.000 PrivateWages_trend 0.0 0.000 Investment_corpProfLag Investment_capitalLag Consumption_(Intercept) 0.000 0.0000 Consumption_corpProf 0.000 0.0000 Consumption_corpProfLag 0.000 0.0000 Consumption_wages 0.000 0.0000 Investment_(Intercept) 35.417 -12.2536 Investment_corpProf -1.174 0.1908 Investment_corpProfLag 1.207 -0.1763 Investment_capitalLag -0.176 0.0594 PrivateWages_(Intercept) 0.000 0.0000 PrivateWages_gnp 0.000 0.0000 PrivateWages_gnpLag 0.000 0.0000 PrivateWages_trend 0.000 0.0000 PrivateWages_(Intercept) PrivateWages_gnp Consumption_(Intercept) 0.000 0.0000 Consumption_corpProf 0.000 0.0000 Consumption_corpProfLag 0.000 0.0000 Consumption_wages 0.000 0.0000 Investment_(Intercept) 0.000 0.0000 Investment_corpProf 0.000 0.0000 Investment_corpProfLag 0.000 0.0000 Investment_capitalLag 0.000 0.0000 PrivateWages_(Intercept) 174.205 -0.8839 PrivateWages_gnp -0.884 0.1679 PrivateWages_gnpLag -2.037 -0.1586 PrivateWages_trend 2.064 -0.0409 PrivateWages_gnpLag PrivateWages_trend Consumption_(Intercept) 0.00000 0.00000 Consumption_corpProf 0.00000 0.00000 Consumption_corpProfLag 0.00000 0.00000 Consumption_wages 0.00000 0.00000 Investment_(Intercept) 0.00000 0.00000 Investment_corpProf 0.00000 0.00000 Investment_corpProfLag 0.00000 0.00000 Investment_capitalLag 0.00000 0.00000 PrivateWages_(Intercept) -2.03709 2.06394 PrivateWages_gnp -0.15864 -0.04088 PrivateWages_gnpLag 0.19944 0.00675 PrivateWages_trend 0.00675 0.11229 > > # SUR > summary systemfit results method: SUR N DF SSR detRCov OLS-R2 McElroy-R2 system 63 51 46.5 0.158 0.977 0.993 N DF SSR MSE RMSE R2 Adj R2 Consumption 21 17 18.1 1.065 1.032 0.981 0.977 Investment 21 17 17.6 1.036 1.018 0.930 0.918 PrivateWages 21 17 10.8 0.633 0.796 0.986 0.984 The covariance matrix of the residuals used for estimation Consumption Investment PrivateWages Consumption 0.8514 0.0495 -0.381 Investment 0.0495 0.8249 0.121 PrivateWages -0.3808 0.1212 0.476 The covariance matrix of the residuals Consumption Investment PrivateWages Consumption 0.8618 0.0766 -0.437 Investment 0.0766 0.8384 0.203 PrivateWages -0.4368 0.2027 0.513 The correlations of the residuals Consumption Investment PrivateWages Consumption 1.0000 0.0901 -0.657 Investment 0.0901 1.0000 0.309 PrivateWages -0.6572 0.3092 1.000 SUR estimates for 'Consumption' (equation 1) Model Formula: consump ~ corpProf + corpProfLag + wages Estimate Std. Error t value Pr(>|t|) (Intercept) 15.9805 1.1687 13.67 1.3e-10 *** corpProf 0.2302 0.0767 3.00 0.008 ** corpProfLag 0.0673 0.0769 0.87 0.394 wages 0.7962 0.0353 22.58 4.1e-14 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.032 on 17 degrees of freedom Number of observations: 21 Degrees of Freedom: 17 SSR: 18.098 MSE: 1.065 Root MSE: 1.032 Multiple R-Squared: 0.981 Adjusted R-Squared: 0.977 SUR estimates for 'Investment' (equation 2) Model Formula: invest ~ corpProf + corpProfLag + capitalLag Estimate Std. Error t value Pr(>|t|) (Intercept) 12.9293 4.8014 2.69 0.01540 * corpProf 0.4429 0.0861 5.15 8.1e-05 *** corpProfLag 0.3655 0.0894 4.09 0.00077 *** capitalLag -0.1253 0.0235 -5.34 5.4e-05 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.018 on 17 degrees of freedom Number of observations: 21 Degrees of Freedom: 17 SSR: 17.606 MSE: 1.036 Root MSE: 1.018 Multiple R-Squared: 0.93 Adjusted R-Squared: 0.918 SUR estimates for 'PrivateWages' (equation 3) Model Formula: privWage ~ gnp + gnpLag + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 1.6347 1.1173 1.46 0.16 gnp 0.4098 0.0273 15.04 3.0e-11 *** gnpLag 0.1744 0.0312 5.59 3.2e-05 *** trend 0.1558 0.0276 5.65 2.9e-05 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 0.796 on 17 degrees of freedom Number of observations: 21 Degrees of Freedom: 17 SSR: 10.763 MSE: 0.633 Root MSE: 0.796 Multiple R-Squared: 0.986 Adjusted R-Squared: 0.984 > residuals Consumption Investment PrivateWages 1 NA NA NA 2 -0.24064 -0.3522 -1.0960 3 -1.34080 -0.1605 0.5818 4 -1.61038 1.0687 1.5313 5 -0.54147 -1.4707 -0.0220 6 -0.04372 0.3299 -0.2587 7 0.85234 1.4346 -0.3243 8 1.30302 0.8306 -0.6674 9 0.97574 -0.4918 0.3660 10 -0.66060 1.2434 1.2682 11 0.45069 0.2647 -0.3467 12 -0.04295 0.0795 0.3057 13 -0.06686 0.3369 -0.2602 14 0.32177 0.4080 0.3434 15 -0.00441 -0.1533 0.2628 16 -0.01931 0.0158 -0.0216 17 1.53656 1.0372 -0.7988 18 -0.42317 0.0176 0.8550 19 0.29041 -2.6364 -0.8217 20 0.88685 -0.5822 -0.3869 21 0.68839 -0.7015 -1.1838 22 -2.31147 -0.5183 0.6742 > fitted Consumption Investment PrivateWages 1 NA NA NA 2 42.1 0.152 26.6 3 46.3 2.060 28.7 4 50.8 4.131 32.6 5 51.1 4.471 33.9 6 52.6 4.770 35.7 7 54.2 4.165 37.7 8 54.9 3.369 38.6 9 56.3 3.492 38.8 10 58.5 3.857 40.0 11 54.5 0.735 38.2 12 50.9 -3.479 34.2 13 45.7 -6.537 29.3 14 46.2 -5.508 28.2 15 48.7 -2.847 30.3 16 51.3 -1.316 33.2 17 56.2 1.063 37.6 18 59.1 1.982 40.1 19 57.2 0.736 39.0 20 60.7 1.882 42.0 21 64.3 4.002 46.2 22 72.0 5.418 52.6 > predict Consumption.pred Consumption.se.fit Consumption.lwr Consumption.upr 1 NA NA NA NA 2 42.1 0.415 41.3 43.0 3 46.3 0.449 45.4 47.2 4 50.8 0.300 50.2 51.4 5 51.1 0.348 50.4 51.8 6 52.6 0.350 51.9 53.3 7 54.2 0.317 53.6 54.9 8 54.9 0.289 54.3 55.5 9 56.3 0.309 55.7 56.9 10 58.5 0.328 57.8 59.1 11 54.5 0.516 53.5 55.6 12 50.9 0.414 50.1 51.8 13 45.7 0.544 44.6 46.8 14 46.2 0.527 45.1 47.2 15 48.7 0.332 48.0 49.4 16 51.3 0.295 50.7 51.9 17 56.2 0.319 55.5 56.8 18 59.1 0.286 58.5 59.7 19 57.2 0.323 56.6 57.9 20 60.7 0.381 59.9 61.5 21 64.3 0.381 63.5 65.1 22 72.0 0.597 70.8 73.2 Investment.pred Investment.se.fit Investment.lwr Investment.upr 1 NA NA NA NA 2 0.152 0.536 -0.924 1.229 3 2.060 0.446 1.166 2.955 4 4.131 0.397 3.334 4.929 5 4.471 0.329 3.809 5.132 6 4.770 0.311 4.145 5.395 7 4.165 0.294 3.575 4.756 8 3.369 0.263 2.842 3.897 9 3.492 0.347 2.796 4.188 10 3.857 0.398 3.058 4.656 11 0.735 0.539 -0.346 1.816 12 -3.479 0.454 -4.390 -2.569 13 -6.537 0.552 -7.646 -5.428 14 -5.508 0.617 -6.747 -4.269 15 -2.847 0.335 -3.519 -2.175 16 -1.316 0.287 -1.892 -0.739 17 1.063 0.311 0.439 1.686 18 1.982 0.218 1.545 2.420 19 0.736 0.279 0.176 1.296 20 1.882 0.327 1.227 2.538 21 4.002 0.297 3.405 4.598 22 5.418 0.412 4.591 6.245 PrivateWages.pred PrivateWages.se.fit PrivateWages.lwr PrivateWages.upr 1 NA NA NA NA 2 26.6 0.313 26.0 27.2 3 28.7 0.310 28.1 29.3 4 32.6 0.305 32.0 33.2 5 33.9 0.236 33.4 34.4 6 35.7 0.233 35.2 36.1 7 37.7 0.234 37.3 38.2 8 38.6 0.239 38.1 39.0 9 38.8 0.229 38.4 39.3 10 40.0 0.219 39.6 40.5 11 38.2 0.301 37.6 38.9 12 34.2 0.308 33.6 34.8 13 29.3 0.370 28.5 30.0 14 28.2 0.332 27.5 28.8 15 30.3 0.324 29.7 31.0 16 33.2 0.271 32.7 33.8 17 37.6 0.263 37.1 38.1 18 40.1 0.211 39.7 40.6 19 39.0 0.306 38.4 39.6 20 42.0 0.280 41.4 42.5 21 46.2 0.298 45.6 46.8 22 52.6 0.445 51.7 53.5 > model.frame [1] TRUE > model.matrix [1] TRUE > nobs [1] 63 > linearHypothesis Linear hypothesis test (Theil's F test) Hypothesis: Consumption_corpProf + Investment_capitalLag = 0 Model 1: restricted model Model 2: kleinModel Res.Df Df F Pr(>F) 1 52 2 51 1 1.44 0.24 Linear hypothesis test (F statistic of a Wald test) Hypothesis: Consumption_corpProf + Investment_capitalLag = 0 Model 1: restricted model Model 2: kleinModel Res.Df Df F Pr(>F) 1 52 2 51 1 1.69 0.2 Linear hypothesis test (Chi^2 statistic of a Wald test) Hypothesis: Consumption_corpProf + Investment_capitalLag = 0 Model 1: restricted model Model 2: kleinModel Res.Df Df Chisq Pr(>Chisq) 1 52 2 51 1 1.69 0.19 Linear hypothesis test (Theil's F test) Hypothesis: Consumption_corpProf + Investment_capitalLag = 0 Consumption_corpProfLag - PrivateWages_trend = 0 Model 1: restricted model Model 2: kleinModel Res.Df Df F Pr(>F) 1 53 2 51 2 0.77 0.47 Linear hypothesis test (F statistic of a Wald test) Hypothesis: Consumption_corpProf + Investment_capitalLag = 0 Consumption_corpProfLag - PrivateWages_trend = 0 Model 1: restricted model Model 2: kleinModel Res.Df Df F Pr(>F) 1 53 2 51 2 0.91 0.41 Linear hypothesis test (Chi^2 statistic of a Wald test) Hypothesis: Consumption_corpProf + Investment_capitalLag = 0 Consumption_corpProfLag - PrivateWages_trend = 0 Model 1: restricted model Model 2: kleinModel Res.Df Df Chisq Pr(>Chisq) 1 53 2 51 2 1.83 0.4 > logLik 'log Lik.' -70 (df=18) 'log Lik.' -79 (df=18) Estimating function Consumption_(Intercept) Consumption_corpProf Consumption_2 -0.46275 -5.7381 Consumption_3 -2.57830 -43.5733 Consumption_4 -3.09670 -56.9792 Consumption_5 -1.04122 -20.1997 Consumption_6 -0.08406 -1.6897 Consumption_7 1.63901 32.1246 Consumption_8 2.50567 49.6122 Consumption_9 1.87631 39.5902 Consumption_10 -1.27032 -27.5659 Consumption_11 0.86667 13.5200 Consumption_12 -0.08259 -0.9415 Consumption_13 -0.12857 -0.9000 Consumption_14 0.61874 6.9299 Consumption_15 -0.00847 -0.1042 Consumption_16 -0.03714 -0.5200 Consumption_17 2.95475 52.0036 Consumption_18 -0.81375 -14.0778 Consumption_19 0.55845 8.5443 Consumption_20 1.70539 32.4023 Consumption_21 1.32376 27.9312 Consumption_22 -4.44487 -104.4543 Investment_2 0.12481 1.5477 Investment_3 0.05687 0.9611 Investment_4 -0.37877 -6.9693 Investment_5 0.52122 10.1116 Investment_6 -0.11690 -2.3498 Investment_7 -0.50845 -9.9656 Investment_8 -0.29439 -5.8289 Investment_9 0.17430 3.6777 Investment_10 -0.44066 -9.5623 Investment_11 -0.09381 -1.4634 Investment_12 -0.02816 -0.3210 Investment_13 -0.11941 -0.8359 Investment_14 -0.14460 -1.6195 Investment_15 0.05435 0.6685 Investment_16 -0.00559 -0.0783 Investment_17 -0.36761 -6.4700 Investment_18 -0.00622 -0.1077 Investment_19 0.93438 14.2960 Investment_20 0.20633 3.9202 Investment_21 0.24863 5.2460 Investment_22 0.18369 4.3168 PrivateWages_2 -1.78352 -22.1156 PrivateWages_3 0.94670 15.9992 PrivateWages_4 2.49170 45.8473 PrivateWages_5 -0.03583 -0.6950 PrivateWages_6 -0.42104 -8.4630 PrivateWages_7 -0.52776 -10.3441 PrivateWages_8 -1.08598 -21.5024 PrivateWages_9 0.59560 12.5672 PrivateWages_10 2.06359 44.7800 PrivateWages_11 -0.56422 -8.8019 PrivateWages_12 0.49749 5.6714 PrivateWages_13 -0.42337 -2.9636 PrivateWages_14 0.55874 6.2579 PrivateWages_15 0.42760 5.2595 PrivateWages_16 -0.03516 -0.4922 PrivateWages_17 -1.29986 -22.8775 PrivateWages_18 1.39131 24.0696 PrivateWages_19 -1.33711 -20.4578 PrivateWages_20 -0.62964 -11.9631 PrivateWages_21 -1.92625 -40.6439 PrivateWages_22 1.09700 25.7794 Consumption_corpProfLag Consumption_wages Consumption_2 -5.8769 -13.049 Consumption_3 -31.9709 -83.021 Consumption_4 -52.3342 -114.578 Consumption_5 -19.1585 -38.525 Consumption_6 -1.6308 -3.245 Consumption_7 32.9441 66.708 Consumption_8 49.1110 103.985 Consumption_9 37.1510 80.494 Consumption_10 -26.8037 -57.545 Consumption_11 18.8066 36.487 Consumption_12 -1.2884 -3.246 Consumption_13 -1.4658 -4.410 Consumption_14 4.3312 21.099 Consumption_15 -0.0949 -0.310 Consumption_16 -0.4568 -1.460 Consumption_17 41.3665 130.600 Consumption_18 -14.3220 -38.816 Consumption_19 9.6612 25.633 Consumption_20 26.0924 84.246 Consumption_21 25.1514 70.159 Consumption_22 -93.7867 -274.693 Investment_2 1.5851 3.520 Investment_3 0.7052 1.831 Investment_4 -6.4012 -14.014 Investment_5 9.5904 19.285 Investment_6 -2.2679 -4.513 Investment_7 -10.2199 -20.694 Investment_8 -5.7700 -12.217 Investment_9 3.4511 7.477 Investment_10 -9.2979 -19.962 Investment_11 -2.0356 -3.949 Investment_12 -0.4393 -1.107 Investment_13 -1.3613 -4.096 Investment_14 -1.0122 -4.931 Investment_15 0.6087 1.989 Investment_16 -0.0688 -0.220 Investment_17 -5.1466 -16.248 Investment_18 -0.1095 -0.297 Investment_19 16.1648 42.888 Investment_20 3.1568 10.193 Investment_21 4.7239 13.177 Investment_22 3.8759 11.352 PrivateWages_2 -22.6507 -50.295 PrivateWages_3 11.7391 30.484 PrivateWages_4 42.1098 92.193 PrivateWages_5 -0.6592 -1.326 PrivateWages_6 -8.1683 -16.252 PrivateWages_7 -10.6080 -21.480 PrivateWages_8 -21.2852 -45.068 PrivateWages_9 11.7929 25.551 PrivateWages_10 43.5418 93.481 PrivateWages_11 -12.2437 -23.754 PrivateWages_12 7.7609 19.551 PrivateWages_13 -4.8264 -14.521 PrivateWages_14 3.9112 19.053 PrivateWages_15 4.7891 15.650 PrivateWages_16 -0.4325 -1.382 PrivateWages_17 -18.1980 -57.454 PrivateWages_18 24.4870 66.365 PrivateWages_19 -23.1320 -61.373 PrivateWages_20 -9.6335 -31.104 PrivateWages_21 -36.5988 -102.091 PrivateWages_22 23.1466 67.794 Investment_(Intercept) Investment_corpProf Consumption_2 0.08529 1.0576 Consumption_3 0.47520 8.0308 Consumption_4 0.57074 10.5016 Consumption_5 0.19190 3.7229 Consumption_6 0.01549 0.3114 Consumption_7 -0.30208 -5.9207 Consumption_8 -0.46181 -9.1438 Consumption_9 -0.34582 -7.2967 Consumption_10 0.23413 5.0806 Consumption_11 -0.15973 -2.4918 Consumption_12 0.01522 0.1735 Consumption_13 0.02370 0.1659 Consumption_14 -0.11404 -1.2772 Consumption_15 0.00156 0.0192 Consumption_16 0.00685 0.0958 Consumption_17 -0.54458 -9.5846 Consumption_18 0.14998 2.5946 Consumption_19 -0.10293 -1.5748 Consumption_20 -0.31431 -5.9719 Consumption_21 -0.24398 -5.1479 Consumption_22 0.81921 19.2515 Investment_2 -0.46650 -5.7846 Investment_3 -0.21255 -3.5922 Investment_4 1.41568 26.0484 Investment_5 -1.94810 -37.7932 Investment_6 0.43694 8.7825 Investment_7 1.90038 37.2474 Investment_8 1.10030 21.7860 Investment_9 -0.65146 -13.7457 Investment_10 1.64701 35.7401 Investment_11 0.35062 5.4696 Investment_12 0.10525 1.1998 Investment_13 0.44632 3.1242 Investment_14 0.54045 6.0530 Investment_15 -0.20313 -2.4985 Investment_16 0.02090 0.2926 Investment_17 1.37398 24.1820 Investment_18 0.02326 0.4024 Investment_19 -3.49233 -53.4327 Investment_20 -0.77116 -14.6521 Investment_21 -0.92927 -19.6075 Investment_22 -0.68657 -16.1344 PrivateWages_2 0.67977 8.4291 PrivateWages_3 -0.36082 -6.0979 PrivateWages_4 -0.94969 -17.4742 PrivateWages_5 0.01365 0.2649 PrivateWages_6 0.16048 3.2256 PrivateWages_7 0.20115 3.9426 PrivateWages_8 0.41391 8.1954 PrivateWages_9 -0.22701 -4.7899 PrivateWages_10 -0.78652 -17.0674 PrivateWages_11 0.21505 3.3548 PrivateWages_12 -0.18961 -2.1616 PrivateWages_13 0.16136 1.1295 PrivateWages_14 -0.21296 -2.3851 PrivateWages_15 -0.16298 -2.0046 PrivateWages_16 0.01340 0.1876 PrivateWages_17 0.49543 8.7195 PrivateWages_18 -0.53028 -9.1739 PrivateWages_19 0.50963 7.7973 PrivateWages_20 0.23998 4.5596 PrivateWages_21 0.73417 15.4910 PrivateWages_22 -0.41811 -9.8256 Investment_corpProfLag Investment_capitalLag Consumption_2 1.0831 15.590 Consumption_3 5.8924 86.771 Consumption_4 9.6455 105.301 Consumption_5 3.5310 36.404 Consumption_6 0.3006 2.986 Consumption_7 -6.0718 -59.751 Consumption_8 -9.0514 -93.932 Consumption_9 -6.8471 -71.791 Consumption_10 4.9401 49.307 Consumption_11 -3.4662 -34.454 Consumption_12 0.2375 3.299 Consumption_13 0.2701 5.055 Consumption_14 -0.7983 -23.617 Consumption_15 0.0175 0.315 Consumption_16 0.0842 1.362 Consumption_17 -7.6241 -107.663 Consumption_18 2.6396 29.966 Consumption_19 -1.7806 -20.770 Consumption_20 -4.8090 -62.831 Consumption_21 -4.6355 -49.088 Consumption_22 17.2854 167.529 Investment_2 -5.9246 -85.277 Investment_3 -2.6357 -38.812 Investment_4 23.9249 261.192 Investment_5 -35.8451 -369.555 Investment_6 8.4767 84.199 Investment_7 38.1976 375.895 Investment_8 21.5660 223.802 Investment_9 -12.8988 -135.242 Investment_10 34.7519 346.860 Investment_11 7.6084 75.628 Investment_12 1.6419 22.807 Investment_13 5.0880 95.199 Investment_14 3.7831 111.927 Investment_15 -2.2751 -41.032 Investment_16 0.2571 4.159 Investment_17 19.2357 271.636 Investment_18 0.4094 4.648 Investment_19 -60.4174 -704.753 Investment_20 -11.7988 -154.156 Investment_21 -17.6560 -186.968 Investment_22 -14.4866 -140.403 PrivateWages_2 8.6331 124.262 PrivateWages_3 -4.4742 -65.887 PrivateWages_4 -16.0497 -175.217 PrivateWages_5 0.2512 2.590 PrivateWages_6 3.1132 30.924 PrivateWages_7 4.0431 39.788 PrivateWages_8 8.1126 84.189 PrivateWages_9 -4.4947 -47.127 PrivateWages_10 -16.5955 -165.640 PrivateWages_11 4.6666 46.386 PrivateWages_12 -2.9580 -41.089 PrivateWages_13 1.8395 34.418 PrivateWages_14 -1.4907 -44.104 PrivateWages_15 -1.8253 -32.921 PrivateWages_16 0.1648 2.667 PrivateWages_17 6.9360 97.946 PrivateWages_18 -9.3330 -105.950 PrivateWages_19 8.8165 102.843 PrivateWages_20 3.6717 47.972 PrivateWages_21 13.9492 147.715 PrivateWages_22 -8.8221 -85.503 PrivateWages_(Intercept) PrivateWages_gnp PrivateWages_gnpLag Consumption_2 -0.39158 -17.856 -17.582 Consumption_3 -2.18178 -109.307 -99.489 Consumption_4 -2.62045 -149.890 -131.285 Consumption_5 -0.88109 -50.310 -50.398 Consumption_6 -0.07113 -4.339 -4.062 Consumption_7 1.38694 88.764 84.604 Consumption_8 2.12032 136.548 135.700 Consumption_9 1.58775 102.410 102.251 Consumption_10 -1.07495 -72.022 -69.335 Consumption_11 0.73338 44.883 49.136 Consumption_12 -0.06989 -3.732 -4.277 Consumption_13 -0.10880 -4.820 -5.810 Consumption_14 0.52359 23.614 23.195 Consumption_15 -0.00717 -0.356 -0.323 Consumption_16 -0.03143 -1.710 -1.562 Consumption_17 2.50033 156.771 136.018 Consumption_18 -0.68860 -44.759 -43.175 Consumption_19 0.47257 28.779 30.717 Consumption_20 1.44311 100.296 87.885 Consumption_21 1.12017 84.797 77.852 Consumption_22 -3.76128 -332.497 -284.729 Investment_2 0.21842 9.960 9.807 Investment_3 0.09952 4.986 4.538 Investment_4 -0.66282 -37.913 -33.207 Investment_5 0.91210 52.081 52.172 Investment_6 -0.20458 -12.479 -11.681 Investment_7 -0.88976 -56.944 -54.275 Investment_8 -0.51516 -33.176 -32.970 Investment_9 0.30501 19.673 19.643 Investment_10 -0.77113 -51.666 -49.738 Investment_11 -0.16416 -10.047 -10.999 Investment_12 -0.04928 -2.631 -3.016 Investment_13 -0.20897 -9.257 -11.159 Investment_14 -0.25304 -11.412 -11.210 Investment_15 0.09511 4.727 4.289 Investment_16 -0.00978 -0.532 -0.486 Investment_17 -0.64330 -40.335 -34.995 Investment_18 -0.01089 -0.708 -0.683 Investment_19 1.63511 99.578 106.282 Investment_20 0.36106 25.094 21.989 Investment_21 0.43508 32.936 30.238 Investment_22 0.32145 28.416 24.334 PrivateWages_2 -3.89912 -177.800 -175.070 PrivateWages_3 2.06967 103.690 94.377 PrivateWages_4 5.44735 311.588 272.912 PrivateWages_5 -0.07832 -4.472 -4.480 PrivateWages_6 -0.92048 -56.150 -52.560 PrivateWages_7 -1.15379 -73.843 -70.381 PrivateWages_8 -2.37416 -152.896 -151.946 PrivateWages_9 1.30210 83.986 83.855 PrivateWages_10 4.51142 302.265 290.986 PrivateWages_11 -1.23351 -75.491 -82.645 PrivateWages_12 1.08762 58.079 66.562 PrivateWages_13 -0.92556 -41.002 -49.425 PrivateWages_14 1.22152 55.091 54.114 PrivateWages_15 0.93482 46.461 42.160 PrivateWages_16 -0.07687 -4.182 -3.820 PrivateWages_17 -2.84174 -178.177 -154.591 PrivateWages_18 3.04167 197.708 190.713 PrivateWages_19 -2.92319 -178.022 -190.007 PrivateWages_20 -1.37651 -95.667 -83.829 PrivateWages_21 -4.21116 -318.785 -292.676 PrivateWages_22 2.39825 212.005 181.548 PrivateWages_trend Consumption_2 3.9158 Consumption_3 19.6360 Consumption_4 20.9636 Consumption_5 6.1676 Consumption_6 0.4268 Consumption_7 -6.9347 Consumption_8 -8.4813 Consumption_9 -4.7633 Consumption_10 2.1499 Consumption_11 -0.7334 Consumption_12 0.0000 Consumption_13 -0.1088 Consumption_14 1.0472 Consumption_15 -0.0215 Consumption_16 -0.1257 Consumption_17 12.5017 Consumption_18 -4.1316 Consumption_19 3.3080 Consumption_20 11.5449 Consumption_21 10.0816 Consumption_22 -37.6128 Investment_2 -2.1842 Investment_3 -0.8957 Investment_4 5.3026 Investment_5 -6.3847 Investment_6 1.2275 Investment_7 4.4488 Investment_8 2.0606 Investment_9 -0.9150 Investment_10 1.5423 Investment_11 0.1642 Investment_12 0.0000 Investment_13 -0.2090 Investment_14 -0.5061 Investment_15 0.2853 Investment_16 -0.0391 Investment_17 -3.2165 Investment_18 -0.0653 Investment_19 11.4458 Investment_20 2.8885 Investment_21 3.9157 Investment_22 3.2145 PrivateWages_2 38.9912 PrivateWages_3 -18.6270 PrivateWages_4 -43.5788 PrivateWages_5 0.5483 PrivateWages_6 5.5229 PrivateWages_7 5.7689 PrivateWages_8 9.4967 PrivateWages_9 -3.9063 PrivateWages_10 -9.0228 PrivateWages_11 1.2335 PrivateWages_12 0.0000 PrivateWages_13 -0.9256 PrivateWages_14 2.4431 PrivateWages_15 2.8045 PrivateWages_16 -0.3075 PrivateWages_17 -14.2087 PrivateWages_18 18.2500 PrivateWages_19 -20.4623 PrivateWages_20 -11.0121 PrivateWages_21 -37.9005 PrivateWages_22 23.9825 [1] TRUE > Bread Consumption_(Intercept) Consumption_corpProf Consumption_corpProfLag [1,] 86.0484 -0.02454 -0.83573 [2,] -0.0245 0.37055 -0.22831 [3,] -0.8357 -0.22831 0.37290 [4,] -1.6729 -0.06016 -0.03411 [5,] 10.1786 -0.46129 0.72764 [6,] -0.1293 0.03988 -0.03792 [7,] -0.0505 -0.03436 0.04602 [8,] -0.0350 0.00175 -0.00419 [9,] -37.4223 0.06800 1.80971 [10,] 0.4074 -0.06333 0.04058 [11,] 0.2037 0.06442 -0.07324 [12,] 0.2057 0.03217 0.03109 Consumption_wages Investment_(Intercept) Investment_corpProf [1,] -1.67e+00 10.179 -0.12933 [2,] -6.02e-02 -0.461 0.03988 [3,] -3.41e-02 0.728 -0.03792 [4,] 7.83e-02 -0.341 0.00185 [5,] -3.41e-01 1452.346 -13.96098 [6,] 1.85e-03 -13.961 0.46676 [7,] -2.96e-03 11.230 -0.39879 [8,] 1.79e-03 -6.973 0.06288 [9,] 1.32e-01 19.427 -0.13338 [10,] -5.46e-05 0.416 0.01516 [11,] -2.23e-03 -0.760 -0.01340 [12,] -3.03e-02 -0.736 0.00571 Investment_corpProfLag Investment_capitalLag PrivateWages_(Intercept) [1,] -0.05046 -0.03501 -37.4223 [2,] -0.03436 0.00175 0.0680 [3,] 0.04602 -0.00419 1.8097 [4,] -0.00296 0.00179 0.1325 [5,] 11.22954 -6.97254 19.4266 [6,] -0.39879 0.06288 -0.1334 [7,] 0.50387 -0.06357 -0.5157 [8,] -0.06357 0.03467 -0.0417 [9,] -0.51574 -0.04172 78.6495 [10,] -0.00784 -0.00271 -0.3339 [11,] 0.01702 0.00353 -0.9859 [12,] -0.01390 0.00432 0.8712 PrivateWages_gnp PrivateWages_gnpLag PrivateWages_trend [1,] 4.07e-01 0.20374 0.20573 [2,] -6.33e-02 0.06442 0.03217 [3,] 4.06e-02 -0.07324 0.03109 [4,] -5.46e-05 -0.00223 -0.03033 [5,] 4.16e-01 -0.75990 -0.73581 [6,] 1.52e-02 -0.01340 0.00571 [7,] -7.84e-03 0.01702 -0.01390 [8,] -2.71e-03 0.00353 0.00432 [9,] -3.34e-01 -0.98593 0.87119 [10,] 4.68e-02 -0.04271 -0.01162 [11,] -4.27e-02 0.06124 -0.00299 [12,] -1.16e-02 -0.00299 0.04791 > > # 3SLS > summary systemfit results method: 3SLS N DF SSR detRCov OLS-R2 McElroy-R2 system 63 51 73.6 0.283 0.963 0.995 N DF SSR MSE RMSE R2 Adj R2 Consumption 21 17 18.7 1.102 1.050 0.980 0.977 Investment 21 17 44.0 2.586 1.608 0.826 0.795 PrivateWages 21 17 10.9 0.642 0.801 0.986 0.984 The covariance matrix of the residuals used for estimation Consumption Investment PrivateWages Consumption 1.044 0.438 -0.385 Investment 0.438 1.383 0.193 PrivateWages -0.385 0.193 0.476 The covariance matrix of the residuals Consumption Investment PrivateWages Consumption 0.892 0.411 -0.394 Investment 0.411 2.093 0.403 PrivateWages -0.394 0.403 0.520 The correlations of the residuals Consumption Investment PrivateWages Consumption 1.000 0.301 -0.578 Investment 0.301 1.000 0.386 PrivateWages -0.578 0.386 1.000 3SLS estimates for 'Consumption' (equation 1) Model Formula: consump ~ corpProf + corpProfLag + wages Instruments: ~govExp + taxes + govWage + trend + capitalLag + corpProfLag + gnpLag Estimate Std. Error t value Pr(>|t|) (Intercept) 16.4408 1.3045 12.60 4.7e-10 *** corpProf 0.1249 0.1081 1.16 0.26 corpProfLag 0.1631 0.1004 1.62 0.12 wages 0.7901 0.0379 20.83 1.5e-13 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.05 on 17 degrees of freedom Number of observations: 21 Degrees of Freedom: 17 SSR: 18.727 MSE: 1.102 Root MSE: 1.05 Multiple R-Squared: 0.98 Adjusted R-Squared: 0.977 3SLS estimates for 'Investment' (equation 2) Model Formula: invest ~ corpProf + corpProfLag + capitalLag Instruments: ~govExp + taxes + govWage + trend + capitalLag + corpProfLag + gnpLag Estimate Std. Error t value Pr(>|t|) (Intercept) 28.1778 6.7938 4.15 0.00067 *** corpProf -0.0131 0.1619 -0.08 0.93655 corpProfLag 0.7557 0.1529 4.94 0.00012 *** capitalLag -0.1948 0.0325 -5.99 1.5e-05 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.608 on 17 degrees of freedom Number of observations: 21 Degrees of Freedom: 17 SSR: 43.954 MSE: 2.586 Root MSE: 1.608 Multiple R-Squared: 0.826 Adjusted R-Squared: 0.795 3SLS estimates for 'PrivateWages' (equation 3) Model Formula: privWage ~ gnp + gnpLag + trend Instruments: ~govExp + taxes + govWage + trend + capitalLag + corpProfLag + gnpLag Estimate Std. Error t value Pr(>|t|) (Intercept) 1.7972 1.1159 1.61 0.13 gnp 0.4005 0.0318 12.59 4.8e-10 *** gnpLag 0.1813 0.0342 5.31 5.8e-05 *** trend 0.1497 0.0279 5.36 5.2e-05 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 0.801 on 17 degrees of freedom Number of observations: 21 Degrees of Freedom: 17 SSR: 10.921 MSE: 0.642 Root MSE: 0.801 Multiple R-Squared: 0.986 Adjusted R-Squared: 0.984 > residuals Consumption Investment PrivateWages 1 NA NA NA 2 -0.4416 -2.1951 -1.20287 3 -1.0150 0.1515 0.51834 4 -1.5289 0.4406 1.50936 5 -0.4985 -1.8667 -0.08743 6 -0.0132 0.0713 -0.28089 7 0.7759 1.0294 -0.33908 8 1.3004 1.1011 -0.69282 9 1.0993 0.5853 0.34494 10 -0.5839 2.2952 1.27590 11 -0.1917 -1.3443 -0.40414 12 -0.5598 -0.9944 0.22151 13 -0.6746 -1.3404 -0.36962 14 0.5767 1.9316 0.31006 15 -0.0211 -0.1217 0.27309 16 0.0539 0.1847 0.00716 17 1.8555 2.0937 -0.71866 18 -0.4596 -0.3216 0.90582 19 0.0613 -3.6314 -0.81881 20 1.2602 0.7582 -0.26942 21 0.9500 0.2428 -1.06125 22 -1.9451 0.9302 0.87883 > fitted Consumption Investment PrivateWages 1 NA NA NA 2 42.3 1.99510 26.7 3 46.0 1.74850 28.8 4 50.7 4.75942 32.6 5 51.1 4.86672 34.0 6 52.6 5.02874 35.7 7 54.3 4.57056 37.7 8 54.9 3.09893 38.6 9 56.2 2.41471 38.9 10 58.4 2.80476 40.0 11 55.2 2.34425 38.3 12 51.5 -2.40558 34.3 13 46.3 -4.85959 29.4 14 45.9 -7.03164 28.2 15 48.7 -2.87827 30.3 16 51.2 -1.48466 33.2 17 55.8 0.00629 37.5 18 59.2 2.32164 40.1 19 57.4 1.73138 39.0 20 60.3 0.54175 41.9 21 64.1 3.05716 46.1 22 71.6 3.96979 52.4 > predict Consumption.pred Consumption.se.fit Consumption.lwr Consumption.upr 1 NA NA NA NA 2 42.3 0.464 39.9 44.8 3 46.0 0.541 43.5 48.5 4 50.7 0.337 48.4 53.1 5 51.1 0.385 48.7 53.5 6 52.6 0.386 50.3 55.0 7 54.3 0.349 52.0 56.7 8 54.9 0.320 52.6 57.2 9 56.2 0.355 53.9 58.5 10 58.4 0.370 56.0 60.7 11 55.2 0.682 52.6 57.8 12 51.5 0.563 48.9 54.0 13 46.3 0.719 43.6 49.0 14 45.9 0.597 43.4 48.5 15 48.7 0.370 46.4 51.1 16 51.2 0.327 48.9 53.6 17 55.8 0.391 53.5 58.2 18 59.2 0.316 56.8 61.5 19 57.4 0.389 55.1 59.8 20 60.3 0.459 57.9 62.8 21 64.1 0.438 61.7 66.4 22 71.6 0.674 69.0 74.3 Investment.pred Investment.se.fit Investment.lwr Investment.upr 1 NA NA NA NA 2 1.99510 0.792 -1.787 5.777 3 1.74850 0.585 -1.861 5.358 4 4.75942 0.510 1.200 8.319 5 4.86672 0.423 1.359 8.375 6 5.02874 0.400 1.533 8.525 7 4.57056 0.391 1.079 8.062 8 3.09893 0.345 -0.371 6.568 9 2.41471 0.511 -1.145 5.974 10 2.80476 0.560 -0.788 6.397 11 2.34425 0.839 -1.482 6.170 12 -2.40558 0.673 -6.083 1.272 13 -4.85959 0.862 -8.708 -1.011 14 -7.03164 0.874 -10.893 -3.171 15 -2.87827 0.433 -6.392 0.635 16 -1.48466 0.375 -4.968 1.999 17 0.00629 0.491 -3.541 3.554 18 2.32164 0.294 -1.127 5.771 19 1.73138 0.446 -1.789 5.252 20 0.54175 0.547 -3.042 4.125 21 3.05716 0.454 -0.468 6.582 22 3.96979 0.642 0.317 7.623 PrivateWages.pred PrivateWages.se.fit PrivateWages.lwr PrivateWages.upr 1 NA NA NA NA 2 26.7 0.314 24.9 28.5 3 28.8 0.318 27.0 30.6 4 32.6 0.325 30.8 34.4 5 34.0 0.235 32.2 35.7 6 35.7 0.241 33.9 37.4 7 37.7 0.238 36.0 39.5 8 38.6 0.237 36.8 40.4 9 38.9 0.227 37.1 40.6 10 40.0 0.219 38.3 41.8 11 38.3 0.317 36.5 40.1 12 34.3 0.344 32.4 36.1 13 29.4 0.419 27.5 31.3 14 28.2 0.334 26.4 30.0 15 30.3 0.320 28.5 32.1 16 33.2 0.268 31.4 35.0 17 37.5 0.269 35.7 39.3 18 40.1 0.212 38.3 41.8 19 39.0 0.331 37.2 40.8 20 41.9 0.287 40.1 43.7 21 46.1 0.301 44.3 47.9 22 52.4 0.471 50.5 54.4 > model.frame [1] TRUE > model.matrix [1] TRUE > nobs [1] 63 > linearHypothesis Linear hypothesis test (Theil's F test) Hypothesis: Consumption_corpProf + Investment_capitalLag = 0 Model 1: restricted model Model 2: kleinModel Res.Df Df F Pr(>F) 1 52 2 51 1 0.29 0.59 Linear hypothesis test (F statistic of a Wald test) Hypothesis: Consumption_corpProf + Investment_capitalLag = 0 Model 1: restricted model Model 2: kleinModel Res.Df Df F Pr(>F) 1 52 2 51 1 0.39 0.54 Linear hypothesis test (Chi^2 statistic of a Wald test) Hypothesis: Consumption_corpProf + Investment_capitalLag = 0 Model 1: restricted model Model 2: kleinModel Res.Df Df Chisq Pr(>Chisq) 1 52 2 51 1 0.39 0.53 Linear hypothesis test (Theil's F test) Hypothesis: Consumption_corpProf + Investment_capitalLag = 0 Consumption_corpProfLag - PrivateWages_trend = 0 Model 1: restricted model Model 2: kleinModel Res.Df Df F Pr(>F) 1 53 2 51 2 0.3 0.74 Linear hypothesis test (F statistic of a Wald test) Hypothesis: Consumption_corpProf + Investment_capitalLag = 0 Consumption_corpProfLag - PrivateWages_trend = 0 Model 1: restricted model Model 2: kleinModel Res.Df Df F Pr(>F) 1 53 2 51 2 0.4 0.67 Linear hypothesis test (Chi^2 statistic of a Wald test) Hypothesis: Consumption_corpProf + Investment_capitalLag = 0 Consumption_corpProfLag - PrivateWages_trend = 0 Model 1: restricted model Model 2: kleinModel Res.Df Df Chisq Pr(>Chisq) 1 53 2 51 2 0.8 0.67 > logLik 'log Lik.' -76.1 (df=18) 'log Lik.' -89.1 (df=18) Estimating function Consumption_(Intercept) Consumption_corpProf Consumption_2 -3.2451 -43.02 Consumption_3 -1.3384 -22.19 Consumption_4 -1.4130 -27.25 Consumption_5 -5.0390 -105.62 Consumption_6 -0.8531 -16.86 Consumption_7 4.3438 79.23 Consumption_8 5.6608 99.48 Consumption_9 3.7666 73.61 Consumption_10 1.2798 26.08 Consumption_11 -3.5695 -61.32 Consumption_12 -1.8656 -23.70 Consumption_13 -3.4193 -30.77 Consumption_14 4.0738 36.88 Consumption_15 -1.6814 -21.31 Consumption_16 -1.4312 -20.64 Consumption_17 9.0552 133.22 Consumption_18 -1.9716 -39.03 Consumption_19 -6.7338 -129.33 Consumption_20 4.8735 84.89 Consumption_21 1.6324 33.15 Consumption_22 -2.1249 -48.14 Investment_2 2.1466 28.45 Investment_3 -0.1448 -2.40 Investment_4 -0.4444 -8.57 Investment_5 1.8148 38.04 Investment_6 -0.0658 -1.30 Investment_7 -0.9944 -18.14 Investment_8 -1.0536 -18.52 Investment_9 -0.5553 -10.85 Investment_10 -2.2390 -45.62 Investment_11 1.3010 22.35 Investment_12 0.9607 12.21 Investment_13 1.2918 11.63 Investment_14 -1.8711 -16.94 Investment_15 0.1149 1.46 Investment_16 -0.1869 -2.70 Investment_17 -2.0208 -29.73 Investment_18 0.2841 5.62 Investment_19 3.5191 67.59 Investment_20 -0.7250 -12.63 Investment_21 -0.2285 -4.64 Investment_22 -0.9035 -20.47 PrivateWages_2 -4.3513 -57.68 PrivateWages_3 1.7756 29.44 PrivateWages_4 3.5512 68.47 PrivateWages_5 -3.3088 -69.35 PrivateWages_6 -0.7761 -15.34 PrivateWages_7 1.5988 29.16 PrivateWages_8 1.5583 27.38 PrivateWages_9 2.5665 50.15 PrivateWages_10 4.9740 101.35 PrivateWages_11 -3.5972 -61.80 PrivateWages_12 -0.7986 -10.15 PrivateWages_13 -3.2258 -29.03 PrivateWages_14 3.6395 32.95 PrivateWages_15 -0.5056 -6.41 PrivateWages_16 -1.0680 -15.40 PrivateWages_17 3.0850 45.39 PrivateWages_18 -0.3546 -7.02 PrivateWages_19 -8.0362 -154.35 PrivateWages_20 1.6465 28.68 PrivateWages_21 -1.9137 -38.86 PrivateWages_22 3.5407 80.22 Consumption_corpProfLag Consumption_wages Consumption_2 -41.21 -95.43 Consumption_3 -16.60 -42.49 Consumption_4 -23.88 -50.52 Consumption_5 -92.72 -196.89 Consumption_6 -16.55 -33.39 Consumption_7 87.31 170.95 Consumption_8 110.95 227.47 Consumption_9 74.58 159.45 Consumption_10 27.00 56.34 Consumption_11 -77.46 -155.98 Consumption_12 -29.10 -73.65 Consumption_13 -38.98 -120.13 Consumption_14 28.52 133.55 Consumption_15 -18.83 -63.05 Consumption_16 -17.60 -57.45 Consumption_17 126.77 377.63 Consumption_18 -34.70 -94.39 Consumption_19 -116.49 -332.00 Consumption_20 74.56 235.83 Consumption_21 31.02 87.12 Consumption_22 -44.84 -129.02 Investment_2 27.26 63.12 Investment_3 -1.80 -4.60 Investment_4 -7.51 -15.89 Investment_5 33.39 70.91 Investment_6 -1.28 -2.57 Investment_7 -19.99 -39.13 Investment_8 -20.65 -42.34 Investment_9 -10.99 -23.51 Investment_10 -47.24 -98.56 Investment_11 28.23 56.85 Investment_12 14.99 37.92 Investment_13 14.73 45.38 Investment_14 -13.10 -61.34 Investment_15 1.29 4.31 Investment_16 -2.30 -7.50 Investment_17 -28.29 -84.27 Investment_18 5.00 13.60 Investment_19 60.88 173.50 Investment_20 -11.09 -35.08 Investment_21 -4.34 -12.19 Investment_22 -19.06 -54.86 PrivateWages_2 -55.26 -127.96 PrivateWages_3 22.02 56.38 PrivateWages_4 60.01 126.96 PrivateWages_5 -60.88 -129.29 PrivateWages_6 -15.06 -30.37 PrivateWages_7 32.14 62.92 PrivateWages_8 30.54 62.62 PrivateWages_9 50.82 108.65 PrivateWages_10 104.95 218.96 PrivateWages_11 -78.06 -157.19 PrivateWages_12 -12.46 -31.53 PrivateWages_13 -36.77 -113.33 PrivateWages_14 25.48 119.32 PrivateWages_15 -5.66 -18.96 PrivateWages_16 -13.14 -42.87 PrivateWages_17 43.19 128.65 PrivateWages_18 -6.24 -16.98 PrivateWages_19 -139.03 -396.21 PrivateWages_20 25.19 79.68 PrivateWages_21 -36.36 -102.14 PrivateWages_22 74.71 214.98 Investment_(Intercept) Investment_corpProf Consumption_2 1.4757 19.56 Consumption_3 0.6086 10.09 Consumption_4 0.6425 12.39 Consumption_5 2.2915 48.03 Consumption_6 0.3879 7.67 Consumption_7 -1.9753 -36.03 Consumption_8 -2.5742 -45.24 Consumption_9 -1.7128 -33.47 Consumption_10 -0.5820 -11.86 Consumption_11 1.6232 27.89 Consumption_12 0.8484 10.78 Consumption_13 1.5549 13.99 Consumption_14 -1.8525 -16.77 Consumption_15 0.7646 9.69 Consumption_16 0.6508 9.39 Consumption_17 -4.1178 -60.58 Consumption_18 0.8965 17.75 Consumption_19 3.0621 58.81 Consumption_20 -2.2162 -38.60 Consumption_21 -0.7423 -15.07 Consumption_22 0.9663 21.89 Investment_2 -2.6492 -35.12 Investment_3 0.1787 2.96 Investment_4 0.5485 10.58 Investment_5 -2.2397 -46.94 Investment_6 0.0811 1.60 Investment_7 1.2272 22.38 Investment_8 1.3003 22.85 Investment_9 0.6853 13.39 Investment_10 2.7633 56.30 Investment_11 -1.6056 -27.58 Investment_12 -1.1856 -15.06 Investment_13 -1.5943 -14.35 Investment_14 2.3092 20.91 Investment_15 -0.1418 -1.80 Investment_16 0.2307 3.33 Investment_17 2.4940 36.69 Investment_18 -0.3506 -6.94 Investment_19 -4.3431 -83.42 Investment_20 0.8947 15.59 Investment_21 0.2820 5.73 Investment_22 1.1150 25.26 PrivateWages_2 2.6070 34.56 PrivateWages_3 -1.0638 -17.64 PrivateWages_4 -2.1276 -41.02 PrivateWages_5 1.9824 41.55 PrivateWages_6 0.4650 9.19 PrivateWages_7 -0.9579 -17.47 PrivateWages_8 -0.9336 -16.41 PrivateWages_9 -1.5377 -30.05 PrivateWages_10 -2.9800 -60.72 PrivateWages_11 2.1552 37.03 PrivateWages_12 0.4785 6.08 PrivateWages_13 1.9327 17.39 PrivateWages_14 -2.1805 -19.74 PrivateWages_15 0.3029 3.84 PrivateWages_16 0.6398 9.23 PrivateWages_17 -1.8483 -27.19 PrivateWages_18 0.2125 4.21 PrivateWages_19 4.8147 92.47 PrivateWages_20 -0.9865 -17.18 PrivateWages_21 1.1466 23.28 PrivateWages_22 -2.1213 -48.06 Investment_corpProfLag Investment_capitalLag Consumption_2 18.74 269.8 Consumption_3 7.55 111.1 Consumption_4 10.86 118.5 Consumption_5 42.16 434.7 Consumption_6 7.53 74.8 Consumption_7 -39.70 -390.7 Consumption_8 -50.45 -523.6 Consumption_9 -33.91 -355.6 Consumption_10 -12.28 -122.6 Consumption_11 35.22 350.1 Consumption_12 13.23 183.8 Consumption_13 17.73 331.7 Consumption_14 -12.97 -383.7 Consumption_15 8.56 154.5 Consumption_16 8.01 129.5 Consumption_17 -57.65 -814.1 Consumption_18 15.78 179.1 Consumption_19 52.98 617.9 Consumption_20 -33.91 -443.0 Consumption_21 -14.10 -149.4 Consumption_22 20.39 197.6 Investment_2 -33.65 -484.3 Investment_3 2.22 32.6 Investment_4 9.27 101.2 Investment_5 -41.21 -424.9 Investment_6 1.57 15.6 Investment_7 24.67 242.7 Investment_8 25.49 264.5 Investment_9 13.57 142.3 Investment_10 58.30 581.9 Investment_11 -34.84 -346.3 Investment_12 -18.50 -256.9 Investment_13 -18.17 -340.1 Investment_14 16.16 478.2 Investment_15 -1.59 -28.6 Investment_16 2.84 45.9 Investment_17 34.92 493.1 Investment_18 -6.17 -70.0 Investment_19 -75.14 -876.4 Investment_20 13.69 178.9 Investment_21 5.36 56.7 Investment_22 23.53 228.0 PrivateWages_2 33.11 476.6 PrivateWages_3 -13.19 -194.3 PrivateWages_4 -35.96 -392.5 PrivateWages_5 36.48 376.1 PrivateWages_6 9.02 89.6 PrivateWages_7 -19.25 -189.5 PrivateWages_8 -18.30 -189.9 PrivateWages_9 -30.45 -319.2 PrivateWages_10 -62.88 -627.6 PrivateWages_11 46.77 464.9 PrivateWages_12 7.46 103.7 PrivateWages_13 22.03 412.2 PrivateWages_14 -15.26 -451.6 PrivateWages_15 3.39 61.2 PrivateWages_16 7.87 127.3 PrivateWages_17 -25.88 -365.4 PrivateWages_18 3.74 42.5 PrivateWages_19 83.29 971.6 PrivateWages_20 -15.09 -197.2 PrivateWages_21 21.78 230.7 PrivateWages_22 -44.76 -433.8 PrivateWages_(Intercept) PrivateWages_gnp PrivateWages_gnpLag Consumption_2 -3.220 -153.49 -144.60 Consumption_3 -1.328 -65.52 -60.57 Consumption_4 -1.402 -79.70 -70.25 Consumption_5 -5.001 -303.71 -286.05 Consumption_6 -0.847 -51.81 -48.34 Consumption_7 4.311 264.22 262.96 Consumption_8 5.618 341.88 359.54 Consumption_9 3.738 233.16 240.73 Consumption_10 1.270 81.79 81.92 Consumption_11 -3.542 -228.05 -237.34 Consumption_12 -1.851 -101.61 -113.31 Consumption_13 -3.393 -159.94 -181.21 Consumption_14 4.043 168.34 179.10 Consumption_15 -1.669 -85.05 -75.26 Consumption_16 -1.420 -79.06 -70.59 Consumption_17 8.987 515.06 488.87 Consumption_18 -1.957 -132.41 -122.68 Consumption_19 -6.683 -455.83 -434.38 Consumption_20 4.837 323.61 294.54 Consumption_21 1.620 121.95 112.59 Consumption_22 -2.109 -182.35 -159.64 Investment_2 2.807 133.77 126.02 Investment_3 -0.189 -9.34 -8.63 Investment_4 -0.581 -33.02 -29.11 Investment_5 2.373 144.11 135.73 Investment_6 -0.086 -5.26 -4.91 Investment_7 -1.300 -79.69 -79.31 Investment_8 -1.378 -83.84 -88.17 Investment_9 -0.726 -45.28 -46.75 Investment_10 -2.928 -188.52 -188.82 Investment_11 1.701 109.51 113.97 Investment_12 1.256 68.94 76.87 Investment_13 1.689 79.61 90.20 Investment_14 -2.446 -101.86 -108.38 Investment_15 0.150 7.66 6.77 Investment_16 -0.244 -13.60 -12.15 Investment_17 -2.642 -151.44 -143.74 Investment_18 0.371 25.13 23.29 Investment_19 4.601 313.85 299.09 Investment_20 -0.948 -63.43 -57.73 Investment_21 -0.299 -22.49 -20.76 Investment_22 -1.181 -102.15 -89.43 PrivateWages_2 -8.830 -420.86 -396.47 PrivateWages_3 3.603 177.74 164.31 PrivateWages_4 7.206 409.57 361.04 PrivateWages_5 -6.715 -407.80 -384.07 PrivateWages_6 -1.575 -96.39 -89.93 PrivateWages_7 3.244 198.86 197.91 PrivateWages_8 3.162 192.44 202.38 PrivateWages_9 5.208 324.85 335.40 PrivateWages_10 10.094 649.99 651.03 PrivateWages_11 -7.300 -469.94 -489.08 PrivateWages_12 -1.621 -88.94 -99.18 PrivateWages_13 -6.546 -308.53 -349.56 PrivateWages_14 7.386 307.52 327.18 PrivateWages_15 -1.026 -52.30 -46.27 PrivateWages_16 -2.167 -120.63 -107.71 PrivateWages_17 6.260 358.81 340.56 PrivateWages_18 -0.720 -48.70 -45.12 PrivateWages_19 -16.308 -1112.35 -1060.00 PrivateWages_20 3.341 223.57 203.48 PrivateWages_21 -3.883 -292.34 -269.90 PrivateWages_22 7.185 621.32 543.91 PrivateWages_trend Consumption_2 32.205 Consumption_3 11.954 Consumption_4 11.218 Consumption_5 35.006 Consumption_6 5.080 Consumption_7 -21.554 Consumption_8 -22.471 Consumption_9 -11.214 Consumption_10 -2.540 Consumption_11 3.542 Consumption_12 0.000 Consumption_13 -3.393 Consumption_14 8.086 Consumption_15 -5.006 Consumption_16 -5.681 Consumption_17 44.933 Consumption_18 -11.740 Consumption_19 -46.779 Consumption_20 38.692 Consumption_21 14.580 Consumption_22 -21.088 Investment_2 -28.067 Investment_3 1.704 Investment_4 4.648 Investment_5 -16.610 Investment_6 0.516 Investment_7 6.501 Investment_8 5.511 Investment_9 2.178 Investment_10 5.855 Investment_11 -1.701 Investment_12 0.000 Investment_13 1.689 Investment_14 -4.893 Investment_15 0.451 Investment_16 -0.978 Investment_17 -13.211 Investment_18 2.228 Investment_19 32.209 Investment_20 -7.583 Investment_21 -2.689 Investment_22 -11.813 PrivateWages_2 88.301 PrivateWages_3 -32.429 PrivateWages_4 -57.650 PrivateWages_5 47.002 PrivateWages_6 9.450 PrivateWages_7 -16.222 PrivateWages_8 -12.649 PrivateWages_9 -15.624 PrivateWages_10 -20.187 PrivateWages_11 7.300 PrivateWages_12 0.000 PrivateWages_13 -6.546 PrivateWages_14 14.771 PrivateWages_15 -3.078 PrivateWages_16 -8.669 PrivateWages_17 31.301 PrivateWages_18 -4.318 PrivateWages_19 -114.154 PrivateWages_20 26.730 PrivateWages_21 -34.951 PrivateWages_22 71.851 [1] TRUE > Bread Consumption_(Intercept) Consumption_corpProf Consumption_corpProfLag [1,] 1.07e+02 -1.06982 -0.3515 [2,] -1.07e+00 0.73659 -0.5079 [3,] -3.51e-01 -0.50793 0.6355 [4,] -1.93e+00 -0.07361 -0.0356 [5,] 1.24e+02 -0.98618 3.4455 [6,] -2.71e+00 0.38390 -0.3719 [7,] 9.65e-01 -0.31139 0.3992 [8,] -4.61e-01 -0.00199 -0.0185 [9,] -3.88e+01 0.05351 1.8003 [10,] 6.27e-01 -0.08533 0.0556 [11,] -5.96e-04 0.08746 -0.0887 [12,] 2.14e-01 0.04029 0.0279 Consumption_wages Investment_(Intercept) Investment_corpProf [1,] -1.934840 123.765 -2.71e+00 [2,] -0.073613 -0.986 3.84e-01 [3,] -0.035606 3.445 -3.72e-01 [4,] 0.090675 -3.911 5.58e-02 [5,] -3.910682 2907.785 -4.61e+01 [6,] 0.055805 -46.132 1.65e+00 [7,] -0.054072 38.083 -1.41e+00 [8,] 0.019220 -13.707 2.06e-01 [9,] 0.174112 17.422 -1.06e-01 [10,] -0.002325 2.389 2.04e-03 [11,] -0.000594 -2.765 -2.91e-04 [12,] -0.032572 -2.080 3.10e-02 Investment_corpProfLag Investment_capitalLag PrivateWages_(Intercept) [1,] 0.96474 -0.46130 -38.76422 [2,] -0.31139 -0.00199 0.05351 [3,] 0.39923 -0.01847 1.80032 [4,] -0.05407 0.01922 0.17411 [5,] 38.08346 -13.70662 17.42245 [6,] -1.40785 0.20597 -0.10564 [7,] 1.47348 -0.19170 -0.93153 [8,] -0.19170 0.06667 0.00097 [9,] -0.93153 0.00097 78.44334 [10,] 0.01112 -0.01300 -0.49810 [11,] 0.00455 0.01344 -0.81226 [12,] -0.04174 0.01117 0.88592 PrivateWages_gnp PrivateWages_gnpLag PrivateWages_trend [1,] 0.62679 -0.000596 0.21374 [2,] -0.08533 0.087455 0.04029 [3,] 0.05563 -0.088660 0.02790 [4,] -0.00233 -0.000594 -0.03257 [5,] 2.38888 -2.764716 -2.07974 [6,] 0.00204 -0.000291 0.03105 [7,] 0.01112 0.004547 -0.04174 [8,] -0.01300 0.013443 0.01117 [9,] -0.49810 -0.812260 0.88592 [10,] 0.06376 -0.057450 -0.01781 [11,] -0.05745 0.073510 0.00317 [12,] -0.01781 0.003170 0.04916 > > # I3SLS > summary systemfit results method: iterated 3SLS convergence achieved after 20 iterations N DF SSR detRCov OLS-R2 McElroy-R2 system 63 51 128 0.509 0.936 0.996 N DF SSR MSE RMSE R2 Adj R2 Consumption 21 17 19.2 1.130 1.063 0.980 0.976 Investment 21 17 95.7 5.627 2.372 0.621 0.554 PrivateWages 21 17 12.7 0.748 0.865 0.984 0.981 The covariance matrix of the residuals used for estimation Consumption Investment PrivateWages Consumption 0.915 0.642 -0.435 Investment 0.642 4.555 0.734 PrivateWages -0.435 0.734 0.606 The covariance matrix of the residuals Consumption Investment PrivateWages Consumption 0.915 0.642 -0.435 Investment 0.642 4.555 0.734 PrivateWages -0.435 0.734 0.606 The correlations of the residuals Consumption Investment PrivateWages Consumption 1.000 0.314 -0.584 Investment 0.314 1.000 0.442 PrivateWages -0.584 0.442 1.000 3SLS estimates for 'Consumption' (equation 1) Model Formula: consump ~ corpProf + corpProfLag + wages Instruments: ~govExp + taxes + govWage + trend + capitalLag + corpProfLag + gnpLag Estimate Std. Error t value Pr(>|t|) (Intercept) 16.5590 1.2244 13.52 1.6e-10 *** corpProf 0.1645 0.0962 1.71 0.105 corpProfLag 0.1766 0.0901 1.96 0.067 . wages 0.7658 0.0348 22.03 6.1e-14 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.063 on 17 degrees of freedom Number of observations: 21 Degrees of Freedom: 17 SSR: 19.213 MSE: 1.13 Root MSE: 1.063 Multiple R-Squared: 0.98 Adjusted R-Squared: 0.976 3SLS estimates for 'Investment' (equation 2) Model Formula: invest ~ corpProf + corpProfLag + capitalLag Instruments: ~govExp + taxes + govWage + trend + capitalLag + corpProfLag + gnpLag Estimate Std. Error t value Pr(>|t|) (Intercept) 42.8959 10.5937 4.05 0.00083 *** corpProf -0.3565 0.2602 -1.37 0.18838 corpProfLag 1.0113 0.2488 4.07 0.00081 *** capitalLag -0.2602 0.0509 -5.12 8.6e-05 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.372 on 17 degrees of freedom Number of observations: 21 Degrees of Freedom: 17 SSR: 95.661 MSE: 5.627 Root MSE: 2.372 Multiple R-Squared: 0.621 Adjusted R-Squared: 0.554 3SLS estimates for 'PrivateWages' (equation 3) Model Formula: privWage ~ gnp + gnpLag + trend Instruments: ~govExp + taxes + govWage + trend + capitalLag + corpProfLag + gnpLag Estimate Std. Error t value Pr(>|t|) (Intercept) 2.6247 1.1956 2.20 0.042 * gnp 0.3748 0.0311 12.05 9.4e-10 *** gnpLag 0.1937 0.0324 5.98 1.5e-05 *** trend 0.1679 0.0289 5.80 2.1e-05 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 0.865 on 17 degrees of freedom Number of observations: 21 Degrees of Freedom: 17 SSR: 12.719 MSE: 0.748 Root MSE: 0.865 Multiple R-Squared: 0.984 Adjusted R-Squared: 0.981 > residuals Consumption Investment PrivateWages 1 NA NA NA 2 -0.537 -3.95419 -1.2303 3 -1.187 0.00151 0.5797 4 -1.705 -0.22015 1.6794 5 -0.734 -2.22753 -0.0260 6 -0.251 -0.10866 -0.1362 7 0.600 0.83218 -0.1837 8 1.142 1.46624 -0.5825 9 0.921 1.62030 0.4347 10 -0.745 3.40013 1.4104 11 -0.197 -2.15443 -0.4679 12 -0.385 -1.62274 0.0106 13 -0.390 -2.62869 -0.7363 14 0.749 2.80517 0.0581 15 0.112 -0.27710 0.1113 16 0.170 0.13598 -0.1089 17 1.925 2.76200 -0.6976 18 -0.341 -0.53919 0.8651 19 0.219 -4.32845 -1.0116 20 1.383 1.71889 -0.2087 21 1.028 1.06406 -0.9656 22 -1.777 2.25466 1.2061 > fitted Consumption Investment PrivateWages 1 NA NA NA 2 42.4 3.754 26.7 3 46.2 1.898 28.7 4 50.9 5.420 32.4 5 51.3 5.228 33.9 6 52.9 5.209 35.5 7 54.5 4.768 37.6 8 55.1 2.734 38.5 9 56.4 1.380 38.8 10 58.5 1.700 39.9 11 55.2 3.154 38.4 12 51.3 -1.777 34.5 13 46.0 -3.571 29.7 14 45.8 -7.905 28.4 15 48.6 -2.723 30.5 16 51.1 -1.436 33.3 17 55.8 -0.662 37.5 18 59.0 2.539 40.1 19 57.3 2.428 39.2 20 60.2 -0.419 41.8 21 64.0 2.236 46.0 22 71.5 2.645 52.1 > predict Consumption.pred Consumption.se.fit Consumption.lwr Consumption.upr 1 NA NA NA NA 2 42.4 0.434 41.6 43.3 3 46.2 0.491 45.2 47.2 4 50.9 0.309 50.3 51.5 5 51.3 0.351 50.6 52.0 6 52.9 0.352 52.1 53.6 7 54.5 0.320 53.9 55.1 8 55.1 0.293 54.5 55.6 9 56.4 0.324 55.7 57.0 10 58.5 0.340 57.9 59.2 11 55.2 0.613 54.0 56.4 12 51.3 0.506 50.3 52.3 13 46.0 0.649 44.7 47.3 14 45.8 0.546 44.7 46.8 15 48.6 0.341 47.9 49.3 16 51.1 0.301 50.5 51.7 17 55.8 0.357 55.1 56.5 18 59.0 0.293 58.5 59.6 19 57.3 0.353 56.6 58.0 20 60.2 0.421 59.4 61.1 21 64.0 0.409 63.2 64.8 22 71.5 0.630 70.2 72.7 Investment.pred Investment.se.fit Investment.lwr Investment.upr 1 NA NA NA NA 2 3.754 1.263 1.218 6.2906 3 1.898 1.022 -0.153 3.9503 4 5.420 0.853 3.709 7.1317 5 5.228 0.727 3.767 6.6877 6 5.209 0.703 3.797 6.6200 7 4.768 0.688 3.387 6.1487 8 2.734 0.615 1.499 3.9683 9 1.380 0.852 -0.330 3.0893 10 1.700 0.938 -0.184 3.5836 11 3.154 1.437 0.269 6.0398 12 -1.777 1.173 -4.133 0.5780 13 -3.571 1.494 -6.570 -0.5725 14 -7.905 1.479 -10.875 -4.9350 15 -2.723 0.778 -4.285 -1.1613 16 -1.436 0.672 -2.784 -0.0875 17 -0.662 0.832 -2.333 1.0088 18 2.539 0.522 1.491 3.5875 19 2.428 0.753 0.918 3.9392 20 -0.419 0.907 -2.240 1.4019 21 2.236 0.775 0.679 3.7928 22 2.645 1.076 0.486 4.8047 PrivateWages.pred PrivateWages.se.fit PrivateWages.lwr PrivateWages.upr 1 NA NA NA NA 2 26.7 0.340 26.0 27.4 3 28.7 0.339 28.0 29.4 4 32.4 0.340 31.7 33.1 5 33.9 0.250 33.4 34.4 6 35.5 0.258 35.0 36.1 7 37.6 0.256 37.1 38.1 8 38.5 0.252 38.0 39.0 9 38.8 0.241 38.3 39.2 10 39.9 0.239 39.4 40.4 11 38.4 0.314 37.7 39.0 12 34.5 0.342 33.8 35.2 13 29.7 0.430 28.9 30.6 14 28.4 0.361 27.7 29.2 15 30.5 0.336 29.8 31.2 16 33.3 0.281 32.7 33.9 17 37.5 0.270 37.0 38.0 18 40.1 0.231 39.7 40.6 19 39.2 0.343 38.5 39.9 20 41.8 0.294 41.2 42.4 21 46.0 0.326 45.3 46.6 22 52.1 0.501 51.1 53.1 > model.frame [1] TRUE > model.matrix [1] TRUE > nobs [1] 63 > linearHypothesis Linear hypothesis test (Theil's F test) Hypothesis: Consumption_corpProf + Investment_capitalLag = 0 Model 1: restricted model Model 2: kleinModel Res.Df Df F Pr(>F) 1 52 2 51 1 0.59 0.45 Linear hypothesis test (F statistic of a Wald test) Hypothesis: Consumption_corpProf + Investment_capitalLag = 0 Model 1: restricted model Model 2: kleinModel Res.Df Df F Pr(>F) 1 52 2 51 1 0.73 0.4 Linear hypothesis test (Chi^2 statistic of a Wald test) Hypothesis: Consumption_corpProf + Investment_capitalLag = 0 Model 1: restricted model Model 2: kleinModel Res.Df Df Chisq Pr(>Chisq) 1 52 2 51 1 0.73 0.39 Linear hypothesis test (Theil's F test) Hypothesis: Consumption_corpProf + Investment_capitalLag = 0 Consumption_corpProfLag - PrivateWages_trend = 0 Model 1: restricted model Model 2: kleinModel Res.Df Df F Pr(>F) 1 53 2 51 2 0.72 0.49 Linear hypothesis test (F statistic of a Wald test) Hypothesis: Consumption_corpProf + Investment_capitalLag = 0 Consumption_corpProfLag - PrivateWages_trend = 0 Model 1: restricted model Model 2: kleinModel Res.Df Df F Pr(>F) 1 53 2 51 2 0.88 0.42 Linear hypothesis test (Chi^2 statistic of a Wald test) Hypothesis: Consumption_corpProf + Investment_capitalLag = 0 Consumption_corpProfLag - PrivateWages_trend = 0 Model 1: restricted model Model 2: kleinModel Res.Df Df Chisq Pr(>Chisq) 1 53 2 51 2 1.77 0.41 > logLik 'log Lik.' -82.3 (df=18) 'log Lik.' -99.1 (df=18) Estimating function Consumption_(Intercept) Consumption_corpProf Consumption_2 -6.979 -92.51 Consumption_3 -3.442 -57.06 Consumption_4 -3.899 -75.19 Consumption_5 -11.237 -235.54 Consumption_6 -2.642 -52.22 Consumption_7 8.084 147.44 Consumption_8 10.972 192.80 Consumption_9 7.028 137.33 Consumption_10 1.972 40.17 Consumption_11 -7.325 -125.85 Consumption_12 -3.206 -40.73 Consumption_13 -5.913 -53.22 Consumption_14 9.196 83.26 Consumption_15 -2.781 -35.23 Consumption_16 -2.363 -34.08 Consumption_17 18.799 276.57 Consumption_18 -3.872 -76.65 Consumption_19 -13.205 -253.63 Consumption_20 10.531 183.44 Consumption_21 3.807 77.30 Consumption_22 -3.522 -79.79 Investment_2 5.075 67.27 Investment_3 0.158 2.62 Investment_4 -0.131 -2.53 Investment_5 2.324 48.72 Investment_6 0.316 6.26 Investment_7 -0.482 -8.80 Investment_8 -0.935 -16.43 Investment_9 -1.481 -28.94 Investment_10 -4.072 -82.96 Investment_11 2.213 38.01 Investment_12 1.610 20.45 Investment_13 2.664 23.98 Investment_14 -2.837 -25.69 Investment_15 0.201 2.55 Investment_16 -0.398 -5.74 Investment_17 -2.409 -35.45 Investment_18 -0.488 -9.66 Investment_19 4.083 78.42 Investment_20 -1.607 -27.99 Investment_21 -1.086 -22.05 Investment_22 -2.718 -61.58 PrivateWages_2 -9.649 -127.90 PrivateWages_3 4.187 69.41 PrivateWages_4 8.749 168.69 PrivateWages_5 -6.685 -140.11 PrivateWages_6 -1.021 -20.18 PrivateWages_7 4.003 73.02 PrivateWages_8 3.592 63.12 PrivateWages_9 5.932 115.93 PrivateWages_10 11.495 234.22 PrivateWages_11 -7.992 -137.30 PrivateWages_12 -2.626 -33.36 PrivateWages_13 -8.660 -77.94 PrivateWages_14 6.531 59.13 PrivateWages_15 -1.757 -22.27 PrivateWages_16 -2.801 -40.40 PrivateWages_17 6.362 93.60 PrivateWages_18 -0.661 -13.09 PrivateWages_19 -18.070 -347.06 PrivateWages_20 3.670 63.92 PrivateWages_21 -3.889 -78.97 PrivateWages_22 9.289 210.47 Consumption_corpProfLag Consumption_wages Consumption_2 -88.63 -205.23 Consumption_3 -42.68 -109.29 Consumption_4 -65.90 -139.41 Consumption_5 -206.77 -439.08 Consumption_6 -51.26 -103.40 Consumption_7 162.48 318.13 Consumption_8 215.04 440.87 Consumption_9 139.15 297.49 Consumption_10 41.60 86.79 Consumption_11 -158.95 -320.08 Consumption_12 -50.01 -126.56 Consumption_13 -67.41 -207.75 Consumption_14 64.37 301.49 Consumption_15 -31.14 -104.27 Consumption_16 -29.07 -94.86 Consumption_17 263.19 783.97 Consumption_18 -68.15 -185.39 Consumption_19 -228.45 -651.06 Consumption_20 161.12 509.58 Consumption_21 72.33 203.19 Consumption_22 -74.31 -213.82 Investment_2 64.45 149.24 Investment_3 1.96 5.01 Investment_4 -2.22 -4.70 Investment_5 42.77 90.82 Investment_6 6.14 12.39 Investment_7 -9.70 -18.98 Investment_8 -18.33 -37.57 Investment_9 -29.32 -62.69 Investment_10 -85.92 -179.25 Investment_11 48.02 96.69 Investment_12 25.11 63.55 Investment_13 30.37 93.60 Investment_14 -19.86 -93.02 Investment_15 2.25 7.55 Investment_16 -4.90 -15.98 Investment_17 -33.73 -100.47 Investment_18 -8.59 -23.36 Investment_19 70.63 201.29 Investment_20 -24.59 -77.76 Investment_21 -20.63 -57.96 Investment_22 -57.35 -165.02 PrivateWages_2 -122.54 -283.73 PrivateWages_3 51.92 132.94 PrivateWages_4 147.85 312.78 PrivateWages_5 -123.00 -261.19 PrivateWages_6 -19.80 -39.95 PrivateWages_7 80.47 157.55 PrivateWages_8 70.40 144.33 PrivateWages_9 117.46 251.13 PrivateWages_10 242.55 506.03 PrivateWages_11 -173.42 -349.22 PrivateWages_12 -40.96 -103.66 PrivateWages_13 -98.72 -304.24 PrivateWages_14 45.71 214.10 PrivateWages_15 -19.68 -65.90 PrivateWages_16 -34.45 -112.44 PrivateWages_17 89.07 265.31 PrivateWages_18 -11.64 -31.65 PrivateWages_19 -312.61 -890.90 PrivateWages_20 56.14 177.57 PrivateWages_21 -73.89 -207.57 PrivateWages_22 196.00 564.00 Investment_(Intercept) Investment_corpProf Consumption_2 2.2268 29.52 Consumption_3 1.0983 18.21 Consumption_4 1.2442 23.99 Consumption_5 3.5856 75.15 Consumption_6 0.8430 16.66 Consumption_7 -2.5793 -47.04 Consumption_8 -3.5007 -61.52 Consumption_9 -2.2423 -43.82 Consumption_10 -0.6291 -12.82 Consumption_11 2.3372 40.15 Consumption_12 1.0229 13.00 Consumption_13 1.8868 16.98 Consumption_14 -2.9343 -26.57 Consumption_15 0.8872 11.24 Consumption_16 0.7541 10.87 Consumption_17 -5.9983 -88.25 Consumption_18 1.2355 24.46 Consumption_19 4.2135 80.93 Consumption_20 -3.3600 -58.53 Consumption_21 -1.2147 -24.67 Consumption_22 1.1237 25.46 Investment_2 -2.6152 -34.67 Investment_3 -0.0813 -1.35 Investment_4 0.0677 1.30 Investment_5 -1.1977 -25.10 Investment_6 -0.1631 -3.22 Investment_7 0.2486 4.53 Investment_8 0.4818 8.47 Investment_9 0.7630 14.91 Investment_10 2.0982 42.75 Investment_11 -1.1402 -19.59 Investment_12 -0.8295 -10.54 Investment_13 -1.3729 -12.36 Investment_14 1.4620 13.24 Investment_15 -0.1037 -1.31 Investment_16 0.2051 2.96 Investment_17 1.2415 18.26 Investment_18 0.2514 4.98 Investment_19 -2.1038 -40.41 Investment_20 0.8280 14.42 Investment_21 0.5596 11.36 Investment_22 1.4005 31.73 PrivateWages_2 3.7415 49.60 PrivateWages_3 -1.6237 -26.92 PrivateWages_4 -3.3924 -65.41 PrivateWages_5 2.5921 54.33 PrivateWages_6 0.3959 7.82 PrivateWages_7 -1.5524 -28.31 PrivateWages_8 -1.3929 -24.48 PrivateWages_9 -2.3004 -44.95 PrivateWages_10 -4.4576 -90.82 PrivateWages_11 3.0990 53.24 PrivateWages_12 1.0182 12.94 PrivateWages_13 3.3581 30.22 PrivateWages_14 -2.5324 -22.93 PrivateWages_15 0.6815 8.64 PrivateWages_16 1.0862 15.66 PrivateWages_17 -2.4670 -36.29 PrivateWages_18 0.2564 5.07 PrivateWages_19 7.0070 134.58 PrivateWages_20 -1.4230 -24.79 PrivateWages_21 1.5081 30.62 PrivateWages_22 -3.6021 -81.61 Investment_corpProfLag Investment_capitalLag Consumption_2 28.28 407.1 Consumption_3 13.62 200.5 Consumption_4 21.03 229.5 Consumption_5 65.97 680.2 Consumption_6 16.35 162.4 Consumption_7 -51.84 -510.2 Consumption_8 -68.61 -712.1 Consumption_9 -44.40 -465.5 Consumption_10 -13.27 -132.5 Consumption_11 50.72 504.1 Consumption_12 15.96 221.7 Consumption_13 21.51 402.5 Consumption_14 -20.54 -607.7 Consumption_15 9.94 179.2 Consumption_16 9.27 150.1 Consumption_17 -83.98 -1185.9 Consumption_18 21.74 246.9 Consumption_19 72.89 850.3 Consumption_20 -51.41 -671.7 Consumption_21 -23.08 -244.4 Consumption_22 23.71 229.8 Investment_2 -33.21 -478.1 Investment_3 -1.01 -14.9 Investment_4 1.14 12.5 Investment_5 -22.04 -227.2 Investment_6 -3.16 -31.4 Investment_7 5.00 49.2 Investment_8 9.44 98.0 Investment_9 15.11 158.4 Investment_10 44.27 441.9 Investment_11 -24.74 -245.9 Investment_12 -12.94 -179.8 Investment_13 -15.65 -292.8 Investment_14 10.23 302.8 Investment_15 -1.16 -21.0 Investment_16 2.52 40.8 Investment_17 17.38 245.4 Investment_18 4.43 50.2 Investment_19 -36.40 -424.5 Investment_20 12.67 165.5 Investment_21 10.63 112.6 Investment_22 29.55 286.4 PrivateWages_2 47.52 683.9 PrivateWages_3 -20.13 -296.5 PrivateWages_4 -57.33 -625.9 PrivateWages_5 47.69 491.7 PrivateWages_6 7.68 76.3 PrivateWages_7 -31.20 -307.1 PrivateWages_8 -27.30 -283.3 PrivateWages_9 -45.55 -477.6 PrivateWages_10 -94.05 -938.8 PrivateWages_11 67.25 668.4 PrivateWages_12 15.88 220.6 PrivateWages_13 38.28 716.3 PrivateWages_14 -17.73 -524.5 PrivateWages_15 7.63 137.7 PrivateWages_16 13.36 216.2 PrivateWages_17 -34.54 -487.7 PrivateWages_18 4.51 51.2 PrivateWages_19 121.22 1414.0 PrivateWages_20 -21.77 -284.4 PrivateWages_21 28.65 303.4 PrivateWages_22 -76.00 -736.6 PrivateWages_(Intercept) PrivateWages_gnp PrivateWages_gnpLag Consumption_2 -7.713 -367.6 -346.32 Consumption_3 -3.804 -187.6 -173.47 Consumption_4 -4.309 -244.9 -215.90 Consumption_5 -12.419 -754.3 -710.38 Consumption_6 -2.920 -178.7 -166.72 Consumption_7 8.934 547.6 544.97 Consumption_8 12.125 737.9 776.02 Consumption_9 7.767 484.4 500.17 Consumption_10 2.179 140.3 140.54 Consumption_11 -8.095 -521.2 -542.38 Consumption_12 -3.543 -194.5 -216.84 Consumption_13 -6.535 -308.0 -348.98 Consumption_14 10.163 423.2 450.24 Consumption_15 -3.073 -156.6 -138.60 Consumption_16 -2.612 -145.4 -129.81 Consumption_17 20.776 1190.8 1130.21 Consumption_18 -4.279 -289.6 -268.32 Consumption_19 -14.594 -995.5 -948.61 Consumption_20 11.638 778.7 708.75 Consumption_21 4.207 316.7 292.41 Consumption_22 -3.892 -336.6 -294.62 Investment_2 6.817 324.9 306.06 Investment_3 0.212 10.5 9.67 Investment_4 -0.176 -10.0 -8.84 Investment_5 3.122 189.6 178.58 Investment_6 0.425 26.0 24.27 Investment_7 -0.648 -39.7 -39.52 Investment_8 -1.256 -76.4 -80.37 Investment_9 -1.989 -124.1 -128.08 Investment_10 -5.469 -352.2 -352.75 Investment_11 2.972 191.3 199.12 Investment_12 2.162 118.7 132.32 Investment_13 3.579 168.7 191.09 Investment_14 -3.811 -158.7 -168.82 Investment_15 0.270 13.8 12.19 Investment_16 -0.535 -29.8 -26.57 Investment_17 -3.236 -185.5 -176.04 Investment_18 -0.655 -44.4 -41.09 Investment_19 5.484 374.0 356.44 Investment_20 -2.158 -144.4 -131.44 Investment_21 -1.459 -109.8 -101.37 Investment_22 -3.650 -315.7 -276.34 PrivateWages_2 -14.774 -704.2 -663.37 PrivateWages_3 6.412 316.3 292.37 PrivateWages_4 13.396 761.4 671.14 PrivateWages_5 -10.236 -621.6 -585.48 PrivateWages_6 -1.563 -95.7 -89.26 PrivateWages_7 6.130 375.7 373.95 PrivateWages_8 5.500 334.7 352.01 PrivateWages_9 9.084 566.6 585.00 PrivateWages_10 17.602 1133.5 1135.33 PrivateWages_11 -12.237 -787.8 -819.89 PrivateWages_12 -4.021 -220.7 -246.06 PrivateWages_13 -13.260 -625.0 -708.11 PrivateWages_14 10.000 416.4 443.00 PrivateWages_15 -2.691 -137.2 -121.37 PrivateWages_16 -4.289 -238.7 -213.18 PrivateWages_17 9.742 558.3 529.95 PrivateWages_18 -1.012 -68.5 -63.47 PrivateWages_19 -27.669 -1887.3 -1798.51 PrivateWages_20 5.619 376.0 342.19 PrivateWages_21 -5.955 -448.3 -413.89 PrivateWages_22 14.224 1230.0 1076.76 PrivateWages_trend Consumption_2 77.130 Consumption_3 34.237 Consumption_4 34.475 Consumption_5 86.935 Consumption_6 17.519 Consumption_7 -44.670 Consumption_8 -48.501 Consumption_9 -23.300 Consumption_10 -4.358 Consumption_11 8.095 Consumption_12 0.000 Consumption_13 -6.535 Consumption_14 20.327 Consumption_15 -9.219 Consumption_16 -10.447 Consumption_17 103.880 Consumption_18 -25.676 Consumption_19 -102.158 Consumption_20 93.104 Consumption_21 37.866 Consumption_22 -38.920 Investment_2 -68.165 Investment_3 -1.908 Investment_4 1.411 Investment_5 -21.854 Investment_6 -2.550 Investment_7 3.240 Investment_8 5.023 Investment_9 5.967 Investment_10 10.938 Investment_11 -2.972 Investment_12 0.000 Investment_13 3.579 Investment_14 -7.622 Investment_15 0.811 Investment_16 -2.138 Investment_17 -16.180 Investment_18 -3.932 Investment_19 38.386 Investment_20 -17.267 Investment_21 -13.128 Investment_22 -36.504 PrivateWages_2 147.744 PrivateWages_3 -57.704 PrivateWages_4 -107.168 PrivateWages_5 71.650 PrivateWages_6 9.379 PrivateWages_7 -30.651 PrivateWages_8 -22.000 PrivateWages_9 -27.251 PrivateWages_10 -35.204 PrivateWages_11 12.237 PrivateWages_12 0.000 PrivateWages_13 -13.260 PrivateWages_14 20.000 PrivateWages_15 -8.073 PrivateWages_16 -17.157 PrivateWages_17 48.709 PrivateWages_18 -6.074 PrivateWages_19 -193.685 PrivateWages_20 44.952 PrivateWages_21 -53.597 PrivateWages_22 142.240 [1] TRUE > Bread Consumption_(Intercept) Consumption_corpProf Consumption_corpProfLag [1,] 94.44678 -0.9198 -0.3009 [2,] -0.91977 0.5830 -0.4036 [3,] -0.30085 -0.4036 0.5114 [4,] -1.71741 -0.0559 -0.0303 [5,] 169.11432 -7.0463 6.8731 [6,] -3.78719 0.8222 -0.7139 [7,] 1.24504 -0.6799 0.7545 [8,] -0.61653 0.0214 -0.0358 [9,] -43.93927 0.0941 1.6110 [10,] 0.70520 -0.0665 0.0417 [11,] 0.00487 0.0673 -0.0710 [12,] 0.27782 0.0450 0.0254 Consumption_wages Investment_(Intercept) Investment_corpProf [1,] -1.71741 169.11 -3.79e+00 [2,] -0.05588 -7.05 8.22e-01 [3,] -0.03031 6.87 -7.14e-01 [4,] 0.07612 -3.87 3.83e-02 [5,] -3.87475 7070.32 -1.04e+02 [6,] 0.03834 -104.41 4.26e+00 [7,] -0.05106 83.93 -3.59e+00 [8,] 0.02027 -33.26 4.55e-01 [9,] 0.35346 48.43 -5.08e-01 [10,] -0.00637 6.61 4.29e-03 [11,] 0.00050 -7.65 4.31e-03 [12,] -0.03505 -5.67 7.94e-02 Investment_corpProfLag Investment_capitalLag PrivateWages_(Intercept) [1,] 1.24504 -0.6165 -43.9393 [2,] -0.67986 0.0214 0.0941 [3,] 0.75452 -0.0358 1.6110 [4,] -0.05106 0.0203 0.3535 [5,] 83.92612 -33.2552 48.4291 [6,] -3.59218 0.4550 -0.5077 [7,] 3.89889 -0.4344 -3.1131 [8,] -0.43443 0.1630 0.0665 [9,] -3.11309 0.0665 90.0495 [10,] 0.04234 -0.0368 -0.7131 [11,] 0.00984 0.0370 -0.7830 [12,] -0.11558 0.0310 0.9385 PrivateWages_gnp PrivateWages_gnpLag PrivateWages_trend [1,] 0.70520 0.00487 0.27782 [2,] -0.06653 0.06728 0.04499 [3,] 0.04169 -0.07096 0.02543 [4,] -0.00637 0.00050 -0.03505 [5,] 6.61461 -7.64810 -5.66883 [6,] 0.00429 0.00431 0.07939 [7,] 0.04234 0.00984 -0.11558 [8,] -0.03681 0.03698 0.03103 [9,] -0.71315 -0.78300 0.93852 [10,] 0.06094 -0.05082 -0.02122 [11,] -0.05082 0.06614 0.00579 [12,] -0.02122 0.00579 0.05272 > > # OLS Warning in systemfit(system, method = method, data = KleinI, methodResidCov = ifelse(method == : the estimation of systems of equations with unequal numbers of observations has not been thoroughly tested yet > summary systemfit results method: OLS N DF SSR detRCov OLS-R2 McElroy-R2 system 62 50 44.9 0.372 0.977 0.991 N DF SSR MSE RMSE R2 Adj R2 Consumption 21 17 17.88 1.052 1.03 0.981 0.978 Investment 21 17 17.32 1.019 1.01 0.931 0.919 PrivateWages 20 16 9.74 0.609 0.78 0.988 0.985 The covariance matrix of the residuals Consumption Investment PrivateWages Consumption 1.0703 -0.0161 -0.463 Investment -0.0161 0.9435 0.199 PrivateWages -0.4633 0.1993 0.609 The correlations of the residuals Consumption Investment PrivateWages Consumption 1.0000 -0.0201 -0.575 Investment -0.0201 1.0000 0.264 PrivateWages -0.5747 0.2639 1.000 OLS estimates for 'Consumption' (equation 1) Model Formula: consump ~ corpProf + corpProfLag + wages Estimate Std. Error t value Pr(>|t|) (Intercept) 16.2366 1.3141 12.36 6.4e-10 *** corpProf 0.1929 0.0920 2.10 0.051 . corpProfLag 0.0899 0.0914 0.98 0.339 wages 0.7962 0.0403 19.76 3.6e-13 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.026 on 17 degrees of freedom Number of observations: 21 Degrees of Freedom: 17 SSR: 17.879 MSE: 1.052 Root MSE: 1.026 Multiple R-Squared: 0.981 Adjusted R-Squared: 0.978 OLS estimates for 'Investment' (equation 2) Model Formula: invest ~ corpProf + corpProfLag + capitalLag Estimate Std. Error t value Pr(>|t|) (Intercept) 10.1258 5.2592 1.93 0.07108 . corpProf 0.4796 0.0934 5.13 8.3e-05 *** corpProfLag 0.3330 0.0971 3.43 0.00318 ** capitalLag -0.1118 0.0257 -4.35 0.00044 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.009 on 17 degrees of freedom Number of observations: 21 Degrees of Freedom: 17 SSR: 17.323 MSE: 1.019 Root MSE: 1.009 Multiple R-Squared: 0.931 Adjusted R-Squared: 0.919 OLS estimates for 'PrivateWages' (equation 3) Model Formula: privWage ~ gnp + gnpLag + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 1.3550 1.3093 1.03 0.3161 gnp 0.4417 0.0331 13.33 4.4e-10 *** gnpLag 0.1466 0.0381 3.85 0.0014 ** trend 0.1244 0.0336 3.70 0.0020 ** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 0.78 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 9.739 MSE: 0.609 Root MSE: 0.78 Multiple R-Squared: 0.988 Adjusted R-Squared: 0.985 compare coef with single-equation OLS [1] TRUE > residuals Consumption Investment PrivateWages 1 NA NA NA 2 -0.32389 -0.0668 -1.3389 3 -1.25001 -0.0476 0.2462 4 -1.56574 1.2467 1.1255 5 -0.49350 -1.3512 -0.1959 6 0.00761 0.4154 -0.5284 7 0.86910 1.4923 NA 8 1.33848 0.7889 -0.7909 9 1.05498 -0.6317 0.2819 10 -0.58856 1.0830 1.1384 11 0.28231 0.2791 -0.1904 12 -0.22965 0.0369 0.5813 13 -0.32213 0.3659 0.1206 14 0.32228 0.2237 0.4773 15 -0.05801 -0.1728 0.3035 16 -0.03466 0.0101 0.0284 17 1.61650 0.9719 -0.8517 18 -0.43597 0.0516 0.9908 19 0.21005 -2.5656 -0.4597 20 0.98920 -0.6866 -0.3819 21 0.78508 -0.7807 -1.1062 22 -2.17345 -0.6623 0.5501 > fitted Consumption Investment PrivateWages 1 NA NA NA 2 42.2 -0.133 26.8 3 46.3 1.948 29.1 4 50.8 3.953 33.0 5 51.1 4.351 34.1 6 52.6 4.685 35.9 7 54.2 4.108 NA 8 54.9 3.411 38.7 9 56.2 3.632 38.9 10 58.4 4.017 40.2 11 54.7 0.721 38.1 12 51.1 -3.437 33.9 13 45.9 -6.566 28.9 14 46.2 -5.324 28.0 15 48.8 -2.827 30.3 16 51.3 -1.310 33.2 17 56.1 1.128 37.7 18 59.1 1.948 40.0 19 57.3 0.666 38.7 20 60.6 1.987 42.0 21 64.2 4.081 46.1 22 71.9 5.562 52.7 > predict Consumption.pred Consumption.se.fit Consumption.lwr Consumption.upr 1 NA NA NA NA 2 42.2 0.466 40.0 44.5 3 46.3 0.523 43.9 48.6 4 50.8 0.344 48.6 52.9 5 51.1 0.399 48.9 53.3 6 52.6 0.401 50.4 54.8 7 54.2 0.363 52.0 56.4 8 54.9 0.330 52.7 57.0 9 56.2 0.354 54.1 58.4 10 58.4 0.373 56.2 60.6 11 54.7 0.612 52.3 57.1 12 51.1 0.489 48.8 53.4 13 45.9 0.634 43.5 48.3 14 46.2 0.608 43.8 48.6 15 48.8 0.378 46.6 51.0 16 51.3 0.336 49.2 53.5 17 56.1 0.369 53.9 58.3 18 59.1 0.324 57.0 61.3 19 57.3 0.375 55.1 59.5 20 60.6 0.437 58.4 62.9 21 64.2 0.429 62.0 66.4 22 71.9 0.672 69.4 74.3 Investment.pred Investment.se.fit Investment.lwr Investment.upr 1 NA NA NA NA 2 -0.133 0.584 -2.476 2.209 3 1.948 0.480 -0.297 4.193 4 3.953 0.432 1.748 6.159 5 4.351 0.357 2.201 6.502 6 4.685 0.336 2.548 6.821 7 4.108 0.316 1.983 6.232 8 3.411 0.281 1.306 5.516 9 3.632 0.374 1.469 5.794 10 4.017 0.430 1.813 6.221 11 0.721 0.579 -1.616 3.058 12 -3.437 0.488 -5.688 -1.185 13 -6.566 0.592 -8.917 -4.215 14 -5.324 0.667 -7.754 -2.893 15 -2.827 0.359 -4.979 -0.675 16 -1.310 0.308 -3.430 0.810 17 1.128 0.334 -1.008 3.264 18 1.948 0.234 -0.133 4.030 19 0.666 0.300 -1.450 2.781 20 1.987 0.353 -0.161 4.134 21 4.081 0.319 1.954 6.207 22 5.562 0.444 3.348 7.777 PrivateWages.pred PrivateWages.se.fit PrivateWages.lwr PrivateWages.upr 1 NA NA NA NA 2 26.8 0.366 25.1 28.6 3 29.1 0.369 27.3 30.8 4 33.0 0.372 31.2 34.7 5 34.1 0.288 32.4 35.8 6 35.9 0.287 34.3 37.6 7 NA NA NA NA 8 38.7 0.293 37.0 40.4 9 38.9 0.279 37.3 40.6 10 40.2 0.266 38.5 41.8 11 38.1 0.365 36.4 39.8 12 33.9 0.369 32.2 35.7 13 28.9 0.438 27.1 30.7 14 28.0 0.385 26.3 29.8 15 30.3 0.379 28.6 32.0 16 33.2 0.316 31.5 34.9 17 37.7 0.310 36.0 39.3 18 40.0 0.243 38.4 41.7 19 38.7 0.363 36.9 40.4 20 42.0 0.326 40.3 43.7 21 46.1 0.341 44.4 47.8 22 52.7 0.514 50.9 54.6 > model.frame consump corpProf corpProfLag wages invest capitalLag privWage gnp gnpLag 1 39.8 12.7 NA 31.0 2.7 180 28.8 44.9 NA 2 41.9 12.4 12.7 28.2 -0.2 183 25.5 45.6 44.9 3 45.0 16.9 12.4 32.2 1.9 183 29.3 50.1 45.6 4 49.2 18.4 16.9 37.0 5.2 184 34.1 57.2 50.1 5 50.6 19.4 18.4 37.0 3.0 190 33.9 57.1 57.2 6 52.6 20.1 19.4 38.6 5.1 193 35.4 61.0 57.1 7 55.1 19.6 20.1 40.7 5.6 198 37.4 64.0 NA 8 56.2 19.8 19.6 41.5 4.2 203 37.9 64.4 64.0 9 57.3 21.1 19.8 42.9 3.0 208 39.2 64.5 64.4 10 57.8 21.7 21.1 45.3 5.1 211 41.3 67.0 64.5 11 55.0 15.6 21.7 42.1 1.0 216 37.9 61.2 67.0 12 50.9 11.4 15.6 39.3 -3.4 217 34.5 53.4 61.2 13 45.6 7.0 11.4 34.3 -6.2 213 29.0 44.3 53.4 14 46.5 11.2 7.0 34.1 -5.1 207 28.5 45.1 44.3 15 48.7 12.3 11.2 36.6 -3.0 202 30.6 49.7 45.1 16 51.3 14.0 12.3 39.3 -1.3 199 33.2 54.4 49.7 17 57.7 17.6 14.0 44.2 2.1 198 36.8 62.7 54.4 18 58.7 17.3 17.6 47.7 2.0 200 41.0 65.0 62.7 19 57.5 15.3 17.3 45.9 -1.9 202 38.2 60.9 65.0 20 61.6 19.0 15.3 49.4 1.3 200 41.6 69.5 60.9 21 65.0 21.1 19.0 53.0 3.3 201 45.0 75.7 69.5 22 69.7 23.5 21.1 61.8 4.9 204 53.3 88.4 75.7 trend 1 -11 2 -10 3 -9 4 -8 5 -7 6 -6 7 -5 8 -4 9 -3 10 -2 11 -1 12 0 13 1 14 2 15 3 16 4 17 5 18 6 19 7 20 8 21 9 22 10 > model.matrix Consumption_(Intercept) Consumption_corpProf Consumption_2 1 12.4 Consumption_3 1 16.9 Consumption_4 1 18.4 Consumption_5 1 19.4 Consumption_6 1 20.1 Consumption_7 1 19.6 Consumption_8 1 19.8 Consumption_9 1 21.1 Consumption_10 1 21.7 Consumption_11 1 15.6 Consumption_12 1 11.4 Consumption_13 1 7.0 Consumption_14 1 11.2 Consumption_15 1 12.3 Consumption_16 1 14.0 Consumption_17 1 17.6 Consumption_18 1 17.3 Consumption_19 1 15.3 Consumption_20 1 19.0 Consumption_21 1 21.1 Consumption_22 1 23.5 Investment_2 0 0.0 Investment_3 0 0.0 Investment_4 0 0.0 Investment_5 0 0.0 Investment_6 0 0.0 Investment_7 0 0.0 Investment_8 0 0.0 Investment_9 0 0.0 Investment_10 0 0.0 Investment_11 0 0.0 Investment_12 0 0.0 Investment_13 0 0.0 Investment_14 0 0.0 Investment_15 0 0.0 Investment_16 0 0.0 Investment_17 0 0.0 Investment_18 0 0.0 Investment_19 0 0.0 Investment_20 0 0.0 Investment_21 0 0.0 Investment_22 0 0.0 PrivateWages_2 0 0.0 PrivateWages_3 0 0.0 PrivateWages_4 0 0.0 PrivateWages_5 0 0.0 PrivateWages_6 0 0.0 PrivateWages_8 0 0.0 PrivateWages_9 0 0.0 PrivateWages_10 0 0.0 PrivateWages_11 0 0.0 PrivateWages_12 0 0.0 PrivateWages_13 0 0.0 PrivateWages_14 0 0.0 PrivateWages_15 0 0.0 PrivateWages_16 0 0.0 PrivateWages_17 0 0.0 PrivateWages_18 0 0.0 PrivateWages_19 0 0.0 PrivateWages_20 0 0.0 PrivateWages_21 0 0.0 PrivateWages_22 0 0.0 Consumption_corpProfLag Consumption_wages Consumption_2 12.7 28.2 Consumption_3 12.4 32.2 Consumption_4 16.9 37.0 Consumption_5 18.4 37.0 Consumption_6 19.4 38.6 Consumption_7 20.1 40.7 Consumption_8 19.6 41.5 Consumption_9 19.8 42.9 Consumption_10 21.1 45.3 Consumption_11 21.7 42.1 Consumption_12 15.6 39.3 Consumption_13 11.4 34.3 Consumption_14 7.0 34.1 Consumption_15 11.2 36.6 Consumption_16 12.3 39.3 Consumption_17 14.0 44.2 Consumption_18 17.6 47.7 Consumption_19 17.3 45.9 Consumption_20 15.3 49.4 Consumption_21 19.0 53.0 Consumption_22 21.1 61.8 Investment_2 0.0 0.0 Investment_3 0.0 0.0 Investment_4 0.0 0.0 Investment_5 0.0 0.0 Investment_6 0.0 0.0 Investment_7 0.0 0.0 Investment_8 0.0 0.0 Investment_9 0.0 0.0 Investment_10 0.0 0.0 Investment_11 0.0 0.0 Investment_12 0.0 0.0 Investment_13 0.0 0.0 Investment_14 0.0 0.0 Investment_15 0.0 0.0 Investment_16 0.0 0.0 Investment_17 0.0 0.0 Investment_18 0.0 0.0 Investment_19 0.0 0.0 Investment_20 0.0 0.0 Investment_21 0.0 0.0 Investment_22 0.0 0.0 PrivateWages_2 0.0 0.0 PrivateWages_3 0.0 0.0 PrivateWages_4 0.0 0.0 PrivateWages_5 0.0 0.0 PrivateWages_6 0.0 0.0 PrivateWages_8 0.0 0.0 PrivateWages_9 0.0 0.0 PrivateWages_10 0.0 0.0 PrivateWages_11 0.0 0.0 PrivateWages_12 0.0 0.0 PrivateWages_13 0.0 0.0 PrivateWages_14 0.0 0.0 PrivateWages_15 0.0 0.0 PrivateWages_16 0.0 0.0 PrivateWages_17 0.0 0.0 PrivateWages_18 0.0 0.0 PrivateWages_19 0.0 0.0 PrivateWages_20 0.0 0.0 PrivateWages_21 0.0 0.0 PrivateWages_22 0.0 0.0 Investment_(Intercept) Investment_corpProf Consumption_2 0 0.0 Consumption_3 0 0.0 Consumption_4 0 0.0 Consumption_5 0 0.0 Consumption_6 0 0.0 Consumption_7 0 0.0 Consumption_8 0 0.0 Consumption_9 0 0.0 Consumption_10 0 0.0 Consumption_11 0 0.0 Consumption_12 0 0.0 Consumption_13 0 0.0 Consumption_14 0 0.0 Consumption_15 0 0.0 Consumption_16 0 0.0 Consumption_17 0 0.0 Consumption_18 0 0.0 Consumption_19 0 0.0 Consumption_20 0 0.0 Consumption_21 0 0.0 Consumption_22 0 0.0 Investment_2 1 12.4 Investment_3 1 16.9 Investment_4 1 18.4 Investment_5 1 19.4 Investment_6 1 20.1 Investment_7 1 19.6 Investment_8 1 19.8 Investment_9 1 21.1 Investment_10 1 21.7 Investment_11 1 15.6 Investment_12 1 11.4 Investment_13 1 7.0 Investment_14 1 11.2 Investment_15 1 12.3 Investment_16 1 14.0 Investment_17 1 17.6 Investment_18 1 17.3 Investment_19 1 15.3 Investment_20 1 19.0 Investment_21 1 21.1 Investment_22 1 23.5 PrivateWages_2 0 0.0 PrivateWages_3 0 0.0 PrivateWages_4 0 0.0 PrivateWages_5 0 0.0 PrivateWages_6 0 0.0 PrivateWages_8 0 0.0 PrivateWages_9 0 0.0 PrivateWages_10 0 0.0 PrivateWages_11 0 0.0 PrivateWages_12 0 0.0 PrivateWages_13 0 0.0 PrivateWages_14 0 0.0 PrivateWages_15 0 0.0 PrivateWages_16 0 0.0 PrivateWages_17 0 0.0 PrivateWages_18 0 0.0 PrivateWages_19 0 0.0 PrivateWages_20 0 0.0 PrivateWages_21 0 0.0 PrivateWages_22 0 0.0 Investment_corpProfLag Investment_capitalLag Consumption_2 0.0 0 Consumption_3 0.0 0 Consumption_4 0.0 0 Consumption_5 0.0 0 Consumption_6 0.0 0 Consumption_7 0.0 0 Consumption_8 0.0 0 Consumption_9 0.0 0 Consumption_10 0.0 0 Consumption_11 0.0 0 Consumption_12 0.0 0 Consumption_13 0.0 0 Consumption_14 0.0 0 Consumption_15 0.0 0 Consumption_16 0.0 0 Consumption_17 0.0 0 Consumption_18 0.0 0 Consumption_19 0.0 0 Consumption_20 0.0 0 Consumption_21 0.0 0 Consumption_22 0.0 0 Investment_2 12.7 183 Investment_3 12.4 183 Investment_4 16.9 184 Investment_5 18.4 190 Investment_6 19.4 193 Investment_7 20.1 198 Investment_8 19.6 203 Investment_9 19.8 208 Investment_10 21.1 211 Investment_11 21.7 216 Investment_12 15.6 217 Investment_13 11.4 213 Investment_14 7.0 207 Investment_15 11.2 202 Investment_16 12.3 199 Investment_17 14.0 198 Investment_18 17.6 200 Investment_19 17.3 202 Investment_20 15.3 200 Investment_21 19.0 201 Investment_22 21.1 204 PrivateWages_2 0.0 0 PrivateWages_3 0.0 0 PrivateWages_4 0.0 0 PrivateWages_5 0.0 0 PrivateWages_6 0.0 0 PrivateWages_8 0.0 0 PrivateWages_9 0.0 0 PrivateWages_10 0.0 0 PrivateWages_11 0.0 0 PrivateWages_12 0.0 0 PrivateWages_13 0.0 0 PrivateWages_14 0.0 0 PrivateWages_15 0.0 0 PrivateWages_16 0.0 0 PrivateWages_17 0.0 0 PrivateWages_18 0.0 0 PrivateWages_19 0.0 0 PrivateWages_20 0.0 0 PrivateWages_21 0.0 0 PrivateWages_22 0.0 0 PrivateWages_(Intercept) PrivateWages_gnp PrivateWages_gnpLag Consumption_2 0 0.0 0.0 Consumption_3 0 0.0 0.0 Consumption_4 0 0.0 0.0 Consumption_5 0 0.0 0.0 Consumption_6 0 0.0 0.0 Consumption_7 0 0.0 0.0 Consumption_8 0 0.0 0.0 Consumption_9 0 0.0 0.0 Consumption_10 0 0.0 0.0 Consumption_11 0 0.0 0.0 Consumption_12 0 0.0 0.0 Consumption_13 0 0.0 0.0 Consumption_14 0 0.0 0.0 Consumption_15 0 0.0 0.0 Consumption_16 0 0.0 0.0 Consumption_17 0 0.0 0.0 Consumption_18 0 0.0 0.0 Consumption_19 0 0.0 0.0 Consumption_20 0 0.0 0.0 Consumption_21 0 0.0 0.0 Consumption_22 0 0.0 0.0 Investment_2 0 0.0 0.0 Investment_3 0 0.0 0.0 Investment_4 0 0.0 0.0 Investment_5 0 0.0 0.0 Investment_6 0 0.0 0.0 Investment_7 0 0.0 0.0 Investment_8 0 0.0 0.0 Investment_9 0 0.0 0.0 Investment_10 0 0.0 0.0 Investment_11 0 0.0 0.0 Investment_12 0 0.0 0.0 Investment_13 0 0.0 0.0 Investment_14 0 0.0 0.0 Investment_15 0 0.0 0.0 Investment_16 0 0.0 0.0 Investment_17 0 0.0 0.0 Investment_18 0 0.0 0.0 Investment_19 0 0.0 0.0 Investment_20 0 0.0 0.0 Investment_21 0 0.0 0.0 Investment_22 0 0.0 0.0 PrivateWages_2 1 45.6 44.9 PrivateWages_3 1 50.1 45.6 PrivateWages_4 1 57.2 50.1 PrivateWages_5 1 57.1 57.2 PrivateWages_6 1 61.0 57.1 PrivateWages_8 1 64.4 64.0 PrivateWages_9 1 64.5 64.4 PrivateWages_10 1 67.0 64.5 PrivateWages_11 1 61.2 67.0 PrivateWages_12 1 53.4 61.2 PrivateWages_13 1 44.3 53.4 PrivateWages_14 1 45.1 44.3 PrivateWages_15 1 49.7 45.1 PrivateWages_16 1 54.4 49.7 PrivateWages_17 1 62.7 54.4 PrivateWages_18 1 65.0 62.7 PrivateWages_19 1 60.9 65.0 PrivateWages_20 1 69.5 60.9 PrivateWages_21 1 75.7 69.5 PrivateWages_22 1 88.4 75.7 PrivateWages_trend Consumption_2 0 Consumption_3 0 Consumption_4 0 Consumption_5 0 Consumption_6 0 Consumption_7 0 Consumption_8 0 Consumption_9 0 Consumption_10 0 Consumption_11 0 Consumption_12 0 Consumption_13 0 Consumption_14 0 Consumption_15 0 Consumption_16 0 Consumption_17 0 Consumption_18 0 Consumption_19 0 Consumption_20 0 Consumption_21 0 Consumption_22 0 Investment_2 0 Investment_3 0 Investment_4 0 Investment_5 0 Investment_6 0 Investment_7 0 Investment_8 0 Investment_9 0 Investment_10 0 Investment_11 0 Investment_12 0 Investment_13 0 Investment_14 0 Investment_15 0 Investment_16 0 Investment_17 0 Investment_18 0 Investment_19 0 Investment_20 0 Investment_21 0 Investment_22 0 PrivateWages_2 -10 PrivateWages_3 -9 PrivateWages_4 -8 PrivateWages_5 -7 PrivateWages_6 -6 PrivateWages_8 -4 PrivateWages_9 -3 PrivateWages_10 -2 PrivateWages_11 -1 PrivateWages_12 0 PrivateWages_13 1 PrivateWages_14 2 PrivateWages_15 3 PrivateWages_16 4 PrivateWages_17 5 PrivateWages_18 6 PrivateWages_19 7 PrivateWages_20 8 PrivateWages_21 9 PrivateWages_22 10 > nobs [1] 62 > linearHypothesis Linear hypothesis test (Theil's F test) Hypothesis: Consumption_corpProf + Investment_capitalLag = 0 Model 1: restricted model Model 2: kleinModel Res.Df Df F Pr(>F) 1 51 2 50 1 0.8 0.37 Linear hypothesis test (F statistic of a Wald test) Hypothesis: Consumption_corpProf + Investment_capitalLag = 0 Model 1: restricted model Model 2: kleinModel Res.Df Df F Pr(>F) 1 51 2 50 1 0.72 0.4 Linear hypothesis test (Chi^2 statistic of a Wald test) Hypothesis: Consumption_corpProf + Investment_capitalLag = 0 Model 1: restricted model Model 2: kleinModel Res.Df Df Chisq Pr(>Chisq) 1 51 2 50 1 0.72 0.4 Linear hypothesis test (Theil's F test) Hypothesis: Consumption_corpProf + Investment_capitalLag = 0 Consumption_corpProfLag - PrivateWages_trend = 0 Model 1: restricted model Model 2: kleinModel Res.Df Df F Pr(>F) 1 52 2 50 2 0.42 0.66 Linear hypothesis test (F statistic of a Wald test) Hypothesis: Consumption_corpProf + Investment_capitalLag = 0 Consumption_corpProfLag - PrivateWages_trend = 0 Model 1: restricted model Model 2: kleinModel Res.Df Df F Pr(>F) 1 52 2 50 2 0.37 0.69 Linear hypothesis test (Chi^2 statistic of a Wald test) Hypothesis: Consumption_corpProf + Investment_capitalLag = 0 Consumption_corpProfLag - PrivateWages_trend = 0 Model 1: restricted model Model 2: kleinModel Res.Df Df Chisq Pr(>Chisq) 1 52 2 50 2 0.75 0.69 > logLik 'log Lik.' -71.9 (df=13) 'log Lik.' -77.1 (df=13) compare log likelihood value with single-equation OLS [1] "Mean relative difference: 0.000555" Estimating function Consumption_(Intercept) Consumption_corpProf Consumption_2 -0.32389 -4.016 Consumption_3 -1.25001 -21.125 Consumption_4 -1.56574 -28.810 Consumption_5 -0.49350 -9.574 Consumption_6 0.00761 0.153 Consumption_7 0.86910 17.034 Consumption_8 1.33848 26.502 Consumption_9 1.05498 22.260 Consumption_10 -0.58856 -12.772 Consumption_11 0.28231 4.404 Consumption_12 -0.22965 -2.618 Consumption_13 -0.32213 -2.255 Consumption_14 0.32228 3.610 Consumption_15 -0.05801 -0.714 Consumption_16 -0.03466 -0.485 Consumption_17 1.61650 28.450 Consumption_18 -0.43597 -7.542 Consumption_19 0.21005 3.214 Consumption_20 0.98920 18.795 Consumption_21 0.78508 16.565 Consumption_22 -2.17345 -51.076 Investment_2 0.00000 0.000 Investment_3 0.00000 0.000 Investment_4 0.00000 0.000 Investment_5 0.00000 0.000 Investment_6 0.00000 0.000 Investment_7 0.00000 0.000 Investment_8 0.00000 0.000 Investment_9 0.00000 0.000 Investment_10 0.00000 0.000 Investment_11 0.00000 0.000 Investment_12 0.00000 0.000 Investment_13 0.00000 0.000 Investment_14 0.00000 0.000 Investment_15 0.00000 0.000 Investment_16 0.00000 0.000 Investment_17 0.00000 0.000 Investment_18 0.00000 0.000 Investment_19 0.00000 0.000 Investment_20 0.00000 0.000 Investment_21 0.00000 0.000 Investment_22 0.00000 0.000 PrivateWages_2 0.00000 0.000 PrivateWages_3 0.00000 0.000 PrivateWages_4 0.00000 0.000 PrivateWages_5 0.00000 0.000 PrivateWages_6 0.00000 0.000 PrivateWages_8 0.00000 0.000 PrivateWages_9 0.00000 0.000 PrivateWages_10 0.00000 0.000 PrivateWages_11 0.00000 0.000 PrivateWages_12 0.00000 0.000 PrivateWages_13 0.00000 0.000 PrivateWages_14 0.00000 0.000 PrivateWages_15 0.00000 0.000 PrivateWages_16 0.00000 0.000 PrivateWages_17 0.00000 0.000 PrivateWages_18 0.00000 0.000 PrivateWages_19 0.00000 0.000 PrivateWages_20 0.00000 0.000 PrivateWages_21 0.00000 0.000 PrivateWages_22 0.00000 0.000 Consumption_corpProfLag Consumption_wages Consumption_2 -4.113 -9.134 Consumption_3 -15.500 -40.250 Consumption_4 -26.461 -57.932 Consumption_5 -9.080 -18.260 Consumption_6 0.148 0.294 Consumption_7 17.469 35.372 Consumption_8 26.234 55.547 Consumption_9 20.889 45.259 Consumption_10 -12.419 -26.662 Consumption_11 6.126 11.885 Consumption_12 -3.583 -9.025 Consumption_13 -3.672 -11.049 Consumption_14 2.256 10.990 Consumption_15 -0.650 -2.123 Consumption_16 -0.426 -1.362 Consumption_17 22.631 71.449 Consumption_18 -7.673 -20.796 Consumption_19 3.634 9.641 Consumption_20 15.135 48.867 Consumption_21 14.916 41.609 Consumption_22 -45.860 -134.319 Investment_2 0.000 0.000 Investment_3 0.000 0.000 Investment_4 0.000 0.000 Investment_5 0.000 0.000 Investment_6 0.000 0.000 Investment_7 0.000 0.000 Investment_8 0.000 0.000 Investment_9 0.000 0.000 Investment_10 0.000 0.000 Investment_11 0.000 0.000 Investment_12 0.000 0.000 Investment_13 0.000 0.000 Investment_14 0.000 0.000 Investment_15 0.000 0.000 Investment_16 0.000 0.000 Investment_17 0.000 0.000 Investment_18 0.000 0.000 Investment_19 0.000 0.000 Investment_20 0.000 0.000 Investment_21 0.000 0.000 Investment_22 0.000 0.000 PrivateWages_2 0.000 0.000 PrivateWages_3 0.000 0.000 PrivateWages_4 0.000 0.000 PrivateWages_5 0.000 0.000 PrivateWages_6 0.000 0.000 PrivateWages_8 0.000 0.000 PrivateWages_9 0.000 0.000 PrivateWages_10 0.000 0.000 PrivateWages_11 0.000 0.000 PrivateWages_12 0.000 0.000 PrivateWages_13 0.000 0.000 PrivateWages_14 0.000 0.000 PrivateWages_15 0.000 0.000 PrivateWages_16 0.000 0.000 PrivateWages_17 0.000 0.000 PrivateWages_18 0.000 0.000 PrivateWages_19 0.000 0.000 PrivateWages_20 0.000 0.000 PrivateWages_21 0.000 0.000 PrivateWages_22 0.000 0.000 Investment_(Intercept) Investment_corpProf Consumption_2 0.0000 0.000 Consumption_3 0.0000 0.000 Consumption_4 0.0000 0.000 Consumption_5 0.0000 0.000 Consumption_6 0.0000 0.000 Consumption_7 0.0000 0.000 Consumption_8 0.0000 0.000 Consumption_9 0.0000 0.000 Consumption_10 0.0000 0.000 Consumption_11 0.0000 0.000 Consumption_12 0.0000 0.000 Consumption_13 0.0000 0.000 Consumption_14 0.0000 0.000 Consumption_15 0.0000 0.000 Consumption_16 0.0000 0.000 Consumption_17 0.0000 0.000 Consumption_18 0.0000 0.000 Consumption_19 0.0000 0.000 Consumption_20 0.0000 0.000 Consumption_21 0.0000 0.000 Consumption_22 0.0000 0.000 Investment_2 -0.0668 -0.828 Investment_3 -0.0476 -0.804 Investment_4 1.2467 22.939 Investment_5 -1.3512 -26.213 Investment_6 0.4154 8.350 Investment_7 1.4923 29.248 Investment_8 0.7889 15.620 Investment_9 -0.6317 -13.329 Investment_10 1.0830 23.500 Investment_11 0.2791 4.353 Investment_12 0.0369 0.420 Investment_13 0.3659 2.561 Investment_14 0.2237 2.505 Investment_15 -0.1728 -2.126 Investment_16 0.0101 0.141 Investment_17 0.9719 17.105 Investment_18 0.0516 0.893 Investment_19 -2.5656 -39.254 Investment_20 -0.6866 -13.045 Investment_21 -0.7807 -16.474 Investment_22 -0.6623 -15.565 PrivateWages_2 0.0000 0.000 PrivateWages_3 0.0000 0.000 PrivateWages_4 0.0000 0.000 PrivateWages_5 0.0000 0.000 PrivateWages_6 0.0000 0.000 PrivateWages_8 0.0000 0.000 PrivateWages_9 0.0000 0.000 PrivateWages_10 0.0000 0.000 PrivateWages_11 0.0000 0.000 PrivateWages_12 0.0000 0.000 PrivateWages_13 0.0000 0.000 PrivateWages_14 0.0000 0.000 PrivateWages_15 0.0000 0.000 PrivateWages_16 0.0000 0.000 PrivateWages_17 0.0000 0.000 PrivateWages_18 0.0000 0.000 PrivateWages_19 0.0000 0.000 PrivateWages_20 0.0000 0.000 PrivateWages_21 0.0000 0.000 PrivateWages_22 0.0000 0.000 Investment_corpProfLag Investment_capitalLag Consumption_2 0.000 0.00 Consumption_3 0.000 0.00 Consumption_4 0.000 0.00 Consumption_5 0.000 0.00 Consumption_6 0.000 0.00 Consumption_7 0.000 0.00 Consumption_8 0.000 0.00 Consumption_9 0.000 0.00 Consumption_10 0.000 0.00 Consumption_11 0.000 0.00 Consumption_12 0.000 0.00 Consumption_13 0.000 0.00 Consumption_14 0.000 0.00 Consumption_15 0.000 0.00 Consumption_16 0.000 0.00 Consumption_17 0.000 0.00 Consumption_18 0.000 0.00 Consumption_19 0.000 0.00 Consumption_20 0.000 0.00 Consumption_21 0.000 0.00 Consumption_22 0.000 0.00 Investment_2 -0.848 -12.21 Investment_3 -0.590 -8.69 Investment_4 21.069 230.01 Investment_5 -24.862 -256.32 Investment_6 8.059 80.05 Investment_7 29.994 295.17 Investment_8 15.463 160.46 Investment_9 -12.507 -131.14 Investment_10 22.850 228.07 Investment_11 6.056 60.20 Investment_12 0.575 7.99 Investment_13 4.172 78.05 Investment_14 1.566 46.33 Investment_15 -1.936 -34.91 Investment_16 0.124 2.01 Investment_17 13.606 192.14 Investment_18 0.908 10.31 Investment_19 -44.385 -517.74 Investment_20 -10.505 -137.25 Investment_21 -14.834 -157.09 Investment_22 -13.975 -135.45 PrivateWages_2 0.000 0.00 PrivateWages_3 0.000 0.00 PrivateWages_4 0.000 0.00 PrivateWages_5 0.000 0.00 PrivateWages_6 0.000 0.00 PrivateWages_8 0.000 0.00 PrivateWages_9 0.000 0.00 PrivateWages_10 0.000 0.00 PrivateWages_11 0.000 0.00 PrivateWages_12 0.000 0.00 PrivateWages_13 0.000 0.00 PrivateWages_14 0.000 0.00 PrivateWages_15 0.000 0.00 PrivateWages_16 0.000 0.00 PrivateWages_17 0.000 0.00 PrivateWages_18 0.000 0.00 PrivateWages_19 0.000 0.00 PrivateWages_20 0.000 0.00 PrivateWages_21 0.000 0.00 PrivateWages_22 0.000 0.00 PrivateWages_(Intercept) PrivateWages_gnp PrivateWages_gnpLag Consumption_2 0.0000 0.00 0.00 Consumption_3 0.0000 0.00 0.00 Consumption_4 0.0000 0.00 0.00 Consumption_5 0.0000 0.00 0.00 Consumption_6 0.0000 0.00 0.00 Consumption_7 0.0000 0.00 0.00 Consumption_8 0.0000 0.00 0.00 Consumption_9 0.0000 0.00 0.00 Consumption_10 0.0000 0.00 0.00 Consumption_11 0.0000 0.00 0.00 Consumption_12 0.0000 0.00 0.00 Consumption_13 0.0000 0.00 0.00 Consumption_14 0.0000 0.00 0.00 Consumption_15 0.0000 0.00 0.00 Consumption_16 0.0000 0.00 0.00 Consumption_17 0.0000 0.00 0.00 Consumption_18 0.0000 0.00 0.00 Consumption_19 0.0000 0.00 0.00 Consumption_20 0.0000 0.00 0.00 Consumption_21 0.0000 0.00 0.00 Consumption_22 0.0000 0.00 0.00 Investment_2 0.0000 0.00 0.00 Investment_3 0.0000 0.00 0.00 Investment_4 0.0000 0.00 0.00 Investment_5 0.0000 0.00 0.00 Investment_6 0.0000 0.00 0.00 Investment_7 0.0000 0.00 0.00 Investment_8 0.0000 0.00 0.00 Investment_9 0.0000 0.00 0.00 Investment_10 0.0000 0.00 0.00 Investment_11 0.0000 0.00 0.00 Investment_12 0.0000 0.00 0.00 Investment_13 0.0000 0.00 0.00 Investment_14 0.0000 0.00 0.00 Investment_15 0.0000 0.00 0.00 Investment_16 0.0000 0.00 0.00 Investment_17 0.0000 0.00 0.00 Investment_18 0.0000 0.00 0.00 Investment_19 0.0000 0.00 0.00 Investment_20 0.0000 0.00 0.00 Investment_21 0.0000 0.00 0.00 Investment_22 0.0000 0.00 0.00 PrivateWages_2 -1.3389 -61.06 -60.12 PrivateWages_3 0.2462 12.33 11.23 PrivateWages_4 1.1255 64.38 56.39 PrivateWages_5 -0.1959 -11.18 -11.20 PrivateWages_6 -0.5284 -32.23 -30.17 PrivateWages_8 -0.7909 -50.94 -50.62 PrivateWages_9 0.2819 18.18 18.15 PrivateWages_10 1.1384 76.28 73.43 PrivateWages_11 -0.1904 -11.65 -12.76 PrivateWages_12 0.5813 31.04 35.58 PrivateWages_13 0.1206 5.34 6.44 PrivateWages_14 0.4773 21.53 21.14 PrivateWages_15 0.3035 15.09 13.69 PrivateWages_16 0.0284 1.55 1.41 PrivateWages_17 -0.8517 -53.40 -46.33 PrivateWages_18 0.9908 64.40 62.12 PrivateWages_19 -0.4597 -28.00 -29.88 PrivateWages_20 -0.3819 -26.54 -23.26 PrivateWages_21 -1.1062 -83.74 -76.88 PrivateWages_22 0.5501 48.63 41.64 PrivateWages_trend Consumption_2 0.000 Consumption_3 0.000 Consumption_4 0.000 Consumption_5 0.000 Consumption_6 0.000 Consumption_7 0.000 Consumption_8 0.000 Consumption_9 0.000 Consumption_10 0.000 Consumption_11 0.000 Consumption_12 0.000 Consumption_13 0.000 Consumption_14 0.000 Consumption_15 0.000 Consumption_16 0.000 Consumption_17 0.000 Consumption_18 0.000 Consumption_19 0.000 Consumption_20 0.000 Consumption_21 0.000 Consumption_22 0.000 Investment_2 0.000 Investment_3 0.000 Investment_4 0.000 Investment_5 0.000 Investment_6 0.000 Investment_7 0.000 Investment_8 0.000 Investment_9 0.000 Investment_10 0.000 Investment_11 0.000 Investment_12 0.000 Investment_13 0.000 Investment_14 0.000 Investment_15 0.000 Investment_16 0.000 Investment_17 0.000 Investment_18 0.000 Investment_19 0.000 Investment_20 0.000 Investment_21 0.000 Investment_22 0.000 PrivateWages_2 13.389 PrivateWages_3 -2.216 PrivateWages_4 -9.004 PrivateWages_5 1.371 PrivateWages_6 3.170 PrivateWages_8 3.164 PrivateWages_9 -0.846 PrivateWages_10 -2.277 PrivateWages_11 0.190 PrivateWages_12 0.000 PrivateWages_13 0.121 PrivateWages_14 0.955 PrivateWages_15 0.911 PrivateWages_16 0.114 PrivateWages_17 -4.258 PrivateWages_18 5.945 PrivateWages_19 -3.218 PrivateWages_20 -3.055 PrivateWages_21 -9.956 PrivateWages_22 5.501 [1] TRUE > Bread Consumption_(Intercept) Consumption_corpProf Consumption_(Intercept) 100.0401 0.0296 Consumption_corpProf 0.0296 0.4904 Consumption_corpProfLag -1.0438 -0.3107 Consumption_wages -1.9405 -0.0777 Investment_(Intercept) 0.0000 0.0000 Investment_corpProf 0.0000 0.0000 Investment_corpProfLag 0.0000 0.0000 Investment_capitalLag 0.0000 0.0000 PrivateWages_(Intercept) 0.0000 0.0000 PrivateWages_gnp 0.0000 0.0000 PrivateWages_gnpLag 0.0000 0.0000 PrivateWages_trend 0.0000 0.0000 Consumption_corpProfLag Consumption_wages Consumption_(Intercept) -1.0438 -1.9405 Consumption_corpProf -0.3107 -0.0777 Consumption_corpProfLag 0.4844 -0.0396 Consumption_wages -0.0396 0.0941 Investment_(Intercept) 0.0000 0.0000 Investment_corpProf 0.0000 0.0000 Investment_corpProfLag 0.0000 0.0000 Investment_capitalLag 0.0000 0.0000 PrivateWages_(Intercept) 0.0000 0.0000 PrivateWages_gnp 0.0000 0.0000 PrivateWages_gnpLag 0.0000 0.0000 PrivateWages_trend 0.0000 0.0000 Investment_(Intercept) Investment_corpProf Consumption_(Intercept) 0.00 0.0000 Consumption_corpProf 0.00 0.0000 Consumption_corpProfLag 0.00 0.0000 Consumption_wages 0.00 0.0000 Investment_(Intercept) 1817.57 -17.6857 Investment_corpProf -17.69 0.5738 Investment_corpProfLag 14.44 -0.4928 Investment_capitalLag -8.74 0.0801 PrivateWages_(Intercept) 0.00 0.0000 PrivateWages_gnp 0.00 0.0000 PrivateWages_gnpLag 0.00 0.0000 PrivateWages_trend 0.00 0.0000 Investment_corpProfLag Investment_capitalLag Consumption_(Intercept) 0.0000 0.0000 Consumption_corpProf 0.0000 0.0000 Consumption_corpProfLag 0.0000 0.0000 Consumption_wages 0.0000 0.0000 Investment_(Intercept) 14.4412 -8.7403 Investment_corpProf -0.4928 0.0801 Investment_corpProfLag 0.6190 -0.0811 Investment_capitalLag -0.0811 0.0435 PrivateWages_(Intercept) 0.0000 0.0000 PrivateWages_gnp 0.0000 0.0000 PrivateWages_gnpLag 0.0000 0.0000 PrivateWages_trend 0.0000 0.0000 PrivateWages_(Intercept) PrivateWages_gnp Consumption_(Intercept) 0.000 0.000 Consumption_corpProf 0.000 0.000 Consumption_corpProfLag 0.000 0.000 Consumption_wages 0.000 0.000 Investment_(Intercept) 0.000 0.000 Investment_corpProf 0.000 0.000 Investment_corpProfLag 0.000 0.000 Investment_capitalLag 0.000 0.000 PrivateWages_(Intercept) 174.627 -0.658 PrivateWages_gnp -0.658 0.112 PrivateWages_gnpLag -2.295 -0.104 PrivateWages_trend 2.155 -0.030 PrivateWages_gnpLag PrivateWages_trend Consumption_(Intercept) 0.00000 0.00000 Consumption_corpProf 0.00000 0.00000 Consumption_corpProfLag 0.00000 0.00000 Consumption_wages 0.00000 0.00000 Investment_(Intercept) 0.00000 0.00000 Investment_corpProf 0.00000 0.00000 Investment_corpProfLag 0.00000 0.00000 Investment_capitalLag 0.00000 0.00000 PrivateWages_(Intercept) -2.29451 2.15506 PrivateWages_gnp -0.10426 -0.03004 PrivateWages_gnpLag 0.14761 -0.00667 PrivateWages_trend -0.00667 0.11527 > > # 2SLS > summary systemfit results method: 2SLS N DF SSR detRCov OLS-R2 McElroy-R2 system 60 48 53.4 0.274 0.973 0.992 N DF SSR MSE RMSE R2 Adj R2 Consumption 20 16 20.67 1.292 1.14 0.978 0.974 Investment 20 16 23.02 1.438 1.20 0.901 0.883 PrivateWages 20 16 9.74 0.609 0.78 0.988 0.985 The covariance matrix of the residuals Consumption Investment PrivateWages Consumption 1.034 0.309 -0.383 Investment 0.309 1.151 0.202 PrivateWages -0.383 0.202 0.487 The correlations of the residuals Consumption Investment PrivateWages Consumption 1.000 0.284 -0.540 Investment 0.284 1.000 0.269 PrivateWages -0.540 0.269 1.000 2SLS estimates for 'Consumption' (equation 1) Model Formula: consump ~ corpProf + corpProfLag + wages Instruments: ~govExp + taxes + govWage + trend + capitalLag + corpProfLag + gnpLag Estimate Std. Error t value Pr(>|t|) (Intercept) 16.5093 1.3121 12.58 1.0e-09 *** corpProf 0.0219 0.1159 0.19 0.85 corpProfLag 0.1931 0.1071 1.80 0.09 . wages 0.8174 0.0408 20.05 9.2e-13 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.137 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 20.671 MSE: 1.292 Root MSE: 1.137 Multiple R-Squared: 0.978 Adjusted R-Squared: 0.974 2SLS estimates for 'Investment' (equation 2) Model Formula: invest ~ corpProf + corpProfLag + capitalLag Instruments: ~govExp + taxes + govWage + trend + capitalLag + corpProfLag + gnpLag Estimate Std. Error t value Pr(>|t|) (Intercept) 17.843 6.850 2.60 0.01915 * corpProf 0.217 0.155 1.40 0.18106 corpProfLag 0.542 0.148 3.65 0.00216 ** capitalLag -0.145 0.033 -4.41 0.00044 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.199 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 23.016 MSE: 1.438 Root MSE: 1.199 Multiple R-Squared: 0.901 Adjusted R-Squared: 0.883 2SLS estimates for 'PrivateWages' (equation 3) Model Formula: privWage ~ gnp + gnpLag + trend Instruments: ~govExp + taxes + govWage + trend + capitalLag + corpProfLag + gnpLag Estimate Std. Error t value Pr(>|t|) (Intercept) 1.3431 1.1772 1.14 0.27070 gnp 0.4438 0.0358 12.39 1.3e-09 *** gnpLag 0.1447 0.0389 3.72 0.00185 ** trend 0.1238 0.0306 4.05 0.00093 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 0.78 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 9.741 MSE: 0.609 Root MSE: 0.78 Multiple R-Squared: 0.988 Adjusted R-Squared: 0.985 > residuals Consumption Investment PrivateWages 1 NA NA NA 2 -0.383 -1.0104 -1.3401 3 -0.593 0.2478 0.2378 4 -1.219 1.0621 1.1117 5 -0.130 -1.4104 -0.1954 6 0.354 0.4328 -0.5355 7 NA NA NA 8 1.551 1.0463 -0.7908 9 1.440 0.0674 0.2831 10 -0.286 1.7698 1.1353 11 -0.453 -0.5912 -0.1765 12 -0.994 -0.6318 0.6007 13 -1.300 -0.6983 0.1443 14 0.521 0.9724 0.4826 15 -0.157 -0.1827 0.3016 16 -0.014 0.1167 0.0261 17 1.974 1.6266 -0.8614 18 -0.576 -0.0525 0.9927 19 -0.203 -3.0656 -0.4446 20 1.342 0.1393 -0.3914 21 1.039 -0.1305 -1.1115 22 -1.912 0.2922 0.5312 > fitted Consumption Investment PrivateWages 1 NA NA NA 2 42.3 0.810 26.8 3 45.6 1.652 29.1 4 50.4 4.138 33.0 5 50.7 4.410 34.1 6 52.2 4.667 35.9 7 NA NA NA 8 54.6 3.154 38.7 9 55.9 2.933 38.9 10 58.1 3.330 40.2 11 55.5 1.591 38.1 12 51.9 -2.768 33.9 13 46.9 -5.502 28.9 14 46.0 -6.072 28.0 15 48.9 -2.817 30.3 16 51.3 -1.417 33.2 17 55.7 0.473 37.7 18 59.3 2.053 40.0 19 57.7 1.166 38.6 20 60.3 1.161 42.0 21 64.0 3.431 46.1 22 71.6 4.608 52.8 > predict Consumption.pred Consumption.se.fit Consumption.lwr Consumption.upr 1 NA NA NA NA 2 42.3 0.473 41.3 43.3 3 45.6 0.573 44.4 46.8 4 50.4 0.366 49.6 51.2 5 50.7 0.423 49.8 51.6 6 52.2 0.426 51.3 53.1 7 NA NA NA NA 8 54.6 0.347 53.9 55.4 9 55.9 0.384 55.0 56.7 10 58.1 0.395 57.2 58.9 11 55.5 0.729 53.9 57.0 12 51.9 0.594 50.6 53.2 13 46.9 0.752 45.3 48.5 14 46.0 0.616 44.7 47.3 15 48.9 0.373 48.1 49.6 16 51.3 0.331 50.6 52.0 17 55.7 0.403 54.9 56.6 18 59.3 0.326 58.6 60.0 19 57.7 0.411 56.8 58.6 20 60.3 0.472 59.3 61.3 21 64.0 0.443 63.0 64.9 22 71.6 0.683 70.2 73.1 Investment.pred Investment.se.fit Investment.lwr Investment.upr 1 NA NA NA NA 2 0.810 0.786 -0.8569 2.48 3 1.652 0.541 0.5056 2.80 4 4.138 0.511 3.0552 5.22 5 4.410 0.421 3.5172 5.30 6 4.667 0.395 3.8294 5.51 7 NA NA NA NA 8 3.154 0.327 2.4602 3.85 9 2.933 0.489 1.8967 3.97 10 3.330 0.537 2.1915 4.47 11 1.591 0.786 -0.0748 3.26 12 -2.768 0.615 -4.0716 -1.46 13 -5.502 0.787 -7.1696 -3.83 14 -6.072 0.842 -7.8568 -4.29 15 -2.817 0.397 -3.6591 -1.98 16 -1.417 0.343 -2.1436 -0.69 17 0.473 0.457 -0.4954 1.44 18 2.053 0.286 1.4471 2.66 19 1.166 0.430 0.2549 2.08 20 1.161 0.515 0.0698 2.25 21 3.431 0.426 2.5282 4.33 22 4.608 0.606 3.3223 5.89 PrivateWages.pred PrivateWages.se.fit PrivateWages.lwr PrivateWages.upr 1 NA NA NA NA 2 26.8 0.328 26.1 27.5 3 29.1 0.340 28.3 29.8 4 33.0 0.360 32.2 33.8 5 34.1 0.258 33.5 34.6 6 35.9 0.266 35.4 36.5 7 NA NA NA NA 8 38.7 0.262 38.1 39.2 9 38.9 0.250 38.4 39.4 10 40.2 0.240 39.7 40.7 11 38.1 0.355 37.3 38.8 12 33.9 0.382 33.1 34.7 13 28.9 0.456 27.9 29.8 14 28.0 0.348 27.3 28.8 15 30.3 0.339 29.6 31.0 16 33.2 0.284 32.6 33.8 17 37.7 0.293 37.0 38.3 18 40.0 0.218 39.5 40.5 19 38.6 0.358 37.9 39.4 20 42.0 0.307 41.3 42.6 21 46.1 0.310 45.5 46.8 22 52.8 0.496 51.7 53.8 > model.frame consump corpProf corpProfLag wages invest capitalLag privWage gnp gnpLag 1 39.8 12.7 NA 31.0 2.7 180 28.8 44.9 NA 2 41.9 12.4 12.7 28.2 -0.2 183 25.5 45.6 44.9 3 45.0 16.9 12.4 32.2 1.9 183 29.3 50.1 45.6 4 49.2 18.4 16.9 37.0 5.2 184 34.1 57.2 50.1 5 50.6 19.4 18.4 37.0 3.0 190 33.9 57.1 57.2 6 52.6 20.1 19.4 38.6 5.1 193 35.4 61.0 57.1 7 55.1 19.6 20.1 40.7 5.6 198 37.4 64.0 NA 8 56.2 19.8 19.6 41.5 4.2 203 37.9 64.4 64.0 9 57.3 21.1 19.8 42.9 3.0 208 39.2 64.5 64.4 10 57.8 21.7 21.1 45.3 5.1 211 41.3 67.0 64.5 11 55.0 15.6 21.7 42.1 1.0 216 37.9 61.2 67.0 12 50.9 11.4 15.6 39.3 -3.4 217 34.5 53.4 61.2 13 45.6 7.0 11.4 34.3 -6.2 213 29.0 44.3 53.4 14 46.5 11.2 7.0 34.1 -5.1 207 28.5 45.1 44.3 15 48.7 12.3 11.2 36.6 -3.0 202 30.6 49.7 45.1 16 51.3 14.0 12.3 39.3 -1.3 199 33.2 54.4 49.7 17 57.7 17.6 14.0 44.2 2.1 198 36.8 62.7 54.4 18 58.7 17.3 17.6 47.7 2.0 200 41.0 65.0 62.7 19 57.5 15.3 17.3 45.9 -1.9 202 38.2 60.9 65.0 20 61.6 19.0 15.3 49.4 1.3 200 41.6 69.5 60.9 21 65.0 21.1 19.0 53.0 3.3 201 45.0 75.7 69.5 22 69.7 23.5 21.1 61.8 4.9 204 53.3 88.4 75.7 trend 1 -11 2 -10 3 -9 4 -8 5 -7 6 -6 7 -5 8 -4 9 -3 10 -2 11 -1 12 0 13 1 14 2 15 3 16 4 17 5 18 6 19 7 20 8 21 9 22 10 > Frames of instrumental variables govExp taxes govWage trend capitalLag corpProfLag gnpLag 1 2.4 3.4 2.2 -11 180 NA NA 2 3.9 7.7 2.7 -10 183 12.7 44.9 3 3.2 3.9 2.9 -9 183 12.4 45.6 4 2.8 4.7 2.9 -8 184 16.9 50.1 5 3.5 3.8 3.1 -7 190 18.4 57.2 6 3.3 5.5 3.2 -6 193 19.4 57.1 7 3.3 7.0 3.3 -5 198 20.1 NA 8 4.0 6.7 3.6 -4 203 19.6 64.0 9 4.2 4.2 3.7 -3 208 19.8 64.4 10 4.1 4.0 4.0 -2 211 21.1 64.5 11 5.2 7.7 4.2 -1 216 21.7 67.0 12 5.9 7.5 4.8 0 217 15.6 61.2 13 4.9 8.3 5.3 1 213 11.4 53.4 14 3.7 5.4 5.6 2 207 7.0 44.3 15 4.0 6.8 6.0 3 202 11.2 45.1 16 4.4 7.2 6.1 4 199 12.3 49.7 17 2.9 8.3 7.4 5 198 14.0 54.4 18 4.3 6.7 6.7 6 200 17.6 62.7 19 5.3 7.4 7.7 7 202 17.3 65.0 20 6.6 8.9 7.8 8 200 15.3 60.9 21 7.4 9.6 8.0 9 201 19.0 69.5 22 13.8 11.6 8.5 10 204 21.1 75.7 govExp taxes govWage trend capitalLag corpProfLag gnpLag 1 2.4 3.4 2.2 -11 180 NA NA 2 3.9 7.7 2.7 -10 183 12.7 44.9 3 3.2 3.9 2.9 -9 183 12.4 45.6 4 2.8 4.7 2.9 -8 184 16.9 50.1 5 3.5 3.8 3.1 -7 190 18.4 57.2 6 3.3 5.5 3.2 -6 193 19.4 57.1 7 3.3 7.0 3.3 -5 198 20.1 NA 8 4.0 6.7 3.6 -4 203 19.6 64.0 9 4.2 4.2 3.7 -3 208 19.8 64.4 10 4.1 4.0 4.0 -2 211 21.1 64.5 11 5.2 7.7 4.2 -1 216 21.7 67.0 12 5.9 7.5 4.8 0 217 15.6 61.2 13 4.9 8.3 5.3 1 213 11.4 53.4 14 3.7 5.4 5.6 2 207 7.0 44.3 15 4.0 6.8 6.0 3 202 11.2 45.1 16 4.4 7.2 6.1 4 199 12.3 49.7 17 2.9 8.3 7.4 5 198 14.0 54.4 18 4.3 6.7 6.7 6 200 17.6 62.7 19 5.3 7.4 7.7 7 202 17.3 65.0 20 6.6 8.9 7.8 8 200 15.3 60.9 21 7.4 9.6 8.0 9 201 19.0 69.5 22 13.8 11.6 8.5 10 204 21.1 75.7 govExp taxes govWage trend capitalLag corpProfLag gnpLag 1 2.4 3.4 2.2 -11 180 NA NA 2 3.9 7.7 2.7 -10 183 12.7 44.9 3 3.2 3.9 2.9 -9 183 12.4 45.6 4 2.8 4.7 2.9 -8 184 16.9 50.1 5 3.5 3.8 3.1 -7 190 18.4 57.2 6 3.3 5.5 3.2 -6 193 19.4 57.1 7 3.3 7.0 3.3 -5 198 20.1 NA 8 4.0 6.7 3.6 -4 203 19.6 64.0 9 4.2 4.2 3.7 -3 208 19.8 64.4 10 4.1 4.0 4.0 -2 211 21.1 64.5 11 5.2 7.7 4.2 -1 216 21.7 67.0 12 5.9 7.5 4.8 0 217 15.6 61.2 13 4.9 8.3 5.3 1 213 11.4 53.4 14 3.7 5.4 5.6 2 207 7.0 44.3 15 4.0 6.8 6.0 3 202 11.2 45.1 16 4.4 7.2 6.1 4 199 12.3 49.7 17 2.9 8.3 7.4 5 198 14.0 54.4 18 4.3 6.7 6.7 6 200 17.6 62.7 19 5.3 7.4 7.7 7 202 17.3 65.0 20 6.6 8.9 7.8 8 200 15.3 60.9 21 7.4 9.6 8.0 9 201 19.0 69.5 22 13.8 11.6 8.5 10 204 21.1 75.7 > model.matrix [1] "Attributes: < Component \"dim\": Mean relative difference: 0.0323 >" [2] "Attributes: < Component \"dimnames\": Component 1: 55 string mismatches >" [3] "Numeric: lengths (744, 720) differ" > matrix of instrumental variables Consumption_(Intercept) Consumption_govExp Consumption_taxes Consumption_2 1 3.9 7.7 Consumption_3 1 3.2 3.9 Consumption_4 1 2.8 4.7 Consumption_5 1 3.5 3.8 Consumption_6 1 3.3 5.5 Consumption_8 1 4.0 6.7 Consumption_9 1 4.2 4.2 Consumption_10 1 4.1 4.0 Consumption_11 1 5.2 7.7 Consumption_12 1 5.9 7.5 Consumption_13 1 4.9 8.3 Consumption_14 1 3.7 5.4 Consumption_15 1 4.0 6.8 Consumption_16 1 4.4 7.2 Consumption_17 1 2.9 8.3 Consumption_18 1 4.3 6.7 Consumption_19 1 5.3 7.4 Consumption_20 1 6.6 8.9 Consumption_21 1 7.4 9.6 Consumption_22 1 13.8 11.6 Investment_2 0 0.0 0.0 Investment_3 0 0.0 0.0 Investment_4 0 0.0 0.0 Investment_5 0 0.0 0.0 Investment_6 0 0.0 0.0 Investment_8 0 0.0 0.0 Investment_9 0 0.0 0.0 Investment_10 0 0.0 0.0 Investment_11 0 0.0 0.0 Investment_12 0 0.0 0.0 Investment_13 0 0.0 0.0 Investment_14 0 0.0 0.0 Investment_15 0 0.0 0.0 Investment_16 0 0.0 0.0 Investment_17 0 0.0 0.0 Investment_18 0 0.0 0.0 Investment_19 0 0.0 0.0 Investment_20 0 0.0 0.0 Investment_21 0 0.0 0.0 Investment_22 0 0.0 0.0 PrivateWages_2 0 0.0 0.0 PrivateWages_3 0 0.0 0.0 PrivateWages_4 0 0.0 0.0 PrivateWages_5 0 0.0 0.0 PrivateWages_6 0 0.0 0.0 PrivateWages_8 0 0.0 0.0 PrivateWages_9 0 0.0 0.0 PrivateWages_10 0 0.0 0.0 PrivateWages_11 0 0.0 0.0 PrivateWages_12 0 0.0 0.0 PrivateWages_13 0 0.0 0.0 PrivateWages_14 0 0.0 0.0 PrivateWages_15 0 0.0 0.0 PrivateWages_16 0 0.0 0.0 PrivateWages_17 0 0.0 0.0 PrivateWages_18 0 0.0 0.0 PrivateWages_19 0 0.0 0.0 PrivateWages_20 0 0.0 0.0 PrivateWages_21 0 0.0 0.0 PrivateWages_22 0 0.0 0.0 Consumption_govWage Consumption_trend Consumption_capitalLag Consumption_2 2.7 -10 183 Consumption_3 2.9 -9 183 Consumption_4 2.9 -8 184 Consumption_5 3.1 -7 190 Consumption_6 3.2 -6 193 Consumption_8 3.6 -4 203 Consumption_9 3.7 -3 208 Consumption_10 4.0 -2 211 Consumption_11 4.2 -1 216 Consumption_12 4.8 0 217 Consumption_13 5.3 1 213 Consumption_14 5.6 2 207 Consumption_15 6.0 3 202 Consumption_16 6.1 4 199 Consumption_17 7.4 5 198 Consumption_18 6.7 6 200 Consumption_19 7.7 7 202 Consumption_20 7.8 8 200 Consumption_21 8.0 9 201 Consumption_22 8.5 10 204 Investment_2 0.0 0 0 Investment_3 0.0 0 0 Investment_4 0.0 0 0 Investment_5 0.0 0 0 Investment_6 0.0 0 0 Investment_8 0.0 0 0 Investment_9 0.0 0 0 Investment_10 0.0 0 0 Investment_11 0.0 0 0 Investment_12 0.0 0 0 Investment_13 0.0 0 0 Investment_14 0.0 0 0 Investment_15 0.0 0 0 Investment_16 0.0 0 0 Investment_17 0.0 0 0 Investment_18 0.0 0 0 Investment_19 0.0 0 0 Investment_20 0.0 0 0 Investment_21 0.0 0 0 Investment_22 0.0 0 0 PrivateWages_2 0.0 0 0 PrivateWages_3 0.0 0 0 PrivateWages_4 0.0 0 0 PrivateWages_5 0.0 0 0 PrivateWages_6 0.0 0 0 PrivateWages_8 0.0 0 0 PrivateWages_9 0.0 0 0 PrivateWages_10 0.0 0 0 PrivateWages_11 0.0 0 0 PrivateWages_12 0.0 0 0 PrivateWages_13 0.0 0 0 PrivateWages_14 0.0 0 0 PrivateWages_15 0.0 0 0 PrivateWages_16 0.0 0 0 PrivateWages_17 0.0 0 0 PrivateWages_18 0.0 0 0 PrivateWages_19 0.0 0 0 PrivateWages_20 0.0 0 0 PrivateWages_21 0.0 0 0 PrivateWages_22 0.0 0 0 Consumption_corpProfLag Consumption_gnpLag Consumption_2 12.7 44.9 Consumption_3 12.4 45.6 Consumption_4 16.9 50.1 Consumption_5 18.4 57.2 Consumption_6 19.4 57.1 Consumption_8 19.6 64.0 Consumption_9 19.8 64.4 Consumption_10 21.1 64.5 Consumption_11 21.7 67.0 Consumption_12 15.6 61.2 Consumption_13 11.4 53.4 Consumption_14 7.0 44.3 Consumption_15 11.2 45.1 Consumption_16 12.3 49.7 Consumption_17 14.0 54.4 Consumption_18 17.6 62.7 Consumption_19 17.3 65.0 Consumption_20 15.3 60.9 Consumption_21 19.0 69.5 Consumption_22 21.1 75.7 Investment_2 0.0 0.0 Investment_3 0.0 0.0 Investment_4 0.0 0.0 Investment_5 0.0 0.0 Investment_6 0.0 0.0 Investment_8 0.0 0.0 Investment_9 0.0 0.0 Investment_10 0.0 0.0 Investment_11 0.0 0.0 Investment_12 0.0 0.0 Investment_13 0.0 0.0 Investment_14 0.0 0.0 Investment_15 0.0 0.0 Investment_16 0.0 0.0 Investment_17 0.0 0.0 Investment_18 0.0 0.0 Investment_19 0.0 0.0 Investment_20 0.0 0.0 Investment_21 0.0 0.0 Investment_22 0.0 0.0 PrivateWages_2 0.0 0.0 PrivateWages_3 0.0 0.0 PrivateWages_4 0.0 0.0 PrivateWages_5 0.0 0.0 PrivateWages_6 0.0 0.0 PrivateWages_8 0.0 0.0 PrivateWages_9 0.0 0.0 PrivateWages_10 0.0 0.0 PrivateWages_11 0.0 0.0 PrivateWages_12 0.0 0.0 PrivateWages_13 0.0 0.0 PrivateWages_14 0.0 0.0 PrivateWages_15 0.0 0.0 PrivateWages_16 0.0 0.0 PrivateWages_17 0.0 0.0 PrivateWages_18 0.0 0.0 PrivateWages_19 0.0 0.0 PrivateWages_20 0.0 0.0 PrivateWages_21 0.0 0.0 PrivateWages_22 0.0 0.0 Investment_(Intercept) Investment_govExp Investment_taxes Consumption_2 0 0.0 0.0 Consumption_3 0 0.0 0.0 Consumption_4 0 0.0 0.0 Consumption_5 0 0.0 0.0 Consumption_6 0 0.0 0.0 Consumption_8 0 0.0 0.0 Consumption_9 0 0.0 0.0 Consumption_10 0 0.0 0.0 Consumption_11 0 0.0 0.0 Consumption_12 0 0.0 0.0 Consumption_13 0 0.0 0.0 Consumption_14 0 0.0 0.0 Consumption_15 0 0.0 0.0 Consumption_16 0 0.0 0.0 Consumption_17 0 0.0 0.0 Consumption_18 0 0.0 0.0 Consumption_19 0 0.0 0.0 Consumption_20 0 0.0 0.0 Consumption_21 0 0.0 0.0 Consumption_22 0 0.0 0.0 Investment_2 1 3.9 7.7 Investment_3 1 3.2 3.9 Investment_4 1 2.8 4.7 Investment_5 1 3.5 3.8 Investment_6 1 3.3 5.5 Investment_8 1 4.0 6.7 Investment_9 1 4.2 4.2 Investment_10 1 4.1 4.0 Investment_11 1 5.2 7.7 Investment_12 1 5.9 7.5 Investment_13 1 4.9 8.3 Investment_14 1 3.7 5.4 Investment_15 1 4.0 6.8 Investment_16 1 4.4 7.2 Investment_17 1 2.9 8.3 Investment_18 1 4.3 6.7 Investment_19 1 5.3 7.4 Investment_20 1 6.6 8.9 Investment_21 1 7.4 9.6 Investment_22 1 13.8 11.6 PrivateWages_2 0 0.0 0.0 PrivateWages_3 0 0.0 0.0 PrivateWages_4 0 0.0 0.0 PrivateWages_5 0 0.0 0.0 PrivateWages_6 0 0.0 0.0 PrivateWages_8 0 0.0 0.0 PrivateWages_9 0 0.0 0.0 PrivateWages_10 0 0.0 0.0 PrivateWages_11 0 0.0 0.0 PrivateWages_12 0 0.0 0.0 PrivateWages_13 0 0.0 0.0 PrivateWages_14 0 0.0 0.0 PrivateWages_15 0 0.0 0.0 PrivateWages_16 0 0.0 0.0 PrivateWages_17 0 0.0 0.0 PrivateWages_18 0 0.0 0.0 PrivateWages_19 0 0.0 0.0 PrivateWages_20 0 0.0 0.0 PrivateWages_21 0 0.0 0.0 PrivateWages_22 0 0.0 0.0 Investment_govWage Investment_trend Investment_capitalLag Consumption_2 0.0 0 0 Consumption_3 0.0 0 0 Consumption_4 0.0 0 0 Consumption_5 0.0 0 0 Consumption_6 0.0 0 0 Consumption_8 0.0 0 0 Consumption_9 0.0 0 0 Consumption_10 0.0 0 0 Consumption_11 0.0 0 0 Consumption_12 0.0 0 0 Consumption_13 0.0 0 0 Consumption_14 0.0 0 0 Consumption_15 0.0 0 0 Consumption_16 0.0 0 0 Consumption_17 0.0 0 0 Consumption_18 0.0 0 0 Consumption_19 0.0 0 0 Consumption_20 0.0 0 0 Consumption_21 0.0 0 0 Consumption_22 0.0 0 0 Investment_2 2.7 -10 183 Investment_3 2.9 -9 183 Investment_4 2.9 -8 184 Investment_5 3.1 -7 190 Investment_6 3.2 -6 193 Investment_8 3.6 -4 203 Investment_9 3.7 -3 208 Investment_10 4.0 -2 211 Investment_11 4.2 -1 216 Investment_12 4.8 0 217 Investment_13 5.3 1 213 Investment_14 5.6 2 207 Investment_15 6.0 3 202 Investment_16 6.1 4 199 Investment_17 7.4 5 198 Investment_18 6.7 6 200 Investment_19 7.7 7 202 Investment_20 7.8 8 200 Investment_21 8.0 9 201 Investment_22 8.5 10 204 PrivateWages_2 0.0 0 0 PrivateWages_3 0.0 0 0 PrivateWages_4 0.0 0 0 PrivateWages_5 0.0 0 0 PrivateWages_6 0.0 0 0 PrivateWages_8 0.0 0 0 PrivateWages_9 0.0 0 0 PrivateWages_10 0.0 0 0 PrivateWages_11 0.0 0 0 PrivateWages_12 0.0 0 0 PrivateWages_13 0.0 0 0 PrivateWages_14 0.0 0 0 PrivateWages_15 0.0 0 0 PrivateWages_16 0.0 0 0 PrivateWages_17 0.0 0 0 PrivateWages_18 0.0 0 0 PrivateWages_19 0.0 0 0 PrivateWages_20 0.0 0 0 PrivateWages_21 0.0 0 0 PrivateWages_22 0.0 0 0 Investment_corpProfLag Investment_gnpLag Consumption_2 0.0 0.0 Consumption_3 0.0 0.0 Consumption_4 0.0 0.0 Consumption_5 0.0 0.0 Consumption_6 0.0 0.0 Consumption_8 0.0 0.0 Consumption_9 0.0 0.0 Consumption_10 0.0 0.0 Consumption_11 0.0 0.0 Consumption_12 0.0 0.0 Consumption_13 0.0 0.0 Consumption_14 0.0 0.0 Consumption_15 0.0 0.0 Consumption_16 0.0 0.0 Consumption_17 0.0 0.0 Consumption_18 0.0 0.0 Consumption_19 0.0 0.0 Consumption_20 0.0 0.0 Consumption_21 0.0 0.0 Consumption_22 0.0 0.0 Investment_2 12.7 44.9 Investment_3 12.4 45.6 Investment_4 16.9 50.1 Investment_5 18.4 57.2 Investment_6 19.4 57.1 Investment_8 19.6 64.0 Investment_9 19.8 64.4 Investment_10 21.1 64.5 Investment_11 21.7 67.0 Investment_12 15.6 61.2 Investment_13 11.4 53.4 Investment_14 7.0 44.3 Investment_15 11.2 45.1 Investment_16 12.3 49.7 Investment_17 14.0 54.4 Investment_18 17.6 62.7 Investment_19 17.3 65.0 Investment_20 15.3 60.9 Investment_21 19.0 69.5 Investment_22 21.1 75.7 PrivateWages_2 0.0 0.0 PrivateWages_3 0.0 0.0 PrivateWages_4 0.0 0.0 PrivateWages_5 0.0 0.0 PrivateWages_6 0.0 0.0 PrivateWages_8 0.0 0.0 PrivateWages_9 0.0 0.0 PrivateWages_10 0.0 0.0 PrivateWages_11 0.0 0.0 PrivateWages_12 0.0 0.0 PrivateWages_13 0.0 0.0 PrivateWages_14 0.0 0.0 PrivateWages_15 0.0 0.0 PrivateWages_16 0.0 0.0 PrivateWages_17 0.0 0.0 PrivateWages_18 0.0 0.0 PrivateWages_19 0.0 0.0 PrivateWages_20 0.0 0.0 PrivateWages_21 0.0 0.0 PrivateWages_22 0.0 0.0 PrivateWages_(Intercept) PrivateWages_govExp PrivateWages_taxes Consumption_2 0 0.0 0.0 Consumption_3 0 0.0 0.0 Consumption_4 0 0.0 0.0 Consumption_5 0 0.0 0.0 Consumption_6 0 0.0 0.0 Consumption_8 0 0.0 0.0 Consumption_9 0 0.0 0.0 Consumption_10 0 0.0 0.0 Consumption_11 0 0.0 0.0 Consumption_12 0 0.0 0.0 Consumption_13 0 0.0 0.0 Consumption_14 0 0.0 0.0 Consumption_15 0 0.0 0.0 Consumption_16 0 0.0 0.0 Consumption_17 0 0.0 0.0 Consumption_18 0 0.0 0.0 Consumption_19 0 0.0 0.0 Consumption_20 0 0.0 0.0 Consumption_21 0 0.0 0.0 Consumption_22 0 0.0 0.0 Investment_2 0 0.0 0.0 Investment_3 0 0.0 0.0 Investment_4 0 0.0 0.0 Investment_5 0 0.0 0.0 Investment_6 0 0.0 0.0 Investment_8 0 0.0 0.0 Investment_9 0 0.0 0.0 Investment_10 0 0.0 0.0 Investment_11 0 0.0 0.0 Investment_12 0 0.0 0.0 Investment_13 0 0.0 0.0 Investment_14 0 0.0 0.0 Investment_15 0 0.0 0.0 Investment_16 0 0.0 0.0 Investment_17 0 0.0 0.0 Investment_18 0 0.0 0.0 Investment_19 0 0.0 0.0 Investment_20 0 0.0 0.0 Investment_21 0 0.0 0.0 Investment_22 0 0.0 0.0 PrivateWages_2 1 3.9 7.7 PrivateWages_3 1 3.2 3.9 PrivateWages_4 1 2.8 4.7 PrivateWages_5 1 3.5 3.8 PrivateWages_6 1 3.3 5.5 PrivateWages_8 1 4.0 6.7 PrivateWages_9 1 4.2 4.2 PrivateWages_10 1 4.1 4.0 PrivateWages_11 1 5.2 7.7 PrivateWages_12 1 5.9 7.5 PrivateWages_13 1 4.9 8.3 PrivateWages_14 1 3.7 5.4 PrivateWages_15 1 4.0 6.8 PrivateWages_16 1 4.4 7.2 PrivateWages_17 1 2.9 8.3 PrivateWages_18 1 4.3 6.7 PrivateWages_19 1 5.3 7.4 PrivateWages_20 1 6.6 8.9 PrivateWages_21 1 7.4 9.6 PrivateWages_22 1 13.8 11.6 PrivateWages_govWage PrivateWages_trend PrivateWages_capitalLag Consumption_2 0.0 0 0 Consumption_3 0.0 0 0 Consumption_4 0.0 0 0 Consumption_5 0.0 0 0 Consumption_6 0.0 0 0 Consumption_8 0.0 0 0 Consumption_9 0.0 0 0 Consumption_10 0.0 0 0 Consumption_11 0.0 0 0 Consumption_12 0.0 0 0 Consumption_13 0.0 0 0 Consumption_14 0.0 0 0 Consumption_15 0.0 0 0 Consumption_16 0.0 0 0 Consumption_17 0.0 0 0 Consumption_18 0.0 0 0 Consumption_19 0.0 0 0 Consumption_20 0.0 0 0 Consumption_21 0.0 0 0 Consumption_22 0.0 0 0 Investment_2 0.0 0 0 Investment_3 0.0 0 0 Investment_4 0.0 0 0 Investment_5 0.0 0 0 Investment_6 0.0 0 0 Investment_8 0.0 0 0 Investment_9 0.0 0 0 Investment_10 0.0 0 0 Investment_11 0.0 0 0 Investment_12 0.0 0 0 Investment_13 0.0 0 0 Investment_14 0.0 0 0 Investment_15 0.0 0 0 Investment_16 0.0 0 0 Investment_17 0.0 0 0 Investment_18 0.0 0 0 Investment_19 0.0 0 0 Investment_20 0.0 0 0 Investment_21 0.0 0 0 Investment_22 0.0 0 0 PrivateWages_2 2.7 -10 183 PrivateWages_3 2.9 -9 183 PrivateWages_4 2.9 -8 184 PrivateWages_5 3.1 -7 190 PrivateWages_6 3.2 -6 193 PrivateWages_8 3.6 -4 203 PrivateWages_9 3.7 -3 208 PrivateWages_10 4.0 -2 211 PrivateWages_11 4.2 -1 216 PrivateWages_12 4.8 0 217 PrivateWages_13 5.3 1 213 PrivateWages_14 5.6 2 207 PrivateWages_15 6.0 3 202 PrivateWages_16 6.1 4 199 PrivateWages_17 7.4 5 198 PrivateWages_18 6.7 6 200 PrivateWages_19 7.7 7 202 PrivateWages_20 7.8 8 200 PrivateWages_21 8.0 9 201 PrivateWages_22 8.5 10 204 PrivateWages_corpProfLag PrivateWages_gnpLag Consumption_2 0.0 0.0 Consumption_3 0.0 0.0 Consumption_4 0.0 0.0 Consumption_5 0.0 0.0 Consumption_6 0.0 0.0 Consumption_8 0.0 0.0 Consumption_9 0.0 0.0 Consumption_10 0.0 0.0 Consumption_11 0.0 0.0 Consumption_12 0.0 0.0 Consumption_13 0.0 0.0 Consumption_14 0.0 0.0 Consumption_15 0.0 0.0 Consumption_16 0.0 0.0 Consumption_17 0.0 0.0 Consumption_18 0.0 0.0 Consumption_19 0.0 0.0 Consumption_20 0.0 0.0 Consumption_21 0.0 0.0 Consumption_22 0.0 0.0 Investment_2 0.0 0.0 Investment_3 0.0 0.0 Investment_4 0.0 0.0 Investment_5 0.0 0.0 Investment_6 0.0 0.0 Investment_8 0.0 0.0 Investment_9 0.0 0.0 Investment_10 0.0 0.0 Investment_11 0.0 0.0 Investment_12 0.0 0.0 Investment_13 0.0 0.0 Investment_14 0.0 0.0 Investment_15 0.0 0.0 Investment_16 0.0 0.0 Investment_17 0.0 0.0 Investment_18 0.0 0.0 Investment_19 0.0 0.0 Investment_20 0.0 0.0 Investment_21 0.0 0.0 Investment_22 0.0 0.0 PrivateWages_2 12.7 44.9 PrivateWages_3 12.4 45.6 PrivateWages_4 16.9 50.1 PrivateWages_5 18.4 57.2 PrivateWages_6 19.4 57.1 PrivateWages_8 19.6 64.0 PrivateWages_9 19.8 64.4 PrivateWages_10 21.1 64.5 PrivateWages_11 21.7 67.0 PrivateWages_12 15.6 61.2 PrivateWages_13 11.4 53.4 PrivateWages_14 7.0 44.3 PrivateWages_15 11.2 45.1 PrivateWages_16 12.3 49.7 PrivateWages_17 14.0 54.4 PrivateWages_18 17.6 62.7 PrivateWages_19 17.3 65.0 PrivateWages_20 15.3 60.9 PrivateWages_21 19.0 69.5 PrivateWages_22 21.1 75.7 > matrix of fitted regressors Consumption_(Intercept) Consumption_corpProf Consumption_2 1 12.96 Consumption_3 1 16.70 Consumption_4 1 19.14 Consumption_5 1 20.94 Consumption_6 1 19.47 Consumption_8 1 17.14 Consumption_9 1 19.49 Consumption_10 1 20.46 Consumption_11 1 16.85 Consumption_12 1 12.68 Consumption_13 1 8.92 Consumption_14 1 9.30 Consumption_15 1 12.79 Consumption_16 1 14.26 Consumption_17 1 14.75 Consumption_18 1 19.54 Consumption_19 1 19.36 Consumption_20 1 17.39 Consumption_21 1 20.10 Consumption_22 1 22.86 Investment_2 0 0.00 Investment_3 0 0.00 Investment_4 0 0.00 Investment_5 0 0.00 Investment_6 0 0.00 Investment_8 0 0.00 Investment_9 0 0.00 Investment_10 0 0.00 Investment_11 0 0.00 Investment_12 0 0.00 Investment_13 0 0.00 Investment_14 0 0.00 Investment_15 0 0.00 Investment_16 0 0.00 Investment_17 0 0.00 Investment_18 0 0.00 Investment_19 0 0.00 Investment_20 0 0.00 Investment_21 0 0.00 Investment_22 0 0.00 PrivateWages_2 0 0.00 PrivateWages_3 0 0.00 PrivateWages_4 0 0.00 PrivateWages_5 0 0.00 PrivateWages_6 0 0.00 PrivateWages_8 0 0.00 PrivateWages_9 0 0.00 PrivateWages_10 0 0.00 PrivateWages_11 0 0.00 PrivateWages_12 0 0.00 PrivateWages_13 0 0.00 PrivateWages_14 0 0.00 PrivateWages_15 0 0.00 PrivateWages_16 0 0.00 PrivateWages_17 0 0.00 PrivateWages_18 0 0.00 PrivateWages_19 0 0.00 PrivateWages_20 0 0.00 PrivateWages_21 0 0.00 PrivateWages_22 0 0.00 Consumption_corpProfLag Consumption_wages Consumption_2 12.7 29.1 Consumption_3 12.4 31.9 Consumption_4 16.9 35.6 Consumption_5 18.4 39.0 Consumption_6 19.4 38.8 Consumption_8 19.6 39.8 Consumption_9 19.8 42.3 Consumption_10 21.1 44.1 Consumption_11 21.7 43.4 Consumption_12 15.6 39.5 Consumption_13 11.4 35.1 Consumption_14 7.0 33.0 Consumption_15 11.2 37.6 Consumption_16 12.3 40.0 Consumption_17 14.0 41.7 Consumption_18 17.6 47.6 Consumption_19 17.3 49.5 Consumption_20 15.3 48.4 Consumption_21 19.0 53.2 Consumption_22 21.1 60.9 Investment_2 0.0 0.0 Investment_3 0.0 0.0 Investment_4 0.0 0.0 Investment_5 0.0 0.0 Investment_6 0.0 0.0 Investment_8 0.0 0.0 Investment_9 0.0 0.0 Investment_10 0.0 0.0 Investment_11 0.0 0.0 Investment_12 0.0 0.0 Investment_13 0.0 0.0 Investment_14 0.0 0.0 Investment_15 0.0 0.0 Investment_16 0.0 0.0 Investment_17 0.0 0.0 Investment_18 0.0 0.0 Investment_19 0.0 0.0 Investment_20 0.0 0.0 Investment_21 0.0 0.0 Investment_22 0.0 0.0 PrivateWages_2 0.0 0.0 PrivateWages_3 0.0 0.0 PrivateWages_4 0.0 0.0 PrivateWages_5 0.0 0.0 PrivateWages_6 0.0 0.0 PrivateWages_8 0.0 0.0 PrivateWages_9 0.0 0.0 PrivateWages_10 0.0 0.0 PrivateWages_11 0.0 0.0 PrivateWages_12 0.0 0.0 PrivateWages_13 0.0 0.0 PrivateWages_14 0.0 0.0 PrivateWages_15 0.0 0.0 PrivateWages_16 0.0 0.0 PrivateWages_17 0.0 0.0 PrivateWages_18 0.0 0.0 PrivateWages_19 0.0 0.0 PrivateWages_20 0.0 0.0 PrivateWages_21 0.0 0.0 PrivateWages_22 0.0 0.0 Investment_(Intercept) Investment_corpProf Consumption_2 0 0.00 Consumption_3 0 0.00 Consumption_4 0 0.00 Consumption_5 0 0.00 Consumption_6 0 0.00 Consumption_8 0 0.00 Consumption_9 0 0.00 Consumption_10 0 0.00 Consumption_11 0 0.00 Consumption_12 0 0.00 Consumption_13 0 0.00 Consumption_14 0 0.00 Consumption_15 0 0.00 Consumption_16 0 0.00 Consumption_17 0 0.00 Consumption_18 0 0.00 Consumption_19 0 0.00 Consumption_20 0 0.00 Consumption_21 0 0.00 Consumption_22 0 0.00 Investment_2 1 12.96 Investment_3 1 16.70 Investment_4 1 19.14 Investment_5 1 20.94 Investment_6 1 19.47 Investment_8 1 17.14 Investment_9 1 19.49 Investment_10 1 20.46 Investment_11 1 16.85 Investment_12 1 12.68 Investment_13 1 8.92 Investment_14 1 9.30 Investment_15 1 12.79 Investment_16 1 14.26 Investment_17 1 14.75 Investment_18 1 19.54 Investment_19 1 19.36 Investment_20 1 17.39 Investment_21 1 20.10 Investment_22 1 22.86 PrivateWages_2 0 0.00 PrivateWages_3 0 0.00 PrivateWages_4 0 0.00 PrivateWages_5 0 0.00 PrivateWages_6 0 0.00 PrivateWages_8 0 0.00 PrivateWages_9 0 0.00 PrivateWages_10 0 0.00 PrivateWages_11 0 0.00 PrivateWages_12 0 0.00 PrivateWages_13 0 0.00 PrivateWages_14 0 0.00 PrivateWages_15 0 0.00 PrivateWages_16 0 0.00 PrivateWages_17 0 0.00 PrivateWages_18 0 0.00 PrivateWages_19 0 0.00 PrivateWages_20 0 0.00 PrivateWages_21 0 0.00 PrivateWages_22 0 0.00 Investment_corpProfLag Investment_capitalLag Consumption_2 0.0 0 Consumption_3 0.0 0 Consumption_4 0.0 0 Consumption_5 0.0 0 Consumption_6 0.0 0 Consumption_8 0.0 0 Consumption_9 0.0 0 Consumption_10 0.0 0 Consumption_11 0.0 0 Consumption_12 0.0 0 Consumption_13 0.0 0 Consumption_14 0.0 0 Consumption_15 0.0 0 Consumption_16 0.0 0 Consumption_17 0.0 0 Consumption_18 0.0 0 Consumption_19 0.0 0 Consumption_20 0.0 0 Consumption_21 0.0 0 Consumption_22 0.0 0 Investment_2 12.7 183 Investment_3 12.4 183 Investment_4 16.9 184 Investment_5 18.4 190 Investment_6 19.4 193 Investment_8 19.6 203 Investment_9 19.8 208 Investment_10 21.1 211 Investment_11 21.7 216 Investment_12 15.6 217 Investment_13 11.4 213 Investment_14 7.0 207 Investment_15 11.2 202 Investment_16 12.3 199 Investment_17 14.0 198 Investment_18 17.6 200 Investment_19 17.3 202 Investment_20 15.3 200 Investment_21 19.0 201 Investment_22 21.1 204 PrivateWages_2 0.0 0 PrivateWages_3 0.0 0 PrivateWages_4 0.0 0 PrivateWages_5 0.0 0 PrivateWages_6 0.0 0 PrivateWages_8 0.0 0 PrivateWages_9 0.0 0 PrivateWages_10 0.0 0 PrivateWages_11 0.0 0 PrivateWages_12 0.0 0 PrivateWages_13 0.0 0 PrivateWages_14 0.0 0 PrivateWages_15 0.0 0 PrivateWages_16 0.0 0 PrivateWages_17 0.0 0 PrivateWages_18 0.0 0 PrivateWages_19 0.0 0 PrivateWages_20 0.0 0 PrivateWages_21 0.0 0 PrivateWages_22 0.0 0 PrivateWages_(Intercept) PrivateWages_gnp PrivateWages_gnpLag Consumption_2 0 0.0 0.0 Consumption_3 0 0.0 0.0 Consumption_4 0 0.0 0.0 Consumption_5 0 0.0 0.0 Consumption_6 0 0.0 0.0 Consumption_8 0 0.0 0.0 Consumption_9 0 0.0 0.0 Consumption_10 0 0.0 0.0 Consumption_11 0 0.0 0.0 Consumption_12 0 0.0 0.0 Consumption_13 0 0.0 0.0 Consumption_14 0 0.0 0.0 Consumption_15 0 0.0 0.0 Consumption_16 0 0.0 0.0 Consumption_17 0 0.0 0.0 Consumption_18 0 0.0 0.0 Consumption_19 0 0.0 0.0 Consumption_20 0 0.0 0.0 Consumption_21 0 0.0 0.0 Consumption_22 0 0.0 0.0 Investment_2 0 0.0 0.0 Investment_3 0 0.0 0.0 Investment_4 0 0.0 0.0 Investment_5 0 0.0 0.0 Investment_6 0 0.0 0.0 Investment_8 0 0.0 0.0 Investment_9 0 0.0 0.0 Investment_10 0 0.0 0.0 Investment_11 0 0.0 0.0 Investment_12 0 0.0 0.0 Investment_13 0 0.0 0.0 Investment_14 0 0.0 0.0 Investment_15 0 0.0 0.0 Investment_16 0 0.0 0.0 Investment_17 0 0.0 0.0 Investment_18 0 0.0 0.0 Investment_19 0 0.0 0.0 Investment_20 0 0.0 0.0 Investment_21 0 0.0 0.0 Investment_22 0 0.0 0.0 PrivateWages_2 1 47.1 44.9 PrivateWages_3 1 49.6 45.6 PrivateWages_4 1 56.5 50.1 PrivateWages_5 1 60.7 57.2 PrivateWages_6 1 60.6 57.1 PrivateWages_8 1 60.0 64.0 PrivateWages_9 1 62.3 64.4 PrivateWages_10 1 64.6 64.5 PrivateWages_11 1 63.7 67.0 PrivateWages_12 1 54.8 61.2 PrivateWages_13 1 47.0 53.4 PrivateWages_14 1 42.1 44.3 PrivateWages_15 1 51.2 45.1 PrivateWages_16 1 55.3 49.7 PrivateWages_17 1 57.4 54.4 PrivateWages_18 1 67.2 62.7 PrivateWages_19 1 68.5 65.0 PrivateWages_20 1 66.8 60.9 PrivateWages_21 1 74.9 69.5 PrivateWages_22 1 86.9 75.7 PrivateWages_trend Consumption_2 0 Consumption_3 0 Consumption_4 0 Consumption_5 0 Consumption_6 0 Consumption_8 0 Consumption_9 0 Consumption_10 0 Consumption_11 0 Consumption_12 0 Consumption_13 0 Consumption_14 0 Consumption_15 0 Consumption_16 0 Consumption_17 0 Consumption_18 0 Consumption_19 0 Consumption_20 0 Consumption_21 0 Consumption_22 0 Investment_2 0 Investment_3 0 Investment_4 0 Investment_5 0 Investment_6 0 Investment_8 0 Investment_9 0 Investment_10 0 Investment_11 0 Investment_12 0 Investment_13 0 Investment_14 0 Investment_15 0 Investment_16 0 Investment_17 0 Investment_18 0 Investment_19 0 Investment_20 0 Investment_21 0 Investment_22 0 PrivateWages_2 -10 PrivateWages_3 -9 PrivateWages_4 -8 PrivateWages_5 -7 PrivateWages_6 -6 PrivateWages_8 -4 PrivateWages_9 -3 PrivateWages_10 -2 PrivateWages_11 -1 PrivateWages_12 0 PrivateWages_13 1 PrivateWages_14 2 PrivateWages_15 3 PrivateWages_16 4 PrivateWages_17 5 PrivateWages_18 6 PrivateWages_19 7 PrivateWages_20 8 PrivateWages_21 9 PrivateWages_22 10 > nobs [1] 60 > linearHypothesis Linear hypothesis test (Theil's F test) Hypothesis: Consumption_corpProf + Investment_capitalLag = 0 Model 1: restricted model Model 2: kleinModel Res.Df Df F Pr(>F) 1 49 2 48 1 0.95 0.34 Linear hypothesis test (F statistic of a Wald test) Hypothesis: Consumption_corpProf + Investment_capitalLag = 0 Model 1: restricted model Model 2: kleinModel Res.Df Df F Pr(>F) 1 49 2 48 1 1.05 0.31 Linear hypothesis test (Chi^2 statistic of a Wald test) Hypothesis: Consumption_corpProf + Investment_capitalLag = 0 Model 1: restricted model Model 2: kleinModel Res.Df Df Chisq Pr(>Chisq) 1 49 2 48 1 1.05 0.3 Linear hypothesis test (Theil's F test) Hypothesis: Consumption_corpProf + Investment_capitalLag = 0 Consumption_corpProfLag - PrivateWages_trend = 0 Model 1: restricted model Model 2: kleinModel Res.Df Df F Pr(>F) 1 50 2 48 2 0.48 0.62 Linear hypothesis test (F statistic of a Wald test) Hypothesis: Consumption_corpProf + Investment_capitalLag = 0 Consumption_corpProfLag - PrivateWages_trend = 0 Model 1: restricted model Model 2: kleinModel Res.Df Df F Pr(>F) 1 50 2 48 2 0.53 0.59 Linear hypothesis test (Chi^2 statistic of a Wald test) Hypothesis: Consumption_corpProf + Investment_capitalLag = 0 Consumption_corpProfLag - PrivateWages_trend = 0 Model 1: restricted model Model 2: kleinModel Res.Df Df Chisq Pr(>Chisq) 1 50 2 48 2 1.06 0.59 > logLik 'log Lik.' -72.2 (df=13) 'log Lik.' -79.7 (df=13) Estimating function Consumption_(Intercept) Consumption_corpProf Consumption_2 -1.1407 -14.78 Consumption_3 -0.3242 -5.42 Consumption_4 -0.0963 -1.84 Consumption_5 -1.8392 -38.51 Consumption_6 0.1702 3.31 Consumption_8 3.0349 52.02 Consumption_9 1.9822 38.63 Consumption_10 0.7162 14.65 Consumption_11 -1.5151 -25.52 Consumption_12 -1.1471 -14.54 Consumption_13 -1.9595 -17.48 Consumption_14 1.4394 13.39 Consumption_15 -1.0033 -12.84 Consumption_16 -0.5750 -8.20 Consumption_17 4.0452 59.67 Consumption_18 -0.5669 -11.08 Consumption_19 -3.1962 -61.88 Consumption_20 2.2286 38.75 Consumption_21 0.9237 18.57 Consumption_22 -1.1770 -26.91 Investment_2 0.0000 0.00 Investment_3 0.0000 0.00 Investment_4 0.0000 0.00 Investment_5 0.0000 0.00 Investment_6 0.0000 0.00 Investment_8 0.0000 0.00 Investment_9 0.0000 0.00 Investment_10 0.0000 0.00 Investment_11 0.0000 0.00 Investment_12 0.0000 0.00 Investment_13 0.0000 0.00 Investment_14 0.0000 0.00 Investment_15 0.0000 0.00 Investment_16 0.0000 0.00 Investment_17 0.0000 0.00 Investment_18 0.0000 0.00 Investment_19 0.0000 0.00 Investment_20 0.0000 0.00 Investment_21 0.0000 0.00 Investment_22 0.0000 0.00 PrivateWages_2 0.0000 0.00 PrivateWages_3 0.0000 0.00 PrivateWages_4 0.0000 0.00 PrivateWages_5 0.0000 0.00 PrivateWages_6 0.0000 0.00 PrivateWages_8 0.0000 0.00 PrivateWages_9 0.0000 0.00 PrivateWages_10 0.0000 0.00 PrivateWages_11 0.0000 0.00 PrivateWages_12 0.0000 0.00 PrivateWages_13 0.0000 0.00 PrivateWages_14 0.0000 0.00 PrivateWages_15 0.0000 0.00 PrivateWages_16 0.0000 0.00 PrivateWages_17 0.0000 0.00 PrivateWages_18 0.0000 0.00 PrivateWages_19 0.0000 0.00 PrivateWages_20 0.0000 0.00 PrivateWages_21 0.0000 0.00 PrivateWages_22 0.0000 0.00 Consumption_corpProfLag Consumption_wages Consumption_2 -14.49 -33.21 Consumption_3 -4.02 -10.33 Consumption_4 -1.63 -3.43 Consumption_5 -33.84 -71.82 Consumption_6 3.30 6.61 Consumption_8 59.48 120.65 Consumption_9 39.25 83.81 Consumption_10 15.11 31.59 Consumption_11 -32.88 -65.70 Consumption_12 -17.89 -45.25 Consumption_13 -22.34 -68.69 Consumption_14 10.08 47.54 Consumption_15 -11.24 -37.74 Consumption_16 -7.07 -22.99 Consumption_17 56.63 168.85 Consumption_18 -9.98 -27.00 Consumption_19 -55.29 -158.06 Consumption_20 34.10 107.77 Consumption_21 17.55 49.11 Consumption_22 -24.84 -71.70 Investment_2 0.00 0.00 Investment_3 0.00 0.00 Investment_4 0.00 0.00 Investment_5 0.00 0.00 Investment_6 0.00 0.00 Investment_8 0.00 0.00 Investment_9 0.00 0.00 Investment_10 0.00 0.00 Investment_11 0.00 0.00 Investment_12 0.00 0.00 Investment_13 0.00 0.00 Investment_14 0.00 0.00 Investment_15 0.00 0.00 Investment_16 0.00 0.00 Investment_17 0.00 0.00 Investment_18 0.00 0.00 Investment_19 0.00 0.00 Investment_20 0.00 0.00 Investment_21 0.00 0.00 Investment_22 0.00 0.00 PrivateWages_2 0.00 0.00 PrivateWages_3 0.00 0.00 PrivateWages_4 0.00 0.00 PrivateWages_5 0.00 0.00 PrivateWages_6 0.00 0.00 PrivateWages_8 0.00 0.00 PrivateWages_9 0.00 0.00 PrivateWages_10 0.00 0.00 PrivateWages_11 0.00 0.00 PrivateWages_12 0.00 0.00 PrivateWages_13 0.00 0.00 PrivateWages_14 0.00 0.00 PrivateWages_15 0.00 0.00 PrivateWages_16 0.00 0.00 PrivateWages_17 0.00 0.00 PrivateWages_18 0.00 0.00 PrivateWages_19 0.00 0.00 PrivateWages_20 0.00 0.00 PrivateWages_21 0.00 0.00 PrivateWages_22 0.00 0.00 Investment_(Intercept) Investment_corpProf Consumption_2 0.0000 0.000 Consumption_3 0.0000 0.000 Consumption_4 0.0000 0.000 Consumption_5 0.0000 0.000 Consumption_6 0.0000 0.000 Consumption_8 0.0000 0.000 Consumption_9 0.0000 0.000 Consumption_10 0.0000 0.000 Consumption_11 0.0000 0.000 Consumption_12 0.0000 0.000 Consumption_13 0.0000 0.000 Consumption_14 0.0000 0.000 Consumption_15 0.0000 0.000 Consumption_16 0.0000 0.000 Consumption_17 0.0000 0.000 Consumption_18 0.0000 0.000 Consumption_19 0.0000 0.000 Consumption_20 0.0000 0.000 Consumption_21 0.0000 0.000 Consumption_22 0.0000 0.000 Investment_2 -1.1313 -14.660 Investment_3 0.2902 4.847 Investment_4 0.9027 17.274 Investment_5 -1.7434 -36.502 Investment_6 0.5695 11.088 Investment_8 1.6225 27.812 Investment_9 0.4166 8.119 Investment_10 2.0381 41.703 Investment_11 -0.8611 -14.505 Investment_12 -0.9091 -11.527 Investment_13 -1.1148 -9.946 Investment_14 1.3841 12.873 Investment_15 -0.2900 -3.710 Investment_16 0.0605 0.862 Investment_17 2.2439 33.101 Investment_18 -0.5390 -10.534 Investment_19 -3.9452 -76.375 Investment_20 0.4890 8.502 Investment_21 0.0864 1.737 Investment_22 0.4306 9.843 PrivateWages_2 0.0000 0.000 PrivateWages_3 0.0000 0.000 PrivateWages_4 0.0000 0.000 PrivateWages_5 0.0000 0.000 PrivateWages_6 0.0000 0.000 PrivateWages_8 0.0000 0.000 PrivateWages_9 0.0000 0.000 PrivateWages_10 0.0000 0.000 PrivateWages_11 0.0000 0.000 PrivateWages_12 0.0000 0.000 PrivateWages_13 0.0000 0.000 PrivateWages_14 0.0000 0.000 PrivateWages_15 0.0000 0.000 PrivateWages_16 0.0000 0.000 PrivateWages_17 0.0000 0.000 PrivateWages_18 0.0000 0.000 PrivateWages_19 0.0000 0.000 PrivateWages_20 0.0000 0.000 PrivateWages_21 0.0000 0.000 PrivateWages_22 0.0000 0.000 Investment_corpProfLag Investment_capitalLag Consumption_2 0.000 0.0 Consumption_3 0.000 0.0 Consumption_4 0.000 0.0 Consumption_5 0.000 0.0 Consumption_6 0.000 0.0 Consumption_8 0.000 0.0 Consumption_9 0.000 0.0 Consumption_10 0.000 0.0 Consumption_11 0.000 0.0 Consumption_12 0.000 0.0 Consumption_13 0.000 0.0 Consumption_14 0.000 0.0 Consumption_15 0.000 0.0 Consumption_16 0.000 0.0 Consumption_17 0.000 0.0 Consumption_18 0.000 0.0 Consumption_19 0.000 0.0 Consumption_20 0.000 0.0 Consumption_21 0.000 0.0 Consumption_22 0.000 0.0 Investment_2 -14.368 -206.8 Investment_3 3.598 53.0 Investment_4 15.256 166.5 Investment_5 -32.079 -330.7 Investment_6 11.048 109.7 Investment_8 31.801 330.0 Investment_9 8.248 86.5 Investment_10 43.003 429.2 Investment_11 -18.685 -185.7 Investment_12 -14.182 -197.0 Investment_13 -12.709 -237.8 Investment_14 9.689 286.6 Investment_15 -3.247 -58.6 Investment_16 0.744 12.0 Investment_17 31.414 443.6 Investment_18 -9.486 -107.7 Investment_19 -68.252 -796.1 Investment_20 7.482 97.7 Investment_21 1.642 17.4 Investment_22 9.085 88.0 PrivateWages_2 0.000 0.0 PrivateWages_3 0.000 0.0 PrivateWages_4 0.000 0.0 PrivateWages_5 0.000 0.0 PrivateWages_6 0.000 0.0 PrivateWages_8 0.000 0.0 PrivateWages_9 0.000 0.0 PrivateWages_10 0.000 0.0 PrivateWages_11 0.000 0.0 PrivateWages_12 0.000 0.0 PrivateWages_13 0.000 0.0 PrivateWages_14 0.000 0.0 PrivateWages_15 0.000 0.0 PrivateWages_16 0.000 0.0 PrivateWages_17 0.000 0.0 PrivateWages_18 0.000 0.0 PrivateWages_19 0.000 0.0 PrivateWages_20 0.000 0.0 PrivateWages_21 0.000 0.0 PrivateWages_22 0.000 0.0 PrivateWages_(Intercept) PrivateWages_gnp PrivateWages_gnpLag Consumption_2 0.0000 0.00 0.00 Consumption_3 0.0000 0.00 0.00 Consumption_4 0.0000 0.00 0.00 Consumption_5 0.0000 0.00 0.00 Consumption_6 0.0000 0.00 0.00 Consumption_8 0.0000 0.00 0.00 Consumption_9 0.0000 0.00 0.00 Consumption_10 0.0000 0.00 0.00 Consumption_11 0.0000 0.00 0.00 Consumption_12 0.0000 0.00 0.00 Consumption_13 0.0000 0.00 0.00 Consumption_14 0.0000 0.00 0.00 Consumption_15 0.0000 0.00 0.00 Consumption_16 0.0000 0.00 0.00 Consumption_17 0.0000 0.00 0.00 Consumption_18 0.0000 0.00 0.00 Consumption_19 0.0000 0.00 0.00 Consumption_20 0.0000 0.00 0.00 Consumption_21 0.0000 0.00 0.00 Consumption_22 0.0000 0.00 0.00 Investment_2 0.0000 0.00 0.00 Investment_3 0.0000 0.00 0.00 Investment_4 0.0000 0.00 0.00 Investment_5 0.0000 0.00 0.00 Investment_6 0.0000 0.00 0.00 Investment_8 0.0000 0.00 0.00 Investment_9 0.0000 0.00 0.00 Investment_10 0.0000 0.00 0.00 Investment_11 0.0000 0.00 0.00 Investment_12 0.0000 0.00 0.00 Investment_13 0.0000 0.00 0.00 Investment_14 0.0000 0.00 0.00 Investment_15 0.0000 0.00 0.00 Investment_16 0.0000 0.00 0.00 Investment_17 0.0000 0.00 0.00 Investment_18 0.0000 0.00 0.00 Investment_19 0.0000 0.00 0.00 Investment_20 0.0000 0.00 0.00 Investment_21 0.0000 0.00 0.00 Investment_22 0.0000 0.00 0.00 PrivateWages_2 -1.9924 -93.78 -89.46 PrivateWages_3 0.4683 23.22 21.35 PrivateWages_4 1.4034 79.35 70.31 PrivateWages_5 -1.7870 -108.45 -102.22 PrivateWages_6 -0.3627 -21.98 -20.71 PrivateWages_8 1.1629 69.77 74.43 PrivateWages_9 1.2735 79.30 82.01 PrivateWages_10 2.2141 142.96 142.81 PrivateWages_11 -1.2912 -82.26 -86.51 PrivateWages_12 -0.0350 -1.92 -2.14 PrivateWages_13 -1.0438 -49.04 -55.74 PrivateWages_14 1.8016 75.90 79.81 PrivateWages_15 -0.3714 -19.02 -16.75 PrivateWages_16 -0.3904 -21.61 -19.40 PrivateWages_17 1.4934 85.71 81.24 PrivateWages_18 0.0279 1.88 1.75 PrivateWages_19 -3.8229 -261.91 -248.49 PrivateWages_20 0.7870 52.61 47.93 PrivateWages_21 -0.7415 -55.52 -51.54 PrivateWages_22 1.2062 104.79 91.31 PrivateWages_trend Consumption_2 0.000 Consumption_3 0.000 Consumption_4 0.000 Consumption_5 0.000 Consumption_6 0.000 Consumption_8 0.000 Consumption_9 0.000 Consumption_10 0.000 Consumption_11 0.000 Consumption_12 0.000 Consumption_13 0.000 Consumption_14 0.000 Consumption_15 0.000 Consumption_16 0.000 Consumption_17 0.000 Consumption_18 0.000 Consumption_19 0.000 Consumption_20 0.000 Consumption_21 0.000 Consumption_22 0.000 Investment_2 0.000 Investment_3 0.000 Investment_4 0.000 Investment_5 0.000 Investment_6 0.000 Investment_8 0.000 Investment_9 0.000 Investment_10 0.000 Investment_11 0.000 Investment_12 0.000 Investment_13 0.000 Investment_14 0.000 Investment_15 0.000 Investment_16 0.000 Investment_17 0.000 Investment_18 0.000 Investment_19 0.000 Investment_20 0.000 Investment_21 0.000 Investment_22 0.000 PrivateWages_2 19.924 PrivateWages_3 -4.214 PrivateWages_4 -11.227 PrivateWages_5 12.509 PrivateWages_6 2.176 PrivateWages_8 -4.652 PrivateWages_9 -3.820 PrivateWages_10 -4.428 PrivateWages_11 1.291 PrivateWages_12 0.000 PrivateWages_13 -1.044 PrivateWages_14 3.603 PrivateWages_15 -1.114 PrivateWages_16 -1.562 PrivateWages_17 7.467 PrivateWages_18 0.168 PrivateWages_19 -26.760 PrivateWages_20 6.296 PrivateWages_21 -6.674 PrivateWages_22 12.062 [1] TRUE > Bread Consumption_(Intercept) Consumption_corpProf Consumption_(Intercept) 99.945 -0.7943 Consumption_corpProf -0.794 0.7797 Consumption_corpProfLag -0.325 -0.5285 Consumption_wages -1.888 -0.0894 Investment_(Intercept) 0.000 0.0000 Investment_corpProf 0.000 0.0000 Investment_corpProfLag 0.000 0.0000 Investment_capitalLag 0.000 0.0000 PrivateWages_(Intercept) 0.000 0.0000 PrivateWages_gnp 0.000 0.0000 PrivateWages_gnpLag 0.000 0.0000 PrivateWages_trend 0.000 0.0000 Consumption_corpProfLag Consumption_wages Consumption_(Intercept) -0.3246 -1.8878 Consumption_corpProf -0.5285 -0.0894 Consumption_corpProfLag 0.6654 -0.0384 Consumption_wages -0.0384 0.0965 Investment_(Intercept) 0.0000 0.0000 Investment_corpProf 0.0000 0.0000 Investment_corpProfLag 0.0000 0.0000 Investment_capitalLag 0.0000 0.0000 PrivateWages_(Intercept) 0.0000 0.0000 PrivateWages_gnp 0.0000 0.0000 PrivateWages_gnpLag 0.0000 0.0000 PrivateWages_trend 0.0000 0.0000 Investment_(Intercept) Investment_corpProf Consumption_(Intercept) 0.0 0.000 Consumption_corpProf 0.0 0.000 Consumption_corpProfLag 0.0 0.000 Consumption_wages 0.0 0.000 Investment_(Intercept) 2446.2 -38.918 Investment_corpProf -38.9 1.252 Investment_corpProfLag 33.4 -1.090 Investment_capitalLag -11.6 0.177 PrivateWages_(Intercept) 0.0 0.000 PrivateWages_gnp 0.0 0.000 PrivateWages_gnpLag 0.0 0.000 PrivateWages_trend 0.0 0.000 Investment_corpProfLag Investment_capitalLag Consumption_(Intercept) 0.000 0.0000 Consumption_corpProf 0.000 0.0000 Consumption_corpProfLag 0.000 0.0000 Consumption_wages 0.000 0.0000 Investment_(Intercept) 33.384 -11.6216 Investment_corpProf -1.090 0.1774 Investment_corpProfLag 1.148 -0.1680 Investment_capitalLag -0.168 0.0567 PrivateWages_(Intercept) 0.000 0.0000 PrivateWages_gnp 0.000 0.0000 PrivateWages_gnpLag 0.000 0.0000 PrivateWages_trend 0.000 0.0000 PrivateWages_(Intercept) PrivateWages_gnp Consumption_(Intercept) 0.000 0.0000 Consumption_corpProf 0.000 0.0000 Consumption_corpProfLag 0.000 0.0000 Consumption_wages 0.000 0.0000 Investment_(Intercept) 0.000 0.0000 Investment_corpProf 0.000 0.0000 Investment_corpProfLag 0.000 0.0000 Investment_capitalLag 0.000 0.0000 PrivateWages_(Intercept) 170.714 -0.9289 PrivateWages_gnp -0.929 0.1580 PrivateWages_gnpLag -1.948 -0.1473 PrivateWages_trend 2.164 -0.0424 PrivateWages_gnpLag PrivateWages_trend Consumption_(Intercept) 0.000 0.0000 Consumption_corpProf 0.000 0.0000 Consumption_corpProfLag 0.000 0.0000 Consumption_wages 0.000 0.0000 Investment_(Intercept) 0.000 0.0000 Investment_corpProf 0.000 0.0000 Investment_corpProfLag 0.000 0.0000 Investment_capitalLag 0.000 0.0000 PrivateWages_(Intercept) -1.948 2.1641 PrivateWages_gnp -0.147 -0.0424 PrivateWages_gnpLag 0.186 0.0060 PrivateWages_trend 0.006 0.1151 > > # SUR Warning in systemfit(system, method = method, data = KleinI, methodResidCov = ifelse(method == : the estimation of systems of equations with unequal numbers of observations has not been thoroughly tested yet > summary systemfit results method: SUR N DF SSR detRCov OLS-R2 McElroy-R2 system 62 50 46.2 0.154 0.977 0.993 N DF SSR MSE RMSE R2 Adj R2 Consumption 21 17 18.1 1.062 1.031 0.981 0.977 Investment 21 17 17.5 1.030 1.015 0.931 0.918 PrivateWages 20 16 10.6 0.663 0.814 0.987 0.984 The covariance matrix of the residuals used for estimation Consumption Investment PrivateWages Consumption 0.8562 -0.0129 -0.371 Investment -0.0129 0.7548 0.159 PrivateWages -0.3706 0.1594 0.487 The covariance matrix of the residuals Consumption Investment PrivateWages Consumption 0.8684 0.0078 -0.442 Investment 0.0078 0.7702 0.237 PrivateWages -0.4416 0.2366 0.531 The correlations of the residuals Consumption Investment PrivateWages Consumption 1.00000 0.00562 -0.651 Investment 0.00562 1.00000 0.372 PrivateWages -0.65109 0.37198 1.000 SUR estimates for 'Consumption' (equation 1) Model Formula: consump ~ corpProf + corpProfLag + wages Estimate Std. Error t value Pr(>|t|) (Intercept) 16.0647 1.1729 13.70 1.3e-10 *** corpProf 0.2283 0.0775 2.94 0.0091 ** corpProfLag 0.0723 0.0771 0.94 0.3615 wages 0.7930 0.0352 22.51 4.3e-14 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.031 on 17 degrees of freedom Number of observations: 21 Degrees of Freedom: 17 SSR: 18.06 MSE: 1.062 Root MSE: 1.031 Multiple R-Squared: 0.981 Adjusted R-Squared: 0.977 SUR estimates for 'Investment' (equation 2) Model Formula: invest ~ corpProf + corpProfLag + capitalLag Estimate Std. Error t value Pr(>|t|) (Intercept) 12.3516 4.5762 2.70 0.01520 * corpProf 0.4461 0.0818 5.45 4.3e-05 *** corpProfLag 0.3609 0.0849 4.25 0.00054 *** capitalLag -0.1224 0.0223 -5.47 4.1e-05 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.015 on 17 degrees of freedom Number of observations: 21 Degrees of Freedom: 17 SSR: 17.514 MSE: 1.03 Root MSE: 1.015 Multiple R-Squared: 0.931 Adjusted R-Squared: 0.918 SUR estimates for 'PrivateWages' (equation 3) Model Formula: privWage ~ gnp + gnpLag + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 1.5433 1.1371 1.36 0.19 gnp 0.4117 0.0279 14.77 9.6e-11 *** gnpLag 0.1743 0.0317 5.50 4.8e-05 *** trend 0.1550 0.0283 5.49 5.0e-05 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 0.814 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 10.611 MSE: 0.663 Root MSE: 0.814 Multiple R-Squared: 0.987 Adjusted R-Squared: 0.984 > residuals Consumption Investment PrivateWages 1 NA NA NA 2 -0.27628 -0.3003 -1.0910 3 -1.35400 -0.1239 0.5795 4 -1.62816 1.1154 1.5172 5 -0.56494 -1.4358 -0.0341 6 -0.06584 0.3581 -0.2772 7 0.83245 1.4526 NA 8 1.28855 0.8290 -0.6896 9 0.96709 -0.5092 0.3445 10 -0.66705 1.2210 1.2429 11 0.41992 0.2497 -0.3602 12 -0.05971 0.0470 0.3068 13 -0.08649 0.3096 -0.2426 14 0.33124 0.3652 0.3591 15 -0.00604 -0.1652 0.2710 16 -0.01478 0.0124 -0.0207 17 1.55472 1.0339 -0.8117 18 -0.41250 0.0255 0.8398 19 0.29322 -2.6293 -0.8283 20 0.91756 -0.5906 -0.4091 21 0.71583 -0.7036 -1.2154 22 -2.26223 -0.5283 0.6207 > fitted Consumption Investment PrivateWages 1 NA NA NA 2 42.2 0.100 26.6 3 46.4 2.024 28.7 4 50.8 4.085 32.6 5 51.2 4.436 33.9 6 52.7 4.742 35.7 7 54.3 4.147 NA 8 54.9 3.371 38.6 9 56.3 3.509 38.9 10 58.5 3.879 40.1 11 54.6 0.750 38.3 12 51.0 -3.447 34.2 13 45.7 -6.510 29.2 14 46.2 -5.465 28.1 15 48.7 -2.835 30.3 16 51.3 -1.312 33.2 17 56.1 1.066 37.6 18 59.1 1.974 40.2 19 57.2 0.729 39.0 20 60.7 1.891 42.0 21 64.3 4.004 46.2 22 72.0 5.428 52.7 > predict Consumption.pred Consumption.se.fit Consumption.lwr Consumption.upr 1 NA NA NA NA 2 42.2 0.414 41.3 43.0 3 46.4 0.451 45.4 47.3 4 50.8 0.296 50.2 51.4 5 51.2 0.342 50.5 51.9 6 52.7 0.342 52.0 53.4 7 54.3 0.309 53.6 54.9 8 54.9 0.282 54.3 55.5 9 56.3 0.303 55.7 56.9 10 58.5 0.321 57.8 59.1 11 54.6 0.515 53.5 55.6 12 51.0 0.418 50.1 51.8 13 45.7 0.548 44.6 46.8 14 46.2 0.528 45.1 47.2 15 48.7 0.333 48.0 49.4 16 51.3 0.296 50.7 51.9 17 56.1 0.321 55.5 56.8 18 59.1 0.287 58.5 59.7 19 57.2 0.325 56.6 57.9 20 60.7 0.383 59.9 61.5 21 64.3 0.382 63.5 65.1 22 72.0 0.599 70.8 73.2 Investment.pred Investment.se.fit Investment.lwr Investment.upr 1 NA NA NA NA 2 0.100 0.511 -0.926 1.127 3 2.024 0.425 1.170 2.878 4 4.085 0.378 3.325 4.845 5 4.436 0.313 3.806 5.065 6 4.742 0.296 4.147 5.336 7 4.147 0.279 3.586 4.709 8 3.371 0.250 2.868 3.874 9 3.509 0.331 2.845 4.174 10 3.879 0.380 3.116 4.642 11 0.750 0.512 -0.279 1.779 12 -3.447 0.433 -4.316 -2.578 13 -6.510 0.527 -7.568 -5.451 14 -5.465 0.587 -6.645 -4.285 15 -2.835 0.320 -3.477 -2.193 16 -1.312 0.274 -1.863 -0.761 17 1.066 0.296 0.472 1.661 18 1.974 0.208 1.558 2.391 19 0.729 0.265 0.197 1.262 20 1.891 0.311 1.266 2.515 21 4.004 0.283 3.435 4.572 22 5.428 0.393 4.640 6.217 PrivateWages.pred PrivateWages.se.fit PrivateWages.lwr PrivateWages.upr 1 NA NA NA NA 2 26.6 0.318 26.0 27.2 3 28.7 0.317 28.1 29.4 4 32.6 0.315 32.0 33.2 5 33.9 0.243 33.4 34.4 6 35.7 0.242 35.2 36.2 7 NA NA NA NA 8 38.6 0.247 38.1 39.1 9 38.9 0.236 38.4 39.3 10 40.1 0.227 39.6 40.5 11 38.3 0.306 37.6 38.9 12 34.2 0.312 33.6 34.8 13 29.2 0.376 28.5 30.0 14 28.1 0.337 27.5 28.8 15 30.3 0.328 29.7 31.0 16 33.2 0.274 32.7 33.8 17 37.6 0.266 37.1 38.1 18 40.2 0.213 39.7 40.6 19 39.0 0.310 38.4 39.7 20 42.0 0.282 41.4 42.6 21 46.2 0.300 45.6 46.8 22 52.7 0.451 51.8 53.6 > model.frame [1] TRUE > model.matrix [1] TRUE > nobs [1] 62 > linearHypothesis Linear hypothesis test (Theil's F test) Hypothesis: Consumption_corpProf + Investment_capitalLag = 0 Model 1: restricted model Model 2: kleinModel Res.Df Df F Pr(>F) 1 51 2 50 1 1.39 0.24 Linear hypothesis test (F statistic of a Wald test) Hypothesis: Consumption_corpProf + Investment_capitalLag = 0 Model 1: restricted model Model 2: kleinModel Res.Df Df F Pr(>F) 1 51 2 50 1 1.7 0.2 Linear hypothesis test (Chi^2 statistic of a Wald test) Hypothesis: Consumption_corpProf + Investment_capitalLag = 0 Model 1: restricted model Model 2: kleinModel Res.Df Df Chisq Pr(>Chisq) 1 51 2 50 1 1.7 0.19 Linear hypothesis test (Theil's F test) Hypothesis: Consumption_corpProf + Investment_capitalLag = 0 Consumption_corpProfLag - PrivateWages_trend = 0 Model 1: restricted model Model 2: kleinModel Res.Df Df F Pr(>F) 1 52 2 50 2 0.72 0.49 Linear hypothesis test (F statistic of a Wald test) Hypothesis: Consumption_corpProf + Investment_capitalLag = 0 Consumption_corpProfLag - PrivateWages_trend = 0 Model 1: restricted model Model 2: kleinModel Res.Df Df F Pr(>F) 1 52 2 50 2 0.87 0.42 Linear hypothesis test (Chi^2 statistic of a Wald test) Hypothesis: Consumption_corpProf + Investment_capitalLag = 0 Consumption_corpProfLag - PrivateWages_trend = 0 Model 1: restricted model Model 2: kleinModel Res.Df Df Chisq Pr(>Chisq) 1 52 2 50 2 1.75 0.42 > logLik 'log Lik.' -69.4 (df=18) 'log Lik.' -78.2 (df=18) Estimating function Consumption_(Intercept) Consumption_corpProf Consumption_2 -0.49572 -6.1470 Consumption_3 -2.42943 -41.0573 Consumption_4 -2.92134 -53.7526 Consumption_5 -1.01365 -19.6648 Consumption_6 -0.11814 -2.3746 Consumption_7 1.49363 29.2752 Consumption_8 2.31199 45.7775 Consumption_9 1.73521 36.6129 Consumption_10 -1.19687 -25.9720 Consumption_11 0.75344 11.7537 Consumption_12 -0.10714 -1.2214 Consumption_13 -0.15519 -1.0863 Consumption_14 0.59434 6.6566 Consumption_15 -0.01083 -0.1332 Consumption_16 -0.02651 -0.3712 Consumption_17 2.78956 49.0963 Consumption_18 -0.74013 -12.8043 Consumption_19 0.52610 8.0494 Consumption_20 1.64635 31.2806 Consumption_21 1.28438 27.1004 Consumption_22 -4.05902 -95.3870 Investment_2 0.08318 1.0314 Investment_3 0.03433 0.5802 Investment_4 -0.30897 -5.6851 Investment_5 0.39771 7.7155 Investment_6 -0.09921 -1.9941 Investment_7 -0.40237 -7.8864 Investment_8 -0.22963 -4.5466 Investment_9 0.14106 2.9764 Investment_10 -0.33822 -7.3394 Investment_11 -0.06917 -1.0790 Investment_12 -0.01303 -0.1485 Investment_13 -0.08575 -0.6003 Investment_14 -0.10117 -1.1331 Investment_15 0.04575 0.5628 Investment_16 -0.00344 -0.0482 Investment_17 -0.28639 -5.0405 Investment_18 -0.00707 -0.1223 Investment_19 0.72832 11.1433 Investment_20 0.16360 3.1083 Investment_21 0.19490 4.1123 Investment_22 0.14635 3.4391 PrivateWages_2 -1.58896 -19.7031 PrivateWages_3 0.84394 14.2626 PrivateWages_4 2.20977 40.6598 PrivateWages_5 -0.04965 -0.9631 PrivateWages_6 -0.40373 -8.1150 PrivateWages_8 -1.00430 -19.8851 PrivateWages_9 0.50179 10.5878 PrivateWages_10 1.81021 39.2815 PrivateWages_11 -0.52455 -8.1830 PrivateWages_12 0.44676 5.0931 PrivateWages_13 -0.35330 -2.4731 PrivateWages_14 0.52303 5.8579 PrivateWages_15 0.39464 4.8541 PrivateWages_16 -0.03009 -0.4213 PrivateWages_17 -1.18225 -20.8075 PrivateWages_18 1.22307 21.1590 PrivateWages_19 -1.20633 -18.4569 PrivateWages_20 -0.59580 -11.3203 PrivateWages_21 -1.77014 -37.3499 PrivateWages_22 0.90407 21.2457 Consumption_corpProfLag Consumption_wages Consumption_2 -6.2957 -13.979 Consumption_3 -30.1249 -78.228 Consumption_4 -49.3706 -108.090 Consumption_5 -18.6512 -37.505 Consumption_6 -2.2919 -4.560 Consumption_7 30.0220 60.791 Consumption_8 45.3151 95.948 Consumption_9 34.3571 74.440 Consumption_10 -25.2539 -54.218 Consumption_11 16.3496 31.720 Consumption_12 -1.6714 -4.211 Consumption_13 -1.7691 -5.323 Consumption_14 4.1604 20.267 Consumption_15 -0.1213 -0.396 Consumption_16 -0.3261 -1.042 Consumption_17 39.0539 123.299 Consumption_18 -13.0263 -35.304 Consumption_19 9.1016 24.148 Consumption_20 25.1891 81.330 Consumption_21 24.4032 68.072 Consumption_22 -85.6453 -250.847 Investment_2 1.0563 2.346 Investment_3 0.4257 1.105 Investment_4 -5.2216 -11.432 Investment_5 7.3178 14.715 Investment_6 -1.9246 -3.829 Investment_7 -8.0876 -16.376 Investment_8 -4.5007 -9.530 Investment_9 2.7930 6.052 Investment_10 -7.1364 -15.321 Investment_11 -1.5009 -2.912 Investment_12 -0.2033 -0.512 Investment_13 -0.9776 -2.941 Investment_14 -0.7082 -3.450 Investment_15 0.5124 1.675 Investment_16 -0.0423 -0.135 Investment_17 -4.0095 -12.659 Investment_18 -0.1244 -0.337 Investment_19 12.5999 33.430 Investment_20 2.5030 8.082 Investment_21 3.7031 10.330 Investment_22 3.0879 9.044 PrivateWages_2 -20.1798 -44.809 PrivateWages_3 10.4649 27.175 PrivateWages_4 37.3452 81.762 PrivateWages_5 -0.9135 -1.837 PrivateWages_6 -7.8324 -15.584 PrivateWages_8 -19.6842 -41.678 PrivateWages_9 9.9355 21.527 PrivateWages_10 38.1953 82.002 PrivateWages_11 -11.3827 -22.084 PrivateWages_12 6.9695 17.558 PrivateWages_13 -4.0277 -12.118 PrivateWages_14 3.6612 17.835 PrivateWages_15 4.4200 14.444 PrivateWages_16 -0.3701 -1.183 PrivateWages_17 -16.5515 -52.255 PrivateWages_18 21.5260 58.340 PrivateWages_19 -20.8696 -55.371 PrivateWages_20 -9.1158 -29.433 PrivateWages_21 -33.6326 -93.817 PrivateWages_22 19.0759 55.872 Investment_(Intercept) Investment_corpProf Consumption_2 0.07653 0.9490 Consumption_3 0.37506 6.3385 Consumption_4 0.45100 8.2984 Consumption_5 0.15649 3.0359 Consumption_6 0.01824 0.3666 Consumption_7 -0.23059 -4.5195 Consumption_8 -0.35693 -7.0672 Consumption_9 -0.26788 -5.6523 Consumption_10 0.18477 4.0096 Consumption_11 -0.11632 -1.8145 Consumption_12 0.01654 0.1886 Consumption_13 0.02396 0.1677 Consumption_14 -0.09175 -1.0277 Consumption_15 0.00167 0.0206 Consumption_16 0.00409 0.0573 Consumption_17 -0.43066 -7.5796 Consumption_18 0.11426 1.9767 Consumption_19 -0.08122 -1.2427 Consumption_20 -0.25417 -4.8291 Consumption_21 -0.19828 -4.1838 Consumption_22 0.62664 14.7260 Investment_2 -0.44022 -5.4587 Investment_3 -0.18170 -3.0707 Investment_4 1.63526 30.0888 Investment_5 -2.10489 -40.8348 Investment_6 0.52506 10.5537 Investment_7 2.12955 41.7392 Investment_8 1.21532 24.0633 Investment_9 -0.74658 -15.7528 Investment_10 1.79005 38.8441 Investment_11 0.36607 5.7107 Investment_12 0.06896 0.7861 Investment_13 0.45385 3.1769 Investment_14 0.53544 5.9969 Investment_15 -0.24215 -2.9785 Investment_16 0.01822 0.2551 Investment_17 1.51576 26.6774 Investment_18 0.03741 0.6472 Investment_19 -3.85468 -58.9766 Investment_20 -0.86584 -16.4509 Investment_21 -1.03151 -21.7649 Investment_22 -0.77455 -18.2019 PrivateWages_2 0.75366 9.3454 PrivateWages_3 -0.40029 -6.7649 PrivateWages_4 -1.04812 -19.2855 PrivateWages_5 0.02355 0.4568 PrivateWages_6 0.19149 3.8490 PrivateWages_8 0.47635 9.4317 PrivateWages_9 -0.23801 -5.0219 PrivateWages_10 -0.85860 -18.6317 PrivateWages_11 0.24880 3.8813 PrivateWages_12 -0.21191 -2.4157 PrivateWages_13 0.16758 1.1730 PrivateWages_14 -0.24808 -2.7785 PrivateWages_15 -0.18718 -2.3024 PrivateWages_16 0.01427 0.1998 PrivateWages_17 0.56075 9.8693 PrivateWages_18 -0.58012 -10.0360 PrivateWages_19 0.57218 8.7543 PrivateWages_20 0.28260 5.3694 PrivateWages_21 0.83960 17.7155 PrivateWages_22 -0.42881 -10.0771 Investment_corpProfLag Investment_capitalLag Consumption_2 0.9719 13.990 Consumption_3 4.6507 68.486 Consumption_4 7.6219 83.210 Consumption_5 2.8794 29.686 Consumption_6 0.3538 3.515 Consumption_7 -4.6348 -45.611 Consumption_8 -6.9958 -72.599 Consumption_9 -5.3041 -55.613 Consumption_10 3.8987 38.913 Consumption_11 -2.5241 -25.090 Consumption_12 0.2580 3.584 Consumption_13 0.2731 5.110 Consumption_14 -0.6423 -19.002 Consumption_15 0.0187 0.338 Consumption_16 0.0503 0.815 Consumption_17 -6.0292 -85.141 Consumption_18 2.0110 22.830 Consumption_19 -1.4051 -16.390 Consumption_20 -3.8887 -50.808 Consumption_21 -3.7674 -39.895 Consumption_22 13.2221 128.147 Investment_2 -5.5908 -80.472 Investment_3 -2.2531 -33.179 Investment_4 27.6359 301.706 Investment_5 -38.7299 -399.297 Investment_6 10.1862 101.179 Investment_7 42.8040 421.225 Investment_8 23.8203 247.196 Investment_9 -14.7822 -154.989 Investment_10 37.7701 376.985 Investment_11 7.9437 78.961 Investment_12 1.0757 14.943 Investment_13 5.1739 96.806 Investment_14 3.7481 110.889 Investment_15 -2.7121 -48.915 Investment_16 0.2241 3.626 Investment_17 21.2206 299.666 Investment_18 0.6585 7.475 Investment_19 -66.6860 -777.874 Investment_20 -13.2473 -173.081 Investment_21 -19.5987 -207.540 Investment_22 -16.3429 -158.395 PrivateWages_2 9.5715 137.769 PrivateWages_3 -4.9636 -73.093 PrivateWages_4 -17.7133 -193.379 PrivateWages_5 0.4333 4.467 PrivateWages_6 3.7150 36.901 PrivateWages_8 9.3365 96.890 PrivateWages_9 -4.7125 -49.410 PrivateWages_10 -18.1165 -180.822 PrivateWages_11 5.3990 53.666 PrivateWages_12 -3.3057 -45.920 PrivateWages_13 1.9104 35.744 PrivateWages_14 -1.7366 -51.377 PrivateWages_15 -2.0965 -37.811 PrivateWages_16 0.1756 2.840 PrivateWages_17 7.8506 110.861 PrivateWages_18 -10.2100 -115.907 PrivateWages_19 9.8987 115.466 PrivateWages_20 4.3237 56.491 PrivateWages_21 15.9524 168.927 PrivateWages_22 -9.0479 -87.692 PrivateWages_(Intercept) PrivateWages_gnp PrivateWages_gnpLag Consumption_2 -0.40239 -18.349 -18.067 Consumption_3 -1.97202 -98.798 -89.924 Consumption_4 -2.37131 -135.639 -118.803 Consumption_5 -0.82280 -46.982 -47.064 Consumption_6 -0.09590 -5.850 -5.476 Consumption_7 0.00000 0.000 0.000 Consumption_8 1.87670 120.859 120.108 Consumption_9 1.40851 90.849 90.708 Consumption_10 -0.97152 -65.092 -62.663 Consumption_11 0.61158 37.429 40.976 Consumption_12 -0.08697 -4.644 -5.322 Consumption_13 -0.12597 -5.580 -6.727 Consumption_14 0.48244 21.758 21.372 Consumption_15 -0.00879 -0.437 -0.396 Consumption_16 -0.02152 -1.171 -1.070 Consumption_17 2.26435 141.975 123.181 Consumption_18 -0.60078 -39.051 -37.669 Consumption_19 0.42705 26.007 27.758 Consumption_20 1.33638 92.878 81.385 Consumption_21 1.04256 78.922 72.458 Consumption_22 -3.29479 -291.260 -249.416 Investment_2 0.20743 9.459 9.314 Investment_3 0.08562 4.289 3.904 Investment_4 -0.77054 -44.075 -38.604 Investment_5 0.99183 56.634 56.733 Investment_6 -0.24741 -15.092 -14.127 Investment_7 0.00000 0.000 0.000 Investment_8 -0.57266 -36.880 -36.650 Investment_9 0.35179 22.690 22.655 Investment_10 -0.84348 -56.513 -54.405 Investment_11 -0.17249 -10.557 -11.557 Investment_12 -0.03249 -1.735 -1.989 Investment_13 -0.21385 -9.474 -11.420 Investment_14 -0.25230 -11.379 -11.177 Investment_15 0.11410 5.671 5.146 Investment_16 -0.00859 -0.467 -0.427 Investment_17 -0.71423 -44.782 -38.854 Investment_18 -0.01763 -1.146 -1.105 Investment_19 1.81634 110.615 118.062 Investment_20 0.40799 28.355 24.846 Investment_21 0.48605 36.794 33.781 Investment_22 0.36497 32.263 27.628 PrivateWages_2 -3.69675 -168.572 -165.984 PrivateWages_3 1.96345 98.369 89.533 PrivateWages_4 5.14109 294.070 257.568 PrivateWages_5 -0.11550 -6.595 -6.607 PrivateWages_6 -0.93929 -57.297 -53.633 PrivateWages_8 -2.33652 -150.472 -149.537 PrivateWages_9 1.16743 75.299 75.183 PrivateWages_10 4.21148 282.169 271.641 PrivateWages_11 -1.22037 -74.687 -81.765 PrivateWages_12 1.03941 55.504 63.612 PrivateWages_13 -0.82197 -36.413 -43.893 PrivateWages_14 1.21684 54.880 53.906 PrivateWages_15 0.91815 45.632 41.409 PrivateWages_16 -0.07001 -3.809 -3.480 PrivateWages_17 -2.75052 -172.458 -149.628 PrivateWages_18 2.84549 184.957 178.412 PrivateWages_19 -2.80656 -170.920 -182.427 PrivateWages_20 -1.38615 -96.338 -84.417 PrivateWages_21 -4.11826 -311.753 -286.219 PrivateWages_22 2.10334 185.935 159.223 PrivateWages_trend Consumption_2 4.0239 Consumption_3 17.7482 Consumption_4 18.9705 Consumption_5 5.7596 Consumption_6 0.5754 Consumption_7 0.0000 Consumption_8 -7.5068 Consumption_9 -4.2255 Consumption_10 1.9430 Consumption_11 -0.6116 Consumption_12 0.0000 Consumption_13 -0.1260 Consumption_14 0.9649 Consumption_15 -0.0264 Consumption_16 -0.0861 Consumption_17 11.3217 Consumption_18 -3.6047 Consumption_19 2.9894 Consumption_20 10.6910 Consumption_21 9.3830 Consumption_22 -32.9479 Investment_2 -2.0743 Investment_3 -0.7706 Investment_4 6.1643 Investment_5 -6.9428 Investment_6 1.4845 Investment_7 0.0000 Investment_8 2.2907 Investment_9 -1.0554 Investment_10 1.6870 Investment_11 0.1725 Investment_12 0.0000 Investment_13 -0.2139 Investment_14 -0.5046 Investment_15 0.3423 Investment_16 -0.0343 Investment_17 -3.5712 Investment_18 -0.1058 Investment_19 12.7144 Investment_20 3.2639 Investment_21 4.3745 Investment_22 3.6497 PrivateWages_2 36.9675 PrivateWages_3 -17.6711 PrivateWages_4 -41.1287 PrivateWages_5 0.8085 PrivateWages_6 5.6357 PrivateWages_8 9.3461 PrivateWages_9 -3.5023 PrivateWages_10 -8.4230 PrivateWages_11 1.2204 PrivateWages_12 0.0000 PrivateWages_13 -0.8220 PrivateWages_14 2.4337 PrivateWages_15 2.7544 PrivateWages_16 -0.2801 PrivateWages_17 -13.7526 PrivateWages_18 17.0729 PrivateWages_19 -19.6459 PrivateWages_20 -11.0892 PrivateWages_21 -37.0644 PrivateWages_22 21.0334 [1] TRUE > Bread Consumption_(Intercept) Consumption_corpProf Consumption_corpProfLag [1,] 85.2889 -0.01362 -0.83841 [2,] -0.0136 0.37283 -0.23220 [3,] -0.8384 -0.23220 0.36858 [4,] -1.6590 -0.05994 -0.03120 [5,] -3.1844 -0.68255 0.70355 [6,] 0.0595 0.01846 -0.01774 [7,] -0.0239 -0.01745 0.02009 [8,] 0.0127 0.00329 -0.00362 [9,] -36.0142 0.07978 1.66083 [10,] 0.3888 -0.06209 0.04032 [11,] 0.2001 0.06287 -0.07012 [12,] 0.1814 0.03185 0.02619 Consumption_wages Investment_(Intercept) Investment_corpProf [1,] -1.66e+00 -3.184 0.05950 [2,] -5.99e-02 -0.683 0.01846 [3,] -3.12e-02 0.704 -0.01774 [4,] 7.69e-02 0.082 -0.00204 [5,] 8.20e-02 1298.386 -12.39923 [6,] -2.04e-03 -12.399 0.41486 [7,] -2.16e-05 9.908 -0.35328 [8,] -2.54e-04 -6.230 0.05576 [9,] 1.50e-01 24.451 -0.18195 [10,] 6.53e-06 0.391 0.02158 [11,] -2.68e-03 -0.821 -0.01913 [12,] -2.78e-02 -0.890 0.00590 Investment_corpProfLag Investment_capitalLag PrivateWages_(Intercept) [1,] -2.39e-02 0.012670 -36.0142 [2,] -1.75e-02 0.003286 0.0798 [3,] 2.01e-02 -0.003616 1.6608 [4,] -2.16e-05 -0.000254 0.1499 [5,] 9.91e+00 -6.230058 24.4513 [6,] -3.53e-01 0.055757 -0.1819 [7,] 4.47e-01 -0.056152 -0.6460 [8,] -5.62e-02 0.030966 -0.0512 [9,] -6.46e-01 -0.051180 80.1680 [10,] -1.22e-02 -0.002778 -0.3588 [11,] 2.36e-02 0.003775 -0.9890 [12,] -1.61e-02 0.005268 0.9201 PrivateWages_gnp PrivateWages_gnpLag PrivateWages_trend [1,] 3.89e-01 0.20005 0.18143 [2,] -6.21e-02 0.06287 0.03185 [3,] 4.03e-02 -0.07012 0.02619 [4,] 6.53e-06 -0.00268 -0.02782 [5,] 3.91e-01 -0.82129 -0.89038 [6,] 2.16e-02 -0.01913 0.00590 [7,] -1.22e-02 0.02360 -0.01606 [8,] -2.78e-03 0.00377 0.00527 [9,] -3.59e-01 -0.98896 0.92007 [10,] 4.82e-02 -0.04360 -0.01308 [11,] -4.36e-02 0.06217 -0.00244 [12,] -1.31e-02 -0.00244 0.04948 > > # 3SLS > summary systemfit results method: 3SLS N DF SSR detRCov OLS-R2 McElroy-R2 system 60 48 62.6 0.265 0.968 0.994 N DF SSR MSE RMSE R2 Adj R2 Consumption 20 16 17.8 1.114 1.06 0.981 0.977 Investment 20 16 34.3 2.143 1.46 0.853 0.825 PrivateWages 20 16 10.5 0.656 0.81 0.987 0.984 The covariance matrix of the residuals used for estimation Consumption Investment PrivateWages Consumption 1.034 0.309 -0.383 Investment 0.309 1.151 0.202 PrivateWages -0.383 0.202 0.487 The covariance matrix of the residuals Consumption Investment PrivateWages Consumption 0.891 0.304 -0.391 Investment 0.304 1.715 0.388 PrivateWages -0.391 0.388 0.525 The correlations of the residuals Consumption Investment PrivateWages Consumption 1.000 0.246 -0.571 Investment 0.246 1.000 0.409 PrivateWages -0.571 0.409 1.000 3SLS estimates for 'Consumption' (equation 1) Model Formula: consump ~ corpProf + corpProfLag + wages Instruments: ~govExp + taxes + govWage + trend + capitalLag + corpProfLag + gnpLag Estimate Std. Error t value Pr(>|t|) (Intercept) 16.3668 1.3024 12.57 1.1e-09 *** corpProf 0.1186 0.1073 1.10 0.29 corpProfLag 0.1448 0.1008 1.44 0.17 wages 0.8006 0.0391 20.47 6.7e-13 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.056 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 17.825 MSE: 1.114 Root MSE: 1.056 Multiple R-Squared: 0.981 Adjusted R-Squared: 0.977 3SLS estimates for 'Investment' (equation 2) Model Formula: invest ~ corpProf + corpProfLag + capitalLag Instruments: ~govExp + taxes + govWage + trend + capitalLag + corpProfLag + gnpLag Estimate Std. Error t value Pr(>|t|) (Intercept) 24.8872 6.2956 3.95 0.00114 ** corpProf 0.0702 0.1458 0.48 0.63648 corpProfLag 0.6688 0.1402 4.77 0.00021 *** capitalLag -0.1786 0.0303 -5.90 2.3e-05 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.464 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 34.295 MSE: 2.143 Root MSE: 1.464 Multiple R-Squared: 0.853 Adjusted R-Squared: 0.825 3SLS estimates for 'PrivateWages' (equation 3) Model Formula: privWage ~ gnp + gnpLag + trend Instruments: ~govExp + taxes + govWage + trend + capitalLag + corpProfLag + gnpLag Estimate Std. Error t value Pr(>|t|) (Intercept) 1.6387 1.1457 1.43 0.17188 gnp 0.4062 0.0324 12.52 1.1e-09 *** gnpLag 0.1784 0.0347 5.14 1.0e-04 *** trend 0.1435 0.0292 4.91 0.00016 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 0.81 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 10.497 MSE: 0.656 Root MSE: 0.81 Multiple R-Squared: 0.987 Adjusted R-Squared: 0.984 > residuals Consumption Investment PrivateWages 1 NA NA NA 2 -0.3538 -1.795 -1.2388 3 -0.9465 0.154 0.4649 4 -1.4189 0.678 1.4344 5 -0.3546 -1.666 -0.1354 6 0.1366 0.251 -0.3452 7 NA NA NA 8 1.4213 1.150 -0.7445 9 1.2173 0.476 0.3001 10 -0.4636 2.200 1.2232 11 -0.0650 -0.962 -0.4104 12 -0.5422 -0.808 0.2495 13 -0.7092 -1.098 -0.3057 14 0.4898 1.542 0.3497 15 -0.0502 -0.155 0.2949 16 0.0272 0.154 0.0214 17 1.8311 1.932 -0.7322 18 -0.4567 -0.180 0.9090 19 0.0650 -3.381 -0.7795 20 1.2135 0.557 -0.2847 21 0.9466 0.167 -1.0812 22 -1.9877 0.784 0.8102 > fitted Consumption Investment PrivateWages 1 NA NA NA 2 42.3 1.595 26.7 3 45.9 1.746 28.8 4 50.6 4.522 32.7 5 51.0 4.666 34.0 6 52.5 4.849 35.7 7 NA NA NA 8 54.8 3.050 38.6 9 56.1 2.524 38.9 10 58.3 2.900 40.1 11 55.1 1.962 38.3 12 51.4 -2.592 34.3 13 46.3 -5.102 29.3 14 46.0 -6.642 28.2 15 48.8 -2.845 30.3 16 51.3 -1.454 33.2 17 55.9 0.168 37.5 18 59.2 2.180 40.1 19 57.4 1.481 39.0 20 60.4 0.743 41.9 21 64.1 3.133 46.1 22 71.7 4.116 52.5 > predict Consumption.pred Consumption.se.fit Consumption.lwr Consumption.upr 1 NA NA NA NA 2 42.3 0.468 39.8 44.7 3 45.9 0.543 43.4 48.5 4 50.6 0.352 48.3 53.0 5 51.0 0.407 48.6 53.4 6 52.5 0.411 50.1 54.9 7 NA NA NA NA 8 54.8 0.340 52.4 57.1 9 56.1 0.372 53.7 58.5 10 58.3 0.387 55.9 60.6 11 55.1 0.687 52.4 57.7 12 51.4 0.558 48.9 54.0 13 46.3 0.713 43.6 49.0 14 46.0 0.599 43.4 48.6 15 48.8 0.368 46.4 51.1 16 51.3 0.326 48.9 53.6 17 55.9 0.388 53.5 58.3 18 59.2 0.319 56.8 61.5 19 57.4 0.391 55.0 59.8 20 60.4 0.457 57.9 62.8 21 64.1 0.437 61.6 66.5 22 71.7 0.674 69.0 74.3 Investment.pred Investment.se.fit Investment.lwr Investment.upr 1 NA NA NA NA 2 1.595 0.731 -1.8742 5.065 3 1.746 0.533 -1.5566 5.050 4 4.522 0.484 1.2530 7.791 5 4.666 0.406 1.4458 7.887 6 4.849 0.386 1.6390 8.058 7 NA NA NA NA 8 3.050 0.325 -0.1296 6.229 9 2.524 0.467 -0.7334 5.782 10 2.900 0.515 -0.3900 6.190 11 1.962 0.769 -1.5438 5.467 12 -2.592 0.608 -5.9519 0.769 13 -5.102 0.774 -8.6129 -1.592 14 -6.642 0.807 -10.1867 -3.098 15 -2.845 0.395 -6.0599 0.370 16 -1.454 0.341 -4.6409 1.733 17 0.168 0.442 -3.0739 3.410 18 2.180 0.281 -0.9807 5.340 19 1.481 0.414 -1.7440 4.706 20 0.743 0.492 -2.5310 4.017 21 3.133 0.414 -0.0924 6.358 22 4.116 0.583 0.7756 7.457 PrivateWages.pred PrivateWages.se.fit PrivateWages.lwr PrivateWages.upr 1 NA NA NA NA 2 26.7 0.322 24.9 28.6 3 28.8 0.328 27.0 30.7 4 32.7 0.340 30.8 34.5 5 34.0 0.250 32.2 35.8 6 35.7 0.257 33.9 37.5 7 NA NA NA NA 8 38.6 0.254 36.8 40.4 9 38.9 0.241 37.1 40.7 10 40.1 0.235 38.3 41.9 11 38.3 0.325 36.5 40.2 12 34.3 0.349 32.4 36.1 13 29.3 0.425 27.4 31.2 14 28.2 0.340 26.3 30.0 15 30.3 0.326 28.5 32.2 16 33.2 0.272 31.4 35.0 17 37.5 0.273 35.7 39.3 18 40.1 0.214 38.3 41.9 19 39.0 0.336 37.1 40.8 20 41.9 0.290 40.1 43.7 21 46.1 0.305 44.2 47.9 22 52.5 0.479 50.5 54.5 > model.frame [1] TRUE > model.matrix [1] "Attributes: < Component \"dim\": Mean relative difference: 0.0323 >" [2] "Attributes: < Component \"dimnames\": Component 1: 55 string mismatches >" [3] "Numeric: lengths (744, 720) differ" > nobs [1] 60 > linearHypothesis Linear hypothesis test (Theil's F test) Hypothesis: Consumption_corpProf + Investment_capitalLag = 0 Model 1: restricted model Model 2: kleinModel Res.Df Df F Pr(>F) 1 49 2 48 1 0.22 0.64 Linear hypothesis test (F statistic of a Wald test) Hypothesis: Consumption_corpProf + Investment_capitalLag = 0 Model 1: restricted model Model 2: kleinModel Res.Df Df F Pr(>F) 1 49 2 48 1 0.29 0.59 Linear hypothesis test (Chi^2 statistic of a Wald test) Hypothesis: Consumption_corpProf + Investment_capitalLag = 0 Model 1: restricted model Model 2: kleinModel Res.Df Df Chisq Pr(>Chisq) 1 49 2 48 1 0.29 0.59 Linear hypothesis test (Theil's F test) Hypothesis: Consumption_corpProf + Investment_capitalLag = 0 Consumption_corpProfLag - PrivateWages_trend = 0 Model 1: restricted model Model 2: kleinModel Res.Df Df F Pr(>F) 1 50 2 48 2 0.29 0.75 Linear hypothesis test (F statistic of a Wald test) Hypothesis: Consumption_corpProf + Investment_capitalLag = 0 Consumption_corpProfLag - PrivateWages_trend = 0 Model 1: restricted model Model 2: kleinModel Res.Df Df F Pr(>F) 1 50 2 48 2 0.38 0.68 Linear hypothesis test (Chi^2 statistic of a Wald test) Hypothesis: Consumption_corpProf + Investment_capitalLag = 0 Consumption_corpProfLag - PrivateWages_trend = 0 Model 1: restricted model Model 2: kleinModel Res.Df Df Chisq Pr(>Chisq) 1 50 2 48 2 0.77 0.68 > logLik 'log Lik.' -71.9 (df=18) 'log Lik.' -82.9 (df=18) Estimating function Consumption_(Intercept) Consumption_corpProf Consumption_2 -2.1852 -28.316 Consumption_3 -1.2615 -21.074 Consumption_4 -0.7432 -14.221 Consumption_5 -4.1386 -86.649 Consumption_6 0.0344 0.669 Consumption_8 5.9528 102.039 Consumption_9 3.6199 70.548 Consumption_10 1.2130 24.820 Consumption_11 -2.3309 -39.266 Consumption_12 -1.5509 -19.665 Consumption_13 -2.9298 -26.139 Consumption_14 2.9907 27.815 Consumption_15 -1.7611 -22.533 Consumption_16 -1.0403 -14.834 Consumption_17 7.8605 115.957 Consumption_18 -1.2660 -24.744 Consumption_19 -6.1974 -119.976 Consumption_20 4.2546 73.971 Consumption_21 1.7695 35.564 Consumption_22 -2.2905 -52.365 Investment_2 1.5294 19.818 Investment_3 -0.1395 -2.330 Investment_4 -0.5222 -9.992 Investment_5 1.4794 30.973 Investment_6 -0.2466 -4.801 Investment_8 -1.1148 -19.108 Investment_9 -0.4909 -9.566 Investment_10 -1.9066 -39.013 Investment_11 0.8748 14.736 Investment_12 0.7489 9.496 Investment_13 1.0277 9.169 Investment_14 -1.3972 -12.995 Investment_15 0.1582 2.024 Investment_16 -0.1132 -1.614 Investment_17 -1.7775 -26.221 Investment_18 0.2812 5.496 Investment_19 3.0567 59.173 Investment_20 -0.5590 -9.719 Investment_21 -0.1981 -3.981 Investment_22 -0.6908 -15.792 PrivateWages_2 -3.3803 -43.802 PrivateWages_3 1.2445 20.789 PrivateWages_4 3.1328 59.947 PrivateWages_5 -2.9316 -61.378 PrivateWages_6 -0.3443 -6.703 PrivateWages_8 1.9219 32.944 PrivateWages_9 2.2216 43.296 PrivateWages_10 4.0703 83.288 PrivateWages_11 -2.6344 -44.377 PrivateWages_12 -0.6120 -7.760 PrivateWages_13 -2.5653 -22.887 PrivateWages_14 2.8669 26.663 PrivateWages_15 -0.5912 -7.565 PrivateWages_16 -0.6625 -9.447 PrivateWages_17 2.6204 38.656 PrivateWages_18 0.0477 0.933 PrivateWages_19 -7.1288 -138.006 PrivateWages_20 1.4620 25.419 PrivateWages_21 -1.3672 -27.479 PrivateWages_22 2.6294 60.113 Consumption_corpProfLag Consumption_wages Consumption_2 -27.752 -63.61 Consumption_3 -15.643 -40.21 Consumption_4 -12.560 -26.46 Consumption_5 -76.150 -161.61 Consumption_6 0.667 1.34 Consumption_8 116.675 236.66 Consumption_9 71.675 153.05 Consumption_10 25.593 53.50 Consumption_11 -50.581 -101.08 Consumption_12 -24.194 -61.19 Consumption_13 -33.399 -102.70 Consumption_14 20.935 98.78 Consumption_15 -19.724 -66.25 Consumption_16 -12.795 -41.59 Consumption_17 110.047 328.11 Consumption_18 -22.282 -60.30 Consumption_19 -107.216 -306.49 Consumption_20 65.095 205.74 Consumption_21 33.620 94.08 Consumption_22 -48.330 -139.53 Investment_2 19.424 44.52 Investment_3 -1.729 -4.45 Investment_4 -8.825 -18.59 Investment_5 27.221 57.77 Investment_6 -4.784 -9.58 Investment_8 -21.849 -44.32 Investment_9 -9.719 -20.75 Investment_10 -40.229 -84.09 Investment_11 18.983 37.94 Investment_12 11.683 29.55 Investment_13 11.716 36.03 Investment_14 -9.780 -46.15 Investment_15 1.772 5.95 Investment_16 -1.392 -4.53 Investment_17 -24.885 -74.20 Investment_18 4.949 13.39 Investment_19 52.880 151.16 Investment_20 -8.553 -27.03 Investment_21 -3.764 -10.53 Investment_22 -14.576 -42.08 PrivateWages_2 -42.929 -98.41 PrivateWages_3 15.432 39.67 PrivateWages_4 52.944 111.55 PrivateWages_5 -53.942 -114.48 PrivateWages_6 -6.679 -13.37 PrivateWages_8 37.670 76.41 PrivateWages_9 43.987 93.93 PrivateWages_10 85.884 179.53 PrivateWages_11 -57.165 -114.24 PrivateWages_12 -9.547 -24.14 PrivateWages_13 -29.244 -89.93 PrivateWages_14 20.068 94.68 PrivateWages_15 -6.622 -22.24 PrivateWages_16 -8.149 -26.49 PrivateWages_17 36.686 109.38 PrivateWages_18 0.840 2.27 PrivateWages_19 -123.329 -352.55 PrivateWages_20 22.369 70.70 PrivateWages_21 -25.977 -72.69 PrivateWages_22 55.481 160.18 Investment_(Intercept) Investment_corpProf Consumption_2 0.9588 12.424 Consumption_3 0.5535 9.246 Consumption_4 0.3261 6.240 Consumption_5 1.8159 38.018 Consumption_6 -0.0151 -0.294 Consumption_8 -2.6118 -44.771 Consumption_9 -1.5883 -30.954 Consumption_10 -0.5322 -10.890 Consumption_11 1.0227 17.228 Consumption_12 0.6805 8.628 Consumption_13 1.2855 11.469 Consumption_14 -1.3122 -12.204 Consumption_15 0.7727 9.887 Consumption_16 0.4564 6.508 Consumption_17 -3.4489 -50.877 Consumption_18 0.5555 10.857 Consumption_19 2.7192 52.640 Consumption_20 -1.8667 -32.456 Consumption_21 -0.7764 -15.604 Consumption_22 1.0050 22.976 Investment_2 -2.3899 -30.969 Investment_3 0.2179 3.641 Investment_4 0.8160 15.614 Investment_5 -2.3118 -48.401 Investment_6 0.3854 7.502 Investment_8 1.7420 29.860 Investment_9 0.7670 14.948 Investment_10 2.9794 60.964 Investment_11 -1.3670 -23.027 Investment_12 -1.1702 -14.838 Investment_13 -1.6060 -14.328 Investment_14 2.1833 20.306 Investment_15 -0.2472 -3.163 Investment_16 0.1769 2.522 Investment_17 2.7776 40.974 Investment_18 -0.4394 -8.588 Investment_19 -4.7765 -92.468 Investment_20 0.8735 15.187 Investment_21 0.3095 6.221 Investment_22 1.0795 24.678 PrivateWages_2 2.1957 28.452 PrivateWages_3 -0.8084 -13.504 PrivateWages_4 -2.0349 -38.939 PrivateWages_5 1.9043 39.869 PrivateWages_6 0.2236 4.354 PrivateWages_8 -1.2484 -21.399 PrivateWages_9 -1.4431 -28.123 PrivateWages_10 -2.6439 -54.100 PrivateWages_11 1.7112 28.826 PrivateWages_12 0.3975 5.041 PrivateWages_13 1.6663 14.867 PrivateWages_14 -1.8622 -17.319 PrivateWages_15 0.3840 4.914 PrivateWages_16 0.4304 6.137 PrivateWages_17 -1.7021 -25.110 PrivateWages_18 -0.0310 -0.606 PrivateWages_19 4.6306 89.644 PrivateWages_20 -0.9497 -16.511 PrivateWages_21 0.8881 17.849 PrivateWages_22 -1.7080 -39.047 Investment_corpProfLag Investment_capitalLag Consumption_2 12.176 175.26 Consumption_3 6.864 101.07 Consumption_4 5.511 60.16 Consumption_5 33.412 344.47 Consumption_6 -0.293 -2.91 Consumption_8 -51.192 -531.25 Consumption_9 -31.448 -329.73 Consumption_10 -11.229 -112.08 Consumption_11 22.193 220.60 Consumption_12 10.615 147.46 Consumption_13 14.654 274.19 Consumption_14 -9.185 -271.76 Consumption_15 8.654 156.08 Consumption_16 5.614 90.83 Consumption_17 -48.284 -681.84 Consumption_18 9.776 110.98 Consumption_19 47.042 548.73 Consumption_20 -28.561 -373.16 Consumption_21 -14.751 -156.21 Consumption_22 21.205 205.52 Investment_2 -30.352 -436.88 Investment_3 2.702 39.79 Investment_4 13.790 150.55 Investment_5 -42.537 -438.54 Investment_6 7.476 74.26 Investment_8 34.143 354.32 Investment_9 15.187 159.24 Investment_10 62.865 627.45 Investment_11 -29.663 -294.86 Investment_12 -18.256 -253.59 Investment_13 -18.308 -342.55 Investment_14 15.283 452.17 Investment_15 -2.768 -49.93 Investment_16 2.176 35.20 Investment_17 38.886 549.13 Investment_18 -7.734 -87.79 Investment_19 -82.633 -963.90 Investment_20 13.365 174.61 Investment_21 5.881 62.28 Investment_22 22.777 220.75 PrivateWages_2 27.885 401.37 PrivateWages_3 -10.024 -147.61 PrivateWages_4 -34.390 -375.44 PrivateWages_5 35.039 361.24 PrivateWages_6 4.339 43.10 PrivateWages_8 -24.469 -253.93 PrivateWages_9 -28.572 -299.58 PrivateWages_10 -55.787 -556.81 PrivateWages_11 37.132 369.10 PrivateWages_12 6.201 86.14 PrivateWages_13 18.996 355.42 PrivateWages_14 -13.035 -385.66 PrivateWages_15 4.301 77.58 PrivateWages_16 5.293 85.64 PrivateWages_17 -23.830 -336.51 PrivateWages_18 -0.546 -6.19 PrivateWages_19 80.110 934.46 PrivateWages_20 -14.530 -189.84 PrivateWages_21 16.874 178.68 PrivateWages_22 -36.038 -349.28 PrivateWages_(Intercept) PrivateWages_gnp PrivateWages_gnpLag Consumption_2 -2.1174 -99.67 -95.07 Consumption_3 -1.2224 -60.61 -55.74 Consumption_4 -0.7201 -40.72 -36.08 Consumption_5 -4.0103 -243.37 -229.39 Consumption_6 0.0333 2.02 1.90 Consumption_8 5.7682 346.08 369.17 Consumption_9 3.5077 218.42 225.90 Consumption_10 1.1754 75.89 75.81 Consumption_11 -2.2587 -143.90 -151.33 Consumption_12 -1.5028 -82.40 -91.97 Consumption_13 -2.8389 -133.36 -151.60 Consumption_14 2.8980 122.09 128.38 Consumption_15 -1.7065 -87.40 -76.96 Consumption_16 -1.0080 -55.78 -50.10 Consumption_17 7.6168 437.16 414.35 Consumption_18 -1.2268 -82.41 -76.92 Consumption_19 -6.0053 -411.44 -390.34 Consumption_20 4.1227 275.58 251.07 Consumption_21 1.7146 128.37 119.16 Consumption_22 -2.2195 -192.83 -168.02 Investment_2 2.1940 103.27 98.51 Investment_3 -0.2001 -9.92 -9.12 Investment_4 -0.7491 -42.36 -37.53 Investment_5 2.1223 128.79 121.39 Investment_6 -0.3538 -21.44 -20.20 Investment_8 -1.5992 -95.95 -102.35 Investment_9 -0.7042 -43.85 -45.35 Investment_10 -2.7351 -176.60 -176.41 Investment_11 1.2549 79.95 84.08 Investment_12 1.0743 58.91 65.75 Investment_13 1.4743 69.26 78.73 Investment_14 -2.0044 -84.44 -88.79 Investment_15 0.2269 11.62 10.23 Investment_16 -0.1624 -8.99 -8.07 Investment_17 -2.5499 -146.35 -138.71 Investment_18 0.4034 27.10 25.29 Investment_19 4.3849 300.42 285.02 Investment_20 -0.8019 -53.60 -48.84 Investment_21 -0.2842 -21.27 -19.75 Investment_22 -0.9910 -86.09 -75.02 PrivateWages_2 -7.3399 -345.49 -329.56 PrivateWages_3 2.7024 133.99 123.23 PrivateWages_4 6.8025 384.63 340.81 PrivateWages_5 -6.3658 -386.31 -364.12 PrivateWages_6 -0.7476 -45.31 -42.69 PrivateWages_8 4.1733 250.39 267.09 PrivateWages_9 4.8240 300.38 310.66 PrivateWages_10 8.8383 570.68 570.07 PrivateWages_11 -5.7203 -364.45 -383.26 PrivateWages_12 -1.3289 -72.87 -81.33 PrivateWages_13 -5.5702 -261.67 -297.45 PrivateWages_14 6.2251 262.25 275.77 PrivateWages_15 -1.2838 -65.75 -57.90 PrivateWages_16 -1.4387 -79.61 -71.50 PrivateWages_17 5.6900 326.57 309.54 PrivateWages_18 0.1036 6.96 6.50 PrivateWages_19 -15.4796 -1060.55 -1006.17 PrivateWages_20 3.1746 212.21 193.34 PrivateWages_21 -2.9688 -222.26 -206.33 PrivateWages_22 5.7096 496.04 432.21 PrivateWages_trend Consumption_2 21.174 Consumption_3 11.002 Consumption_4 5.761 Consumption_5 28.072 Consumption_6 -0.200 Consumption_8 -23.073 Consumption_9 -10.523 Consumption_10 -2.351 Consumption_11 2.259 Consumption_12 0.000 Consumption_13 -2.839 Consumption_14 5.796 Consumption_15 -5.119 Consumption_16 -4.032 Consumption_17 38.084 Consumption_18 -7.361 Consumption_19 -42.037 Consumption_20 32.981 Consumption_21 15.431 Consumption_22 -22.195 Investment_2 -21.940 Investment_3 1.801 Investment_4 5.993 Investment_5 -14.856 Investment_6 2.123 Investment_8 6.397 Investment_9 2.112 Investment_10 5.470 Investment_11 -1.255 Investment_12 0.000 Investment_13 1.474 Investment_14 -4.009 Investment_15 0.681 Investment_16 -0.650 Investment_17 -12.749 Investment_18 2.420 Investment_19 30.694 Investment_20 -6.415 Investment_21 -2.557 Investment_22 -9.910 PrivateWages_2 73.399 PrivateWages_3 -24.321 PrivateWages_4 -54.420 PrivateWages_5 44.560 PrivateWages_6 4.486 PrivateWages_8 -16.693 PrivateWages_9 -14.472 PrivateWages_10 -17.677 PrivateWages_11 5.720 PrivateWages_12 0.000 PrivateWages_13 -5.570 PrivateWages_14 12.450 PrivateWages_15 -3.851 PrivateWages_16 -5.755 PrivateWages_17 28.450 PrivateWages_18 0.622 PrivateWages_19 -108.357 PrivateWages_20 25.397 PrivateWages_21 -26.719 PrivateWages_22 57.096 [1] TRUE > Bread Consumption_(Intercept) Consumption_corpProf Consumption_corpProfLag [1,] 101.7742 -0.858360 -0.3736 [2,] -0.8584 0.690973 -0.4670 [3,] -0.3736 -0.466994 0.6099 [4,] -1.8845 -0.076066 -0.0404 [5,] 84.1239 -0.877202 2.8173 [6,] -1.7843 0.267204 -0.2636 [7,] 0.6061 -0.218819 0.2875 [8,] -0.3146 -0.000285 -0.0152 [9,] -36.6570 0.120759 1.7724 [10,] 0.5673 -0.083944 0.0542 [11,] 0.0259 0.084615 -0.0868 [12,] 0.2015 0.041756 0.0283 Consumption_wages Investment_(Intercept) Investment_corpProf [1,] -1.884465 84.124 -1.7843 [2,] -0.076066 -0.877 0.2672 [3,] -0.040367 2.817 -0.2636 [4,] 0.091823 -2.748 0.0379 [5,] -2.748307 2378.068 -36.8158 [6,] 0.037919 -36.816 1.2756 [7,] -0.038383 31.099 -1.1022 [8,] 0.013629 -11.271 0.1659 [9,] 0.115318 17.951 -0.1175 [10,] -0.000915 1.841 0.0121 [11,] -0.000905 -2.197 -0.0106 [12,] -0.032751 -1.985 0.0278 Investment_corpProfLag Investment_capitalLag PrivateWages_(Intercept) [1,] 0.60609 -3.15e-01 -3.67e+01 [2,] -0.21882 -2.85e-04 1.21e-01 [3,] 0.28746 -1.52e-02 1.77e+00 [4,] -0.03838 1.36e-02 1.15e-01 [5,] 31.09923 -1.13e+01 1.80e+01 [6,] -1.10217 1.66e-01 -1.17e-01 [7,] 1.17984 -1.58e-01 -9.59e-01 [8,] -0.15817 5.51e-02 7.31e-04 [9,] -0.95890 7.31e-04 7.88e+01 [10,] 0.00248 -1.04e-02 -5.11e-01 [11,] 0.01419 1.07e-02 -8.12e-01 [12,] -0.04010 1.08e-02 9.53e-01 PrivateWages_gnp PrivateWages_gnpLag PrivateWages_trend [1,] 0.567318 0.025878 0.20145 [2,] -0.083944 0.084615 0.04176 [3,] 0.054179 -0.086845 0.02834 [4,] -0.000915 -0.000905 -0.03275 [5,] 1.840734 -2.196531 -1.98486 [6,] 0.012109 -0.010622 0.02782 [7,] 0.002479 0.014187 -0.04010 [8,] -0.010386 0.010690 0.01081 [9,] -0.511083 -0.811688 0.95314 [10,] 0.063161 -0.056453 -0.01901 [11,] -0.056453 0.072451 0.00297 [12,] -0.019011 0.002975 0.05128 > > # I3SLS > summary systemfit results method: iterated 3SLS convergence achieved after 22 iterations N DF SSR detRCov OLS-R2 McElroy-R2 system 60 48 107 0.47 0.946 0.996 N DF SSR MSE RMSE R2 Adj R2 Consumption 20 16 18.1 1.13 1.063 0.981 0.977 Investment 20 16 76.4 4.77 2.185 0.672 0.610 PrivateWages 20 16 12.3 0.77 0.877 0.984 0.982 The covariance matrix of the residuals used for estimation Consumption Investment PrivateWages Consumption 0.905 0.509 -0.437 Investment 0.509 3.819 0.709 PrivateWages -0.437 0.709 0.616 The covariance matrix of the residuals Consumption Investment PrivateWages Consumption 0.905 0.509 -0.437 Investment 0.509 3.819 0.709 PrivateWages -0.437 0.709 0.616 The correlations of the residuals Consumption Investment PrivateWages Consumption 1.000 0.274 -0.585 Investment 0.274 1.000 0.462 PrivateWages -0.585 0.462 1.000 3SLS estimates for 'Consumption' (equation 1) Model Formula: consump ~ corpProf + corpProfLag + wages Instruments: ~govExp + taxes + govWage + trend + capitalLag + corpProfLag + gnpLag Estimate Std. Error t value Pr(>|t|) (Intercept) 16.4728 1.2187 13.52 3.6e-10 *** corpProf 0.1642 0.0952 1.73 0.10 corpProfLag 0.1552 0.0903 1.72 0.11 wages 0.7756 0.0356 21.82 2.5e-13 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.063 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 18.095 MSE: 1.131 Root MSE: 1.063 Multiple R-Squared: 0.981 Adjusted R-Squared: 0.977 3SLS estimates for 'Investment' (equation 2) Model Formula: invest ~ corpProf + corpProfLag + capitalLag Instruments: ~govExp + taxes + govWage + trend + capitalLag + corpProfLag + gnpLag Estimate Std. Error t value Pr(>|t|) (Intercept) 38.7938 9.7249 3.99 0.00106 ** corpProf -0.2501 0.2337 -1.07 0.30036 corpProfLag 0.9129 0.2271 4.02 0.00099 *** capitalLag -0.2409 0.0469 -5.14 9.9e-05 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.185 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 76.371 MSE: 4.773 Root MSE: 2.185 Multiple R-Squared: 0.672 Adjusted R-Squared: 0.61 3SLS estimates for 'PrivateWages' (equation 3) Model Formula: privWage ~ gnp + gnpLag + trend Instruments: ~govExp + taxes + govWage + trend + capitalLag + corpProfLag + gnpLag Estimate Std. Error t value Pr(>|t|) (Intercept) 2.4620 1.2228 2.01 0.061 . gnp 0.3776 0.0318 11.88 2.4e-09 *** gnpLag 0.1937 0.0331 5.85 2.5e-05 *** trend 0.1619 0.0300 5.40 5.9e-05 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 0.877 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 12.318 MSE: 0.77 Root MSE: 0.877 Multiple R-Squared: 0.984 Adjusted R-Squared: 0.982 > residuals Consumption Investment PrivateWages 1 NA NA NA 2 -0.4522 -3.4485 -1.2596 3 -1.1470 0.0027 0.5437 4 -1.6147 0.0274 1.6290 5 -0.6117 -2.0392 -0.0707 6 -0.1229 0.0457 -0.1859 7 NA NA NA 8 1.2461 1.4658 -0.6304 9 1.0158 1.4202 0.3924 10 -0.6460 3.2062 1.3671 11 -0.0554 -1.7386 -0.4891 12 -0.3472 -1.3793 0.0179 13 -0.3947 -2.2646 -0.6968 14 0.6536 2.4092 0.1021 15 0.0821 -0.2787 0.1482 16 0.1381 0.1196 -0.0796 17 1.8826 2.5548 -0.6862 18 -0.3415 -0.4009 0.8755 19 0.2296 -4.0454 -0.9839 20 1.3178 1.4481 -0.1989 21 1.0065 0.9087 -0.9681 22 -1.8388 1.9868 1.1734 > fitted Consumption Investment PrivateWages 1 NA NA NA 2 42.4 3.249 26.8 3 46.1 1.897 28.8 4 50.8 5.173 32.5 5 51.2 5.039 34.0 6 52.7 5.054 35.6 7 NA NA NA 8 55.0 2.734 38.5 9 56.3 1.580 38.8 10 58.4 1.894 39.9 11 55.1 2.739 38.4 12 51.2 -2.021 34.5 13 46.0 -3.935 29.7 14 45.8 -7.509 28.4 15 48.6 -2.721 30.5 16 51.2 -1.420 33.3 17 55.8 -0.455 37.5 18 59.0 2.401 40.1 19 57.3 2.145 39.2 20 60.3 -0.148 41.8 21 64.0 2.391 46.0 22 71.5 2.913 52.1 > predict Consumption.pred Consumption.se.fit Consumption.lwr Consumption.upr 1 NA NA NA NA 2 42.4 0.437 41.5 43.2 3 46.1 0.492 45.2 47.1 4 50.8 0.321 50.2 51.5 5 51.2 0.369 50.5 52.0 6 52.7 0.372 52.0 53.5 7 NA NA NA NA 8 55.0 0.310 54.3 55.6 9 56.3 0.338 55.6 57.0 10 58.4 0.355 57.7 59.2 11 55.1 0.618 53.8 56.3 12 51.2 0.501 50.2 52.3 13 46.0 0.642 44.7 47.3 14 45.8 0.547 44.7 46.9 15 48.6 0.340 47.9 49.3 16 51.2 0.300 50.6 51.8 17 55.8 0.354 55.1 56.5 18 59.0 0.294 58.4 59.6 19 57.3 0.354 56.6 58.0 20 60.3 0.418 59.4 61.1 21 64.0 0.407 63.2 64.8 22 71.5 0.628 70.3 72.8 Investment.pred Investment.se.fit Investment.lwr Investment.upr 1 NA NA NA NA 2 3.249 1.160 0.91672 5.580 3 1.897 0.934 0.02009 3.775 4 5.173 0.803 3.55865 6.787 5 5.039 0.693 3.64486 6.433 6 5.054 0.674 3.69840 6.410 7 NA NA NA NA 8 2.734 0.584 1.56002 3.908 9 1.580 0.783 0.00466 3.155 10 1.894 0.868 0.14846 3.639 11 2.739 1.321 0.08241 5.395 12 -2.021 1.064 -4.16036 0.119 13 -3.935 1.349 -6.64712 -1.224 14 -7.509 1.360 -10.24349 -4.775 15 -2.721 0.712 -4.15288 -1.290 16 -1.420 0.614 -2.65412 -0.185 17 -0.455 0.751 -1.96433 1.055 18 2.401 0.498 1.39939 3.402 19 2.145 0.698 0.74152 3.549 20 -0.148 0.816 -1.78957 1.493 21 2.391 0.713 0.95855 3.824 22 2.913 0.984 0.93419 4.892 PrivateWages.pred PrivateWages.se.fit PrivateWages.lwr PrivateWages.upr 1 NA NA NA NA 2 26.8 0.347 26.1 27.5 3 28.8 0.348 28.1 29.5 4 32.5 0.354 31.8 33.2 5 34.0 0.263 33.4 34.5 6 35.6 0.274 35.0 36.1 7 NA NA NA NA 8 38.5 0.268 38.0 39.1 9 38.8 0.256 38.3 39.3 10 39.9 0.254 39.4 40.4 11 38.4 0.323 37.7 39.0 12 34.5 0.347 33.8 35.2 13 29.7 0.435 28.8 30.6 14 28.4 0.366 27.7 29.1 15 30.5 0.341 29.8 31.1 16 33.3 0.285 32.7 33.9 17 37.5 0.275 36.9 38.0 18 40.1 0.233 39.7 40.6 19 39.2 0.346 38.5 39.9 20 41.8 0.298 41.2 42.4 21 46.0 0.329 45.3 46.6 22 52.1 0.510 51.1 53.2 > model.frame [1] TRUE > model.matrix [1] "Attributes: < Component \"dim\": Mean relative difference: 0.0323 >" [2] "Attributes: < Component \"dimnames\": Component 1: 55 string mismatches >" [3] "Numeric: lengths (744, 720) differ" > nobs [1] 60 > linearHypothesis Linear hypothesis test (Theil's F test) Hypothesis: Consumption_corpProf + Investment_capitalLag = 0 Model 1: restricted model Model 2: kleinModel Res.Df Df F Pr(>F) 1 49 2 48 1 0.4 0.53 Linear hypothesis test (F statistic of a Wald test) Hypothesis: Consumption_corpProf + Investment_capitalLag = 0 Model 1: restricted model Model 2: kleinModel Res.Df Df F Pr(>F) 1 49 2 48 1 0.5 0.49 Linear hypothesis test (Chi^2 statistic of a Wald test) Hypothesis: Consumption_corpProf + Investment_capitalLag = 0 Model 1: restricted model Model 2: kleinModel Res.Df Df Chisq Pr(>Chisq) 1 49 2 48 1 0.5 0.48 Linear hypothesis test (Theil's F test) Hypothesis: Consumption_corpProf + Investment_capitalLag = 0 Consumption_corpProfLag - PrivateWages_trend = 0 Model 1: restricted model Model 2: kleinModel Res.Df Df F Pr(>F) 1 50 2 48 2 0.66 0.52 Linear hypothesis test (F statistic of a Wald test) Hypothesis: Consumption_corpProf + Investment_capitalLag = 0 Consumption_corpProfLag - PrivateWages_trend = 0 Model 1: restricted model Model 2: kleinModel Res.Df Df F Pr(>F) 1 50 2 48 2 0.83 0.44 Linear hypothesis test (Chi^2 statistic of a Wald test) Hypothesis: Consumption_corpProf + Investment_capitalLag = 0 Consumption_corpProfLag - PrivateWages_trend = 0 Model 1: restricted model Model 2: kleinModel Res.Df Df Chisq Pr(>Chisq) 1 50 2 48 2 1.66 0.44 > logLik 'log Lik.' -77.6 (df=18) 'log Lik.' -92.7 (df=18) Estimating function Consumption_(Intercept) Consumption_corpProf Consumption_2 -4.9216 -63.77 Consumption_3 -3.3974 -56.75 Consumption_4 -2.5781 -49.33 Consumption_5 -9.6538 -202.12 Consumption_6 -0.8124 -15.82 Consumption_8 11.9408 204.68 Consumption_9 6.9299 135.05 Consumption_10 1.8984 38.85 Consumption_11 -4.8868 -82.32 Consumption_12 -2.6585 -33.71 Consumption_13 -5.0990 -45.49 Consumption_14 7.0717 65.77 Consumption_15 -3.1138 -39.84 Consumption_16 -1.6973 -24.20 Consumption_17 16.7458 247.03 Consumption_18 -2.5779 -50.39 Consumption_19 -12.5621 -243.19 Consumption_20 9.4057 163.53 Consumption_21 4.0953 82.31 Consumption_22 -4.1289 -94.39 Investment_2 4.3863 56.84 Investment_3 0.0612 1.02 Investment_4 -0.2801 -5.36 Investment_5 2.1936 45.93 Investment_6 0.1486 2.89 Investment_8 -1.0616 -18.20 Investment_9 -1.3484 -26.28 Investment_10 -3.8396 -78.57 Investment_11 1.8918 31.87 Investment_12 1.4041 17.80 Investment_13 2.3647 21.10 Investment_14 -2.5638 -23.84 Investment_15 0.2053 2.63 Investment_16 -0.2445 -3.49 Investment_17 -2.4423 -36.03 Investment_18 -0.2128 -4.16 Investment_19 4.0168 77.76 Investment_20 -1.3846 -24.07 Investment_21 -0.8726 -17.54 Investment_22 -2.4220 -55.37 PrivateWages_2 -7.8312 -101.48 PrivateWages_3 3.1927 53.33 PrivateWages_4 8.1013 155.02 PrivateWages_5 -6.1495 -128.75 PrivateWages_6 -0.1677 -3.26 PrivateWages_8 4.4536 76.34 PrivateWages_9 5.3302 103.88 PrivateWages_10 9.8611 201.78 PrivateWages_11 -6.2042 -104.51 PrivateWages_12 -2.2572 -28.62 PrivateWages_13 -7.3701 -65.76 PrivateWages_14 5.2841 49.14 PrivateWages_15 -1.8316 -23.44 PrivateWages_16 -1.8732 -26.71 PrivateWages_17 5.6855 83.87 PrivateWages_18 0.2354 4.60 PrivateWages_19 -16.6516 -322.36 PrivateWages_20 3.4690 60.31 PrivateWages_21 -2.8192 -56.66 PrivateWages_22 7.5425 172.43 Consumption_corpProfLag Consumption_wages Consumption_2 -62.504 -143.28 Consumption_3 -42.128 -108.30 Consumption_4 -43.571 -91.80 Consumption_5 -177.629 -376.98 Consumption_6 -15.760 -31.55 Consumption_8 234.039 474.72 Consumption_9 137.212 292.99 Consumption_10 40.056 83.73 Consumption_11 -106.045 -211.93 Consumption_12 -41.472 -104.88 Consumption_13 -58.128 -178.75 Consumption_14 49.502 233.56 Consumption_15 -34.874 -117.14 Consumption_16 -20.877 -67.86 Consumption_17 234.441 699.00 Consumption_18 -45.372 -122.79 Consumption_19 -217.325 -621.24 Consumption_20 143.908 454.84 Consumption_21 77.811 217.74 Consumption_22 -87.120 -251.52 Investment_2 55.705 127.69 Investment_3 0.759 1.95 Investment_4 -4.734 -9.97 Investment_5 40.363 85.66 Investment_6 2.882 5.77 Investment_8 -20.807 -42.21 Investment_9 -26.697 -57.01 Investment_10 -81.017 -169.36 Investment_11 41.052 82.04 Investment_12 21.904 55.40 Investment_13 26.957 82.89 Investment_14 -17.946 -84.67 Investment_15 2.299 7.72 Investment_16 -3.007 -9.77 Investment_17 -34.192 -101.95 Investment_18 -3.746 -10.14 Investment_19 69.491 198.65 Investment_20 -21.185 -66.96 Investment_21 -16.580 -46.40 Investment_22 -51.104 -147.54 PrivateWages_2 -99.457 -227.98 PrivateWages_3 39.589 101.77 PrivateWages_4 136.911 288.46 PrivateWages_5 -113.151 -240.14 PrivateWages_6 -3.252 -6.51 PrivateWages_8 87.291 177.06 PrivateWages_9 105.538 225.36 PrivateWages_10 208.070 434.95 PrivateWages_11 -134.631 -269.05 PrivateWages_12 -35.213 -89.05 PrivateWages_13 -84.019 -258.36 PrivateWages_14 36.989 174.52 PrivateWages_15 -20.514 -68.91 PrivateWages_16 -23.040 -74.89 PrivateWages_17 79.598 237.33 PrivateWages_18 4.143 11.21 PrivateWages_19 -288.073 -823.48 PrivateWages_20 53.076 167.75 PrivateWages_21 -53.565 -149.89 PrivateWages_22 159.147 459.47 Investment_(Intercept) Investment_corpProf Consumption_2 1.6584 21.489 Consumption_3 1.1448 19.123 Consumption_4 0.8687 16.623 Consumption_5 3.2529 68.104 Consumption_6 0.2737 5.329 Consumption_8 -4.0235 -68.968 Consumption_9 -2.3351 -45.507 Consumption_10 -0.6397 -13.089 Consumption_11 1.6466 27.739 Consumption_12 0.8958 11.358 Consumption_13 1.7181 15.329 Consumption_14 -2.3828 -22.161 Consumption_15 1.0492 13.424 Consumption_16 0.5719 8.155 Consumption_17 -5.6426 -83.238 Consumption_18 0.8686 16.978 Consumption_19 4.2329 81.944 Consumption_20 -3.1693 -55.102 Consumption_21 -1.3799 -27.735 Consumption_22 1.3913 31.806 Investment_2 -2.5801 -33.433 Investment_3 -0.0360 -0.601 Investment_4 0.1648 3.153 Investment_5 -1.2904 -27.016 Investment_6 -0.0874 -1.701 Investment_8 0.6245 10.704 Investment_9 0.7931 15.457 Investment_10 2.2586 46.215 Investment_11 -1.1128 -18.746 Investment_12 -0.8259 -10.473 Investment_13 -1.3910 -12.410 Investment_14 1.5081 14.026 Investment_15 -0.1208 -1.545 Investment_16 0.1438 2.050 Investment_17 1.4366 21.193 Investment_18 0.1252 2.447 Investment_19 -2.3628 -45.741 Investment_20 0.8145 14.161 Investment_21 0.5133 10.317 Investment_22 1.4247 32.570 PrivateWages_2 3.3346 43.210 PrivateWages_3 -1.3594 -22.709 PrivateWages_4 -3.4495 -66.008 PrivateWages_5 2.6185 54.822 PrivateWages_6 0.0714 1.390 PrivateWages_8 -1.8964 -32.506 PrivateWages_9 -2.2696 -44.232 PrivateWages_10 -4.1989 -85.919 PrivateWages_11 2.6418 44.502 PrivateWages_12 0.9611 12.187 PrivateWages_13 3.1382 27.999 PrivateWages_14 -2.2500 -20.926 PrivateWages_15 0.7799 9.979 PrivateWages_16 0.7976 11.373 PrivateWages_17 -2.4209 -35.713 PrivateWages_18 -0.1002 -1.959 PrivateWages_19 7.0903 137.261 PrivateWages_20 -1.4771 -25.682 PrivateWages_21 1.2004 24.127 PrivateWages_22 -3.2116 -73.422 Investment_corpProfLag Investment_capitalLag Consumption_2 21.061 303.15 Consumption_3 14.195 209.04 Consumption_4 14.681 160.28 Consumption_5 59.853 617.07 Consumption_6 5.310 52.75 Consumption_8 -78.860 -818.38 Consumption_9 -46.234 -484.76 Consumption_10 -13.497 -134.72 Consumption_11 35.732 355.18 Consumption_12 13.974 194.12 Consumption_13 19.587 366.47 Consumption_14 -16.680 -493.49 Consumption_15 11.751 211.94 Consumption_16 7.034 113.81 Consumption_17 -78.996 -1115.54 Consumption_18 15.288 173.56 Consumption_19 73.229 854.19 Consumption_20 -48.490 -633.54 Consumption_21 -26.219 -277.64 Consumption_22 29.355 284.51 Investment_2 -32.767 -471.64 Investment_3 -0.446 -6.57 Investment_4 2.785 30.40 Investment_5 -23.742 -244.78 Investment_6 -1.695 -16.84 Investment_8 12.239 127.02 Investment_9 15.704 164.66 Investment_10 47.656 475.66 Investment_11 -24.148 -240.03 Investment_12 -12.884 -178.98 Investment_13 -15.857 -296.69 Investment_14 10.556 312.32 Investment_15 -1.352 -24.39 Investment_16 1.769 28.62 Investment_17 20.113 284.02 Investment_18 2.203 25.01 Investment_19 -40.876 -476.81 Investment_20 12.461 162.81 Investment_21 9.753 103.28 Investment_22 30.061 291.35 PrivateWages_2 42.349 609.56 PrivateWages_3 -16.857 -248.23 PrivateWages_4 -58.297 -636.44 PrivateWages_5 48.180 496.72 PrivateWages_6 1.385 13.76 PrivateWages_8 -37.169 -385.72 PrivateWages_9 -44.939 -471.17 PrivateWages_10 -88.597 -884.29 PrivateWages_11 57.326 569.83 PrivateWages_12 14.994 208.28 PrivateWages_13 35.776 669.38 PrivateWages_14 -15.750 -465.97 PrivateWages_15 8.735 157.54 PrivateWages_16 9.810 158.72 PrivateWages_17 -33.893 -478.62 PrivateWages_18 -1.764 -20.03 PrivateWages_19 122.662 1430.82 PrivateWages_20 -22.600 -295.28 PrivateWages_21 22.808 241.53 PrivateWages_22 -67.765 -656.78 PrivateWages_(Intercept) PrivateWages_gnp PrivateWages_gnpLag Consumption_2 -5.3990 -254.13 -242.42 Consumption_3 -3.7270 -184.79 -169.95 Consumption_4 -2.8282 -159.92 -141.69 Consumption_5 -10.5903 -642.68 -605.76 Consumption_6 -0.8912 -54.02 -50.89 Consumption_8 13.0991 785.91 838.34 Consumption_9 7.6022 473.37 489.58 Consumption_10 2.0826 134.47 134.33 Consumption_11 -5.3609 -341.55 -359.18 Consumption_12 -2.9163 -159.91 -178.48 Consumption_13 -5.5936 -262.77 -298.70 Consumption_14 7.7577 326.81 343.67 Consumption_15 -3.4158 -174.95 -154.05 Consumption_16 -1.8619 -103.04 -92.54 Consumption_17 18.3702 1054.34 999.34 Consumption_18 -2.8280 -189.97 -177.32 Consumption_19 -13.7808 -944.16 -895.75 Consumption_20 10.3182 689.71 628.38 Consumption_21 4.4926 336.34 312.24 Consumption_22 -4.5294 -393.51 -342.88 Investment_2 6.0805 286.21 273.02 Investment_3 0.0848 4.21 3.87 Investment_4 -0.3883 -21.96 -19.45 Investment_5 3.0410 184.55 173.94 Investment_6 0.2060 12.48 11.76 Investment_8 -1.4717 -88.30 -94.19 Investment_9 -1.8692 -116.39 -120.38 Investment_10 -5.3228 -343.69 -343.32 Investment_11 2.6225 167.09 175.71 Investment_12 1.9465 106.73 119.12 Investment_13 3.2781 154.00 175.05 Investment_14 -3.5541 -149.72 -157.44 Investment_15 0.2846 14.58 12.84 Investment_16 -0.3389 -18.75 -16.84 Investment_17 -3.3857 -194.32 -184.18 Investment_18 -0.2951 -19.82 -18.50 Investment_19 5.5684 381.50 361.95 Investment_20 -1.9195 -128.31 -116.90 Investment_21 -1.2097 -90.57 -84.07 Investment_22 -3.3575 -291.70 -254.16 PrivateWages_2 -12.3381 -580.75 -553.98 PrivateWages_3 5.0300 249.39 229.37 PrivateWages_4 12.7635 721.68 639.45 PrivateWages_5 -9.6885 -587.96 -554.18 PrivateWages_6 -0.2641 -16.01 -15.08 PrivateWages_8 7.0167 420.99 449.07 PrivateWages_9 8.3978 522.92 540.82 PrivateWages_10 15.5362 1003.16 1002.09 PrivateWages_11 -9.7747 -622.76 -654.90 PrivateWages_12 -3.5562 -195.00 -217.64 PrivateWages_13 -11.6116 -545.48 -620.06 PrivateWages_14 8.3251 350.72 368.80 PrivateWages_15 -2.8858 -147.80 -130.15 PrivateWages_16 -2.9512 -163.31 -146.67 PrivateWages_17 8.9576 514.11 487.29 PrivateWages_18 0.3709 24.92 23.26 PrivateWages_19 -26.2346 -1797.40 -1705.25 PrivateWages_20 5.4654 365.33 332.84 PrivateWages_21 -4.4417 -332.53 -308.70 PrivateWages_22 11.8832 1032.40 899.56 PrivateWages_trend Consumption_2 53.990 Consumption_3 33.543 Consumption_4 22.626 Consumption_5 74.132 Consumption_6 5.347 Consumption_8 -52.396 Consumption_9 -22.806 Consumption_10 -4.165 Consumption_11 5.361 Consumption_12 0.000 Consumption_13 -5.594 Consumption_14 15.515 Consumption_15 -10.247 Consumption_16 -7.448 Consumption_17 91.851 Consumption_18 -16.968 Consumption_19 -96.465 Consumption_20 82.545 Consumption_21 40.433 Consumption_22 -45.294 Investment_2 -60.805 Investment_3 -0.763 Investment_4 3.106 Investment_5 -21.287 Investment_6 -1.236 Investment_8 5.887 Investment_9 5.608 Investment_10 10.646 Investment_11 -2.623 Investment_12 0.000 Investment_13 3.278 Investment_14 -7.108 Investment_15 0.854 Investment_16 -1.356 Investment_17 -16.928 Investment_18 -1.770 Investment_19 38.979 Investment_20 -15.356 Investment_21 -10.887 Investment_22 -33.575 PrivateWages_2 123.381 PrivateWages_3 -45.270 PrivateWages_4 -102.108 PrivateWages_5 67.820 PrivateWages_6 1.585 PrivateWages_8 -28.067 PrivateWages_9 -25.193 PrivateWages_10 -31.072 PrivateWages_11 9.775 PrivateWages_12 0.000 PrivateWages_13 -11.612 PrivateWages_14 16.650 PrivateWages_15 -8.657 PrivateWages_16 -11.805 PrivateWages_17 44.788 PrivateWages_18 2.225 PrivateWages_19 -183.642 PrivateWages_20 43.723 PrivateWages_21 -39.975 PrivateWages_22 118.832 [1] TRUE > Bread Consumption_(Intercept) Consumption_corpProf Consumption_corpProfLag [1,] 89.117 -0.7628 -0.3161 [2,] -0.763 0.5437 -0.3702 [3,] -0.316 -0.3702 0.4897 [4,] -1.650 -0.0567 -0.0339 [5,] 127.149 -5.8142 6.0484 [6,] -2.757 0.6390 -0.5640 [7,] 0.822 -0.5332 0.6080 [8,] -0.462 0.0186 -0.0321 [9,] -41.723 0.1554 1.5996 [10,] 0.652 -0.0670 0.0422 [11,] 0.023 0.0665 -0.0715 [12,] 0.266 0.0460 0.0263 Consumption_wages Investment_(Intercept) Investment_corpProf [1,] -1.649949 127.15 -2.7567 [2,] -0.056675 -5.81 0.6390 [3,] -0.033922 6.05 -0.5640 [4,] 0.075837 -3.04 0.0284 [5,] -3.037786 5674.46 -81.6232 [6,] 0.028439 -81.62 3.2764 [7,] -0.041721 66.55 -2.7837 [8,] 0.016133 -26.78 0.3579 [9,] 0.286845 49.74 -0.5482 [10,] -0.005120 5.39 0.0206 [11,] 0.000492 -6.38 -0.0122 [12,] -0.035219 -5.00 0.0650 Investment_corpProfLag Investment_capitalLag PrivateWages_(Intercept) [1,] 0.8223 -0.4623 -41.7225 [2,] -0.5332 0.0186 0.1554 [3,] 0.6080 -0.0321 1.5996 [4,] -0.0417 0.0161 0.2868 [5,] 66.5535 -26.7802 49.7422 [6,] -2.7837 0.3579 -0.5482 [7,] 3.0944 -0.3490 -2.9105 [8,] -0.3490 0.1318 0.0433 [9,] -2.9105 0.0433 89.7087 [10,] 0.0256 -0.0306 -0.7102 [11,] 0.0243 0.0308 -0.7883 [12,] -0.1021 0.0277 0.9946 PrivateWages_gnp PrivateWages_gnpLag PrivateWages_trend [1,] 0.65175 0.023034 0.26557 [2,] -0.06703 0.066494 0.04602 [3,] 0.04225 -0.071498 0.02630 [4,] -0.00512 0.000492 -0.03522 [5,] 5.38683 -6.377135 -4.99571 [6,] 0.02064 -0.012164 0.06501 [7,] 0.02556 0.024313 -0.10213 [8,] -0.03064 0.030839 0.02771 [9,] -0.71025 -0.788347 0.99462 [10,] 0.06062 -0.050369 -0.02195 [11,] -0.05037 0.065741 0.00529 [12,] -0.02195 0.005286 0.05391 > > # OLS Warning in systemfit(system, method = method, data = KleinI, methodResidCov = ifelse(method == : the estimation of systems of equations with unequal numbers of observations has not been thoroughly tested yet > summary systemfit results method: OLS N DF SSR detRCov OLS-R2 McElroy-R2 system 61 49 44.5 0.382 0.977 0.99 N DF SSR MSE RMSE R2 Adj R2 Consumption 20 16 17.48 1.093 1.04 0.981 0.978 Investment 21 17 17.32 1.019 1.01 0.931 0.919 PrivateWages 20 16 9.74 0.609 0.78 0.988 0.985 The covariance matrix of the residuals Consumption Investment PrivateWages Consumption 1.124 0.034 -0.442 Investment 0.034 0.928 0.130 PrivateWages -0.442 0.130 0.563 The correlations of the residuals Consumption Investment PrivateWages Consumption 1.0000 0.0266 -0.563 Investment 0.0266 1.0000 0.169 PrivateWages -0.5630 0.1689 1.000 OLS estimates for 'Consumption' (equation 1) Model Formula: consump ~ corpProf + corpProfLag + wages Estimate Std. Error t value Pr(>|t|) (Intercept) 16.1357 1.3571 11.89 2.4e-09 *** corpProf 0.1994 0.0949 2.10 0.052 . corpProfLag 0.0969 0.0944 1.03 0.320 wages 0.7940 0.0415 19.16 1.9e-12 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.045 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 17.481 MSE: 1.093 Root MSE: 1.045 Multiple R-Squared: 0.981 Adjusted R-Squared: 0.978 OLS estimates for 'Investment' (equation 2) Model Formula: invest ~ corpProf + corpProfLag + capitalLag Estimate Std. Error t value Pr(>|t|) (Intercept) 10.1258 5.2164 1.94 0.06901 . corpProf 0.4796 0.0927 5.17 7.6e-05 *** corpProfLag 0.3330 0.0963 3.46 0.00299 ** capitalLag -0.1118 0.0255 -4.38 0.00041 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.009 on 17 degrees of freedom Number of observations: 21 Degrees of Freedom: 17 SSR: 17.323 MSE: 1.019 Root MSE: 1.009 Multiple R-Squared: 0.931 Adjusted R-Squared: 0.919 OLS estimates for 'PrivateWages' (equation 3) Model Formula: privWage ~ gnp + gnpLag + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 1.3550 1.2591 1.08 0.2978 gnp 0.4417 0.0319 13.86 2.5e-10 *** gnpLag 0.1466 0.0366 4.01 0.0010 ** trend 0.1244 0.0323 3.85 0.0014 ** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 0.78 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 9.739 MSE: 0.609 Root MSE: 0.78 Multiple R-Squared: 0.988 Adjusted R-Squared: 0.985 compare coef with single-equation OLS [1] TRUE > residuals Consumption Investment PrivateWages 1 NA NA NA 2 -0.3304 -0.0668 -1.3389 3 -1.2748 -0.0476 0.2462 4 -1.6213 1.2467 1.1255 5 -0.5661 -1.3512 -0.1959 6 -0.0730 0.4154 -0.5284 7 0.7915 1.4923 NA 8 1.2648 0.7889 -0.7909 9 0.9746 -0.6317 0.2819 10 NA 1.0830 1.1384 11 0.2225 0.2791 -0.1904 12 -0.2256 0.0369 0.5813 13 -0.2711 0.3659 0.1206 14 0.3765 0.2237 0.4773 15 -0.0349 -0.1728 0.3035 16 -0.0243 0.0101 0.0284 17 1.6023 0.9719 -0.8517 18 -0.4658 0.0516 0.9908 19 0.1914 -2.5656 -0.4597 20 0.9683 -0.6866 -0.3819 21 0.7325 -0.7807 -1.1062 22 -2.2370 -0.6623 0.5501 > fitted Consumption Investment PrivateWages 1 NA NA NA 2 42.2 -0.133 26.8 3 46.3 1.948 29.1 4 50.8 3.953 33.0 5 51.2 4.351 34.1 6 52.7 4.685 35.9 7 54.3 4.108 NA 8 54.9 3.411 38.7 9 56.3 3.632 38.9 10 NA 4.017 40.2 11 54.8 0.721 38.1 12 51.1 -3.437 33.9 13 45.9 -6.566 28.9 14 46.1 -5.324 28.0 15 48.7 -2.827 30.3 16 51.3 -1.310 33.2 17 56.1 1.128 37.7 18 59.2 1.948 40.0 19 57.3 0.666 38.7 20 60.6 1.987 42.0 21 64.3 4.081 46.1 22 71.9 5.562 52.7 > predict Consumption.pred Consumption.se.fit Consumption.lwr Consumption.upr 1 NA NA NA NA 2 42.2 0.478 39.9 44.5 3 46.3 0.537 43.9 48.6 4 50.8 0.364 48.6 53.0 5 51.2 0.427 48.9 53.4 6 52.7 0.433 50.4 54.9 7 54.3 0.394 52.1 56.6 8 54.9 0.360 52.7 57.2 9 56.3 0.387 54.1 58.6 10 NA NA NA NA 11 54.8 0.635 52.3 57.2 12 51.1 0.501 48.8 53.5 13 45.9 0.656 43.4 48.4 14 46.1 0.629 43.7 48.6 15 48.7 0.389 46.5 51.0 16 51.3 0.345 49.1 53.5 17 56.1 0.379 53.9 58.3 18 59.2 0.336 57.0 61.4 19 57.3 0.385 55.1 59.5 20 60.6 0.450 58.3 62.9 21 64.3 0.448 62.0 66.6 22 71.9 0.697 69.4 74.5 Investment.pred Investment.se.fit Investment.lwr Investment.upr 1 NA NA NA NA 2 -0.133 0.579 -2.472 2.206 3 1.948 0.476 -0.295 4.190 4 3.953 0.428 1.750 6.157 5 4.351 0.354 2.202 6.501 6 4.685 0.333 2.548 6.821 7 4.108 0.314 1.983 6.232 8 3.411 0.279 1.306 5.516 9 3.632 0.371 1.470 5.793 10 4.017 0.426 1.815 6.219 11 0.721 0.574 -1.613 3.054 12 -3.437 0.484 -5.686 -1.188 13 -6.566 0.588 -8.913 -4.219 14 -5.324 0.662 -7.750 -2.898 15 -2.827 0.356 -4.978 -0.676 16 -1.310 0.305 -3.429 0.809 17 1.128 0.332 -1.007 3.263 18 1.948 0.232 -0.133 4.030 19 0.666 0.298 -1.449 2.781 20 1.987 0.350 -0.160 4.133 21 4.081 0.317 1.955 6.207 22 5.562 0.440 3.349 7.775 PrivateWages.pred PrivateWages.se.fit PrivateWages.lwr PrivateWages.upr 1 NA NA NA NA 2 26.8 0.352 25.1 28.6 3 29.1 0.355 27.3 30.8 4 33.0 0.358 31.2 34.7 5 34.1 0.277 32.4 35.8 6 35.9 0.276 34.3 37.6 7 NA NA NA NA 8 38.7 0.282 37.0 40.4 9 38.9 0.268 37.3 40.6 10 40.2 0.255 38.5 41.8 11 38.1 0.351 36.4 39.8 12 33.9 0.355 32.2 35.6 13 28.9 0.421 27.1 30.7 14 28.0 0.370 26.3 29.8 15 30.3 0.364 28.6 32.0 16 33.2 0.304 31.5 34.9 17 37.7 0.298 36.0 39.3 18 40.0 0.233 38.4 41.6 19 38.7 0.349 36.9 40.4 20 42.0 0.314 40.3 43.7 21 46.1 0.328 44.4 47.8 22 52.7 0.494 50.9 54.6 > model.frame consump corpProf corpProfLag wages invest capitalLag privWage gnp gnpLag 1 39.8 12.7 NA 31.0 2.7 180 28.8 44.9 NA 2 41.9 12.4 12.7 28.2 -0.2 183 25.5 45.6 44.9 3 45.0 16.9 12.4 32.2 1.9 183 29.3 50.1 45.6 4 49.2 18.4 16.9 37.0 5.2 184 34.1 57.2 50.1 5 50.6 19.4 18.4 37.0 3.0 190 33.9 57.1 57.2 6 52.6 20.1 19.4 38.6 5.1 193 35.4 61.0 57.1 7 55.1 19.6 20.1 40.7 5.6 198 37.4 64.0 NA 8 56.2 19.8 19.6 41.5 4.2 203 37.9 64.4 64.0 9 57.3 21.1 19.8 42.9 3.0 208 39.2 64.5 64.4 10 57.8 21.7 21.1 NA 5.1 211 41.3 67.0 64.5 11 55.0 15.6 21.7 42.1 1.0 216 37.9 61.2 67.0 12 50.9 11.4 15.6 39.3 -3.4 217 34.5 53.4 61.2 13 45.6 7.0 11.4 34.3 -6.2 213 29.0 44.3 53.4 14 46.5 11.2 7.0 34.1 -5.1 207 28.5 45.1 44.3 15 48.7 12.3 11.2 36.6 -3.0 202 30.6 49.7 45.1 16 51.3 14.0 12.3 39.3 -1.3 199 33.2 54.4 49.7 17 57.7 17.6 14.0 44.2 2.1 198 36.8 62.7 54.4 18 58.7 17.3 17.6 47.7 2.0 200 41.0 65.0 62.7 19 57.5 15.3 17.3 45.9 -1.9 202 38.2 60.9 65.0 20 61.6 19.0 15.3 49.4 1.3 200 41.6 69.5 60.9 21 65.0 21.1 19.0 53.0 3.3 201 45.0 75.7 69.5 22 69.7 23.5 21.1 61.8 4.9 204 53.3 88.4 75.7 trend 1 -11 2 -10 3 -9 4 -8 5 -7 6 -6 7 -5 8 -4 9 -3 10 -2 11 -1 12 0 13 1 14 2 15 3 16 4 17 5 18 6 19 7 20 8 21 9 22 10 > model.matrix Consumption_(Intercept) Consumption_corpProf Consumption_2 1 12.4 Consumption_3 1 16.9 Consumption_4 1 18.4 Consumption_5 1 19.4 Consumption_6 1 20.1 Consumption_7 1 19.6 Consumption_8 1 19.8 Consumption_9 1 21.1 Consumption_11 1 15.6 Consumption_12 1 11.4 Consumption_13 1 7.0 Consumption_14 1 11.2 Consumption_15 1 12.3 Consumption_16 1 14.0 Consumption_17 1 17.6 Consumption_18 1 17.3 Consumption_19 1 15.3 Consumption_20 1 19.0 Consumption_21 1 21.1 Consumption_22 1 23.5 Investment_2 0 0.0 Investment_3 0 0.0 Investment_4 0 0.0 Investment_5 0 0.0 Investment_6 0 0.0 Investment_7 0 0.0 Investment_8 0 0.0 Investment_9 0 0.0 Investment_10 0 0.0 Investment_11 0 0.0 Investment_12 0 0.0 Investment_13 0 0.0 Investment_14 0 0.0 Investment_15 0 0.0 Investment_16 0 0.0 Investment_17 0 0.0 Investment_18 0 0.0 Investment_19 0 0.0 Investment_20 0 0.0 Investment_21 0 0.0 Investment_22 0 0.0 PrivateWages_2 0 0.0 PrivateWages_3 0 0.0 PrivateWages_4 0 0.0 PrivateWages_5 0 0.0 PrivateWages_6 0 0.0 PrivateWages_8 0 0.0 PrivateWages_9 0 0.0 PrivateWages_10 0 0.0 PrivateWages_11 0 0.0 PrivateWages_12 0 0.0 PrivateWages_13 0 0.0 PrivateWages_14 0 0.0 PrivateWages_15 0 0.0 PrivateWages_16 0 0.0 PrivateWages_17 0 0.0 PrivateWages_18 0 0.0 PrivateWages_19 0 0.0 PrivateWages_20 0 0.0 PrivateWages_21 0 0.0 PrivateWages_22 0 0.0 Consumption_corpProfLag Consumption_wages Consumption_2 12.7 28.2 Consumption_3 12.4 32.2 Consumption_4 16.9 37.0 Consumption_5 18.4 37.0 Consumption_6 19.4 38.6 Consumption_7 20.1 40.7 Consumption_8 19.6 41.5 Consumption_9 19.8 42.9 Consumption_11 21.7 42.1 Consumption_12 15.6 39.3 Consumption_13 11.4 34.3 Consumption_14 7.0 34.1 Consumption_15 11.2 36.6 Consumption_16 12.3 39.3 Consumption_17 14.0 44.2 Consumption_18 17.6 47.7 Consumption_19 17.3 45.9 Consumption_20 15.3 49.4 Consumption_21 19.0 53.0 Consumption_22 21.1 61.8 Investment_2 0.0 0.0 Investment_3 0.0 0.0 Investment_4 0.0 0.0 Investment_5 0.0 0.0 Investment_6 0.0 0.0 Investment_7 0.0 0.0 Investment_8 0.0 0.0 Investment_9 0.0 0.0 Investment_10 0.0 0.0 Investment_11 0.0 0.0 Investment_12 0.0 0.0 Investment_13 0.0 0.0 Investment_14 0.0 0.0 Investment_15 0.0 0.0 Investment_16 0.0 0.0 Investment_17 0.0 0.0 Investment_18 0.0 0.0 Investment_19 0.0 0.0 Investment_20 0.0 0.0 Investment_21 0.0 0.0 Investment_22 0.0 0.0 PrivateWages_2 0.0 0.0 PrivateWages_3 0.0 0.0 PrivateWages_4 0.0 0.0 PrivateWages_5 0.0 0.0 PrivateWages_6 0.0 0.0 PrivateWages_8 0.0 0.0 PrivateWages_9 0.0 0.0 PrivateWages_10 0.0 0.0 PrivateWages_11 0.0 0.0 PrivateWages_12 0.0 0.0 PrivateWages_13 0.0 0.0 PrivateWages_14 0.0 0.0 PrivateWages_15 0.0 0.0 PrivateWages_16 0.0 0.0 PrivateWages_17 0.0 0.0 PrivateWages_18 0.0 0.0 PrivateWages_19 0.0 0.0 PrivateWages_20 0.0 0.0 PrivateWages_21 0.0 0.0 PrivateWages_22 0.0 0.0 Investment_(Intercept) Investment_corpProf Consumption_2 0 0.0 Consumption_3 0 0.0 Consumption_4 0 0.0 Consumption_5 0 0.0 Consumption_6 0 0.0 Consumption_7 0 0.0 Consumption_8 0 0.0 Consumption_9 0 0.0 Consumption_11 0 0.0 Consumption_12 0 0.0 Consumption_13 0 0.0 Consumption_14 0 0.0 Consumption_15 0 0.0 Consumption_16 0 0.0 Consumption_17 0 0.0 Consumption_18 0 0.0 Consumption_19 0 0.0 Consumption_20 0 0.0 Consumption_21 0 0.0 Consumption_22 0 0.0 Investment_2 1 12.4 Investment_3 1 16.9 Investment_4 1 18.4 Investment_5 1 19.4 Investment_6 1 20.1 Investment_7 1 19.6 Investment_8 1 19.8 Investment_9 1 21.1 Investment_10 1 21.7 Investment_11 1 15.6 Investment_12 1 11.4 Investment_13 1 7.0 Investment_14 1 11.2 Investment_15 1 12.3 Investment_16 1 14.0 Investment_17 1 17.6 Investment_18 1 17.3 Investment_19 1 15.3 Investment_20 1 19.0 Investment_21 1 21.1 Investment_22 1 23.5 PrivateWages_2 0 0.0 PrivateWages_3 0 0.0 PrivateWages_4 0 0.0 PrivateWages_5 0 0.0 PrivateWages_6 0 0.0 PrivateWages_8 0 0.0 PrivateWages_9 0 0.0 PrivateWages_10 0 0.0 PrivateWages_11 0 0.0 PrivateWages_12 0 0.0 PrivateWages_13 0 0.0 PrivateWages_14 0 0.0 PrivateWages_15 0 0.0 PrivateWages_16 0 0.0 PrivateWages_17 0 0.0 PrivateWages_18 0 0.0 PrivateWages_19 0 0.0 PrivateWages_20 0 0.0 PrivateWages_21 0 0.0 PrivateWages_22 0 0.0 Investment_corpProfLag Investment_capitalLag Consumption_2 0.0 0 Consumption_3 0.0 0 Consumption_4 0.0 0 Consumption_5 0.0 0 Consumption_6 0.0 0 Consumption_7 0.0 0 Consumption_8 0.0 0 Consumption_9 0.0 0 Consumption_11 0.0 0 Consumption_12 0.0 0 Consumption_13 0.0 0 Consumption_14 0.0 0 Consumption_15 0.0 0 Consumption_16 0.0 0 Consumption_17 0.0 0 Consumption_18 0.0 0 Consumption_19 0.0 0 Consumption_20 0.0 0 Consumption_21 0.0 0 Consumption_22 0.0 0 Investment_2 12.7 183 Investment_3 12.4 183 Investment_4 16.9 184 Investment_5 18.4 190 Investment_6 19.4 193 Investment_7 20.1 198 Investment_8 19.6 203 Investment_9 19.8 208 Investment_10 21.1 211 Investment_11 21.7 216 Investment_12 15.6 217 Investment_13 11.4 213 Investment_14 7.0 207 Investment_15 11.2 202 Investment_16 12.3 199 Investment_17 14.0 198 Investment_18 17.6 200 Investment_19 17.3 202 Investment_20 15.3 200 Investment_21 19.0 201 Investment_22 21.1 204 PrivateWages_2 0.0 0 PrivateWages_3 0.0 0 PrivateWages_4 0.0 0 PrivateWages_5 0.0 0 PrivateWages_6 0.0 0 PrivateWages_8 0.0 0 PrivateWages_9 0.0 0 PrivateWages_10 0.0 0 PrivateWages_11 0.0 0 PrivateWages_12 0.0 0 PrivateWages_13 0.0 0 PrivateWages_14 0.0 0 PrivateWages_15 0.0 0 PrivateWages_16 0.0 0 PrivateWages_17 0.0 0 PrivateWages_18 0.0 0 PrivateWages_19 0.0 0 PrivateWages_20 0.0 0 PrivateWages_21 0.0 0 PrivateWages_22 0.0 0 PrivateWages_(Intercept) PrivateWages_gnp PrivateWages_gnpLag Consumption_2 0 0.0 0.0 Consumption_3 0 0.0 0.0 Consumption_4 0 0.0 0.0 Consumption_5 0 0.0 0.0 Consumption_6 0 0.0 0.0 Consumption_7 0 0.0 0.0 Consumption_8 0 0.0 0.0 Consumption_9 0 0.0 0.0 Consumption_11 0 0.0 0.0 Consumption_12 0 0.0 0.0 Consumption_13 0 0.0 0.0 Consumption_14 0 0.0 0.0 Consumption_15 0 0.0 0.0 Consumption_16 0 0.0 0.0 Consumption_17 0 0.0 0.0 Consumption_18 0 0.0 0.0 Consumption_19 0 0.0 0.0 Consumption_20 0 0.0 0.0 Consumption_21 0 0.0 0.0 Consumption_22 0 0.0 0.0 Investment_2 0 0.0 0.0 Investment_3 0 0.0 0.0 Investment_4 0 0.0 0.0 Investment_5 0 0.0 0.0 Investment_6 0 0.0 0.0 Investment_7 0 0.0 0.0 Investment_8 0 0.0 0.0 Investment_9 0 0.0 0.0 Investment_10 0 0.0 0.0 Investment_11 0 0.0 0.0 Investment_12 0 0.0 0.0 Investment_13 0 0.0 0.0 Investment_14 0 0.0 0.0 Investment_15 0 0.0 0.0 Investment_16 0 0.0 0.0 Investment_17 0 0.0 0.0 Investment_18 0 0.0 0.0 Investment_19 0 0.0 0.0 Investment_20 0 0.0 0.0 Investment_21 0 0.0 0.0 Investment_22 0 0.0 0.0 PrivateWages_2 1 45.6 44.9 PrivateWages_3 1 50.1 45.6 PrivateWages_4 1 57.2 50.1 PrivateWages_5 1 57.1 57.2 PrivateWages_6 1 61.0 57.1 PrivateWages_8 1 64.4 64.0 PrivateWages_9 1 64.5 64.4 PrivateWages_10 1 67.0 64.5 PrivateWages_11 1 61.2 67.0 PrivateWages_12 1 53.4 61.2 PrivateWages_13 1 44.3 53.4 PrivateWages_14 1 45.1 44.3 PrivateWages_15 1 49.7 45.1 PrivateWages_16 1 54.4 49.7 PrivateWages_17 1 62.7 54.4 PrivateWages_18 1 65.0 62.7 PrivateWages_19 1 60.9 65.0 PrivateWages_20 1 69.5 60.9 PrivateWages_21 1 75.7 69.5 PrivateWages_22 1 88.4 75.7 PrivateWages_trend Consumption_2 0 Consumption_3 0 Consumption_4 0 Consumption_5 0 Consumption_6 0 Consumption_7 0 Consumption_8 0 Consumption_9 0 Consumption_11 0 Consumption_12 0 Consumption_13 0 Consumption_14 0 Consumption_15 0 Consumption_16 0 Consumption_17 0 Consumption_18 0 Consumption_19 0 Consumption_20 0 Consumption_21 0 Consumption_22 0 Investment_2 0 Investment_3 0 Investment_4 0 Investment_5 0 Investment_6 0 Investment_7 0 Investment_8 0 Investment_9 0 Investment_10 0 Investment_11 0 Investment_12 0 Investment_13 0 Investment_14 0 Investment_15 0 Investment_16 0 Investment_17 0 Investment_18 0 Investment_19 0 Investment_20 0 Investment_21 0 Investment_22 0 PrivateWages_2 -10 PrivateWages_3 -9 PrivateWages_4 -8 PrivateWages_5 -7 PrivateWages_6 -6 PrivateWages_8 -4 PrivateWages_9 -3 PrivateWages_10 -2 PrivateWages_11 -1 PrivateWages_12 0 PrivateWages_13 1 PrivateWages_14 2 PrivateWages_15 3 PrivateWages_16 4 PrivateWages_17 5 PrivateWages_18 6 PrivateWages_19 7 PrivateWages_20 8 PrivateWages_21 9 PrivateWages_22 10 > nobs [1] 61 > linearHypothesis Linear hypothesis test (Theil's F test) Hypothesis: Consumption_corpProf + Investment_capitalLag = 0 Model 1: restricted model Model 2: kleinModel Res.Df Df F Pr(>F) 1 50 2 49 1 0.87 0.35 Linear hypothesis test (F statistic of a Wald test) Hypothesis: Consumption_corpProf + Investment_capitalLag = 0 Model 1: restricted model Model 2: kleinModel Res.Df Df F Pr(>F) 1 50 2 49 1 0.8 0.38 Linear hypothesis test (Chi^2 statistic of a Wald test) Hypothesis: Consumption_corpProf + Investment_capitalLag = 0 Model 1: restricted model Model 2: kleinModel Res.Df Df Chisq Pr(>Chisq) 1 50 2 49 1 0.8 0.37 Linear hypothesis test (Theil's F test) Hypothesis: Consumption_corpProf + Investment_capitalLag = 0 Consumption_corpProfLag - PrivateWages_trend = 0 Model 1: restricted model Model 2: kleinModel Res.Df Df F Pr(>F) 1 51 2 49 2 0.48 0.62 Linear hypothesis test (F statistic of a Wald test) Hypothesis: Consumption_corpProf + Investment_capitalLag = 0 Consumption_corpProfLag - PrivateWages_trend = 0 Model 1: restricted model Model 2: kleinModel Res.Df Df F Pr(>F) 1 51 2 49 2 0.43 0.65 Linear hypothesis test (Chi^2 statistic of a Wald test) Hypothesis: Consumption_corpProf + Investment_capitalLag = 0 Consumption_corpProfLag - PrivateWages_trend = 0 Model 1: restricted model Model 2: kleinModel Res.Df Df Chisq Pr(>Chisq) 1 51 2 49 2 0.87 0.65 > logLik 'log Lik.' -71.7 (df=13) 'log Lik.' -76.1 (df=13) compare log likelihood value with single-equation OLS [1] "Mean relative difference: 0.00159" Estimating function Consumption_(Intercept) Consumption_corpProf Consumption_2 -0.3304 -4.097 Consumption_3 -1.2748 -21.544 Consumption_4 -1.6213 -29.832 Consumption_5 -0.5661 -10.982 Consumption_6 -0.0730 -1.467 Consumption_7 0.7915 15.513 Consumption_8 1.2648 25.043 Consumption_9 0.9746 20.563 Consumption_11 0.2225 3.470 Consumption_12 -0.2256 -2.572 Consumption_13 -0.2711 -1.898 Consumption_14 0.3765 4.217 Consumption_15 -0.0349 -0.429 Consumption_16 -0.0243 -0.341 Consumption_17 1.6023 28.201 Consumption_18 -0.4658 -8.058 Consumption_19 0.1914 2.928 Consumption_20 0.9683 18.397 Consumption_21 0.7325 15.456 Consumption_22 -2.2370 -52.569 Investment_2 0.0000 0.000 Investment_3 0.0000 0.000 Investment_4 0.0000 0.000 Investment_5 0.0000 0.000 Investment_6 0.0000 0.000 Investment_7 0.0000 0.000 Investment_8 0.0000 0.000 Investment_9 0.0000 0.000 Investment_10 0.0000 0.000 Investment_11 0.0000 0.000 Investment_12 0.0000 0.000 Investment_13 0.0000 0.000 Investment_14 0.0000 0.000 Investment_15 0.0000 0.000 Investment_16 0.0000 0.000 Investment_17 0.0000 0.000 Investment_18 0.0000 0.000 Investment_19 0.0000 0.000 Investment_20 0.0000 0.000 Investment_21 0.0000 0.000 Investment_22 0.0000 0.000 PrivateWages_2 0.0000 0.000 PrivateWages_3 0.0000 0.000 PrivateWages_4 0.0000 0.000 PrivateWages_5 0.0000 0.000 PrivateWages_6 0.0000 0.000 PrivateWages_8 0.0000 0.000 PrivateWages_9 0.0000 0.000 PrivateWages_10 0.0000 0.000 PrivateWages_11 0.0000 0.000 PrivateWages_12 0.0000 0.000 PrivateWages_13 0.0000 0.000 PrivateWages_14 0.0000 0.000 PrivateWages_15 0.0000 0.000 PrivateWages_16 0.0000 0.000 PrivateWages_17 0.0000 0.000 PrivateWages_18 0.0000 0.000 PrivateWages_19 0.0000 0.000 PrivateWages_20 0.0000 0.000 PrivateWages_21 0.0000 0.000 PrivateWages_22 0.0000 0.000 Consumption_corpProfLag Consumption_wages Consumption_2 -4.196 -9.318 Consumption_3 -15.808 -41.049 Consumption_4 -27.400 -59.988 Consumption_5 -10.416 -20.944 Consumption_6 -1.416 -2.817 Consumption_7 15.908 32.212 Consumption_8 24.790 52.490 Consumption_9 19.296 41.809 Consumption_11 4.827 9.366 Consumption_12 -3.520 -8.867 Consumption_13 -3.091 -9.299 Consumption_14 2.636 12.839 Consumption_15 -0.391 -1.277 Consumption_16 -0.299 -0.957 Consumption_17 22.433 70.823 Consumption_18 -8.197 -22.217 Consumption_19 3.311 8.785 Consumption_20 14.815 47.833 Consumption_21 13.917 38.822 Consumption_22 -47.200 -138.245 Investment_2 0.000 0.000 Investment_3 0.000 0.000 Investment_4 0.000 0.000 Investment_5 0.000 0.000 Investment_6 0.000 0.000 Investment_7 0.000 0.000 Investment_8 0.000 0.000 Investment_9 0.000 0.000 Investment_10 0.000 0.000 Investment_11 0.000 0.000 Investment_12 0.000 0.000 Investment_13 0.000 0.000 Investment_14 0.000 0.000 Investment_15 0.000 0.000 Investment_16 0.000 0.000 Investment_17 0.000 0.000 Investment_18 0.000 0.000 Investment_19 0.000 0.000 Investment_20 0.000 0.000 Investment_21 0.000 0.000 Investment_22 0.000 0.000 PrivateWages_2 0.000 0.000 PrivateWages_3 0.000 0.000 PrivateWages_4 0.000 0.000 PrivateWages_5 0.000 0.000 PrivateWages_6 0.000 0.000 PrivateWages_8 0.000 0.000 PrivateWages_9 0.000 0.000 PrivateWages_10 0.000 0.000 PrivateWages_11 0.000 0.000 PrivateWages_12 0.000 0.000 PrivateWages_13 0.000 0.000 PrivateWages_14 0.000 0.000 PrivateWages_15 0.000 0.000 PrivateWages_16 0.000 0.000 PrivateWages_17 0.000 0.000 PrivateWages_18 0.000 0.000 PrivateWages_19 0.000 0.000 PrivateWages_20 0.000 0.000 PrivateWages_21 0.000 0.000 PrivateWages_22 0.000 0.000 Investment_(Intercept) Investment_corpProf Consumption_2 0.0000 0.000 Consumption_3 0.0000 0.000 Consumption_4 0.0000 0.000 Consumption_5 0.0000 0.000 Consumption_6 0.0000 0.000 Consumption_7 0.0000 0.000 Consumption_8 0.0000 0.000 Consumption_9 0.0000 0.000 Consumption_11 0.0000 0.000 Consumption_12 0.0000 0.000 Consumption_13 0.0000 0.000 Consumption_14 0.0000 0.000 Consumption_15 0.0000 0.000 Consumption_16 0.0000 0.000 Consumption_17 0.0000 0.000 Consumption_18 0.0000 0.000 Consumption_19 0.0000 0.000 Consumption_20 0.0000 0.000 Consumption_21 0.0000 0.000 Consumption_22 0.0000 0.000 Investment_2 -0.0668 -0.828 Investment_3 -0.0476 -0.804 Investment_4 1.2467 22.939 Investment_5 -1.3512 -26.213 Investment_6 0.4154 8.350 Investment_7 1.4923 29.248 Investment_8 0.7889 15.620 Investment_9 -0.6317 -13.329 Investment_10 1.0830 23.500 Investment_11 0.2791 4.353 Investment_12 0.0369 0.420 Investment_13 0.3659 2.561 Investment_14 0.2237 2.505 Investment_15 -0.1728 -2.126 Investment_16 0.0101 0.141 Investment_17 0.9719 17.105 Investment_18 0.0516 0.893 Investment_19 -2.5656 -39.254 Investment_20 -0.6866 -13.045 Investment_21 -0.7807 -16.474 Investment_22 -0.6623 -15.565 PrivateWages_2 0.0000 0.000 PrivateWages_3 0.0000 0.000 PrivateWages_4 0.0000 0.000 PrivateWages_5 0.0000 0.000 PrivateWages_6 0.0000 0.000 PrivateWages_8 0.0000 0.000 PrivateWages_9 0.0000 0.000 PrivateWages_10 0.0000 0.000 PrivateWages_11 0.0000 0.000 PrivateWages_12 0.0000 0.000 PrivateWages_13 0.0000 0.000 PrivateWages_14 0.0000 0.000 PrivateWages_15 0.0000 0.000 PrivateWages_16 0.0000 0.000 PrivateWages_17 0.0000 0.000 PrivateWages_18 0.0000 0.000 PrivateWages_19 0.0000 0.000 PrivateWages_20 0.0000 0.000 PrivateWages_21 0.0000 0.000 PrivateWages_22 0.0000 0.000 Investment_corpProfLag Investment_capitalLag Consumption_2 0.000 0.00 Consumption_3 0.000 0.00 Consumption_4 0.000 0.00 Consumption_5 0.000 0.00 Consumption_6 0.000 0.00 Consumption_7 0.000 0.00 Consumption_8 0.000 0.00 Consumption_9 0.000 0.00 Consumption_11 0.000 0.00 Consumption_12 0.000 0.00 Consumption_13 0.000 0.00 Consumption_14 0.000 0.00 Consumption_15 0.000 0.00 Consumption_16 0.000 0.00 Consumption_17 0.000 0.00 Consumption_18 0.000 0.00 Consumption_19 0.000 0.00 Consumption_20 0.000 0.00 Consumption_21 0.000 0.00 Consumption_22 0.000 0.00 Investment_2 -0.848 -12.21 Investment_3 -0.590 -8.69 Investment_4 21.069 230.01 Investment_5 -24.862 -256.32 Investment_6 8.059 80.05 Investment_7 29.994 295.17 Investment_8 15.463 160.46 Investment_9 -12.507 -131.14 Investment_10 22.850 228.07 Investment_11 6.056 60.20 Investment_12 0.575 7.99 Investment_13 4.172 78.05 Investment_14 1.566 46.33 Investment_15 -1.936 -34.91 Investment_16 0.124 2.01 Investment_17 13.606 192.14 Investment_18 0.908 10.31 Investment_19 -44.385 -517.74 Investment_20 -10.505 -137.25 Investment_21 -14.834 -157.09 Investment_22 -13.975 -135.45 PrivateWages_2 0.000 0.00 PrivateWages_3 0.000 0.00 PrivateWages_4 0.000 0.00 PrivateWages_5 0.000 0.00 PrivateWages_6 0.000 0.00 PrivateWages_8 0.000 0.00 PrivateWages_9 0.000 0.00 PrivateWages_10 0.000 0.00 PrivateWages_11 0.000 0.00 PrivateWages_12 0.000 0.00 PrivateWages_13 0.000 0.00 PrivateWages_14 0.000 0.00 PrivateWages_15 0.000 0.00 PrivateWages_16 0.000 0.00 PrivateWages_17 0.000 0.00 PrivateWages_18 0.000 0.00 PrivateWages_19 0.000 0.00 PrivateWages_20 0.000 0.00 PrivateWages_21 0.000 0.00 PrivateWages_22 0.000 0.00 PrivateWages_(Intercept) PrivateWages_gnp PrivateWages_gnpLag Consumption_2 0.0000 0.00 0.00 Consumption_3 0.0000 0.00 0.00 Consumption_4 0.0000 0.00 0.00 Consumption_5 0.0000 0.00 0.00 Consumption_6 0.0000 0.00 0.00 Consumption_7 0.0000 0.00 0.00 Consumption_8 0.0000 0.00 0.00 Consumption_9 0.0000 0.00 0.00 Consumption_11 0.0000 0.00 0.00 Consumption_12 0.0000 0.00 0.00 Consumption_13 0.0000 0.00 0.00 Consumption_14 0.0000 0.00 0.00 Consumption_15 0.0000 0.00 0.00 Consumption_16 0.0000 0.00 0.00 Consumption_17 0.0000 0.00 0.00 Consumption_18 0.0000 0.00 0.00 Consumption_19 0.0000 0.00 0.00 Consumption_20 0.0000 0.00 0.00 Consumption_21 0.0000 0.00 0.00 Consumption_22 0.0000 0.00 0.00 Investment_2 0.0000 0.00 0.00 Investment_3 0.0000 0.00 0.00 Investment_4 0.0000 0.00 0.00 Investment_5 0.0000 0.00 0.00 Investment_6 0.0000 0.00 0.00 Investment_7 0.0000 0.00 0.00 Investment_8 0.0000 0.00 0.00 Investment_9 0.0000 0.00 0.00 Investment_10 0.0000 0.00 0.00 Investment_11 0.0000 0.00 0.00 Investment_12 0.0000 0.00 0.00 Investment_13 0.0000 0.00 0.00 Investment_14 0.0000 0.00 0.00 Investment_15 0.0000 0.00 0.00 Investment_16 0.0000 0.00 0.00 Investment_17 0.0000 0.00 0.00 Investment_18 0.0000 0.00 0.00 Investment_19 0.0000 0.00 0.00 Investment_20 0.0000 0.00 0.00 Investment_21 0.0000 0.00 0.00 Investment_22 0.0000 0.00 0.00 PrivateWages_2 -1.3389 -61.06 -60.12 PrivateWages_3 0.2462 12.33 11.23 PrivateWages_4 1.1255 64.38 56.39 PrivateWages_5 -0.1959 -11.18 -11.20 PrivateWages_6 -0.5284 -32.23 -30.17 PrivateWages_8 -0.7909 -50.94 -50.62 PrivateWages_9 0.2819 18.18 18.15 PrivateWages_10 1.1384 76.28 73.43 PrivateWages_11 -0.1904 -11.65 -12.76 PrivateWages_12 0.5813 31.04 35.58 PrivateWages_13 0.1206 5.34 6.44 PrivateWages_14 0.4773 21.53 21.14 PrivateWages_15 0.3035 15.09 13.69 PrivateWages_16 0.0284 1.55 1.41 PrivateWages_17 -0.8517 -53.40 -46.33 PrivateWages_18 0.9908 64.40 62.12 PrivateWages_19 -0.4597 -28.00 -29.88 PrivateWages_20 -0.3819 -26.54 -23.26 PrivateWages_21 -1.1062 -83.74 -76.88 PrivateWages_22 0.5501 48.63 41.64 PrivateWages_trend Consumption_2 0.000 Consumption_3 0.000 Consumption_4 0.000 Consumption_5 0.000 Consumption_6 0.000 Consumption_7 0.000 Consumption_8 0.000 Consumption_9 0.000 Consumption_11 0.000 Consumption_12 0.000 Consumption_13 0.000 Consumption_14 0.000 Consumption_15 0.000 Consumption_16 0.000 Consumption_17 0.000 Consumption_18 0.000 Consumption_19 0.000 Consumption_20 0.000 Consumption_21 0.000 Consumption_22 0.000 Investment_2 0.000 Investment_3 0.000 Investment_4 0.000 Investment_5 0.000 Investment_6 0.000 Investment_7 0.000 Investment_8 0.000 Investment_9 0.000 Investment_10 0.000 Investment_11 0.000 Investment_12 0.000 Investment_13 0.000 Investment_14 0.000 Investment_15 0.000 Investment_16 0.000 Investment_17 0.000 Investment_18 0.000 Investment_19 0.000 Investment_20 0.000 Investment_21 0.000 Investment_22 0.000 PrivateWages_2 13.389 PrivateWages_3 -2.216 PrivateWages_4 -9.004 PrivateWages_5 1.371 PrivateWages_6 3.170 PrivateWages_8 3.164 PrivateWages_9 -0.846 PrivateWages_10 -2.277 PrivateWages_11 0.190 PrivateWages_12 0.000 PrivateWages_13 0.121 PrivateWages_14 0.955 PrivateWages_15 0.911 PrivateWages_16 0.114 PrivateWages_17 -4.258 PrivateWages_18 5.945 PrivateWages_19 -3.218 PrivateWages_20 -3.055 PrivateWages_21 -9.956 PrivateWages_22 5.501 [1] TRUE > Bread Consumption_(Intercept) Consumption_corpProf Consumption_(Intercept) 99.9867 -0.0712 Consumption_corpProf -0.0712 0.4890 Consumption_corpProfLag -1.1355 -0.2987 Consumption_wages -1.8752 -0.0787 Investment_(Intercept) 0.0000 0.0000 Investment_corpProf 0.0000 0.0000 Investment_corpProfLag 0.0000 0.0000 Investment_capitalLag 0.0000 0.0000 PrivateWages_(Intercept) 0.0000 0.0000 PrivateWages_gnp 0.0000 0.0000 PrivateWages_gnpLag 0.0000 0.0000 PrivateWages_trend 0.0000 0.0000 Consumption_corpProfLag Consumption_wages Consumption_(Intercept) -1.1355 -1.8752 Consumption_corpProf -0.2987 -0.0787 Consumption_corpProfLag 0.4841 -0.0413 Consumption_wages -0.0413 0.0933 Investment_(Intercept) 0.0000 0.0000 Investment_corpProf 0.0000 0.0000 Investment_corpProfLag 0.0000 0.0000 Investment_capitalLag 0.0000 0.0000 PrivateWages_(Intercept) 0.0000 0.0000 PrivateWages_gnp 0.0000 0.0000 PrivateWages_gnpLag 0.0000 0.0000 PrivateWages_trend 0.0000 0.0000 Investment_(Intercept) Investment_corpProf Consumption_(Intercept) 0.0 0.0000 Consumption_corpProf 0.0 0.0000 Consumption_corpProfLag 0.0 0.0000 Consumption_wages 0.0 0.0000 Investment_(Intercept) 1788.3 -17.4004 Investment_corpProf -17.4 0.5646 Investment_corpProfLag 14.2 -0.4849 Investment_capitalLag -8.6 0.0788 PrivateWages_(Intercept) 0.0 0.0000 PrivateWages_gnp 0.0 0.0000 PrivateWages_gnpLag 0.0 0.0000 PrivateWages_trend 0.0 0.0000 Investment_corpProfLag Investment_capitalLag Consumption_(Intercept) 0.0000 0.0000 Consumption_corpProf 0.0000 0.0000 Consumption_corpProfLag 0.0000 0.0000 Consumption_wages 0.0000 0.0000 Investment_(Intercept) 14.2083 -8.5994 Investment_corpProf -0.4849 0.0788 Investment_corpProfLag 0.6090 -0.0798 Investment_capitalLag -0.0798 0.0428 PrivateWages_(Intercept) 0.0000 0.0000 PrivateWages_gnp 0.0000 0.0000 PrivateWages_gnpLag 0.0000 0.0000 PrivateWages_trend 0.0000 0.0000 PrivateWages_(Intercept) PrivateWages_gnp Consumption_(Intercept) 0.000 0.0000 Consumption_corpProf 0.000 0.0000 Consumption_corpProfLag 0.000 0.0000 Consumption_wages 0.000 0.0000 Investment_(Intercept) 0.000 0.0000 Investment_corpProf 0.000 0.0000 Investment_corpProfLag 0.000 0.0000 Investment_capitalLag 0.000 0.0000 PrivateWages_(Intercept) 171.811 -0.6470 PrivateWages_gnp -0.647 0.1100 PrivateWages_gnpLag -2.257 -0.1026 PrivateWages_trend 2.120 -0.0296 PrivateWages_gnpLag PrivateWages_trend Consumption_(Intercept) 0.00000 0.00000 Consumption_corpProf 0.00000 0.00000 Consumption_corpProfLag 0.00000 0.00000 Consumption_wages 0.00000 0.00000 Investment_(Intercept) 0.00000 0.00000 Investment_corpProf 0.00000 0.00000 Investment_corpProfLag 0.00000 0.00000 Investment_capitalLag 0.00000 0.00000 PrivateWages_(Intercept) -2.25750 2.12030 PrivateWages_gnp -0.10258 -0.02955 PrivateWages_gnpLag 0.14523 -0.00656 PrivateWages_trend -0.00656 0.11341 > > # 2SLS Warning in systemfit(system, method = method, data = KleinI, inst = inst, : the estimation of systems of equations with unequal numbers of observations has not been thoroughly tested yet > summary systemfit results method: 2SLS N DF SSR detRCov OLS-R2 McElroy-R2 system 59 47 53.2 0.251 0.973 0.991 N DF SSR MSE RMSE R2 Adj R2 Consumption 19 15 20.49 1.366 1.17 0.978 0.973 Investment 20 16 23.02 1.438 1.20 0.901 0.883 PrivateWages 20 16 9.74 0.609 0.78 0.988 0.985 The covariance matrix of the residuals Consumption Investment PrivateWages Consumption 1.079 0.354 -0.383 Investment 0.354 1.047 0.107 PrivateWages -0.383 0.107 0.445 The correlations of the residuals Consumption Investment PrivateWages Consumption 1.000 0.335 -0.556 Investment 0.335 1.000 0.149 PrivateWages -0.556 0.149 1.000 2SLS estimates for 'Consumption' (equation 1) Model Formula: consump ~ corpProf + corpProfLag + wages Instruments: ~govExp + taxes + govWage + trend + capitalLag + corpProfLag + gnpLag Estimate Std. Error t value Pr(>|t|) (Intercept) 16.4657 1.3505 12.19 3.5e-09 *** corpProf 0.0243 0.1180 0.21 0.839 corpProfLag 0.1981 0.1087 1.82 0.088 . wages 0.8159 0.0420 19.45 4.7e-12 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.169 on 15 degrees of freedom Number of observations: 19 Degrees of Freedom: 15 SSR: 20.493 MSE: 1.366 Root MSE: 1.169 Multiple R-Squared: 0.978 Adjusted R-Squared: 0.973 2SLS estimates for 'Investment' (equation 2) Model Formula: invest ~ corpProf + corpProfLag + capitalLag Instruments: ~govExp + taxes + govWage + trend + capitalLag + corpProfLag + gnpLag Estimate Std. Error t value Pr(>|t|) (Intercept) 17.8425 6.5319 2.73 0.01478 * corpProf 0.2167 0.1478 1.47 0.16189 corpProfLag 0.5416 0.1415 3.83 0.00149 ** capitalLag -0.1455 0.0314 -4.63 0.00028 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.199 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 23.016 MSE: 1.438 Root MSE: 1.199 Multiple R-Squared: 0.901 Adjusted R-Squared: 0.883 2SLS estimates for 'PrivateWages' (equation 3) Model Formula: privWage ~ gnp + gnpLag + trend Instruments: ~govExp + taxes + govWage + trend + capitalLag + corpProfLag + gnpLag Estimate Std. Error t value Pr(>|t|) (Intercept) 1.3431 1.1250 1.19 0.24995 gnp 0.4438 0.0342 12.97 6.6e-10 *** gnpLag 0.1447 0.0371 3.90 0.00128 ** trend 0.1238 0.0292 4.24 0.00063 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 0.78 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 9.741 MSE: 0.609 Root MSE: 0.78 Multiple R-Squared: 0.988 Adjusted R-Squared: 0.985 > residuals Consumption Investment PrivateWages 1 NA NA NA 2 -0.39161 -1.0104 -1.3401 3 -0.60524 0.2478 0.2378 4 -1.24952 1.0621 1.1117 5 -0.17101 -1.4104 -0.1954 6 0.30841 0.4328 -0.5355 7 NA NA NA 8 1.50999 1.0463 -0.7908 9 1.39649 0.0674 0.2831 10 NA 1.7698 1.1353 11 -0.49339 -0.5912 -0.1765 12 -0.99824 -0.6318 0.6007 13 -1.27965 -0.6983 0.1443 14 0.55302 0.9724 0.4826 15 -0.14553 -0.1827 0.3016 16 -0.00773 0.1167 0.0261 17 1.97001 1.6266 -0.8614 18 -0.59152 -0.0525 0.9927 19 -0.21481 -3.0656 -0.4446 20 1.33575 0.1393 -0.3914 21 1.01443 -0.1305 -1.1115 22 -1.93986 0.2922 0.5312 > fitted Consumption Investment PrivateWages 1 NA NA NA 2 42.3 0.810 26.8 3 45.6 1.652 29.1 4 50.4 4.138 33.0 5 50.8 4.410 34.1 6 52.3 4.667 35.9 7 NA NA NA 8 54.7 3.154 38.7 9 55.9 2.933 38.9 10 NA 3.330 40.2 11 55.5 1.591 38.1 12 51.9 -2.768 33.9 13 46.9 -5.502 28.9 14 45.9 -6.072 28.0 15 48.8 -2.817 30.3 16 51.3 -1.417 33.2 17 55.7 0.473 37.7 18 59.3 2.053 40.0 19 57.7 1.166 38.6 20 60.3 1.161 42.0 21 64.0 3.431 46.1 22 71.6 4.608 52.8 > predict Consumption.pred Consumption.se.fit Consumption.lwr Consumption.upr 1 NA NA NA NA 2 42.3 0.483 41.3 43.3 3 45.6 0.586 44.4 46.9 4 50.4 0.390 49.6 51.3 5 50.8 0.456 49.8 51.7 6 52.3 0.463 51.3 53.3 7 NA NA NA NA 8 54.7 0.382 53.9 55.5 9 55.9 0.422 55.0 56.8 10 NA NA NA NA 11 55.5 0.742 53.9 57.1 12 51.9 0.600 50.6 53.2 13 46.9 0.770 45.2 48.5 14 45.9 0.635 44.6 47.3 15 48.8 0.383 48.0 49.7 16 51.3 0.339 50.6 52.0 17 55.7 0.410 54.9 56.6 18 59.3 0.336 58.6 60.0 19 57.7 0.418 56.8 58.6 20 60.3 0.481 59.2 61.3 21 64.0 0.462 63.0 65.0 22 71.6 0.706 70.1 73.1 Investment.pred Investment.se.fit Investment.lwr Investment.upr 1 NA NA NA NA 2 0.810 0.750 -0.77956 2.400 3 1.652 0.516 0.55883 2.746 4 4.138 0.487 3.10541 5.170 5 4.410 0.402 3.55860 5.262 6 4.667 0.377 3.86830 5.466 7 NA NA NA NA 8 3.154 0.312 2.49238 3.815 9 2.933 0.466 1.94478 3.920 10 3.330 0.512 2.24435 4.416 11 1.591 0.749 0.00249 3.180 12 -2.768 0.586 -4.01111 -1.525 13 -5.502 0.750 -7.09222 -3.911 14 -6.072 0.803 -7.77404 -4.371 15 -2.817 0.379 -3.62002 -2.015 16 -1.417 0.327 -2.10985 -0.723 17 0.473 0.436 -0.45046 1.397 18 2.053 0.272 1.47523 2.630 19 1.166 0.410 0.29710 2.034 20 1.161 0.491 0.12044 2.201 21 3.431 0.406 2.57004 4.291 22 4.608 0.578 3.38197 5.834 PrivateWages.pred PrivateWages.se.fit PrivateWages.lwr PrivateWages.upr 1 NA NA NA NA 2 26.8 0.313 26.2 27.5 3 29.1 0.325 28.4 29.8 4 33.0 0.344 32.3 33.7 5 34.1 0.246 33.6 34.6 6 35.9 0.254 35.4 36.5 7 NA NA NA NA 8 38.7 0.251 38.2 39.2 9 38.9 0.239 38.4 39.4 10 40.2 0.229 39.7 40.7 11 38.1 0.339 37.4 38.8 12 33.9 0.365 33.1 34.7 13 28.9 0.436 27.9 29.8 14 28.0 0.333 27.3 28.7 15 30.3 0.324 29.6 31.0 16 33.2 0.271 32.6 33.7 17 37.7 0.280 37.1 38.3 18 40.0 0.208 39.6 40.4 19 38.6 0.342 37.9 39.4 20 42.0 0.293 41.4 42.6 21 46.1 0.296 45.5 46.7 22 52.8 0.474 51.8 53.8 > model.frame consump corpProf corpProfLag wages invest capitalLag privWage gnp gnpLag 1 39.8 12.7 NA 31.0 2.7 180 28.8 44.9 NA 2 41.9 12.4 12.7 28.2 -0.2 183 25.5 45.6 44.9 3 45.0 16.9 12.4 32.2 1.9 183 29.3 50.1 45.6 4 49.2 18.4 16.9 37.0 5.2 184 34.1 57.2 50.1 5 50.6 19.4 18.4 37.0 3.0 190 33.9 57.1 57.2 6 52.6 20.1 19.4 38.6 5.1 193 35.4 61.0 57.1 7 55.1 19.6 20.1 40.7 5.6 198 37.4 64.0 NA 8 56.2 19.8 19.6 41.5 4.2 203 37.9 64.4 64.0 9 57.3 21.1 19.8 42.9 3.0 208 39.2 64.5 64.4 10 57.8 21.7 21.1 NA 5.1 211 41.3 67.0 64.5 11 55.0 15.6 21.7 42.1 1.0 216 37.9 61.2 67.0 12 50.9 11.4 15.6 39.3 -3.4 217 34.5 53.4 61.2 13 45.6 7.0 11.4 34.3 -6.2 213 29.0 44.3 53.4 14 46.5 11.2 7.0 34.1 -5.1 207 28.5 45.1 44.3 15 48.7 12.3 11.2 36.6 -3.0 202 30.6 49.7 45.1 16 51.3 14.0 12.3 39.3 -1.3 199 33.2 54.4 49.7 17 57.7 17.6 14.0 44.2 2.1 198 36.8 62.7 54.4 18 58.7 17.3 17.6 47.7 2.0 200 41.0 65.0 62.7 19 57.5 15.3 17.3 45.9 -1.9 202 38.2 60.9 65.0 20 61.6 19.0 15.3 49.4 1.3 200 41.6 69.5 60.9 21 65.0 21.1 19.0 53.0 3.3 201 45.0 75.7 69.5 22 69.7 23.5 21.1 61.8 4.9 204 53.3 88.4 75.7 trend 1 -11 2 -10 3 -9 4 -8 5 -7 6 -6 7 -5 8 -4 9 -3 10 -2 11 -1 12 0 13 1 14 2 15 3 16 4 17 5 18 6 19 7 20 8 21 9 22 10 > Frames of instrumental variables govExp taxes govWage trend capitalLag corpProfLag gnpLag 1 2.4 3.4 2.2 -11 180 NA NA 2 3.9 7.7 2.7 -10 183 12.7 44.9 3 3.2 3.9 2.9 -9 183 12.4 45.6 4 2.8 4.7 2.9 -8 184 16.9 50.1 5 3.5 3.8 3.1 -7 190 18.4 57.2 6 3.3 5.5 3.2 -6 193 19.4 57.1 7 3.3 7.0 3.3 -5 198 20.1 NA 8 4.0 6.7 3.6 -4 203 19.6 64.0 9 4.2 4.2 3.7 -3 208 19.8 64.4 10 4.1 4.0 4.0 -2 211 21.1 64.5 11 5.2 7.7 4.2 -1 216 21.7 67.0 12 5.9 7.5 4.8 0 217 15.6 61.2 13 4.9 8.3 5.3 1 213 11.4 53.4 14 3.7 5.4 5.6 2 207 7.0 44.3 15 4.0 6.8 6.0 3 202 11.2 45.1 16 4.4 7.2 6.1 4 199 12.3 49.7 17 2.9 8.3 7.4 5 198 14.0 54.4 18 4.3 6.7 6.7 6 200 17.6 62.7 19 5.3 7.4 7.7 7 202 17.3 65.0 20 6.6 8.9 7.8 8 200 15.3 60.9 21 7.4 9.6 8.0 9 201 19.0 69.5 22 13.8 11.6 8.5 10 204 21.1 75.7 govExp taxes govWage trend capitalLag corpProfLag gnpLag 1 2.4 3.4 2.2 -11 180 NA NA 2 3.9 7.7 2.7 -10 183 12.7 44.9 3 3.2 3.9 2.9 -9 183 12.4 45.6 4 2.8 4.7 2.9 -8 184 16.9 50.1 5 3.5 3.8 3.1 -7 190 18.4 57.2 6 3.3 5.5 3.2 -6 193 19.4 57.1 7 3.3 7.0 3.3 -5 198 20.1 NA 8 4.0 6.7 3.6 -4 203 19.6 64.0 9 4.2 4.2 3.7 -3 208 19.8 64.4 10 4.1 4.0 4.0 -2 211 21.1 64.5 11 5.2 7.7 4.2 -1 216 21.7 67.0 12 5.9 7.5 4.8 0 217 15.6 61.2 13 4.9 8.3 5.3 1 213 11.4 53.4 14 3.7 5.4 5.6 2 207 7.0 44.3 15 4.0 6.8 6.0 3 202 11.2 45.1 16 4.4 7.2 6.1 4 199 12.3 49.7 17 2.9 8.3 7.4 5 198 14.0 54.4 18 4.3 6.7 6.7 6 200 17.6 62.7 19 5.3 7.4 7.7 7 202 17.3 65.0 20 6.6 8.9 7.8 8 200 15.3 60.9 21 7.4 9.6 8.0 9 201 19.0 69.5 22 13.8 11.6 8.5 10 204 21.1 75.7 govExp taxes govWage trend capitalLag corpProfLag gnpLag 1 2.4 3.4 2.2 -11 180 NA NA 2 3.9 7.7 2.7 -10 183 12.7 44.9 3 3.2 3.9 2.9 -9 183 12.4 45.6 4 2.8 4.7 2.9 -8 184 16.9 50.1 5 3.5 3.8 3.1 -7 190 18.4 57.2 6 3.3 5.5 3.2 -6 193 19.4 57.1 7 3.3 7.0 3.3 -5 198 20.1 NA 8 4.0 6.7 3.6 -4 203 19.6 64.0 9 4.2 4.2 3.7 -3 208 19.8 64.4 10 4.1 4.0 4.0 -2 211 21.1 64.5 11 5.2 7.7 4.2 -1 216 21.7 67.0 12 5.9 7.5 4.8 0 217 15.6 61.2 13 4.9 8.3 5.3 1 213 11.4 53.4 14 3.7 5.4 5.6 2 207 7.0 44.3 15 4.0 6.8 6.0 3 202 11.2 45.1 16 4.4 7.2 6.1 4 199 12.3 49.7 17 2.9 8.3 7.4 5 198 14.0 54.4 18 4.3 6.7 6.7 6 200 17.6 62.7 19 5.3 7.4 7.7 7 202 17.3 65.0 20 6.6 8.9 7.8 8 200 15.3 60.9 21 7.4 9.6 8.0 9 201 19.0 69.5 22 13.8 11.6 8.5 10 204 21.1 75.7 > model.matrix [1] "Attributes: < Component \"dim\": Mean relative difference: 0.0328 >" [2] "Attributes: < Component \"dimnames\": Component 1: 54 string mismatches >" [3] "Numeric: lengths (732, 708) differ" > matrix of instrumental variables Consumption_(Intercept) Consumption_govExp Consumption_taxes Consumption_2 1 3.9 7.7 Consumption_3 1 3.2 3.9 Consumption_4 1 2.8 4.7 Consumption_5 1 3.5 3.8 Consumption_6 1 3.3 5.5 Consumption_8 1 4.0 6.7 Consumption_9 1 4.2 4.2 Consumption_11 1 5.2 7.7 Consumption_12 1 5.9 7.5 Consumption_13 1 4.9 8.3 Consumption_14 1 3.7 5.4 Consumption_15 1 4.0 6.8 Consumption_16 1 4.4 7.2 Consumption_17 1 2.9 8.3 Consumption_18 1 4.3 6.7 Consumption_19 1 5.3 7.4 Consumption_20 1 6.6 8.9 Consumption_21 1 7.4 9.6 Consumption_22 1 13.8 11.6 Investment_2 0 0.0 0.0 Investment_3 0 0.0 0.0 Investment_4 0 0.0 0.0 Investment_5 0 0.0 0.0 Investment_6 0 0.0 0.0 Investment_8 0 0.0 0.0 Investment_9 0 0.0 0.0 Investment_10 0 0.0 0.0 Investment_11 0 0.0 0.0 Investment_12 0 0.0 0.0 Investment_13 0 0.0 0.0 Investment_14 0 0.0 0.0 Investment_15 0 0.0 0.0 Investment_16 0 0.0 0.0 Investment_17 0 0.0 0.0 Investment_18 0 0.0 0.0 Investment_19 0 0.0 0.0 Investment_20 0 0.0 0.0 Investment_21 0 0.0 0.0 Investment_22 0 0.0 0.0 PrivateWages_2 0 0.0 0.0 PrivateWages_3 0 0.0 0.0 PrivateWages_4 0 0.0 0.0 PrivateWages_5 0 0.0 0.0 PrivateWages_6 0 0.0 0.0 PrivateWages_8 0 0.0 0.0 PrivateWages_9 0 0.0 0.0 PrivateWages_10 0 0.0 0.0 PrivateWages_11 0 0.0 0.0 PrivateWages_12 0 0.0 0.0 PrivateWages_13 0 0.0 0.0 PrivateWages_14 0 0.0 0.0 PrivateWages_15 0 0.0 0.0 PrivateWages_16 0 0.0 0.0 PrivateWages_17 0 0.0 0.0 PrivateWages_18 0 0.0 0.0 PrivateWages_19 0 0.0 0.0 PrivateWages_20 0 0.0 0.0 PrivateWages_21 0 0.0 0.0 PrivateWages_22 0 0.0 0.0 Consumption_govWage Consumption_trend Consumption_capitalLag Consumption_2 2.7 -10 183 Consumption_3 2.9 -9 183 Consumption_4 2.9 -8 184 Consumption_5 3.1 -7 190 Consumption_6 3.2 -6 193 Consumption_8 3.6 -4 203 Consumption_9 3.7 -3 208 Consumption_11 4.2 -1 216 Consumption_12 4.8 0 217 Consumption_13 5.3 1 213 Consumption_14 5.6 2 207 Consumption_15 6.0 3 202 Consumption_16 6.1 4 199 Consumption_17 7.4 5 198 Consumption_18 6.7 6 200 Consumption_19 7.7 7 202 Consumption_20 7.8 8 200 Consumption_21 8.0 9 201 Consumption_22 8.5 10 204 Investment_2 0.0 0 0 Investment_3 0.0 0 0 Investment_4 0.0 0 0 Investment_5 0.0 0 0 Investment_6 0.0 0 0 Investment_8 0.0 0 0 Investment_9 0.0 0 0 Investment_10 0.0 0 0 Investment_11 0.0 0 0 Investment_12 0.0 0 0 Investment_13 0.0 0 0 Investment_14 0.0 0 0 Investment_15 0.0 0 0 Investment_16 0.0 0 0 Investment_17 0.0 0 0 Investment_18 0.0 0 0 Investment_19 0.0 0 0 Investment_20 0.0 0 0 Investment_21 0.0 0 0 Investment_22 0.0 0 0 PrivateWages_2 0.0 0 0 PrivateWages_3 0.0 0 0 PrivateWages_4 0.0 0 0 PrivateWages_5 0.0 0 0 PrivateWages_6 0.0 0 0 PrivateWages_8 0.0 0 0 PrivateWages_9 0.0 0 0 PrivateWages_10 0.0 0 0 PrivateWages_11 0.0 0 0 PrivateWages_12 0.0 0 0 PrivateWages_13 0.0 0 0 PrivateWages_14 0.0 0 0 PrivateWages_15 0.0 0 0 PrivateWages_16 0.0 0 0 PrivateWages_17 0.0 0 0 PrivateWages_18 0.0 0 0 PrivateWages_19 0.0 0 0 PrivateWages_20 0.0 0 0 PrivateWages_21 0.0 0 0 PrivateWages_22 0.0 0 0 Consumption_corpProfLag Consumption_gnpLag Consumption_2 12.7 44.9 Consumption_3 12.4 45.6 Consumption_4 16.9 50.1 Consumption_5 18.4 57.2 Consumption_6 19.4 57.1 Consumption_8 19.6 64.0 Consumption_9 19.8 64.4 Consumption_11 21.7 67.0 Consumption_12 15.6 61.2 Consumption_13 11.4 53.4 Consumption_14 7.0 44.3 Consumption_15 11.2 45.1 Consumption_16 12.3 49.7 Consumption_17 14.0 54.4 Consumption_18 17.6 62.7 Consumption_19 17.3 65.0 Consumption_20 15.3 60.9 Consumption_21 19.0 69.5 Consumption_22 21.1 75.7 Investment_2 0.0 0.0 Investment_3 0.0 0.0 Investment_4 0.0 0.0 Investment_5 0.0 0.0 Investment_6 0.0 0.0 Investment_8 0.0 0.0 Investment_9 0.0 0.0 Investment_10 0.0 0.0 Investment_11 0.0 0.0 Investment_12 0.0 0.0 Investment_13 0.0 0.0 Investment_14 0.0 0.0 Investment_15 0.0 0.0 Investment_16 0.0 0.0 Investment_17 0.0 0.0 Investment_18 0.0 0.0 Investment_19 0.0 0.0 Investment_20 0.0 0.0 Investment_21 0.0 0.0 Investment_22 0.0 0.0 PrivateWages_2 0.0 0.0 PrivateWages_3 0.0 0.0 PrivateWages_4 0.0 0.0 PrivateWages_5 0.0 0.0 PrivateWages_6 0.0 0.0 PrivateWages_8 0.0 0.0 PrivateWages_9 0.0 0.0 PrivateWages_10 0.0 0.0 PrivateWages_11 0.0 0.0 PrivateWages_12 0.0 0.0 PrivateWages_13 0.0 0.0 PrivateWages_14 0.0 0.0 PrivateWages_15 0.0 0.0 PrivateWages_16 0.0 0.0 PrivateWages_17 0.0 0.0 PrivateWages_18 0.0 0.0 PrivateWages_19 0.0 0.0 PrivateWages_20 0.0 0.0 PrivateWages_21 0.0 0.0 PrivateWages_22 0.0 0.0 Investment_(Intercept) Investment_govExp Investment_taxes Consumption_2 0 0.0 0.0 Consumption_3 0 0.0 0.0 Consumption_4 0 0.0 0.0 Consumption_5 0 0.0 0.0 Consumption_6 0 0.0 0.0 Consumption_8 0 0.0 0.0 Consumption_9 0 0.0 0.0 Consumption_11 0 0.0 0.0 Consumption_12 0 0.0 0.0 Consumption_13 0 0.0 0.0 Consumption_14 0 0.0 0.0 Consumption_15 0 0.0 0.0 Consumption_16 0 0.0 0.0 Consumption_17 0 0.0 0.0 Consumption_18 0 0.0 0.0 Consumption_19 0 0.0 0.0 Consumption_20 0 0.0 0.0 Consumption_21 0 0.0 0.0 Consumption_22 0 0.0 0.0 Investment_2 1 3.9 7.7 Investment_3 1 3.2 3.9 Investment_4 1 2.8 4.7 Investment_5 1 3.5 3.8 Investment_6 1 3.3 5.5 Investment_8 1 4.0 6.7 Investment_9 1 4.2 4.2 Investment_10 1 4.1 4.0 Investment_11 1 5.2 7.7 Investment_12 1 5.9 7.5 Investment_13 1 4.9 8.3 Investment_14 1 3.7 5.4 Investment_15 1 4.0 6.8 Investment_16 1 4.4 7.2 Investment_17 1 2.9 8.3 Investment_18 1 4.3 6.7 Investment_19 1 5.3 7.4 Investment_20 1 6.6 8.9 Investment_21 1 7.4 9.6 Investment_22 1 13.8 11.6 PrivateWages_2 0 0.0 0.0 PrivateWages_3 0 0.0 0.0 PrivateWages_4 0 0.0 0.0 PrivateWages_5 0 0.0 0.0 PrivateWages_6 0 0.0 0.0 PrivateWages_8 0 0.0 0.0 PrivateWages_9 0 0.0 0.0 PrivateWages_10 0 0.0 0.0 PrivateWages_11 0 0.0 0.0 PrivateWages_12 0 0.0 0.0 PrivateWages_13 0 0.0 0.0 PrivateWages_14 0 0.0 0.0 PrivateWages_15 0 0.0 0.0 PrivateWages_16 0 0.0 0.0 PrivateWages_17 0 0.0 0.0 PrivateWages_18 0 0.0 0.0 PrivateWages_19 0 0.0 0.0 PrivateWages_20 0 0.0 0.0 PrivateWages_21 0 0.0 0.0 PrivateWages_22 0 0.0 0.0 Investment_govWage Investment_trend Investment_capitalLag Consumption_2 0.0 0 0 Consumption_3 0.0 0 0 Consumption_4 0.0 0 0 Consumption_5 0.0 0 0 Consumption_6 0.0 0 0 Consumption_8 0.0 0 0 Consumption_9 0.0 0 0 Consumption_11 0.0 0 0 Consumption_12 0.0 0 0 Consumption_13 0.0 0 0 Consumption_14 0.0 0 0 Consumption_15 0.0 0 0 Consumption_16 0.0 0 0 Consumption_17 0.0 0 0 Consumption_18 0.0 0 0 Consumption_19 0.0 0 0 Consumption_20 0.0 0 0 Consumption_21 0.0 0 0 Consumption_22 0.0 0 0 Investment_2 2.7 -10 183 Investment_3 2.9 -9 183 Investment_4 2.9 -8 184 Investment_5 3.1 -7 190 Investment_6 3.2 -6 193 Investment_8 3.6 -4 203 Investment_9 3.7 -3 208 Investment_10 4.0 -2 211 Investment_11 4.2 -1 216 Investment_12 4.8 0 217 Investment_13 5.3 1 213 Investment_14 5.6 2 207 Investment_15 6.0 3 202 Investment_16 6.1 4 199 Investment_17 7.4 5 198 Investment_18 6.7 6 200 Investment_19 7.7 7 202 Investment_20 7.8 8 200 Investment_21 8.0 9 201 Investment_22 8.5 10 204 PrivateWages_2 0.0 0 0 PrivateWages_3 0.0 0 0 PrivateWages_4 0.0 0 0 PrivateWages_5 0.0 0 0 PrivateWages_6 0.0 0 0 PrivateWages_8 0.0 0 0 PrivateWages_9 0.0 0 0 PrivateWages_10 0.0 0 0 PrivateWages_11 0.0 0 0 PrivateWages_12 0.0 0 0 PrivateWages_13 0.0 0 0 PrivateWages_14 0.0 0 0 PrivateWages_15 0.0 0 0 PrivateWages_16 0.0 0 0 PrivateWages_17 0.0 0 0 PrivateWages_18 0.0 0 0 PrivateWages_19 0.0 0 0 PrivateWages_20 0.0 0 0 PrivateWages_21 0.0 0 0 PrivateWages_22 0.0 0 0 Investment_corpProfLag Investment_gnpLag Consumption_2 0.0 0.0 Consumption_3 0.0 0.0 Consumption_4 0.0 0.0 Consumption_5 0.0 0.0 Consumption_6 0.0 0.0 Consumption_8 0.0 0.0 Consumption_9 0.0 0.0 Consumption_11 0.0 0.0 Consumption_12 0.0 0.0 Consumption_13 0.0 0.0 Consumption_14 0.0 0.0 Consumption_15 0.0 0.0 Consumption_16 0.0 0.0 Consumption_17 0.0 0.0 Consumption_18 0.0 0.0 Consumption_19 0.0 0.0 Consumption_20 0.0 0.0 Consumption_21 0.0 0.0 Consumption_22 0.0 0.0 Investment_2 12.7 44.9 Investment_3 12.4 45.6 Investment_4 16.9 50.1 Investment_5 18.4 57.2 Investment_6 19.4 57.1 Investment_8 19.6 64.0 Investment_9 19.8 64.4 Investment_10 21.1 64.5 Investment_11 21.7 67.0 Investment_12 15.6 61.2 Investment_13 11.4 53.4 Investment_14 7.0 44.3 Investment_15 11.2 45.1 Investment_16 12.3 49.7 Investment_17 14.0 54.4 Investment_18 17.6 62.7 Investment_19 17.3 65.0 Investment_20 15.3 60.9 Investment_21 19.0 69.5 Investment_22 21.1 75.7 PrivateWages_2 0.0 0.0 PrivateWages_3 0.0 0.0 PrivateWages_4 0.0 0.0 PrivateWages_5 0.0 0.0 PrivateWages_6 0.0 0.0 PrivateWages_8 0.0 0.0 PrivateWages_9 0.0 0.0 PrivateWages_10 0.0 0.0 PrivateWages_11 0.0 0.0 PrivateWages_12 0.0 0.0 PrivateWages_13 0.0 0.0 PrivateWages_14 0.0 0.0 PrivateWages_15 0.0 0.0 PrivateWages_16 0.0 0.0 PrivateWages_17 0.0 0.0 PrivateWages_18 0.0 0.0 PrivateWages_19 0.0 0.0 PrivateWages_20 0.0 0.0 PrivateWages_21 0.0 0.0 PrivateWages_22 0.0 0.0 PrivateWages_(Intercept) PrivateWages_govExp PrivateWages_taxes Consumption_2 0 0.0 0.0 Consumption_3 0 0.0 0.0 Consumption_4 0 0.0 0.0 Consumption_5 0 0.0 0.0 Consumption_6 0 0.0 0.0 Consumption_8 0 0.0 0.0 Consumption_9 0 0.0 0.0 Consumption_11 0 0.0 0.0 Consumption_12 0 0.0 0.0 Consumption_13 0 0.0 0.0 Consumption_14 0 0.0 0.0 Consumption_15 0 0.0 0.0 Consumption_16 0 0.0 0.0 Consumption_17 0 0.0 0.0 Consumption_18 0 0.0 0.0 Consumption_19 0 0.0 0.0 Consumption_20 0 0.0 0.0 Consumption_21 0 0.0 0.0 Consumption_22 0 0.0 0.0 Investment_2 0 0.0 0.0 Investment_3 0 0.0 0.0 Investment_4 0 0.0 0.0 Investment_5 0 0.0 0.0 Investment_6 0 0.0 0.0 Investment_8 0 0.0 0.0 Investment_9 0 0.0 0.0 Investment_10 0 0.0 0.0 Investment_11 0 0.0 0.0 Investment_12 0 0.0 0.0 Investment_13 0 0.0 0.0 Investment_14 0 0.0 0.0 Investment_15 0 0.0 0.0 Investment_16 0 0.0 0.0 Investment_17 0 0.0 0.0 Investment_18 0 0.0 0.0 Investment_19 0 0.0 0.0 Investment_20 0 0.0 0.0 Investment_21 0 0.0 0.0 Investment_22 0 0.0 0.0 PrivateWages_2 1 3.9 7.7 PrivateWages_3 1 3.2 3.9 PrivateWages_4 1 2.8 4.7 PrivateWages_5 1 3.5 3.8 PrivateWages_6 1 3.3 5.5 PrivateWages_8 1 4.0 6.7 PrivateWages_9 1 4.2 4.2 PrivateWages_10 1 4.1 4.0 PrivateWages_11 1 5.2 7.7 PrivateWages_12 1 5.9 7.5 PrivateWages_13 1 4.9 8.3 PrivateWages_14 1 3.7 5.4 PrivateWages_15 1 4.0 6.8 PrivateWages_16 1 4.4 7.2 PrivateWages_17 1 2.9 8.3 PrivateWages_18 1 4.3 6.7 PrivateWages_19 1 5.3 7.4 PrivateWages_20 1 6.6 8.9 PrivateWages_21 1 7.4 9.6 PrivateWages_22 1 13.8 11.6 PrivateWages_govWage PrivateWages_trend PrivateWages_capitalLag Consumption_2 0.0 0 0 Consumption_3 0.0 0 0 Consumption_4 0.0 0 0 Consumption_5 0.0 0 0 Consumption_6 0.0 0 0 Consumption_8 0.0 0 0 Consumption_9 0.0 0 0 Consumption_11 0.0 0 0 Consumption_12 0.0 0 0 Consumption_13 0.0 0 0 Consumption_14 0.0 0 0 Consumption_15 0.0 0 0 Consumption_16 0.0 0 0 Consumption_17 0.0 0 0 Consumption_18 0.0 0 0 Consumption_19 0.0 0 0 Consumption_20 0.0 0 0 Consumption_21 0.0 0 0 Consumption_22 0.0 0 0 Investment_2 0.0 0 0 Investment_3 0.0 0 0 Investment_4 0.0 0 0 Investment_5 0.0 0 0 Investment_6 0.0 0 0 Investment_8 0.0 0 0 Investment_9 0.0 0 0 Investment_10 0.0 0 0 Investment_11 0.0 0 0 Investment_12 0.0 0 0 Investment_13 0.0 0 0 Investment_14 0.0 0 0 Investment_15 0.0 0 0 Investment_16 0.0 0 0 Investment_17 0.0 0 0 Investment_18 0.0 0 0 Investment_19 0.0 0 0 Investment_20 0.0 0 0 Investment_21 0.0 0 0 Investment_22 0.0 0 0 PrivateWages_2 2.7 -10 183 PrivateWages_3 2.9 -9 183 PrivateWages_4 2.9 -8 184 PrivateWages_5 3.1 -7 190 PrivateWages_6 3.2 -6 193 PrivateWages_8 3.6 -4 203 PrivateWages_9 3.7 -3 208 PrivateWages_10 4.0 -2 211 PrivateWages_11 4.2 -1 216 PrivateWages_12 4.8 0 217 PrivateWages_13 5.3 1 213 PrivateWages_14 5.6 2 207 PrivateWages_15 6.0 3 202 PrivateWages_16 6.1 4 199 PrivateWages_17 7.4 5 198 PrivateWages_18 6.7 6 200 PrivateWages_19 7.7 7 202 PrivateWages_20 7.8 8 200 PrivateWages_21 8.0 9 201 PrivateWages_22 8.5 10 204 PrivateWages_corpProfLag PrivateWages_gnpLag Consumption_2 0.0 0.0 Consumption_3 0.0 0.0 Consumption_4 0.0 0.0 Consumption_5 0.0 0.0 Consumption_6 0.0 0.0 Consumption_8 0.0 0.0 Consumption_9 0.0 0.0 Consumption_11 0.0 0.0 Consumption_12 0.0 0.0 Consumption_13 0.0 0.0 Consumption_14 0.0 0.0 Consumption_15 0.0 0.0 Consumption_16 0.0 0.0 Consumption_17 0.0 0.0 Consumption_18 0.0 0.0 Consumption_19 0.0 0.0 Consumption_20 0.0 0.0 Consumption_21 0.0 0.0 Consumption_22 0.0 0.0 Investment_2 0.0 0.0 Investment_3 0.0 0.0 Investment_4 0.0 0.0 Investment_5 0.0 0.0 Investment_6 0.0 0.0 Investment_8 0.0 0.0 Investment_9 0.0 0.0 Investment_10 0.0 0.0 Investment_11 0.0 0.0 Investment_12 0.0 0.0 Investment_13 0.0 0.0 Investment_14 0.0 0.0 Investment_15 0.0 0.0 Investment_16 0.0 0.0 Investment_17 0.0 0.0 Investment_18 0.0 0.0 Investment_19 0.0 0.0 Investment_20 0.0 0.0 Investment_21 0.0 0.0 Investment_22 0.0 0.0 PrivateWages_2 12.7 44.9 PrivateWages_3 12.4 45.6 PrivateWages_4 16.9 50.1 PrivateWages_5 18.4 57.2 PrivateWages_6 19.4 57.1 PrivateWages_8 19.6 64.0 PrivateWages_9 19.8 64.4 PrivateWages_10 21.1 64.5 PrivateWages_11 21.7 67.0 PrivateWages_12 15.6 61.2 PrivateWages_13 11.4 53.4 PrivateWages_14 7.0 44.3 PrivateWages_15 11.2 45.1 PrivateWages_16 12.3 49.7 PrivateWages_17 14.0 54.4 PrivateWages_18 17.6 62.7 PrivateWages_19 17.3 65.0 PrivateWages_20 15.3 60.9 PrivateWages_21 19.0 69.5 PrivateWages_22 21.1 75.7 > matrix of fitted regressors Consumption_(Intercept) Consumption_corpProf Consumption_2 1 13.44 Consumption_3 1 16.68 Consumption_4 1 18.95 Consumption_5 1 20.63 Consumption_6 1 19.28 Consumption_8 1 17.21 Consumption_9 1 18.99 Consumption_11 1 16.43 Consumption_12 1 12.49 Consumption_13 1 9.06 Consumption_14 1 9.28 Consumption_15 1 12.49 Consumption_16 1 14.39 Consumption_17 1 14.69 Consumption_18 1 19.60 Consumption_19 1 19.15 Consumption_20 1 17.54 Consumption_21 1 20.33 Consumption_22 1 22.78 Investment_2 0 0.00 Investment_3 0 0.00 Investment_4 0 0.00 Investment_5 0 0.00 Investment_6 0 0.00 Investment_8 0 0.00 Investment_9 0 0.00 Investment_10 0 0.00 Investment_11 0 0.00 Investment_12 0 0.00 Investment_13 0 0.00 Investment_14 0 0.00 Investment_15 0 0.00 Investment_16 0 0.00 Investment_17 0 0.00 Investment_18 0 0.00 Investment_19 0 0.00 Investment_20 0 0.00 Investment_21 0 0.00 Investment_22 0 0.00 PrivateWages_2 0 0.00 PrivateWages_3 0 0.00 PrivateWages_4 0 0.00 PrivateWages_5 0 0.00 PrivateWages_6 0 0.00 PrivateWages_8 0 0.00 PrivateWages_9 0 0.00 PrivateWages_10 0 0.00 PrivateWages_11 0 0.00 PrivateWages_12 0 0.00 PrivateWages_13 0 0.00 PrivateWages_14 0 0.00 PrivateWages_15 0 0.00 PrivateWages_16 0 0.00 PrivateWages_17 0 0.00 PrivateWages_18 0 0.00 PrivateWages_19 0 0.00 PrivateWages_20 0 0.00 PrivateWages_21 0 0.00 PrivateWages_22 0 0.00 Consumption_corpProfLag Consumption_wages Consumption_2 12.7 29.6 Consumption_3 12.4 31.9 Consumption_4 16.9 35.4 Consumption_5 18.4 38.8 Consumption_6 19.4 38.7 Consumption_8 19.6 39.8 Consumption_9 19.8 41.8 Consumption_11 21.7 43.0 Consumption_12 15.6 39.3 Consumption_13 11.4 35.2 Consumption_14 7.0 33.0 Consumption_15 11.2 37.3 Consumption_16 12.3 40.1 Consumption_17 14.0 41.7 Consumption_18 17.6 47.7 Consumption_19 17.3 49.2 Consumption_20 15.3 48.5 Consumption_21 19.0 53.4 Consumption_22 21.1 60.8 Investment_2 0.0 0.0 Investment_3 0.0 0.0 Investment_4 0.0 0.0 Investment_5 0.0 0.0 Investment_6 0.0 0.0 Investment_8 0.0 0.0 Investment_9 0.0 0.0 Investment_10 0.0 0.0 Investment_11 0.0 0.0 Investment_12 0.0 0.0 Investment_13 0.0 0.0 Investment_14 0.0 0.0 Investment_15 0.0 0.0 Investment_16 0.0 0.0 Investment_17 0.0 0.0 Investment_18 0.0 0.0 Investment_19 0.0 0.0 Investment_20 0.0 0.0 Investment_21 0.0 0.0 Investment_22 0.0 0.0 PrivateWages_2 0.0 0.0 PrivateWages_3 0.0 0.0 PrivateWages_4 0.0 0.0 PrivateWages_5 0.0 0.0 PrivateWages_6 0.0 0.0 PrivateWages_8 0.0 0.0 PrivateWages_9 0.0 0.0 PrivateWages_10 0.0 0.0 PrivateWages_11 0.0 0.0 PrivateWages_12 0.0 0.0 PrivateWages_13 0.0 0.0 PrivateWages_14 0.0 0.0 PrivateWages_15 0.0 0.0 PrivateWages_16 0.0 0.0 PrivateWages_17 0.0 0.0 PrivateWages_18 0.0 0.0 PrivateWages_19 0.0 0.0 PrivateWages_20 0.0 0.0 PrivateWages_21 0.0 0.0 PrivateWages_22 0.0 0.0 Investment_(Intercept) Investment_corpProf Consumption_2 0 0.00 Consumption_3 0 0.00 Consumption_4 0 0.00 Consumption_5 0 0.00 Consumption_6 0 0.00 Consumption_8 0 0.00 Consumption_9 0 0.00 Consumption_11 0 0.00 Consumption_12 0 0.00 Consumption_13 0 0.00 Consumption_14 0 0.00 Consumption_15 0 0.00 Consumption_16 0 0.00 Consumption_17 0 0.00 Consumption_18 0 0.00 Consumption_19 0 0.00 Consumption_20 0 0.00 Consumption_21 0 0.00 Consumption_22 0 0.00 Investment_2 1 12.96 Investment_3 1 16.70 Investment_4 1 19.14 Investment_5 1 20.94 Investment_6 1 19.47 Investment_8 1 17.14 Investment_9 1 19.49 Investment_10 1 20.46 Investment_11 1 16.85 Investment_12 1 12.68 Investment_13 1 8.92 Investment_14 1 9.30 Investment_15 1 12.79 Investment_16 1 14.26 Investment_17 1 14.75 Investment_18 1 19.54 Investment_19 1 19.36 Investment_20 1 17.39 Investment_21 1 20.10 Investment_22 1 22.86 PrivateWages_2 0 0.00 PrivateWages_3 0 0.00 PrivateWages_4 0 0.00 PrivateWages_5 0 0.00 PrivateWages_6 0 0.00 PrivateWages_8 0 0.00 PrivateWages_9 0 0.00 PrivateWages_10 0 0.00 PrivateWages_11 0 0.00 PrivateWages_12 0 0.00 PrivateWages_13 0 0.00 PrivateWages_14 0 0.00 PrivateWages_15 0 0.00 PrivateWages_16 0 0.00 PrivateWages_17 0 0.00 PrivateWages_18 0 0.00 PrivateWages_19 0 0.00 PrivateWages_20 0 0.00 PrivateWages_21 0 0.00 PrivateWages_22 0 0.00 Investment_corpProfLag Investment_capitalLag Consumption_2 0.0 0 Consumption_3 0.0 0 Consumption_4 0.0 0 Consumption_5 0.0 0 Consumption_6 0.0 0 Consumption_8 0.0 0 Consumption_9 0.0 0 Consumption_11 0.0 0 Consumption_12 0.0 0 Consumption_13 0.0 0 Consumption_14 0.0 0 Consumption_15 0.0 0 Consumption_16 0.0 0 Consumption_17 0.0 0 Consumption_18 0.0 0 Consumption_19 0.0 0 Consumption_20 0.0 0 Consumption_21 0.0 0 Consumption_22 0.0 0 Investment_2 12.7 183 Investment_3 12.4 183 Investment_4 16.9 184 Investment_5 18.4 190 Investment_6 19.4 193 Investment_8 19.6 203 Investment_9 19.8 208 Investment_10 21.1 211 Investment_11 21.7 216 Investment_12 15.6 217 Investment_13 11.4 213 Investment_14 7.0 207 Investment_15 11.2 202 Investment_16 12.3 199 Investment_17 14.0 198 Investment_18 17.6 200 Investment_19 17.3 202 Investment_20 15.3 200 Investment_21 19.0 201 Investment_22 21.1 204 PrivateWages_2 0.0 0 PrivateWages_3 0.0 0 PrivateWages_4 0.0 0 PrivateWages_5 0.0 0 PrivateWages_6 0.0 0 PrivateWages_8 0.0 0 PrivateWages_9 0.0 0 PrivateWages_10 0.0 0 PrivateWages_11 0.0 0 PrivateWages_12 0.0 0 PrivateWages_13 0.0 0 PrivateWages_14 0.0 0 PrivateWages_15 0.0 0 PrivateWages_16 0.0 0 PrivateWages_17 0.0 0 PrivateWages_18 0.0 0 PrivateWages_19 0.0 0 PrivateWages_20 0.0 0 PrivateWages_21 0.0 0 PrivateWages_22 0.0 0 PrivateWages_(Intercept) PrivateWages_gnp PrivateWages_gnpLag Consumption_2 0 0.0 0.0 Consumption_3 0 0.0 0.0 Consumption_4 0 0.0 0.0 Consumption_5 0 0.0 0.0 Consumption_6 0 0.0 0.0 Consumption_8 0 0.0 0.0 Consumption_9 0 0.0 0.0 Consumption_11 0 0.0 0.0 Consumption_12 0 0.0 0.0 Consumption_13 0 0.0 0.0 Consumption_14 0 0.0 0.0 Consumption_15 0 0.0 0.0 Consumption_16 0 0.0 0.0 Consumption_17 0 0.0 0.0 Consumption_18 0 0.0 0.0 Consumption_19 0 0.0 0.0 Consumption_20 0 0.0 0.0 Consumption_21 0 0.0 0.0 Consumption_22 0 0.0 0.0 Investment_2 0 0.0 0.0 Investment_3 0 0.0 0.0 Investment_4 0 0.0 0.0 Investment_5 0 0.0 0.0 Investment_6 0 0.0 0.0 Investment_8 0 0.0 0.0 Investment_9 0 0.0 0.0 Investment_10 0 0.0 0.0 Investment_11 0 0.0 0.0 Investment_12 0 0.0 0.0 Investment_13 0 0.0 0.0 Investment_14 0 0.0 0.0 Investment_15 0 0.0 0.0 Investment_16 0 0.0 0.0 Investment_17 0 0.0 0.0 Investment_18 0 0.0 0.0 Investment_19 0 0.0 0.0 Investment_20 0 0.0 0.0 Investment_21 0 0.0 0.0 Investment_22 0 0.0 0.0 PrivateWages_2 1 47.1 44.9 PrivateWages_3 1 49.6 45.6 PrivateWages_4 1 56.5 50.1 PrivateWages_5 1 60.7 57.2 PrivateWages_6 1 60.6 57.1 PrivateWages_8 1 60.0 64.0 PrivateWages_9 1 62.3 64.4 PrivateWages_10 1 64.6 64.5 PrivateWages_11 1 63.7 67.0 PrivateWages_12 1 54.8 61.2 PrivateWages_13 1 47.0 53.4 PrivateWages_14 1 42.1 44.3 PrivateWages_15 1 51.2 45.1 PrivateWages_16 1 55.3 49.7 PrivateWages_17 1 57.4 54.4 PrivateWages_18 1 67.2 62.7 PrivateWages_19 1 68.5 65.0 PrivateWages_20 1 66.8 60.9 PrivateWages_21 1 74.9 69.5 PrivateWages_22 1 86.9 75.7 PrivateWages_trend Consumption_2 0 Consumption_3 0 Consumption_4 0 Consumption_5 0 Consumption_6 0 Consumption_8 0 Consumption_9 0 Consumption_11 0 Consumption_12 0 Consumption_13 0 Consumption_14 0 Consumption_15 0 Consumption_16 0 Consumption_17 0 Consumption_18 0 Consumption_19 0 Consumption_20 0 Consumption_21 0 Consumption_22 0 Investment_2 0 Investment_3 0 Investment_4 0 Investment_5 0 Investment_6 0 Investment_8 0 Investment_9 0 Investment_10 0 Investment_11 0 Investment_12 0 Investment_13 0 Investment_14 0 Investment_15 0 Investment_16 0 Investment_17 0 Investment_18 0 Investment_19 0 Investment_20 0 Investment_21 0 Investment_22 0 PrivateWages_2 -10 PrivateWages_3 -9 PrivateWages_4 -8 PrivateWages_5 -7 PrivateWages_6 -6 PrivateWages_8 -4 PrivateWages_9 -3 PrivateWages_10 -2 PrivateWages_11 -1 PrivateWages_12 0 PrivateWages_13 1 PrivateWages_14 2 PrivateWages_15 3 PrivateWages_16 4 PrivateWages_17 5 PrivateWages_18 6 PrivateWages_19 7 PrivateWages_20 8 PrivateWages_21 9 PrivateWages_22 10 > nobs [1] 59 > linearHypothesis Linear hypothesis test (Theil's F test) Hypothesis: Consumption_corpProf + Investment_capitalLag = 0 Model 1: restricted model Model 2: kleinModel Res.Df Df F Pr(>F) 1 48 2 47 1 0.87 0.36 Linear hypothesis test (F statistic of a Wald test) Hypothesis: Consumption_corpProf + Investment_capitalLag = 0 Model 1: restricted model Model 2: kleinModel Res.Df Df F Pr(>F) 1 48 2 47 1 0.98 0.33 Linear hypothesis test (Chi^2 statistic of a Wald test) Hypothesis: Consumption_corpProf + Investment_capitalLag = 0 Model 1: restricted model Model 2: kleinModel Res.Df Df Chisq Pr(>Chisq) 1 48 2 47 1 0.98 0.32 Linear hypothesis test (Theil's F test) Hypothesis: Consumption_corpProf + Investment_capitalLag = 0 Consumption_corpProfLag - PrivateWages_trend = 0 Model 1: restricted model Model 2: kleinModel Res.Df Df F Pr(>F) 1 49 2 47 2 0.43 0.65 Linear hypothesis test (F statistic of a Wald test) Hypothesis: Consumption_corpProf + Investment_capitalLag = 0 Consumption_corpProfLag - PrivateWages_trend = 0 Model 1: restricted model Model 2: kleinModel Res.Df Df F Pr(>F) 1 49 2 47 2 0.49 0.61 Linear hypothesis test (Chi^2 statistic of a Wald test) Hypothesis: Consumption_corpProf + Investment_capitalLag = 0 Consumption_corpProfLag - PrivateWages_trend = 0 Model 1: restricted model Model 2: kleinModel Res.Df Df Chisq Pr(>Chisq) 1 49 2 47 2 0.98 0.61 > logLik 'log Lik.' -71.5 (df=13) 'log Lik.' -78.7 (df=13) Estimating function Consumption_(Intercept) Consumption_corpProf Consumption_2 -1.5371 -20.65 Consumption_3 -0.3191 -5.32 Consumption_4 0.0169 0.32 Consumption_5 -1.6346 -33.73 Consumption_6 0.2820 5.44 Consumption_8 2.9429 50.64 Consumption_9 2.3495 44.61 Consumption_11 -1.2221 -20.08 Consumption_12 -1.0034 -12.54 Consumption_13 -2.0551 -18.62 Consumption_14 1.4937 13.86 Consumption_15 -0.7418 -9.26 Consumption_16 -0.6703 -9.64 Consumption_17 4.0943 60.15 Consumption_18 -0.6347 -12.44 Consumption_19 -3.0409 -58.22 Consumption_20 2.1019 36.86 Consumption_21 0.7142 14.52 Consumption_22 -1.1363 -25.88 Investment_2 0.0000 0.00 Investment_3 0.0000 0.00 Investment_4 0.0000 0.00 Investment_5 0.0000 0.00 Investment_6 0.0000 0.00 Investment_8 0.0000 0.00 Investment_9 0.0000 0.00 Investment_10 0.0000 0.00 Investment_11 0.0000 0.00 Investment_12 0.0000 0.00 Investment_13 0.0000 0.00 Investment_14 0.0000 0.00 Investment_15 0.0000 0.00 Investment_16 0.0000 0.00 Investment_17 0.0000 0.00 Investment_18 0.0000 0.00 Investment_19 0.0000 0.00 Investment_20 0.0000 0.00 Investment_21 0.0000 0.00 Investment_22 0.0000 0.00 PrivateWages_2 0.0000 0.00 PrivateWages_3 0.0000 0.00 PrivateWages_4 0.0000 0.00 PrivateWages_5 0.0000 0.00 PrivateWages_6 0.0000 0.00 PrivateWages_8 0.0000 0.00 PrivateWages_9 0.0000 0.00 PrivateWages_10 0.0000 0.00 PrivateWages_11 0.0000 0.00 PrivateWages_12 0.0000 0.00 PrivateWages_13 0.0000 0.00 PrivateWages_14 0.0000 0.00 PrivateWages_15 0.0000 0.00 PrivateWages_16 0.0000 0.00 PrivateWages_17 0.0000 0.00 PrivateWages_18 0.0000 0.00 PrivateWages_19 0.0000 0.00 PrivateWages_20 0.0000 0.00 PrivateWages_21 0.0000 0.00 PrivateWages_22 0.0000 0.00 Consumption_corpProfLag Consumption_wages Consumption_2 -19.521 -45.456 Consumption_3 -3.957 -10.167 Consumption_4 0.286 0.599 Consumption_5 -30.078 -63.354 Consumption_6 5.471 10.901 Consumption_8 57.681 117.190 Consumption_9 46.520 98.197 Consumption_11 -26.520 -52.512 Consumption_12 -15.653 -39.407 Consumption_13 -23.428 -72.317 Consumption_14 10.456 49.297 Consumption_15 -8.308 -27.687 Consumption_16 -8.244 -26.878 Consumption_17 57.321 170.665 Consumption_18 -11.170 -30.264 Consumption_19 -52.608 -149.761 Consumption_20 32.159 101.952 Consumption_21 13.570 38.131 Consumption_22 -23.976 -69.128 Investment_2 0.000 0.000 Investment_3 0.000 0.000 Investment_4 0.000 0.000 Investment_5 0.000 0.000 Investment_6 0.000 0.000 Investment_8 0.000 0.000 Investment_9 0.000 0.000 Investment_10 0.000 0.000 Investment_11 0.000 0.000 Investment_12 0.000 0.000 Investment_13 0.000 0.000 Investment_14 0.000 0.000 Investment_15 0.000 0.000 Investment_16 0.000 0.000 Investment_17 0.000 0.000 Investment_18 0.000 0.000 Investment_19 0.000 0.000 Investment_20 0.000 0.000 Investment_21 0.000 0.000 Investment_22 0.000 0.000 PrivateWages_2 0.000 0.000 PrivateWages_3 0.000 0.000 PrivateWages_4 0.000 0.000 PrivateWages_5 0.000 0.000 PrivateWages_6 0.000 0.000 PrivateWages_8 0.000 0.000 PrivateWages_9 0.000 0.000 PrivateWages_10 0.000 0.000 PrivateWages_11 0.000 0.000 PrivateWages_12 0.000 0.000 PrivateWages_13 0.000 0.000 PrivateWages_14 0.000 0.000 PrivateWages_15 0.000 0.000 PrivateWages_16 0.000 0.000 PrivateWages_17 0.000 0.000 PrivateWages_18 0.000 0.000 PrivateWages_19 0.000 0.000 PrivateWages_20 0.000 0.000 PrivateWages_21 0.000 0.000 PrivateWages_22 0.000 0.000 Investment_(Intercept) Investment_corpProf Consumption_2 0.0000 0.000 Consumption_3 0.0000 0.000 Consumption_4 0.0000 0.000 Consumption_5 0.0000 0.000 Consumption_6 0.0000 0.000 Consumption_8 0.0000 0.000 Consumption_9 0.0000 0.000 Consumption_11 0.0000 0.000 Consumption_12 0.0000 0.000 Consumption_13 0.0000 0.000 Consumption_14 0.0000 0.000 Consumption_15 0.0000 0.000 Consumption_16 0.0000 0.000 Consumption_17 0.0000 0.000 Consumption_18 0.0000 0.000 Consumption_19 0.0000 0.000 Consumption_20 0.0000 0.000 Consumption_21 0.0000 0.000 Consumption_22 0.0000 0.000 Investment_2 -1.1313 -14.660 Investment_3 0.2902 4.847 Investment_4 0.9027 17.274 Investment_5 -1.7434 -36.502 Investment_6 0.5695 11.088 Investment_8 1.6225 27.812 Investment_9 0.4166 8.119 Investment_10 2.0381 41.703 Investment_11 -0.8611 -14.505 Investment_12 -0.9091 -11.527 Investment_13 -1.1148 -9.946 Investment_14 1.3841 12.873 Investment_15 -0.2900 -3.710 Investment_16 0.0605 0.862 Investment_17 2.2439 33.101 Investment_18 -0.5390 -10.534 Investment_19 -3.9452 -76.375 Investment_20 0.4890 8.502 Investment_21 0.0864 1.737 Investment_22 0.4306 9.843 PrivateWages_2 0.0000 0.000 PrivateWages_3 0.0000 0.000 PrivateWages_4 0.0000 0.000 PrivateWages_5 0.0000 0.000 PrivateWages_6 0.0000 0.000 PrivateWages_8 0.0000 0.000 PrivateWages_9 0.0000 0.000 PrivateWages_10 0.0000 0.000 PrivateWages_11 0.0000 0.000 PrivateWages_12 0.0000 0.000 PrivateWages_13 0.0000 0.000 PrivateWages_14 0.0000 0.000 PrivateWages_15 0.0000 0.000 PrivateWages_16 0.0000 0.000 PrivateWages_17 0.0000 0.000 PrivateWages_18 0.0000 0.000 PrivateWages_19 0.0000 0.000 PrivateWages_20 0.0000 0.000 PrivateWages_21 0.0000 0.000 PrivateWages_22 0.0000 0.000 Investment_corpProfLag Investment_capitalLag Consumption_2 0.000 0.0 Consumption_3 0.000 0.0 Consumption_4 0.000 0.0 Consumption_5 0.000 0.0 Consumption_6 0.000 0.0 Consumption_8 0.000 0.0 Consumption_9 0.000 0.0 Consumption_11 0.000 0.0 Consumption_12 0.000 0.0 Consumption_13 0.000 0.0 Consumption_14 0.000 0.0 Consumption_15 0.000 0.0 Consumption_16 0.000 0.0 Consumption_17 0.000 0.0 Consumption_18 0.000 0.0 Consumption_19 0.000 0.0 Consumption_20 0.000 0.0 Consumption_21 0.000 0.0 Consumption_22 0.000 0.0 Investment_2 -14.368 -206.8 Investment_3 3.598 53.0 Investment_4 15.256 166.5 Investment_5 -32.079 -330.7 Investment_6 11.048 109.7 Investment_8 31.801 330.0 Investment_9 8.248 86.5 Investment_10 43.003 429.2 Investment_11 -18.685 -185.7 Investment_12 -14.182 -197.0 Investment_13 -12.709 -237.8 Investment_14 9.689 286.6 Investment_15 -3.247 -58.6 Investment_16 0.744 12.0 Investment_17 31.414 443.6 Investment_18 -9.486 -107.7 Investment_19 -68.252 -796.1 Investment_20 7.482 97.7 Investment_21 1.642 17.4 Investment_22 9.085 88.0 PrivateWages_2 0.000 0.0 PrivateWages_3 0.000 0.0 PrivateWages_4 0.000 0.0 PrivateWages_5 0.000 0.0 PrivateWages_6 0.000 0.0 PrivateWages_8 0.000 0.0 PrivateWages_9 0.000 0.0 PrivateWages_10 0.000 0.0 PrivateWages_11 0.000 0.0 PrivateWages_12 0.000 0.0 PrivateWages_13 0.000 0.0 PrivateWages_14 0.000 0.0 PrivateWages_15 0.000 0.0 PrivateWages_16 0.000 0.0 PrivateWages_17 0.000 0.0 PrivateWages_18 0.000 0.0 PrivateWages_19 0.000 0.0 PrivateWages_20 0.000 0.0 PrivateWages_21 0.000 0.0 PrivateWages_22 0.000 0.0 PrivateWages_(Intercept) PrivateWages_gnp PrivateWages_gnpLag Consumption_2 0.0000 0.00 0.00 Consumption_3 0.0000 0.00 0.00 Consumption_4 0.0000 0.00 0.00 Consumption_5 0.0000 0.00 0.00 Consumption_6 0.0000 0.00 0.00 Consumption_8 0.0000 0.00 0.00 Consumption_9 0.0000 0.00 0.00 Consumption_11 0.0000 0.00 0.00 Consumption_12 0.0000 0.00 0.00 Consumption_13 0.0000 0.00 0.00 Consumption_14 0.0000 0.00 0.00 Consumption_15 0.0000 0.00 0.00 Consumption_16 0.0000 0.00 0.00 Consumption_17 0.0000 0.00 0.00 Consumption_18 0.0000 0.00 0.00 Consumption_19 0.0000 0.00 0.00 Consumption_20 0.0000 0.00 0.00 Consumption_21 0.0000 0.00 0.00 Consumption_22 0.0000 0.00 0.00 Investment_2 0.0000 0.00 0.00 Investment_3 0.0000 0.00 0.00 Investment_4 0.0000 0.00 0.00 Investment_5 0.0000 0.00 0.00 Investment_6 0.0000 0.00 0.00 Investment_8 0.0000 0.00 0.00 Investment_9 0.0000 0.00 0.00 Investment_10 0.0000 0.00 0.00 Investment_11 0.0000 0.00 0.00 Investment_12 0.0000 0.00 0.00 Investment_13 0.0000 0.00 0.00 Investment_14 0.0000 0.00 0.00 Investment_15 0.0000 0.00 0.00 Investment_16 0.0000 0.00 0.00 Investment_17 0.0000 0.00 0.00 Investment_18 0.0000 0.00 0.00 Investment_19 0.0000 0.00 0.00 Investment_20 0.0000 0.00 0.00 Investment_21 0.0000 0.00 0.00 Investment_22 0.0000 0.00 0.00 PrivateWages_2 -1.9924 -93.78 -89.46 PrivateWages_3 0.4683 23.22 21.35 PrivateWages_4 1.4034 79.35 70.31 PrivateWages_5 -1.7870 -108.45 -102.22 PrivateWages_6 -0.3627 -21.98 -20.71 PrivateWages_8 1.1629 69.77 74.43 PrivateWages_9 1.2735 79.30 82.01 PrivateWages_10 2.2141 142.96 142.81 PrivateWages_11 -1.2912 -82.26 -86.51 PrivateWages_12 -0.0350 -1.92 -2.14 PrivateWages_13 -1.0438 -49.04 -55.74 PrivateWages_14 1.8016 75.90 79.81 PrivateWages_15 -0.3714 -19.02 -16.75 PrivateWages_16 -0.3904 -21.61 -19.40 PrivateWages_17 1.4934 85.71 81.24 PrivateWages_18 0.0279 1.88 1.75 PrivateWages_19 -3.8229 -261.91 -248.49 PrivateWages_20 0.7870 52.61 47.93 PrivateWages_21 -0.7415 -55.52 -51.54 PrivateWages_22 1.2062 104.79 91.31 PrivateWages_trend Consumption_2 0.000 Consumption_3 0.000 Consumption_4 0.000 Consumption_5 0.000 Consumption_6 0.000 Consumption_8 0.000 Consumption_9 0.000 Consumption_11 0.000 Consumption_12 0.000 Consumption_13 0.000 Consumption_14 0.000 Consumption_15 0.000 Consumption_16 0.000 Consumption_17 0.000 Consumption_18 0.000 Consumption_19 0.000 Consumption_20 0.000 Consumption_21 0.000 Consumption_22 0.000 Investment_2 0.000 Investment_3 0.000 Investment_4 0.000 Investment_5 0.000 Investment_6 0.000 Investment_8 0.000 Investment_9 0.000 Investment_10 0.000 Investment_11 0.000 Investment_12 0.000 Investment_13 0.000 Investment_14 0.000 Investment_15 0.000 Investment_16 0.000 Investment_17 0.000 Investment_18 0.000 Investment_19 0.000 Investment_20 0.000 Investment_21 0.000 Investment_22 0.000 PrivateWages_2 19.924 PrivateWages_3 -4.214 PrivateWages_4 -11.227 PrivateWages_5 12.509 PrivateWages_6 2.176 PrivateWages_8 -4.652 PrivateWages_9 -3.820 PrivateWages_10 -4.428 PrivateWages_11 1.291 PrivateWages_12 0.000 PrivateWages_13 -1.044 PrivateWages_14 3.603 PrivateWages_15 -1.114 PrivateWages_16 -1.562 PrivateWages_17 7.467 PrivateWages_18 0.168 PrivateWages_19 -26.760 PrivateWages_20 6.296 PrivateWages_21 -6.674 PrivateWages_22 12.062 [1] TRUE > Bread Consumption_(Intercept) Consumption_corpProf Consumption_(Intercept) 99.763 -0.8715 Consumption_corpProf -0.872 0.7621 Consumption_corpProfLag -0.479 -0.4940 Consumption_wages -1.807 -0.0927 Investment_(Intercept) 0.000 0.0000 Investment_corpProf 0.000 0.0000 Investment_corpProfLag 0.000 0.0000 Investment_capitalLag 0.000 0.0000 PrivateWages_(Intercept) 0.000 0.0000 PrivateWages_gnp 0.000 0.0000 PrivateWages_gnpLag 0.000 0.0000 PrivateWages_trend 0.000 0.0000 Consumption_corpProfLag Consumption_wages Consumption_(Intercept) -0.4786 -1.8068 Consumption_corpProf -0.4940 -0.0927 Consumption_corpProfLag 0.6462 -0.0403 Consumption_wages -0.0403 0.0963 Investment_(Intercept) 0.0000 0.0000 Investment_corpProf 0.0000 0.0000 Investment_corpProfLag 0.0000 0.0000 Investment_capitalLag 0.0000 0.0000 PrivateWages_(Intercept) 0.0000 0.0000 PrivateWages_gnp 0.0000 0.0000 PrivateWages_gnpLag 0.0000 0.0000 PrivateWages_trend 0.0000 0.0000 Investment_(Intercept) Investment_corpProf Consumption_(Intercept) 0.0 0.000 Consumption_corpProf 0.0 0.000 Consumption_corpProfLag 0.0 0.000 Consumption_wages 0.0 0.000 Investment_(Intercept) 2405.5 -38.269 Investment_corpProf -38.3 1.231 Investment_corpProfLag 32.8 -1.072 Investment_capitalLag -11.4 0.174 PrivateWages_(Intercept) 0.0 0.000 PrivateWages_gnp 0.0 0.000 PrivateWages_gnpLag 0.0 0.000 PrivateWages_trend 0.0 0.000 Investment_corpProfLag Investment_capitalLag Consumption_(Intercept) 0.000 0.0000 Consumption_corpProf 0.000 0.0000 Consumption_corpProfLag 0.000 0.0000 Consumption_wages 0.000 0.0000 Investment_(Intercept) 32.828 -11.4279 Investment_corpProf -1.072 0.1744 Investment_corpProfLag 1.129 -0.1652 Investment_capitalLag -0.165 0.0557 PrivateWages_(Intercept) 0.000 0.0000 PrivateWages_gnp 0.000 0.0000 PrivateWages_gnpLag 0.000 0.0000 PrivateWages_trend 0.000 0.0000 PrivateWages_(Intercept) PrivateWages_gnp Consumption_(Intercept) 0.000 0.0000 Consumption_corpProf 0.000 0.0000 Consumption_corpProfLag 0.000 0.0000 Consumption_wages 0.000 0.0000 Investment_(Intercept) 0.000 0.0000 Investment_corpProf 0.000 0.0000 Investment_corpProfLag 0.000 0.0000 Investment_capitalLag 0.000 0.0000 PrivateWages_(Intercept) 167.869 -0.9135 PrivateWages_gnp -0.913 0.1554 PrivateWages_gnpLag -1.915 -0.1448 PrivateWages_trend 2.128 -0.0417 PrivateWages_gnpLag PrivateWages_trend Consumption_(Intercept) 0.0000 0.0000 Consumption_corpProf 0.0000 0.0000 Consumption_corpProfLag 0.0000 0.0000 Consumption_wages 0.0000 0.0000 Investment_(Intercept) 0.0000 0.0000 Investment_corpProf 0.0000 0.0000 Investment_corpProfLag 0.0000 0.0000 Investment_capitalLag 0.0000 0.0000 PrivateWages_(Intercept) -1.9153 2.1280 PrivateWages_gnp -0.1448 -0.0417 PrivateWages_gnpLag 0.1830 0.0059 PrivateWages_trend 0.0059 0.1132 > > # SUR Warning in systemfit(system, method = method, data = KleinI, methodResidCov = ifelse(method == : the estimation of systems of equations with unequal numbers of observations has not been thoroughly tested yet > summary systemfit results method: SUR N DF SSR detRCov OLS-R2 McElroy-R2 system 61 49 45.4 0.151 0.977 0.992 N DF SSR MSE RMSE R2 Adj R2 Consumption 20 16 17.6 1.102 1.050 0.981 0.977 Investment 21 17 17.5 1.029 1.015 0.931 0.918 PrivateWages 20 16 10.3 0.643 0.802 0.987 0.985 The covariance matrix of the residuals used for estimation Consumption Investment PrivateWages Consumption 0.8871 0.0268 -0.349 Investment 0.0268 0.7328 0.103 PrivateWages -0.3492 0.1029 0.444 The covariance matrix of the residuals Consumption Investment PrivateWages Consumption 0.8852 0.0508 -0.406 Investment 0.0508 0.7313 0.161 PrivateWages -0.4063 0.1609 0.467 The correlations of the residuals Consumption Investment PrivateWages Consumption 1.000 0.065 -0.635 Investment 0.065 1.000 0.262 PrivateWages -0.635 0.262 1.000 SUR estimates for 'Consumption' (equation 1) Model Formula: consump ~ corpProf + corpProfLag + wages Estimate Std. Error t value Pr(>|t|) (Intercept) 16.0876 1.2010 13.39 4.1e-10 *** corpProf 0.2173 0.0799 2.72 0.015 * corpProfLag 0.0694 0.0793 0.88 0.394 wages 0.7975 0.0360 22.15 2.0e-13 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.05 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 17.63 MSE: 1.102 Root MSE: 1.05 Multiple R-Squared: 0.981 Adjusted R-Squared: 0.977 SUR estimates for 'Investment' (equation 2) Model Formula: invest ~ corpProf + corpProfLag + capitalLag Estimate Std. Error t value Pr(>|t|) (Intercept) 12.3518 4.5615 2.71 0.01493 * corpProf 0.4511 0.0814 5.54 3.6e-05 *** corpProfLag 0.3570 0.0846 4.22 0.00058 *** capitalLag -0.1225 0.0223 -5.49 4.0e-05 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.015 on 17 degrees of freedom Number of observations: 21 Degrees of Freedom: 17 SSR: 17.5 MSE: 1.029 Root MSE: 1.015 Multiple R-Squared: 0.931 Adjusted R-Squared: 0.918 SUR estimates for 'PrivateWages' (equation 3) Model Formula: privWage ~ gnp + gnpLag + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 1.3964 1.0825 1.29 0.22 gnp 0.4177 0.0269 15.55 4.4e-11 *** gnpLag 0.1709 0.0306 5.59 4.0e-05 *** trend 0.1467 0.0272 5.40 5.9e-05 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 0.802 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 10.284 MSE: 0.643 Root MSE: 0.802 Multiple R-Squared: 0.987 Adjusted R-Squared: 0.985 > residuals Consumption Investment PrivateWages 1 NA NA NA 2 -0.2529 -0.2920 -1.15193 3 -1.2998 -0.1392 0.50193 4 -1.5662 1.1106 1.42026 5 -0.4876 -1.4391 -0.09801 6 0.0149 0.3556 -0.35678 7 0.9002 1.4558 NA 8 1.3535 0.8299 -0.74964 9 1.0406 -0.5136 0.29355 10 NA 1.2191 1.18544 11 0.4417 0.2810 -0.36558 12 -0.0892 0.0754 0.33733 13 -0.1541 0.3429 -0.17490 14 0.2984 0.3597 0.39941 15 -0.0260 -0.1602 0.29441 16 -0.0250 0.0130 -0.00177 17 1.5671 1.0231 -0.81891 18 -0.4089 0.0306 0.85516 19 0.2819 -2.6153 -0.77184 20 0.9257 -0.6030 -0.41040 21 0.7415 -0.7118 -1.21679 22 -2.2437 -0.5398 0.57166 > fitted Consumption Investment PrivateWages 1 NA NA NA 2 42.2 0.092 26.7 3 46.3 2.039 28.8 4 50.8 4.089 32.7 5 51.1 4.439 34.0 6 52.6 4.744 35.8 7 54.2 4.144 NA 8 54.8 3.370 38.6 9 56.3 3.514 38.9 10 NA 3.881 40.1 11 54.6 0.719 38.3 12 51.0 -3.475 34.2 13 45.8 -6.543 29.2 14 46.2 -5.460 28.1 15 48.7 -2.840 30.3 16 51.3 -1.313 33.2 17 56.1 1.077 37.6 18 59.1 1.969 40.1 19 57.2 0.715 39.0 20 60.7 1.903 42.0 21 64.3 4.012 46.2 22 71.9 5.440 52.7 > predict Consumption.pred Consumption.se.fit Consumption.lwr Consumption.upr 1 NA NA NA NA 2 42.2 0.422 41.3 43.0 3 46.3 0.462 45.4 47.2 4 50.8 0.309 50.1 51.4 5 51.1 0.359 50.4 51.8 6 52.6 0.362 51.9 53.3 7 54.2 0.328 53.5 54.9 8 54.8 0.300 54.2 55.4 9 56.3 0.323 55.6 56.9 10 NA NA NA NA 11 54.6 0.531 53.5 55.6 12 51.0 0.427 50.1 51.8 13 45.8 0.564 44.6 46.9 14 46.2 0.543 45.1 47.3 15 48.7 0.341 48.0 49.4 16 51.3 0.302 50.7 51.9 17 56.1 0.328 55.5 56.8 18 59.1 0.294 58.5 59.7 19 57.2 0.332 56.6 57.9 20 60.7 0.392 59.9 61.5 21 64.3 0.394 63.5 65.0 22 71.9 0.615 70.7 73.2 Investment.pred Investment.se.fit Investment.lwr Investment.upr 1 NA NA NA NA 2 0.092 0.508 -0.929 1.113 3 2.039 0.421 1.193 2.885 4 4.089 0.376 3.333 4.846 5 4.439 0.311 3.813 5.065 6 4.744 0.294 4.154 5.335 7 4.144 0.277 3.587 4.701 8 3.370 0.247 2.873 3.867 9 3.514 0.328 2.855 4.172 10 3.881 0.376 3.126 4.636 11 0.719 0.508 -0.301 1.739 12 -3.475 0.428 -4.336 -2.615 13 -6.543 0.521 -7.590 -5.496 14 -5.460 0.583 -6.632 -4.288 15 -2.840 0.316 -3.474 -2.205 16 -1.313 0.271 -1.857 -0.769 17 1.077 0.293 0.488 1.666 18 1.969 0.205 1.557 2.382 19 0.715 0.263 0.187 1.244 20 1.903 0.309 1.283 2.523 21 4.012 0.280 3.449 4.574 22 5.440 0.389 4.659 6.221 PrivateWages.pred PrivateWages.se.fit PrivateWages.lwr PrivateWages.upr 1 NA NA NA NA 2 26.7 0.306 26.0 27.3 3 28.8 0.305 28.2 29.4 4 32.7 0.302 32.1 33.3 5 34.0 0.231 33.5 34.5 6 35.8 0.230 35.3 36.2 7 NA NA NA NA 8 38.6 0.233 38.2 39.1 9 38.9 0.222 38.5 39.4 10 40.1 0.213 39.7 40.5 11 38.3 0.292 37.7 38.9 12 34.2 0.300 33.6 34.8 13 29.2 0.361 28.4 29.9 14 28.1 0.322 27.5 28.7 15 30.3 0.314 29.7 30.9 16 33.2 0.263 32.7 33.7 17 37.6 0.256 37.1 38.1 18 40.1 0.204 39.7 40.6 19 39.0 0.298 38.4 39.6 20 42.0 0.272 41.5 42.6 21 46.2 0.288 45.6 46.8 22 52.7 0.431 51.9 53.6 > model.frame [1] TRUE > model.matrix [1] TRUE > nobs [1] 61 > linearHypothesis Linear hypothesis test (Theil's F test) Hypothesis: Consumption_corpProf + Investment_capitalLag = 0 Model 1: restricted model Model 2: kleinModel Res.Df Df F Pr(>F) 1 50 2 49 1 1.01 0.32 Linear hypothesis test (F statistic of a Wald test) Hypothesis: Consumption_corpProf + Investment_capitalLag = 0 Model 1: restricted model Model 2: kleinModel Res.Df Df F Pr(>F) 1 50 2 49 1 1.3 0.26 Linear hypothesis test (Chi^2 statistic of a Wald test) Hypothesis: Consumption_corpProf + Investment_capitalLag = 0 Model 1: restricted model Model 2: kleinModel Res.Df Df Chisq Pr(>Chisq) 1 50 2 49 1 1.3 0.25 Linear hypothesis test (Theil's F test) Hypothesis: Consumption_corpProf + Investment_capitalLag = 0 Consumption_corpProfLag - PrivateWages_trend = 0 Model 1: restricted model Model 2: kleinModel Res.Df Df F Pr(>F) 1 51 2 49 2 0.53 0.59 Linear hypothesis test (F statistic of a Wald test) Hypothesis: Consumption_corpProf + Investment_capitalLag = 0 Consumption_corpProfLag - PrivateWages_trend = 0 Model 1: restricted model Model 2: kleinModel Res.Df Df F Pr(>F) 1 51 2 49 2 0.69 0.51 Linear hypothesis test (Chi^2 statistic of a Wald test) Hypothesis: Consumption_corpProf + Investment_capitalLag = 0 Consumption_corpProfLag - PrivateWages_trend = 0 Model 1: restricted model Model 2: kleinModel Res.Df Df Chisq Pr(>Chisq) 1 51 2 49 2 1.38 0.5 > logLik 'log Lik.' -69.6 (df=18) 'log Lik.' -76.9 (df=18) Estimating function Consumption_(Intercept) Consumption_corpProf Consumption_2 -0.42417 -5.2597 Consumption_3 -2.17982 -36.8390 Consumption_4 -2.62648 -48.3271 Consumption_5 -0.81768 -15.8630 Consumption_6 0.02500 0.5025 Consumption_7 1.50966 29.5894 Consumption_8 2.26980 44.9421 Consumption_9 1.74517 36.8231 Consumption_11 0.74077 11.5559 Consumption_12 -0.14959 -1.7053 Consumption_13 -0.25842 -1.8090 Consumption_14 0.50036 5.6040 Consumption_15 -0.04361 -0.5363 Consumption_16 -0.04189 -0.5865 Consumption_17 2.62802 46.2532 Consumption_18 -0.68580 -11.8643 Consumption_19 0.47280 7.2339 Consumption_20 1.55235 29.4946 Consumption_21 1.24350 26.2379 Consumption_22 -3.76279 -88.4255 Investment_2 0.07441 0.9227 Investment_3 0.03547 0.5995 Investment_4 -0.28298 -5.2069 Investment_5 0.36669 7.1139 Investment_6 -0.09061 -1.8212 Investment_7 -0.37095 -7.2706 Investment_8 -0.21146 -4.1868 Investment_9 0.13086 2.7611 Investment_10 0.00000 0.0000 Investment_11 -0.07161 -1.1172 Investment_12 -0.01921 -0.2190 Investment_13 -0.08737 -0.6116 Investment_14 -0.09166 -1.0266 Investment_15 0.04082 0.5021 Investment_16 -0.00330 -0.0462 Investment_17 -0.26069 -4.5882 Investment_18 -0.00779 -0.1348 Investment_19 0.66639 10.1958 Investment_20 0.15365 2.9194 Investment_21 0.18136 3.8268 Investment_22 0.13754 3.2323 PrivateWages_2 -1.58616 -19.6684 PrivateWages_3 0.69114 11.6803 PrivateWages_4 1.95564 35.9837 PrivateWages_5 -0.13496 -2.6181 PrivateWages_6 -0.49127 -9.8746 PrivateWages_8 -1.03222 -20.4380 PrivateWages_9 0.40421 8.5288 PrivateWages_10 0.00000 0.0000 PrivateWages_11 -0.50339 -7.8529 PrivateWages_12 0.46449 5.2952 PrivateWages_13 -0.24083 -1.6858 PrivateWages_14 0.54997 6.1596 PrivateWages_15 0.40539 4.9863 PrivateWages_16 -0.00244 -0.0342 PrivateWages_17 -1.12761 -19.8459 PrivateWages_18 1.17751 20.3710 PrivateWages_19 -1.06279 -16.2607 PrivateWages_20 -0.56511 -10.7371 PrivateWages_21 -1.67547 -35.3524 PrivateWages_22 0.78715 18.4981 Consumption_corpProfLag Consumption_wages Consumption_2 -5.3870 -11.962 Consumption_3 -27.0298 -70.190 Consumption_4 -44.3874 -97.180 Consumption_5 -15.0453 -30.254 Consumption_6 0.4850 0.965 Consumption_7 30.3442 61.443 Consumption_8 44.4881 94.197 Consumption_9 34.5544 74.868 Consumption_11 16.0746 31.186 Consumption_12 -2.3336 -5.879 Consumption_13 -2.9460 -8.864 Consumption_14 3.5025 17.062 Consumption_15 -0.4884 -1.596 Consumption_16 -0.5153 -1.646 Consumption_17 36.7923 116.159 Consumption_18 -12.0701 -32.713 Consumption_19 8.1795 21.702 Consumption_20 23.7509 76.686 Consumption_21 23.6265 65.906 Consumption_22 -79.3948 -232.540 Investment_2 0.9450 2.098 Investment_3 0.4399 1.142 Investment_4 -4.7824 -10.470 Investment_5 6.7472 13.568 Investment_6 -1.7577 -3.497 Investment_7 -7.4561 -15.098 Investment_8 -4.1445 -8.775 Investment_9 2.5910 5.614 Investment_10 0.0000 0.000 Investment_11 -1.5540 -3.015 Investment_12 -0.2997 -0.755 Investment_13 -0.9961 -2.997 Investment_14 -0.6416 -3.126 Investment_15 0.4572 1.494 Investment_16 -0.0406 -0.130 Investment_17 -3.6497 -11.523 Investment_18 -0.1371 -0.372 Investment_19 11.5286 30.587 Investment_20 2.3509 7.590 Investment_21 3.4459 9.612 Investment_22 2.9022 8.500 PrivateWages_2 -20.1442 -44.730 PrivateWages_3 8.5702 22.255 PrivateWages_4 33.0503 72.359 PrivateWages_5 -2.4832 -4.993 PrivateWages_6 -9.5307 -18.963 PrivateWages_8 -20.2315 -42.837 PrivateWages_9 8.0034 17.341 PrivateWages_10 0.0000 0.000 PrivateWages_11 -10.9235 -21.193 PrivateWages_12 7.2461 18.254 PrivateWages_13 -2.7454 -8.260 PrivateWages_14 3.8498 18.754 PrivateWages_15 4.5404 14.837 PrivateWages_16 -0.0300 -0.096 PrivateWages_17 -15.7865 -49.840 PrivateWages_18 20.7242 56.167 PrivateWages_19 -18.3863 -48.782 PrivateWages_20 -8.6462 -27.916 PrivateWages_21 -31.8339 -88.800 PrivateWages_22 16.6089 48.646 Investment_(Intercept) Investment_corpProf Consumption_2 0.064449 0.7992 Consumption_3 0.331201 5.5973 Consumption_4 0.399066 7.3428 Consumption_5 0.124238 2.4102 Consumption_6 -0.003798 -0.0763 Consumption_7 -0.229378 -4.4958 Consumption_8 -0.344873 -6.8285 Consumption_9 -0.265161 -5.5949 Consumption_11 -0.112552 -1.7558 Consumption_12 0.022729 0.2591 Consumption_13 0.039265 0.2749 Consumption_14 -0.076024 -0.8515 Consumption_15 0.006625 0.0815 Consumption_16 0.006365 0.0891 Consumption_17 -0.399301 -7.0277 Consumption_18 0.104200 1.8027 Consumption_19 -0.071838 -1.0991 Consumption_20 -0.235863 -4.4814 Consumption_21 -0.188937 -3.9866 Consumption_22 0.571717 13.4353 Investment_2 -0.423201 -5.2477 Investment_3 -0.201766 -3.4098 Investment_4 1.609495 29.6147 Investment_5 -2.085613 -40.4609 Investment_6 0.515327 10.3581 Investment_7 2.109824 41.3526 Investment_8 1.202679 23.8131 Investment_9 -0.744277 -15.7042 Investment_10 1.766841 38.3405 Investment_11 0.407303 6.3539 Investment_12 0.109258 1.2455 Investment_13 0.496948 3.4786 Investment_14 0.521347 5.8391 Investment_15 -0.232156 -2.8555 Investment_16 0.018782 0.2630 Investment_17 1.482721 26.0959 Investment_18 0.044303 0.7664 Investment_19 -3.790179 -57.9897 Investment_20 -0.873905 -16.6042 Investment_21 -1.031520 -21.7651 Investment_22 -0.782292 -18.3839 PrivateWages_2 0.617327 7.6549 PrivateWages_3 -0.268990 -4.5459 PrivateWages_4 -0.761128 -14.0048 PrivateWages_5 0.052525 1.0190 PrivateWages_6 0.191202 3.8432 PrivateWages_8 0.401737 7.9544 PrivateWages_9 -0.157317 -3.3194 PrivateWages_10 -0.635285 -13.7857 PrivateWages_11 0.195917 3.0563 PrivateWages_12 -0.180778 -2.0609 PrivateWages_13 0.093729 0.6561 PrivateWages_14 -0.214045 -2.3973 PrivateWages_15 -0.157776 -1.9406 PrivateWages_16 0.000951 0.0133 PrivateWages_17 0.438862 7.7240 PrivateWages_18 -0.458284 -7.9283 PrivateWages_19 0.413636 6.3286 PrivateWages_20 0.219939 4.1788 PrivateWages_21 0.652086 13.7590 PrivateWages_22 -0.306358 -7.1994 Investment_corpProfLag Investment_capitalLag Consumption_2 0.8185 11.781 Consumption_3 4.1069 60.477 Consumption_4 6.7442 73.628 Consumption_5 2.2860 23.568 Consumption_6 -0.0737 -0.732 Consumption_7 -4.6105 -45.371 Consumption_8 -6.7595 -70.147 Consumption_9 -5.2502 -55.047 Consumption_11 -2.4424 -24.277 Consumption_12 0.3546 4.925 Consumption_13 0.4476 8.375 Consumption_14 -0.5322 -15.745 Consumption_15 0.0742 1.338 Consumption_16 0.0783 1.267 Consumption_17 -5.5902 -78.942 Consumption_18 1.8339 20.819 Consumption_19 -1.2428 -14.497 Consumption_20 -3.6087 -47.149 Consumption_21 -3.5898 -38.014 Consumption_22 12.0632 116.916 Investment_2 -5.3746 -77.361 Investment_3 -2.5019 -36.842 Investment_4 27.2005 296.952 Investment_5 -38.3753 -395.641 Investment_6 9.9974 99.304 Investment_7 42.4075 417.323 Investment_8 23.5725 244.625 Investment_9 -14.7367 -154.512 Investment_10 37.2803 372.097 Investment_11 8.8385 87.855 Investment_12 1.7044 23.676 Investment_13 5.6652 105.999 Investment_14 3.6494 107.971 Investment_15 -2.6002 -46.896 Investment_16 0.2310 3.738 Investment_17 20.7581 293.134 Investment_18 0.7797 8.852 Investment_19 -65.5701 -764.858 Investment_20 -13.3707 -174.694 Investment_21 -19.5989 -207.542 Investment_22 -16.5064 -159.979 PrivateWages_2 7.8401 112.847 PrivateWages_3 -3.3355 -49.118 PrivateWages_4 -12.8631 -140.428 PrivateWages_5 0.9665 9.964 PrivateWages_6 3.7093 36.845 PrivateWages_8 7.8740 81.713 PrivateWages_9 -3.1149 -32.659 PrivateWages_10 -13.4045 -133.791 PrivateWages_11 4.2514 42.259 PrivateWages_12 -2.8201 -39.175 PrivateWages_13 1.0685 19.992 PrivateWages_14 -1.4983 -44.329 PrivateWages_15 -1.7671 -31.871 PrivateWages_16 0.0117 0.189 PrivateWages_17 6.1441 86.763 PrivateWages_18 -8.0658 -91.565 PrivateWages_19 7.1559 83.472 PrivateWages_20 3.3651 43.966 PrivateWages_21 12.3896 131.200 PrivateWages_22 -6.4641 -62.650 PrivateWages_(Intercept) PrivateWages_gnp PrivateWages_gnpLag Consumption_2 -0.34828 -15.881 -15.638 Consumption_3 -1.78978 -89.668 -81.614 Consumption_4 -2.15652 -123.353 -108.042 Consumption_5 -0.67137 -38.335 -38.402 Consumption_6 0.02052 1.252 1.172 Consumption_7 0.00000 0.000 0.000 Consumption_8 1.86367 120.020 119.275 Consumption_9 1.43291 92.422 92.279 Consumption_11 0.60822 37.223 40.751 Consumption_12 -0.12282 -6.559 -7.517 Consumption_13 -0.21218 -9.400 -11.331 Consumption_14 0.41083 18.528 18.200 Consumption_15 -0.03580 -1.779 -1.615 Consumption_16 -0.03440 -1.871 -1.710 Consumption_17 2.15779 135.293 117.384 Consumption_18 -0.56309 -36.601 -35.306 Consumption_19 0.38821 23.642 25.233 Consumption_20 1.27458 88.584 77.622 Consumption_21 1.02100 77.290 70.960 Consumption_22 -3.08951 -273.113 -233.876 Investment_2 0.15649 7.136 7.027 Investment_3 0.07461 3.738 3.402 Investment_4 -0.59517 -34.043 -29.818 Investment_5 0.77123 44.037 44.114 Investment_6 -0.19056 -11.624 -10.881 Investment_7 0.00000 0.000 0.000 Investment_8 -0.44473 -28.641 -28.463 Investment_9 0.27522 17.752 17.724 Investment_10 -0.65335 -43.774 -42.141 Investment_11 -0.15061 -9.218 -10.091 Investment_12 -0.04040 -2.157 -2.473 Investment_13 -0.18376 -8.141 -9.813 Investment_14 -0.19279 -8.695 -8.540 Investment_15 0.08585 4.267 3.872 Investment_16 -0.00695 -0.378 -0.345 Investment_17 -0.54829 -34.378 -29.827 Investment_18 -0.01638 -1.065 -1.027 Investment_19 1.40155 85.354 91.101 Investment_20 0.32316 22.459 19.680 Investment_21 0.38144 28.875 26.510 Investment_22 0.28928 25.572 21.898 PrivateWages_2 -3.98191 -181.575 -178.788 PrivateWages_3 1.73505 86.926 79.118 PrivateWages_4 4.90946 280.821 245.964 PrivateWages_5 -0.33880 -19.345 -19.379 PrivateWages_6 -1.23330 -75.231 -70.421 PrivateWages_8 -2.59130 -166.880 -165.843 PrivateWages_9 1.01473 65.450 65.349 PrivateWages_10 4.09774 274.549 264.304 PrivateWages_11 -1.26371 -77.339 -84.669 PrivateWages_12 1.16606 62.268 71.363 PrivateWages_13 -0.60457 -26.783 -32.284 PrivateWages_14 1.38064 62.267 61.163 PrivateWages_15 1.01769 50.579 45.898 PrivateWages_16 -0.00613 -0.334 -0.305 PrivateWages_17 -2.83076 -177.489 -153.993 PrivateWages_18 2.95604 192.143 185.344 PrivateWages_19 -2.66805 -162.484 -173.423 PrivateWages_20 -1.41866 -98.597 -86.396 PrivateWages_21 -4.20611 -318.403 -292.325 PrivateWages_22 1.97608 174.686 149.589 PrivateWages_trend Consumption_2 3.4828 Consumption_3 16.1081 Consumption_4 17.2522 Consumption_5 4.6996 Consumption_6 -0.1231 Consumption_7 0.0000 Consumption_8 -7.4547 Consumption_9 -4.2987 Consumption_11 -0.6082 Consumption_12 0.0000 Consumption_13 -0.2122 Consumption_14 0.8217 Consumption_15 -0.1074 Consumption_16 -0.1376 Consumption_17 10.7889 Consumption_18 -3.3785 Consumption_19 2.7174 Consumption_20 10.1967 Consumption_21 9.1890 Consumption_22 -30.8951 Investment_2 -1.5649 Investment_3 -0.6715 Investment_4 4.7613 Investment_5 -5.3986 Investment_6 1.1434 Investment_7 0.0000 Investment_8 1.7789 Investment_9 -0.8257 Investment_10 1.3067 Investment_11 0.1506 Investment_12 0.0000 Investment_13 -0.1838 Investment_14 -0.3856 Investment_15 0.2575 Investment_16 -0.0278 Investment_17 -2.7414 Investment_18 -0.0983 Investment_19 9.8108 Investment_20 2.5853 Investment_21 3.4330 Investment_22 2.8928 PrivateWages_2 39.8191 PrivateWages_3 -15.6154 PrivateWages_4 -39.2757 PrivateWages_5 2.3716 PrivateWages_6 7.3998 PrivateWages_8 10.3652 PrivateWages_9 -3.0442 PrivateWages_10 -8.1955 PrivateWages_11 1.2637 PrivateWages_12 0.0000 PrivateWages_13 -0.6046 PrivateWages_14 2.7613 PrivateWages_15 3.0531 PrivateWages_16 -0.0245 PrivateWages_17 -14.1538 PrivateWages_18 17.7363 PrivateWages_19 -18.6764 PrivateWages_20 -11.3493 PrivateWages_21 -37.8550 PrivateWages_22 19.7608 [1] TRUE > Bread Consumption_(Intercept) Consumption_corpProf Consumption_corpProfLag [1,] 87.9904 -0.088084 -0.91416 [2,] -0.0881 0.389639 -0.23612 [3,] -0.9142 -0.236125 0.38341 [4,] -1.6692 -0.062952 -0.03326 [5,] 2.6851 -0.188961 0.72342 [6,] -0.0355 0.023370 -0.02643 [7,] -0.0563 -0.020038 0.03196 [8,] -0.0054 0.000618 -0.00397 [9,] -33.1687 0.063156 1.54217 [10,] 0.3665 -0.059172 0.03813 [11,] 0.1741 0.060188 -0.06574 [12,] 0.1831 0.029476 0.02425 Consumption_wages Investment_(Intercept) Investment_corpProf [1,] -1.669236 2.685 -0.03549 [2,] -0.062952 -0.189 0.02337 [3,] -0.033257 0.723 -0.02643 [4,] 0.079061 -0.248 0.00151 [5,] -0.248317 1269.247 -12.23080 [6,] 0.001506 -12.231 0.40462 [7,] -0.002778 9.884 -0.34614 [8,] 0.001327 -6.097 0.05519 [9,] 0.134743 17.903 -0.13872 [10,] 0.000196 0.262 0.01397 [11,] -0.002616 -0.581 -0.01197 [12,] -0.026193 -0.551 0.00355 Investment_corpProfLag Investment_capitalLag PrivateWages_(Intercept) [1,] -0.05628 -0.005396 -33.1687 [2,] -0.02004 0.000618 0.0632 [3,] 0.03196 -0.003967 1.5422 [4,] -0.00278 0.001327 0.1347 [5,] 9.88435 -6.096982 17.9032 [6,] -0.34614 0.055190 -0.1387 [7,] 0.43632 -0.055785 -0.4000 [8,] -0.05578 0.030317 -0.0433 [9,] -0.40000 -0.043343 71.4840 [10,] -0.00786 -0.001844 -0.3085 [11,] 0.01493 0.002686 -0.8909 [12,] -0.01033 0.003295 0.8146 PrivateWages_gnp PrivateWages_gnpLag PrivateWages_trend [1,] 0.366465 0.17405 0.18311 [2,] -0.059172 0.06019 0.02948 [3,] 0.038129 -0.06574 0.02425 [4,] 0.000196 -0.00262 -0.02619 [5,] 0.262390 -0.58123 -0.55064 [6,] 0.013966 -0.01197 0.00355 [7,] -0.007857 0.01493 -0.01033 [8,] -0.001844 0.00269 0.00330 [9,] -0.308484 -0.89087 0.81461 [10,] 0.044017 -0.04022 -0.01158 [11,] -0.040216 0.05696 -0.00212 [12,] -0.011575 -0.00212 0.04506 > > # 3SLS Warning in systemfit(system, method = method, data = KleinI, inst = inst, : the estimation of systems of equations with unequal numbers of observations has not been thoroughly tested yet > summary systemfit results method: 3SLS N DF SSR detRCov OLS-R2 McElroy-R2 system 59 47 59.5 0.241 0.97 0.994 N DF SSR MSE RMSE R2 Adj R2 Consumption 19 15 18.1 1.203 1.097 0.980 0.977 Investment 20 16 31.1 1.945 1.395 0.866 0.841 PrivateWages 20 16 10.3 0.645 0.803 0.987 0.985 The covariance matrix of the residuals used for estimation Consumption Investment PrivateWages Consumption 1.079 0.354 -0.383 Investment 0.354 1.047 0.107 PrivateWages -0.383 0.107 0.445 The covariance matrix of the residuals Consumption Investment PrivateWages Consumption 0.950 0.324 -0.395 Investment 0.324 1.385 0.242 PrivateWages -0.395 0.242 0.475 The correlations of the residuals Consumption Investment PrivateWages Consumption 1.000 0.293 -0.582 Investment 0.293 1.000 0.292 PrivateWages -0.582 0.292 1.000 3SLS estimates for 'Consumption' (equation 1) Model Formula: consump ~ corpProf + corpProfLag + wages Instruments: ~govExp + taxes + govWage + trend + capitalLag + corpProfLag + gnpLag Estimate Std. Error t value Pr(>|t|) (Intercept) 16.5606 1.3295 12.46 2.6e-09 *** corpProf 0.1100 0.1098 1.00 0.33 corpProfLag 0.1155 0.1007 1.15 0.27 wages 0.8086 0.0401 20.18 2.8e-12 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.097 on 15 degrees of freedom Number of observations: 19 Degrees of Freedom: 15 SSR: 18.051 MSE: 1.203 Root MSE: 1.097 Multiple R-Squared: 0.98 Adjusted R-Squared: 0.977 3SLS estimates for 'Investment' (equation 2) Model Formula: invest ~ corpProf + corpProfLag + capitalLag Instruments: ~govExp + taxes + govWage + trend + capitalLag + corpProfLag + gnpLag Estimate Std. Error t value Pr(>|t|) (Intercept) 23.6871 6.1159 3.87 0.00135 ** corpProf 0.1072 0.1414 0.76 0.45918 corpProfLag 0.6278 0.1361 4.61 0.00029 *** capitalLag -0.1726 0.0295 -5.85 2.5e-05 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.395 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 31.126 MSE: 1.945 Root MSE: 1.395 Multiple R-Squared: 0.866 Adjusted R-Squared: 0.841 3SLS estimates for 'PrivateWages' (equation 3) Model Formula: privWage ~ gnp + gnpLag + trend Instruments: ~govExp + taxes + govWage + trend + capitalLag + corpProfLag + gnpLag Estimate Std. Error t value Pr(>|t|) (Intercept) 1.3603 1.0927 1.24 0.23109 gnp 0.4117 0.0315 13.06 6.0e-10 *** gnpLag 0.1782 0.0336 5.31 7.1e-05 *** trend 0.1370 0.0280 4.89 0.00016 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 0.803 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 10.318 MSE: 0.645 Root MSE: 0.803 Multiple R-Squared: 0.987 Adjusted R-Squared: 0.985 > residuals Consumption Investment PrivateWages 1 NA NA NA 2 -0.29542 -1.636 -1.2658 3 -0.89033 0.135 0.4198 4 -1.25669 0.777 1.3578 5 -0.14000 -1.574 -0.2036 6 0.37365 0.341 -0.4283 7 NA NA NA 8 1.63850 1.194 -0.8319 9 1.44030 0.454 0.2186 10 NA 2.192 1.1346 11 0.17274 -0.750 -0.4603 12 -0.49629 -0.698 0.2476 13 -0.78384 -0.976 -0.2528 14 0.32420 1.365 0.4028 15 -0.10364 -0.170 0.3295 16 -0.00105 0.140 0.0377 17 1.84421 1.862 -0.7540 18 -0.36893 -0.103 0.8827 19 0.14129 -3.255 -0.7764 20 1.23511 0.475 -0.3230 21 1.06553 0.152 -1.1453 22 -1.85709 0.746 0.6843 > fitted Consumption Investment PrivateWages 1 NA NA NA 2 42.2 1.436 26.8 3 45.9 1.765 28.9 4 50.5 4.423 32.7 5 50.7 4.574 34.1 6 52.2 4.759 35.8 7 NA NA NA 8 54.6 3.006 38.7 9 55.9 2.546 39.0 10 NA 2.908 40.2 11 54.8 1.750 38.4 12 51.4 -2.702 34.3 13 46.4 -5.224 29.3 14 46.2 -6.465 28.1 15 48.8 -2.830 30.3 16 51.3 -1.440 33.2 17 55.9 0.238 37.6 18 59.1 2.103 40.1 19 57.4 1.355 39.0 20 60.4 0.825 41.9 21 63.9 3.148 46.1 22 71.6 4.154 52.6 > predict Consumption.pred Consumption.se.fit Consumption.lwr Consumption.upr 1 NA NA NA NA 2 42.2 0.475 39.6 44.7 3 45.9 0.557 43.3 48.5 4 50.5 0.372 48.0 52.9 5 50.7 0.433 48.2 53.3 6 52.2 0.438 49.7 54.7 7 NA NA NA NA 8 54.6 0.362 52.1 57.0 9 55.9 0.401 53.4 58.3 10 NA NA NA NA 11 54.8 0.684 52.1 57.6 12 51.4 0.563 48.8 54.0 13 46.4 0.733 43.6 49.2 14 46.2 0.612 43.5 48.9 15 48.8 0.379 46.3 51.3 16 51.3 0.334 48.9 53.7 17 55.9 0.394 53.4 58.3 18 59.1 0.322 56.6 61.5 19 57.4 0.392 54.9 59.8 20 60.4 0.462 57.8 62.9 21 63.9 0.448 61.4 66.5 22 71.6 0.686 68.8 74.3 Investment.pred Investment.se.fit Investment.lwr Investment.upr 1 NA NA NA NA 2 1.436 0.709 -1.8811 4.754 3 1.765 0.512 -1.3848 4.915 4 4.423 0.470 1.3027 7.543 5 4.574 0.392 1.5029 7.645 6 4.759 0.370 1.7000 7.818 7 NA NA NA NA 8 3.006 0.306 -0.0214 6.033 9 2.546 0.444 -0.5575 5.649 10 2.908 0.488 -0.2245 6.041 11 1.750 0.738 -1.5953 5.096 12 -2.702 0.583 -5.9068 0.503 13 -5.224 0.743 -8.5738 -1.874 14 -6.465 0.780 -9.8530 -3.077 15 -2.830 0.378 -5.8936 0.233 16 -1.440 0.326 -4.4762 1.597 17 0.238 0.426 -2.8533 3.329 18 2.103 0.268 -0.9077 5.114 19 1.355 0.399 -1.7201 4.431 20 0.825 0.474 -2.2981 3.947 21 3.148 0.393 0.0761 6.220 22 4.154 0.555 0.9719 7.336 PrivateWages.pred PrivateWages.se.fit PrivateWages.lwr PrivateWages.upr 1 NA NA NA NA 2 26.8 0.309 24.9 28.6 3 28.9 0.315 27.1 30.7 4 32.7 0.326 30.9 34.6 5 34.1 0.236 32.3 35.9 6 35.8 0.244 34.0 37.6 7 NA NA NA NA 8 38.7 0.237 37.0 40.5 9 39.0 0.225 37.2 40.7 10 40.2 0.219 38.4 41.9 11 38.4 0.309 36.5 40.2 12 34.3 0.336 32.4 36.1 13 29.3 0.411 27.3 31.2 14 28.1 0.326 26.3 29.9 15 30.3 0.313 28.4 32.1 16 33.2 0.262 31.4 35.0 17 37.6 0.265 35.8 39.3 18 40.1 0.205 38.4 41.9 19 39.0 0.323 37.1 40.8 20 41.9 0.282 40.1 43.7 21 46.1 0.293 44.3 48.0 22 52.6 0.463 50.7 54.6 > model.frame [1] TRUE > model.matrix [1] "Attributes: < Component \"dim\": Mean relative difference: 0.0328 >" [2] "Attributes: < Component \"dimnames\": Component 1: 54 string mismatches >" [3] "Numeric: lengths (732, 708) differ" > nobs [1] 59 > linearHypothesis Linear hypothesis test (Theil's F test) Hypothesis: Consumption_corpProf + Investment_capitalLag = 0 Model 1: restricted model Model 2: kleinModel Res.Df Df F Pr(>F) 1 48 2 47 1 0.23 0.64 Linear hypothesis test (F statistic of a Wald test) Hypothesis: Consumption_corpProf + Investment_capitalLag = 0 Model 1: restricted model Model 2: kleinModel Res.Df Df F Pr(>F) 1 48 2 47 1 0.31 0.58 Linear hypothesis test (Chi^2 statistic of a Wald test) Hypothesis: Consumption_corpProf + Investment_capitalLag = 0 Model 1: restricted model Model 2: kleinModel Res.Df Df Chisq Pr(>Chisq) 1 48 2 47 1 0.31 0.58 Linear hypothesis test (Theil's F test) Hypothesis: Consumption_corpProf + Investment_capitalLag = 0 Consumption_corpProfLag - PrivateWages_trend = 0 Model 1: restricted model Model 2: kleinModel Res.Df Df F Pr(>F) 1 49 2 47 2 0.5 0.61 Linear hypothesis test (F statistic of a Wald test) Hypothesis: Consumption_corpProf + Investment_capitalLag = 0 Consumption_corpProfLag - PrivateWages_trend = 0 Model 1: restricted model Model 2: kleinModel Res.Df Df F Pr(>F) 1 49 2 47 2 0.68 0.51 Linear hypothesis test (Chi^2 statistic of a Wald test) Hypothesis: Consumption_corpProf + Investment_capitalLag = 0 Consumption_corpProfLag - PrivateWages_trend = 0 Model 1: restricted model Model 2: kleinModel Res.Df Df Chisq Pr(>Chisq) 1 49 2 47 2 1.37 0.5 > logLik 'log Lik.' -71 (df=18) 'log Lik.' -81.1 (df=18) Estimating function Consumption_(Intercept) Consumption_corpProf Consumption_2 -2.7455 -36.891 Consumption_3 -1.0626 -17.729 Consumption_4 -0.0885 -1.678 Consumption_5 -3.0649 -63.238 Consumption_6 0.7553 14.561 Consumption_8 5.9278 102.010 Consumption_9 4.6365 88.027 Consumption_11 -1.1219 -18.435 Consumption_12 -1.0756 -13.439 Consumption_13 -3.1243 -28.309 Consumption_14 2.5683 23.826 Consumption_15 -1.2839 -16.033 Consumption_16 -1.2479 -17.951 Consumption_17 7.5868 111.454 Consumption_18 -1.1010 -21.581 Consumption_19 -5.4018 -103.426 Consumption_20 3.8300 67.171 Consumption_21 1.5068 30.633 Consumption_22 -1.8041 -41.092 Investment_2 1.3384 17.984 Investment_3 -0.1231 -2.053 Investment_4 -0.5511 -10.444 Investment_5 1.3722 28.313 Investment_6 -0.3224 -6.215 Investment_8 -1.1676 -20.092 Investment_9 -0.4950 -9.397 Investment_10 0.0000 0.000 Investment_11 0.6975 11.462 Investment_12 0.6591 8.235 Investment_13 0.9331 8.455 Investment_14 -1.2380 -11.485 Investment_15 0.1758 2.195 Investment_16 -0.0882 -1.269 Investment_17 -1.7103 -25.126 Investment_18 0.2715 5.322 Investment_19 2.9123 55.761 Investment_20 -0.5118 -8.975 Investment_21 -0.2046 -4.160 Investment_22 -0.6426 -14.637 PrivateWages_2 -3.2663 -43.888 PrivateWages_3 1.1062 18.456 PrivateWages_4 2.8429 53.880 PrivateWages_5 -2.9330 -60.515 PrivateWages_6 -0.4678 -9.018 PrivateWages_8 1.7117 29.456 PrivateWages_9 1.9856 37.698 PrivateWages_10 0.0000 0.000 PrivateWages_11 -2.6089 -42.870 PrivateWages_12 -0.5972 -7.462 PrivateWages_13 -2.3655 -21.434 PrivateWages_14 2.8394 26.341 PrivateWages_15 -0.5146 -6.427 PrivateWages_16 -0.6088 -8.757 PrivateWages_17 2.4972 36.686 PrivateWages_18 -0.0214 -0.419 PrivateWages_19 -6.8265 -130.705 PrivateWages_20 1.3447 23.584 PrivateWages_21 -1.4002 -28.468 PrivateWages_22 2.2878 52.110 Consumption_corpProfLag Consumption_wages Consumption_2 -34.868 -81.19 Consumption_3 -13.177 -33.85 Consumption_4 -1.496 -3.14 Consumption_5 -56.394 -118.79 Consumption_6 14.654 29.20 Consumption_8 116.186 236.05 Consumption_9 91.802 193.78 Consumption_11 -24.345 -48.21 Consumption_12 -16.779 -42.24 Consumption_13 -35.617 -109.94 Consumption_14 17.978 84.77 Consumption_15 -14.380 -47.92 Consumption_16 -15.349 -50.04 Consumption_17 106.215 316.24 Consumption_18 -19.377 -52.50 Consumption_19 -93.451 -266.03 Consumption_20 58.598 185.77 Consumption_21 28.629 80.45 Consumption_22 -38.066 -109.75 Investment_2 16.998 39.58 Investment_3 -1.526 -3.92 Investment_4 -9.313 -19.52 Investment_5 25.249 53.18 Investment_6 -6.254 -12.46 Investment_8 -22.884 -46.49 Investment_9 -9.800 -20.69 Investment_10 0.000 0.00 Investment_11 15.136 29.97 Investment_12 10.282 25.88 Investment_13 10.638 32.84 Investment_14 -8.666 -40.86 Investment_15 1.969 6.56 Investment_16 -1.085 -3.54 Investment_17 -23.945 -71.29 Investment_18 4.779 12.95 Investment_19 50.383 143.43 Investment_20 -7.830 -24.82 Investment_21 -3.888 -10.92 Investment_22 -13.559 -39.09 PrivateWages_2 -41.482 -96.59 PrivateWages_3 13.717 35.24 PrivateWages_4 48.044 100.73 PrivateWages_5 -53.966 -113.67 PrivateWages_6 -9.075 -18.08 PrivateWages_8 33.550 68.16 PrivateWages_9 39.314 82.99 PrivateWages_10 0.000 0.00 PrivateWages_11 -56.613 -112.10 PrivateWages_12 -9.317 -23.46 PrivateWages_13 -26.967 -83.24 PrivateWages_14 19.876 93.71 PrivateWages_15 -5.764 -19.21 PrivateWages_16 -7.488 -24.41 PrivateWages_17 34.961 104.09 PrivateWages_18 -0.376 -1.02 PrivateWages_19 -118.099 -336.20 PrivateWages_20 20.574 65.22 PrivateWages_21 -26.605 -74.76 PrivateWages_22 48.272 139.18 Investment_(Intercept) Investment_corpProf Consumption_2 1.1993 15.540 Consumption_3 0.4642 7.754 Consumption_4 0.0387 0.740 Consumption_5 1.3388 28.029 Consumption_6 -0.3299 -6.424 Consumption_8 -2.5893 -44.384 Consumption_9 -2.0252 -39.469 Consumption_11 0.4900 8.255 Consumption_12 0.4698 5.957 Consumption_13 1.3647 12.176 Consumption_14 -1.1219 -10.434 Consumption_15 0.5608 7.176 Consumption_16 0.5451 7.773 Consumption_17 -3.3140 -48.887 Consumption_18 0.4809 9.399 Consumption_19 2.3595 45.678 Consumption_20 -1.6729 -29.086 Consumption_21 -0.6582 -13.228 Consumption_22 0.7880 18.015 Investment_2 -2.2459 -29.102 Investment_3 0.2065 3.450 Investment_4 0.9247 17.694 Investment_5 -2.3026 -48.209 Investment_6 0.5410 10.532 Investment_8 1.9592 33.583 Investment_9 0.8306 16.187 Investment_10 3.0781 62.986 Investment_11 -1.1704 -19.716 Investment_12 -1.1059 -14.023 Investment_13 -1.5658 -13.970 Investment_14 2.0775 19.321 Investment_15 -0.2950 -3.775 Investment_16 0.1480 2.111 Investment_17 2.8700 42.338 Investment_18 -0.4556 -8.905 Investment_19 -4.8870 -94.607 Investment_20 0.8587 14.930 Investment_21 0.3434 6.901 Investment_22 1.0783 24.652 PrivateWages_2 1.8660 24.179 PrivateWages_3 -0.6320 -10.557 PrivateWages_4 -1.6241 -31.077 PrivateWages_5 1.6755 35.080 PrivateWages_6 0.2672 5.203 PrivateWages_8 -0.9779 -16.762 PrivateWages_9 -1.1343 -22.106 PrivateWages_10 -2.1296 -43.576 PrivateWages_11 1.4904 25.106 PrivateWages_12 0.3412 4.326 PrivateWages_13 1.3514 12.057 PrivateWages_14 -1.6221 -15.086 PrivateWages_15 0.2940 3.762 PrivateWages_16 0.3478 4.959 PrivateWages_17 -1.4266 -21.045 PrivateWages_18 0.0122 0.239 PrivateWages_19 3.8998 75.496 PrivateWages_20 -0.7682 -13.356 PrivateWages_21 0.7999 16.078 PrivateWages_22 -1.3070 -29.879 Investment_corpProfLag Investment_capitalLag Consumption_2 15.231 219.22 Consumption_3 5.756 84.76 Consumption_4 0.654 7.13 Consumption_5 24.633 253.96 Consumption_6 -6.401 -63.58 Consumption_8 -50.751 -526.67 Consumption_9 -40.100 -420.44 Consumption_11 10.634 105.70 Consumption_12 7.329 101.81 Consumption_13 15.558 291.09 Consumption_14 -7.853 -232.34 Consumption_15 6.281 113.29 Consumption_16 6.705 108.47 Consumption_17 -46.395 -655.17 Consumption_18 8.464 96.09 Consumption_19 40.820 476.15 Consumption_20 -25.596 -334.42 Consumption_21 -12.505 -132.42 Consumption_22 16.627 161.15 Investment_2 -28.522 -410.54 Investment_3 2.561 37.71 Investment_4 15.627 170.61 Investment_5 -42.368 -436.81 Investment_6 10.495 104.25 Investment_8 38.400 398.50 Investment_9 16.445 172.43 Investment_10 64.949 648.26 Investment_11 -25.398 -252.46 Investment_12 -17.253 -239.66 Investment_13 -17.850 -333.99 Investment_14 14.542 430.24 Investment_15 -3.304 -59.59 Investment_16 1.821 29.46 Investment_17 40.180 567.40 Investment_18 -8.019 -91.03 Investment_19 -84.545 -986.19 Investment_20 13.139 171.66 Investment_21 6.524 69.08 Investment_22 22.753 220.52 PrivateWages_2 23.698 341.10 PrivateWages_3 -7.836 -115.39 PrivateWages_4 -27.446 -299.64 PrivateWages_5 30.830 317.85 PrivateWages_6 5.185 51.50 PrivateWages_8 -19.166 -198.90 PrivateWages_9 -22.459 -235.48 PrivateWages_10 -44.934 -448.49 PrivateWages_11 32.341 321.48 PrivateWages_12 5.323 73.94 PrivateWages_13 15.406 288.25 PrivateWages_14 -11.355 -335.93 PrivateWages_15 3.293 59.39 PrivateWages_16 4.278 69.21 PrivateWages_17 -19.973 -282.04 PrivateWages_18 0.215 2.44 PrivateWages_19 67.467 786.98 PrivateWages_20 -11.753 -153.56 PrivateWages_21 15.199 160.94 PrivateWages_22 -27.577 -267.27 PrivateWages_(Intercept) PrivateWages_gnp PrivateWages_gnpLag Consumption_2 -2.6531 -124.88 -119.13 Consumption_3 -1.0269 -50.91 -46.83 Consumption_4 -0.0856 -4.84 -4.29 Consumption_5 -2.9618 -179.74 -169.41 Consumption_6 0.7299 44.24 41.68 Consumption_8 5.7284 343.69 366.62 Consumption_9 4.4804 278.99 288.54 Consumption_11 -1.0841 -69.07 -72.64 Consumption_12 -1.0394 -56.99 -63.61 Consumption_13 -3.0192 -141.83 -161.22 Consumption_14 2.4819 104.56 109.95 Consumption_15 -1.2407 -63.55 -55.96 Consumption_16 -1.2059 -66.73 -59.93 Consumption_17 7.3315 420.78 398.83 Consumption_18 -1.0639 -71.47 -66.71 Consumption_19 -5.2200 -357.64 -339.30 Consumption_20 3.7011 247.40 225.40 Consumption_21 1.4561 109.01 101.20 Consumption_22 -1.7434 -151.46 -131.97 Investment_2 1.6915 79.62 75.95 Investment_3 -0.1555 -7.71 -7.09 Investment_4 -0.6965 -39.38 -34.89 Investment_5 1.7343 105.25 99.20 Investment_6 -0.4074 -24.70 -23.26 Investment_8 -1.4756 -88.53 -94.44 Investment_9 -0.6256 -38.95 -40.29 Investment_10 -2.3184 -149.69 -149.53 Investment_11 0.8815 56.16 59.06 Investment_12 0.8330 45.67 50.98 Investment_13 1.1793 55.40 62.98 Investment_14 -1.5647 -65.92 -69.32 Investment_15 0.2222 11.38 10.02 Investment_16 -0.1115 -6.17 -5.54 Investment_17 -2.1616 -124.06 -117.59 Investment_18 0.3432 23.05 21.52 Investment_19 3.6807 252.18 239.25 Investment_20 -0.6468 -43.23 -39.39 Investment_21 -0.2586 -19.36 -17.97 Investment_22 -0.8122 -70.56 -61.48 PrivateWages_2 -7.4676 -351.50 -335.29 PrivateWages_3 2.5291 125.39 115.33 PrivateWages_4 6.4995 367.50 325.62 PrivateWages_5 -6.7054 -406.93 -383.55 PrivateWages_6 -1.0695 -64.82 -61.07 PrivateWages_8 3.9134 234.79 250.46 PrivateWages_9 4.5395 282.67 292.34 PrivateWages_10 8.5226 550.30 549.71 PrivateWages_11 -5.9646 -380.01 -399.63 PrivateWages_12 -1.3654 -74.87 -83.57 PrivateWages_13 -5.4082 -254.06 -288.80 PrivateWages_14 6.4916 273.48 287.58 PrivateWages_15 -1.1766 -60.26 -53.06 PrivateWages_16 -1.3918 -77.02 -69.17 PrivateWages_17 5.7093 327.68 310.59 PrivateWages_18 -0.0489 -3.28 -3.07 PrivateWages_19 -15.6071 -1069.28 -1014.46 PrivateWages_20 3.0743 205.50 187.22 PrivateWages_21 -3.2013 -239.67 -222.49 PrivateWages_22 5.2304 454.42 395.94 PrivateWages_trend Consumption_2 26.531 Consumption_3 9.242 Consumption_4 0.684 Consumption_5 20.732 Consumption_6 -4.380 Consumption_8 -22.913 Consumption_9 -13.441 Consumption_11 1.084 Consumption_12 0.000 Consumption_13 -3.019 Consumption_14 4.964 Consumption_15 -3.722 Consumption_16 -4.824 Consumption_17 36.658 Consumption_18 -6.384 Consumption_19 -36.540 Consumption_20 29.609 Consumption_21 13.105 Consumption_22 -17.434 Investment_2 -16.915 Investment_3 1.400 Investment_4 5.572 Investment_5 -12.140 Investment_6 2.445 Investment_8 5.902 Investment_9 1.877 Investment_10 4.637 Investment_11 -0.882 Investment_12 0.000 Investment_13 1.179 Investment_14 -3.129 Investment_15 0.667 Investment_16 -0.446 Investment_17 -10.808 Investment_18 2.059 Investment_19 25.765 Investment_20 -5.174 Investment_21 -2.327 Investment_22 -8.122 PrivateWages_2 74.676 PrivateWages_3 -22.762 PrivateWages_4 -51.996 PrivateWages_5 46.938 PrivateWages_6 6.417 PrivateWages_8 -15.654 PrivateWages_9 -13.618 PrivateWages_10 -17.045 PrivateWages_11 5.965 PrivateWages_12 0.000 PrivateWages_13 -5.408 PrivateWages_14 12.983 PrivateWages_15 -3.530 PrivateWages_16 -5.567 PrivateWages_17 28.547 PrivateWages_18 -0.293 PrivateWages_19 -109.250 PrivateWages_20 24.594 PrivateWages_21 -28.812 PrivateWages_22 52.304 [1] TRUE > Bread Consumption_(Intercept) Consumption_corpProf Consumption_corpProfLag [1,] 104.28657 -1.0082 -0.4696 [2,] -1.00824 0.7107 -0.4494 [3,] -0.46959 -0.4494 0.5979 [4,] -1.85053 -0.0857 -0.0409 [5,] 80.53000 1.3241 3.0428 [6,] -1.81359 0.2334 -0.2583 [7,] 0.54047 -0.1847 0.2826 [8,] -0.28778 -0.0112 -0.0165 [9,] -35.77159 0.2050 1.7044 [10,] 0.58031 -0.0870 0.0510 [11,] -0.00461 0.0862 -0.0821 [12,] 0.19369 0.0416 0.0268 Consumption_wages Investment_(Intercept) Investment_corpProf [1,] -1.850529 80.530 -1.81359 [2,] -0.085701 1.324 0.23344 [3,] -0.040883 3.043 -0.25828 [4,] 0.094773 -3.542 0.04931 [5,] -3.542001 2206.842 -34.41529 [6,] 0.049311 -34.415 1.17951 [7,] -0.048133 29.517 -1.02562 [8,] 0.017421 -10.487 0.15573 [9,] 0.083728 18.025 -0.14810 [10,] 0.000958 1.156 0.00386 [11,] -0.002304 -1.519 -0.00126 [12,] -0.031989 -0.955 0.01443 Investment_corpProfLag Investment_capitalLag PrivateWages_(Intercept) [1,] 0.54047 -0.28778 -35.7716 [2,] -0.18475 -0.01117 0.2050 [3,] 0.28258 -0.01647 1.7044 [4,] -0.04813 0.01742 0.0837 [5,] 29.51706 -10.48672 18.0248 [6,] -1.02562 0.15573 -0.1481 [7,] 1.09362 -0.14971 -0.4803 [8,] -0.14971 0.05132 -0.0381 [9,] -0.48030 -0.03806 70.4425 [10,] 0.00353 -0.00637 -0.4681 [11,] 0.00471 0.00732 -0.7110 [12,] -0.02247 0.00534 0.8424 PrivateWages_gnp PrivateWages_gnpLag PrivateWages_trend [1,] 0.580315 -0.00461 0.19369 [2,] -0.086985 0.08623 0.04160 [3,] 0.051027 -0.08213 0.02678 [4,] 0.000958 -0.00230 -0.03199 [5,] 1.156385 -1.51874 -0.95497 [6,] 0.003856 -0.00126 0.01443 [7,] 0.003528 0.00471 -0.02247 [8,] -0.006374 0.00732 0.00534 [9,] -0.468096 -0.71104 0.84245 [10,] 0.058634 -0.05251 -0.01709 [11,] -0.052508 0.06655 0.00301 [12,] -0.017087 0.00301 0.04635 > > # I3SLS Warning in systemfit(system, method = method, data = KleinI, inst = inst, : the estimation of systems of equations with unequal numbers of observations has not been thoroughly tested yet > summary systemfit results method: iterated 3SLS convergence achieved after 15 iterations N DF SSR detRCov OLS-R2 McElroy-R2 system 59 47 81.3 0.349 0.958 0.995 N DF SSR MSE RMSE R2 Adj R2 Consumption 19 15 18.1 1.209 1.100 0.980 0.976 Investment 20 16 52.0 3.250 1.803 0.776 0.735 PrivateWages 20 16 11.2 0.699 0.836 0.986 0.983 The covariance matrix of the residuals used for estimation Consumption Investment PrivateWages Consumption 0.955 0.456 -0.421 Investment 0.456 2.294 0.375 PrivateWages -0.421 0.375 0.522 The covariance matrix of the residuals Consumption Investment PrivateWages Consumption 0.955 0.456 -0.421 Investment 0.456 2.294 0.375 PrivateWages -0.421 0.375 0.522 The correlations of the residuals Consumption Investment PrivateWages Consumption 1.000 0.322 -0.582 Investment 0.322 1.000 0.341 PrivateWages -0.582 0.341 1.000 3SLS estimates for 'Consumption' (equation 1) Model Formula: consump ~ corpProf + corpProfLag + wages Instruments: ~govExp + taxes + govWage + trend + capitalLag + corpProfLag + gnpLag Estimate Std. Error t value Pr(>|t|) (Intercept) 16.8311 1.2489 13.48 8.7e-10 *** corpProf 0.1468 0.0991 1.48 0.16 corpProfLag 0.0924 0.0906 1.02 0.32 wages 0.7945 0.0371 21.43 1.2e-12 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.1 on 15 degrees of freedom Number of observations: 19 Degrees of Freedom: 15 SSR: 18.14 MSE: 1.209 Root MSE: 1.1 Multiple R-Squared: 0.98 Adjusted R-Squared: 0.976 3SLS estimates for 'Investment' (equation 2) Model Formula: invest ~ corpProf + corpProfLag + capitalLag Instruments: ~govExp + taxes + govWage + trend + capitalLag + corpProfLag + gnpLag Estimate Std. Error t value Pr(>|t|) (Intercept) 32.4128 8.2695 3.92 0.00122 ** corpProf -0.0799 0.1934 -0.41 0.68498 corpProfLag 0.7607 0.1878 4.05 0.00093 *** capitalLag -0.2114 0.0400 -5.29 7.4e-05 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.803 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 51.999 MSE: 3.25 Root MSE: 1.803 Multiple R-Squared: 0.776 Adjusted R-Squared: 0.735 3SLS estimates for 'PrivateWages' (equation 3) Model Formula: privWage ~ gnp + gnpLag + trend Instruments: ~govExp + taxes + govWage + trend + capitalLag + corpProfLag + gnpLag Estimate Std. Error t value Pr(>|t|) (Intercept) 1.5421 1.1496 1.34 0.19852 gnp 0.3936 0.0313 12.57 1.0e-09 *** gnpLag 0.1945 0.0328 5.93 2.1e-05 *** trend 0.1416 0.0286 4.95 0.00014 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 0.836 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 11.181 MSE: 0.699 Root MSE: 0.836 Multiple R-Squared: 0.986 Adjusted R-Squared: 0.983 > residuals Consumption Investment PrivateWages 1 NA NA NA 2 -0.3309 -2.6308 -1.3061 3 -1.0419 0.0146 0.4450 4 -1.2918 0.4128 1.4338 5 -0.1772 -1.7488 -0.2494 6 0.3563 0.2807 -0.4066 7 NA NA NA 8 1.6778 1.4671 -0.8700 9 1.4561 1.1068 0.1712 10 NA 2.9002 1.1262 11 0.4237 -1.0652 -0.6189 12 -0.2711 -0.9488 0.0375 13 -0.5643 -1.6241 -0.5055 14 0.2845 1.8477 0.3080 15 -0.0514 -0.2379 0.3003 16 0.0521 0.1268 0.0141 17 1.8733 2.2462 -0.7083 18 -0.1962 -0.1724 0.8305 19 0.3553 -3.5810 -0.9448 20 1.3161 1.0343 -0.2738 21 1.2055 0.6622 -1.1283 22 -1.6327 1.5541 0.8257 > fitted Consumption Investment PrivateWages 1 NA NA NA 2 42.2 2.431 26.8 3 46.0 1.885 28.9 4 50.5 4.787 32.7 5 50.8 4.749 34.1 6 52.2 4.819 35.8 7 NA NA NA 8 54.5 2.733 38.8 9 55.8 1.893 39.0 10 NA 2.200 40.2 11 54.6 2.065 38.5 12 51.2 -2.451 34.5 13 46.2 -4.576 29.5 14 46.2 -6.948 28.2 15 48.8 -2.762 30.3 16 51.2 -1.427 33.2 17 55.8 -0.146 37.5 18 58.9 2.172 40.2 19 57.1 1.681 39.1 20 60.3 0.266 41.9 21 63.8 2.638 46.1 22 71.3 3.346 52.5 > predict Consumption.pred Consumption.se.fit Consumption.lwr Consumption.upr 1 NA NA NA NA 2 42.2 0.446 41.3 43.1 3 46.0 0.511 45.0 47.1 4 50.5 0.340 49.8 51.2 5 50.8 0.393 50.0 51.6 6 52.2 0.396 51.4 53.0 7 NA NA NA NA 8 54.5 0.326 53.9 55.2 9 55.8 0.362 55.1 56.6 10 NA NA NA NA 11 54.6 0.612 53.3 55.8 12 51.2 0.511 50.1 52.2 13 46.2 0.671 44.8 47.5 14 46.2 0.563 45.1 47.3 15 48.8 0.354 48.0 49.5 16 51.2 0.311 50.6 51.9 17 55.8 0.362 55.1 56.6 18 58.9 0.297 58.3 59.5 19 57.1 0.357 56.4 57.9 20 60.3 0.427 59.4 61.1 21 63.8 0.416 63.0 64.6 22 71.3 0.640 70.0 72.6 Investment.pred Investment.se.fit Investment.lwr Investment.upr 1 NA NA NA NA 2 2.431 0.970 0.4798 4.382 3 1.885 0.745 0.3859 3.385 4 4.787 0.664 3.4506 6.124 5 4.749 0.562 3.6174 5.880 6 4.819 0.537 3.7391 5.900 7 NA NA NA NA 8 2.733 0.446 1.8351 3.631 9 1.893 0.620 0.6455 3.141 10 2.200 0.684 0.8232 3.576 11 2.065 1.055 -0.0569 4.187 12 -2.451 0.845 -4.1517 -0.751 13 -4.576 1.070 -6.7293 -2.423 14 -6.948 1.103 -9.1676 -4.728 15 -2.762 0.556 -3.8806 -1.644 16 -1.427 0.480 -2.3919 -0.462 17 -0.146 0.603 -1.3588 1.066 18 2.172 0.390 1.3869 2.958 19 1.681 0.563 0.5476 2.815 20 0.266 0.661 -1.0634 1.595 21 2.638 0.558 1.5144 3.761 22 3.346 0.778 1.7808 4.911 PrivateWages.pred PrivateWages.se.fit PrivateWages.lwr PrivateWages.upr 1 NA NA NA NA 2 26.8 0.326 26.2 27.5 3 28.9 0.328 28.2 29.5 4 32.7 0.334 32.0 33.3 5 34.1 0.242 33.7 34.6 6 35.8 0.252 35.3 36.3 7 NA NA NA NA 8 38.8 0.244 38.3 39.3 9 39.0 0.232 38.6 39.5 10 40.2 0.230 39.7 40.6 11 38.5 0.308 37.9 39.1 12 34.5 0.336 33.8 35.1 13 29.5 0.420 28.7 30.4 14 28.2 0.345 27.5 28.9 15 30.3 0.325 29.6 31.0 16 33.2 0.271 32.6 33.7 17 37.5 0.267 37.0 38.0 18 40.2 0.218 39.7 40.6 19 39.1 0.331 38.5 39.8 20 41.9 0.289 41.3 42.5 21 46.1 0.311 45.5 46.8 22 52.5 0.485 51.5 53.5 > model.frame [1] TRUE > model.matrix [1] "Attributes: < Component \"dim\": Mean relative difference: 0.0328 >" [2] "Attributes: < Component \"dimnames\": Component 1: 54 string mismatches >" [3] "Numeric: lengths (732, 708) differ" > nobs [1] 59 > linearHypothesis Linear hypothesis test (Theil's F test) Hypothesis: Consumption_corpProf + Investment_capitalLag = 0 Model 1: restricted model Model 2: kleinModel Res.Df Df F Pr(>F) 1 48 2 47 1 0.28 0.6 Linear hypothesis test (F statistic of a Wald test) Hypothesis: Consumption_corpProf + Investment_capitalLag = 0 Model 1: restricted model Model 2: kleinModel Res.Df Df F Pr(>F) 1 48 2 47 1 0.37 0.55 Linear hypothesis test (Chi^2 statistic of a Wald test) Hypothesis: Consumption_corpProf + Investment_capitalLag = 0 Model 1: restricted model Model 2: kleinModel Res.Df Df Chisq Pr(>Chisq) 1 48 2 47 1 0.37 0.54 Linear hypothesis test (Theil's F test) Hypothesis: Consumption_corpProf + Investment_capitalLag = 0 Consumption_corpProfLag - PrivateWages_trend = 0 Model 1: restricted model Model 2: kleinModel Res.Df Df F Pr(>F) 1 49 2 47 2 1.25 0.3 Linear hypothesis test (F statistic of a Wald test) Hypothesis: Consumption_corpProf + Investment_capitalLag = 0 Consumption_corpProfLag - PrivateWages_trend = 0 Model 1: restricted model Model 2: kleinModel Res.Df Df F Pr(>F) 1 49 2 47 2 1.64 0.21 Linear hypothesis test (Chi^2 statistic of a Wald test) Hypothesis: Consumption_corpProf + Investment_capitalLag = 0 Consumption_corpProfLag - PrivateWages_trend = 0 Model 1: restricted model Model 2: kleinModel Res.Df Df Chisq Pr(>Chisq) 1 49 2 47 2 3.28 0.19 > logLik 'log Lik.' -74.5 (df=18) 'log Lik.' -87.1 (df=18) Estimating function Consumption_(Intercept) Consumption_corpProf Consumption_2 -4.75944 -63.951 Consumption_3 -2.22772 -37.167 Consumption_4 -0.38275 -7.254 Consumption_5 -5.30482 -109.454 Consumption_6 1.30597 25.176 Consumption_8 10.25777 176.523 Consumption_9 7.99665 151.823 Consumption_11 -1.17443 -19.299 Consumption_12 -1.24242 -15.523 Consumption_13 -4.75716 -43.103 Consumption_14 4.34635 40.320 Consumption_15 -1.98107 -24.739 Consumption_16 -1.93670 -27.859 Consumption_17 13.00314 191.023 Consumption_18 -1.57749 -30.922 Consumption_19 -8.67959 -166.185 Consumption_20 6.77999 118.909 Consumption_21 3.04771 61.962 Consumption_22 -2.30170 -52.427 Investment_2 2.92832 39.347 Investment_3 0.00114 0.019 Investment_4 -0.53396 -10.120 Investment_5 1.84118 37.989 Investment_6 -0.26074 -5.026 Investment_8 -1.42063 -24.447 Investment_9 -1.10750 -21.027 Investment_10 0.00000 0.000 Investment_11 1.09344 17.968 Investment_12 0.95848 11.975 Investment_13 1.66503 15.086 Investment_14 -1.92032 -17.814 Investment_15 0.22458 2.804 Investment_16 -0.16698 -2.402 Investment_17 -2.28568 -33.578 Investment_18 -0.00785 -0.154 Investment_19 3.68757 70.604 Investment_20 -1.02511 -17.979 Investment_21 -0.65919 -13.402 Investment_22 -1.70192 -38.765 PrivateWages_2 -6.13297 -82.407 PrivateWages_3 2.11354 35.262 PrivateWages_4 5.50774 104.386 PrivateWages_5 -5.40526 -111.526 PrivateWages_6 -0.82424 -15.889 PrivateWages_8 2.80754 48.314 PrivateWages_9 3.41557 64.847 PrivateWages_10 0.00000 0.000 PrivateWages_11 -5.23135 -85.964 PrivateWages_12 -1.71264 -21.398 PrivateWages_13 -5.07393 -45.974 PrivateWages_14 4.80915 44.613 PrivateWages_15 -0.96519 -12.053 PrivateWages_16 -1.15621 -16.632 PrivateWages_17 4.49108 65.976 PrivateWages_18 -0.08188 -1.605 PrivateWages_19 -12.82495 -245.555 PrivateWages_20 2.51036 44.027 PrivateWages_21 -2.60385 -52.938 PrivateWages_22 4.63537 105.582 Consumption_corpProfLag Consumption_wages Consumption_2 -60.4449 -140.7509 Consumption_3 -27.6237 -70.9657 Consumption_4 -6.4685 -13.5614 Consumption_5 -97.6087 -205.5997 Consumption_6 25.3358 50.4846 Consumption_8 201.0522 408.4748 Consumption_9 158.3336 334.2197 Consumption_11 -25.4852 -50.4634 Consumption_12 -19.3817 -48.7944 Consumption_13 -54.2317 -167.3998 Consumption_14 30.4244 143.4489 Consumption_15 -22.1880 -73.9440 Consumption_16 -23.8214 -77.6627 Consumption_17 182.0440 542.0110 Consumption_18 -27.7639 -75.2217 Consumption_19 -150.1568 -427.4616 Consumption_20 103.7339 328.8605 Consumption_21 57.9064 162.7199 Consumption_22 -48.5659 -140.0278 Investment_2 37.1896 86.5991 Investment_3 0.0141 0.0362 Investment_4 -9.0240 -18.9190 Investment_5 33.8777 71.3589 Investment_6 -5.0583 -10.0793 Investment_8 -27.8443 -56.5709 Investment_9 -21.9285 -46.2880 Investment_10 0.0000 0.0000 Investment_11 23.7276 46.9832 Investment_12 14.9524 37.6432 Investment_13 18.9813 58.5907 Investment_14 -13.4423 -63.3793 Investment_15 2.5153 8.3824 Investment_16 -2.0538 -6.6959 Investment_17 -31.9996 -95.2743 Investment_18 -0.1382 -0.3745 Investment_19 63.7949 181.6093 Investment_20 -15.6841 -49.7224 Investment_21 -12.5246 -35.1949 Investment_22 -35.9105 -103.5390 PrivateWages_2 -77.8887 -181.3703 PrivateWages_3 26.2079 67.3285 PrivateWages_4 93.0807 195.1464 PrivateWages_5 -99.4568 -209.4924 PrivateWages_6 -15.9902 -31.8624 PrivateWages_8 55.0278 111.7991 PrivateWages_9 67.6282 142.7536 PrivateWages_10 0.0000 0.0000 PrivateWages_11 -113.5202 -224.7822 PrivateWages_12 -26.7172 -67.2617 PrivateWages_13 -57.8428 -178.5466 PrivateWages_14 33.6641 158.7235 PrivateWages_15 -10.8101 -36.0260 PrivateWages_16 -14.2214 -46.3646 PrivateWages_17 62.8751 187.2021 PrivateWages_18 -1.4410 -3.9043 PrivateWages_19 -221.8716 -631.6170 PrivateWages_20 38.4085 121.7638 PrivateWages_21 -49.4732 -139.0222 PrivateWages_22 97.8064 282.0006 Investment_(Intercept) Investment_corpProf Consumption_2 1.782157 23.0934 Consumption_3 0.834162 13.9344 Consumption_4 0.143320 2.7425 Consumption_5 1.986375 41.5880 Consumption_6 -0.489016 -9.5207 Consumption_8 -3.840991 -65.8399 Consumption_9 -2.994321 -58.3554 Consumption_11 0.439763 7.4080 Consumption_12 0.465220 5.8989 Consumption_13 1.781306 15.8927 Consumption_14 -1.627477 -15.1363 Consumption_15 0.741807 9.4914 Consumption_16 0.725191 10.3407 Consumption_17 -4.868989 -71.8262 Consumption_18 0.590688 11.5449 Consumption_19 3.250046 62.9174 Consumption_20 -2.538748 -44.1394 Consumption_21 -1.141204 -22.9368 Consumption_22 0.861865 19.7035 Investment_2 -2.373514 -30.7562 Investment_3 -0.000921 -0.0154 Investment_4 0.432798 8.2817 Investment_5 -1.492349 -31.2447 Investment_6 0.211337 4.1146 Investment_8 1.151475 19.7379 Investment_9 0.897673 17.4945 Investment_10 2.570865 52.6054 Investment_11 -0.886274 -14.9297 Investment_12 -0.776889 -9.8508 Investment_13 -1.349570 -12.0408 Investment_14 1.556498 14.4761 Investment_15 -0.182029 -2.3291 Investment_16 0.135342 1.9299 Investment_17 1.852635 27.3297 Investment_18 0.006366 0.1244 Investment_19 -2.988917 -57.8622 Investment_20 0.830890 14.4461 Investment_21 0.534301 10.7388 Investment_22 1.379471 31.5367 PrivateWages_2 2.964495 38.4142 PrivateWages_3 -1.021623 -17.0659 PrivateWages_4 -2.662277 -50.9436 PrivateWages_5 2.612743 54.7020 PrivateWages_6 0.398411 7.7567 PrivateWages_8 -1.357082 -23.2623 PrivateWages_9 -1.650985 -32.1755 PrivateWages_10 -3.276467 -67.0436 PrivateWages_11 2.528678 42.5968 PrivateWages_12 0.827840 10.4968 PrivateWages_13 2.452590 21.8819 PrivateWages_14 -2.324602 -21.6199 PrivateWages_15 0.466545 5.9694 PrivateWages_16 0.558877 7.9692 PrivateWages_17 -2.170857 -32.0240 PrivateWages_18 0.039577 0.7735 PrivateWages_19 6.199203 120.0098 PrivateWages_20 -1.213433 -21.0971 PrivateWages_21 1.258626 25.2969 PrivateWages_22 -2.240603 -51.2233 Investment_corpProfLag Investment_capitalLag Consumption_2 22.6334 325.778 Consumption_3 10.3436 152.318 Consumption_4 2.4221 26.443 Consumption_5 36.5493 376.815 Consumption_6 -9.4869 -94.233 Consumption_8 -75.2834 -781.258 Consumption_9 -59.2876 -621.621 Consumption_11 9.5429 94.857 Consumption_12 7.2574 100.813 Consumption_13 20.3069 379.952 Consumption_14 -11.3923 -337.050 Consumption_15 8.3082 149.845 Consumption_16 8.9199 144.313 Consumption_17 -68.1658 -962.599 Consumption_18 10.3961 118.019 Consumption_19 56.2258 655.859 Consumption_20 -38.8428 -507.496 Consumption_21 -21.6829 -229.610 Consumption_22 18.1854 176.251 Investment_2 -30.1436 -433.878 Investment_3 -0.0114 -0.168 Investment_4 7.3143 79.851 Investment_5 -27.4592 -283.099 Investment_6 4.0999 40.725 Investment_8 22.5689 234.210 Investment_9 17.7739 186.357 Investment_10 54.2453 541.424 Investment_11 -19.2321 -191.169 Investment_12 -12.1195 -168.352 Investment_13 -15.3851 -287.863 Investment_14 10.8955 322.351 Investment_15 -2.0387 -36.770 Investment_16 1.6647 26.933 Investment_17 25.9369 366.266 Investment_18 0.1120 1.272 Investment_19 -51.7083 -603.163 Investment_20 12.7126 166.095 Investment_21 10.1517 107.501 Investment_22 29.1068 282.102 PrivateWages_2 37.6491 541.910 PrivateWages_3 -12.6681 -186.548 PrivateWages_4 -44.9925 -491.190 PrivateWages_5 48.0745 495.637 PrivateWages_6 7.7292 76.774 PrivateWages_8 -26.5988 -276.031 PrivateWages_9 -32.6895 -342.744 PrivateWages_10 -69.1335 -690.024 PrivateWages_11 54.8723 545.436 PrivateWages_12 12.9143 179.393 PrivateWages_13 27.9595 523.137 PrivateWages_14 -16.2722 -481.425 PrivateWages_15 5.2253 94.242 PrivateWages_16 6.8742 111.217 PrivateWages_17 -30.3920 -429.178 PrivateWages_18 0.6966 7.908 PrivateWages_19 107.2462 1250.999 PrivateWages_20 -18.5655 -242.565 PrivateWages_21 23.9139 253.236 PrivateWages_22 -47.2767 -458.203 PrivateWages_(Intercept) PrivateWages_gnp PrivateWages_gnpLag Consumption_2 -5.12212 -2.41e+02 -229.983 Consumption_3 -2.39748 -1.19e+02 -109.325 Consumption_4 -0.41192 -2.33e+01 -20.637 Consumption_5 -5.70906 -3.46e+02 -326.558 Consumption_6 1.40549 8.52e+01 80.253 Consumption_8 11.03944 6.62e+02 706.524 Consumption_9 8.60601 5.36e+02 554.227 Consumption_11 -1.26393 -8.05e+01 -84.683 Consumption_12 -1.33709 -7.33e+01 -81.830 Consumption_13 -5.11967 -2.41e+02 -273.390 Consumption_14 4.67755 1.97e+02 207.216 Consumption_15 -2.13204 -1.09e+02 -96.155 Consumption_16 -2.08428 -1.15e+02 -103.589 Consumption_17 13.99402 8.03e+02 761.275 Consumption_18 -1.69770 -1.14e+02 -106.446 Consumption_19 -9.34099 -6.40e+02 -607.165 Consumption_20 7.29665 4.88e+02 444.366 Consumption_21 3.27995 2.46e+02 227.957 Consumption_22 -2.47710 -2.15e+02 -187.516 Investment_2 4.06820 1.91e+02 182.662 Investment_3 0.00158 7.83e-02 0.072 Investment_4 -0.74181 -4.19e+01 -37.165 Investment_5 2.55788 1.55e+02 146.311 Investment_6 -0.36223 -2.20e+01 -20.683 Investment_8 -1.97362 -1.18e+02 -126.312 Investment_9 -1.53861 -9.58e+01 -99.086 Investment_10 -4.40645 -2.85e+02 -284.216 Investment_11 1.51907 9.68e+01 101.778 Investment_12 1.33159 7.30e+01 81.493 Investment_13 2.31316 1.09e+02 123.523 Investment_14 -2.66783 -1.12e+02 -118.185 Investment_15 0.31200 1.60e+01 14.071 Investment_16 -0.23198 -1.28e+01 -11.529 Investment_17 -3.17541 -1.82e+02 -172.742 Investment_18 -0.01091 -7.33e-01 -0.684 Investment_19 5.12299 3.51e+02 332.995 Investment_20 -1.42414 -9.52e+01 -86.730 Investment_21 -0.91579 -6.86e+01 -63.647 Investment_22 -2.36441 -2.05e+02 -178.986 PrivateWages_2 -10.69229 -5.03e+02 -480.084 PrivateWages_3 3.68477 1.83e+02 168.026 PrivateWages_4 9.60226 5.43e+02 481.073 PrivateWages_5 -9.42360 -5.72e+02 -539.030 PrivateWages_6 -1.43698 -8.71e+01 -82.052 PrivateWages_8 4.89470 2.94e+02 313.261 PrivateWages_9 5.95474 3.71e+02 383.486 PrivateWages_10 11.81751 7.63e+02 762.229 PrivateWages_11 -9.12040 -5.81e+02 -611.067 PrivateWages_12 -2.98584 -1.64e+02 -182.733 PrivateWages_13 -8.84596 -4.16e+02 -472.374 PrivateWages_14 8.38434 3.53e+02 371.426 PrivateWages_15 -1.68273 -8.62e+01 -75.891 PrivateWages_16 -2.01575 -1.12e+02 -100.183 PrivateWages_17 7.82981 4.49e+02 425.942 PrivateWages_18 -0.14275 -9.59e+00 -8.950 PrivateWages_19 -22.35918 -1.53e+03 -1453.347 PrivateWages_20 4.37659 2.93e+02 266.534 PrivateWages_21 -4.53959 -3.40e+02 -315.502 PrivateWages_22 8.08137 7.02e+02 611.760 PrivateWages_trend Consumption_2 51.2212 Consumption_3 21.5773 Consumption_4 3.2953 Consumption_5 39.9635 Consumption_6 -8.4329 Consumption_8 -44.1578 Consumption_9 -25.8180 Consumption_11 1.2639 Consumption_12 0.0000 Consumption_13 -5.1197 Consumption_14 9.3551 Consumption_15 -6.3961 Consumption_16 -8.3371 Consumption_17 69.9701 Consumption_18 -10.1862 Consumption_19 -65.3870 Consumption_20 58.3732 Consumption_21 29.5195 Consumption_22 -24.7710 Investment_2 -40.6819 Investment_3 -0.0142 Investment_4 5.9345 Investment_5 -17.9052 Investment_6 2.1734 Investment_8 7.8945 Investment_9 4.6158 Investment_10 8.8129 Investment_11 -1.5191 Investment_12 0.0000 Investment_13 2.3132 Investment_14 -5.3357 Investment_15 0.9360 Investment_16 -0.9279 Investment_17 -15.8771 Investment_18 -0.0655 Investment_19 35.8610 Investment_20 -11.3931 Investment_21 -8.2421 Investment_22 -23.6441 PrivateWages_2 106.9229 PrivateWages_3 -33.1629 PrivateWages_4 -76.8181 PrivateWages_5 65.9652 PrivateWages_6 8.6219 PrivateWages_8 -19.5788 PrivateWages_9 -17.8642 PrivateWages_10 -23.6350 PrivateWages_11 9.1204 PrivateWages_12 0.0000 PrivateWages_13 -8.8460 PrivateWages_14 16.7687 PrivateWages_15 -5.0482 PrivateWages_16 -8.0630 PrivateWages_17 39.1491 PrivateWages_18 -0.8565 PrivateWages_19 -156.5143 PrivateWages_20 35.0127 PrivateWages_21 -40.8563 PrivateWages_22 80.8137 [1] TRUE > Bread Consumption_(Intercept) Consumption_corpProf Consumption_corpProfLag [1,] 92.02523 -0.8883 -0.3567 [2,] -0.88834 0.5799 -0.3635 [3,] -0.35667 -0.3635 0.4840 [4,] -1.65059 -0.0695 -0.0345 [5,] 87.30345 -0.4940 5.6093 [6,] -2.09669 0.4100 -0.4129 [7,] 0.52353 -0.3352 0.4397 [8,] -0.29441 -0.0047 -0.0291 [9,] -39.25694 0.2930 1.5879 [10,] 0.63395 -0.0766 0.0444 [11,] -0.00377 0.0739 -0.0730 [12,] 0.26412 0.0450 0.0239 Consumption_wages Investment_(Intercept) Investment_corpProf [1,] -1.650593 87.303 -2.09669 [2,] -0.069509 -0.494 0.41001 [3,] -0.034488 5.609 -0.41285 [4,] 0.081060 -3.868 0.04419 [5,] -3.867758 4034.682 -59.45928 [6,] 0.044186 -59.459 2.20583 [7,] -0.048017 50.679 -1.90719 [8,] 0.019469 -19.184 0.26586 [9,] 0.172081 52.203 -0.49762 [10,] -0.001839 2.943 0.01728 [11,] -0.000946 -3.971 -0.00883 [12,] -0.034168 -2.641 0.03741 Investment_corpProfLag Investment_capitalLag PrivateWages_(Intercept) [1,] 0.52353 -0.2944 -39.2569 [2,] -0.33517 -0.0047 0.2930 [3,] 0.43972 -0.0291 1.5879 [4,] -0.04802 0.0195 0.1721 [5,] 50.67914 -19.1839 52.2027 [6,] -1.90719 0.2659 -0.4976 [7,] 2.08136 -0.2612 -1.5286 [8,] -0.26125 0.0944 -0.0914 [9,] -1.52864 -0.0914 77.9751 [10,] 0.00872 -0.0168 -0.5909 [11,] 0.01756 0.0191 -0.7086 [12,] -0.06267 0.0150 0.8675 PrivateWages_gnp PrivateWages_gnpLag PrivateWages_trend [1,] 0.63395 -0.003771 0.26412 [2,] -0.07661 0.073937 0.04500 [3,] 0.04435 -0.072979 0.02395 [4,] -0.00184 -0.000946 -0.03417 [5,] 2.94321 -3.971150 -2.64074 [6,] 0.01728 -0.008829 0.03741 [7,] 0.00872 0.017559 -0.06267 [8,] -0.01682 0.019146 0.01504 [9,] -0.59094 -0.708614 0.86750 [10,] 0.05781 -0.049542 -0.01891 [11,] -0.04954 0.063408 0.00453 [12,] -0.01891 0.004534 0.04825 > > # OLS Warning in systemfit(system, method = method, data = KleinI, methodResidCov = ifelse(method == : the estimation of systems of equations with unequal numbers of observations has not been thoroughly tested yet > summary systemfit results method: OLS N DF SSR detRCov OLS-R2 McElroy-R2 system 59 47 44.2 0.453 0.976 0.99 N DF SSR MSE RMSE R2 Adj R2 Consumption 19 15 17.36 1.157 1.08 0.980 0.976 Investment 20 16 17.11 1.069 1.03 0.912 0.895 PrivateWages 20 16 9.74 0.609 0.78 0.988 0.985 The covariance matrix of the residuals Consumption Investment PrivateWages Consumption 1.1939 0.0559 -0.474 Investment 0.0559 0.9839 0.140 PrivateWages -0.4745 0.1403 0.602 The correlations of the residuals Consumption Investment PrivateWages Consumption 1.0000 0.0447 -0.568 Investment 0.0447 1.0000 0.169 PrivateWages -0.5680 0.1689 1.000 OLS estimates for 'Consumption' (equation 1) Model Formula: consump ~ corpProf + corpProfLag + wages Estimate Std. Error t value Pr(>|t|) (Intercept) 16.2957 1.4879 10.95 1.5e-08 *** corpProf 0.1796 0.1162 1.55 0.14 corpProfLag 0.1032 0.0994 1.04 0.32 wages 0.7962 0.0433 18.39 1.1e-11 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.076 on 15 degrees of freedom Number of observations: 19 Degrees of Freedom: 15 SSR: 17.362 MSE: 1.157 Root MSE: 1.076 Multiple R-Squared: 0.98 Adjusted R-Squared: 0.976 OLS estimates for 'Investment' (equation 2) Model Formula: invest ~ corpProf + corpProfLag + capitalLag Estimate Std. Error t value Pr(>|t|) (Intercept) 10.1813 5.3720 1.90 0.07627 . corpProf 0.5003 0.1052 4.75 0.00022 *** corpProfLag 0.3259 0.1003 3.25 0.00502 ** capitalLag -0.1134 0.0265 -4.28 0.00057 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.034 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 17.109 MSE: 1.069 Root MSE: 1.034 Multiple R-Squared: 0.912 Adjusted R-Squared: 0.895 OLS estimates for 'PrivateWages' (equation 3) Model Formula: privWage ~ gnp + gnpLag + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 1.3550 1.3021 1.04 0.3135 gnp 0.4417 0.0330 13.40 4.1e-10 *** gnpLag 0.1466 0.0379 3.87 0.0013 ** trend 0.1244 0.0335 3.72 0.0019 ** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 0.78 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 9.739 MSE: 0.609 Root MSE: 0.78 Multiple R-Squared: 0.988 Adjusted R-Squared: 0.985 compare coef with single-equation OLS [1] TRUE > residuals Consumption Investment PrivateWages 1 NA NA NA 2 -0.3863 -0.000301 -1.3389 3 -1.2484 -0.076489 0.2462 4 -1.6040 1.221792 1.1255 5 -0.5384 -1.377872 -0.1959 6 -0.0413 0.386104 -0.5284 7 0.8043 1.486279 NA 8 1.2830 0.784055 -0.7909 9 1.0142 -0.655354 0.2819 10 NA 1.060871 1.1384 11 0.1429 0.395249 -0.1904 12 -0.3439 0.198005 0.5813 13 NA NA 0.1206 14 0.3199 0.312725 0.4773 15 -0.1016 -0.084685 0.3035 16 -0.0702 0.066194 0.0284 17 1.6064 0.963697 -0.8517 18 -0.4980 0.078506 0.9908 19 0.1253 -2.496401 -0.4597 20 0.9805 -0.711004 -0.3819 21 0.7551 -0.820172 -1.1062 22 -2.1992 -0.731199 0.5501 > fitted Consumption Investment PrivateWages 1 NA NA NA 2 42.3 -0.200 26.8 3 46.2 1.976 29.1 4 50.8 3.978 33.0 5 51.1 4.378 34.1 6 52.6 4.714 35.9 7 54.3 4.114 NA 8 54.9 3.416 38.7 9 56.3 3.655 38.9 10 NA 4.039 40.2 11 54.9 0.605 38.1 12 51.2 -3.598 33.9 13 NA NA 28.9 14 46.2 -5.413 28.0 15 48.8 -2.915 30.3 16 51.4 -1.366 33.2 17 56.1 1.136 37.7 18 59.2 1.921 40.0 19 57.4 0.596 38.7 20 60.6 2.011 42.0 21 64.2 4.120 46.1 22 71.9 5.631 52.7 > predict Consumption.pred Consumption.se.fit Consumption.lwr Consumption.upr 1 NA NA NA NA 2 42.3 0.523 39.9 44.7 3 46.2 0.560 43.8 48.7 4 50.8 0.379 48.5 53.1 5 51.1 0.448 48.8 53.5 6 52.6 0.457 50.3 55.0 7 54.3 0.408 52.0 56.6 8 54.9 0.375 52.6 57.2 9 56.3 0.418 54.0 58.6 10 NA NA NA NA 11 54.9 0.701 52.3 57.4 12 51.2 0.638 48.7 53.8 13 NA NA NA NA 14 46.2 0.673 43.6 48.7 15 48.8 0.453 46.5 51.2 16 51.4 0.384 49.1 53.7 17 56.1 0.391 53.8 58.4 18 59.2 0.361 56.9 61.5 19 57.4 0.449 55.0 59.7 20 60.6 0.465 58.3 63.0 21 64.2 0.468 61.9 66.6 22 71.9 0.728 69.3 74.5 Investment.pred Investment.se.fit Investment.lwr Investment.upr 1 NA NA NA NA 2 -0.200 0.613 -2.618 2.219 3 1.976 0.494 -0.329 4.282 4 3.978 0.444 1.714 6.242 5 4.378 0.369 2.169 6.587 6 4.714 0.349 2.519 6.909 7 4.114 0.323 1.934 6.293 8 3.416 0.287 1.257 5.575 9 3.655 0.386 1.435 5.876 10 4.039 0.441 1.777 6.301 11 0.605 0.641 -1.843 3.053 12 -3.598 0.606 -6.010 -1.186 13 NA NA NA NA 14 -5.413 0.708 -7.934 -2.892 15 -2.915 0.412 -5.155 -0.676 16 -1.366 0.336 -3.554 0.821 17 1.136 0.342 -1.055 3.327 18 1.921 0.246 -0.217 4.060 19 0.596 0.341 -1.594 2.787 20 2.011 0.364 -0.194 4.216 21 4.120 0.337 1.932 6.308 22 5.631 0.477 3.341 7.922 PrivateWages.pred PrivateWages.se.fit PrivateWages.lwr PrivateWages.upr 1 NA NA NA NA 2 26.8 0.364 25.1 28.6 3 29.1 0.367 27.3 30.8 4 33.0 0.370 31.2 34.7 5 34.1 0.286 32.4 35.8 6 35.9 0.285 34.3 37.6 7 NA NA NA NA 8 38.7 0.292 37.0 40.4 9 38.9 0.277 37.3 40.6 10 40.2 0.264 38.5 41.8 11 38.1 0.363 36.4 39.8 12 33.9 0.367 32.2 35.7 13 28.9 0.435 27.1 30.7 14 28.0 0.383 26.3 29.8 15 30.3 0.377 28.6 32.0 16 33.2 0.315 31.5 34.9 17 37.7 0.308 36.0 39.3 18 40.0 0.241 38.4 41.7 19 38.7 0.361 36.9 40.4 20 42.0 0.324 40.3 43.7 21 46.1 0.339 44.4 47.8 22 52.7 0.511 50.9 54.6 > model.frame consump corpProf corpProfLag wages invest capitalLag privWage gnp gnpLag 1 39.8 12.7 NA 31.0 2.7 180 28.8 44.9 NA 2 41.9 12.4 12.7 28.2 -0.2 183 25.5 45.6 44.9 3 45.0 16.9 12.4 32.2 1.9 183 29.3 50.1 45.6 4 49.2 18.4 16.9 37.0 5.2 184 34.1 57.2 50.1 5 50.6 19.4 18.4 37.0 3.0 190 33.9 57.1 57.2 6 52.6 20.1 19.4 38.6 5.1 193 35.4 61.0 57.1 7 55.1 19.6 20.1 40.7 5.6 198 37.4 64.0 NA 8 56.2 19.8 19.6 41.5 4.2 203 37.9 64.4 64.0 9 57.3 21.1 19.8 42.9 3.0 208 39.2 64.5 64.4 10 57.8 21.7 21.1 NA 5.1 211 41.3 67.0 64.5 11 55.0 15.6 21.7 42.1 1.0 216 37.9 61.2 67.0 12 50.9 11.4 15.6 39.3 -3.4 217 34.5 53.4 61.2 13 45.6 NA 11.4 34.3 -6.2 213 29.0 44.3 53.4 14 46.5 11.2 7.0 34.1 -5.1 207 28.5 45.1 44.3 15 48.7 12.3 11.2 36.6 -3.0 202 30.6 49.7 45.1 16 51.3 14.0 12.3 39.3 -1.3 199 33.2 54.4 49.7 17 57.7 17.6 14.0 44.2 2.1 198 36.8 62.7 54.4 18 58.7 17.3 17.6 47.7 2.0 200 41.0 65.0 62.7 19 57.5 15.3 17.3 45.9 -1.9 202 38.2 60.9 65.0 20 61.6 19.0 15.3 49.4 1.3 200 41.6 69.5 60.9 21 65.0 21.1 19.0 53.0 3.3 201 45.0 75.7 69.5 22 69.7 23.5 21.1 61.8 4.9 204 53.3 88.4 75.7 trend 1 -11 2 -10 3 -9 4 -8 5 -7 6 -6 7 -5 8 -4 9 -3 10 -2 11 -1 12 0 13 1 14 2 15 3 16 4 17 5 18 6 19 7 20 8 21 9 22 10 > model.matrix Consumption_(Intercept) Consumption_corpProf Consumption_2 1 12.4 Consumption_3 1 16.9 Consumption_4 1 18.4 Consumption_5 1 19.4 Consumption_6 1 20.1 Consumption_7 1 19.6 Consumption_8 1 19.8 Consumption_9 1 21.1 Consumption_11 1 15.6 Consumption_12 1 11.4 Consumption_14 1 11.2 Consumption_15 1 12.3 Consumption_16 1 14.0 Consumption_17 1 17.6 Consumption_18 1 17.3 Consumption_19 1 15.3 Consumption_20 1 19.0 Consumption_21 1 21.1 Consumption_22 1 23.5 Investment_2 0 0.0 Investment_3 0 0.0 Investment_4 0 0.0 Investment_5 0 0.0 Investment_6 0 0.0 Investment_7 0 0.0 Investment_8 0 0.0 Investment_9 0 0.0 Investment_10 0 0.0 Investment_11 0 0.0 Investment_12 0 0.0 Investment_14 0 0.0 Investment_15 0 0.0 Investment_16 0 0.0 Investment_17 0 0.0 Investment_18 0 0.0 Investment_19 0 0.0 Investment_20 0 0.0 Investment_21 0 0.0 Investment_22 0 0.0 PrivateWages_2 0 0.0 PrivateWages_3 0 0.0 PrivateWages_4 0 0.0 PrivateWages_5 0 0.0 PrivateWages_6 0 0.0 PrivateWages_8 0 0.0 PrivateWages_9 0 0.0 PrivateWages_10 0 0.0 PrivateWages_11 0 0.0 PrivateWages_12 0 0.0 PrivateWages_13 0 0.0 PrivateWages_14 0 0.0 PrivateWages_15 0 0.0 PrivateWages_16 0 0.0 PrivateWages_17 0 0.0 PrivateWages_18 0 0.0 PrivateWages_19 0 0.0 PrivateWages_20 0 0.0 PrivateWages_21 0 0.0 PrivateWages_22 0 0.0 Consumption_corpProfLag Consumption_wages Consumption_2 12.7 28.2 Consumption_3 12.4 32.2 Consumption_4 16.9 37.0 Consumption_5 18.4 37.0 Consumption_6 19.4 38.6 Consumption_7 20.1 40.7 Consumption_8 19.6 41.5 Consumption_9 19.8 42.9 Consumption_11 21.7 42.1 Consumption_12 15.6 39.3 Consumption_14 7.0 34.1 Consumption_15 11.2 36.6 Consumption_16 12.3 39.3 Consumption_17 14.0 44.2 Consumption_18 17.6 47.7 Consumption_19 17.3 45.9 Consumption_20 15.3 49.4 Consumption_21 19.0 53.0 Consumption_22 21.1 61.8 Investment_2 0.0 0.0 Investment_3 0.0 0.0 Investment_4 0.0 0.0 Investment_5 0.0 0.0 Investment_6 0.0 0.0 Investment_7 0.0 0.0 Investment_8 0.0 0.0 Investment_9 0.0 0.0 Investment_10 0.0 0.0 Investment_11 0.0 0.0 Investment_12 0.0 0.0 Investment_14 0.0 0.0 Investment_15 0.0 0.0 Investment_16 0.0 0.0 Investment_17 0.0 0.0 Investment_18 0.0 0.0 Investment_19 0.0 0.0 Investment_20 0.0 0.0 Investment_21 0.0 0.0 Investment_22 0.0 0.0 PrivateWages_2 0.0 0.0 PrivateWages_3 0.0 0.0 PrivateWages_4 0.0 0.0 PrivateWages_5 0.0 0.0 PrivateWages_6 0.0 0.0 PrivateWages_8 0.0 0.0 PrivateWages_9 0.0 0.0 PrivateWages_10 0.0 0.0 PrivateWages_11 0.0 0.0 PrivateWages_12 0.0 0.0 PrivateWages_13 0.0 0.0 PrivateWages_14 0.0 0.0 PrivateWages_15 0.0 0.0 PrivateWages_16 0.0 0.0 PrivateWages_17 0.0 0.0 PrivateWages_18 0.0 0.0 PrivateWages_19 0.0 0.0 PrivateWages_20 0.0 0.0 PrivateWages_21 0.0 0.0 PrivateWages_22 0.0 0.0 Investment_(Intercept) Investment_corpProf Consumption_2 0 0.0 Consumption_3 0 0.0 Consumption_4 0 0.0 Consumption_5 0 0.0 Consumption_6 0 0.0 Consumption_7 0 0.0 Consumption_8 0 0.0 Consumption_9 0 0.0 Consumption_11 0 0.0 Consumption_12 0 0.0 Consumption_14 0 0.0 Consumption_15 0 0.0 Consumption_16 0 0.0 Consumption_17 0 0.0 Consumption_18 0 0.0 Consumption_19 0 0.0 Consumption_20 0 0.0 Consumption_21 0 0.0 Consumption_22 0 0.0 Investment_2 1 12.4 Investment_3 1 16.9 Investment_4 1 18.4 Investment_5 1 19.4 Investment_6 1 20.1 Investment_7 1 19.6 Investment_8 1 19.8 Investment_9 1 21.1 Investment_10 1 21.7 Investment_11 1 15.6 Investment_12 1 11.4 Investment_14 1 11.2 Investment_15 1 12.3 Investment_16 1 14.0 Investment_17 1 17.6 Investment_18 1 17.3 Investment_19 1 15.3 Investment_20 1 19.0 Investment_21 1 21.1 Investment_22 1 23.5 PrivateWages_2 0 0.0 PrivateWages_3 0 0.0 PrivateWages_4 0 0.0 PrivateWages_5 0 0.0 PrivateWages_6 0 0.0 PrivateWages_8 0 0.0 PrivateWages_9 0 0.0 PrivateWages_10 0 0.0 PrivateWages_11 0 0.0 PrivateWages_12 0 0.0 PrivateWages_13 0 0.0 PrivateWages_14 0 0.0 PrivateWages_15 0 0.0 PrivateWages_16 0 0.0 PrivateWages_17 0 0.0 PrivateWages_18 0 0.0 PrivateWages_19 0 0.0 PrivateWages_20 0 0.0 PrivateWages_21 0 0.0 PrivateWages_22 0 0.0 Investment_corpProfLag Investment_capitalLag Consumption_2 0.0 0 Consumption_3 0.0 0 Consumption_4 0.0 0 Consumption_5 0.0 0 Consumption_6 0.0 0 Consumption_7 0.0 0 Consumption_8 0.0 0 Consumption_9 0.0 0 Consumption_11 0.0 0 Consumption_12 0.0 0 Consumption_14 0.0 0 Consumption_15 0.0 0 Consumption_16 0.0 0 Consumption_17 0.0 0 Consumption_18 0.0 0 Consumption_19 0.0 0 Consumption_20 0.0 0 Consumption_21 0.0 0 Consumption_22 0.0 0 Investment_2 12.7 183 Investment_3 12.4 183 Investment_4 16.9 184 Investment_5 18.4 190 Investment_6 19.4 193 Investment_7 20.1 198 Investment_8 19.6 203 Investment_9 19.8 208 Investment_10 21.1 211 Investment_11 21.7 216 Investment_12 15.6 217 Investment_14 7.0 207 Investment_15 11.2 202 Investment_16 12.3 199 Investment_17 14.0 198 Investment_18 17.6 200 Investment_19 17.3 202 Investment_20 15.3 200 Investment_21 19.0 201 Investment_22 21.1 204 PrivateWages_2 0.0 0 PrivateWages_3 0.0 0 PrivateWages_4 0.0 0 PrivateWages_5 0.0 0 PrivateWages_6 0.0 0 PrivateWages_8 0.0 0 PrivateWages_9 0.0 0 PrivateWages_10 0.0 0 PrivateWages_11 0.0 0 PrivateWages_12 0.0 0 PrivateWages_13 0.0 0 PrivateWages_14 0.0 0 PrivateWages_15 0.0 0 PrivateWages_16 0.0 0 PrivateWages_17 0.0 0 PrivateWages_18 0.0 0 PrivateWages_19 0.0 0 PrivateWages_20 0.0 0 PrivateWages_21 0.0 0 PrivateWages_22 0.0 0 PrivateWages_(Intercept) PrivateWages_gnp PrivateWages_gnpLag Consumption_2 0 0.0 0.0 Consumption_3 0 0.0 0.0 Consumption_4 0 0.0 0.0 Consumption_5 0 0.0 0.0 Consumption_6 0 0.0 0.0 Consumption_7 0 0.0 0.0 Consumption_8 0 0.0 0.0 Consumption_9 0 0.0 0.0 Consumption_11 0 0.0 0.0 Consumption_12 0 0.0 0.0 Consumption_14 0 0.0 0.0 Consumption_15 0 0.0 0.0 Consumption_16 0 0.0 0.0 Consumption_17 0 0.0 0.0 Consumption_18 0 0.0 0.0 Consumption_19 0 0.0 0.0 Consumption_20 0 0.0 0.0 Consumption_21 0 0.0 0.0 Consumption_22 0 0.0 0.0 Investment_2 0 0.0 0.0 Investment_3 0 0.0 0.0 Investment_4 0 0.0 0.0 Investment_5 0 0.0 0.0 Investment_6 0 0.0 0.0 Investment_7 0 0.0 0.0 Investment_8 0 0.0 0.0 Investment_9 0 0.0 0.0 Investment_10 0 0.0 0.0 Investment_11 0 0.0 0.0 Investment_12 0 0.0 0.0 Investment_14 0 0.0 0.0 Investment_15 0 0.0 0.0 Investment_16 0 0.0 0.0 Investment_17 0 0.0 0.0 Investment_18 0 0.0 0.0 Investment_19 0 0.0 0.0 Investment_20 0 0.0 0.0 Investment_21 0 0.0 0.0 Investment_22 0 0.0 0.0 PrivateWages_2 1 45.6 44.9 PrivateWages_3 1 50.1 45.6 PrivateWages_4 1 57.2 50.1 PrivateWages_5 1 57.1 57.2 PrivateWages_6 1 61.0 57.1 PrivateWages_8 1 64.4 64.0 PrivateWages_9 1 64.5 64.4 PrivateWages_10 1 67.0 64.5 PrivateWages_11 1 61.2 67.0 PrivateWages_12 1 53.4 61.2 PrivateWages_13 1 44.3 53.4 PrivateWages_14 1 45.1 44.3 PrivateWages_15 1 49.7 45.1 PrivateWages_16 1 54.4 49.7 PrivateWages_17 1 62.7 54.4 PrivateWages_18 1 65.0 62.7 PrivateWages_19 1 60.9 65.0 PrivateWages_20 1 69.5 60.9 PrivateWages_21 1 75.7 69.5 PrivateWages_22 1 88.4 75.7 PrivateWages_trend Consumption_2 0 Consumption_3 0 Consumption_4 0 Consumption_5 0 Consumption_6 0 Consumption_7 0 Consumption_8 0 Consumption_9 0 Consumption_11 0 Consumption_12 0 Consumption_14 0 Consumption_15 0 Consumption_16 0 Consumption_17 0 Consumption_18 0 Consumption_19 0 Consumption_20 0 Consumption_21 0 Consumption_22 0 Investment_2 0 Investment_3 0 Investment_4 0 Investment_5 0 Investment_6 0 Investment_7 0 Investment_8 0 Investment_9 0 Investment_10 0 Investment_11 0 Investment_12 0 Investment_14 0 Investment_15 0 Investment_16 0 Investment_17 0 Investment_18 0 Investment_19 0 Investment_20 0 Investment_21 0 Investment_22 0 PrivateWages_2 -10 PrivateWages_3 -9 PrivateWages_4 -8 PrivateWages_5 -7 PrivateWages_6 -6 PrivateWages_8 -4 PrivateWages_9 -3 PrivateWages_10 -2 PrivateWages_11 -1 PrivateWages_12 0 PrivateWages_13 1 PrivateWages_14 2 PrivateWages_15 3 PrivateWages_16 4 PrivateWages_17 5 PrivateWages_18 6 PrivateWages_19 7 PrivateWages_20 8 PrivateWages_21 9 PrivateWages_22 10 > nobs [1] 59 > linearHypothesis Linear hypothesis test (Theil's F test) Hypothesis: Consumption_corpProf + Investment_capitalLag = 0 Model 1: restricted model Model 2: kleinModel Res.Df Df F Pr(>F) 1 48 2 47 1 0.33 0.57 Linear hypothesis test (F statistic of a Wald test) Hypothesis: Consumption_corpProf + Investment_capitalLag = 0 Model 1: restricted model Model 2: kleinModel Res.Df Df F Pr(>F) 1 48 2 47 1 0.31 0.58 Linear hypothesis test (Chi^2 statistic of a Wald test) Hypothesis: Consumption_corpProf + Investment_capitalLag = 0 Model 1: restricted model Model 2: kleinModel Res.Df Df Chisq Pr(>Chisq) 1 48 2 47 1 0.31 0.58 Linear hypothesis test (Theil's F test) Hypothesis: Consumption_corpProf + Investment_capitalLag = 0 Consumption_corpProfLag - PrivateWages_trend = 0 Model 1: restricted model Model 2: kleinModel Res.Df Df F Pr(>F) 1 49 2 47 2 0.17 0.84 Linear hypothesis test (F statistic of a Wald test) Hypothesis: Consumption_corpProf + Investment_capitalLag = 0 Consumption_corpProfLag - PrivateWages_trend = 0 Model 1: restricted model Model 2: kleinModel Res.Df Df F Pr(>F) 1 49 2 47 2 0.16 0.85 Linear hypothesis test (Chi^2 statistic of a Wald test) Hypothesis: Consumption_corpProf + Investment_capitalLag = 0 Consumption_corpProfLag - PrivateWages_trend = 0 Model 1: restricted model Model 2: kleinModel Res.Df Df Chisq Pr(>Chisq) 1 49 2 47 2 0.33 0.85 > logLik 'log Lik.' -69.6 (df=13) 'log Lik.' -74.2 (df=13) compare log likelihood value with single-equation OLS [1] "Mean relative difference: 0.00099" Estimating function Consumption_(Intercept) Consumption_corpProf Consumption_2 -0.3863 -4.791 Consumption_3 -1.2484 -21.098 Consumption_4 -1.6040 -29.514 Consumption_5 -0.5384 -10.446 Consumption_6 -0.0413 -0.830 Consumption_7 0.8043 15.763 Consumption_8 1.2830 25.403 Consumption_9 1.0142 21.399 Consumption_11 0.1429 2.229 Consumption_12 -0.3439 -3.920 Consumption_14 0.3199 3.583 Consumption_15 -0.1016 -1.250 Consumption_16 -0.0702 -0.983 Consumption_17 1.6064 28.272 Consumption_18 -0.4980 -8.616 Consumption_19 0.1253 1.917 Consumption_20 0.9805 18.629 Consumption_21 0.7551 15.933 Consumption_22 -2.1992 -51.681 Investment_2 0.0000 0.000 Investment_3 0.0000 0.000 Investment_4 0.0000 0.000 Investment_5 0.0000 0.000 Investment_6 0.0000 0.000 Investment_7 0.0000 0.000 Investment_8 0.0000 0.000 Investment_9 0.0000 0.000 Investment_10 0.0000 0.000 Investment_11 0.0000 0.000 Investment_12 0.0000 0.000 Investment_14 0.0000 0.000 Investment_15 0.0000 0.000 Investment_16 0.0000 0.000 Investment_17 0.0000 0.000 Investment_18 0.0000 0.000 Investment_19 0.0000 0.000 Investment_20 0.0000 0.000 Investment_21 0.0000 0.000 Investment_22 0.0000 0.000 PrivateWages_2 0.0000 0.000 PrivateWages_3 0.0000 0.000 PrivateWages_4 0.0000 0.000 PrivateWages_5 0.0000 0.000 PrivateWages_6 0.0000 0.000 PrivateWages_8 0.0000 0.000 PrivateWages_9 0.0000 0.000 PrivateWages_10 0.0000 0.000 PrivateWages_11 0.0000 0.000 PrivateWages_12 0.0000 0.000 PrivateWages_13 0.0000 0.000 PrivateWages_14 0.0000 0.000 PrivateWages_15 0.0000 0.000 PrivateWages_16 0.0000 0.000 PrivateWages_17 0.0000 0.000 PrivateWages_18 0.0000 0.000 PrivateWages_19 0.0000 0.000 PrivateWages_20 0.0000 0.000 PrivateWages_21 0.0000 0.000 PrivateWages_22 0.0000 0.000 Consumption_corpProfLag Consumption_wages Consumption_2 -4.907 -10.90 Consumption_3 -15.480 -40.20 Consumption_4 -27.108 -59.35 Consumption_5 -9.907 -19.92 Consumption_6 -0.801 -1.59 Consumption_7 16.166 32.73 Consumption_8 25.146 53.24 Consumption_9 20.081 43.51 Consumption_11 3.100 6.01 Consumption_12 -5.364 -13.51 Consumption_14 2.239 10.91 Consumption_15 -1.138 -3.72 Consumption_16 -0.864 -2.76 Consumption_17 22.489 71.00 Consumption_18 -8.765 -23.76 Consumption_19 2.168 5.75 Consumption_20 15.002 48.44 Consumption_21 14.348 40.02 Consumption_22 -46.403 -135.91 Investment_2 0.000 0.00 Investment_3 0.000 0.00 Investment_4 0.000 0.00 Investment_5 0.000 0.00 Investment_6 0.000 0.00 Investment_7 0.000 0.00 Investment_8 0.000 0.00 Investment_9 0.000 0.00 Investment_10 0.000 0.00 Investment_11 0.000 0.00 Investment_12 0.000 0.00 Investment_14 0.000 0.00 Investment_15 0.000 0.00 Investment_16 0.000 0.00 Investment_17 0.000 0.00 Investment_18 0.000 0.00 Investment_19 0.000 0.00 Investment_20 0.000 0.00 Investment_21 0.000 0.00 Investment_22 0.000 0.00 PrivateWages_2 0.000 0.00 PrivateWages_3 0.000 0.00 PrivateWages_4 0.000 0.00 PrivateWages_5 0.000 0.00 PrivateWages_6 0.000 0.00 PrivateWages_8 0.000 0.00 PrivateWages_9 0.000 0.00 PrivateWages_10 0.000 0.00 PrivateWages_11 0.000 0.00 PrivateWages_12 0.000 0.00 PrivateWages_13 0.000 0.00 PrivateWages_14 0.000 0.00 PrivateWages_15 0.000 0.00 PrivateWages_16 0.000 0.00 PrivateWages_17 0.000 0.00 PrivateWages_18 0.000 0.00 PrivateWages_19 0.000 0.00 PrivateWages_20 0.000 0.00 PrivateWages_21 0.000 0.00 PrivateWages_22 0.000 0.00 Investment_(Intercept) Investment_corpProf Consumption_2 0.000000 0.00000 Consumption_3 0.000000 0.00000 Consumption_4 0.000000 0.00000 Consumption_5 0.000000 0.00000 Consumption_6 0.000000 0.00000 Consumption_7 0.000000 0.00000 Consumption_8 0.000000 0.00000 Consumption_9 0.000000 0.00000 Consumption_11 0.000000 0.00000 Consumption_12 0.000000 0.00000 Consumption_14 0.000000 0.00000 Consumption_15 0.000000 0.00000 Consumption_16 0.000000 0.00000 Consumption_17 0.000000 0.00000 Consumption_18 0.000000 0.00000 Consumption_19 0.000000 0.00000 Consumption_20 0.000000 0.00000 Consumption_21 0.000000 0.00000 Consumption_22 0.000000 0.00000 Investment_2 -0.000301 -0.00373 Investment_3 -0.076489 -1.29266 Investment_4 1.221792 22.48097 Investment_5 -1.377872 -26.73071 Investment_6 0.386104 7.76068 Investment_7 1.486279 29.13107 Investment_8 0.784055 15.52429 Investment_9 -0.655354 -13.82796 Investment_10 1.060871 23.02091 Investment_11 0.395249 6.16588 Investment_12 0.198005 2.25726 Investment_14 0.312725 3.50252 Investment_15 -0.084685 -1.04163 Investment_16 0.066194 0.92672 Investment_17 0.963697 16.96106 Investment_18 0.078506 1.35816 Investment_19 -2.496401 -38.19494 Investment_20 -0.711004 -13.50907 Investment_21 -0.820172 -17.30564 Investment_22 -0.731199 -17.18317 PrivateWages_2 0.000000 0.00000 PrivateWages_3 0.000000 0.00000 PrivateWages_4 0.000000 0.00000 PrivateWages_5 0.000000 0.00000 PrivateWages_6 0.000000 0.00000 PrivateWages_8 0.000000 0.00000 PrivateWages_9 0.000000 0.00000 PrivateWages_10 0.000000 0.00000 PrivateWages_11 0.000000 0.00000 PrivateWages_12 0.000000 0.00000 PrivateWages_13 0.000000 0.00000 PrivateWages_14 0.000000 0.00000 PrivateWages_15 0.000000 0.00000 PrivateWages_16 0.000000 0.00000 PrivateWages_17 0.000000 0.00000 PrivateWages_18 0.000000 0.00000 PrivateWages_19 0.000000 0.00000 PrivateWages_20 0.000000 0.00000 PrivateWages_21 0.000000 0.00000 PrivateWages_22 0.000000 0.00000 Investment_corpProfLag Investment_capitalLag Consumption_2 0.00000 0.000 Consumption_3 0.00000 0.000 Consumption_4 0.00000 0.000 Consumption_5 0.00000 0.000 Consumption_6 0.00000 0.000 Consumption_7 0.00000 0.000 Consumption_8 0.00000 0.000 Consumption_9 0.00000 0.000 Consumption_11 0.00000 0.000 Consumption_12 0.00000 0.000 Consumption_14 0.00000 0.000 Consumption_15 0.00000 0.000 Consumption_16 0.00000 0.000 Consumption_17 0.00000 0.000 Consumption_18 0.00000 0.000 Consumption_19 0.00000 0.000 Consumption_20 0.00000 0.000 Consumption_21 0.00000 0.000 Consumption_22 0.00000 0.000 Investment_2 -0.00382 -0.055 Investment_3 -0.94846 -13.967 Investment_4 20.64828 225.421 Investment_5 -25.35284 -261.382 Investment_6 7.49041 74.402 Investment_7 29.87421 293.986 Investment_8 15.36748 159.477 Investment_9 -12.97600 -136.051 Investment_10 22.38438 223.419 Investment_11 8.57690 85.255 Investment_12 3.08888 42.908 Investment_14 2.18907 64.765 Investment_15 -0.94848 -17.106 Investment_16 0.81419 13.173 Investment_17 13.49175 190.523 Investment_18 1.38171 15.686 Investment_19 -43.18774 -503.774 Investment_20 -10.87836 -142.130 Investment_21 -15.58327 -165.019 Investment_22 -15.42829 -149.530 PrivateWages_2 0.00000 0.000 PrivateWages_3 0.00000 0.000 PrivateWages_4 0.00000 0.000 PrivateWages_5 0.00000 0.000 PrivateWages_6 0.00000 0.000 PrivateWages_8 0.00000 0.000 PrivateWages_9 0.00000 0.000 PrivateWages_10 0.00000 0.000 PrivateWages_11 0.00000 0.000 PrivateWages_12 0.00000 0.000 PrivateWages_13 0.00000 0.000 PrivateWages_14 0.00000 0.000 PrivateWages_15 0.00000 0.000 PrivateWages_16 0.00000 0.000 PrivateWages_17 0.00000 0.000 PrivateWages_18 0.00000 0.000 PrivateWages_19 0.00000 0.000 PrivateWages_20 0.00000 0.000 PrivateWages_21 0.00000 0.000 PrivateWages_22 0.00000 0.000 PrivateWages_(Intercept) PrivateWages_gnp PrivateWages_gnpLag Consumption_2 0.0000 0.00 0.00 Consumption_3 0.0000 0.00 0.00 Consumption_4 0.0000 0.00 0.00 Consumption_5 0.0000 0.00 0.00 Consumption_6 0.0000 0.00 0.00 Consumption_7 0.0000 0.00 0.00 Consumption_8 0.0000 0.00 0.00 Consumption_9 0.0000 0.00 0.00 Consumption_11 0.0000 0.00 0.00 Consumption_12 0.0000 0.00 0.00 Consumption_14 0.0000 0.00 0.00 Consumption_15 0.0000 0.00 0.00 Consumption_16 0.0000 0.00 0.00 Consumption_17 0.0000 0.00 0.00 Consumption_18 0.0000 0.00 0.00 Consumption_19 0.0000 0.00 0.00 Consumption_20 0.0000 0.00 0.00 Consumption_21 0.0000 0.00 0.00 Consumption_22 0.0000 0.00 0.00 Investment_2 0.0000 0.00 0.00 Investment_3 0.0000 0.00 0.00 Investment_4 0.0000 0.00 0.00 Investment_5 0.0000 0.00 0.00 Investment_6 0.0000 0.00 0.00 Investment_7 0.0000 0.00 0.00 Investment_8 0.0000 0.00 0.00 Investment_9 0.0000 0.00 0.00 Investment_10 0.0000 0.00 0.00 Investment_11 0.0000 0.00 0.00 Investment_12 0.0000 0.00 0.00 Investment_14 0.0000 0.00 0.00 Investment_15 0.0000 0.00 0.00 Investment_16 0.0000 0.00 0.00 Investment_17 0.0000 0.00 0.00 Investment_18 0.0000 0.00 0.00 Investment_19 0.0000 0.00 0.00 Investment_20 0.0000 0.00 0.00 Investment_21 0.0000 0.00 0.00 Investment_22 0.0000 0.00 0.00 PrivateWages_2 -1.3389 -61.06 -60.12 PrivateWages_3 0.2462 12.33 11.23 PrivateWages_4 1.1255 64.38 56.39 PrivateWages_5 -0.1959 -11.18 -11.20 PrivateWages_6 -0.5284 -32.23 -30.17 PrivateWages_8 -0.7909 -50.94 -50.62 PrivateWages_9 0.2819 18.18 18.15 PrivateWages_10 1.1384 76.28 73.43 PrivateWages_11 -0.1904 -11.65 -12.76 PrivateWages_12 0.5813 31.04 35.58 PrivateWages_13 0.1206 5.34 6.44 PrivateWages_14 0.4773 21.53 21.14 PrivateWages_15 0.3035 15.09 13.69 PrivateWages_16 0.0284 1.55 1.41 PrivateWages_17 -0.8517 -53.40 -46.33 PrivateWages_18 0.9908 64.40 62.12 PrivateWages_19 -0.4597 -28.00 -29.88 PrivateWages_20 -0.3819 -26.54 -23.26 PrivateWages_21 -1.1062 -83.74 -76.88 PrivateWages_22 0.5501 48.63 41.64 PrivateWages_trend Consumption_2 0.000 Consumption_3 0.000 Consumption_4 0.000 Consumption_5 0.000 Consumption_6 0.000 Consumption_7 0.000 Consumption_8 0.000 Consumption_9 0.000 Consumption_11 0.000 Consumption_12 0.000 Consumption_14 0.000 Consumption_15 0.000 Consumption_16 0.000 Consumption_17 0.000 Consumption_18 0.000 Consumption_19 0.000 Consumption_20 0.000 Consumption_21 0.000 Consumption_22 0.000 Investment_2 0.000 Investment_3 0.000 Investment_4 0.000 Investment_5 0.000 Investment_6 0.000 Investment_7 0.000 Investment_8 0.000 Investment_9 0.000 Investment_10 0.000 Investment_11 0.000 Investment_12 0.000 Investment_14 0.000 Investment_15 0.000 Investment_16 0.000 Investment_17 0.000 Investment_18 0.000 Investment_19 0.000 Investment_20 0.000 Investment_21 0.000 Investment_22 0.000 PrivateWages_2 13.389 PrivateWages_3 -2.216 PrivateWages_4 -9.004 PrivateWages_5 1.371 PrivateWages_6 3.170 PrivateWages_8 3.164 PrivateWages_9 -0.846 PrivateWages_10 -2.277 PrivateWages_11 0.190 PrivateWages_12 0.000 PrivateWages_13 0.121 PrivateWages_14 0.955 PrivateWages_15 0.911 PrivateWages_16 0.114 PrivateWages_17 -4.258 PrivateWages_18 5.945 PrivateWages_19 -3.218 PrivateWages_20 -3.055 PrivateWages_21 -9.956 PrivateWages_22 5.501 [1] TRUE > Bread Consumption_(Intercept) Consumption_corpProf Consumption_(Intercept) 109.396 -1.6401 Consumption_corpProf -1.640 0.6675 Consumption_corpProfLag -0.598 -0.3509 Consumption_wages -1.641 -0.0975 Investment_(Intercept) 0.000 0.0000 Investment_corpProf 0.000 0.0000 Investment_corpProfLag 0.000 0.0000 Investment_capitalLag 0.000 0.0000 PrivateWages_(Intercept) 0.000 0.0000 PrivateWages_gnp 0.000 0.0000 PrivateWages_gnpLag 0.000 0.0000 PrivateWages_trend 0.000 0.0000 Consumption_corpProfLag Consumption_wages Consumption_(Intercept) -0.5979 -1.6408 Consumption_corpProf -0.3509 -0.0975 Consumption_corpProfLag 0.4880 -0.0331 Consumption_wages -0.0331 0.0926 Investment_(Intercept) 0.0000 0.0000 Investment_corpProf 0.0000 0.0000 Investment_corpProfLag 0.0000 0.0000 Investment_capitalLag 0.0000 0.0000 PrivateWages_(Intercept) 0.0000 0.0000 PrivateWages_gnp 0.0000 0.0000 PrivateWages_gnpLag 0.0000 0.0000 PrivateWages_trend 0.0000 0.0000 Investment_(Intercept) Investment_corpProf Consumption_(Intercept) 0.00 0.0000 Consumption_corpProf 0.00 0.0000 Consumption_corpProfLag 0.00 0.0000 Consumption_wages 0.00 0.0000 Investment_(Intercept) 1730.48 -16.5126 Investment_corpProf -16.51 0.6641 Investment_corpProfLag 13.63 -0.5096 Investment_capitalLag -8.34 0.0672 PrivateWages_(Intercept) 0.00 0.0000 PrivateWages_gnp 0.00 0.0000 PrivateWages_gnpLag 0.00 0.0000 PrivateWages_trend 0.00 0.0000 Investment_corpProfLag Investment_capitalLag Consumption_(Intercept) 0.000 0.0000 Consumption_corpProf 0.000 0.0000 Consumption_corpProfLag 0.000 0.0000 Consumption_wages 0.000 0.0000 Investment_(Intercept) 13.633 -8.3416 Investment_corpProf -0.510 0.0672 Investment_corpProfLag 0.603 -0.0740 Investment_capitalLag -0.074 0.0420 PrivateWages_(Intercept) 0.000 0.0000 PrivateWages_gnp 0.000 0.0000 PrivateWages_gnpLag 0.000 0.0000 PrivateWages_trend 0.000 0.0000 PrivateWages_(Intercept) PrivateWages_gnp Consumption_(Intercept) 0.000 0.0000 Consumption_corpProf 0.000 0.0000 Consumption_corpProfLag 0.000 0.0000 Consumption_wages 0.000 0.0000 Investment_(Intercept) 0.000 0.0000 Investment_corpProf 0.000 0.0000 Investment_corpProfLag 0.000 0.0000 Investment_capitalLag 0.000 0.0000 PrivateWages_(Intercept) 166.178 -0.6258 PrivateWages_gnp -0.626 0.1064 PrivateWages_gnpLag -2.183 -0.0992 PrivateWages_trend 2.051 -0.0286 PrivateWages_gnpLag PrivateWages_trend Consumption_(Intercept) 0.00000 0.00000 Consumption_corpProf 0.00000 0.00000 Consumption_corpProfLag 0.00000 0.00000 Consumption_wages 0.00000 0.00000 Investment_(Intercept) 0.00000 0.00000 Investment_corpProf 0.00000 0.00000 Investment_corpProfLag 0.00000 0.00000 Investment_capitalLag 0.00000 0.00000 PrivateWages_(Intercept) -2.18348 2.05079 PrivateWages_gnp -0.09921 -0.02859 PrivateWages_gnpLag 0.14047 -0.00635 PrivateWages_trend -0.00635 0.10969 > > # 2SLS Warning in systemfit(system, method = method, data = KleinI, inst = inst, : the estimation of systems of equations with unequal numbers of observations has not been thoroughly tested yet > summary systemfit results method: 2SLS N DF SSR detRCov OLS-R2 McElroy-R2 system 57 45 58.2 0.333 0.968 0.991 N DF SSR MSE RMSE R2 Adj R2 Consumption 18 14 22.27 1.591 1.26 0.974 0.968 Investment 19 15 26.21 1.748 1.32 0.852 0.823 PrivateWages 20 16 9.74 0.609 0.78 0.988 0.985 The covariance matrix of the residuals Consumption Investment PrivateWages Consumption 1.237 0.518 -0.408 Investment 0.518 1.263 0.113 PrivateWages -0.408 0.113 0.468 The correlations of the residuals Consumption Investment PrivateWages Consumption 1.000 0.416 -0.538 Investment 0.416 1.000 0.139 PrivateWages -0.538 0.139 1.000 2SLS estimates for 'Consumption' (equation 1) Model Formula: consump ~ corpProf + corpProfLag + wages Instruments: ~govExp + taxes + govWage + trend + capitalLag + corpProfLag + gnpLag Estimate Std. Error t value Pr(>|t|) (Intercept) 17.2849 1.6018 10.79 3.6e-08 *** corpProf -0.0770 0.1637 -0.47 0.645 corpProfLag 0.2327 0.1242 1.87 0.082 . wages 0.8259 0.0459 17.98 4.5e-11 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.261 on 14 degrees of freedom Number of observations: 18 Degrees of Freedom: 14 SSR: 22.269 MSE: 1.591 Root MSE: 1.261 Multiple R-Squared: 0.974 Adjusted R-Squared: 0.968 2SLS estimates for 'Investment' (equation 2) Model Formula: invest ~ corpProf + corpProfLag + capitalLag Instruments: ~govExp + taxes + govWage + trend + capitalLag + corpProfLag + gnpLag Estimate Std. Error t value Pr(>|t|) (Intercept) 18.4005 7.1627 2.57 0.02138 * corpProf 0.1507 0.1905 0.79 0.44118 corpProfLag 0.5757 0.1634 3.52 0.00307 ** capitalLag -0.1452 0.0339 -4.28 0.00065 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.322 on 15 degrees of freedom Number of observations: 19 Degrees of Freedom: 15 SSR: 26.213 MSE: 1.748 Root MSE: 1.322 Multiple R-Squared: 0.852 Adjusted R-Squared: 0.823 2SLS estimates for 'PrivateWages' (equation 3) Model Formula: privWage ~ gnp + gnpLag + trend Instruments: ~govExp + taxes + govWage + trend + capitalLag + corpProfLag + gnpLag Estimate Std. Error t value Pr(>|t|) (Intercept) 1.3431 1.1544 1.16 0.26172 gnp 0.4438 0.0351 12.64 9.7e-10 *** gnpLag 0.1447 0.0381 3.80 0.00158 ** trend 0.1238 0.0300 4.13 0.00078 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 0.78 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 9.741 MSE: 0.609 Root MSE: 0.78 Multiple R-Squared: 0.988 Adjusted R-Squared: 0.985 > residuals Consumption Investment PrivateWages 1 NA NA NA 2 -0.6754 -1.23599 -1.3401 3 -0.4627 0.32957 0.2378 4 -1.1585 1.08894 1.1117 5 -0.0305 -1.37017 -0.1954 6 0.4693 0.48431 -0.5355 7 NA NA NA 8 1.6045 1.06811 -0.7908 9 1.6018 0.16695 0.2831 10 NA 1.86380 1.1353 11 -0.9031 -0.92183 -0.1765 12 -1.5948 -1.03217 0.6007 13 NA NA 0.1443 14 0.2854 0.85468 0.4826 15 -0.4718 -0.36943 0.3016 16 -0.2268 0.00554 0.0261 17 2.0079 1.69566 -0.8614 18 -0.7434 -0.12659 0.9927 19 -0.5410 -3.26209 -0.4446 20 1.4186 0.25579 -0.3914 21 1.1462 -0.00185 -1.1115 22 -1.7256 0.50679 0.5312 > fitted Consumption Investment PrivateWages 1 NA NA NA 2 42.6 1.036 26.8 3 45.5 1.570 29.1 4 50.4 4.111 33.0 5 50.6 4.370 34.1 6 52.1 4.616 35.9 7 NA NA NA 8 54.6 3.132 38.7 9 55.7 2.833 38.9 10 NA 3.236 40.2 11 55.9 1.922 38.1 12 52.5 -2.368 33.9 13 NA NA 28.9 14 46.2 -5.955 28.0 15 49.2 -2.631 30.3 16 51.5 -1.306 33.2 17 55.7 0.404 37.7 18 59.4 2.127 40.0 19 58.0 1.362 38.6 20 60.2 1.044 42.0 21 63.9 3.302 46.1 22 71.4 4.393 52.8 > predict Consumption.pred Consumption.se.fit Consumption.lwr Consumption.upr 1 NA NA NA NA 2 42.6 0.571 41.4 43.8 3 45.5 0.656 44.1 46.9 4 50.4 0.431 49.4 51.3 5 50.6 0.510 49.5 51.7 6 52.1 0.521 51.0 53.2 7 NA NA NA NA 8 54.6 0.419 53.7 55.5 9 55.7 0.496 54.6 56.8 10 NA NA NA NA 11 55.9 0.910 54.0 57.9 12 52.5 0.869 50.6 54.4 13 NA NA NA NA 14 46.2 0.694 44.7 47.7 15 49.2 0.487 48.1 50.2 16 51.5 0.396 50.7 52.4 17 55.7 0.445 54.7 56.6 18 59.4 0.386 58.6 60.3 19 58.0 0.548 56.9 59.2 20 60.2 0.528 59.0 61.3 21 63.9 0.515 62.8 65.0 22 71.4 0.786 69.7 73.1 Investment.pred Investment.se.fit Investment.lwr Investment.upr 1 NA NA NA NA 2 1.036 0.892 -0.865 2.937 3 1.570 0.579 0.335 2.805 4 4.111 0.531 2.979 5.243 5 4.370 0.440 3.432 5.308 6 4.616 0.416 3.729 5.502 7 NA NA NA NA 8 3.132 0.344 2.398 3.866 9 2.833 0.533 1.696 3.970 10 3.236 0.580 2.000 4.473 11 1.922 0.959 -0.122 3.966 12 -2.368 0.860 -4.201 -0.534 13 NA NA NA NA 14 -5.955 0.865 -7.799 -4.110 15 -2.631 0.479 -3.652 -1.610 16 -1.306 0.382 -2.120 -0.491 17 0.404 0.487 -0.635 1.443 18 2.127 0.319 1.447 2.806 19 1.362 0.537 0.218 2.506 20 1.044 0.566 -0.162 2.250 21 3.302 0.486 2.265 4.339 22 4.393 0.713 2.874 5.912 PrivateWages.pred PrivateWages.se.fit PrivateWages.lwr PrivateWages.upr 1 NA NA NA NA 2 26.8 0.321 26.2 27.5 3 29.1 0.334 28.4 29.8 4 33.0 0.353 32.2 33.7 5 34.1 0.253 33.6 34.6 6 35.9 0.261 35.4 36.5 7 NA NA NA NA 8 38.7 0.257 38.1 39.2 9 38.9 0.245 38.4 39.4 10 40.2 0.235 39.7 40.7 11 38.1 0.348 37.3 38.8 12 33.9 0.374 33.1 34.7 13 28.9 0.447 27.9 29.8 14 28.0 0.341 27.3 28.7 15 30.3 0.333 29.6 31.0 16 33.2 0.278 32.6 33.8 17 37.7 0.288 37.1 38.3 18 40.0 0.214 39.6 40.5 19 38.6 0.351 37.9 39.4 20 42.0 0.301 41.4 42.6 21 46.1 0.304 45.5 46.8 22 52.8 0.486 51.7 53.8 > model.frame consump corpProf corpProfLag wages invest capitalLag privWage gnp gnpLag 1 39.8 12.7 NA 31.0 2.7 180 28.8 44.9 NA 2 41.9 12.4 12.7 28.2 -0.2 183 25.5 45.6 44.9 3 45.0 16.9 12.4 32.2 1.9 183 29.3 50.1 45.6 4 49.2 18.4 16.9 37.0 5.2 184 34.1 57.2 50.1 5 50.6 19.4 18.4 37.0 3.0 190 33.9 57.1 57.2 6 52.6 20.1 19.4 38.6 5.1 193 35.4 61.0 57.1 7 55.1 19.6 20.1 40.7 5.6 198 37.4 64.0 NA 8 56.2 19.8 19.6 41.5 4.2 203 37.9 64.4 64.0 9 57.3 21.1 19.8 42.9 3.0 208 39.2 64.5 64.4 10 57.8 21.7 21.1 NA 5.1 211 41.3 67.0 64.5 11 55.0 15.6 21.7 42.1 1.0 216 37.9 61.2 67.0 12 50.9 11.4 15.6 39.3 -3.4 217 34.5 53.4 61.2 13 45.6 NA 11.4 34.3 -6.2 213 29.0 44.3 53.4 14 46.5 11.2 7.0 34.1 -5.1 207 28.5 45.1 44.3 15 48.7 12.3 11.2 36.6 -3.0 202 30.6 49.7 45.1 16 51.3 14.0 12.3 39.3 -1.3 199 33.2 54.4 49.7 17 57.7 17.6 14.0 44.2 2.1 198 36.8 62.7 54.4 18 58.7 17.3 17.6 47.7 2.0 200 41.0 65.0 62.7 19 57.5 15.3 17.3 45.9 -1.9 202 38.2 60.9 65.0 20 61.6 19.0 15.3 49.4 1.3 200 41.6 69.5 60.9 21 65.0 21.1 19.0 53.0 3.3 201 45.0 75.7 69.5 22 69.7 23.5 21.1 61.8 4.9 204 53.3 88.4 75.7 trend 1 -11 2 -10 3 -9 4 -8 5 -7 6 -6 7 -5 8 -4 9 -3 10 -2 11 -1 12 0 13 1 14 2 15 3 16 4 17 5 18 6 19 7 20 8 21 9 22 10 > Frames of instrumental variables govExp taxes govWage trend capitalLag corpProfLag gnpLag 1 2.4 3.4 2.2 -11 180 NA NA 2 3.9 7.7 2.7 -10 183 12.7 44.9 3 3.2 3.9 2.9 -9 183 12.4 45.6 4 2.8 4.7 2.9 -8 184 16.9 50.1 5 3.5 3.8 3.1 -7 190 18.4 57.2 6 3.3 5.5 3.2 -6 193 19.4 57.1 7 3.3 7.0 3.3 -5 198 20.1 NA 8 4.0 6.7 3.6 -4 203 19.6 64.0 9 4.2 4.2 3.7 -3 208 19.8 64.4 10 4.1 4.0 4.0 -2 211 21.1 64.5 11 5.2 7.7 4.2 -1 216 21.7 67.0 12 5.9 7.5 4.8 0 217 15.6 61.2 13 4.9 8.3 5.3 1 213 11.4 53.4 14 3.7 5.4 5.6 2 207 7.0 44.3 15 4.0 6.8 6.0 3 202 11.2 45.1 16 4.4 7.2 6.1 4 199 12.3 49.7 17 2.9 8.3 7.4 5 198 14.0 54.4 18 4.3 6.7 6.7 6 200 17.6 62.7 19 5.3 7.4 7.7 7 202 17.3 65.0 20 6.6 8.9 7.8 8 200 15.3 60.9 21 7.4 9.6 8.0 9 201 19.0 69.5 22 13.8 11.6 8.5 10 204 21.1 75.7 govExp taxes govWage trend capitalLag corpProfLag gnpLag 1 2.4 3.4 2.2 -11 180 NA NA 2 3.9 7.7 2.7 -10 183 12.7 44.9 3 3.2 3.9 2.9 -9 183 12.4 45.6 4 2.8 4.7 2.9 -8 184 16.9 50.1 5 3.5 3.8 3.1 -7 190 18.4 57.2 6 3.3 5.5 3.2 -6 193 19.4 57.1 7 3.3 7.0 3.3 -5 198 20.1 NA 8 4.0 6.7 3.6 -4 203 19.6 64.0 9 4.2 4.2 3.7 -3 208 19.8 64.4 10 4.1 4.0 4.0 -2 211 21.1 64.5 11 5.2 7.7 4.2 -1 216 21.7 67.0 12 5.9 7.5 4.8 0 217 15.6 61.2 13 4.9 8.3 5.3 1 213 11.4 53.4 14 3.7 5.4 5.6 2 207 7.0 44.3 15 4.0 6.8 6.0 3 202 11.2 45.1 16 4.4 7.2 6.1 4 199 12.3 49.7 17 2.9 8.3 7.4 5 198 14.0 54.4 18 4.3 6.7 6.7 6 200 17.6 62.7 19 5.3 7.4 7.7 7 202 17.3 65.0 20 6.6 8.9 7.8 8 200 15.3 60.9 21 7.4 9.6 8.0 9 201 19.0 69.5 22 13.8 11.6 8.5 10 204 21.1 75.7 govExp taxes govWage trend capitalLag corpProfLag gnpLag 1 2.4 3.4 2.2 -11 180 NA NA 2 3.9 7.7 2.7 -10 183 12.7 44.9 3 3.2 3.9 2.9 -9 183 12.4 45.6 4 2.8 4.7 2.9 -8 184 16.9 50.1 5 3.5 3.8 3.1 -7 190 18.4 57.2 6 3.3 5.5 3.2 -6 193 19.4 57.1 7 3.3 7.0 3.3 -5 198 20.1 NA 8 4.0 6.7 3.6 -4 203 19.6 64.0 9 4.2 4.2 3.7 -3 208 19.8 64.4 10 4.1 4.0 4.0 -2 211 21.1 64.5 11 5.2 7.7 4.2 -1 216 21.7 67.0 12 5.9 7.5 4.8 0 217 15.6 61.2 13 4.9 8.3 5.3 1 213 11.4 53.4 14 3.7 5.4 5.6 2 207 7.0 44.3 15 4.0 6.8 6.0 3 202 11.2 45.1 16 4.4 7.2 6.1 4 199 12.3 49.7 17 2.9 8.3 7.4 5 198 14.0 54.4 18 4.3 6.7 6.7 6 200 17.6 62.7 19 5.3 7.4 7.7 7 202 17.3 65.0 20 6.6 8.9 7.8 8 200 15.3 60.9 21 7.4 9.6 8.0 9 201 19.0 69.5 22 13.8 11.6 8.5 10 204 21.1 75.7 > model.matrix [1] "Attributes: < Component \"dim\": Mean relative difference: 0.0339 >" [2] "Attributes: < Component \"dimnames\": Component 1: 52 string mismatches >" [3] "Numeric: lengths (708, 684) differ" > matrix of instrumental variables Consumption_(Intercept) Consumption_govExp Consumption_taxes Consumption_2 1 3.9 7.7 Consumption_3 1 3.2 3.9 Consumption_4 1 2.8 4.7 Consumption_5 1 3.5 3.8 Consumption_6 1 3.3 5.5 Consumption_8 1 4.0 6.7 Consumption_9 1 4.2 4.2 Consumption_11 1 5.2 7.7 Consumption_12 1 5.9 7.5 Consumption_14 1 3.7 5.4 Consumption_15 1 4.0 6.8 Consumption_16 1 4.4 7.2 Consumption_17 1 2.9 8.3 Consumption_18 1 4.3 6.7 Consumption_19 1 5.3 7.4 Consumption_20 1 6.6 8.9 Consumption_21 1 7.4 9.6 Consumption_22 1 13.8 11.6 Investment_2 0 0.0 0.0 Investment_3 0 0.0 0.0 Investment_4 0 0.0 0.0 Investment_5 0 0.0 0.0 Investment_6 0 0.0 0.0 Investment_8 0 0.0 0.0 Investment_9 0 0.0 0.0 Investment_10 0 0.0 0.0 Investment_11 0 0.0 0.0 Investment_12 0 0.0 0.0 Investment_14 0 0.0 0.0 Investment_15 0 0.0 0.0 Investment_16 0 0.0 0.0 Investment_17 0 0.0 0.0 Investment_18 0 0.0 0.0 Investment_19 0 0.0 0.0 Investment_20 0 0.0 0.0 Investment_21 0 0.0 0.0 Investment_22 0 0.0 0.0 PrivateWages_2 0 0.0 0.0 PrivateWages_3 0 0.0 0.0 PrivateWages_4 0 0.0 0.0 PrivateWages_5 0 0.0 0.0 PrivateWages_6 0 0.0 0.0 PrivateWages_8 0 0.0 0.0 PrivateWages_9 0 0.0 0.0 PrivateWages_10 0 0.0 0.0 PrivateWages_11 0 0.0 0.0 PrivateWages_12 0 0.0 0.0 PrivateWages_13 0 0.0 0.0 PrivateWages_14 0 0.0 0.0 PrivateWages_15 0 0.0 0.0 PrivateWages_16 0 0.0 0.0 PrivateWages_17 0 0.0 0.0 PrivateWages_18 0 0.0 0.0 PrivateWages_19 0 0.0 0.0 PrivateWages_20 0 0.0 0.0 PrivateWages_21 0 0.0 0.0 PrivateWages_22 0 0.0 0.0 Consumption_govWage Consumption_trend Consumption_capitalLag Consumption_2 2.7 -10 183 Consumption_3 2.9 -9 183 Consumption_4 2.9 -8 184 Consumption_5 3.1 -7 190 Consumption_6 3.2 -6 193 Consumption_8 3.6 -4 203 Consumption_9 3.7 -3 208 Consumption_11 4.2 -1 216 Consumption_12 4.8 0 217 Consumption_14 5.6 2 207 Consumption_15 6.0 3 202 Consumption_16 6.1 4 199 Consumption_17 7.4 5 198 Consumption_18 6.7 6 200 Consumption_19 7.7 7 202 Consumption_20 7.8 8 200 Consumption_21 8.0 9 201 Consumption_22 8.5 10 204 Investment_2 0.0 0 0 Investment_3 0.0 0 0 Investment_4 0.0 0 0 Investment_5 0.0 0 0 Investment_6 0.0 0 0 Investment_8 0.0 0 0 Investment_9 0.0 0 0 Investment_10 0.0 0 0 Investment_11 0.0 0 0 Investment_12 0.0 0 0 Investment_14 0.0 0 0 Investment_15 0.0 0 0 Investment_16 0.0 0 0 Investment_17 0.0 0 0 Investment_18 0.0 0 0 Investment_19 0.0 0 0 Investment_20 0.0 0 0 Investment_21 0.0 0 0 Investment_22 0.0 0 0 PrivateWages_2 0.0 0 0 PrivateWages_3 0.0 0 0 PrivateWages_4 0.0 0 0 PrivateWages_5 0.0 0 0 PrivateWages_6 0.0 0 0 PrivateWages_8 0.0 0 0 PrivateWages_9 0.0 0 0 PrivateWages_10 0.0 0 0 PrivateWages_11 0.0 0 0 PrivateWages_12 0.0 0 0 PrivateWages_13 0.0 0 0 PrivateWages_14 0.0 0 0 PrivateWages_15 0.0 0 0 PrivateWages_16 0.0 0 0 PrivateWages_17 0.0 0 0 PrivateWages_18 0.0 0 0 PrivateWages_19 0.0 0 0 PrivateWages_20 0.0 0 0 PrivateWages_21 0.0 0 0 PrivateWages_22 0.0 0 0 Consumption_corpProfLag Consumption_gnpLag Consumption_2 12.7 44.9 Consumption_3 12.4 45.6 Consumption_4 16.9 50.1 Consumption_5 18.4 57.2 Consumption_6 19.4 57.1 Consumption_8 19.6 64.0 Consumption_9 19.8 64.4 Consumption_11 21.7 67.0 Consumption_12 15.6 61.2 Consumption_14 7.0 44.3 Consumption_15 11.2 45.1 Consumption_16 12.3 49.7 Consumption_17 14.0 54.4 Consumption_18 17.6 62.7 Consumption_19 17.3 65.0 Consumption_20 15.3 60.9 Consumption_21 19.0 69.5 Consumption_22 21.1 75.7 Investment_2 0.0 0.0 Investment_3 0.0 0.0 Investment_4 0.0 0.0 Investment_5 0.0 0.0 Investment_6 0.0 0.0 Investment_8 0.0 0.0 Investment_9 0.0 0.0 Investment_10 0.0 0.0 Investment_11 0.0 0.0 Investment_12 0.0 0.0 Investment_14 0.0 0.0 Investment_15 0.0 0.0 Investment_16 0.0 0.0 Investment_17 0.0 0.0 Investment_18 0.0 0.0 Investment_19 0.0 0.0 Investment_20 0.0 0.0 Investment_21 0.0 0.0 Investment_22 0.0 0.0 PrivateWages_2 0.0 0.0 PrivateWages_3 0.0 0.0 PrivateWages_4 0.0 0.0 PrivateWages_5 0.0 0.0 PrivateWages_6 0.0 0.0 PrivateWages_8 0.0 0.0 PrivateWages_9 0.0 0.0 PrivateWages_10 0.0 0.0 PrivateWages_11 0.0 0.0 PrivateWages_12 0.0 0.0 PrivateWages_13 0.0 0.0 PrivateWages_14 0.0 0.0 PrivateWages_15 0.0 0.0 PrivateWages_16 0.0 0.0 PrivateWages_17 0.0 0.0 PrivateWages_18 0.0 0.0 PrivateWages_19 0.0 0.0 PrivateWages_20 0.0 0.0 PrivateWages_21 0.0 0.0 PrivateWages_22 0.0 0.0 Investment_(Intercept) Investment_govExp Investment_taxes Consumption_2 0 0.0 0.0 Consumption_3 0 0.0 0.0 Consumption_4 0 0.0 0.0 Consumption_5 0 0.0 0.0 Consumption_6 0 0.0 0.0 Consumption_8 0 0.0 0.0 Consumption_9 0 0.0 0.0 Consumption_11 0 0.0 0.0 Consumption_12 0 0.0 0.0 Consumption_14 0 0.0 0.0 Consumption_15 0 0.0 0.0 Consumption_16 0 0.0 0.0 Consumption_17 0 0.0 0.0 Consumption_18 0 0.0 0.0 Consumption_19 0 0.0 0.0 Consumption_20 0 0.0 0.0 Consumption_21 0 0.0 0.0 Consumption_22 0 0.0 0.0 Investment_2 1 3.9 7.7 Investment_3 1 3.2 3.9 Investment_4 1 2.8 4.7 Investment_5 1 3.5 3.8 Investment_6 1 3.3 5.5 Investment_8 1 4.0 6.7 Investment_9 1 4.2 4.2 Investment_10 1 4.1 4.0 Investment_11 1 5.2 7.7 Investment_12 1 5.9 7.5 Investment_14 1 3.7 5.4 Investment_15 1 4.0 6.8 Investment_16 1 4.4 7.2 Investment_17 1 2.9 8.3 Investment_18 1 4.3 6.7 Investment_19 1 5.3 7.4 Investment_20 1 6.6 8.9 Investment_21 1 7.4 9.6 Investment_22 1 13.8 11.6 PrivateWages_2 0 0.0 0.0 PrivateWages_3 0 0.0 0.0 PrivateWages_4 0 0.0 0.0 PrivateWages_5 0 0.0 0.0 PrivateWages_6 0 0.0 0.0 PrivateWages_8 0 0.0 0.0 PrivateWages_9 0 0.0 0.0 PrivateWages_10 0 0.0 0.0 PrivateWages_11 0 0.0 0.0 PrivateWages_12 0 0.0 0.0 PrivateWages_13 0 0.0 0.0 PrivateWages_14 0 0.0 0.0 PrivateWages_15 0 0.0 0.0 PrivateWages_16 0 0.0 0.0 PrivateWages_17 0 0.0 0.0 PrivateWages_18 0 0.0 0.0 PrivateWages_19 0 0.0 0.0 PrivateWages_20 0 0.0 0.0 PrivateWages_21 0 0.0 0.0 PrivateWages_22 0 0.0 0.0 Investment_govWage Investment_trend Investment_capitalLag Consumption_2 0.0 0 0 Consumption_3 0.0 0 0 Consumption_4 0.0 0 0 Consumption_5 0.0 0 0 Consumption_6 0.0 0 0 Consumption_8 0.0 0 0 Consumption_9 0.0 0 0 Consumption_11 0.0 0 0 Consumption_12 0.0 0 0 Consumption_14 0.0 0 0 Consumption_15 0.0 0 0 Consumption_16 0.0 0 0 Consumption_17 0.0 0 0 Consumption_18 0.0 0 0 Consumption_19 0.0 0 0 Consumption_20 0.0 0 0 Consumption_21 0.0 0 0 Consumption_22 0.0 0 0 Investment_2 2.7 -10 183 Investment_3 2.9 -9 183 Investment_4 2.9 -8 184 Investment_5 3.1 -7 190 Investment_6 3.2 -6 193 Investment_8 3.6 -4 203 Investment_9 3.7 -3 208 Investment_10 4.0 -2 211 Investment_11 4.2 -1 216 Investment_12 4.8 0 217 Investment_14 5.6 2 207 Investment_15 6.0 3 202 Investment_16 6.1 4 199 Investment_17 7.4 5 198 Investment_18 6.7 6 200 Investment_19 7.7 7 202 Investment_20 7.8 8 200 Investment_21 8.0 9 201 Investment_22 8.5 10 204 PrivateWages_2 0.0 0 0 PrivateWages_3 0.0 0 0 PrivateWages_4 0.0 0 0 PrivateWages_5 0.0 0 0 PrivateWages_6 0.0 0 0 PrivateWages_8 0.0 0 0 PrivateWages_9 0.0 0 0 PrivateWages_10 0.0 0 0 PrivateWages_11 0.0 0 0 PrivateWages_12 0.0 0 0 PrivateWages_13 0.0 0 0 PrivateWages_14 0.0 0 0 PrivateWages_15 0.0 0 0 PrivateWages_16 0.0 0 0 PrivateWages_17 0.0 0 0 PrivateWages_18 0.0 0 0 PrivateWages_19 0.0 0 0 PrivateWages_20 0.0 0 0 PrivateWages_21 0.0 0 0 PrivateWages_22 0.0 0 0 Investment_corpProfLag Investment_gnpLag Consumption_2 0.0 0.0 Consumption_3 0.0 0.0 Consumption_4 0.0 0.0 Consumption_5 0.0 0.0 Consumption_6 0.0 0.0 Consumption_8 0.0 0.0 Consumption_9 0.0 0.0 Consumption_11 0.0 0.0 Consumption_12 0.0 0.0 Consumption_14 0.0 0.0 Consumption_15 0.0 0.0 Consumption_16 0.0 0.0 Consumption_17 0.0 0.0 Consumption_18 0.0 0.0 Consumption_19 0.0 0.0 Consumption_20 0.0 0.0 Consumption_21 0.0 0.0 Consumption_22 0.0 0.0 Investment_2 12.7 44.9 Investment_3 12.4 45.6 Investment_4 16.9 50.1 Investment_5 18.4 57.2 Investment_6 19.4 57.1 Investment_8 19.6 64.0 Investment_9 19.8 64.4 Investment_10 21.1 64.5 Investment_11 21.7 67.0 Investment_12 15.6 61.2 Investment_14 7.0 44.3 Investment_15 11.2 45.1 Investment_16 12.3 49.7 Investment_17 14.0 54.4 Investment_18 17.6 62.7 Investment_19 17.3 65.0 Investment_20 15.3 60.9 Investment_21 19.0 69.5 Investment_22 21.1 75.7 PrivateWages_2 0.0 0.0 PrivateWages_3 0.0 0.0 PrivateWages_4 0.0 0.0 PrivateWages_5 0.0 0.0 PrivateWages_6 0.0 0.0 PrivateWages_8 0.0 0.0 PrivateWages_9 0.0 0.0 PrivateWages_10 0.0 0.0 PrivateWages_11 0.0 0.0 PrivateWages_12 0.0 0.0 PrivateWages_13 0.0 0.0 PrivateWages_14 0.0 0.0 PrivateWages_15 0.0 0.0 PrivateWages_16 0.0 0.0 PrivateWages_17 0.0 0.0 PrivateWages_18 0.0 0.0 PrivateWages_19 0.0 0.0 PrivateWages_20 0.0 0.0 PrivateWages_21 0.0 0.0 PrivateWages_22 0.0 0.0 PrivateWages_(Intercept) PrivateWages_govExp PrivateWages_taxes Consumption_2 0 0.0 0.0 Consumption_3 0 0.0 0.0 Consumption_4 0 0.0 0.0 Consumption_5 0 0.0 0.0 Consumption_6 0 0.0 0.0 Consumption_8 0 0.0 0.0 Consumption_9 0 0.0 0.0 Consumption_11 0 0.0 0.0 Consumption_12 0 0.0 0.0 Consumption_14 0 0.0 0.0 Consumption_15 0 0.0 0.0 Consumption_16 0 0.0 0.0 Consumption_17 0 0.0 0.0 Consumption_18 0 0.0 0.0 Consumption_19 0 0.0 0.0 Consumption_20 0 0.0 0.0 Consumption_21 0 0.0 0.0 Consumption_22 0 0.0 0.0 Investment_2 0 0.0 0.0 Investment_3 0 0.0 0.0 Investment_4 0 0.0 0.0 Investment_5 0 0.0 0.0 Investment_6 0 0.0 0.0 Investment_8 0 0.0 0.0 Investment_9 0 0.0 0.0 Investment_10 0 0.0 0.0 Investment_11 0 0.0 0.0 Investment_12 0 0.0 0.0 Investment_14 0 0.0 0.0 Investment_15 0 0.0 0.0 Investment_16 0 0.0 0.0 Investment_17 0 0.0 0.0 Investment_18 0 0.0 0.0 Investment_19 0 0.0 0.0 Investment_20 0 0.0 0.0 Investment_21 0 0.0 0.0 Investment_22 0 0.0 0.0 PrivateWages_2 1 3.9 7.7 PrivateWages_3 1 3.2 3.9 PrivateWages_4 1 2.8 4.7 PrivateWages_5 1 3.5 3.8 PrivateWages_6 1 3.3 5.5 PrivateWages_8 1 4.0 6.7 PrivateWages_9 1 4.2 4.2 PrivateWages_10 1 4.1 4.0 PrivateWages_11 1 5.2 7.7 PrivateWages_12 1 5.9 7.5 PrivateWages_13 1 4.9 8.3 PrivateWages_14 1 3.7 5.4 PrivateWages_15 1 4.0 6.8 PrivateWages_16 1 4.4 7.2 PrivateWages_17 1 2.9 8.3 PrivateWages_18 1 4.3 6.7 PrivateWages_19 1 5.3 7.4 PrivateWages_20 1 6.6 8.9 PrivateWages_21 1 7.4 9.6 PrivateWages_22 1 13.8 11.6 PrivateWages_govWage PrivateWages_trend PrivateWages_capitalLag Consumption_2 0.0 0 0 Consumption_3 0.0 0 0 Consumption_4 0.0 0 0 Consumption_5 0.0 0 0 Consumption_6 0.0 0 0 Consumption_8 0.0 0 0 Consumption_9 0.0 0 0 Consumption_11 0.0 0 0 Consumption_12 0.0 0 0 Consumption_14 0.0 0 0 Consumption_15 0.0 0 0 Consumption_16 0.0 0 0 Consumption_17 0.0 0 0 Consumption_18 0.0 0 0 Consumption_19 0.0 0 0 Consumption_20 0.0 0 0 Consumption_21 0.0 0 0 Consumption_22 0.0 0 0 Investment_2 0.0 0 0 Investment_3 0.0 0 0 Investment_4 0.0 0 0 Investment_5 0.0 0 0 Investment_6 0.0 0 0 Investment_8 0.0 0 0 Investment_9 0.0 0 0 Investment_10 0.0 0 0 Investment_11 0.0 0 0 Investment_12 0.0 0 0 Investment_14 0.0 0 0 Investment_15 0.0 0 0 Investment_16 0.0 0 0 Investment_17 0.0 0 0 Investment_18 0.0 0 0 Investment_19 0.0 0 0 Investment_20 0.0 0 0 Investment_21 0.0 0 0 Investment_22 0.0 0 0 PrivateWages_2 2.7 -10 183 PrivateWages_3 2.9 -9 183 PrivateWages_4 2.9 -8 184 PrivateWages_5 3.1 -7 190 PrivateWages_6 3.2 -6 193 PrivateWages_8 3.6 -4 203 PrivateWages_9 3.7 -3 208 PrivateWages_10 4.0 -2 211 PrivateWages_11 4.2 -1 216 PrivateWages_12 4.8 0 217 PrivateWages_13 5.3 1 213 PrivateWages_14 5.6 2 207 PrivateWages_15 6.0 3 202 PrivateWages_16 6.1 4 199 PrivateWages_17 7.4 5 198 PrivateWages_18 6.7 6 200 PrivateWages_19 7.7 7 202 PrivateWages_20 7.8 8 200 PrivateWages_21 8.0 9 201 PrivateWages_22 8.5 10 204 PrivateWages_corpProfLag PrivateWages_gnpLag Consumption_2 0.0 0.0 Consumption_3 0.0 0.0 Consumption_4 0.0 0.0 Consumption_5 0.0 0.0 Consumption_6 0.0 0.0 Consumption_8 0.0 0.0 Consumption_9 0.0 0.0 Consumption_11 0.0 0.0 Consumption_12 0.0 0.0 Consumption_14 0.0 0.0 Consumption_15 0.0 0.0 Consumption_16 0.0 0.0 Consumption_17 0.0 0.0 Consumption_18 0.0 0.0 Consumption_19 0.0 0.0 Consumption_20 0.0 0.0 Consumption_21 0.0 0.0 Consumption_22 0.0 0.0 Investment_2 0.0 0.0 Investment_3 0.0 0.0 Investment_4 0.0 0.0 Investment_5 0.0 0.0 Investment_6 0.0 0.0 Investment_8 0.0 0.0 Investment_9 0.0 0.0 Investment_10 0.0 0.0 Investment_11 0.0 0.0 Investment_12 0.0 0.0 Investment_14 0.0 0.0 Investment_15 0.0 0.0 Investment_16 0.0 0.0 Investment_17 0.0 0.0 Investment_18 0.0 0.0 Investment_19 0.0 0.0 Investment_20 0.0 0.0 Investment_21 0.0 0.0 Investment_22 0.0 0.0 PrivateWages_2 12.7 44.9 PrivateWages_3 12.4 45.6 PrivateWages_4 16.9 50.1 PrivateWages_5 18.4 57.2 PrivateWages_6 19.4 57.1 PrivateWages_8 19.6 64.0 PrivateWages_9 19.8 64.4 PrivateWages_10 21.1 64.5 PrivateWages_11 21.7 67.0 PrivateWages_12 15.6 61.2 PrivateWages_13 11.4 53.4 PrivateWages_14 7.0 44.3 PrivateWages_15 11.2 45.1 PrivateWages_16 12.3 49.7 PrivateWages_17 14.0 54.4 PrivateWages_18 17.6 62.7 PrivateWages_19 17.3 65.0 PrivateWages_20 15.3 60.9 PrivateWages_21 19.0 69.5 PrivateWages_22 21.1 75.7 > matrix of fitted regressors Consumption_(Intercept) Consumption_corpProf Consumption_2 1 14.0 Consumption_3 1 16.7 Consumption_4 1 18.5 Consumption_5 1 20.3 Consumption_6 1 19.0 Consumption_8 1 17.6 Consumption_9 1 18.9 Consumption_11 1 16.7 Consumption_12 1 13.4 Consumption_14 1 10.0 Consumption_15 1 12.5 Consumption_16 1 14.5 Consumption_17 1 14.9 Consumption_18 1 19.4 Consumption_19 1 19.1 Consumption_20 1 17.7 Consumption_21 1 20.4 Consumption_22 1 22.7 Investment_2 0 0.0 Investment_3 0 0.0 Investment_4 0 0.0 Investment_5 0 0.0 Investment_6 0 0.0 Investment_8 0 0.0 Investment_9 0 0.0 Investment_10 0 0.0 Investment_11 0 0.0 Investment_12 0 0.0 Investment_14 0 0.0 Investment_15 0 0.0 Investment_16 0 0.0 Investment_17 0 0.0 Investment_18 0 0.0 Investment_19 0 0.0 Investment_20 0 0.0 Investment_21 0 0.0 Investment_22 0 0.0 PrivateWages_2 0 0.0 PrivateWages_3 0 0.0 PrivateWages_4 0 0.0 PrivateWages_5 0 0.0 PrivateWages_6 0 0.0 PrivateWages_8 0 0.0 PrivateWages_9 0 0.0 PrivateWages_10 0 0.0 PrivateWages_11 0 0.0 PrivateWages_12 0 0.0 PrivateWages_13 0 0.0 PrivateWages_14 0 0.0 PrivateWages_15 0 0.0 PrivateWages_16 0 0.0 PrivateWages_17 0 0.0 PrivateWages_18 0 0.0 PrivateWages_19 0 0.0 PrivateWages_20 0 0.0 PrivateWages_21 0 0.0 PrivateWages_22 0 0.0 Consumption_corpProfLag Consumption_wages Consumption_2 12.7 29.8 Consumption_3 12.4 31.8 Consumption_4 16.9 35.3 Consumption_5 18.4 38.6 Consumption_6 19.4 38.5 Consumption_8 19.6 40.0 Consumption_9 19.8 41.8 Consumption_11 21.7 43.1 Consumption_12 15.6 39.7 Consumption_14 7.0 33.3 Consumption_15 11.2 37.3 Consumption_16 12.3 40.1 Consumption_17 14.0 41.8 Consumption_18 17.6 47.6 Consumption_19 17.3 49.2 Consumption_20 15.3 48.6 Consumption_21 19.0 53.4 Consumption_22 21.1 60.8 Investment_2 0.0 0.0 Investment_3 0.0 0.0 Investment_4 0.0 0.0 Investment_5 0.0 0.0 Investment_6 0.0 0.0 Investment_8 0.0 0.0 Investment_9 0.0 0.0 Investment_10 0.0 0.0 Investment_11 0.0 0.0 Investment_12 0.0 0.0 Investment_14 0.0 0.0 Investment_15 0.0 0.0 Investment_16 0.0 0.0 Investment_17 0.0 0.0 Investment_18 0.0 0.0 Investment_19 0.0 0.0 Investment_20 0.0 0.0 Investment_21 0.0 0.0 Investment_22 0.0 0.0 PrivateWages_2 0.0 0.0 PrivateWages_3 0.0 0.0 PrivateWages_4 0.0 0.0 PrivateWages_5 0.0 0.0 PrivateWages_6 0.0 0.0 PrivateWages_8 0.0 0.0 PrivateWages_9 0.0 0.0 PrivateWages_10 0.0 0.0 PrivateWages_11 0.0 0.0 PrivateWages_12 0.0 0.0 PrivateWages_13 0.0 0.0 PrivateWages_14 0.0 0.0 PrivateWages_15 0.0 0.0 PrivateWages_16 0.0 0.0 PrivateWages_17 0.0 0.0 PrivateWages_18 0.0 0.0 PrivateWages_19 0.0 0.0 PrivateWages_20 0.0 0.0 PrivateWages_21 0.0 0.0 PrivateWages_22 0.0 0.0 Investment_(Intercept) Investment_corpProf Consumption_2 0 0.00 Consumption_3 0 0.00 Consumption_4 0 0.00 Consumption_5 0 0.00 Consumption_6 0 0.00 Consumption_8 0 0.00 Consumption_9 0 0.00 Consumption_11 0 0.00 Consumption_12 0 0.00 Consumption_14 0 0.00 Consumption_15 0 0.00 Consumption_16 0 0.00 Consumption_17 0 0.00 Consumption_18 0 0.00 Consumption_19 0 0.00 Consumption_20 0 0.00 Consumption_21 0 0.00 Consumption_22 0 0.00 Investment_2 1 13.41 Investment_3 1 16.69 Investment_4 1 18.79 Investment_5 1 20.65 Investment_6 1 19.26 Investment_8 1 17.53 Investment_9 1 19.53 Investment_10 1 20.27 Investment_11 1 17.19 Investment_12 1 13.52 Investment_14 1 9.99 Investment_15 1 12.86 Investment_16 1 14.33 Investment_17 1 14.97 Investment_18 1 19.37 Investment_19 1 19.36 Investment_20 1 17.47 Investment_21 1 20.12 Investment_22 1 22.78 PrivateWages_2 0 0.00 PrivateWages_3 0 0.00 PrivateWages_4 0 0.00 PrivateWages_5 0 0.00 PrivateWages_6 0 0.00 PrivateWages_8 0 0.00 PrivateWages_9 0 0.00 PrivateWages_10 0 0.00 PrivateWages_11 0 0.00 PrivateWages_12 0 0.00 PrivateWages_13 0 0.00 PrivateWages_14 0 0.00 PrivateWages_15 0 0.00 PrivateWages_16 0 0.00 PrivateWages_17 0 0.00 PrivateWages_18 0 0.00 PrivateWages_19 0 0.00 PrivateWages_20 0 0.00 PrivateWages_21 0 0.00 PrivateWages_22 0 0.00 Investment_corpProfLag Investment_capitalLag Consumption_2 0.0 0 Consumption_3 0.0 0 Consumption_4 0.0 0 Consumption_5 0.0 0 Consumption_6 0.0 0 Consumption_8 0.0 0 Consumption_9 0.0 0 Consumption_11 0.0 0 Consumption_12 0.0 0 Consumption_14 0.0 0 Consumption_15 0.0 0 Consumption_16 0.0 0 Consumption_17 0.0 0 Consumption_18 0.0 0 Consumption_19 0.0 0 Consumption_20 0.0 0 Consumption_21 0.0 0 Consumption_22 0.0 0 Investment_2 12.7 183 Investment_3 12.4 183 Investment_4 16.9 184 Investment_5 18.4 190 Investment_6 19.4 193 Investment_8 19.6 203 Investment_9 19.8 208 Investment_10 21.1 211 Investment_11 21.7 216 Investment_12 15.6 217 Investment_14 7.0 207 Investment_15 11.2 202 Investment_16 12.3 199 Investment_17 14.0 198 Investment_18 17.6 200 Investment_19 17.3 202 Investment_20 15.3 200 Investment_21 19.0 201 Investment_22 21.1 204 PrivateWages_2 0.0 0 PrivateWages_3 0.0 0 PrivateWages_4 0.0 0 PrivateWages_5 0.0 0 PrivateWages_6 0.0 0 PrivateWages_8 0.0 0 PrivateWages_9 0.0 0 PrivateWages_10 0.0 0 PrivateWages_11 0.0 0 PrivateWages_12 0.0 0 PrivateWages_13 0.0 0 PrivateWages_14 0.0 0 PrivateWages_15 0.0 0 PrivateWages_16 0.0 0 PrivateWages_17 0.0 0 PrivateWages_18 0.0 0 PrivateWages_19 0.0 0 PrivateWages_20 0.0 0 PrivateWages_21 0.0 0 PrivateWages_22 0.0 0 PrivateWages_(Intercept) PrivateWages_gnp PrivateWages_gnpLag Consumption_2 0 0.0 0.0 Consumption_3 0 0.0 0.0 Consumption_4 0 0.0 0.0 Consumption_5 0 0.0 0.0 Consumption_6 0 0.0 0.0 Consumption_8 0 0.0 0.0 Consumption_9 0 0.0 0.0 Consumption_11 0 0.0 0.0 Consumption_12 0 0.0 0.0 Consumption_14 0 0.0 0.0 Consumption_15 0 0.0 0.0 Consumption_16 0 0.0 0.0 Consumption_17 0 0.0 0.0 Consumption_18 0 0.0 0.0 Consumption_19 0 0.0 0.0 Consumption_20 0 0.0 0.0 Consumption_21 0 0.0 0.0 Consumption_22 0 0.0 0.0 Investment_2 0 0.0 0.0 Investment_3 0 0.0 0.0 Investment_4 0 0.0 0.0 Investment_5 0 0.0 0.0 Investment_6 0 0.0 0.0 Investment_8 0 0.0 0.0 Investment_9 0 0.0 0.0 Investment_10 0 0.0 0.0 Investment_11 0 0.0 0.0 Investment_12 0 0.0 0.0 Investment_14 0 0.0 0.0 Investment_15 0 0.0 0.0 Investment_16 0 0.0 0.0 Investment_17 0 0.0 0.0 Investment_18 0 0.0 0.0 Investment_19 0 0.0 0.0 Investment_20 0 0.0 0.0 Investment_21 0 0.0 0.0 Investment_22 0 0.0 0.0 PrivateWages_2 1 47.1 44.9 PrivateWages_3 1 49.6 45.6 PrivateWages_4 1 56.5 50.1 PrivateWages_5 1 60.7 57.2 PrivateWages_6 1 60.6 57.1 PrivateWages_8 1 60.0 64.0 PrivateWages_9 1 62.3 64.4 PrivateWages_10 1 64.6 64.5 PrivateWages_11 1 63.7 67.0 PrivateWages_12 1 54.8 61.2 PrivateWages_13 1 47.0 53.4 PrivateWages_14 1 42.1 44.3 PrivateWages_15 1 51.2 45.1 PrivateWages_16 1 55.3 49.7 PrivateWages_17 1 57.4 54.4 PrivateWages_18 1 67.2 62.7 PrivateWages_19 1 68.5 65.0 PrivateWages_20 1 66.8 60.9 PrivateWages_21 1 74.9 69.5 PrivateWages_22 1 86.9 75.7 PrivateWages_trend Consumption_2 0 Consumption_3 0 Consumption_4 0 Consumption_5 0 Consumption_6 0 Consumption_8 0 Consumption_9 0 Consumption_11 0 Consumption_12 0 Consumption_14 0 Consumption_15 0 Consumption_16 0 Consumption_17 0 Consumption_18 0 Consumption_19 0 Consumption_20 0 Consumption_21 0 Consumption_22 0 Investment_2 0 Investment_3 0 Investment_4 0 Investment_5 0 Investment_6 0 Investment_8 0 Investment_9 0 Investment_10 0 Investment_11 0 Investment_12 0 Investment_14 0 Investment_15 0 Investment_16 0 Investment_17 0 Investment_18 0 Investment_19 0 Investment_20 0 Investment_21 0 Investment_22 0 PrivateWages_2 -10 PrivateWages_3 -9 PrivateWages_4 -8 PrivateWages_5 -7 PrivateWages_6 -6 PrivateWages_8 -4 PrivateWages_9 -3 PrivateWages_10 -2 PrivateWages_11 -1 PrivateWages_12 0 PrivateWages_13 1 PrivateWages_14 2 PrivateWages_15 3 PrivateWages_16 4 PrivateWages_17 5 PrivateWages_18 6 PrivateWages_19 7 PrivateWages_20 8 PrivateWages_21 9 PrivateWages_22 10 > nobs [1] 57 > linearHypothesis Linear hypothesis test (Theil's F test) Hypothesis: Consumption_corpProf + Investment_capitalLag = 0 Model 1: restricted model Model 2: kleinModel Res.Df Df F Pr(>F) 1 46 2 45 1 1.37 0.25 Linear hypothesis test (F statistic of a Wald test) Hypothesis: Consumption_corpProf + Investment_capitalLag = 0 Model 1: restricted model Model 2: kleinModel Res.Df Df F Pr(>F) 1 46 2 45 1 1.77 0.19 Linear hypothesis test (Chi^2 statistic of a Wald test) Hypothesis: Consumption_corpProf + Investment_capitalLag = 0 Model 1: restricted model Model 2: kleinModel Res.Df Df Chisq Pr(>Chisq) 1 46 2 45 1 1.77 0.18 Linear hypothesis test (Theil's F test) Hypothesis: Consumption_corpProf + Investment_capitalLag = 0 Consumption_corpProfLag - PrivateWages_trend = 0 Model 1: restricted model Model 2: kleinModel Res.Df Df F Pr(>F) 1 47 2 45 2 0.69 0.51 Linear hypothesis test (F statistic of a Wald test) Hypothesis: Consumption_corpProf + Investment_capitalLag = 0 Consumption_corpProfLag - PrivateWages_trend = 0 Model 1: restricted model Model 2: kleinModel Res.Df Df F Pr(>F) 1 47 2 45 2 0.89 0.42 Linear hypothesis test (Chi^2 statistic of a Wald test) Hypothesis: Consumption_corpProf + Investment_capitalLag = 0 Consumption_corpProfLag - PrivateWages_trend = 0 Model 1: restricted model Model 2: kleinModel Res.Df Df Chisq Pr(>Chisq) 1 47 2 45 2 1.78 0.41 > logLik 'log Lik.' -70.6 (df=13) 'log Lik.' -78.7 (df=13) Estimating function Consumption_(Intercept) Consumption_corpProf Consumption_2 -1.891 -26.49 Consumption_3 -0.190 -3.16 Consumption_4 0.294 5.45 Consumption_5 -1.285 -26.05 Consumption_6 0.431 8.19 Consumption_8 2.670 47.11 Consumption_9 2.363 44.77 Consumption_11 -1.642 -27.49 Consumption_12 -1.735 -23.21 Consumption_14 0.834 8.35 Consumption_15 -1.061 -13.27 Consumption_16 -0.885 -12.82 Consumption_17 3.801 56.68 Consumption_18 -0.502 -9.76 Consumption_19 -3.000 -57.33 Consumption_20 2.012 35.52 Consumption_21 0.746 15.21 Consumption_22 -0.957 -21.70 Investment_2 0.000 0.00 Investment_3 0.000 0.00 Investment_4 0.000 0.00 Investment_5 0.000 0.00 Investment_6 0.000 0.00 Investment_8 0.000 0.00 Investment_9 0.000 0.00 Investment_10 0.000 0.00 Investment_11 0.000 0.00 Investment_12 0.000 0.00 Investment_14 0.000 0.00 Investment_15 0.000 0.00 Investment_16 0.000 0.00 Investment_17 0.000 0.00 Investment_18 0.000 0.00 Investment_19 0.000 0.00 Investment_20 0.000 0.00 Investment_21 0.000 0.00 Investment_22 0.000 0.00 PrivateWages_2 0.000 0.00 PrivateWages_3 0.000 0.00 PrivateWages_4 0.000 0.00 PrivateWages_5 0.000 0.00 PrivateWages_6 0.000 0.00 PrivateWages_8 0.000 0.00 PrivateWages_9 0.000 0.00 PrivateWages_10 0.000 0.00 PrivateWages_11 0.000 0.00 PrivateWages_12 0.000 0.00 PrivateWages_13 0.000 0.00 PrivateWages_14 0.000 0.00 PrivateWages_15 0.000 0.00 PrivateWages_16 0.000 0.00 PrivateWages_17 0.000 0.00 PrivateWages_18 0.000 0.00 PrivateWages_19 0.000 0.00 PrivateWages_20 0.000 0.00 PrivateWages_21 0.000 0.00 PrivateWages_22 0.000 0.00 Consumption_corpProfLag Consumption_wages Consumption_2 -24.01 -56.38 Consumption_3 -2.35 -6.04 Consumption_4 4.96 10.35 Consumption_5 -23.65 -49.61 Consumption_6 8.35 16.60 Consumption_8 52.33 106.81 Consumption_9 46.80 98.74 Consumption_11 -35.64 -70.78 Consumption_12 -27.07 -68.81 Consumption_14 5.83 27.78 Consumption_15 -11.88 -39.61 Consumption_16 -10.89 -35.54 Consumption_17 53.21 158.79 Consumption_18 -8.84 -23.92 Consumption_19 -51.90 -147.70 Consumption_20 30.78 97.67 Consumption_21 14.17 39.83 Consumption_22 -20.20 -58.19 Investment_2 0.00 0.00 Investment_3 0.00 0.00 Investment_4 0.00 0.00 Investment_5 0.00 0.00 Investment_6 0.00 0.00 Investment_8 0.00 0.00 Investment_9 0.00 0.00 Investment_10 0.00 0.00 Investment_11 0.00 0.00 Investment_12 0.00 0.00 Investment_14 0.00 0.00 Investment_15 0.00 0.00 Investment_16 0.00 0.00 Investment_17 0.00 0.00 Investment_18 0.00 0.00 Investment_19 0.00 0.00 Investment_20 0.00 0.00 Investment_21 0.00 0.00 Investment_22 0.00 0.00 PrivateWages_2 0.00 0.00 PrivateWages_3 0.00 0.00 PrivateWages_4 0.00 0.00 PrivateWages_5 0.00 0.00 PrivateWages_6 0.00 0.00 PrivateWages_8 0.00 0.00 PrivateWages_9 0.00 0.00 PrivateWages_10 0.00 0.00 PrivateWages_11 0.00 0.00 PrivateWages_12 0.00 0.00 PrivateWages_13 0.00 0.00 PrivateWages_14 0.00 0.00 PrivateWages_15 0.00 0.00 PrivateWages_16 0.00 0.00 PrivateWages_17 0.00 0.00 PrivateWages_18 0.00 0.00 PrivateWages_19 0.00 0.00 PrivateWages_20 0.00 0.00 PrivateWages_21 0.00 0.00 PrivateWages_22 0.00 0.00 Investment_(Intercept) Investment_corpProf Consumption_2 0.000 0.000 Consumption_3 0.000 0.000 Consumption_4 0.000 0.000 Consumption_5 0.000 0.000 Consumption_6 0.000 0.000 Consumption_8 0.000 0.000 Consumption_9 0.000 0.000 Consumption_11 0.000 0.000 Consumption_12 0.000 0.000 Consumption_14 0.000 0.000 Consumption_15 0.000 0.000 Consumption_16 0.000 0.000 Consumption_17 0.000 0.000 Consumption_18 0.000 0.000 Consumption_19 0.000 0.000 Consumption_20 0.000 0.000 Consumption_21 0.000 0.000 Consumption_22 0.000 0.000 Investment_2 -1.389 -18.632 Investment_3 0.361 6.028 Investment_4 1.031 19.362 Investment_5 -1.558 -32.177 Investment_6 0.610 11.759 Investment_8 1.410 24.716 Investment_9 0.404 7.885 Investment_10 2.080 42.149 Investment_11 -1.162 -19.982 Investment_12 -1.352 -18.282 Investment_14 1.037 10.359 Investment_15 -0.454 -5.832 Investment_16 -0.044 -0.631 Investment_17 2.093 31.318 Investment_18 -0.438 -8.488 Investment_19 -3.873 -74.977 Investment_20 0.486 8.486 Investment_21 0.145 2.925 Investment_22 0.615 14.015 PrivateWages_2 0.000 0.000 PrivateWages_3 0.000 0.000 PrivateWages_4 0.000 0.000 PrivateWages_5 0.000 0.000 PrivateWages_6 0.000 0.000 PrivateWages_8 0.000 0.000 PrivateWages_9 0.000 0.000 PrivateWages_10 0.000 0.000 PrivateWages_11 0.000 0.000 PrivateWages_12 0.000 0.000 PrivateWages_13 0.000 0.000 PrivateWages_14 0.000 0.000 PrivateWages_15 0.000 0.000 PrivateWages_16 0.000 0.000 PrivateWages_17 0.000 0.000 PrivateWages_18 0.000 0.000 PrivateWages_19 0.000 0.000 PrivateWages_20 0.000 0.000 PrivateWages_21 0.000 0.000 PrivateWages_22 0.000 0.000 Investment_corpProfLag Investment_capitalLag Consumption_2 0.000 0.00 Consumption_3 0.000 0.00 Consumption_4 0.000 0.00 Consumption_5 0.000 0.00 Consumption_6 0.000 0.00 Consumption_8 0.000 0.00 Consumption_9 0.000 0.00 Consumption_11 0.000 0.00 Consumption_12 0.000 0.00 Consumption_14 0.000 0.00 Consumption_15 0.000 0.00 Consumption_16 0.000 0.00 Consumption_17 0.000 0.00 Consumption_18 0.000 0.00 Consumption_19 0.000 0.00 Consumption_20 0.000 0.00 Consumption_21 0.000 0.00 Consumption_22 0.000 0.00 Investment_2 -17.639 -253.89 Investment_3 4.479 65.95 Investment_4 17.417 190.14 Investment_5 -28.673 -295.61 Investment_6 11.843 117.63 Investment_8 27.629 286.73 Investment_9 7.995 83.82 Investment_10 43.878 437.95 Investment_11 -25.218 -250.67 Investment_12 -21.091 -292.97 Investment_14 7.256 214.68 Investment_15 -5.080 -91.62 Investment_16 -0.541 -8.76 Investment_17 29.296 413.70 Investment_18 -7.713 -87.56 Investment_19 -67.010 -781.66 Investment_20 7.430 97.07 Investment_21 2.762 29.24 Investment_22 12.981 125.81 PrivateWages_2 0.000 0.00 PrivateWages_3 0.000 0.00 PrivateWages_4 0.000 0.00 PrivateWages_5 0.000 0.00 PrivateWages_6 0.000 0.00 PrivateWages_8 0.000 0.00 PrivateWages_9 0.000 0.00 PrivateWages_10 0.000 0.00 PrivateWages_11 0.000 0.00 PrivateWages_12 0.000 0.00 PrivateWages_13 0.000 0.00 PrivateWages_14 0.000 0.00 PrivateWages_15 0.000 0.00 PrivateWages_16 0.000 0.00 PrivateWages_17 0.000 0.00 PrivateWages_18 0.000 0.00 PrivateWages_19 0.000 0.00 PrivateWages_20 0.000 0.00 PrivateWages_21 0.000 0.00 PrivateWages_22 0.000 0.00 PrivateWages_(Intercept) PrivateWages_gnp PrivateWages_gnpLag Consumption_2 0.0000 0.00 0.00 Consumption_3 0.0000 0.00 0.00 Consumption_4 0.0000 0.00 0.00 Consumption_5 0.0000 0.00 0.00 Consumption_6 0.0000 0.00 0.00 Consumption_8 0.0000 0.00 0.00 Consumption_9 0.0000 0.00 0.00 Consumption_11 0.0000 0.00 0.00 Consumption_12 0.0000 0.00 0.00 Consumption_14 0.0000 0.00 0.00 Consumption_15 0.0000 0.00 0.00 Consumption_16 0.0000 0.00 0.00 Consumption_17 0.0000 0.00 0.00 Consumption_18 0.0000 0.00 0.00 Consumption_19 0.0000 0.00 0.00 Consumption_20 0.0000 0.00 0.00 Consumption_21 0.0000 0.00 0.00 Consumption_22 0.0000 0.00 0.00 Investment_2 0.0000 0.00 0.00 Investment_3 0.0000 0.00 0.00 Investment_4 0.0000 0.00 0.00 Investment_5 0.0000 0.00 0.00 Investment_6 0.0000 0.00 0.00 Investment_8 0.0000 0.00 0.00 Investment_9 0.0000 0.00 0.00 Investment_10 0.0000 0.00 0.00 Investment_11 0.0000 0.00 0.00 Investment_12 0.0000 0.00 0.00 Investment_14 0.0000 0.00 0.00 Investment_15 0.0000 0.00 0.00 Investment_16 0.0000 0.00 0.00 Investment_17 0.0000 0.00 0.00 Investment_18 0.0000 0.00 0.00 Investment_19 0.0000 0.00 0.00 Investment_20 0.0000 0.00 0.00 Investment_21 0.0000 0.00 0.00 Investment_22 0.0000 0.00 0.00 PrivateWages_2 -1.9924 -93.78 -89.46 PrivateWages_3 0.4683 23.22 21.35 PrivateWages_4 1.4034 79.35 70.31 PrivateWages_5 -1.7870 -108.45 -102.22 PrivateWages_6 -0.3627 -21.98 -20.71 PrivateWages_8 1.1629 69.77 74.43 PrivateWages_9 1.2735 79.30 82.01 PrivateWages_10 2.2141 142.96 142.81 PrivateWages_11 -1.2912 -82.26 -86.51 PrivateWages_12 -0.0350 -1.92 -2.14 PrivateWages_13 -1.0438 -49.04 -55.74 PrivateWages_14 1.8016 75.90 79.81 PrivateWages_15 -0.3714 -19.02 -16.75 PrivateWages_16 -0.3904 -21.61 -19.40 PrivateWages_17 1.4934 85.71 81.24 PrivateWages_18 0.0279 1.88 1.75 PrivateWages_19 -3.8229 -261.91 -248.49 PrivateWages_20 0.7870 52.61 47.93 PrivateWages_21 -0.7415 -55.52 -51.54 PrivateWages_22 1.2062 104.79 91.31 PrivateWages_trend Consumption_2 0.000 Consumption_3 0.000 Consumption_4 0.000 Consumption_5 0.000 Consumption_6 0.000 Consumption_8 0.000 Consumption_9 0.000 Consumption_11 0.000 Consumption_12 0.000 Consumption_14 0.000 Consumption_15 0.000 Consumption_16 0.000 Consumption_17 0.000 Consumption_18 0.000 Consumption_19 0.000 Consumption_20 0.000 Consumption_21 0.000 Consumption_22 0.000 Investment_2 0.000 Investment_3 0.000 Investment_4 0.000 Investment_5 0.000 Investment_6 0.000 Investment_8 0.000 Investment_9 0.000 Investment_10 0.000 Investment_11 0.000 Investment_12 0.000 Investment_14 0.000 Investment_15 0.000 Investment_16 0.000 Investment_17 0.000 Investment_18 0.000 Investment_19 0.000 Investment_20 0.000 Investment_21 0.000 Investment_22 0.000 PrivateWages_2 19.924 PrivateWages_3 -4.214 PrivateWages_4 -11.227 PrivateWages_5 12.509 PrivateWages_6 2.176 PrivateWages_8 -4.652 PrivateWages_9 -3.820 PrivateWages_10 -4.428 PrivateWages_11 1.291 PrivateWages_12 0.000 PrivateWages_13 -1.044 PrivateWages_14 3.603 PrivateWages_15 -1.114 PrivateWages_16 -1.562 PrivateWages_17 7.467 PrivateWages_18 0.168 PrivateWages_19 -26.760 PrivateWages_20 6.296 PrivateWages_21 -6.674 PrivateWages_22 12.062 [1] TRUE > Bread Consumption_(Intercept) Consumption_corpProf Consumption_(Intercept) 118.21 -4.213 Consumption_corpProf -4.21 1.235 Consumption_corpProfLag 1.03 -0.689 Consumption_wages -1.44 -0.136 Investment_(Intercept) 0.00 0.000 Investment_corpProf 0.00 0.000 Investment_corpProfLag 0.00 0.000 Investment_capitalLag 0.00 0.000 PrivateWages_(Intercept) 0.00 0.000 PrivateWages_gnp 0.00 0.000 PrivateWages_gnpLag 0.00 0.000 PrivateWages_trend 0.00 0.000 Consumption_corpProfLag Consumption_wages Consumption_(Intercept) 1.0298 -1.4384 Consumption_corpProf -0.6891 -0.1356 Consumption_corpProfLag 0.7104 -0.0191 Consumption_wages -0.0191 0.0972 Investment_(Intercept) 0.0000 0.0000 Investment_corpProf 0.0000 0.0000 Investment_corpProfLag 0.0000 0.0000 Investment_capitalLag 0.0000 0.0000 PrivateWages_(Intercept) 0.0000 0.0000 PrivateWages_gnp 0.0000 0.0000 PrivateWages_gnpLag 0.0000 0.0000 PrivateWages_trend 0.0000 0.0000 Investment_(Intercept) Investment_corpProf Consumption_(Intercept) 0.0 0.000 Consumption_corpProf 0.0 0.000 Consumption_corpProfLag 0.0 0.000 Consumption_wages 0.0 0.000 Investment_(Intercept) 2314.8 -41.107 Investment_corpProf -41.1 1.637 Investment_corpProfLag 33.2 -1.272 Investment_capitalLag -10.7 0.169 PrivateWages_(Intercept) 0.0 0.000 PrivateWages_gnp 0.0 0.000 PrivateWages_gnpLag 0.0 0.000 PrivateWages_trend 0.0 0.000 Investment_corpProfLag Investment_capitalLag Consumption_(Intercept) 0.000 0.0000 Consumption_corpProf 0.000 0.0000 Consumption_corpProfLag 0.000 0.0000 Consumption_wages 0.000 0.0000 Investment_(Intercept) 33.159 -10.7377 Investment_corpProf -1.272 0.1688 Investment_corpProfLag 1.204 -0.1550 Investment_capitalLag -0.155 0.0519 PrivateWages_(Intercept) 0.000 0.0000 PrivateWages_gnp 0.000 0.0000 PrivateWages_gnpLag 0.000 0.0000 PrivateWages_trend 0.000 0.0000 PrivateWages_(Intercept) PrivateWages_gnp Consumption_(Intercept) 0.000 0.0000 Consumption_corpProf 0.000 0.0000 Consumption_corpProfLag 0.000 0.0000 Consumption_wages 0.000 0.0000 Investment_(Intercept) 0.000 0.0000 Investment_corpProf 0.000 0.0000 Investment_corpProfLag 0.000 0.0000 Investment_capitalLag 0.000 0.0000 PrivateWages_(Intercept) 162.179 -0.8825 PrivateWages_gnp -0.882 0.1501 PrivateWages_gnpLag -1.850 -0.1399 PrivateWages_trend 2.056 -0.0403 PrivateWages_gnpLag PrivateWages_trend Consumption_(Intercept) 0.0000 0.0000 Consumption_corpProf 0.0000 0.0000 Consumption_corpProfLag 0.0000 0.0000 Consumption_wages 0.0000 0.0000 Investment_(Intercept) 0.0000 0.0000 Investment_corpProf 0.0000 0.0000 Investment_corpProfLag 0.0000 0.0000 Investment_capitalLag 0.0000 0.0000 PrivateWages_(Intercept) -1.8504 2.0559 PrivateWages_gnp -0.1399 -0.0403 PrivateWages_gnpLag 0.1768 0.0057 PrivateWages_trend 0.0057 0.1094 > > # SUR Warning in systemfit(system, method = method, data = KleinI, methodResidCov = ifelse(method == : the estimation of systems of equations with unequal numbers of observations has not been thoroughly tested yet > summary systemfit results method: SUR N DF SSR detRCov OLS-R2 McElroy-R2 system 59 47 45.1 0.168 0.976 0.992 N DF SSR MSE RMSE R2 Adj R2 Consumption 19 15 17.5 1.167 1.080 0.980 0.975 Investment 20 16 17.3 1.083 1.041 0.911 0.894 PrivateWages 20 16 10.3 0.642 0.801 0.987 0.985 The covariance matrix of the residuals used for estimation Consumption Investment PrivateWages Consumption 0.9286 0.0435 -0.369 Investment 0.0435 0.7653 0.109 PrivateWages -0.3690 0.1091 0.468 The covariance matrix of the residuals Consumption Investment PrivateWages Consumption 0.9251 0.0748 -0.427 Investment 0.0748 0.7653 0.171 PrivateWages -0.4268 0.1706 0.492 The correlations of the residuals Consumption Investment PrivateWages Consumption 1.0000 0.0888 -0.636 Investment 0.0888 1.0000 0.268 PrivateWages -0.6364 0.2678 1.000 SUR estimates for 'Consumption' (equation 1) Model Formula: consump ~ corpProf + corpProfLag + wages Estimate Std. Error t value Pr(>|t|) (Intercept) 16.2684 1.2781 12.73 1.9e-09 *** corpProf 0.1942 0.0927 2.10 0.054 . corpProfLag 0.0746 0.0819 0.91 0.377 wages 0.8011 0.0372 21.53 1.1e-12 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.08 on 15 degrees of freedom Number of observations: 19 Degrees of Freedom: 15 SSR: 17.501 MSE: 1.167 Root MSE: 1.08 Multiple R-Squared: 0.98 Adjusted R-Squared: 0.975 SUR estimates for 'Investment' (equation 2) Model Formula: invest ~ corpProf + corpProfLag + capitalLag Estimate Std. Error t value Pr(>|t|) (Intercept) 12.6462 4.6500 2.72 0.01515 * corpProf 0.4707 0.0916 5.14 9.9e-05 *** corpProfLag 0.3519 0.0874 4.03 0.00097 *** capitalLag -0.1253 0.0229 -5.47 5.1e-05 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.041 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 17.325 MSE: 1.083 Root MSE: 1.041 Multiple R-Squared: 0.911 Adjusted R-Squared: 0.894 SUR estimates for 'PrivateWages' (equation 3) Model Formula: privWage ~ gnp + gnpLag + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 1.3245 1.0946 1.21 0.24 gnp 0.4184 0.0260 16.08 2.7e-11 *** gnpLag 0.1714 0.0307 5.59 4.1e-05 *** trend 0.1455 0.0276 5.27 7.6e-05 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 0.801 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 10.265 MSE: 0.642 Root MSE: 0.801 Multiple R-Squared: 0.987 Adjusted R-Squared: 0.985 > residuals Consumption Investment PrivateWages 1 NA NA NA 2 -0.3146 -0.2419 -1.1439 3 -1.2707 -0.1795 0.5080 4 -1.5428 1.0691 1.4208 5 -0.4489 -1.4778 -0.1000 6 0.0588 0.3168 -0.3599 7 0.9215 1.4450 NA 8 1.3791 0.8287 -0.7561 9 1.0901 -0.5272 0.2880 10 NA 1.2089 1.1795 11 0.3577 0.4081 -0.3681 12 -0.2286 0.2569 0.3439 13 NA NA -0.1574 14 0.2172 0.4743 0.4225 15 -0.1124 -0.0607 0.3154 16 -0.0876 0.0761 0.0151 17 1.5611 1.0205 -0.8084 18 -0.4529 0.0580 0.8611 19 0.1999 -2.5444 -0.7635 20 0.9266 -0.6202 -0.4039 21 0.7589 -0.7478 -1.2175 22 -2.2135 -0.6029 0.5611 > fitted Consumption Investment PrivateWages 1 NA NA NA 2 42.2 0.0419 26.6 3 46.3 2.0795 28.8 4 50.7 4.1309 32.7 5 51.0 4.4778 34.0 6 52.5 4.7832 35.8 7 54.2 4.1550 NA 8 54.8 3.3713 38.7 9 56.2 3.5272 38.9 10 NA 3.8911 40.1 11 54.6 0.5919 38.3 12 51.1 -3.6569 34.2 13 NA NA 29.2 14 46.3 -5.5743 28.1 15 48.8 -2.9393 30.3 16 51.4 -1.3761 33.2 17 56.1 1.0795 37.6 18 59.2 1.9420 40.1 19 57.3 0.6444 39.0 20 60.7 1.9202 42.0 21 64.2 4.0478 46.2 22 71.9 5.5029 52.7 > predict Consumption.pred Consumption.se.fit Consumption.lwr Consumption.upr 1 NA NA NA NA 2 42.2 0.448 41.3 43.1 3 46.3 0.476 45.3 47.2 4 50.7 0.318 50.1 51.4 5 51.0 0.373 50.3 51.8 6 52.5 0.378 51.8 53.3 7 54.2 0.337 53.5 54.9 8 54.8 0.310 54.2 55.4 9 56.2 0.343 55.5 56.9 10 NA NA NA NA 11 54.6 0.567 53.5 55.8 12 51.1 0.509 50.1 52.2 13 NA NA NA NA 14 46.3 0.573 45.1 47.4 15 48.8 0.382 48.0 49.6 16 51.4 0.328 50.7 52.0 17 56.1 0.336 55.5 56.8 18 59.2 0.309 58.5 59.8 19 57.3 0.370 56.6 58.0 20 60.7 0.401 59.9 61.5 21 64.2 0.405 63.4 65.1 22 71.9 0.633 70.6 73.2 Investment.pred Investment.se.fit Investment.lwr Investment.upr 1 NA NA NA NA 2 0.0419 0.533 -1.0309 1.115 3 2.0795 0.433 1.2082 2.951 4 4.1309 0.387 3.3532 4.909 5 4.4778 0.322 3.8307 5.125 6 4.7832 0.305 4.1700 5.396 7 4.1550 0.283 3.5852 4.725 8 3.3713 0.253 2.8630 3.880 9 3.5272 0.337 2.8488 4.206 10 3.8911 0.386 3.1149 4.667 11 0.5919 0.561 -0.5376 1.722 12 -3.6569 0.530 -4.7223 -2.591 13 NA NA NA NA 14 -5.5743 0.618 -6.8176 -4.331 15 -2.9393 0.362 -3.6671 -2.212 16 -1.3761 0.296 -1.9710 -0.781 17 1.0795 0.300 0.4763 1.683 18 1.9420 0.216 1.5081 2.376 19 0.6444 0.298 0.0451 1.244 20 1.9202 0.318 1.2798 2.561 21 4.0478 0.295 3.4537 4.642 22 5.5029 0.417 4.6638 6.342 PrivateWages.pred PrivateWages.se.fit PrivateWages.lwr PrivateWages.upr 1 NA NA NA NA 2 26.6 0.312 26.0 27.3 3 28.8 0.312 28.2 29.4 4 32.7 0.307 32.1 33.3 5 34.0 0.237 33.5 34.5 6 35.8 0.235 35.3 36.2 7 NA NA NA NA 8 38.7 0.239 38.2 39.1 9 38.9 0.228 38.5 39.4 10 40.1 0.218 39.7 40.6 11 38.3 0.293 37.7 38.9 12 34.2 0.290 33.6 34.7 13 29.2 0.343 28.5 29.8 14 28.1 0.321 27.4 28.7 15 30.3 0.320 29.6 30.9 16 33.2 0.268 32.6 33.7 17 37.6 0.263 37.1 38.1 18 40.1 0.207 39.7 40.6 19 39.0 0.293 38.4 39.6 20 42.0 0.279 41.4 42.6 21 46.2 0.295 45.6 46.8 22 52.7 0.435 51.9 53.6 > model.frame [1] TRUE > model.matrix [1] TRUE > nobs [1] 59 > linearHypothesis Linear hypothesis test (Theil's F test) Hypothesis: Consumption_corpProf + Investment_capitalLag = 0 Model 1: restricted model Model 2: kleinModel Res.Df Df F Pr(>F) 1 48 2 47 1 0.41 0.52 Linear hypothesis test (F statistic of a Wald test) Hypothesis: Consumption_corpProf + Investment_capitalLag = 0 Model 1: restricted model Model 2: kleinModel Res.Df Df F Pr(>F) 1 48 2 47 1 0.52 0.47 Linear hypothesis test (Chi^2 statistic of a Wald test) Hypothesis: Consumption_corpProf + Investment_capitalLag = 0 Model 1: restricted model Model 2: kleinModel Res.Df Df Chisq Pr(>Chisq) 1 48 2 47 1 0.52 0.47 Linear hypothesis test (Theil's F test) Hypothesis: Consumption_corpProf + Investment_capitalLag = 0 Consumption_corpProfLag - PrivateWages_trend = 0 Model 1: restricted model Model 2: kleinModel Res.Df Df F Pr(>F) 1 49 2 47 2 0.31 0.73 Linear hypothesis test (F statistic of a Wald test) Hypothesis: Consumption_corpProf + Investment_capitalLag = 0 Consumption_corpProfLag - PrivateWages_trend = 0 Model 1: restricted model Model 2: kleinModel Res.Df Df F Pr(>F) 1 49 2 47 2 0.4 0.67 Linear hypothesis test (Chi^2 statistic of a Wald test) Hypothesis: Consumption_corpProf + Investment_capitalLag = 0 Consumption_corpProfLag - PrivateWages_trend = 0 Model 1: restricted model Model 2: kleinModel Res.Df Df Chisq Pr(>Chisq) 1 49 2 47 2 0.79 0.67 > logLik 'log Lik.' -67.3 (df=18) 'log Lik.' -74.9 (df=18) Estimating function Consumption_(Intercept) Consumption_corpProf Consumption_2 -0.5115 -6.342 Consumption_3 -2.0659 -34.913 Consumption_4 -2.5083 -46.152 Consumption_5 -0.7298 -14.158 Consumption_6 0.0957 1.923 Consumption_7 1.4982 29.364 Consumption_8 2.2421 44.394 Consumption_9 1.7723 37.396 Consumption_11 0.5815 9.072 Consumption_12 -0.3716 -4.237 Consumption_14 0.3531 3.954 Consumption_15 -0.1827 -2.248 Consumption_16 -0.1424 -1.993 Consumption_17 2.5380 44.669 Consumption_18 -0.7363 -12.738 Consumption_19 0.3251 4.973 Consumption_20 1.5064 28.622 Consumption_21 1.2337 26.032 Consumption_22 -3.5987 -84.568 Investment_2 0.0688 0.854 Investment_3 0.0511 0.863 Investment_4 -0.3043 -5.599 Investment_5 0.4206 8.160 Investment_6 -0.0902 -1.813 Investment_7 -0.4113 -8.061 Investment_8 -0.2359 -4.670 Investment_9 0.1501 3.166 Investment_10 0.0000 0.000 Investment_11 -0.1161 -1.812 Investment_12 -0.0731 -0.834 Investment_14 -0.1350 -1.512 Investment_15 0.0173 0.212 Investment_16 -0.0217 -0.303 Investment_17 -0.2904 -5.112 Investment_18 -0.0165 -0.286 Investment_19 0.7242 11.080 Investment_20 0.1765 3.354 Investment_21 0.2128 4.491 Investment_22 0.1716 4.032 PrivateWages_2 -1.5418 -19.118 PrivateWages_3 0.6847 11.571 PrivateWages_4 1.9149 35.234 PrivateWages_5 -0.1348 -2.615 PrivateWages_6 -0.4851 -9.750 PrivateWages_8 -1.0191 -20.178 PrivateWages_9 0.3882 8.190 PrivateWages_10 0.0000 0.000 PrivateWages_11 -0.4961 -7.739 PrivateWages_12 0.4635 5.284 PrivateWages_13 0.0000 0.000 PrivateWages_14 0.5694 6.377 PrivateWages_15 0.4251 5.229 PrivateWages_16 0.0204 0.286 PrivateWages_17 -1.0895 -19.175 PrivateWages_18 1.1605 20.077 PrivateWages_19 -1.0290 -15.743 PrivateWages_20 -0.5443 -10.343 PrivateWages_21 -1.6408 -34.622 PrivateWages_22 0.7563 17.772 Consumption_corpProfLag Consumption_wages Consumption_2 -6.496 -14.423 Consumption_3 -25.617 -66.521 Consumption_4 -42.390 -92.806 Consumption_5 -13.428 -27.003 Consumption_6 1.856 3.693 Consumption_7 30.114 60.976 Consumption_8 43.945 93.047 Consumption_9 35.092 76.033 Consumption_11 12.619 24.482 Consumption_12 -5.798 -14.606 Consumption_14 2.471 12.039 Consumption_15 -2.047 -6.688 Consumption_16 -1.751 -5.595 Consumption_17 35.532 112.180 Consumption_18 -12.959 -35.121 Consumption_19 5.624 14.920 Consumption_20 23.048 74.417 Consumption_21 23.441 65.389 Consumption_22 -75.932 -222.397 Investment_2 0.874 1.941 Investment_3 0.633 1.645 Investment_4 -5.142 -11.258 Investment_5 7.739 15.562 Investment_6 -1.749 -3.481 Investment_7 -8.267 -16.739 Investment_8 -4.623 -9.788 Investment_9 2.971 6.437 Investment_10 0.000 0.000 Investment_11 -2.520 -4.889 Investment_12 -1.141 -2.873 Investment_14 -0.945 -4.603 Investment_15 0.193 0.632 Investment_16 -0.266 -0.851 Investment_17 -4.066 -12.838 Investment_18 -0.291 -0.787 Investment_19 12.528 33.240 Investment_20 2.701 8.720 Investment_21 4.044 11.280 Investment_22 3.620 10.604 PrivateWages_2 -19.580 -43.478 PrivateWages_3 8.490 22.046 PrivateWages_4 32.362 70.851 PrivateWages_5 -2.480 -4.987 PrivateWages_6 -9.410 -18.724 PrivateWages_8 -19.974 -42.291 PrivateWages_9 7.686 16.652 PrivateWages_10 0.000 0.000 PrivateWages_11 -10.765 -20.886 PrivateWages_12 7.230 18.215 PrivateWages_13 0.000 0.000 PrivateWages_14 3.986 19.417 PrivateWages_15 4.762 15.560 PrivateWages_16 0.251 0.802 PrivateWages_17 -15.253 -48.156 PrivateWages_18 20.425 55.356 PrivateWages_19 -17.801 -47.230 PrivateWages_20 -8.329 -26.891 PrivateWages_21 -31.176 -86.965 PrivateWages_22 15.957 46.737 Investment_(Intercept) Investment_corpProf Consumption_2 0.08954 1.110 Consumption_3 0.36165 6.112 Consumption_4 0.43910 8.079 Consumption_5 0.12776 2.479 Consumption_6 -0.01675 -0.337 Consumption_7 -0.26227 -5.141 Consumption_8 -0.39250 -7.772 Consumption_9 -0.31026 -6.547 Consumption_11 -0.10180 -1.588 Consumption_12 0.06506 0.742 Consumption_14 -0.06181 -0.692 Consumption_15 0.03199 0.393 Consumption_16 0.02492 0.349 Consumption_17 -0.44431 -7.820 Consumption_18 0.12890 2.230 Consumption_19 -0.05691 -0.871 Consumption_20 -0.26372 -5.011 Consumption_21 -0.21598 -4.557 Consumption_22 0.62998 14.805 Investment_2 -0.33900 -4.204 Investment_3 -0.25149 -4.250 Investment_4 1.49825 27.568 Investment_5 -2.07104 -40.178 Investment_6 0.44402 8.925 Investment_7 2.02512 39.692 Investment_8 1.16134 22.995 Investment_9 -0.73888 -15.590 Investment_10 1.69419 36.764 Investment_11 0.57188 8.921 Investment_12 0.36002 4.104 Investment_14 0.66469 7.445 Investment_15 -0.08500 -1.046 Investment_16 0.10666 1.493 Investment_17 1.43016 25.171 Investment_18 0.08129 1.406 Investment_19 -3.56588 -54.558 Investment_20 -0.86923 -16.515 Investment_21 -1.04801 -22.113 Investment_22 -0.84488 -19.855 PrivateWages_2 0.63026 7.815 PrivateWages_3 -0.27988 -4.730 PrivateWages_4 -0.78278 -14.403 PrivateWages_5 0.05510 1.069 PrivateWages_6 0.19829 3.986 PrivateWages_8 0.41658 8.248 PrivateWages_9 -0.15868 -3.348 PrivateWages_10 -0.64985 -14.102 PrivateWages_11 0.20280 3.164 PrivateWages_12 -0.18947 -2.160 PrivateWages_13 0.00000 0.000 PrivateWages_14 -0.23276 -2.607 PrivateWages_15 -0.17379 -2.138 PrivateWages_16 -0.00834 -0.117 PrivateWages_17 0.44538 7.839 PrivateWages_18 -0.47440 -8.207 PrivateWages_19 0.42063 6.436 PrivateWages_20 0.22252 4.228 PrivateWages_21 0.67076 14.153 PrivateWages_22 -0.30915 -7.265 Investment_corpProfLag Investment_capitalLag Consumption_2 1.137 16.37 Consumption_3 4.484 66.04 Consumption_4 7.421 81.01 Consumption_5 2.351 24.24 Consumption_6 -0.325 -3.23 Consumption_7 -5.272 -51.88 Consumption_8 -7.693 -79.84 Consumption_9 -6.143 -64.41 Consumption_11 -2.209 -21.96 Consumption_12 1.015 14.10 Consumption_14 -0.433 -12.80 Consumption_15 0.358 6.46 Consumption_16 0.307 4.96 Consumption_17 -6.220 -87.84 Consumption_18 2.269 25.75 Consumption_19 -0.984 -11.48 Consumption_20 -4.035 -52.72 Consumption_21 -4.104 -43.46 Consumption_22 13.293 128.83 Investment_2 -4.305 -61.97 Investment_3 -3.118 -45.92 Investment_4 25.320 276.43 Investment_5 -38.107 -392.88 Investment_6 8.614 85.56 Investment_7 40.705 400.57 Investment_8 22.762 236.22 Investment_9 -14.630 -153.39 Investment_10 35.747 356.80 Investment_11 12.410 123.35 Investment_12 5.616 78.02 Investment_14 4.653 137.66 Investment_15 -0.952 -17.17 Investment_16 1.312 21.22 Investment_17 20.022 282.74 Investment_18 1.431 16.24 Investment_19 -61.690 -719.59 Investment_20 -13.299 -173.76 Investment_21 -19.912 -210.86 Investment_22 -17.827 -172.78 PrivateWages_2 8.004 115.21 PrivateWages_3 -3.471 -51.11 PrivateWages_4 -13.229 -144.42 PrivateWages_5 1.014 10.45 PrivateWages_6 3.847 38.21 PrivateWages_8 8.165 84.73 PrivateWages_9 -3.142 -32.94 PrivateWages_10 -13.712 -136.86 PrivateWages_11 4.401 43.74 PrivateWages_12 -2.956 -41.06 PrivateWages_13 0.000 0.00 PrivateWages_14 -1.629 -48.21 PrivateWages_15 -1.946 -35.11 PrivateWages_16 -0.103 -1.66 PrivateWages_17 6.235 88.05 PrivateWages_18 -8.349 -94.78 PrivateWages_19 7.277 84.88 PrivateWages_20 3.405 44.48 PrivateWages_21 12.744 134.96 PrivateWages_22 -6.523 -63.22 PrivateWages_(Intercept) PrivateWages_gnp PrivateWages_gnpLag Consumption_2 -0.4240 -19.33 -19.04 Consumption_3 -1.7126 -85.80 -78.09 Consumption_4 -2.0793 -118.94 -104.17 Consumption_5 -0.6050 -34.54 -34.61 Consumption_6 0.0793 4.84 4.53 Consumption_7 0.0000 0.00 0.00 Consumption_8 1.8587 119.70 118.95 Consumption_9 1.4692 94.76 94.62 Consumption_11 0.4821 29.50 32.30 Consumption_12 -0.3081 -16.45 -18.85 Consumption_14 0.2927 13.20 12.97 Consumption_15 -0.1515 -7.53 -6.83 Consumption_16 -0.1180 -6.42 -5.87 Consumption_17 2.1040 131.92 114.46 Consumption_18 -0.6104 -39.67 -38.27 Consumption_19 0.2695 16.41 17.52 Consumption_20 1.2488 86.79 76.05 Consumption_21 1.0228 77.42 71.08 Consumption_22 -2.9832 -263.72 -225.83 Investment_2 0.1333 6.08 5.98 Investment_3 0.0989 4.95 4.51 Investment_4 -0.5890 -33.69 -29.51 Investment_5 0.8142 46.49 46.57 Investment_6 -0.1746 -10.65 -9.97 Investment_7 0.0000 0.00 0.00 Investment_8 -0.4566 -29.40 -29.22 Investment_9 0.2905 18.74 18.71 Investment_10 -0.6660 -44.62 -42.96 Investment_11 -0.2248 -13.76 -15.06 Investment_12 -0.1415 -7.56 -8.66 Investment_14 -0.2613 -11.79 -11.58 Investment_15 0.0334 1.66 1.51 Investment_16 -0.0419 -2.28 -2.08 Investment_17 -0.5622 -35.25 -30.59 Investment_18 -0.0320 -2.08 -2.00 Investment_19 1.4018 85.37 91.12 Investment_20 0.3417 23.75 20.81 Investment_21 0.4120 31.19 28.63 Investment_22 0.3321 29.36 25.14 PrivateWages_2 -3.8052 -173.52 -170.85 PrivateWages_3 1.6898 84.66 77.06 PrivateWages_4 4.7261 270.33 236.78 PrivateWages_5 -0.3327 -19.00 -19.03 PrivateWages_6 -1.1972 -73.03 -68.36 PrivateWages_8 -2.5152 -161.98 -160.97 PrivateWages_9 0.9580 61.79 61.70 PrivateWages_10 3.9235 262.88 253.07 PrivateWages_11 -1.2244 -74.93 -82.04 PrivateWages_12 1.1439 61.09 70.01 PrivateWages_13 -0.5236 -23.19 -27.96 PrivateWages_14 1.4053 63.38 62.26 PrivateWages_15 1.0493 52.15 47.32 PrivateWages_16 0.0503 2.74 2.50 PrivateWages_17 -2.6890 -168.60 -146.28 PrivateWages_18 2.8642 186.17 179.59 PrivateWages_19 -2.5396 -154.66 -165.07 PrivateWages_20 -1.3435 -93.37 -81.82 PrivateWages_21 -4.0497 -306.57 -281.46 PrivateWages_22 1.8665 165.00 141.30 PrivateWages_trend Consumption_2 4.240 Consumption_3 15.413 Consumption_4 16.634 Consumption_5 4.235 Consumption_6 -0.476 Consumption_7 0.000 Consumption_8 -7.435 Consumption_9 -4.408 Consumption_11 -0.482 Consumption_12 0.000 Consumption_14 0.585 Consumption_15 -0.454 Consumption_16 -0.472 Consumption_17 10.520 Consumption_18 -3.662 Consumption_19 1.886 Consumption_20 9.990 Consumption_21 9.205 Consumption_22 -29.832 Investment_2 -1.333 Investment_3 -0.890 Investment_4 4.712 Investment_5 -5.699 Investment_6 1.047 Investment_7 0.000 Investment_8 1.826 Investment_9 -0.871 Investment_10 1.332 Investment_11 0.225 Investment_12 0.000 Investment_14 -0.523 Investment_15 0.100 Investment_16 -0.168 Investment_17 -2.811 Investment_18 -0.192 Investment_19 9.813 Investment_20 2.734 Investment_21 3.708 Investment_22 3.321 PrivateWages_2 38.052 PrivateWages_3 -15.208 PrivateWages_4 -37.809 PrivateWages_5 2.329 PrivateWages_6 7.183 PrivateWages_8 10.061 PrivateWages_9 -2.874 PrivateWages_10 -7.847 PrivateWages_11 1.224 PrivateWages_12 0.000 PrivateWages_13 -0.524 PrivateWages_14 2.811 PrivateWages_15 3.148 PrivateWages_16 0.201 PrivateWages_17 -13.445 PrivateWages_18 17.185 PrivateWages_19 -17.777 PrivateWages_20 -10.748 PrivateWages_21 -36.448 PrivateWages_22 18.665 [1] TRUE > Bread Consumption_(Intercept) Consumption_corpProf Consumption_corpProfLag [1,] 9.64e+01 -1.01207 -0.67760 [2,] -1.01e+00 0.50717 -0.26912 [3,] -6.78e-01 -0.26912 0.39547 [4,] -1.57e+00 -0.07816 -0.02960 [5,] 4.72e+00 -0.06998 0.78589 [6,] -2.60e-01 0.05062 -0.04147 [7,] 5.84e-03 -0.03341 0.04369 [8,] -2.63e-04 -0.00132 -0.00391 [9,] -3.35e+01 0.06371 1.58512 [10,] 2.97e-01 -0.05279 0.03618 [11,] 2.54e-01 0.05334 -0.06435 [12,] 1.92e-01 0.03084 0.02478 Consumption_wages Investment_(Intercept) Investment_corpProf [1,] -1.566759 4.725 -0.25994 [2,] -0.078160 -0.070 0.05062 [3,] -0.029602 0.786 -0.04147 [4,] 0.081697 -0.368 0.00116 [5,] -0.368191 1275.706 -12.07893 [6,] 0.001158 -12.079 0.49514 [7,] -0.003210 9.845 -0.37888 [8,] 0.001998 -6.140 0.04890 [9,] 0.126305 19.264 -0.14904 [10,] -0.000206 0.266 0.01283 [11,] -0.002055 -0.608 -0.01053 [12,] -0.027162 -0.549 0.00394 Investment_corpProfLag Investment_capitalLag PrivateWages_(Intercept) [1,] 0.00584 -0.000263 -33.5037 [2,] -0.03341 -0.001318 0.0637 [3,] 0.04369 -0.003914 1.5851 [4,] -0.00321 0.001998 0.1263 [5,] 9.84516 -6.139910 19.2637 [6,] -0.37888 0.048897 -0.1490 [7,] 0.45026 -0.053769 -0.4040 [8,] -0.05377 0.030940 -0.0490 [9,] -0.40395 -0.049007 70.6849 [10,] -0.00755 -0.001777 -0.2111 [11,] 0.01465 0.002709 -0.9817 [12,] -0.01065 0.003278 0.7839 PrivateWages_gnp PrivateWages_gnpLag PrivateWages_trend [1,] 0.297134 0.25379 0.19157 [2,] -0.052789 0.05334 0.03084 [3,] 0.036177 -0.06435 0.02478 [4,] -0.000206 -0.00206 -0.02716 [5,] 0.265808 -0.60808 -0.54935 [6,] 0.012829 -0.01053 0.00394 [7,] -0.007548 0.01465 -0.01065 [8,] -0.001777 0.00271 0.00328 [9,] -0.211061 -0.98166 0.78387 [10,] 0.039911 -0.03744 -0.00955 [11,] -0.037441 0.05550 -0.00377 [12,] -0.009553 -0.00377 0.04488 > > # 3SLS Warning in systemfit(system, method = method, data = KleinI, inst = inst, : the estimation of systems of equations with unequal numbers of observations has not been thoroughly tested yet > summary systemfit results method: 3SLS N DF SSR detRCov OLS-R2 McElroy-R2 system 57 45 66.8 0.361 0.963 0.993 N DF SSR MSE RMSE R2 Adj R2 Consumption 18 14 22.6 1.616 1.271 0.974 0.968 Investment 19 15 34.1 2.277 1.509 0.807 0.769 PrivateWages 20 16 10.1 0.628 0.793 0.987 0.985 The covariance matrix of the residuals used for estimation Consumption Investment PrivateWages Consumption 1.237 0.518 -0.408 Investment 0.518 1.263 0.113 PrivateWages -0.408 0.113 0.468 The covariance matrix of the residuals Consumption Investment PrivateWages Consumption 1.257 0.601 -0.421 Investment 0.601 1.601 0.214 PrivateWages -0.421 0.214 0.491 The correlations of the residuals Consumption Investment PrivateWages Consumption 1.000 0.425 -0.537 Investment 0.425 1.000 0.239 PrivateWages -0.537 0.239 1.000 3SLS estimates for 'Consumption' (equation 1) Model Formula: consump ~ corpProf + corpProfLag + wages Instruments: ~govExp + taxes + govWage + trend + capitalLag + corpProfLag + gnpLag Estimate Std. Error t value Pr(>|t|) (Intercept) 18.2100 1.5273 11.92 1e-08 *** corpProf -0.0639 0.1461 -0.44 0.67 corpProfLag 0.1687 0.1125 1.50 0.16 wages 0.8230 0.0431 19.07 2e-11 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.271 on 14 degrees of freedom Number of observations: 18 Degrees of Freedom: 14 SSR: 22.626 MSE: 1.616 Root MSE: 1.271 Multiple R-Squared: 0.974 Adjusted R-Squared: 0.968 3SLS estimates for 'Investment' (equation 2) Model Formula: invest ~ corpProf + corpProfLag + capitalLag Instruments: ~govExp + taxes + govWage + trend + capitalLag + corpProfLag + gnpLag Estimate Std. Error t value Pr(>|t|) (Intercept) 24.7534 6.5548 3.78 0.00183 ** corpProf 0.0524 0.1807 0.29 0.77600 corpProfLag 0.6584 0.1551 4.24 0.00071 *** capitalLag -0.1756 0.0311 -5.64 4.7e-05 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.509 on 15 degrees of freedom Number of observations: 19 Degrees of Freedom: 15 SSR: 34.149 MSE: 2.277 Root MSE: 1.509 Multiple R-Squared: 0.807 Adjusted R-Squared: 0.769 3SLS estimates for 'PrivateWages' (equation 3) Model Formula: privWage ~ gnp + gnpLag + trend Instruments: ~govExp + taxes + govWage + trend + capitalLag + corpProfLag + gnpLag Estimate Std. Error t value Pr(>|t|) (Intercept) 0.8154 1.0961 0.74 0.46772 gnp 0.4250 0.0299 14.19 1.7e-10 *** gnpLag 0.1731 0.0331 5.23 8.3e-05 *** trend 0.1255 0.0283 4.43 0.00042 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 0.793 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 10.054 MSE: 0.628 Root MSE: 0.793 Multiple R-Squared: 0.987 Adjusted R-Squared: 0.985 > residuals Consumption Investment PrivateWages 1 NA NA NA 2 -0.8680 -1.857 -1.21010 3 -0.7217 0.170 0.43075 4 -1.1353 0.762 1.30899 5 0.0755 -1.565 -0.20270 6 0.6348 0.367 -0.46842 7 NA NA NA 8 1.7953 1.230 -0.85853 9 1.7924 0.568 0.20422 10 NA 2.308 1.09889 11 -0.5211 -0.972 -0.39427 12 -1.5560 -0.960 0.39889 13 NA NA -0.00934 14 -0.2384 1.327 0.59990 15 -0.7342 -0.292 0.48094 16 -0.4331 0.068 0.16188 17 1.8775 1.932 -0.70448 18 -0.6294 -0.154 0.95616 19 -0.4252 -3.400 -0.62489 20 1.3682 0.589 -0.29589 21 1.3155 0.271 -1.14466 22 -1.4276 0.942 0.55941 > fitted Consumption Investment PrivateWages 1 NA NA NA 2 42.8 1.657 26.7 3 45.7 1.730 28.9 4 50.3 4.438 32.8 5 50.5 4.565 34.1 6 52.0 4.733 35.9 7 NA NA NA 8 54.4 2.970 38.8 9 55.5 2.432 39.0 10 NA 2.792 40.2 11 55.5 1.972 38.3 12 52.5 -2.440 34.1 13 NA NA 29.0 14 46.7 -6.427 27.9 15 49.4 -2.708 30.1 16 51.7 -1.368 33.0 17 55.8 0.168 37.5 18 59.3 2.154 40.0 19 57.9 1.500 38.8 20 60.2 0.711 41.9 21 63.7 3.029 46.1 22 71.1 3.958 52.7 > predict Consumption.pred Consumption.se.fit Consumption.lwr Consumption.upr 1 NA NA NA NA 2 42.8 0.542 39.8 45.7 3 45.7 0.612 42.7 48.7 4 50.3 0.407 47.5 53.2 5 50.5 0.478 47.6 53.4 6 52.0 0.488 49.0 54.9 7 NA NA NA NA 8 54.4 0.394 51.5 57.3 9 55.5 0.464 52.6 58.4 10 NA NA NA NA 11 55.5 0.811 52.3 58.8 12 52.5 0.773 49.3 55.6 13 NA NA NA NA 14 46.7 0.666 43.7 49.8 15 49.4 0.463 46.5 52.3 16 51.7 0.381 48.9 54.6 17 55.8 0.424 52.9 58.7 18 59.3 0.359 56.5 62.2 19 57.9 0.492 55.0 60.8 20 60.2 0.501 57.3 63.2 21 63.7 0.491 60.8 66.6 22 71.1 0.749 68.0 74.3 Investment.pred Investment.se.fit Investment.lwr Investment.upr 1 NA NA NA NA 2 1.657 0.831 -2.015 5.329 3 1.730 0.574 -1.711 5.171 4 4.438 0.507 1.045 7.831 5 4.565 0.426 1.223 7.907 6 4.733 0.406 1.402 8.064 7 NA NA NA NA 8 2.970 0.334 -0.324 6.263 9 2.432 0.501 -0.957 5.820 10 2.792 0.544 -0.627 6.211 11 1.972 0.937 -1.814 5.757 12 -2.440 0.849 -6.131 1.250 13 NA NA NA NA 14 -6.427 0.836 -10.104 -2.750 15 -2.708 0.477 -6.081 0.665 16 -1.368 0.381 -4.685 1.949 17 0.168 0.473 -3.202 3.538 18 2.154 0.311 -1.130 5.438 19 1.500 0.518 -1.900 4.900 20 0.711 0.541 -2.705 4.127 21 3.029 0.467 -0.338 6.395 22 3.958 0.677 0.432 7.483 PrivateWages.pred PrivateWages.se.fit PrivateWages.lwr PrivateWages.upr 1 NA NA NA NA 2 26.7 0.315 24.9 28.5 3 28.9 0.322 27.1 30.7 4 32.8 0.330 31.0 34.6 5 34.1 0.241 32.3 35.9 6 35.9 0.249 34.1 37.6 7 NA NA NA NA 8 38.8 0.243 37.0 40.5 9 39.0 0.231 37.2 40.7 10 40.2 0.225 38.5 41.9 11 38.3 0.305 36.5 40.1 12 34.1 0.317 32.3 35.9 13 29.0 0.382 27.1 30.9 14 27.9 0.321 26.1 29.7 15 30.1 0.316 28.3 31.9 16 33.0 0.265 31.3 34.8 17 37.5 0.270 35.7 39.3 18 40.0 0.207 38.3 41.8 19 38.8 0.311 37.0 40.6 20 41.9 0.287 40.1 43.7 21 46.1 0.300 44.3 47.9 22 52.7 0.463 50.8 54.7 > model.frame [1] TRUE > model.matrix [1] "Attributes: < Component \"dim\": Mean relative difference: 0.0339 >" [2] "Attributes: < Component \"dimnames\": Component 1: 52 string mismatches >" [3] "Numeric: lengths (708, 684) differ" > nobs [1] 57 > linearHypothesis Linear hypothesis test (Theil's F test) Hypothesis: Consumption_corpProf + Investment_capitalLag = 0 Model 1: restricted model Model 2: kleinModel Res.Df Df F Pr(>F) 1 46 2 45 1 1.95 0.17 Linear hypothesis test (F statistic of a Wald test) Hypothesis: Consumption_corpProf + Investment_capitalLag = 0 Model 1: restricted model Model 2: kleinModel Res.Df Df F Pr(>F) 1 46 2 45 1 2.71 0.11 Linear hypothesis test (Chi^2 statistic of a Wald test) Hypothesis: Consumption_corpProf + Investment_capitalLag = 0 Model 1: restricted model Model 2: kleinModel Res.Df Df Chisq Pr(>Chisq) 1 46 2 45 1 2.71 0.1 . --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Linear hypothesis test (Theil's F test) Hypothesis: Consumption_corpProf + Investment_capitalLag = 0 Consumption_corpProfLag - PrivateWages_trend = 0 Model 1: restricted model Model 2: kleinModel Res.Df Df F Pr(>F) 1 47 2 45 2 1.78 0.18 Linear hypothesis test (F statistic of a Wald test) Hypothesis: Consumption_corpProf + Investment_capitalLag = 0 Consumption_corpProfLag - PrivateWages_trend = 0 Model 1: restricted model Model 2: kleinModel Res.Df Df F Pr(>F) 1 47 2 45 2 2.48 0.095 . --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Linear hypothesis test (Chi^2 statistic of a Wald test) Hypothesis: Consumption_corpProf + Investment_capitalLag = 0 Consumption_corpProfLag - PrivateWages_trend = 0 Model 1: restricted model Model 2: kleinModel Res.Df Df Chisq Pr(>Chisq) 1 47 2 45 2 4.95 0.084 . --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 > logLik 'log Lik.' -71.2 (df=18) 'log Lik.' -81.7 (df=18) Estimating function Consumption_(Intercept) Consumption_corpProf Consumption_2 -3.6474 -51.112 Consumption_3 -0.7759 -12.930 Consumption_4 0.5383 9.982 Consumption_5 -2.0601 -41.756 Consumption_6 1.0597 20.157 Consumption_8 5.0108 88.416 Consumption_9 4.4804 84.874 Consumption_11 -2.2103 -37.003 Consumption_12 -2.9903 -39.999 Consumption_14 0.5609 5.622 Consumption_15 -2.2997 -28.756 Consumption_16 -1.9032 -27.562 Consumption_17 6.4249 95.811 Consumption_18 -0.7235 -14.050 Consumption_19 -5.0805 -97.079 Consumption_20 3.4333 60.632 Consumption_21 1.6077 32.791 Consumption_22 -1.1313 -25.654 Investment_2 1.6537 23.174 Investment_3 -0.1564 -2.607 Investment_4 -0.6420 -11.906 Investment_5 1.4113 28.605 Investment_6 -0.3557 -6.767 Investment_8 -1.1680 -20.610 Investment_9 -0.5634 -10.672 Investment_10 0.0000 0.000 Investment_11 0.9137 15.295 Investment_12 0.9272 12.402 Investment_14 -1.2036 -12.064 Investment_15 0.2779 3.475 Investment_16 -0.0439 -0.636 Investment_17 -1.7918 -26.720 Investment_18 0.2271 4.411 Investment_19 3.1278 59.767 Investment_20 -0.5790 -10.225 Investment_21 -0.2789 -5.690 Investment_22 -0.8484 -19.238 PrivateWages_2 -3.1568 -44.237 PrivateWages_3 1.1209 18.679 PrivateWages_4 2.7328 50.677 PrivateWages_5 -2.9712 -60.223 PrivateWages_6 -0.5212 -9.913 PrivateWages_8 1.7420 30.738 PrivateWages_9 1.9832 37.569 PrivateWages_10 0.0000 0.000 PrivateWages_11 -2.5151 -42.105 PrivateWages_12 -0.3611 -4.830 PrivateWages_13 0.0000 0.000 PrivateWages_14 3.2055 32.130 PrivateWages_15 -0.2814 -3.519 PrivateWages_16 -0.4078 -5.906 PrivateWages_17 2.6678 39.784 PrivateWages_18 0.0554 1.076 PrivateWages_19 -6.6416 -126.909 PrivateWages_20 1.4327 25.301 PrivateWages_21 -1.3598 -27.735 PrivateWages_22 2.0747 47.044 Consumption_corpProfLag Consumption_wages Consumption_2 -46.322 -108.77 Consumption_3 -9.621 -24.71 Consumption_4 9.097 18.98 Consumption_5 -37.905 -79.52 Consumption_6 20.558 40.85 Consumption_8 98.211 200.48 Consumption_9 88.711 187.18 Consumption_11 -47.964 -95.27 Consumption_12 -46.648 -118.58 Consumption_14 3.926 18.69 Consumption_15 -25.757 -85.85 Consumption_16 -23.410 -76.40 Consumption_17 89.949 268.43 Consumption_18 -12.733 -34.44 Consumption_19 -87.892 -250.13 Consumption_20 52.529 166.71 Consumption_21 30.546 85.88 Consumption_22 -23.871 -68.78 Investment_2 21.002 49.32 Investment_3 -1.940 -4.98 Investment_4 -10.851 -22.64 Investment_5 25.967 54.47 Investment_6 -6.901 -13.71 Investment_8 -22.893 -46.73 Investment_9 -11.154 -23.53 Investment_10 0.000 0.00 Investment_11 19.827 39.38 Investment_12 14.464 36.77 Investment_14 -8.425 -40.11 Investment_15 3.113 10.38 Investment_16 -0.540 -1.76 Investment_17 -25.085 -74.86 Investment_18 3.997 10.81 Investment_19 54.111 153.99 Investment_20 -8.858 -28.11 Investment_21 -5.300 -14.90 Investment_22 -17.901 -51.58 PrivateWages_2 -40.091 -94.14 PrivateWages_3 13.899 35.70 PrivateWages_4 46.184 96.34 PrivateWages_5 -54.670 -114.69 PrivateWages_6 -10.110 -20.09 PrivateWages_8 34.144 69.70 PrivateWages_9 39.267 82.85 PrivateWages_10 0.000 0.00 PrivateWages_11 -54.578 -108.40 PrivateWages_12 -5.633 -14.32 PrivateWages_13 0.000 0.00 PrivateWages_14 22.438 106.83 PrivateWages_15 -3.152 -10.51 PrivateWages_16 -5.016 -16.37 PrivateWages_17 37.350 111.46 PrivateWages_18 0.975 2.64 PrivateWages_19 -114.899 -326.98 PrivateWages_20 21.920 69.57 PrivateWages_21 -25.836 -72.64 PrivateWages_22 43.775 126.12 Investment_(Intercept) Investment_corpProf Consumption_2 1.8176 24.384 Consumption_3 0.3867 6.453 Consumption_4 -0.2682 -5.040 Consumption_5 1.0266 21.198 Consumption_6 -0.5281 -10.172 Consumption_8 -2.4970 -43.782 Consumption_9 -2.2327 -43.602 Consumption_11 1.1015 18.940 Consumption_12 1.4902 20.151 Consumption_14 -0.2795 -2.793 Consumption_15 1.1460 14.736 Consumption_16 0.9485 13.590 Consumption_17 -3.2018 -47.918 Consumption_18 0.3605 6.983 Consumption_19 2.5318 49.008 Consumption_20 -1.7109 -29.898 Consumption_21 -0.8012 -16.122 Consumption_22 0.5638 12.844 Investment_2 -2.3696 -31.787 Investment_3 0.2241 3.741 Investment_4 0.9200 17.284 Investment_5 -2.0221 -41.754 Investment_6 0.5097 9.819 Investment_8 1.6736 29.344 Investment_9 0.8072 15.764 Investment_10 2.9560 59.913 Investment_11 -1.3092 -22.510 Investment_12 -1.3285 -17.964 Investment_14 1.7246 17.233 Investment_15 -0.3982 -5.120 Investment_16 0.0630 0.902 Investment_17 2.5674 38.424 Investment_18 -0.3254 -6.303 Investment_19 -4.4817 -86.752 Investment_20 0.8296 14.497 Investment_21 0.3997 8.043 Investment_22 1.2156 27.693 PrivateWages_2 1.9315 25.910 PrivateWages_3 -0.6858 -11.446 PrivateWages_4 -1.6720 -31.413 PrivateWages_5 1.8179 37.537 PrivateWages_6 0.3189 6.142 PrivateWages_8 -1.0659 -18.688 PrivateWages_9 -1.2134 -23.696 PrivateWages_10 -2.2443 -45.488 PrivateWages_11 1.5389 26.460 PrivateWages_12 0.2209 2.988 PrivateWages_13 0.0000 0.000 PrivateWages_14 -1.9613 -19.598 PrivateWages_15 0.1722 2.214 PrivateWages_16 0.2495 3.576 PrivateWages_17 -1.6323 -24.429 PrivateWages_18 -0.0339 -0.657 PrivateWages_19 4.0636 78.659 PrivateWages_20 -0.8766 -15.318 PrivateWages_21 0.8320 16.742 PrivateWages_22 -1.2694 -28.917 Investment_corpProfLag Investment_capitalLag Consumption_2 23.084 332.27 Consumption_3 4.795 70.60 Consumption_4 -4.533 -49.49 Consumption_5 18.890 194.75 Consumption_6 -10.245 -101.76 Consumption_8 -48.942 -507.90 Consumption_9 -44.208 -463.52 Consumption_11 23.902 237.59 Consumption_12 23.247 322.92 Consumption_14 -1.957 -57.89 Consumption_15 12.836 231.50 Consumption_16 11.666 188.74 Consumption_17 -44.825 -632.99 Consumption_18 6.345 72.04 Consumption_19 43.800 510.92 Consumption_20 -26.177 -342.01 Consumption_21 -15.222 -161.20 Consumption_22 11.896 115.30 Investment_2 -30.093 -433.16 Investment_3 2.779 40.93 Investment_4 15.547 169.73 Investment_5 -37.208 -383.60 Investment_6 9.888 98.22 Investment_8 32.803 340.41 Investment_9 15.983 167.58 Investment_10 62.371 622.53 Investment_11 -28.409 -282.39 Investment_12 -20.724 -287.88 Investment_14 12.072 357.16 Investment_15 -4.460 -80.44 Investment_16 0.774 12.53 Investment_17 35.944 507.58 Investment_18 -5.727 -65.02 Investment_19 -77.534 -904.41 Investment_20 12.693 165.84 Investment_21 7.594 80.42 Investment_22 25.650 248.60 PrivateWages_2 24.530 353.07 PrivateWages_3 -8.504 -125.23 PrivateWages_4 -28.257 -308.49 PrivateWages_5 33.450 344.86 PrivateWages_6 6.186 61.45 PrivateWages_8 -20.891 -216.79 PrivateWages_9 -24.025 -251.90 PrivateWages_10 -47.355 -472.65 PrivateWages_11 33.393 331.93 PrivateWages_12 3.447 47.88 PrivateWages_13 0.000 0.00 PrivateWages_14 -13.729 -406.18 PrivateWages_15 1.929 34.78 PrivateWages_16 3.069 49.66 PrivateWages_17 -22.852 -322.71 PrivateWages_18 -0.597 -6.77 PrivateWages_19 70.300 820.04 PrivateWages_20 -13.412 -175.23 PrivateWages_21 15.807 167.39 PrivateWages_22 -26.784 -259.59 PrivateWages_(Intercept) PrivateWages_gnp PrivateWages_gnpLag Consumption_2 -3.6123 -170.03 -162.19 Consumption_3 -0.7684 -38.10 -35.04 Consumption_4 0.5331 30.14 26.71 Consumption_5 -2.0403 -123.82 -116.70 Consumption_6 1.0495 63.61 59.93 Consumption_8 4.9625 297.74 317.60 Consumption_9 4.4373 276.30 285.76 Consumption_11 -2.1891 -139.47 -146.67 Consumption_12 -2.9615 -162.39 -181.24 Consumption_14 0.5555 23.40 24.61 Consumption_15 -2.2776 -116.65 -102.72 Consumption_16 -1.8849 -104.31 -93.68 Consumption_17 6.3631 365.20 346.15 Consumption_18 -0.7165 -48.13 -44.93 Consumption_19 -5.0316 -344.73 -327.05 Consumption_20 3.4002 227.29 207.07 Consumption_21 1.5922 119.20 110.66 Consumption_22 -1.1205 -97.34 -84.82 Investment_2 2.0108 94.65 90.29 Investment_3 -0.1902 -9.43 -8.67 Investment_4 -0.7807 -44.14 -39.11 Investment_5 1.7160 104.14 98.16 Investment_6 -0.4326 -26.22 -24.70 Investment_8 -1.4203 -85.21 -90.90 Investment_9 -0.6850 -42.65 -44.11 Investment_10 -2.5085 -161.97 -161.80 Investment_11 1.1110 70.78 74.44 Investment_12 1.1274 61.82 69.00 Investment_14 -1.4635 -61.65 -64.83 Investment_15 0.3379 17.31 15.24 Investment_16 -0.0534 -2.96 -2.66 Investment_17 -2.1788 -125.05 -118.52 Investment_18 0.2762 18.55 17.32 Investment_19 3.8033 260.57 247.21 Investment_20 -0.7040 -47.06 -42.87 Investment_21 -0.3392 -25.39 -23.57 Investment_22 -1.0316 -89.62 -78.09 PrivateWages_2 -7.1301 -335.61 -320.14 PrivateWages_3 2.5317 125.52 115.44 PrivateWages_4 6.1723 349.00 309.23 PrivateWages_5 -6.7109 -407.26 -383.86 PrivateWages_6 -1.1771 -71.34 -67.21 PrivateWages_8 3.9346 236.07 251.82 PrivateWages_9 4.4793 278.92 288.47 PrivateWages_10 8.2849 534.95 534.38 PrivateWages_11 -5.6807 -361.93 -380.61 PrivateWages_12 -0.8156 -44.72 -49.92 PrivateWages_13 -4.4579 -209.42 -238.05 PrivateWages_14 7.2401 305.01 320.74 PrivateWages_15 -0.6357 -32.56 -28.67 PrivateWages_16 -0.9212 -50.98 -45.78 PrivateWages_17 6.0257 345.84 327.80 PrivateWages_18 0.1252 8.41 7.85 PrivateWages_19 -15.0009 -1027.75 -975.06 PrivateWages_20 3.2360 216.31 197.07 PrivateWages_21 -3.0713 -229.93 -213.45 PrivateWages_22 4.6859 407.11 354.72 PrivateWages_trend Consumption_2 36.123 Consumption_3 6.916 Consumption_4 -4.265 Consumption_5 14.282 Consumption_6 -6.297 Consumption_8 -19.850 Consumption_9 -13.312 Consumption_11 2.189 Consumption_12 0.000 Consumption_14 1.111 Consumption_15 -6.833 Consumption_16 -7.540 Consumption_17 31.815 Consumption_18 -4.299 Consumption_19 -35.221 Consumption_20 27.202 Consumption_21 14.330 Consumption_22 -11.205 Investment_2 -20.108 Investment_3 1.712 Investment_4 6.246 Investment_5 -12.012 Investment_6 2.595 Investment_8 5.681 Investment_9 2.055 Investment_10 5.017 Investment_11 -1.111 Investment_12 0.000 Investment_14 -2.927 Investment_15 1.014 Investment_16 -0.214 Investment_17 -10.894 Investment_18 1.657 Investment_19 26.623 Investment_20 -5.632 Investment_21 -3.053 Investment_22 -10.316 PrivateWages_2 71.301 PrivateWages_3 -22.785 PrivateWages_4 -49.379 PrivateWages_5 46.976 PrivateWages_6 7.063 PrivateWages_8 -15.738 PrivateWages_9 -13.438 PrivateWages_10 -16.570 PrivateWages_11 5.681 PrivateWages_12 0.000 PrivateWages_13 -4.458 PrivateWages_14 14.480 PrivateWages_15 -1.907 PrivateWages_16 -3.685 PrivateWages_17 30.129 PrivateWages_18 0.751 PrivateWages_19 -105.007 PrivateWages_20 25.888 PrivateWages_21 -27.641 PrivateWages_22 46.859 [1] TRUE > Bread Consumption_(Intercept) Consumption_corpProf Consumption_corpProfLag [1,] 132.9647 -4.1876 0.7762 [2,] -4.1876 1.2160 -0.6687 [3,] 0.7762 -0.6687 0.7219 [4,] -1.6897 -0.1344 -0.0278 [5,] 101.6483 3.2473 3.4997 [6,] -4.3150 0.5140 -0.4474 [7,] 1.5566 -0.3374 0.4240 [8,] -0.2539 -0.0329 -0.0138 [9,] -35.7522 0.3296 1.6708 [10,] 0.5355 -0.0797 0.0478 [11,] 0.0459 0.0759 -0.0780 [12,] 0.1973 0.0481 0.0250 Consumption_wages Investment_(Intercept) Investment_corpProf [1,] -1.689687 101.65 -4.32e+00 [2,] -0.134421 3.25 5.14e-01 [3,] -0.027837 3.50 -4.47e-01 [4,] 0.106098 -5.00 6.63e-02 [5,] -4.996393 2449.02 -4.26e+01 [6,] 0.066338 -42.57 1.86e+00 [7,] -0.064579 34.21 -1.44e+00 [8,] 0.024569 -11.36 1.70e-01 [9,] 0.047220 27.91 -2.66e-01 [10,] 0.000172 1.31 3.12e-04 [11,] -0.000827 -1.84 4.41e-03 [12,] -0.034079 -0.80 1.58e-02 Investment_corpProfLag Investment_capitalLag PrivateWages_(Intercept) [1,] 1.55659 -0.25392 -35.7522 [2,] -0.33742 -0.03292 0.3296 [3,] 0.42396 -0.01383 1.6708 [4,] -0.06458 0.02457 0.0472 [5,] 34.20897 -11.35519 27.9136 [6,] -1.43523 0.17002 -0.2656 [7,] 1.37137 -0.15991 -0.3976 [8,] -0.15991 0.05521 -0.0847 [9,] -0.39759 -0.08475 68.4821 [10,] 0.00601 -0.00701 -0.3279 [11,] 0.00088 0.00875 -0.8283 [12,] -0.02279 0.00445 0.7887 PrivateWages_gnp PrivateWages_gnpLag PrivateWages_trend [1,] 0.535460 0.045866 0.197271 [2,] -0.079666 0.075947 0.048142 [3,] 0.047829 -0.078006 0.025001 [4,] 0.000172 -0.000827 -0.034079 [5,] 1.306914 -1.841775 -0.800037 [6,] 0.000312 0.004408 0.015824 [7,] 0.006007 0.000880 -0.022790 [8,] -0.007006 0.008751 0.004448 [9,] -0.327909 -0.828330 0.788744 [10,] 0.051096 -0.046839 -0.013933 [11,] -0.046839 0.062505 0.000532 [12,] -0.013933 0.000532 0.045663 > > # I3SLS Warning in systemfit(system, method = method, data = KleinI, inst = inst, : the estimation of systems of equations with unequal numbers of observations has not been thoroughly tested yet > summary systemfit results method: iterated 3SLS convergence achieved after 9 iterations N DF SSR detRCov OLS-R2 McElroy-R2 system 57 45 75 0.422 0.959 0.993 N DF SSR MSE RMSE R2 Adj R2 Consumption 18 14 22.7 1.622 1.273 0.973 0.968 Investment 19 15 42.1 2.809 1.676 0.762 0.715 PrivateWages 20 16 10.2 0.638 0.799 0.987 0.985 The covariance matrix of the residuals used for estimation Consumption Investment PrivateWages Consumption 1.261 0.675 -0.439 Investment 0.675 1.949 0.237 PrivateWages -0.439 0.237 0.503 The covariance matrix of the residuals Consumption Investment PrivateWages Consumption 1.261 0.675 -0.439 Investment 0.675 1.949 0.237 PrivateWages -0.439 0.237 0.503 The correlations of the residuals Consumption Investment PrivateWages Consumption 1.000 0.431 -0.550 Investment 0.431 1.000 0.239 PrivateWages -0.550 0.239 1.000 3SLS estimates for 'Consumption' (equation 1) Model Formula: consump ~ corpProf + corpProfLag + wages Instruments: ~govExp + taxes + govWage + trend + capitalLag + corpProfLag + gnpLag Estimate Std. Error t value Pr(>|t|) (Intercept) 18.5887 1.5250 12.19 7.6e-09 *** corpProf -0.0438 0.1441 -0.30 0.77 corpProfLag 0.1456 0.1109 1.31 0.21 wages 0.8141 0.0428 19.01 2.1e-11 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.273 on 14 degrees of freedom Number of observations: 18 Degrees of Freedom: 14 SSR: 22.704 MSE: 1.622 Root MSE: 1.273 Multiple R-Squared: 0.973 Adjusted R-Squared: 0.968 3SLS estimates for 'Investment' (equation 2) Model Formula: invest ~ corpProf + corpProfLag + capitalLag Instruments: ~govExp + taxes + govWage + trend + capitalLag + corpProfLag + gnpLag Estimate Std. Error t value Pr(>|t|) (Intercept) 29.4725 7.6857 3.83 0.0016 ** corpProf -0.0183 0.2154 -0.09 0.9333 corpProfLag 0.7195 0.1850 3.89 0.0015 ** capitalLag -0.1985 0.0366 -5.43 6.9e-05 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.676 on 15 degrees of freedom Number of observations: 19 Degrees of Freedom: 15 SSR: 42.136 MSE: 2.809 Root MSE: 1.676 Multiple R-Squared: 0.762 Adjusted R-Squared: 0.715 3SLS estimates for 'PrivateWages' (equation 3) Model Formula: privWage ~ gnp + gnpLag + trend Instruments: ~govExp + taxes + govWage + trend + capitalLag + corpProfLag + gnpLag Estimate Std. Error t value Pr(>|t|) (Intercept) 0.5385 1.1055 0.49 0.63277 gnp 0.4251 0.0287 14.80 9.3e-11 *** gnpLag 0.1776 0.0322 5.51 4.7e-05 *** trend 0.1211 0.0283 4.28 0.00057 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 0.799 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 10.204 MSE: 0.638 Root MSE: 0.799 Multiple R-Squared: 0.987 Adjusted R-Squared: 0.985 > residuals Consumption Investment PrivateWages 1 NA NA NA 2 -0.9524 -2.2888 -1.1837 3 -0.8681 0.0698 0.4581 4 -1.1653 0.5368 1.3199 5 0.0601 -1.6917 -0.2194 6 0.6426 0.2972 -0.4805 7 NA NA NA 8 1.8394 1.3723 -0.8931 9 1.8275 0.8861 0.1723 10 NA 2.6574 1.0707 11 -0.3387 -0.9736 -0.4288 12 -1.4550 -0.8630 0.3956 13 NA NA 0.0277 14 -0.3782 1.7151 0.6823 15 -0.7768 -0.1993 0.5638 16 -0.4606 0.1448 0.2281 17 1.8605 2.1295 -0.6557 18 -0.5262 -0.1493 0.9718 19 -0.3047 -3.4730 -0.6148 20 1.3992 0.8566 -0.2636 21 1.4216 0.4910 -1.1472 22 -1.2431 1.2792 0.5323 > fitted Consumption Investment PrivateWages 1 NA NA NA 2 42.9 2.0888 26.7 3 45.9 1.8302 28.8 4 50.4 4.6632 32.8 5 50.5 4.6917 34.1 6 52.0 4.8028 35.9 7 NA NA NA 8 54.4 2.8277 38.8 9 55.5 2.1139 39.0 10 NA 2.4426 40.2 11 55.3 1.9736 38.3 12 52.4 -2.5370 34.1 13 NA NA 29.0 14 46.9 -6.8151 27.8 15 49.5 -2.8007 30.0 16 51.8 -1.4448 33.0 17 55.8 -0.0295 37.5 18 59.2 2.1493 40.0 19 57.8 1.5730 38.8 20 60.2 0.4434 41.9 21 63.6 2.8090 46.1 22 70.9 3.6208 52.8 > predict Consumption.pred Consumption.se.fit Consumption.lwr Consumption.upr 1 NA NA NA NA 2 42.9 0.541 41.8 43.9 3 45.9 0.608 44.6 47.1 4 50.4 0.403 49.6 51.2 5 50.5 0.472 49.6 51.5 6 52.0 0.481 51.0 52.9 7 NA NA NA NA 8 54.4 0.388 53.6 55.1 9 55.5 0.458 54.6 56.4 10 NA NA NA NA 11 55.3 0.795 53.7 56.9 12 52.4 0.762 50.8 53.9 13 NA NA NA NA 14 46.9 0.663 45.5 48.2 15 49.5 0.462 48.5 50.4 16 51.8 0.381 51.0 52.5 17 55.8 0.423 55.0 56.7 18 59.2 0.355 58.5 59.9 19 57.8 0.484 56.8 58.8 20 60.2 0.500 59.2 61.2 21 63.6 0.490 62.6 64.6 22 70.9 0.747 69.4 72.4 Investment.pred Investment.se.fit Investment.lwr Investment.upr 1 NA NA NA NA 2 2.0888 0.985 0.105 4.072 3 1.8302 0.708 0.404 3.257 4 4.6632 0.612 3.430 5.897 5 4.6917 0.519 3.645 5.738 6 4.8028 0.498 3.800 5.806 7 NA NA NA NA 8 2.8277 0.410 2.003 3.653 9 2.1139 0.599 0.908 3.320 10 2.4426 0.651 1.131 3.754 11 1.9736 1.138 -0.320 4.267 12 -2.5370 1.038 -4.627 -0.447 13 NA NA NA NA 14 -6.8151 1.011 -8.851 -4.779 15 -2.8007 0.587 -3.984 -1.617 16 -1.4448 0.470 -2.392 -0.498 17 -0.0295 0.573 -1.183 1.124 18 2.1493 0.380 1.384 2.915 19 1.5730 0.624 0.315 2.831 20 0.4434 0.649 -0.864 1.751 21 2.8090 0.565 1.671 3.947 22 3.6208 0.814 1.982 5.260 PrivateWages.pred PrivateWages.se.fit PrivateWages.lwr PrivateWages.upr 1 NA NA NA NA 2 26.7 0.322 26.0 27.3 3 28.8 0.328 28.2 29.5 4 32.8 0.332 32.1 33.4 5 34.1 0.244 33.6 34.6 6 35.9 0.252 35.4 36.4 7 NA NA NA NA 8 38.8 0.246 38.3 39.3 9 39.0 0.234 38.6 39.5 10 40.2 0.230 39.8 40.7 11 38.3 0.299 37.7 38.9 12 34.1 0.304 33.5 34.7 13 29.0 0.366 28.2 29.7 14 27.8 0.321 27.2 28.5 15 30.0 0.317 29.4 30.7 16 33.0 0.266 32.4 33.5 17 37.5 0.270 36.9 38.0 18 40.0 0.211 39.6 40.5 19 38.8 0.305 38.2 39.4 20 41.9 0.290 41.3 42.4 21 46.1 0.309 45.5 46.8 22 52.8 0.468 51.8 53.7 > model.frame [1] TRUE > model.matrix [1] "Attributes: < Component \"dim\": Mean relative difference: 0.0339 >" [2] "Attributes: < Component \"dimnames\": Component 1: 52 string mismatches >" [3] "Numeric: lengths (708, 684) differ" > nobs [1] 57 > linearHypothesis Linear hypothesis test (Theil's F test) Hypothesis: Consumption_corpProf + Investment_capitalLag = 0 Model 1: restricted model Model 2: kleinModel Res.Df Df F Pr(>F) 1 46 2 45 1 2.17 0.15 Linear hypothesis test (F statistic of a Wald test) Hypothesis: Consumption_corpProf + Investment_capitalLag = 0 Model 1: restricted model Model 2: kleinModel Res.Df Df F Pr(>F) 1 46 2 45 1 2.84 0.099 . --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Linear hypothesis test (Chi^2 statistic of a Wald test) Hypothesis: Consumption_corpProf + Investment_capitalLag = 0 Model 1: restricted model Model 2: kleinModel Res.Df Df Chisq Pr(>Chisq) 1 46 2 45 1 2.84 0.092 . --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Linear hypothesis test (Theil's F test) Hypothesis: Consumption_corpProf + Investment_capitalLag = 0 Consumption_corpProfLag - PrivateWages_trend = 0 Model 1: restricted model Model 2: kleinModel Res.Df Df F Pr(>F) 1 47 2 45 2 2.45 0.098 . --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Linear hypothesis test (F statistic of a Wald test) Hypothesis: Consumption_corpProf + Investment_capitalLag = 0 Consumption_corpProfLag - PrivateWages_trend = 0 Model 1: restricted model Model 2: kleinModel Res.Df Df F Pr(>F) 1 47 2 45 2 3.2 0.05 . --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Linear hypothesis test (Chi^2 statistic of a Wald test) Hypothesis: Consumption_corpProf + Investment_capitalLag = 0 Consumption_corpProfLag - PrivateWages_trend = 0 Model 1: restricted model Model 2: kleinModel Res.Df Df Chisq Pr(>Chisq) 1 47 2 45 2 6.4 0.041 * --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 > logLik 'log Lik.' -72.7 (df=18) 'log Lik.' -83.9 (df=18) Estimating function Consumption_(Intercept) Consumption_corpProf Consumption_2 -4.8293 -67.67 Consumption_3 -1.2969 -21.61 Consumption_4 0.5735 10.64 Consumption_5 -2.6416 -53.54 Consumption_6 1.4014 26.66 Consumption_8 6.4885 114.49 Consumption_9 5.8062 109.99 Consumption_11 -2.4210 -40.53 Consumption_12 -3.6335 -48.60 Consumption_14 0.4385 4.39 Consumption_15 -2.9914 -37.40 Consumption_16 -2.4677 -35.74 Consumption_17 8.1448 121.46 Consumption_18 -0.7823 -15.19 Consumption_19 -6.2524 -119.47 Consumption_20 4.4447 78.49 Consumption_21 2.3016 46.94 Consumption_22 -1.0069 -22.83 Investment_2 2.3888 33.48 Investment_3 -0.0694 -1.16 Investment_4 -0.5723 -10.61 Investment_5 1.7561 35.59 Investment_6 -0.2966 -5.64 Investment_8 -1.4003 -24.71 Investment_9 -0.9021 -17.09 Investment_10 0.0000 0.00 Investment_11 0.9937 16.63 Investment_12 0.8671 11.60 Investment_14 -1.7814 -17.86 Investment_15 0.1989 2.49 Investment_16 -0.1587 -2.30 Investment_17 -2.1900 -32.66 Investment_18 0.1172 2.28 Investment_19 3.5762 68.34 Investment_20 -0.8719 -15.40 Investment_21 -0.4978 -10.15 Investment_22 -1.3322 -30.21 PrivateWages_2 -4.3522 -60.99 PrivateWages_3 1.6337 27.22 PrivateWages_4 3.8487 71.37 PrivateWages_5 -4.1966 -85.06 PrivateWages_6 -0.7579 -14.42 PrivateWages_8 2.3542 41.54 PrivateWages_9 2.6975 51.10 PrivateWages_10 0.0000 0.00 PrivateWages_11 -3.6015 -60.29 PrivateWages_12 -0.5133 -6.87 PrivateWages_13 0.0000 0.00 PrivateWages_14 4.6825 46.94 PrivateWages_15 -0.1944 -2.43 PrivateWages_16 -0.4112 -5.96 PrivateWages_17 3.8500 57.41 PrivateWages_18 0.1148 2.23 PrivateWages_19 -9.2669 -177.08 PrivateWages_20 2.0821 36.77 PrivateWages_21 -1.9079 -38.91 PrivateWages_22 2.8370 64.33 Consumption_corpProfLag Consumption_wages Consumption_2 -61.332 -144.02 Consumption_3 -16.082 -41.30 Consumption_4 9.693 20.22 Consumption_5 -48.605 -101.97 Consumption_6 27.187 54.02 Consumption_8 127.174 259.60 Consumption_9 114.963 242.56 Consumption_11 -52.537 -104.35 Consumption_12 -56.683 -144.08 Consumption_14 3.069 14.61 Consumption_15 -33.504 -111.68 Consumption_16 -30.352 -99.06 Consumption_17 114.027 340.28 Consumption_18 -13.768 -37.24 Consumption_19 -108.167 -307.82 Consumption_20 68.004 215.82 Consumption_21 43.729 122.95 Consumption_22 -21.245 -61.21 Investment_2 30.338 71.24 Investment_3 -0.861 -2.21 Investment_4 -9.672 -20.18 Investment_5 32.311 67.78 Investment_6 -5.754 -11.43 Investment_8 -27.445 -56.02 Investment_9 -17.861 -37.69 Investment_10 0.000 0.00 Investment_11 21.563 42.83 Investment_12 13.527 34.39 Investment_14 -12.470 -59.37 Investment_15 2.228 7.43 Investment_16 -1.952 -6.37 Investment_17 -30.659 -91.49 Investment_18 2.063 5.58 Investment_19 61.869 176.07 Investment_20 -13.340 -42.34 Investment_21 -9.458 -26.59 Investment_22 -28.109 -80.99 PrivateWages_2 -55.273 -129.79 PrivateWages_3 20.257 52.03 PrivateWages_4 65.044 135.69 PrivateWages_5 -77.218 -161.99 PrivateWages_6 -14.704 -29.21 PrivateWages_8 46.143 94.19 PrivateWages_9 53.410 112.69 PrivateWages_10 0.000 0.00 PrivateWages_11 -78.152 -155.23 PrivateWages_12 -8.008 -20.36 PrivateWages_13 0.000 0.00 PrivateWages_14 32.778 156.05 PrivateWages_15 -2.178 -7.26 PrivateWages_16 -5.058 -16.51 PrivateWages_17 53.901 160.85 PrivateWages_18 2.020 5.46 PrivateWages_19 -160.318 -456.23 PrivateWages_20 31.857 101.10 PrivateWages_21 -36.250 -101.92 PrivateWages_22 59.861 172.47 Investment_(Intercept) Investment_corpProf Consumption_2 2.3171 31.08 Consumption_3 0.6223 10.39 Consumption_4 -0.2752 -5.17 Consumption_5 1.2675 26.17 Consumption_6 -0.6724 -12.95 Consumption_8 -3.1132 -54.59 Consumption_9 -2.7858 -54.40 Consumption_11 1.1616 19.97 Consumption_12 1.7434 23.57 Consumption_14 -0.2104 -2.10 Consumption_15 1.4353 18.46 Consumption_16 1.1840 16.97 Consumption_17 -3.9079 -58.49 Consumption_18 0.3753 7.27 Consumption_19 2.9999 58.07 Consumption_20 -2.1326 -37.27 Consumption_21 -1.1043 -22.22 Consumption_22 0.4831 11.01 Investment_2 -2.3817 -31.95 Investment_3 0.0692 1.16 Investment_4 0.5706 10.72 Investment_5 -1.7509 -36.15 Investment_6 0.2957 5.70 Investment_8 1.3961 24.48 Investment_9 0.8994 17.56 Investment_10 2.7604 55.95 Investment_11 -0.9907 -17.04 Investment_12 -0.8646 -11.69 Investment_14 1.7761 17.75 Investment_15 -0.1983 -2.55 Investment_16 0.1582 2.27 Investment_17 2.1835 32.68 Investment_18 -0.1169 -2.26 Investment_19 -3.5657 -69.02 Investment_20 0.8693 15.19 Investment_21 0.4963 9.99 Investment_22 1.3282 30.26 PrivateWages_2 2.5510 34.22 PrivateWages_3 -0.9575 -15.98 PrivateWages_4 -2.2559 -42.38 PrivateWages_5 2.4598 50.79 PrivateWages_6 0.4442 8.56 PrivateWages_8 -1.3799 -24.19 PrivateWages_9 -1.5811 -30.88 PrivateWages_10 -2.9678 -60.15 PrivateWages_11 2.1109 36.30 PrivateWages_12 0.3009 4.07 PrivateWages_13 0.0000 0.00 PrivateWages_14 -2.7446 -27.43 PrivateWages_15 0.1140 1.47 PrivateWages_16 0.2410 3.45 PrivateWages_17 -2.2567 -33.77 PrivateWages_18 -0.0673 -1.30 PrivateWages_19 5.4317 105.14 PrivateWages_20 -1.2204 -21.33 PrivateWages_21 1.1183 22.50 PrivateWages_22 -1.6629 -37.88 Investment_corpProfLag Investment_capitalLag Consumption_2 29.428 423.6 Consumption_3 7.716 113.6 Consumption_4 -4.651 -50.8 Consumption_5 23.321 240.4 Consumption_6 -13.045 -129.6 Consumption_8 -61.019 -633.2 Consumption_9 -55.160 -578.3 Consumption_11 25.207 250.6 Consumption_12 27.197 377.8 Consumption_14 -1.473 -43.6 Consumption_15 16.075 289.9 Consumption_16 14.563 235.6 Consumption_17 -54.711 -772.6 Consumption_18 6.606 75.0 Consumption_19 51.899 605.4 Consumption_20 -32.629 -426.3 Consumption_21 -20.982 -222.2 Consumption_22 10.194 98.8 Investment_2 -30.248 -435.4 Investment_3 0.858 12.6 Investment_4 9.643 105.3 Investment_5 -32.216 -332.1 Investment_6 5.737 57.0 Investment_8 27.364 284.0 Investment_9 17.808 186.7 Investment_10 58.244 581.3 Investment_11 -21.499 -213.7 Investment_12 -13.487 -187.4 Investment_14 12.433 367.8 Investment_15 -2.221 -40.1 Investment_16 1.946 31.5 Investment_17 30.569 431.7 Investment_18 -2.057 -23.4 Investment_19 -61.686 -719.5 Investment_20 13.301 173.8 Investment_21 9.430 99.9 Investment_22 28.026 271.6 PrivateWages_2 32.397 466.3 PrivateWages_3 -11.874 -174.8 PrivateWages_4 -38.124 -416.2 PrivateWages_5 45.260 466.6 PrivateWages_6 8.618 85.6 PrivateWages_8 -27.046 -280.7 PrivateWages_9 -31.306 -328.2 PrivateWages_10 -62.621 -625.0 PrivateWages_11 45.808 455.3 PrivateWages_12 4.694 65.2 PrivateWages_13 0.000 0.0 PrivateWages_14 -19.212 -568.4 PrivateWages_15 1.276 23.0 PrivateWages_16 2.965 48.0 PrivateWages_17 -31.593 -446.1 PrivateWages_18 -1.184 -13.4 PrivateWages_19 93.968 1096.1 PrivateWages_20 -18.672 -244.0 PrivateWages_21 21.247 225.0 PrivateWages_22 -35.087 -340.1 PrivateWages_(Intercept) PrivateWages_gnp PrivateWages_gnpLag Consumption_2 -5.2993 -249.44 -237.94 Consumption_3 -1.4232 -70.56 -64.90 Consumption_4 0.6293 35.58 31.53 Consumption_5 -2.8987 -175.91 -165.80 Consumption_6 1.5378 93.21 87.81 Consumption_8 7.1199 427.18 455.67 Consumption_9 6.3712 396.73 410.31 Consumption_11 -2.6567 -169.26 -178.00 Consumption_12 -3.9871 -218.62 -244.01 Consumption_14 0.4811 20.27 21.31 Consumption_15 -3.2826 -168.12 -148.04 Consumption_16 -2.7078 -149.85 -134.58 Consumption_17 8.9374 512.95 486.20 Consumption_18 -0.8584 -57.66 -53.82 Consumption_19 -6.8609 -470.06 -445.96 Consumption_20 4.8772 326.02 297.02 Consumption_21 2.5255 189.08 175.52 Consumption_22 -1.1049 -95.99 -83.64 Investment_2 3.2022 150.73 143.78 Investment_3 -0.0931 -4.61 -4.24 Investment_4 -0.7671 -43.38 -38.43 Investment_5 2.3540 142.85 134.65 Investment_6 -0.3976 -24.10 -22.70 Investment_8 -1.8770 -112.62 -120.13 Investment_9 -1.2092 -75.30 -77.87 Investment_10 -3.7113 -239.64 -239.38 Investment_11 1.3320 84.87 89.25 Investment_12 1.1624 63.74 71.14 Investment_14 -2.3880 -100.60 -105.79 Investment_15 0.2667 13.66 12.03 Investment_16 -0.2127 -11.77 -10.57 Investment_17 -2.9356 -168.49 -159.70 Investment_18 0.1571 10.56 9.85 Investment_19 4.7939 328.45 311.61 Investment_20 -1.1688 -78.13 -71.18 Investment_21 -0.6673 -49.96 -46.38 Investment_22 -1.7858 -155.15 -135.18 PrivateWages_2 -8.5877 -404.22 -385.59 PrivateWages_3 3.2235 159.82 146.99 PrivateWages_4 7.5943 429.40 380.48 PrivateWages_5 -8.2808 -502.53 -473.66 PrivateWages_6 -1.4955 -90.64 -85.39 PrivateWages_8 4.6454 278.71 297.31 PrivateWages_9 5.3226 331.43 342.78 PrivateWages_10 9.9910 645.11 644.42 PrivateWages_11 -7.1064 -452.76 -476.13 PrivateWages_12 -1.0129 -55.54 -61.99 PrivateWages_13 -5.2725 -247.69 -281.55 PrivateWages_14 9.2395 389.24 409.31 PrivateWages_15 -0.3837 -19.65 -17.30 PrivateWages_16 -0.8115 -44.91 -40.33 PrivateWages_17 7.5969 436.02 413.27 PrivateWages_18 0.2264 15.21 14.20 PrivateWages_19 -18.2855 -1252.79 -1188.56 PrivateWages_20 4.1085 274.63 250.21 PrivateWages_21 -3.7647 -281.85 -261.64 PrivateWages_22 5.5980 486.35 423.77 PrivateWages_trend Consumption_2 52.993 Consumption_3 12.808 Consumption_4 -5.035 Consumption_5 20.291 Consumption_6 -9.227 Consumption_8 -28.480 Consumption_9 -19.114 Consumption_11 2.657 Consumption_12 0.000 Consumption_14 0.962 Consumption_15 -9.848 Consumption_16 -10.831 Consumption_17 44.687 Consumption_18 -5.151 Consumption_19 -48.026 Consumption_20 39.018 Consumption_21 22.730 Consumption_22 -11.049 Investment_2 -32.022 Investment_3 0.838 Investment_4 6.137 Investment_5 -16.478 Investment_6 2.386 Investment_8 7.508 Investment_9 3.628 Investment_10 7.423 Investment_11 -1.332 Investment_12 0.000 Investment_14 -4.776 Investment_15 0.800 Investment_16 -0.851 Investment_17 -14.678 Investment_18 0.943 Investment_19 33.558 Investment_20 -9.351 Investment_21 -6.006 Investment_22 -17.858 PrivateWages_2 85.877 PrivateWages_3 -29.012 PrivateWages_4 -60.755 PrivateWages_5 57.966 PrivateWages_6 8.973 PrivateWages_8 -18.582 PrivateWages_9 -15.968 PrivateWages_10 -19.982 PrivateWages_11 7.106 PrivateWages_12 0.000 PrivateWages_13 -5.272 PrivateWages_14 18.479 PrivateWages_15 -1.151 PrivateWages_16 -3.246 PrivateWages_17 37.985 PrivateWages_18 1.359 PrivateWages_19 -127.998 PrivateWages_20 32.868 PrivateWages_21 -33.882 PrivateWages_22 55.980 [1] TRUE > Bread Consumption_(Intercept) Consumption_corpProf Consumption_corpProfLag [1,] 132.5589 -4.1405 0.7711 [2,] -4.1405 1.1839 -0.6491 [3,] 0.7711 -0.6491 0.7009 [4,] -1.6944 -0.1297 -0.0283 [5,] 114.8656 3.1837 5.1587 [6,] -5.5704 0.7491 -0.6223 [7,] 1.9218 -0.4973 0.5817 [8,] -0.2370 -0.0398 -0.0201 [9,] -36.8131 0.3292 1.6643 [10,] 0.5110 -0.0698 0.0440 [11,] 0.0898 0.0655 -0.0737 [12,] 0.2835 0.0505 0.0244 Consumption_wages Investment_(Intercept) Investment_corpProf [1,] -1.694379 114.87 -5.57043 [2,] -0.129702 3.18 0.74914 [3,] -0.028262 5.16 -0.62232 [4,] 0.104489 -5.87 0.06772 [5,] -5.874854 3366.95 -56.98587 [6,] 0.067720 -56.99 2.64551 [7,] -0.069795 45.44 -2.02544 [8,] 0.029271 -15.60 0.22292 [9,] 0.075832 53.51 -0.48750 [10,] -0.001892 2.12 0.00442 [11,] 0.000817 -3.12 0.00410 [12,] -0.036920 -1.40 0.02820 Investment_corpProfLag Investment_capitalLag PrivateWages_(Intercept) [1,] 1.92185 -0.23700 -36.8131 [2,] -0.49725 -0.03983 0.3292 [3,] 0.58170 -0.02007 1.6643 [4,] -0.06979 0.02927 0.0758 [5,] 45.44092 -15.60143 53.5110 [6,] -2.02544 0.22292 -0.4875 [7,] 1.95029 -0.21271 -0.7904 [8,] -0.21271 0.07616 -0.1618 [9,] -0.79038 -0.16180 69.6580 [10,] 0.00806 -0.01150 -0.3039 [11,] 0.00580 0.01472 -0.8753 [12,] -0.04133 0.00782 0.7539 PrivateWages_gnp PrivateWages_gnpLag PrivateWages_trend [1,] 0.51104 0.089786 0.283482 [2,] -0.06979 0.065456 0.050508 [3,] 0.04399 -0.073692 0.024378 [4,] -0.00189 0.000817 -0.036920 [5,] 2.11576 -3.117775 -1.396100 [6,] 0.00442 0.004099 0.028202 [7,] 0.00806 0.005798 -0.041335 [8,] -0.01150 0.014719 0.007824 [9,] -0.30387 -0.875279 0.753905 [10,] 0.04699 -0.042862 -0.013049 [11,] -0.04286 0.059096 0.000172 [12,] -0.01305 0.000172 0.045631 > > # OLS Warning in systemfit(system, method = method, data = KleinI, methodResidCov = ifelse(method == : the estimation of systems of equations with unequal numbers of observations has not been thoroughly tested yet > summary systemfit results method: OLS N DF SSR detRCov OLS-R2 McElroy-R2 system 58 46 44.2 0.565 0.976 0.991 N DF SSR MSE RMSE R2 Adj R2 Consumption 19 15 17.36 1.157 1.08 0.980 0.976 Investment 19 15 17.11 1.140 1.07 0.907 0.889 PrivateWages 20 16 9.74 0.609 0.78 0.988 0.985 The covariance matrix of the residuals Consumption Investment PrivateWages Consumption 1.285 0.061 -0.511 Investment 0.061 1.059 0.151 PrivateWages -0.511 0.151 0.648 The correlations of the residuals Consumption Investment PrivateWages Consumption 1.0000 0.0457 -0.568 Investment 0.0457 1.0000 0.168 PrivateWages -0.5681 0.1676 1.000 OLS estimates for 'Consumption' (equation 1) Model Formula: consump ~ corpProf + corpProfLag + wages Estimate Std. Error t value Pr(>|t|) (Intercept) 16.2957 1.5438 10.56 2.4e-08 *** corpProf 0.1796 0.1206 1.49 0.16 corpProfLag 0.1032 0.1031 1.00 0.33 wages 0.7962 0.0449 17.73 1.8e-11 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.076 on 15 degrees of freedom Number of observations: 19 Degrees of Freedom: 15 SSR: 17.362 MSE: 1.157 Root MSE: 1.076 Multiple R-Squared: 0.98 Adjusted R-Squared: 0.976 OLS estimates for 'Investment' (equation 2) Model Formula: invest ~ corpProf + corpProfLag + capitalLag Estimate Std. Error t value Pr(>|t|) (Intercept) 10.1724 5.5758 1.82 0.08808 . corpProf 0.5004 0.1092 4.58 0.00036 *** corpProfLag 0.3270 0.1052 3.11 0.00718 ** capitalLag -0.1134 0.0275 -4.13 0.00090 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.068 on 15 degrees of freedom Number of observations: 19 Degrees of Freedom: 15 SSR: 17.105 MSE: 1.14 Root MSE: 1.068 Multiple R-Squared: 0.907 Adjusted R-Squared: 0.889 OLS estimates for 'PrivateWages' (equation 3) Model Formula: privWage ~ gnp + gnpLag + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 1.3550 1.3512 1.00 0.3309 gnp 0.4417 0.0342 12.92 7e-10 *** gnpLag 0.1466 0.0393 3.73 0.0018 ** trend 0.1244 0.0347 3.58 0.0025 ** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 0.78 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 9.739 MSE: 0.609 Root MSE: 0.78 Multiple R-Squared: 0.988 Adjusted R-Squared: 0.985 compare coef with single-equation OLS [1] TRUE > residuals Consumption Investment PrivateWages 1 NA NA NA 2 -0.3863 0.00693 -1.3389 3 -1.2484 -0.06954 0.2462 4 -1.6040 1.22401 1.1255 5 -0.5384 -1.37697 -0.1959 6 -0.0413 0.38610 -0.5284 7 0.8043 1.48598 NA 8 1.2830 0.78465 -0.7909 9 1.0142 -0.65483 0.2819 10 NA 1.06018 1.1384 11 0.1429 0.39508 -0.1904 12 -0.3439 0.20479 0.5813 13 NA NA 0.1206 14 0.3199 0.32778 0.4773 15 -0.1016 -0.07450 0.3035 16 -0.0702 NA 0.0284 17 1.6064 0.96998 -0.8517 18 -0.4980 0.08124 0.9908 19 0.1253 -2.49295 -0.4597 20 0.9805 -0.70609 -0.3819 21 0.7551 -0.81928 -1.1062 22 -2.1992 -0.73256 0.5501 > fitted Consumption Investment PrivateWages 1 NA NA NA 2 42.3 -0.207 26.8 3 46.2 1.970 29.1 4 50.8 3.976 33.0 5 51.1 4.377 34.1 6 52.6 4.714 35.9 7 54.3 4.114 NA 8 54.9 3.415 38.7 9 56.3 3.655 38.9 10 NA 4.040 40.2 11 54.9 0.605 38.1 12 51.2 -3.605 33.9 13 NA NA 28.9 14 46.2 -5.428 28.0 15 48.8 -2.926 30.3 16 51.4 NA 33.2 17 56.1 1.130 37.7 18 59.2 1.919 40.0 19 57.4 0.593 38.7 20 60.6 2.006 42.0 21 64.2 4.119 46.1 22 71.9 5.633 52.7 > predict Consumption.pred Consumption.se.fit Consumption.lwr Consumption.upr 1 NA NA NA NA 2 42.3 0.543 39.9 44.7 3 46.2 0.581 43.8 48.7 4 50.8 0.394 48.5 53.1 5 51.1 0.465 48.8 53.5 6 52.6 0.474 50.3 55.0 7 54.3 0.423 52.0 56.6 8 54.9 0.389 52.6 57.2 9 56.3 0.434 54.0 58.6 10 NA NA NA NA 11 54.9 0.727 52.2 57.5 12 51.2 0.662 48.7 53.8 13 NA NA NA NA 14 46.2 0.698 43.6 48.8 15 48.8 0.470 46.4 51.2 16 51.4 0.398 49.1 53.7 17 56.1 0.405 53.8 58.4 18 59.2 0.375 56.9 61.5 19 57.4 0.466 55.0 59.7 20 60.6 0.482 58.2 63.0 21 64.2 0.485 61.9 66.6 22 71.9 0.755 69.3 74.5 Investment.pred Investment.se.fit Investment.lwr Investment.upr 1 NA NA NA NA 2 -0.207 0.645 -2.718 2.30 3 1.970 0.523 -0.423 4.36 4 3.976 0.462 1.634 6.32 5 4.377 0.383 2.094 6.66 6 4.714 0.362 2.444 6.98 7 4.114 0.336 1.861 6.37 8 3.415 0.298 1.184 5.65 9 3.655 0.400 1.359 5.95 10 4.040 0.458 1.701 6.38 11 0.605 0.666 -1.928 3.14 12 -3.605 0.637 -6.108 -1.10 13 NA NA NA NA 14 -5.428 0.767 -8.074 -2.78 15 -2.926 0.453 -5.261 -0.59 16 NA NA NA NA 17 1.130 0.366 -1.142 3.40 18 1.919 0.258 -0.293 4.13 19 0.593 0.357 -1.674 2.86 20 2.006 0.384 -0.278 4.29 21 4.119 0.350 1.858 6.38 22 5.633 0.495 3.263 8.00 PrivateWages.pred PrivateWages.se.fit PrivateWages.lwr PrivateWages.upr 1 NA NA NA NA 2 26.8 0.378 25.1 28.6 3 29.1 0.381 27.3 30.8 4 33.0 0.384 31.2 34.7 5 34.1 0.297 32.4 35.8 6 35.9 0.296 34.2 37.6 7 NA NA NA NA 8 38.7 0.303 37.0 40.4 9 38.9 0.288 37.2 40.6 10 40.2 0.274 38.5 41.8 11 38.1 0.377 36.3 39.8 12 33.9 0.381 32.2 35.7 13 28.9 0.452 27.1 30.7 14 28.0 0.397 26.3 29.8 15 30.3 0.391 28.5 32.1 16 33.2 0.327 31.5 34.9 17 37.7 0.320 36.0 39.3 18 40.0 0.250 38.4 41.7 19 38.7 0.375 36.9 40.4 20 42.0 0.337 40.3 43.7 21 46.1 0.352 44.4 47.8 22 52.7 0.530 50.9 54.6 > model.frame consump corpProf corpProfLag wages invest capitalLag privWage gnp gnpLag 1 39.8 12.7 NA 31.0 2.7 180 28.8 44.9 NA 2 41.9 12.4 12.7 28.2 -0.2 183 25.5 45.6 44.9 3 45.0 16.9 12.4 32.2 1.9 183 29.3 50.1 45.6 4 49.2 18.4 16.9 37.0 5.2 184 34.1 57.2 50.1 5 50.6 19.4 18.4 37.0 3.0 190 33.9 57.1 57.2 6 52.6 20.1 19.4 38.6 5.1 193 35.4 61.0 57.1 7 55.1 19.6 20.1 40.7 5.6 198 37.4 64.0 NA 8 56.2 19.8 19.6 41.5 4.2 203 37.9 64.4 64.0 9 57.3 21.1 19.8 42.9 3.0 208 39.2 64.5 64.4 10 57.8 21.7 21.1 NA 5.1 211 41.3 67.0 64.5 11 55.0 15.6 21.7 42.1 1.0 216 37.9 61.2 67.0 12 50.9 11.4 15.6 39.3 -3.4 217 34.5 53.4 61.2 13 45.6 NA 11.4 34.3 -6.2 213 29.0 44.3 53.4 14 46.5 11.2 7.0 34.1 -5.1 207 28.5 45.1 44.3 15 48.7 12.3 11.2 36.6 -3.0 202 30.6 49.7 45.1 16 51.3 14.0 12.3 39.3 NA 199 33.2 54.4 49.7 17 57.7 17.6 14.0 44.2 2.1 198 36.8 62.7 54.4 18 58.7 17.3 17.6 47.7 2.0 200 41.0 65.0 62.7 19 57.5 15.3 17.3 45.9 -1.9 202 38.2 60.9 65.0 20 61.6 19.0 15.3 49.4 1.3 200 41.6 69.5 60.9 21 65.0 21.1 19.0 53.0 3.3 201 45.0 75.7 69.5 22 69.7 23.5 21.1 61.8 4.9 204 53.3 88.4 75.7 trend 1 -11 2 -10 3 -9 4 -8 5 -7 6 -6 7 -5 8 -4 9 -3 10 -2 11 -1 12 0 13 1 14 2 15 3 16 4 17 5 18 6 19 7 20 8 21 9 22 10 > model.matrix Consumption_(Intercept) Consumption_corpProf Consumption_2 1 12.4 Consumption_3 1 16.9 Consumption_4 1 18.4 Consumption_5 1 19.4 Consumption_6 1 20.1 Consumption_7 1 19.6 Consumption_8 1 19.8 Consumption_9 1 21.1 Consumption_11 1 15.6 Consumption_12 1 11.4 Consumption_14 1 11.2 Consumption_15 1 12.3 Consumption_16 1 14.0 Consumption_17 1 17.6 Consumption_18 1 17.3 Consumption_19 1 15.3 Consumption_20 1 19.0 Consumption_21 1 21.1 Consumption_22 1 23.5 Investment_2 0 0.0 Investment_3 0 0.0 Investment_4 0 0.0 Investment_5 0 0.0 Investment_6 0 0.0 Investment_7 0 0.0 Investment_8 0 0.0 Investment_9 0 0.0 Investment_10 0 0.0 Investment_11 0 0.0 Investment_12 0 0.0 Investment_14 0 0.0 Investment_15 0 0.0 Investment_17 0 0.0 Investment_18 0 0.0 Investment_19 0 0.0 Investment_20 0 0.0 Investment_21 0 0.0 Investment_22 0 0.0 PrivateWages_2 0 0.0 PrivateWages_3 0 0.0 PrivateWages_4 0 0.0 PrivateWages_5 0 0.0 PrivateWages_6 0 0.0 PrivateWages_8 0 0.0 PrivateWages_9 0 0.0 PrivateWages_10 0 0.0 PrivateWages_11 0 0.0 PrivateWages_12 0 0.0 PrivateWages_13 0 0.0 PrivateWages_14 0 0.0 PrivateWages_15 0 0.0 PrivateWages_16 0 0.0 PrivateWages_17 0 0.0 PrivateWages_18 0 0.0 PrivateWages_19 0 0.0 PrivateWages_20 0 0.0 PrivateWages_21 0 0.0 PrivateWages_22 0 0.0 Consumption_corpProfLag Consumption_wages Consumption_2 12.7 28.2 Consumption_3 12.4 32.2 Consumption_4 16.9 37.0 Consumption_5 18.4 37.0 Consumption_6 19.4 38.6 Consumption_7 20.1 40.7 Consumption_8 19.6 41.5 Consumption_9 19.8 42.9 Consumption_11 21.7 42.1 Consumption_12 15.6 39.3 Consumption_14 7.0 34.1 Consumption_15 11.2 36.6 Consumption_16 12.3 39.3 Consumption_17 14.0 44.2 Consumption_18 17.6 47.7 Consumption_19 17.3 45.9 Consumption_20 15.3 49.4 Consumption_21 19.0 53.0 Consumption_22 21.1 61.8 Investment_2 0.0 0.0 Investment_3 0.0 0.0 Investment_4 0.0 0.0 Investment_5 0.0 0.0 Investment_6 0.0 0.0 Investment_7 0.0 0.0 Investment_8 0.0 0.0 Investment_9 0.0 0.0 Investment_10 0.0 0.0 Investment_11 0.0 0.0 Investment_12 0.0 0.0 Investment_14 0.0 0.0 Investment_15 0.0 0.0 Investment_17 0.0 0.0 Investment_18 0.0 0.0 Investment_19 0.0 0.0 Investment_20 0.0 0.0 Investment_21 0.0 0.0 Investment_22 0.0 0.0 PrivateWages_2 0.0 0.0 PrivateWages_3 0.0 0.0 PrivateWages_4 0.0 0.0 PrivateWages_5 0.0 0.0 PrivateWages_6 0.0 0.0 PrivateWages_8 0.0 0.0 PrivateWages_9 0.0 0.0 PrivateWages_10 0.0 0.0 PrivateWages_11 0.0 0.0 PrivateWages_12 0.0 0.0 PrivateWages_13 0.0 0.0 PrivateWages_14 0.0 0.0 PrivateWages_15 0.0 0.0 PrivateWages_16 0.0 0.0 PrivateWages_17 0.0 0.0 PrivateWages_18 0.0 0.0 PrivateWages_19 0.0 0.0 PrivateWages_20 0.0 0.0 PrivateWages_21 0.0 0.0 PrivateWages_22 0.0 0.0 Investment_(Intercept) Investment_corpProf Consumption_2 0 0.0 Consumption_3 0 0.0 Consumption_4 0 0.0 Consumption_5 0 0.0 Consumption_6 0 0.0 Consumption_7 0 0.0 Consumption_8 0 0.0 Consumption_9 0 0.0 Consumption_11 0 0.0 Consumption_12 0 0.0 Consumption_14 0 0.0 Consumption_15 0 0.0 Consumption_16 0 0.0 Consumption_17 0 0.0 Consumption_18 0 0.0 Consumption_19 0 0.0 Consumption_20 0 0.0 Consumption_21 0 0.0 Consumption_22 0 0.0 Investment_2 1 12.4 Investment_3 1 16.9 Investment_4 1 18.4 Investment_5 1 19.4 Investment_6 1 20.1 Investment_7 1 19.6 Investment_8 1 19.8 Investment_9 1 21.1 Investment_10 1 21.7 Investment_11 1 15.6 Investment_12 1 11.4 Investment_14 1 11.2 Investment_15 1 12.3 Investment_17 1 17.6 Investment_18 1 17.3 Investment_19 1 15.3 Investment_20 1 19.0 Investment_21 1 21.1 Investment_22 1 23.5 PrivateWages_2 0 0.0 PrivateWages_3 0 0.0 PrivateWages_4 0 0.0 PrivateWages_5 0 0.0 PrivateWages_6 0 0.0 PrivateWages_8 0 0.0 PrivateWages_9 0 0.0 PrivateWages_10 0 0.0 PrivateWages_11 0 0.0 PrivateWages_12 0 0.0 PrivateWages_13 0 0.0 PrivateWages_14 0 0.0 PrivateWages_15 0 0.0 PrivateWages_16 0 0.0 PrivateWages_17 0 0.0 PrivateWages_18 0 0.0 PrivateWages_19 0 0.0 PrivateWages_20 0 0.0 PrivateWages_21 0 0.0 PrivateWages_22 0 0.0 Investment_corpProfLag Investment_capitalLag Consumption_2 0.0 0 Consumption_3 0.0 0 Consumption_4 0.0 0 Consumption_5 0.0 0 Consumption_6 0.0 0 Consumption_7 0.0 0 Consumption_8 0.0 0 Consumption_9 0.0 0 Consumption_11 0.0 0 Consumption_12 0.0 0 Consumption_14 0.0 0 Consumption_15 0.0 0 Consumption_16 0.0 0 Consumption_17 0.0 0 Consumption_18 0.0 0 Consumption_19 0.0 0 Consumption_20 0.0 0 Consumption_21 0.0 0 Consumption_22 0.0 0 Investment_2 12.7 183 Investment_3 12.4 183 Investment_4 16.9 184 Investment_5 18.4 190 Investment_6 19.4 193 Investment_7 20.1 198 Investment_8 19.6 203 Investment_9 19.8 208 Investment_10 21.1 211 Investment_11 21.7 216 Investment_12 15.6 217 Investment_14 7.0 207 Investment_15 11.2 202 Investment_17 14.0 198 Investment_18 17.6 200 Investment_19 17.3 202 Investment_20 15.3 200 Investment_21 19.0 201 Investment_22 21.1 204 PrivateWages_2 0.0 0 PrivateWages_3 0.0 0 PrivateWages_4 0.0 0 PrivateWages_5 0.0 0 PrivateWages_6 0.0 0 PrivateWages_8 0.0 0 PrivateWages_9 0.0 0 PrivateWages_10 0.0 0 PrivateWages_11 0.0 0 PrivateWages_12 0.0 0 PrivateWages_13 0.0 0 PrivateWages_14 0.0 0 PrivateWages_15 0.0 0 PrivateWages_16 0.0 0 PrivateWages_17 0.0 0 PrivateWages_18 0.0 0 PrivateWages_19 0.0 0 PrivateWages_20 0.0 0 PrivateWages_21 0.0 0 PrivateWages_22 0.0 0 PrivateWages_(Intercept) PrivateWages_gnp PrivateWages_gnpLag Consumption_2 0 0.0 0.0 Consumption_3 0 0.0 0.0 Consumption_4 0 0.0 0.0 Consumption_5 0 0.0 0.0 Consumption_6 0 0.0 0.0 Consumption_7 0 0.0 0.0 Consumption_8 0 0.0 0.0 Consumption_9 0 0.0 0.0 Consumption_11 0 0.0 0.0 Consumption_12 0 0.0 0.0 Consumption_14 0 0.0 0.0 Consumption_15 0 0.0 0.0 Consumption_16 0 0.0 0.0 Consumption_17 0 0.0 0.0 Consumption_18 0 0.0 0.0 Consumption_19 0 0.0 0.0 Consumption_20 0 0.0 0.0 Consumption_21 0 0.0 0.0 Consumption_22 0 0.0 0.0 Investment_2 0 0.0 0.0 Investment_3 0 0.0 0.0 Investment_4 0 0.0 0.0 Investment_5 0 0.0 0.0 Investment_6 0 0.0 0.0 Investment_7 0 0.0 0.0 Investment_8 0 0.0 0.0 Investment_9 0 0.0 0.0 Investment_10 0 0.0 0.0 Investment_11 0 0.0 0.0 Investment_12 0 0.0 0.0 Investment_14 0 0.0 0.0 Investment_15 0 0.0 0.0 Investment_17 0 0.0 0.0 Investment_18 0 0.0 0.0 Investment_19 0 0.0 0.0 Investment_20 0 0.0 0.0 Investment_21 0 0.0 0.0 Investment_22 0 0.0 0.0 PrivateWages_2 1 45.6 44.9 PrivateWages_3 1 50.1 45.6 PrivateWages_4 1 57.2 50.1 PrivateWages_5 1 57.1 57.2 PrivateWages_6 1 61.0 57.1 PrivateWages_8 1 64.4 64.0 PrivateWages_9 1 64.5 64.4 PrivateWages_10 1 67.0 64.5 PrivateWages_11 1 61.2 67.0 PrivateWages_12 1 53.4 61.2 PrivateWages_13 1 44.3 53.4 PrivateWages_14 1 45.1 44.3 PrivateWages_15 1 49.7 45.1 PrivateWages_16 1 54.4 49.7 PrivateWages_17 1 62.7 54.4 PrivateWages_18 1 65.0 62.7 PrivateWages_19 1 60.9 65.0 PrivateWages_20 1 69.5 60.9 PrivateWages_21 1 75.7 69.5 PrivateWages_22 1 88.4 75.7 PrivateWages_trend Consumption_2 0 Consumption_3 0 Consumption_4 0 Consumption_5 0 Consumption_6 0 Consumption_7 0 Consumption_8 0 Consumption_9 0 Consumption_11 0 Consumption_12 0 Consumption_14 0 Consumption_15 0 Consumption_16 0 Consumption_17 0 Consumption_18 0 Consumption_19 0 Consumption_20 0 Consumption_21 0 Consumption_22 0 Investment_2 0 Investment_3 0 Investment_4 0 Investment_5 0 Investment_6 0 Investment_7 0 Investment_8 0 Investment_9 0 Investment_10 0 Investment_11 0 Investment_12 0 Investment_14 0 Investment_15 0 Investment_17 0 Investment_18 0 Investment_19 0 Investment_20 0 Investment_21 0 Investment_22 0 PrivateWages_2 -10 PrivateWages_3 -9 PrivateWages_4 -8 PrivateWages_5 -7 PrivateWages_6 -6 PrivateWages_8 -4 PrivateWages_9 -3 PrivateWages_10 -2 PrivateWages_11 -1 PrivateWages_12 0 PrivateWages_13 1 PrivateWages_14 2 PrivateWages_15 3 PrivateWages_16 4 PrivateWages_17 5 PrivateWages_18 6 PrivateWages_19 7 PrivateWages_20 8 PrivateWages_21 9 PrivateWages_22 10 > nobs [1] 58 > linearHypothesis Linear hypothesis test (Theil's F test) Hypothesis: Consumption_corpProf + Investment_capitalLag = 0 Model 1: restricted model Model 2: kleinModel Res.Df Df F Pr(>F) 1 47 2 46 1 0.3 0.59 Linear hypothesis test (F statistic of a Wald test) Hypothesis: Consumption_corpProf + Investment_capitalLag = 0 Model 1: restricted model Model 2: kleinModel Res.Df Df F Pr(>F) 1 47 2 46 1 0.29 0.6 Linear hypothesis test (Chi^2 statistic of a Wald test) Hypothesis: Consumption_corpProf + Investment_capitalLag = 0 Model 1: restricted model Model 2: kleinModel Res.Df Df Chisq Pr(>Chisq) 1 47 2 46 1 0.29 0.59 Linear hypothesis test (Theil's F test) Hypothesis: Consumption_corpProf + Investment_capitalLag = 0 Consumption_corpProfLag - PrivateWages_trend = 0 Model 1: restricted model Model 2: kleinModel Res.Df Df F Pr(>F) 1 48 2 46 2 0.16 0.85 Linear hypothesis test (F statistic of a Wald test) Hypothesis: Consumption_corpProf + Investment_capitalLag = 0 Consumption_corpProfLag - PrivateWages_trend = 0 Model 1: restricted model Model 2: kleinModel Res.Df Df F Pr(>F) 1 48 2 46 2 0.15 0.86 Linear hypothesis test (Chi^2 statistic of a Wald test) Hypothesis: Consumption_corpProf + Investment_capitalLag = 0 Consumption_corpProfLag - PrivateWages_trend = 0 Model 1: restricted model Model 2: kleinModel Res.Df Df Chisq Pr(>Chisq) 1 48 2 46 2 0.3 0.86 > logLik 'log Lik.' -68.8 (df=13) 'log Lik.' -73.3 (df=13) compare log likelihood value with single-equation OLS [1] "Mean relative difference: 0.0011" Estimating function Consumption_(Intercept) Consumption_corpProf Consumption_2 -0.3863 -4.791 Consumption_3 -1.2484 -21.098 Consumption_4 -1.6040 -29.514 Consumption_5 -0.5384 -10.446 Consumption_6 -0.0413 -0.830 Consumption_7 0.8043 15.763 Consumption_8 1.2830 25.403 Consumption_9 1.0142 21.399 Consumption_11 0.1429 2.229 Consumption_12 -0.3439 -3.920 Consumption_14 0.3199 3.583 Consumption_15 -0.1016 -1.250 Consumption_16 -0.0702 -0.983 Consumption_17 1.6064 28.272 Consumption_18 -0.4980 -8.616 Consumption_19 0.1253 1.917 Consumption_20 0.9805 18.629 Consumption_21 0.7551 15.933 Consumption_22 -2.1992 -51.681 Investment_2 0.0000 0.000 Investment_3 0.0000 0.000 Investment_4 0.0000 0.000 Investment_5 0.0000 0.000 Investment_6 0.0000 0.000 Investment_7 0.0000 0.000 Investment_8 0.0000 0.000 Investment_9 0.0000 0.000 Investment_10 0.0000 0.000 Investment_11 0.0000 0.000 Investment_12 0.0000 0.000 Investment_14 0.0000 0.000 Investment_15 0.0000 0.000 Investment_17 0.0000 0.000 Investment_18 0.0000 0.000 Investment_19 0.0000 0.000 Investment_20 0.0000 0.000 Investment_21 0.0000 0.000 Investment_22 0.0000 0.000 PrivateWages_2 0.0000 0.000 PrivateWages_3 0.0000 0.000 PrivateWages_4 0.0000 0.000 PrivateWages_5 0.0000 0.000 PrivateWages_6 0.0000 0.000 PrivateWages_8 0.0000 0.000 PrivateWages_9 0.0000 0.000 PrivateWages_10 0.0000 0.000 PrivateWages_11 0.0000 0.000 PrivateWages_12 0.0000 0.000 PrivateWages_13 0.0000 0.000 PrivateWages_14 0.0000 0.000 PrivateWages_15 0.0000 0.000 PrivateWages_16 0.0000 0.000 PrivateWages_17 0.0000 0.000 PrivateWages_18 0.0000 0.000 PrivateWages_19 0.0000 0.000 PrivateWages_20 0.0000 0.000 PrivateWages_21 0.0000 0.000 PrivateWages_22 0.0000 0.000 Consumption_corpProfLag Consumption_wages Consumption_2 -4.907 -10.90 Consumption_3 -15.480 -40.20 Consumption_4 -27.108 -59.35 Consumption_5 -9.907 -19.92 Consumption_6 -0.801 -1.59 Consumption_7 16.166 32.73 Consumption_8 25.146 53.24 Consumption_9 20.081 43.51 Consumption_11 3.100 6.01 Consumption_12 -5.364 -13.51 Consumption_14 2.239 10.91 Consumption_15 -1.138 -3.72 Consumption_16 -0.864 -2.76 Consumption_17 22.489 71.00 Consumption_18 -8.765 -23.76 Consumption_19 2.168 5.75 Consumption_20 15.002 48.44 Consumption_21 14.348 40.02 Consumption_22 -46.403 -135.91 Investment_2 0.000 0.00 Investment_3 0.000 0.00 Investment_4 0.000 0.00 Investment_5 0.000 0.00 Investment_6 0.000 0.00 Investment_7 0.000 0.00 Investment_8 0.000 0.00 Investment_9 0.000 0.00 Investment_10 0.000 0.00 Investment_11 0.000 0.00 Investment_12 0.000 0.00 Investment_14 0.000 0.00 Investment_15 0.000 0.00 Investment_17 0.000 0.00 Investment_18 0.000 0.00 Investment_19 0.000 0.00 Investment_20 0.000 0.00 Investment_21 0.000 0.00 Investment_22 0.000 0.00 PrivateWages_2 0.000 0.00 PrivateWages_3 0.000 0.00 PrivateWages_4 0.000 0.00 PrivateWages_5 0.000 0.00 PrivateWages_6 0.000 0.00 PrivateWages_8 0.000 0.00 PrivateWages_9 0.000 0.00 PrivateWages_10 0.000 0.00 PrivateWages_11 0.000 0.00 PrivateWages_12 0.000 0.00 PrivateWages_13 0.000 0.00 PrivateWages_14 0.000 0.00 PrivateWages_15 0.000 0.00 PrivateWages_16 0.000 0.00 PrivateWages_17 0.000 0.00 PrivateWages_18 0.000 0.00 PrivateWages_19 0.000 0.00 PrivateWages_20 0.000 0.00 PrivateWages_21 0.000 0.00 PrivateWages_22 0.000 0.00 Investment_(Intercept) Investment_corpProf Consumption_2 0.00000 0.000 Consumption_3 0.00000 0.000 Consumption_4 0.00000 0.000 Consumption_5 0.00000 0.000 Consumption_6 0.00000 0.000 Consumption_7 0.00000 0.000 Consumption_8 0.00000 0.000 Consumption_9 0.00000 0.000 Consumption_11 0.00000 0.000 Consumption_12 0.00000 0.000 Consumption_14 0.00000 0.000 Consumption_15 0.00000 0.000 Consumption_16 0.00000 0.000 Consumption_17 0.00000 0.000 Consumption_18 0.00000 0.000 Consumption_19 0.00000 0.000 Consumption_20 0.00000 0.000 Consumption_21 0.00000 0.000 Consumption_22 0.00000 0.000 Investment_2 0.00693 0.086 Investment_3 -0.06954 -1.175 Investment_4 1.22401 22.522 Investment_5 -1.37696 -26.713 Investment_6 0.38610 7.761 Investment_7 1.48598 29.125 Investment_8 0.78465 15.536 Investment_9 -0.65483 -13.817 Investment_10 1.06018 23.006 Investment_11 0.39508 6.163 Investment_12 0.20479 2.335 Investment_14 0.32778 3.671 Investment_15 -0.07450 -0.916 Investment_17 0.96998 17.072 Investment_18 0.08124 1.405 Investment_19 -2.49295 -38.142 Investment_20 -0.70609 -13.416 Investment_21 -0.81928 -17.287 Investment_22 -0.73256 -17.215 PrivateWages_2 0.00000 0.000 PrivateWages_3 0.00000 0.000 PrivateWages_4 0.00000 0.000 PrivateWages_5 0.00000 0.000 PrivateWages_6 0.00000 0.000 PrivateWages_8 0.00000 0.000 PrivateWages_9 0.00000 0.000 PrivateWages_10 0.00000 0.000 PrivateWages_11 0.00000 0.000 PrivateWages_12 0.00000 0.000 PrivateWages_13 0.00000 0.000 PrivateWages_14 0.00000 0.000 PrivateWages_15 0.00000 0.000 PrivateWages_16 0.00000 0.000 PrivateWages_17 0.00000 0.000 PrivateWages_18 0.00000 0.000 PrivateWages_19 0.00000 0.000 PrivateWages_20 0.00000 0.000 PrivateWages_21 0.00000 0.000 PrivateWages_22 0.00000 0.000 Investment_corpProfLag Investment_capitalLag Consumption_2 0.0000 0.00 Consumption_3 0.0000 0.00 Consumption_4 0.0000 0.00 Consumption_5 0.0000 0.00 Consumption_6 0.0000 0.00 Consumption_7 0.0000 0.00 Consumption_8 0.0000 0.00 Consumption_9 0.0000 0.00 Consumption_11 0.0000 0.00 Consumption_12 0.0000 0.00 Consumption_14 0.0000 0.00 Consumption_15 0.0000 0.00 Consumption_16 0.0000 0.00 Consumption_17 0.0000 0.00 Consumption_18 0.0000 0.00 Consumption_19 0.0000 0.00 Consumption_20 0.0000 0.00 Consumption_21 0.0000 0.00 Consumption_22 0.0000 0.00 Investment_2 0.0881 1.27 Investment_3 -0.8622 -12.70 Investment_4 20.6858 225.83 Investment_5 -25.3362 -261.21 Investment_6 7.4903 74.40 Investment_7 29.8681 293.93 Investment_8 15.3791 159.60 Investment_9 -12.9657 -135.94 Investment_10 22.3698 223.27 Investment_11 8.5733 85.22 Investment_12 3.1947 44.38 Investment_14 2.2945 67.88 Investment_15 -0.8344 -15.05 Investment_17 13.5797 191.77 Investment_18 1.4298 16.23 Investment_19 -43.1281 -503.08 Investment_20 -10.8032 -141.15 Investment_21 -15.5663 -164.84 Investment_22 -15.4570 -149.81 PrivateWages_2 0.0000 0.00 PrivateWages_3 0.0000 0.00 PrivateWages_4 0.0000 0.00 PrivateWages_5 0.0000 0.00 PrivateWages_6 0.0000 0.00 PrivateWages_8 0.0000 0.00 PrivateWages_9 0.0000 0.00 PrivateWages_10 0.0000 0.00 PrivateWages_11 0.0000 0.00 PrivateWages_12 0.0000 0.00 PrivateWages_13 0.0000 0.00 PrivateWages_14 0.0000 0.00 PrivateWages_15 0.0000 0.00 PrivateWages_16 0.0000 0.00 PrivateWages_17 0.0000 0.00 PrivateWages_18 0.0000 0.00 PrivateWages_19 0.0000 0.00 PrivateWages_20 0.0000 0.00 PrivateWages_21 0.0000 0.00 PrivateWages_22 0.0000 0.00 PrivateWages_(Intercept) PrivateWages_gnp PrivateWages_gnpLag Consumption_2 0.0000 0.00 0.00 Consumption_3 0.0000 0.00 0.00 Consumption_4 0.0000 0.00 0.00 Consumption_5 0.0000 0.00 0.00 Consumption_6 0.0000 0.00 0.00 Consumption_7 0.0000 0.00 0.00 Consumption_8 0.0000 0.00 0.00 Consumption_9 0.0000 0.00 0.00 Consumption_11 0.0000 0.00 0.00 Consumption_12 0.0000 0.00 0.00 Consumption_14 0.0000 0.00 0.00 Consumption_15 0.0000 0.00 0.00 Consumption_16 0.0000 0.00 0.00 Consumption_17 0.0000 0.00 0.00 Consumption_18 0.0000 0.00 0.00 Consumption_19 0.0000 0.00 0.00 Consumption_20 0.0000 0.00 0.00 Consumption_21 0.0000 0.00 0.00 Consumption_22 0.0000 0.00 0.00 Investment_2 0.0000 0.00 0.00 Investment_3 0.0000 0.00 0.00 Investment_4 0.0000 0.00 0.00 Investment_5 0.0000 0.00 0.00 Investment_6 0.0000 0.00 0.00 Investment_7 0.0000 0.00 0.00 Investment_8 0.0000 0.00 0.00 Investment_9 0.0000 0.00 0.00 Investment_10 0.0000 0.00 0.00 Investment_11 0.0000 0.00 0.00 Investment_12 0.0000 0.00 0.00 Investment_14 0.0000 0.00 0.00 Investment_15 0.0000 0.00 0.00 Investment_17 0.0000 0.00 0.00 Investment_18 0.0000 0.00 0.00 Investment_19 0.0000 0.00 0.00 Investment_20 0.0000 0.00 0.00 Investment_21 0.0000 0.00 0.00 Investment_22 0.0000 0.00 0.00 PrivateWages_2 -1.3389 -61.06 -60.12 PrivateWages_3 0.2462 12.33 11.23 PrivateWages_4 1.1255 64.38 56.39 PrivateWages_5 -0.1959 -11.18 -11.20 PrivateWages_6 -0.5284 -32.23 -30.17 PrivateWages_8 -0.7909 -50.94 -50.62 PrivateWages_9 0.2819 18.18 18.15 PrivateWages_10 1.1384 76.28 73.43 PrivateWages_11 -0.1904 -11.65 -12.76 PrivateWages_12 0.5813 31.04 35.58 PrivateWages_13 0.1206 5.34 6.44 PrivateWages_14 0.4773 21.53 21.14 PrivateWages_15 0.3035 15.09 13.69 PrivateWages_16 0.0284 1.55 1.41 PrivateWages_17 -0.8517 -53.40 -46.33 PrivateWages_18 0.9908 64.40 62.12 PrivateWages_19 -0.4597 -28.00 -29.88 PrivateWages_20 -0.3819 -26.54 -23.26 PrivateWages_21 -1.1062 -83.74 -76.88 PrivateWages_22 0.5501 48.63 41.64 PrivateWages_trend Consumption_2 0.000 Consumption_3 0.000 Consumption_4 0.000 Consumption_5 0.000 Consumption_6 0.000 Consumption_7 0.000 Consumption_8 0.000 Consumption_9 0.000 Consumption_11 0.000 Consumption_12 0.000 Consumption_14 0.000 Consumption_15 0.000 Consumption_16 0.000 Consumption_17 0.000 Consumption_18 0.000 Consumption_19 0.000 Consumption_20 0.000 Consumption_21 0.000 Consumption_22 0.000 Investment_2 0.000 Investment_3 0.000 Investment_4 0.000 Investment_5 0.000 Investment_6 0.000 Investment_7 0.000 Investment_8 0.000 Investment_9 0.000 Investment_10 0.000 Investment_11 0.000 Investment_12 0.000 Investment_14 0.000 Investment_15 0.000 Investment_17 0.000 Investment_18 0.000 Investment_19 0.000 Investment_20 0.000 Investment_21 0.000 Investment_22 0.000 PrivateWages_2 13.389 PrivateWages_3 -2.216 PrivateWages_4 -9.004 PrivateWages_5 1.371 PrivateWages_6 3.170 PrivateWages_8 3.164 PrivateWages_9 -0.846 PrivateWages_10 -2.277 PrivateWages_11 0.190 PrivateWages_12 0.000 PrivateWages_13 0.121 PrivateWages_14 0.955 PrivateWages_15 0.911 PrivateWages_16 0.114 PrivateWages_17 -4.258 PrivateWages_18 5.945 PrivateWages_19 -3.218 PrivateWages_20 -3.055 PrivateWages_21 -9.956 PrivateWages_22 5.501 [1] TRUE > Bread Consumption_(Intercept) Consumption_corpProf Consumption_(Intercept) 107.542 -1.6123 Consumption_corpProf -1.612 0.6562 Consumption_corpProfLag -0.588 -0.3449 Consumption_wages -1.613 -0.0959 Investment_(Intercept) 0.000 0.0000 Investment_corpProf 0.000 0.0000 Investment_corpProfLag 0.000 0.0000 Investment_capitalLag 0.000 0.0000 PrivateWages_(Intercept) 0.000 0.0000 PrivateWages_gnp 0.000 0.0000 PrivateWages_gnpLag 0.000 0.0000 PrivateWages_trend 0.000 0.0000 Consumption_corpProfLag Consumption_wages Consumption_(Intercept) -0.5878 -1.6130 Consumption_corpProf -0.3449 -0.0959 Consumption_corpProfLag 0.4797 -0.0326 Consumption_wages -0.0326 0.0910 Investment_(Intercept) 0.0000 0.0000 Investment_corpProf 0.0000 0.0000 Investment_corpProfLag 0.0000 0.0000 Investment_capitalLag 0.0000 0.0000 PrivateWages_(Intercept) 0.0000 0.0000 PrivateWages_gnp 0.0000 0.0000 PrivateWages_gnpLag 0.0000 0.0000 PrivateWages_trend 0.0000 0.0000 Investment_(Intercept) Investment_corpProf Consumption_(Intercept) 0.00 0.000 Consumption_corpProf 0.00 0.000 Consumption_corpProfLag 0.00 0.000 Consumption_wages 0.00 0.000 Investment_(Intercept) 1702.08 -16.246 Investment_corpProf -16.25 0.653 Investment_corpProfLag 13.29 -0.499 Investment_capitalLag -8.19 0.066 PrivateWages_(Intercept) 0.00 0.000 PrivateWages_gnp 0.00 0.000 PrivateWages_gnpLag 0.00 0.000 PrivateWages_trend 0.00 0.000 Investment_corpProfLag Investment_capitalLag Consumption_(Intercept) 0.0000 0.0000 Consumption_corpProf 0.0000 0.0000 Consumption_corpProfLag 0.0000 0.0000 Consumption_wages 0.0000 0.0000 Investment_(Intercept) 13.2940 -8.1927 Investment_corpProf -0.4994 0.0660 Investment_corpProfLag 0.6054 -0.0737 Investment_capitalLag -0.0737 0.0414 PrivateWages_(Intercept) 0.0000 0.0000 PrivateWages_gnp 0.0000 0.0000 PrivateWages_gnpLag 0.0000 0.0000 PrivateWages_trend 0.0000 0.0000 PrivateWages_(Intercept) PrivateWages_gnp Consumption_(Intercept) 0.000 0.0000 Consumption_corpProf 0.000 0.0000 Consumption_corpProfLag 0.000 0.0000 Consumption_wages 0.000 0.0000 Investment_(Intercept) 0.000 0.0000 Investment_corpProf 0.000 0.0000 Investment_corpProfLag 0.000 0.0000 Investment_capitalLag 0.000 0.0000 PrivateWages_(Intercept) 163.361 -0.6152 PrivateWages_gnp -0.615 0.1046 PrivateWages_gnpLag -2.146 -0.0975 PrivateWages_trend 2.016 -0.0281 PrivateWages_gnpLag PrivateWages_trend Consumption_(Intercept) 0.00000 0.00000 Consumption_corpProf 0.00000 0.00000 Consumption_corpProfLag 0.00000 0.00000 Consumption_wages 0.00000 0.00000 Investment_(Intercept) 0.00000 0.00000 Investment_corpProf 0.00000 0.00000 Investment_corpProfLag 0.00000 0.00000 Investment_capitalLag 0.00000 0.00000 PrivateWages_(Intercept) -2.14647 2.01603 PrivateWages_gnp -0.09753 -0.02810 PrivateWages_gnpLag 0.13809 -0.00624 PrivateWages_trend -0.00624 0.10783 > > # 2SLS Warning in systemfit(system, method = method, data = KleinI, inst = inst, : the estimation of systems of equations with unequal numbers of observations has not been thoroughly tested yet > summary systemfit results method: 2SLS N DF SSR detRCov OLS-R2 McElroy-R2 system 56 44 57.9 0.391 0.968 0.992 N DF SSR MSE RMSE R2 Adj R2 Consumption 18 14 22.27 1.591 1.26 0.974 0.968 Investment 18 14 25.85 1.847 1.36 0.847 0.815 PrivateWages 20 16 9.74 0.609 0.78 0.988 0.985 The covariance matrix of the residuals Consumption Investment PrivateWages Consumption 1.307 0.540 -0.431 Investment 0.540 1.319 0.119 PrivateWages -0.431 0.119 0.496 The correlations of the residuals Consumption Investment PrivateWages Consumption 1.000 0.414 -0.538 Investment 0.414 1.000 0.139 PrivateWages -0.538 0.139 1.000 2SLS estimates for 'Consumption' (equation 1) Model Formula: consump ~ corpProf + corpProfLag + wages Instruments: ~govExp + taxes + govWage + trend + capitalLag + corpProfLag + gnpLag Estimate Std. Error t value Pr(>|t|) (Intercept) 17.2849 1.6463 10.50 5.1e-08 *** corpProf -0.0770 0.1683 -0.46 0.65 corpProfLag 0.2327 0.1276 1.82 0.09 . wages 0.8259 0.0472 17.49 6.6e-11 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.261 on 14 degrees of freedom Number of observations: 18 Degrees of Freedom: 14 SSR: 22.269 MSE: 1.591 Root MSE: 1.261 Multiple R-Squared: 0.974 Adjusted R-Squared: 0.968 2SLS estimates for 'Investment' (equation 2) Model Formula: invest ~ corpProf + corpProfLag + capitalLag Instruments: ~govExp + taxes + govWage + trend + capitalLag + corpProfLag + gnpLag Estimate Std. Error t value Pr(>|t|) (Intercept) 18.2571 7.3132 2.50 0.02564 * corpProf 0.1564 0.1942 0.81 0.43408 corpProfLag 0.5714 0.1672 3.42 0.00417 ** capitalLag -0.1446 0.0346 -4.18 0.00093 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.359 on 14 degrees of freedom Number of observations: 18 Degrees of Freedom: 14 SSR: 25.852 MSE: 1.847 Root MSE: 1.359 Multiple R-Squared: 0.847 Adjusted R-Squared: 0.815 2SLS estimates for 'PrivateWages' (equation 3) Model Formula: privWage ~ gnp + gnpLag + trend Instruments: ~govExp + taxes + govWage + trend + capitalLag + corpProfLag + gnpLag Estimate Std. Error t value Pr(>|t|) (Intercept) 1.3431 1.1879 1.13 0.275 gnp 0.4438 0.0361 12.28 1.5e-09 *** gnpLag 0.1447 0.0392 3.69 0.002 ** trend 0.1238 0.0308 4.01 0.001 ** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 0.78 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 9.741 MSE: 0.609 Root MSE: 0.78 Multiple R-Squared: 0.988 Adjusted R-Squared: 0.985 > residuals Consumption Investment PrivateWages 1 NA NA NA 2 -0.6754 -1.214 -1.3401 3 -0.4627 0.325 0.2378 4 -1.1585 1.094 1.1117 5 -0.0305 -1.368 -0.1954 6 0.4693 0.486 -0.5355 7 NA NA NA 8 1.6045 1.066 -0.7908 9 1.6018 0.156 0.2831 10 NA 1.853 1.1353 11 -0.9031 -0.898 -0.1765 12 -1.5948 -1.012 0.6007 13 NA NA 0.1443 14 0.2854 0.845 0.4826 15 -0.4718 -0.365 0.3016 16 -0.2268 NA 0.0261 17 2.0079 1.685 -0.8614 18 -0.7434 -0.121 0.9927 19 -0.5410 -3.248 -0.4446 20 1.4186 0.241 -0.3914 21 1.1462 -0.013 -1.1115 22 -1.7256 0.489 0.5312 > fitted Consumption Investment PrivateWages 1 NA NA NA 2 42.6 1.014 26.8 3 45.5 1.575 29.1 4 50.4 4.106 33.0 5 50.6 4.368 34.1 6 52.1 4.614 35.9 7 NA NA NA 8 54.6 3.134 38.7 9 55.7 2.844 38.9 10 NA 3.247 40.2 11 55.9 1.898 38.1 12 52.5 -2.388 33.9 13 NA NA 28.9 14 46.2 -5.945 28.0 15 49.2 -2.635 30.3 16 51.5 NA 33.2 17 55.7 0.415 37.7 18 59.4 2.121 40.0 19 58.0 1.348 38.6 20 60.2 1.059 42.0 21 63.9 3.313 46.1 22 71.4 4.411 52.8 > predict Consumption.pred Consumption.se.fit Consumption.lwr Consumption.upr 1 NA NA NA NA 2 42.6 0.586 41.3 43.8 3 45.5 0.674 44.0 46.9 4 50.4 0.443 49.4 51.3 5 50.6 0.524 49.5 51.8 6 52.1 0.535 51.0 53.3 7 NA NA NA NA 8 54.6 0.431 53.7 55.5 9 55.7 0.510 54.6 56.8 10 NA NA NA NA 11 55.9 0.936 53.9 57.9 12 52.5 0.893 50.6 54.4 13 NA NA NA NA 14 46.2 0.713 44.7 47.7 15 49.2 0.501 48.1 50.2 16 51.5 0.407 50.7 52.4 17 55.7 0.457 54.7 56.7 18 59.4 0.397 58.6 60.3 19 58.0 0.564 56.8 59.2 20 60.2 0.543 59.0 61.3 21 63.9 0.529 62.7 65.0 22 71.4 0.808 69.7 73.2 Investment.pred Investment.se.fit Investment.lwr Investment.upr 1 NA NA NA NA 2 1.014 0.919 -0.957 2.985 3 1.575 0.602 0.284 2.867 4 4.106 0.544 2.940 5.272 5 4.368 0.450 3.402 5.333 6 4.614 0.425 3.703 5.526 7 NA NA NA NA 8 3.134 0.352 2.380 3.889 9 2.844 0.544 1.677 4.012 10 3.247 0.592 1.976 4.518 11 1.898 0.978 -0.200 3.996 12 -2.388 0.886 -4.289 -0.488 13 NA NA NA NA 14 -5.945 0.916 -7.909 -3.980 15 -2.635 0.518 -3.745 -1.525 16 NA NA NA NA 17 0.415 0.507 -0.671 1.501 18 2.121 0.329 1.416 2.826 19 1.348 0.551 0.166 2.529 20 1.059 0.582 -0.189 2.306 21 3.313 0.496 2.248 4.377 22 4.411 0.728 2.850 5.971 PrivateWages.pred PrivateWages.se.fit PrivateWages.lwr PrivateWages.upr 1 NA NA NA NA 2 26.8 0.330 26.1 27.5 3 29.1 0.344 28.3 29.8 4 33.0 0.363 32.2 33.8 5 34.1 0.260 33.5 34.6 6 35.9 0.268 35.4 36.5 7 NA NA NA NA 8 38.7 0.265 38.1 39.3 9 38.9 0.252 38.4 39.5 10 40.2 0.242 39.7 40.7 11 38.1 0.358 37.3 38.8 12 33.9 0.385 33.1 34.7 13 28.9 0.460 27.9 29.8 14 28.0 0.351 27.3 28.8 15 30.3 0.343 29.6 31.0 16 33.2 0.287 32.6 33.8 17 37.7 0.296 37.0 38.3 18 40.0 0.220 39.5 40.5 19 38.6 0.361 37.9 39.4 20 42.0 0.309 41.3 42.6 21 46.1 0.312 45.4 46.8 22 52.8 0.501 51.7 53.8 > model.frame consump corpProf corpProfLag wages invest capitalLag privWage gnp gnpLag 1 39.8 12.7 NA 31.0 2.7 180 28.8 44.9 NA 2 41.9 12.4 12.7 28.2 -0.2 183 25.5 45.6 44.9 3 45.0 16.9 12.4 32.2 1.9 183 29.3 50.1 45.6 4 49.2 18.4 16.9 37.0 5.2 184 34.1 57.2 50.1 5 50.6 19.4 18.4 37.0 3.0 190 33.9 57.1 57.2 6 52.6 20.1 19.4 38.6 5.1 193 35.4 61.0 57.1 7 55.1 19.6 20.1 40.7 5.6 198 37.4 64.0 NA 8 56.2 19.8 19.6 41.5 4.2 203 37.9 64.4 64.0 9 57.3 21.1 19.8 42.9 3.0 208 39.2 64.5 64.4 10 57.8 21.7 21.1 NA 5.1 211 41.3 67.0 64.5 11 55.0 15.6 21.7 42.1 1.0 216 37.9 61.2 67.0 12 50.9 11.4 15.6 39.3 -3.4 217 34.5 53.4 61.2 13 45.6 NA 11.4 34.3 -6.2 213 29.0 44.3 53.4 14 46.5 11.2 7.0 34.1 -5.1 207 28.5 45.1 44.3 15 48.7 12.3 11.2 36.6 -3.0 202 30.6 49.7 45.1 16 51.3 14.0 12.3 39.3 NA 199 33.2 54.4 49.7 17 57.7 17.6 14.0 44.2 2.1 198 36.8 62.7 54.4 18 58.7 17.3 17.6 47.7 2.0 200 41.0 65.0 62.7 19 57.5 15.3 17.3 45.9 -1.9 202 38.2 60.9 65.0 20 61.6 19.0 15.3 49.4 1.3 200 41.6 69.5 60.9 21 65.0 21.1 19.0 53.0 3.3 201 45.0 75.7 69.5 22 69.7 23.5 21.1 61.8 4.9 204 53.3 88.4 75.7 trend 1 -11 2 -10 3 -9 4 -8 5 -7 6 -6 7 -5 8 -4 9 -3 10 -2 11 -1 12 0 13 1 14 2 15 3 16 4 17 5 18 6 19 7 20 8 21 9 22 10 > Frames of instrumental variables govExp taxes govWage trend capitalLag corpProfLag gnpLag 1 2.4 3.4 2.2 -11 180 NA NA 2 3.9 7.7 2.7 -10 183 12.7 44.9 3 3.2 3.9 2.9 -9 183 12.4 45.6 4 2.8 4.7 2.9 -8 184 16.9 50.1 5 3.5 3.8 3.1 -7 190 18.4 57.2 6 3.3 5.5 3.2 -6 193 19.4 57.1 7 3.3 7.0 3.3 -5 198 20.1 NA 8 4.0 6.7 3.6 -4 203 19.6 64.0 9 4.2 4.2 3.7 -3 208 19.8 64.4 10 4.1 4.0 4.0 -2 211 21.1 64.5 11 5.2 7.7 4.2 -1 216 21.7 67.0 12 5.9 7.5 4.8 0 217 15.6 61.2 13 4.9 8.3 5.3 1 213 11.4 53.4 14 3.7 5.4 5.6 2 207 7.0 44.3 15 4.0 6.8 6.0 3 202 11.2 45.1 16 4.4 7.2 6.1 4 199 12.3 49.7 17 2.9 8.3 7.4 5 198 14.0 54.4 18 4.3 6.7 6.7 6 200 17.6 62.7 19 5.3 7.4 7.7 7 202 17.3 65.0 20 6.6 8.9 7.8 8 200 15.3 60.9 21 7.4 9.6 8.0 9 201 19.0 69.5 22 13.8 11.6 8.5 10 204 21.1 75.7 govExp taxes govWage trend capitalLag corpProfLag gnpLag 1 2.4 3.4 2.2 -11 180 NA NA 2 3.9 7.7 2.7 -10 183 12.7 44.9 3 3.2 3.9 2.9 -9 183 12.4 45.6 4 2.8 4.7 2.9 -8 184 16.9 50.1 5 3.5 3.8 3.1 -7 190 18.4 57.2 6 3.3 5.5 3.2 -6 193 19.4 57.1 7 3.3 7.0 3.3 -5 198 20.1 NA 8 4.0 6.7 3.6 -4 203 19.6 64.0 9 4.2 4.2 3.7 -3 208 19.8 64.4 10 4.1 4.0 4.0 -2 211 21.1 64.5 11 5.2 7.7 4.2 -1 216 21.7 67.0 12 5.9 7.5 4.8 0 217 15.6 61.2 13 4.9 8.3 5.3 1 213 11.4 53.4 14 3.7 5.4 5.6 2 207 7.0 44.3 15 4.0 6.8 6.0 3 202 11.2 45.1 16 4.4 7.2 6.1 4 199 12.3 49.7 17 2.9 8.3 7.4 5 198 14.0 54.4 18 4.3 6.7 6.7 6 200 17.6 62.7 19 5.3 7.4 7.7 7 202 17.3 65.0 20 6.6 8.9 7.8 8 200 15.3 60.9 21 7.4 9.6 8.0 9 201 19.0 69.5 22 13.8 11.6 8.5 10 204 21.1 75.7 govExp taxes govWage trend capitalLag corpProfLag gnpLag 1 2.4 3.4 2.2 -11 180 NA NA 2 3.9 7.7 2.7 -10 183 12.7 44.9 3 3.2 3.9 2.9 -9 183 12.4 45.6 4 2.8 4.7 2.9 -8 184 16.9 50.1 5 3.5 3.8 3.1 -7 190 18.4 57.2 6 3.3 5.5 3.2 -6 193 19.4 57.1 7 3.3 7.0 3.3 -5 198 20.1 NA 8 4.0 6.7 3.6 -4 203 19.6 64.0 9 4.2 4.2 3.7 -3 208 19.8 64.4 10 4.1 4.0 4.0 -2 211 21.1 64.5 11 5.2 7.7 4.2 -1 216 21.7 67.0 12 5.9 7.5 4.8 0 217 15.6 61.2 13 4.9 8.3 5.3 1 213 11.4 53.4 14 3.7 5.4 5.6 2 207 7.0 44.3 15 4.0 6.8 6.0 3 202 11.2 45.1 16 4.4 7.2 6.1 4 199 12.3 49.7 17 2.9 8.3 7.4 5 198 14.0 54.4 18 4.3 6.7 6.7 6 200 17.6 62.7 19 5.3 7.4 7.7 7 202 17.3 65.0 20 6.6 8.9 7.8 8 200 15.3 60.9 21 7.4 9.6 8.0 9 201 19.0 69.5 22 13.8 11.6 8.5 10 204 21.1 75.7 > model.matrix [1] "Attributes: < Component \"dim\": Mean relative difference: 0.0345 >" [2] "Attributes: < Component \"dimnames\": Component 1: 51 string mismatches >" [3] "Numeric: lengths (696, 672) differ" > matrix of instrumental variables Consumption_(Intercept) Consumption_govExp Consumption_taxes Consumption_2 1 3.9 7.7 Consumption_3 1 3.2 3.9 Consumption_4 1 2.8 4.7 Consumption_5 1 3.5 3.8 Consumption_6 1 3.3 5.5 Consumption_8 1 4.0 6.7 Consumption_9 1 4.2 4.2 Consumption_11 1 5.2 7.7 Consumption_12 1 5.9 7.5 Consumption_14 1 3.7 5.4 Consumption_15 1 4.0 6.8 Consumption_16 1 4.4 7.2 Consumption_17 1 2.9 8.3 Consumption_18 1 4.3 6.7 Consumption_19 1 5.3 7.4 Consumption_20 1 6.6 8.9 Consumption_21 1 7.4 9.6 Consumption_22 1 13.8 11.6 Investment_2 0 0.0 0.0 Investment_3 0 0.0 0.0 Investment_4 0 0.0 0.0 Investment_5 0 0.0 0.0 Investment_6 0 0.0 0.0 Investment_8 0 0.0 0.0 Investment_9 0 0.0 0.0 Investment_10 0 0.0 0.0 Investment_11 0 0.0 0.0 Investment_12 0 0.0 0.0 Investment_14 0 0.0 0.0 Investment_15 0 0.0 0.0 Investment_17 0 0.0 0.0 Investment_18 0 0.0 0.0 Investment_19 0 0.0 0.0 Investment_20 0 0.0 0.0 Investment_21 0 0.0 0.0 Investment_22 0 0.0 0.0 PrivateWages_2 0 0.0 0.0 PrivateWages_3 0 0.0 0.0 PrivateWages_4 0 0.0 0.0 PrivateWages_5 0 0.0 0.0 PrivateWages_6 0 0.0 0.0 PrivateWages_8 0 0.0 0.0 PrivateWages_9 0 0.0 0.0 PrivateWages_10 0 0.0 0.0 PrivateWages_11 0 0.0 0.0 PrivateWages_12 0 0.0 0.0 PrivateWages_13 0 0.0 0.0 PrivateWages_14 0 0.0 0.0 PrivateWages_15 0 0.0 0.0 PrivateWages_16 0 0.0 0.0 PrivateWages_17 0 0.0 0.0 PrivateWages_18 0 0.0 0.0 PrivateWages_19 0 0.0 0.0 PrivateWages_20 0 0.0 0.0 PrivateWages_21 0 0.0 0.0 PrivateWages_22 0 0.0 0.0 Consumption_govWage Consumption_trend Consumption_capitalLag Consumption_2 2.7 -10 183 Consumption_3 2.9 -9 183 Consumption_4 2.9 -8 184 Consumption_5 3.1 -7 190 Consumption_6 3.2 -6 193 Consumption_8 3.6 -4 203 Consumption_9 3.7 -3 208 Consumption_11 4.2 -1 216 Consumption_12 4.8 0 217 Consumption_14 5.6 2 207 Consumption_15 6.0 3 202 Consumption_16 6.1 4 199 Consumption_17 7.4 5 198 Consumption_18 6.7 6 200 Consumption_19 7.7 7 202 Consumption_20 7.8 8 200 Consumption_21 8.0 9 201 Consumption_22 8.5 10 204 Investment_2 0.0 0 0 Investment_3 0.0 0 0 Investment_4 0.0 0 0 Investment_5 0.0 0 0 Investment_6 0.0 0 0 Investment_8 0.0 0 0 Investment_9 0.0 0 0 Investment_10 0.0 0 0 Investment_11 0.0 0 0 Investment_12 0.0 0 0 Investment_14 0.0 0 0 Investment_15 0.0 0 0 Investment_17 0.0 0 0 Investment_18 0.0 0 0 Investment_19 0.0 0 0 Investment_20 0.0 0 0 Investment_21 0.0 0 0 Investment_22 0.0 0 0 PrivateWages_2 0.0 0 0 PrivateWages_3 0.0 0 0 PrivateWages_4 0.0 0 0 PrivateWages_5 0.0 0 0 PrivateWages_6 0.0 0 0 PrivateWages_8 0.0 0 0 PrivateWages_9 0.0 0 0 PrivateWages_10 0.0 0 0 PrivateWages_11 0.0 0 0 PrivateWages_12 0.0 0 0 PrivateWages_13 0.0 0 0 PrivateWages_14 0.0 0 0 PrivateWages_15 0.0 0 0 PrivateWages_16 0.0 0 0 PrivateWages_17 0.0 0 0 PrivateWages_18 0.0 0 0 PrivateWages_19 0.0 0 0 PrivateWages_20 0.0 0 0 PrivateWages_21 0.0 0 0 PrivateWages_22 0.0 0 0 Consumption_corpProfLag Consumption_gnpLag Consumption_2 12.7 44.9 Consumption_3 12.4 45.6 Consumption_4 16.9 50.1 Consumption_5 18.4 57.2 Consumption_6 19.4 57.1 Consumption_8 19.6 64.0 Consumption_9 19.8 64.4 Consumption_11 21.7 67.0 Consumption_12 15.6 61.2 Consumption_14 7.0 44.3 Consumption_15 11.2 45.1 Consumption_16 12.3 49.7 Consumption_17 14.0 54.4 Consumption_18 17.6 62.7 Consumption_19 17.3 65.0 Consumption_20 15.3 60.9 Consumption_21 19.0 69.5 Consumption_22 21.1 75.7 Investment_2 0.0 0.0 Investment_3 0.0 0.0 Investment_4 0.0 0.0 Investment_5 0.0 0.0 Investment_6 0.0 0.0 Investment_8 0.0 0.0 Investment_9 0.0 0.0 Investment_10 0.0 0.0 Investment_11 0.0 0.0 Investment_12 0.0 0.0 Investment_14 0.0 0.0 Investment_15 0.0 0.0 Investment_17 0.0 0.0 Investment_18 0.0 0.0 Investment_19 0.0 0.0 Investment_20 0.0 0.0 Investment_21 0.0 0.0 Investment_22 0.0 0.0 PrivateWages_2 0.0 0.0 PrivateWages_3 0.0 0.0 PrivateWages_4 0.0 0.0 PrivateWages_5 0.0 0.0 PrivateWages_6 0.0 0.0 PrivateWages_8 0.0 0.0 PrivateWages_9 0.0 0.0 PrivateWages_10 0.0 0.0 PrivateWages_11 0.0 0.0 PrivateWages_12 0.0 0.0 PrivateWages_13 0.0 0.0 PrivateWages_14 0.0 0.0 PrivateWages_15 0.0 0.0 PrivateWages_16 0.0 0.0 PrivateWages_17 0.0 0.0 PrivateWages_18 0.0 0.0 PrivateWages_19 0.0 0.0 PrivateWages_20 0.0 0.0 PrivateWages_21 0.0 0.0 PrivateWages_22 0.0 0.0 Investment_(Intercept) Investment_govExp Investment_taxes Consumption_2 0 0.0 0.0 Consumption_3 0 0.0 0.0 Consumption_4 0 0.0 0.0 Consumption_5 0 0.0 0.0 Consumption_6 0 0.0 0.0 Consumption_8 0 0.0 0.0 Consumption_9 0 0.0 0.0 Consumption_11 0 0.0 0.0 Consumption_12 0 0.0 0.0 Consumption_14 0 0.0 0.0 Consumption_15 0 0.0 0.0 Consumption_16 0 0.0 0.0 Consumption_17 0 0.0 0.0 Consumption_18 0 0.0 0.0 Consumption_19 0 0.0 0.0 Consumption_20 0 0.0 0.0 Consumption_21 0 0.0 0.0 Consumption_22 0 0.0 0.0 Investment_2 1 3.9 7.7 Investment_3 1 3.2 3.9 Investment_4 1 2.8 4.7 Investment_5 1 3.5 3.8 Investment_6 1 3.3 5.5 Investment_8 1 4.0 6.7 Investment_9 1 4.2 4.2 Investment_10 1 4.1 4.0 Investment_11 1 5.2 7.7 Investment_12 1 5.9 7.5 Investment_14 1 3.7 5.4 Investment_15 1 4.0 6.8 Investment_17 1 2.9 8.3 Investment_18 1 4.3 6.7 Investment_19 1 5.3 7.4 Investment_20 1 6.6 8.9 Investment_21 1 7.4 9.6 Investment_22 1 13.8 11.6 PrivateWages_2 0 0.0 0.0 PrivateWages_3 0 0.0 0.0 PrivateWages_4 0 0.0 0.0 PrivateWages_5 0 0.0 0.0 PrivateWages_6 0 0.0 0.0 PrivateWages_8 0 0.0 0.0 PrivateWages_9 0 0.0 0.0 PrivateWages_10 0 0.0 0.0 PrivateWages_11 0 0.0 0.0 PrivateWages_12 0 0.0 0.0 PrivateWages_13 0 0.0 0.0 PrivateWages_14 0 0.0 0.0 PrivateWages_15 0 0.0 0.0 PrivateWages_16 0 0.0 0.0 PrivateWages_17 0 0.0 0.0 PrivateWages_18 0 0.0 0.0 PrivateWages_19 0 0.0 0.0 PrivateWages_20 0 0.0 0.0 PrivateWages_21 0 0.0 0.0 PrivateWages_22 0 0.0 0.0 Investment_govWage Investment_trend Investment_capitalLag Consumption_2 0.0 0 0 Consumption_3 0.0 0 0 Consumption_4 0.0 0 0 Consumption_5 0.0 0 0 Consumption_6 0.0 0 0 Consumption_8 0.0 0 0 Consumption_9 0.0 0 0 Consumption_11 0.0 0 0 Consumption_12 0.0 0 0 Consumption_14 0.0 0 0 Consumption_15 0.0 0 0 Consumption_16 0.0 0 0 Consumption_17 0.0 0 0 Consumption_18 0.0 0 0 Consumption_19 0.0 0 0 Consumption_20 0.0 0 0 Consumption_21 0.0 0 0 Consumption_22 0.0 0 0 Investment_2 2.7 -10 183 Investment_3 2.9 -9 183 Investment_4 2.9 -8 184 Investment_5 3.1 -7 190 Investment_6 3.2 -6 193 Investment_8 3.6 -4 203 Investment_9 3.7 -3 208 Investment_10 4.0 -2 211 Investment_11 4.2 -1 216 Investment_12 4.8 0 217 Investment_14 5.6 2 207 Investment_15 6.0 3 202 Investment_17 7.4 5 198 Investment_18 6.7 6 200 Investment_19 7.7 7 202 Investment_20 7.8 8 200 Investment_21 8.0 9 201 Investment_22 8.5 10 204 PrivateWages_2 0.0 0 0 PrivateWages_3 0.0 0 0 PrivateWages_4 0.0 0 0 PrivateWages_5 0.0 0 0 PrivateWages_6 0.0 0 0 PrivateWages_8 0.0 0 0 PrivateWages_9 0.0 0 0 PrivateWages_10 0.0 0 0 PrivateWages_11 0.0 0 0 PrivateWages_12 0.0 0 0 PrivateWages_13 0.0 0 0 PrivateWages_14 0.0 0 0 PrivateWages_15 0.0 0 0 PrivateWages_16 0.0 0 0 PrivateWages_17 0.0 0 0 PrivateWages_18 0.0 0 0 PrivateWages_19 0.0 0 0 PrivateWages_20 0.0 0 0 PrivateWages_21 0.0 0 0 PrivateWages_22 0.0 0 0 Investment_corpProfLag Investment_gnpLag Consumption_2 0.0 0.0 Consumption_3 0.0 0.0 Consumption_4 0.0 0.0 Consumption_5 0.0 0.0 Consumption_6 0.0 0.0 Consumption_8 0.0 0.0 Consumption_9 0.0 0.0 Consumption_11 0.0 0.0 Consumption_12 0.0 0.0 Consumption_14 0.0 0.0 Consumption_15 0.0 0.0 Consumption_16 0.0 0.0 Consumption_17 0.0 0.0 Consumption_18 0.0 0.0 Consumption_19 0.0 0.0 Consumption_20 0.0 0.0 Consumption_21 0.0 0.0 Consumption_22 0.0 0.0 Investment_2 12.7 44.9 Investment_3 12.4 45.6 Investment_4 16.9 50.1 Investment_5 18.4 57.2 Investment_6 19.4 57.1 Investment_8 19.6 64.0 Investment_9 19.8 64.4 Investment_10 21.1 64.5 Investment_11 21.7 67.0 Investment_12 15.6 61.2 Investment_14 7.0 44.3 Investment_15 11.2 45.1 Investment_17 14.0 54.4 Investment_18 17.6 62.7 Investment_19 17.3 65.0 Investment_20 15.3 60.9 Investment_21 19.0 69.5 Investment_22 21.1 75.7 PrivateWages_2 0.0 0.0 PrivateWages_3 0.0 0.0 PrivateWages_4 0.0 0.0 PrivateWages_5 0.0 0.0 PrivateWages_6 0.0 0.0 PrivateWages_8 0.0 0.0 PrivateWages_9 0.0 0.0 PrivateWages_10 0.0 0.0 PrivateWages_11 0.0 0.0 PrivateWages_12 0.0 0.0 PrivateWages_13 0.0 0.0 PrivateWages_14 0.0 0.0 PrivateWages_15 0.0 0.0 PrivateWages_16 0.0 0.0 PrivateWages_17 0.0 0.0 PrivateWages_18 0.0 0.0 PrivateWages_19 0.0 0.0 PrivateWages_20 0.0 0.0 PrivateWages_21 0.0 0.0 PrivateWages_22 0.0 0.0 PrivateWages_(Intercept) PrivateWages_govExp PrivateWages_taxes Consumption_2 0 0.0 0.0 Consumption_3 0 0.0 0.0 Consumption_4 0 0.0 0.0 Consumption_5 0 0.0 0.0 Consumption_6 0 0.0 0.0 Consumption_8 0 0.0 0.0 Consumption_9 0 0.0 0.0 Consumption_11 0 0.0 0.0 Consumption_12 0 0.0 0.0 Consumption_14 0 0.0 0.0 Consumption_15 0 0.0 0.0 Consumption_16 0 0.0 0.0 Consumption_17 0 0.0 0.0 Consumption_18 0 0.0 0.0 Consumption_19 0 0.0 0.0 Consumption_20 0 0.0 0.0 Consumption_21 0 0.0 0.0 Consumption_22 0 0.0 0.0 Investment_2 0 0.0 0.0 Investment_3 0 0.0 0.0 Investment_4 0 0.0 0.0 Investment_5 0 0.0 0.0 Investment_6 0 0.0 0.0 Investment_8 0 0.0 0.0 Investment_9 0 0.0 0.0 Investment_10 0 0.0 0.0 Investment_11 0 0.0 0.0 Investment_12 0 0.0 0.0 Investment_14 0 0.0 0.0 Investment_15 0 0.0 0.0 Investment_17 0 0.0 0.0 Investment_18 0 0.0 0.0 Investment_19 0 0.0 0.0 Investment_20 0 0.0 0.0 Investment_21 0 0.0 0.0 Investment_22 0 0.0 0.0 PrivateWages_2 1 3.9 7.7 PrivateWages_3 1 3.2 3.9 PrivateWages_4 1 2.8 4.7 PrivateWages_5 1 3.5 3.8 PrivateWages_6 1 3.3 5.5 PrivateWages_8 1 4.0 6.7 PrivateWages_9 1 4.2 4.2 PrivateWages_10 1 4.1 4.0 PrivateWages_11 1 5.2 7.7 PrivateWages_12 1 5.9 7.5 PrivateWages_13 1 4.9 8.3 PrivateWages_14 1 3.7 5.4 PrivateWages_15 1 4.0 6.8 PrivateWages_16 1 4.4 7.2 PrivateWages_17 1 2.9 8.3 PrivateWages_18 1 4.3 6.7 PrivateWages_19 1 5.3 7.4 PrivateWages_20 1 6.6 8.9 PrivateWages_21 1 7.4 9.6 PrivateWages_22 1 13.8 11.6 PrivateWages_govWage PrivateWages_trend PrivateWages_capitalLag Consumption_2 0.0 0 0 Consumption_3 0.0 0 0 Consumption_4 0.0 0 0 Consumption_5 0.0 0 0 Consumption_6 0.0 0 0 Consumption_8 0.0 0 0 Consumption_9 0.0 0 0 Consumption_11 0.0 0 0 Consumption_12 0.0 0 0 Consumption_14 0.0 0 0 Consumption_15 0.0 0 0 Consumption_16 0.0 0 0 Consumption_17 0.0 0 0 Consumption_18 0.0 0 0 Consumption_19 0.0 0 0 Consumption_20 0.0 0 0 Consumption_21 0.0 0 0 Consumption_22 0.0 0 0 Investment_2 0.0 0 0 Investment_3 0.0 0 0 Investment_4 0.0 0 0 Investment_5 0.0 0 0 Investment_6 0.0 0 0 Investment_8 0.0 0 0 Investment_9 0.0 0 0 Investment_10 0.0 0 0 Investment_11 0.0 0 0 Investment_12 0.0 0 0 Investment_14 0.0 0 0 Investment_15 0.0 0 0 Investment_17 0.0 0 0 Investment_18 0.0 0 0 Investment_19 0.0 0 0 Investment_20 0.0 0 0 Investment_21 0.0 0 0 Investment_22 0.0 0 0 PrivateWages_2 2.7 -10 183 PrivateWages_3 2.9 -9 183 PrivateWages_4 2.9 -8 184 PrivateWages_5 3.1 -7 190 PrivateWages_6 3.2 -6 193 PrivateWages_8 3.6 -4 203 PrivateWages_9 3.7 -3 208 PrivateWages_10 4.0 -2 211 PrivateWages_11 4.2 -1 216 PrivateWages_12 4.8 0 217 PrivateWages_13 5.3 1 213 PrivateWages_14 5.6 2 207 PrivateWages_15 6.0 3 202 PrivateWages_16 6.1 4 199 PrivateWages_17 7.4 5 198 PrivateWages_18 6.7 6 200 PrivateWages_19 7.7 7 202 PrivateWages_20 7.8 8 200 PrivateWages_21 8.0 9 201 PrivateWages_22 8.5 10 204 PrivateWages_corpProfLag PrivateWages_gnpLag Consumption_2 0.0 0.0 Consumption_3 0.0 0.0 Consumption_4 0.0 0.0 Consumption_5 0.0 0.0 Consumption_6 0.0 0.0 Consumption_8 0.0 0.0 Consumption_9 0.0 0.0 Consumption_11 0.0 0.0 Consumption_12 0.0 0.0 Consumption_14 0.0 0.0 Consumption_15 0.0 0.0 Consumption_16 0.0 0.0 Consumption_17 0.0 0.0 Consumption_18 0.0 0.0 Consumption_19 0.0 0.0 Consumption_20 0.0 0.0 Consumption_21 0.0 0.0 Consumption_22 0.0 0.0 Investment_2 0.0 0.0 Investment_3 0.0 0.0 Investment_4 0.0 0.0 Investment_5 0.0 0.0 Investment_6 0.0 0.0 Investment_8 0.0 0.0 Investment_9 0.0 0.0 Investment_10 0.0 0.0 Investment_11 0.0 0.0 Investment_12 0.0 0.0 Investment_14 0.0 0.0 Investment_15 0.0 0.0 Investment_17 0.0 0.0 Investment_18 0.0 0.0 Investment_19 0.0 0.0 Investment_20 0.0 0.0 Investment_21 0.0 0.0 Investment_22 0.0 0.0 PrivateWages_2 12.7 44.9 PrivateWages_3 12.4 45.6 PrivateWages_4 16.9 50.1 PrivateWages_5 18.4 57.2 PrivateWages_6 19.4 57.1 PrivateWages_8 19.6 64.0 PrivateWages_9 19.8 64.4 PrivateWages_10 21.1 64.5 PrivateWages_11 21.7 67.0 PrivateWages_12 15.6 61.2 PrivateWages_13 11.4 53.4 PrivateWages_14 7.0 44.3 PrivateWages_15 11.2 45.1 PrivateWages_16 12.3 49.7 PrivateWages_17 14.0 54.4 PrivateWages_18 17.6 62.7 PrivateWages_19 17.3 65.0 PrivateWages_20 15.3 60.9 PrivateWages_21 19.0 69.5 PrivateWages_22 21.1 75.7 > matrix of fitted regressors Consumption_(Intercept) Consumption_corpProf Consumption_2 1 14.0 Consumption_3 1 16.7 Consumption_4 1 18.5 Consumption_5 1 20.3 Consumption_6 1 19.0 Consumption_8 1 17.6 Consumption_9 1 18.9 Consumption_11 1 16.7 Consumption_12 1 13.4 Consumption_14 1 10.0 Consumption_15 1 12.5 Consumption_16 1 14.5 Consumption_17 1 14.9 Consumption_18 1 19.4 Consumption_19 1 19.1 Consumption_20 1 17.7 Consumption_21 1 20.4 Consumption_22 1 22.7 Investment_2 0 0.0 Investment_3 0 0.0 Investment_4 0 0.0 Investment_5 0 0.0 Investment_6 0 0.0 Investment_8 0 0.0 Investment_9 0 0.0 Investment_10 0 0.0 Investment_11 0 0.0 Investment_12 0 0.0 Investment_14 0 0.0 Investment_15 0 0.0 Investment_17 0 0.0 Investment_18 0 0.0 Investment_19 0 0.0 Investment_20 0 0.0 Investment_21 0 0.0 Investment_22 0 0.0 PrivateWages_2 0 0.0 PrivateWages_3 0 0.0 PrivateWages_4 0 0.0 PrivateWages_5 0 0.0 PrivateWages_6 0 0.0 PrivateWages_8 0 0.0 PrivateWages_9 0 0.0 PrivateWages_10 0 0.0 PrivateWages_11 0 0.0 PrivateWages_12 0 0.0 PrivateWages_13 0 0.0 PrivateWages_14 0 0.0 PrivateWages_15 0 0.0 PrivateWages_16 0 0.0 PrivateWages_17 0 0.0 PrivateWages_18 0 0.0 PrivateWages_19 0 0.0 PrivateWages_20 0 0.0 PrivateWages_21 0 0.0 PrivateWages_22 0 0.0 Consumption_corpProfLag Consumption_wages Consumption_2 12.7 29.8 Consumption_3 12.4 31.8 Consumption_4 16.9 35.3 Consumption_5 18.4 38.6 Consumption_6 19.4 38.5 Consumption_8 19.6 40.0 Consumption_9 19.8 41.8 Consumption_11 21.7 43.1 Consumption_12 15.6 39.7 Consumption_14 7.0 33.3 Consumption_15 11.2 37.3 Consumption_16 12.3 40.1 Consumption_17 14.0 41.8 Consumption_18 17.6 47.6 Consumption_19 17.3 49.2 Consumption_20 15.3 48.6 Consumption_21 19.0 53.4 Consumption_22 21.1 60.8 Investment_2 0.0 0.0 Investment_3 0.0 0.0 Investment_4 0.0 0.0 Investment_5 0.0 0.0 Investment_6 0.0 0.0 Investment_8 0.0 0.0 Investment_9 0.0 0.0 Investment_10 0.0 0.0 Investment_11 0.0 0.0 Investment_12 0.0 0.0 Investment_14 0.0 0.0 Investment_15 0.0 0.0 Investment_17 0.0 0.0 Investment_18 0.0 0.0 Investment_19 0.0 0.0 Investment_20 0.0 0.0 Investment_21 0.0 0.0 Investment_22 0.0 0.0 PrivateWages_2 0.0 0.0 PrivateWages_3 0.0 0.0 PrivateWages_4 0.0 0.0 PrivateWages_5 0.0 0.0 PrivateWages_6 0.0 0.0 PrivateWages_8 0.0 0.0 PrivateWages_9 0.0 0.0 PrivateWages_10 0.0 0.0 PrivateWages_11 0.0 0.0 PrivateWages_12 0.0 0.0 PrivateWages_13 0.0 0.0 PrivateWages_14 0.0 0.0 PrivateWages_15 0.0 0.0 PrivateWages_16 0.0 0.0 PrivateWages_17 0.0 0.0 PrivateWages_18 0.0 0.0 PrivateWages_19 0.0 0.0 PrivateWages_20 0.0 0.0 PrivateWages_21 0.0 0.0 PrivateWages_22 0.0 0.0 Investment_(Intercept) Investment_corpProf Consumption_2 0 0.0 Consumption_3 0 0.0 Consumption_4 0 0.0 Consumption_5 0 0.0 Consumption_6 0 0.0 Consumption_8 0 0.0 Consumption_9 0 0.0 Consumption_11 0 0.0 Consumption_12 0 0.0 Consumption_14 0 0.0 Consumption_15 0 0.0 Consumption_16 0 0.0 Consumption_17 0 0.0 Consumption_18 0 0.0 Consumption_19 0 0.0 Consumption_20 0 0.0 Consumption_21 0 0.0 Consumption_22 0 0.0 Investment_2 1 13.4 Investment_3 1 16.7 Investment_4 1 18.8 Investment_5 1 20.6 Investment_6 1 19.3 Investment_8 1 17.5 Investment_9 1 19.5 Investment_10 1 20.2 Investment_11 1 17.2 Investment_12 1 13.5 Investment_14 1 10.1 Investment_15 1 13.0 Investment_17 1 14.9 Investment_18 1 19.5 Investment_19 1 19.3 Investment_20 1 17.5 Investment_21 1 20.2 Investment_22 1 22.8 PrivateWages_2 0 0.0 PrivateWages_3 0 0.0 PrivateWages_4 0 0.0 PrivateWages_5 0 0.0 PrivateWages_6 0 0.0 PrivateWages_8 0 0.0 PrivateWages_9 0 0.0 PrivateWages_10 0 0.0 PrivateWages_11 0 0.0 PrivateWages_12 0 0.0 PrivateWages_13 0 0.0 PrivateWages_14 0 0.0 PrivateWages_15 0 0.0 PrivateWages_16 0 0.0 PrivateWages_17 0 0.0 PrivateWages_18 0 0.0 PrivateWages_19 0 0.0 PrivateWages_20 0 0.0 PrivateWages_21 0 0.0 PrivateWages_22 0 0.0 Investment_corpProfLag Investment_capitalLag Consumption_2 0.0 0 Consumption_3 0.0 0 Consumption_4 0.0 0 Consumption_5 0.0 0 Consumption_6 0.0 0 Consumption_8 0.0 0 Consumption_9 0.0 0 Consumption_11 0.0 0 Consumption_12 0.0 0 Consumption_14 0.0 0 Consumption_15 0.0 0 Consumption_16 0.0 0 Consumption_17 0.0 0 Consumption_18 0.0 0 Consumption_19 0.0 0 Consumption_20 0.0 0 Consumption_21 0.0 0 Consumption_22 0.0 0 Investment_2 12.7 183 Investment_3 12.4 183 Investment_4 16.9 184 Investment_5 18.4 190 Investment_6 19.4 193 Investment_8 19.6 203 Investment_9 19.8 208 Investment_10 21.1 211 Investment_11 21.7 216 Investment_12 15.6 217 Investment_14 7.0 207 Investment_15 11.2 202 Investment_17 14.0 198 Investment_18 17.6 200 Investment_19 17.3 202 Investment_20 15.3 200 Investment_21 19.0 201 Investment_22 21.1 204 PrivateWages_2 0.0 0 PrivateWages_3 0.0 0 PrivateWages_4 0.0 0 PrivateWages_5 0.0 0 PrivateWages_6 0.0 0 PrivateWages_8 0.0 0 PrivateWages_9 0.0 0 PrivateWages_10 0.0 0 PrivateWages_11 0.0 0 PrivateWages_12 0.0 0 PrivateWages_13 0.0 0 PrivateWages_14 0.0 0 PrivateWages_15 0.0 0 PrivateWages_16 0.0 0 PrivateWages_17 0.0 0 PrivateWages_18 0.0 0 PrivateWages_19 0.0 0 PrivateWages_20 0.0 0 PrivateWages_21 0.0 0 PrivateWages_22 0.0 0 PrivateWages_(Intercept) PrivateWages_gnp PrivateWages_gnpLag Consumption_2 0 0.0 0.0 Consumption_3 0 0.0 0.0 Consumption_4 0 0.0 0.0 Consumption_5 0 0.0 0.0 Consumption_6 0 0.0 0.0 Consumption_8 0 0.0 0.0 Consumption_9 0 0.0 0.0 Consumption_11 0 0.0 0.0 Consumption_12 0 0.0 0.0 Consumption_14 0 0.0 0.0 Consumption_15 0 0.0 0.0 Consumption_16 0 0.0 0.0 Consumption_17 0 0.0 0.0 Consumption_18 0 0.0 0.0 Consumption_19 0 0.0 0.0 Consumption_20 0 0.0 0.0 Consumption_21 0 0.0 0.0 Consumption_22 0 0.0 0.0 Investment_2 0 0.0 0.0 Investment_3 0 0.0 0.0 Investment_4 0 0.0 0.0 Investment_5 0 0.0 0.0 Investment_6 0 0.0 0.0 Investment_8 0 0.0 0.0 Investment_9 0 0.0 0.0 Investment_10 0 0.0 0.0 Investment_11 0 0.0 0.0 Investment_12 0 0.0 0.0 Investment_14 0 0.0 0.0 Investment_15 0 0.0 0.0 Investment_17 0 0.0 0.0 Investment_18 0 0.0 0.0 Investment_19 0 0.0 0.0 Investment_20 0 0.0 0.0 Investment_21 0 0.0 0.0 Investment_22 0 0.0 0.0 PrivateWages_2 1 47.1 44.9 PrivateWages_3 1 49.6 45.6 PrivateWages_4 1 56.5 50.1 PrivateWages_5 1 60.7 57.2 PrivateWages_6 1 60.6 57.1 PrivateWages_8 1 60.0 64.0 PrivateWages_9 1 62.3 64.4 PrivateWages_10 1 64.6 64.5 PrivateWages_11 1 63.7 67.0 PrivateWages_12 1 54.8 61.2 PrivateWages_13 1 47.0 53.4 PrivateWages_14 1 42.1 44.3 PrivateWages_15 1 51.2 45.1 PrivateWages_16 1 55.3 49.7 PrivateWages_17 1 57.4 54.4 PrivateWages_18 1 67.2 62.7 PrivateWages_19 1 68.5 65.0 PrivateWages_20 1 66.8 60.9 PrivateWages_21 1 74.9 69.5 PrivateWages_22 1 86.9 75.7 PrivateWages_trend Consumption_2 0 Consumption_3 0 Consumption_4 0 Consumption_5 0 Consumption_6 0 Consumption_8 0 Consumption_9 0 Consumption_11 0 Consumption_12 0 Consumption_14 0 Consumption_15 0 Consumption_16 0 Consumption_17 0 Consumption_18 0 Consumption_19 0 Consumption_20 0 Consumption_21 0 Consumption_22 0 Investment_2 0 Investment_3 0 Investment_4 0 Investment_5 0 Investment_6 0 Investment_8 0 Investment_9 0 Investment_10 0 Investment_11 0 Investment_12 0 Investment_14 0 Investment_15 0 Investment_17 0 Investment_18 0 Investment_19 0 Investment_20 0 Investment_21 0 Investment_22 0 PrivateWages_2 -10 PrivateWages_3 -9 PrivateWages_4 -8 PrivateWages_5 -7 PrivateWages_6 -6 PrivateWages_8 -4 PrivateWages_9 -3 PrivateWages_10 -2 PrivateWages_11 -1 PrivateWages_12 0 PrivateWages_13 1 PrivateWages_14 2 PrivateWages_15 3 PrivateWages_16 4 PrivateWages_17 5 PrivateWages_18 6 PrivateWages_19 7 PrivateWages_20 8 PrivateWages_21 9 PrivateWages_22 10 > nobs [1] 56 > linearHypothesis Linear hypothesis test (Theil's F test) Hypothesis: Consumption_corpProf + Investment_capitalLag = 0 Model 1: restricted model Model 2: kleinModel Res.Df Df F Pr(>F) 1 45 2 44 1 1.27 0.27 Linear hypothesis test (F statistic of a Wald test) Hypothesis: Consumption_corpProf + Investment_capitalLag = 0 Model 1: restricted model Model 2: kleinModel Res.Df Df F Pr(>F) 1 45 2 44 1 1.66 0.2 Linear hypothesis test (Chi^2 statistic of a Wald test) Hypothesis: Consumption_corpProf + Investment_capitalLag = 0 Model 1: restricted model Model 2: kleinModel Res.Df Df Chisq Pr(>Chisq) 1 45 2 44 1 1.66 0.2 Linear hypothesis test (Theil's F test) Hypothesis: Consumption_corpProf + Investment_capitalLag = 0 Consumption_corpProfLag - PrivateWages_trend = 0 Model 1: restricted model Model 2: kleinModel Res.Df Df F Pr(>F) 1 46 2 44 2 0.64 0.53 Linear hypothesis test (F statistic of a Wald test) Hypothesis: Consumption_corpProf + Investment_capitalLag = 0 Consumption_corpProfLag - PrivateWages_trend = 0 Model 1: restricted model Model 2: kleinModel Res.Df Df F Pr(>F) 1 46 2 44 2 0.84 0.44 Linear hypothesis test (Chi^2 statistic of a Wald test) Hypothesis: Consumption_corpProf + Investment_capitalLag = 0 Consumption_corpProfLag - PrivateWages_trend = 0 Model 1: restricted model Model 2: kleinModel Res.Df Df Chisq Pr(>Chisq) 1 46 2 44 2 1.68 0.43 > logLik 'log Lik.' -69.5 (df=13) 'log Lik.' -77.5 (df=13) Estimating function Consumption_(Intercept) Consumption_corpProf Consumption_2 -1.891 -26.49 Consumption_3 -0.190 -3.16 Consumption_4 0.294 5.45 Consumption_5 -1.285 -26.05 Consumption_6 0.431 8.19 Consumption_8 2.670 47.11 Consumption_9 2.363 44.77 Consumption_11 -1.642 -27.49 Consumption_12 -1.735 -23.21 Consumption_14 0.834 8.35 Consumption_15 -1.061 -13.27 Consumption_16 -0.885 -12.82 Consumption_17 3.801 56.68 Consumption_18 -0.502 -9.76 Consumption_19 -3.000 -57.33 Consumption_20 2.012 35.52 Consumption_21 0.746 15.21 Consumption_22 -0.957 -21.70 Investment_2 0.000 0.00 Investment_3 0.000 0.00 Investment_4 0.000 0.00 Investment_5 0.000 0.00 Investment_6 0.000 0.00 Investment_8 0.000 0.00 Investment_9 0.000 0.00 Investment_10 0.000 0.00 Investment_11 0.000 0.00 Investment_12 0.000 0.00 Investment_14 0.000 0.00 Investment_15 0.000 0.00 Investment_17 0.000 0.00 Investment_18 0.000 0.00 Investment_19 0.000 0.00 Investment_20 0.000 0.00 Investment_21 0.000 0.00 Investment_22 0.000 0.00 PrivateWages_2 0.000 0.00 PrivateWages_3 0.000 0.00 PrivateWages_4 0.000 0.00 PrivateWages_5 0.000 0.00 PrivateWages_6 0.000 0.00 PrivateWages_8 0.000 0.00 PrivateWages_9 0.000 0.00 PrivateWages_10 0.000 0.00 PrivateWages_11 0.000 0.00 PrivateWages_12 0.000 0.00 PrivateWages_13 0.000 0.00 PrivateWages_14 0.000 0.00 PrivateWages_15 0.000 0.00 PrivateWages_16 0.000 0.00 PrivateWages_17 0.000 0.00 PrivateWages_18 0.000 0.00 PrivateWages_19 0.000 0.00 PrivateWages_20 0.000 0.00 PrivateWages_21 0.000 0.00 PrivateWages_22 0.000 0.00 Consumption_corpProfLag Consumption_wages Consumption_2 -24.01 -56.38 Consumption_3 -2.35 -6.04 Consumption_4 4.96 10.35 Consumption_5 -23.65 -49.61 Consumption_6 8.35 16.60 Consumption_8 52.33 106.81 Consumption_9 46.80 98.74 Consumption_11 -35.64 -70.78 Consumption_12 -27.07 -68.81 Consumption_14 5.83 27.78 Consumption_15 -11.88 -39.61 Consumption_16 -10.89 -35.54 Consumption_17 53.21 158.79 Consumption_18 -8.84 -23.92 Consumption_19 -51.90 -147.70 Consumption_20 30.78 97.67 Consumption_21 14.17 39.83 Consumption_22 -20.20 -58.19 Investment_2 0.00 0.00 Investment_3 0.00 0.00 Investment_4 0.00 0.00 Investment_5 0.00 0.00 Investment_6 0.00 0.00 Investment_8 0.00 0.00 Investment_9 0.00 0.00 Investment_10 0.00 0.00 Investment_11 0.00 0.00 Investment_12 0.00 0.00 Investment_14 0.00 0.00 Investment_15 0.00 0.00 Investment_17 0.00 0.00 Investment_18 0.00 0.00 Investment_19 0.00 0.00 Investment_20 0.00 0.00 Investment_21 0.00 0.00 Investment_22 0.00 0.00 PrivateWages_2 0.00 0.00 PrivateWages_3 0.00 0.00 PrivateWages_4 0.00 0.00 PrivateWages_5 0.00 0.00 PrivateWages_6 0.00 0.00 PrivateWages_8 0.00 0.00 PrivateWages_9 0.00 0.00 PrivateWages_10 0.00 0.00 PrivateWages_11 0.00 0.00 PrivateWages_12 0.00 0.00 PrivateWages_13 0.00 0.00 PrivateWages_14 0.00 0.00 PrivateWages_15 0.00 0.00 PrivateWages_16 0.00 0.00 PrivateWages_17 0.00 0.00 PrivateWages_18 0.00 0.00 PrivateWages_19 0.00 0.00 PrivateWages_20 0.00 0.00 PrivateWages_21 0.00 0.00 PrivateWages_22 0.00 0.00 Investment_(Intercept) Investment_corpProf Consumption_2 0.000 0.00 Consumption_3 0.000 0.00 Consumption_4 0.000 0.00 Consumption_5 0.000 0.00 Consumption_6 0.000 0.00 Consumption_8 0.000 0.00 Consumption_9 0.000 0.00 Consumption_11 0.000 0.00 Consumption_12 0.000 0.00 Consumption_14 0.000 0.00 Consumption_15 0.000 0.00 Consumption_16 0.000 0.00 Consumption_17 0.000 0.00 Consumption_18 0.000 0.00 Consumption_19 0.000 0.00 Consumption_20 0.000 0.00 Consumption_21 0.000 0.00 Consumption_22 0.000 0.00 Investment_2 -1.375 -18.47 Investment_3 0.361 6.02 Investment_4 1.027 19.33 Investment_5 -1.558 -32.12 Investment_6 0.610 11.77 Investment_8 1.420 24.90 Investment_9 0.404 7.88 Investment_10 2.082 42.13 Investment_11 -1.150 -19.79 Investment_12 -1.339 -18.06 Investment_14 1.019 10.28 Investment_15 -0.475 -6.17 Investment_17 2.105 31.39 Investment_18 -0.465 -9.06 Investment_19 -3.871 -74.65 Investment_20 0.469 8.23 Investment_21 0.132 2.65 Investment_22 0.603 13.74 PrivateWages_2 0.000 0.00 PrivateWages_3 0.000 0.00 PrivateWages_4 0.000 0.00 PrivateWages_5 0.000 0.00 PrivateWages_6 0.000 0.00 PrivateWages_8 0.000 0.00 PrivateWages_9 0.000 0.00 PrivateWages_10 0.000 0.00 PrivateWages_11 0.000 0.00 PrivateWages_12 0.000 0.00 PrivateWages_13 0.000 0.00 PrivateWages_14 0.000 0.00 PrivateWages_15 0.000 0.00 PrivateWages_16 0.000 0.00 PrivateWages_17 0.000 0.00 PrivateWages_18 0.000 0.00 PrivateWages_19 0.000 0.00 PrivateWages_20 0.000 0.00 PrivateWages_21 0.000 0.00 PrivateWages_22 0.000 0.00 Investment_corpProfLag Investment_capitalLag Consumption_2 0.00 0.0 Consumption_3 0.00 0.0 Consumption_4 0.00 0.0 Consumption_5 0.00 0.0 Consumption_6 0.00 0.0 Consumption_8 0.00 0.0 Consumption_9 0.00 0.0 Consumption_11 0.00 0.0 Consumption_12 0.00 0.0 Consumption_14 0.00 0.0 Consumption_15 0.00 0.0 Consumption_16 0.00 0.0 Consumption_17 0.00 0.0 Consumption_18 0.00 0.0 Consumption_19 0.00 0.0 Consumption_20 0.00 0.0 Consumption_21 0.00 0.0 Consumption_22 0.00 0.0 Investment_2 -17.46 -251.4 Investment_3 4.48 65.9 Investment_4 17.35 189.4 Investment_5 -28.67 -295.5 Investment_6 11.83 117.5 Investment_8 27.83 288.8 Investment_9 8.00 83.9 Investment_10 43.93 438.5 Investment_11 -24.96 -248.1 Investment_12 -20.88 -290.1 Investment_14 7.14 211.1 Investment_15 -5.32 -95.9 Investment_17 29.48 416.3 Investment_18 -8.18 -92.9 Investment_19 -66.97 -781.2 Investment_20 7.18 93.8 Investment_21 2.50 26.5 Investment_22 12.73 123.4 PrivateWages_2 0.00 0.0 PrivateWages_3 0.00 0.0 PrivateWages_4 0.00 0.0 PrivateWages_5 0.00 0.0 PrivateWages_6 0.00 0.0 PrivateWages_8 0.00 0.0 PrivateWages_9 0.00 0.0 PrivateWages_10 0.00 0.0 PrivateWages_11 0.00 0.0 PrivateWages_12 0.00 0.0 PrivateWages_13 0.00 0.0 PrivateWages_14 0.00 0.0 PrivateWages_15 0.00 0.0 PrivateWages_16 0.00 0.0 PrivateWages_17 0.00 0.0 PrivateWages_18 0.00 0.0 PrivateWages_19 0.00 0.0 PrivateWages_20 0.00 0.0 PrivateWages_21 0.00 0.0 PrivateWages_22 0.00 0.0 PrivateWages_(Intercept) PrivateWages_gnp PrivateWages_gnpLag Consumption_2 0.0000 0.00 0.00 Consumption_3 0.0000 0.00 0.00 Consumption_4 0.0000 0.00 0.00 Consumption_5 0.0000 0.00 0.00 Consumption_6 0.0000 0.00 0.00 Consumption_8 0.0000 0.00 0.00 Consumption_9 0.0000 0.00 0.00 Consumption_11 0.0000 0.00 0.00 Consumption_12 0.0000 0.00 0.00 Consumption_14 0.0000 0.00 0.00 Consumption_15 0.0000 0.00 0.00 Consumption_16 0.0000 0.00 0.00 Consumption_17 0.0000 0.00 0.00 Consumption_18 0.0000 0.00 0.00 Consumption_19 0.0000 0.00 0.00 Consumption_20 0.0000 0.00 0.00 Consumption_21 0.0000 0.00 0.00 Consumption_22 0.0000 0.00 0.00 Investment_2 0.0000 0.00 0.00 Investment_3 0.0000 0.00 0.00 Investment_4 0.0000 0.00 0.00 Investment_5 0.0000 0.00 0.00 Investment_6 0.0000 0.00 0.00 Investment_8 0.0000 0.00 0.00 Investment_9 0.0000 0.00 0.00 Investment_10 0.0000 0.00 0.00 Investment_11 0.0000 0.00 0.00 Investment_12 0.0000 0.00 0.00 Investment_14 0.0000 0.00 0.00 Investment_15 0.0000 0.00 0.00 Investment_17 0.0000 0.00 0.00 Investment_18 0.0000 0.00 0.00 Investment_19 0.0000 0.00 0.00 Investment_20 0.0000 0.00 0.00 Investment_21 0.0000 0.00 0.00 Investment_22 0.0000 0.00 0.00 PrivateWages_2 -1.9924 -93.78 -89.46 PrivateWages_3 0.4683 23.22 21.35 PrivateWages_4 1.4034 79.35 70.31 PrivateWages_5 -1.7870 -108.45 -102.22 PrivateWages_6 -0.3627 -21.98 -20.71 PrivateWages_8 1.1629 69.77 74.43 PrivateWages_9 1.2735 79.30 82.01 PrivateWages_10 2.2141 142.96 142.81 PrivateWages_11 -1.2912 -82.26 -86.51 PrivateWages_12 -0.0350 -1.92 -2.14 PrivateWages_13 -1.0438 -49.04 -55.74 PrivateWages_14 1.8016 75.90 79.81 PrivateWages_15 -0.3714 -19.02 -16.75 PrivateWages_16 -0.3904 -21.61 -19.40 PrivateWages_17 1.4934 85.71 81.24 PrivateWages_18 0.0279 1.88 1.75 PrivateWages_19 -3.8229 -261.91 -248.49 PrivateWages_20 0.7870 52.61 47.93 PrivateWages_21 -0.7415 -55.52 -51.54 PrivateWages_22 1.2062 104.79 91.31 PrivateWages_trend Consumption_2 0.000 Consumption_3 0.000 Consumption_4 0.000 Consumption_5 0.000 Consumption_6 0.000 Consumption_8 0.000 Consumption_9 0.000 Consumption_11 0.000 Consumption_12 0.000 Consumption_14 0.000 Consumption_15 0.000 Consumption_16 0.000 Consumption_17 0.000 Consumption_18 0.000 Consumption_19 0.000 Consumption_20 0.000 Consumption_21 0.000 Consumption_22 0.000 Investment_2 0.000 Investment_3 0.000 Investment_4 0.000 Investment_5 0.000 Investment_6 0.000 Investment_8 0.000 Investment_9 0.000 Investment_10 0.000 Investment_11 0.000 Investment_12 0.000 Investment_14 0.000 Investment_15 0.000 Investment_17 0.000 Investment_18 0.000 Investment_19 0.000 Investment_20 0.000 Investment_21 0.000 Investment_22 0.000 PrivateWages_2 19.924 PrivateWages_3 -4.214 PrivateWages_4 -11.227 PrivateWages_5 12.509 PrivateWages_6 2.176 PrivateWages_8 -4.652 PrivateWages_9 -3.820 PrivateWages_10 -4.428 PrivateWages_11 1.291 PrivateWages_12 0.000 PrivateWages_13 -1.044 PrivateWages_14 3.603 PrivateWages_15 -1.114 PrivateWages_16 -1.562 PrivateWages_17 7.467 PrivateWages_18 0.168 PrivateWages_19 -26.760 PrivateWages_20 6.296 PrivateWages_21 -6.674 PrivateWages_22 12.062 [1] TRUE > Bread Consumption_(Intercept) Consumption_corpProf Consumption_(Intercept) 116.13 -4.139 Consumption_corpProf -4.14 1.213 Consumption_corpProfLag 1.01 -0.677 Consumption_wages -1.41 -0.133 Investment_(Intercept) 0.00 0.000 Investment_corpProf 0.00 0.000 Investment_corpProfLag 0.00 0.000 Investment_capitalLag 0.00 0.000 PrivateWages_(Intercept) 0.00 0.000 PrivateWages_gnp 0.00 0.000 PrivateWages_gnpLag 0.00 0.000 PrivateWages_trend 0.00 0.000 Consumption_corpProfLag Consumption_wages Consumption_(Intercept) 1.0117 -1.4132 Consumption_corpProf -0.6770 -0.1333 Consumption_corpProfLag 0.6979 -0.0188 Consumption_wages -0.0188 0.0955 Investment_(Intercept) 0.0000 0.0000 Investment_corpProf 0.0000 0.0000 Investment_corpProfLag 0.0000 0.0000 Investment_capitalLag 0.0000 0.0000 PrivateWages_(Intercept) 0.0000 0.0000 PrivateWages_gnp 0.0000 0.0000 PrivateWages_gnpLag 0.0000 0.0000 PrivateWages_trend 0.0000 0.0000 Investment_(Intercept) Investment_corpProf Consumption_(Intercept) 0.0 0.000 Consumption_corpProf 0.0 0.000 Consumption_corpProfLag 0.0 0.000 Consumption_wages 0.0 0.000 Investment_(Intercept) 2271.1 -40.229 Investment_corpProf -40.2 1.601 Investment_corpProfLag 32.3 -1.240 Investment_capitalLag -10.5 0.165 PrivateWages_(Intercept) 0.0 0.000 PrivateWages_gnp 0.0 0.000 PrivateWages_gnpLag 0.0 0.000 PrivateWages_trend 0.0 0.000 Investment_corpProfLag Investment_capitalLag Consumption_(Intercept) 0.000 0.0000 Consumption_corpProf 0.000 0.0000 Consumption_corpProfLag 0.000 0.0000 Consumption_wages 0.000 0.0000 Investment_(Intercept) 32.280 -10.5200 Investment_corpProf -1.240 0.1648 Investment_corpProfLag 1.187 -0.1522 Investment_capitalLag -0.152 0.0509 PrivateWages_(Intercept) 0.000 0.0000 PrivateWages_gnp 0.000 0.0000 PrivateWages_gnpLag 0.000 0.0000 PrivateWages_trend 0.000 0.0000 PrivateWages_(Intercept) PrivateWages_gnp Consumption_(Intercept) 0.000 0.0000 Consumption_corpProf 0.000 0.0000 Consumption_corpProfLag 0.000 0.0000 Consumption_wages 0.000 0.0000 Investment_(Intercept) 0.000 0.0000 Investment_corpProf 0.000 0.0000 Investment_corpProfLag 0.000 0.0000 Investment_capitalLag 0.000 0.0000 PrivateWages_(Intercept) 159.333 -0.8670 PrivateWages_gnp -0.867 0.1475 PrivateWages_gnpLag -1.818 -0.1375 PrivateWages_trend 2.020 -0.0396 PrivateWages_gnpLag PrivateWages_trend Consumption_(Intercept) 0.0000 0.0000 Consumption_corpProf 0.0000 0.0000 Consumption_corpProfLag 0.0000 0.0000 Consumption_wages 0.0000 0.0000 Investment_(Intercept) 0.0000 0.0000 Investment_corpProf 0.0000 0.0000 Investment_corpProfLag 0.0000 0.0000 Investment_capitalLag 0.0000 0.0000 PrivateWages_(Intercept) -1.8179 2.0198 PrivateWages_gnp -0.1375 -0.0396 PrivateWages_gnpLag 0.1737 0.0056 PrivateWages_trend 0.0056 0.1075 > > # SUR Warning in systemfit(system, method = method, data = KleinI, methodResidCov = ifelse(method == : the estimation of systems of equations with unequal numbers of observations has not been thoroughly tested yet > summary systemfit results method: SUR N DF SSR detRCov OLS-R2 McElroy-R2 system 58 46 45.1 0.199 0.975 0.993 N DF SSR MSE RMSE R2 Adj R2 Consumption 19 15 17.5 1.167 1.080 0.980 0.975 Investment 19 15 17.3 1.155 1.075 0.906 0.887 PrivateWages 20 16 10.3 0.642 0.801 0.987 0.985 The covariance matrix of the residuals used for estimation Consumption Investment PrivateWages Consumption 0.9830 0.0466 -0.391 Investment 0.0466 0.8101 0.115 PrivateWages -0.3906 0.1155 0.496 The covariance matrix of the residuals Consumption Investment PrivateWages Consumption 0.979 0.080 -0.452 Investment 0.080 0.810 0.181 PrivateWages -0.452 0.181 0.521 The correlations of the residuals Consumption Investment PrivateWages Consumption 1.0000 0.0907 -0.636 Investment 0.0907 1.0000 0.267 PrivateWages -0.6362 0.2671 1.000 SUR estimates for 'Consumption' (equation 1) Model Formula: consump ~ corpProf + corpProfLag + wages Estimate Std. Error t value Pr(>|t|) (Intercept) 16.2670 1.3148 12.37 2.8e-09 *** corpProf 0.1942 0.0954 2.04 0.06 . corpProfLag 0.0747 0.0842 0.89 0.39 wages 0.8011 0.0383 20.93 1.6e-12 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.08 on 15 degrees of freedom Number of observations: 19 Degrees of Freedom: 15 SSR: 17.501 MSE: 1.167 Root MSE: 1.08 Multiple R-Squared: 0.98 Adjusted R-Squared: 0.975 SUR estimates for 'Investment' (equation 2) Model Formula: invest ~ corpProf + corpProfLag + capitalLag Estimate Std. Error t value Pr(>|t|) (Intercept) 12.6390 4.7856 2.64 0.01852 * corpProf 0.4708 0.0943 4.99 0.00016 *** corpProfLag 0.3533 0.0907 3.89 0.00144 ** capitalLag -0.1254 0.0236 -5.32 8.6e-05 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.075 on 15 degrees of freedom Number of observations: 19 Degrees of Freedom: 15 SSR: 17.321 MSE: 1.155 Root MSE: 1.075 Multiple R-Squared: 0.906 Adjusted R-Squared: 0.887 SUR estimates for 'PrivateWages' (equation 3) Model Formula: privWage ~ gnp + gnpLag + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 1.3264 1.1240 1.18 0.2552 gnp 0.4184 0.0268 15.63 4.1e-11 *** gnpLag 0.1714 0.0315 5.43 5.5e-05 *** trend 0.1456 0.0284 5.13 0.0001 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 0.801 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 10.266 MSE: 0.642 Root MSE: 0.801 Multiple R-Squared: 0.987 Adjusted R-Squared: 0.985 > residuals Consumption Investment PrivateWages 1 NA NA NA 2 -0.3143 -0.2326 -1.1434 3 -1.2700 -0.1705 0.5084 4 -1.5426 1.0718 1.4211 5 -0.4489 -1.4767 -0.0992 6 0.0588 0.3167 -0.3594 7 0.9213 1.4446 NA 8 1.3789 0.8296 -0.7554 9 1.0900 -0.5263 0.2887 10 NA 1.2083 1.1800 11 0.3569 0.4082 -0.3673 12 -0.2288 0.2663 0.3445 13 NA NA -0.1571 14 0.2181 0.4946 0.4220 15 -0.1120 -0.0470 0.3147 16 -0.0872 NA 0.0145 17 1.5615 1.0289 -0.8091 18 -0.4530 0.0617 0.8608 19 0.1997 -2.5397 -0.7635 20 0.9268 -0.6136 -0.4046 21 0.7588 -0.7465 -1.2179 22 -2.2137 -0.6044 0.5606 > fitted Consumption Investment PrivateWages 1 NA NA NA 2 42.2 0.0326 26.6 3 46.3 2.0705 28.8 4 50.7 4.1282 32.7 5 51.0 4.4767 34.0 6 52.5 4.7833 35.8 7 54.2 4.1554 NA 8 54.8 3.3704 38.7 9 56.2 3.5263 38.9 10 NA 3.8917 40.1 11 54.6 0.5918 38.3 12 51.1 -3.6663 34.2 13 NA NA 29.2 14 46.3 -5.5946 28.1 15 48.8 -2.9530 30.3 16 51.4 NA 33.2 17 56.1 1.0711 37.6 18 59.2 1.9383 40.1 19 57.3 0.6397 39.0 20 60.7 1.9136 42.0 21 64.2 4.0465 46.2 22 71.9 5.5044 52.7 > predict Consumption.pred Consumption.se.fit Consumption.lwr Consumption.upr 1 NA NA NA NA 2 42.2 0.460 41.3 43.1 3 46.3 0.489 45.3 47.3 4 50.7 0.328 50.1 51.4 5 51.0 0.384 50.3 51.8 6 52.5 0.389 51.8 53.3 7 54.2 0.347 53.5 54.9 8 54.8 0.319 54.2 55.5 9 56.2 0.353 55.5 56.9 10 NA NA NA NA 11 54.6 0.583 53.5 55.8 12 51.1 0.524 50.1 52.2 13 NA NA NA NA 14 46.3 0.589 45.1 47.5 15 48.8 0.393 48.0 49.6 16 51.4 0.337 50.7 52.1 17 56.1 0.345 55.4 56.8 18 59.2 0.318 58.5 59.8 19 57.3 0.381 56.5 58.1 20 60.7 0.413 59.8 61.5 21 64.2 0.417 63.4 65.1 22 71.9 0.651 70.6 73.2 Investment.pred Investment.se.fit Investment.lwr Investment.upr 1 NA NA NA NA 2 0.0326 0.556 -1.0866 1.15 3 2.0705 0.454 1.1575 2.98 4 4.1282 0.399 3.3256 4.93 5 4.4767 0.331 3.8101 5.14 6 4.7833 0.314 4.1520 5.41 7 4.1554 0.291 3.5687 4.74 8 3.3704 0.260 2.8469 3.89 9 3.5263 0.347 2.8278 4.22 10 3.8917 0.397 3.0924 4.69 11 0.5918 0.578 -0.5711 1.75 12 -3.6663 0.551 -4.7762 -2.56 13 NA NA NA NA 14 -5.5946 0.661 -6.9261 -4.26 15 -2.9530 0.392 -3.7430 -2.16 16 NA NA NA NA 17 1.0711 0.318 0.4315 1.71 18 1.9383 0.225 1.4863 2.39 19 0.6397 0.310 0.0165 1.26 20 1.9136 0.333 1.2436 2.58 21 4.0465 0.304 3.4345 4.66 22 5.5044 0.429 4.6400 6.37 PrivateWages.pred PrivateWages.se.fit PrivateWages.lwr PrivateWages.upr 1 NA NA NA NA 2 26.6 0.321 26.0 27.3 3 28.8 0.321 28.1 29.4 4 32.7 0.316 32.0 33.3 5 34.0 0.244 33.5 34.5 6 35.8 0.242 35.3 36.2 7 NA NA NA NA 8 38.7 0.246 38.2 39.2 9 38.9 0.234 38.4 39.4 10 40.1 0.225 39.7 40.6 11 38.3 0.301 37.7 38.9 12 34.2 0.298 33.6 34.8 13 29.2 0.353 28.4 29.9 14 28.1 0.330 27.4 28.7 15 30.3 0.328 29.6 30.9 16 33.2 0.275 32.6 33.7 17 37.6 0.270 37.1 38.2 18 40.1 0.213 39.7 40.6 19 39.0 0.301 38.4 39.6 20 42.0 0.287 41.4 42.6 21 46.2 0.304 45.6 46.8 22 52.7 0.448 51.8 53.6 > model.frame [1] TRUE > model.matrix [1] TRUE > nobs [1] 58 > linearHypothesis Linear hypothesis test (Theil's F test) Hypothesis: Consumption_corpProf + Investment_capitalLag = 0 Model 1: restricted model Model 2: kleinModel Res.Df Df F Pr(>F) 1 47 2 46 1 0.4 0.53 Linear hypothesis test (F statistic of a Wald test) Hypothesis: Consumption_corpProf + Investment_capitalLag = 0 Model 1: restricted model Model 2: kleinModel Res.Df Df F Pr(>F) 1 47 2 46 1 0.49 0.49 Linear hypothesis test (Chi^2 statistic of a Wald test) Hypothesis: Consumption_corpProf + Investment_capitalLag = 0 Model 1: restricted model Model 2: kleinModel Res.Df Df Chisq Pr(>Chisq) 1 47 2 46 1 0.49 0.48 Linear hypothesis test (Theil's F test) Hypothesis: Consumption_corpProf + Investment_capitalLag = 0 Consumption_corpProfLag - PrivateWages_trend = 0 Model 1: restricted model Model 2: kleinModel Res.Df Df F Pr(>F) 1 48 2 46 2 0.31 0.74 Linear hypothesis test (F statistic of a Wald test) Hypothesis: Consumption_corpProf + Investment_capitalLag = 0 Consumption_corpProfLag - PrivateWages_trend = 0 Model 1: restricted model Model 2: kleinModel Res.Df Df F Pr(>F) 1 48 2 46 2 0.37 0.69 Linear hypothesis test (Chi^2 statistic of a Wald test) Hypothesis: Consumption_corpProf + Investment_capitalLag = 0 Consumption_corpProfLag - PrivateWages_trend = 0 Model 1: restricted model Model 2: kleinModel Res.Df Df Chisq Pr(>Chisq) 1 48 2 46 2 0.75 0.69 > logLik 'log Lik.' -66.4 (df=18) 'log Lik.' -74.1 (df=18) Estimating function Consumption_(Intercept) Consumption_corpProf Consumption_2 -0.4828 -5.986 Consumption_3 -1.9510 -32.972 Consumption_4 -2.3698 -43.605 Consumption_5 -0.6896 -13.377 Consumption_6 0.0903 1.814 Consumption_7 1.4152 27.739 Consumption_8 2.1183 41.942 Consumption_9 1.6745 35.332 Consumption_11 0.5483 8.553 Consumption_12 -0.3515 -4.008 Consumption_14 0.3350 3.752 Consumption_15 -0.1720 -2.116 Consumption_16 -0.1339 -1.875 Consumption_17 2.3987 42.218 Consumption_18 -0.6959 -12.040 Consumption_19 0.3068 4.694 Consumption_20 1.4238 27.052 Consumption_21 1.1656 24.594 Consumption_22 -3.4008 -79.918 Investment_2 0.0628 0.779 Investment_3 0.0460 0.778 Investment_4 -0.2893 -5.322 Investment_5 0.3986 7.732 Investment_6 -0.0855 -1.718 Investment_7 -0.3899 -7.642 Investment_8 -0.2239 -4.433 Investment_9 0.1420 2.997 Investment_10 0.0000 0.000 Investment_11 -0.1102 -1.719 Investment_12 -0.0719 -0.819 Investment_14 -0.1335 -1.495 Investment_15 0.0127 0.156 Investment_17 -0.2777 -4.887 Investment_18 -0.0167 -0.288 Investment_19 0.6855 10.488 Investment_20 0.1656 3.146 Investment_21 0.2015 4.251 Investment_22 0.1631 3.834 PrivateWages_2 -1.4560 -18.055 PrivateWages_3 0.6473 10.940 PrivateWages_4 1.8097 33.298 PrivateWages_5 -0.1264 -2.452 PrivateWages_6 -0.4576 -9.199 PrivateWages_8 -0.9619 -19.046 PrivateWages_9 0.3676 7.757 PrivateWages_10 0.0000 0.000 PrivateWages_11 -0.4677 -7.296 PrivateWages_12 0.4387 5.001 PrivateWages_13 0.0000 0.000 PrivateWages_14 0.5373 6.018 PrivateWages_15 0.4008 4.929 PrivateWages_16 0.0184 0.258 PrivateWages_17 -1.0303 -18.134 PrivateWages_18 1.0961 18.963 PrivateWages_19 -0.9722 -14.875 PrivateWages_20 -0.5153 -9.790 PrivateWages_21 -1.5509 -32.724 PrivateWages_22 0.7139 16.776 Consumption_corpProfLag Consumption_wages Consumption_2 -6.131 -13.614 Consumption_3 -24.192 -62.822 Consumption_4 -40.050 -87.684 Consumption_5 -12.688 -25.514 Consumption_6 1.751 3.484 Consumption_7 28.447 57.601 Consumption_8 41.518 87.909 Consumption_9 33.155 71.835 Consumption_11 11.898 23.083 Consumption_12 -5.484 -13.816 Consumption_14 2.345 11.425 Consumption_15 -1.926 -6.295 Consumption_16 -1.647 -5.263 Consumption_17 33.582 106.024 Consumption_18 -12.249 -33.196 Consumption_19 5.307 14.081 Consumption_20 21.784 70.336 Consumption_21 22.146 61.777 Consumption_22 -71.756 -210.167 Investment_2 0.797 1.770 Investment_3 0.571 1.482 Investment_4 -4.889 -10.703 Investment_5 7.333 14.747 Investment_6 -1.658 -3.300 Investment_7 -7.837 -15.869 Investment_8 -4.389 -9.292 Investment_9 2.812 6.093 Investment_10 0.000 0.000 Investment_11 -2.391 -4.638 Investment_12 -1.121 -2.825 Investment_14 -0.934 -4.552 Investment_15 0.142 0.464 Investment_17 -3.888 -12.274 Investment_18 -0.293 -0.794 Investment_19 11.859 31.463 Investment_20 2.534 8.181 Investment_21 3.828 10.678 Investment_22 3.442 10.082 PrivateWages_2 -18.491 -41.059 PrivateWages_3 8.027 20.845 PrivateWages_4 30.584 66.958 PrivateWages_5 -2.325 -4.676 PrivateWages_6 -8.878 -17.665 PrivateWages_8 -18.854 -39.920 PrivateWages_9 7.279 15.770 PrivateWages_10 0.000 0.000 PrivateWages_11 -10.149 -19.690 PrivateWages_12 6.843 17.240 PrivateWages_13 0.000 0.000 PrivateWages_14 3.761 18.323 PrivateWages_15 4.489 14.668 PrivateWages_16 0.227 0.725 PrivateWages_17 -14.424 -45.540 PrivateWages_18 19.292 52.286 PrivateWages_19 -16.820 -44.626 PrivateWages_20 -7.884 -25.455 PrivateWages_21 -29.467 -82.197 PrivateWages_22 15.062 44.116 Investment_(Intercept) Investment_corpProf Consumption_2 0.0848 1.052 Consumption_3 0.3428 5.793 Consumption_4 0.4164 7.661 Consumption_5 0.1211 2.350 Consumption_6 -0.0159 -0.319 Consumption_7 -0.2486 -4.873 Consumption_8 -0.3722 -7.369 Consumption_9 -0.2942 -6.207 Consumption_11 -0.0963 -1.503 Consumption_12 0.0618 0.704 Consumption_14 -0.0589 -0.659 Consumption_15 0.0302 0.372 Consumption_16 0.0000 0.000 Consumption_17 -0.4214 -7.417 Consumption_18 0.1223 2.115 Consumption_19 -0.0539 -0.825 Consumption_20 -0.2501 -4.753 Consumption_21 -0.2048 -4.321 Consumption_22 0.5975 14.041 Investment_2 -0.3080 -3.820 Investment_3 -0.2258 -3.815 Investment_4 1.4192 26.112 Investment_5 -1.9554 -37.935 Investment_6 0.4194 8.430 Investment_7 1.9129 37.493 Investment_8 1.0985 21.751 Investment_9 -0.6968 -14.703 Investment_10 1.6000 34.719 Investment_11 0.5405 8.432 Investment_12 0.3526 4.020 Investment_14 0.6549 7.335 Investment_15 -0.0622 -0.766 Investment_17 1.3624 23.978 Investment_18 0.0817 1.413 Investment_19 -3.3630 -51.454 Investment_20 -0.8125 -15.437 Investment_21 -0.9884 -20.856 Investment_22 -0.8004 -18.809 PrivateWages_2 0.5958 7.388 PrivateWages_3 -0.2649 -4.477 PrivateWages_4 -0.7405 -13.626 PrivateWages_5 0.0517 1.003 PrivateWages_6 0.1873 3.764 PrivateWages_8 0.3936 7.794 PrivateWages_9 -0.1504 -3.174 PrivateWages_10 -0.6149 -13.343 PrivateWages_11 0.1914 2.986 PrivateWages_12 -0.1795 -2.046 PrivateWages_13 0.0000 0.000 PrivateWages_14 -0.2199 -2.463 PrivateWages_15 -0.1640 -2.017 PrivateWages_16 0.0000 0.000 PrivateWages_17 0.4216 7.420 PrivateWages_18 -0.4485 -7.760 PrivateWages_19 0.3978 6.087 PrivateWages_20 0.2109 4.006 PrivateWages_21 0.6346 13.391 PrivateWages_22 -0.2921 -6.865 Investment_corpProfLag Investment_capitalLag Consumption_2 1.077 15.50 Consumption_3 4.250 62.59 Consumption_4 7.036 76.82 Consumption_5 2.229 22.98 Consumption_6 -0.308 -3.06 Consumption_7 -4.998 -49.18 Consumption_8 -7.294 -75.70 Consumption_9 -5.825 -61.07 Consumption_11 -2.090 -20.78 Consumption_12 0.963 13.38 Consumption_14 -0.412 -12.19 Consumption_15 0.338 6.10 Consumption_16 0.000 0.00 Consumption_17 -5.900 -83.32 Consumption_18 2.152 24.43 Consumption_19 -0.932 -10.88 Consumption_20 -3.827 -50.00 Consumption_21 -3.891 -41.20 Consumption_22 12.607 122.18 Investment_2 -3.912 -56.31 Investment_3 -2.799 -41.22 Investment_4 23.984 261.83 Investment_5 -35.979 -370.94 Investment_6 8.137 80.82 Investment_7 38.449 378.37 Investment_8 21.531 223.44 Investment_9 -13.797 -144.66 Investment_10 33.759 336.95 Investment_11 11.729 116.59 Investment_12 5.501 76.41 Investment_14 4.584 135.62 Investment_15 -0.697 -12.57 Investment_17 19.074 269.35 Investment_18 1.438 16.32 Investment_19 -58.180 -678.65 Investment_20 -12.431 -162.42 Investment_21 -18.780 -198.88 Investment_22 -16.888 -163.68 PrivateWages_2 7.567 108.91 PrivateWages_3 -3.285 -48.37 PrivateWages_4 -12.515 -136.63 PrivateWages_5 0.951 9.81 PrivateWages_6 3.633 36.09 PrivateWages_8 7.715 80.06 PrivateWages_9 -2.978 -31.23 PrivateWages_10 -12.974 -129.50 PrivateWages_11 4.153 41.28 PrivateWages_12 -2.800 -38.90 PrivateWages_13 0.000 0.00 PrivateWages_14 -1.539 -45.54 PrivateWages_15 -1.837 -33.13 PrivateWages_16 0.000 0.00 PrivateWages_17 5.903 83.35 PrivateWages_18 -7.894 -89.62 PrivateWages_19 6.883 80.29 PrivateWages_20 3.226 42.15 PrivateWages_21 12.058 127.69 PrivateWages_22 -6.164 -59.74 PrivateWages_(Intercept) PrivateWages_gnp PrivateWages_gnpLag Consumption_2 -0.4002 -18.25 -17.97 Consumption_3 -1.6172 -81.02 -73.75 Consumption_4 -1.9644 -112.37 -98.42 Consumption_5 -0.5716 -32.64 -32.70 Consumption_6 0.0748 4.56 4.27 Consumption_7 0.0000 0.00 0.00 Consumption_8 1.7559 113.08 112.38 Consumption_9 1.3880 89.53 89.39 Consumption_11 0.4545 27.81 30.45 Consumption_12 -0.2914 -15.56 -17.83 Consumption_14 0.2777 12.53 12.30 Consumption_15 -0.1426 -7.09 -6.43 Consumption_16 -0.1110 -6.04 -5.52 Consumption_17 1.9884 124.67 108.17 Consumption_18 -0.5769 -37.50 -36.17 Consumption_19 0.2543 15.49 16.53 Consumption_20 1.1803 82.03 71.88 Consumption_21 0.9662 73.14 67.15 Consumption_22 -2.8190 -249.20 -213.40 Investment_2 0.1212 5.53 5.44 Investment_3 0.0888 4.45 4.05 Investment_4 -0.5585 -31.95 -27.98 Investment_5 0.7695 43.94 44.02 Investment_6 -0.1651 -10.07 -9.42 Investment_7 0.0000 0.00 0.00 Investment_8 -0.4323 -27.84 -27.67 Investment_9 0.2742 17.69 17.66 Investment_10 -0.6296 -42.19 -40.61 Investment_11 -0.2127 -13.02 -14.25 Investment_12 -0.1388 -7.41 -8.49 Investment_14 -0.2577 -11.62 -11.42 Investment_15 0.0245 1.22 1.10 Investment_17 -0.5361 -33.62 -29.17 Investment_18 -0.0322 -2.09 -2.02 Investment_19 1.3234 80.60 86.02 Investment_20 0.3197 22.22 19.47 Investment_21 0.3890 29.45 27.03 Investment_22 0.3150 27.84 23.84 PrivateWages_2 -3.5926 -163.82 -161.31 PrivateWages_3 1.5973 80.02 72.84 PrivateWages_4 4.4653 255.42 223.71 PrivateWages_5 -0.3118 -17.80 -17.84 PrivateWages_6 -1.1292 -68.88 -64.48 PrivateWages_8 -2.3735 -152.85 -151.90 PrivateWages_9 0.9071 58.50 58.41 PrivateWages_10 3.7077 248.42 239.15 PrivateWages_11 -1.1540 -70.63 -77.32 PrivateWages_12 1.0824 57.80 66.24 PrivateWages_13 -0.4937 -21.87 -26.36 PrivateWages_14 1.3258 59.79 58.73 PrivateWages_15 0.9889 49.15 44.60 PrivateWages_16 0.0455 2.48 2.26 PrivateWages_17 -2.5423 -159.40 -138.30 PrivateWages_18 2.7047 175.80 169.58 PrivateWages_19 -2.3990 -146.10 -155.93 PrivateWages_20 -1.2714 -88.36 -77.43 PrivateWages_21 -3.8267 -289.68 -265.96 PrivateWages_22 1.7614 155.71 133.34 PrivateWages_trend Consumption_2 4.0019 Consumption_3 14.5552 Consumption_4 15.7155 Consumption_5 4.0012 Consumption_6 -0.4490 Consumption_7 0.0000 Consumption_8 -7.0237 Consumption_9 -4.1641 Consumption_11 -0.4545 Consumption_12 0.0000 Consumption_14 0.5555 Consumption_15 -0.4277 Consumption_16 -0.4440 Consumption_17 9.9420 Consumption_18 -3.4614 Consumption_19 1.7801 Consumption_20 9.4420 Consumption_21 8.6959 Consumption_22 -28.1902 Investment_2 -1.2122 Investment_3 -0.7996 Investment_4 4.4678 Investment_5 -5.3865 Investment_6 0.9903 Investment_7 0.0000 Investment_8 1.7292 Investment_9 -0.8227 Investment_10 1.2593 Investment_11 0.2127 Investment_12 0.0000 Investment_14 -0.5154 Investment_15 0.0735 Investment_17 -2.6807 Investment_18 -0.1929 Investment_19 9.2640 Investment_20 2.5579 Investment_21 3.5008 Investment_22 3.1497 PrivateWages_2 35.9264 PrivateWages_3 -14.3757 PrivateWages_4 -35.7225 PrivateWages_5 2.1827 PrivateWages_6 6.7753 PrivateWages_8 9.4940 PrivateWages_9 -2.7212 PrivateWages_10 -7.4154 PrivateWages_11 1.1540 PrivateWages_12 0.0000 PrivateWages_13 -0.4937 PrivateWages_14 2.6517 PrivateWages_15 2.9666 PrivateWages_16 0.1820 PrivateWages_17 -12.7113 PrivateWages_18 16.2281 PrivateWages_19 -16.7928 PrivateWages_20 -10.1714 PrivateWages_21 -34.4407 PrivateWages_22 17.6141 [1] TRUE > Bread Consumption_(Intercept) Consumption_corpProf Consumption_corpProfLag [1,] 1.00e+02 -1.05144 -0.70595 [2,] -1.05e+00 0.52767 -0.28007 [3,] -7.06e-01 -0.28007 0.41162 [4,] -1.63e+00 -0.08132 -0.03081 [5,] 5.03e+00 -0.06375 0.80965 [6,] -2.73e-01 0.05286 -0.04323 [7,] 4.77e-03 -0.03564 0.04677 [8,] -4.66e-04 -0.00135 -0.00415 [9,] -3.50e+01 0.07154 1.64913 [10,] 3.09e-01 -0.05491 0.03767 [11,] 2.66e-01 0.05541 -0.06699 [12,] 1.98e-01 0.03217 0.02582 Consumption_wages Investment_(Intercept) Investment_corpProf [1,] -1.63020 5.0343 -0.27333 [2,] -0.08132 -0.0638 0.05286 [3,] -0.03081 0.8097 -0.04323 [4,] 0.08501 -0.3863 0.00122 [5,] -0.38629 1328.3034 -12.58281 [6,] 0.00122 -12.5828 0.51550 [7,] -0.00347 10.1576 -0.39286 [8,] 0.00211 -6.3831 0.05078 [9,] 0.13121 19.8408 -0.15336 [10,] -0.00022 0.2731 0.01339 [11,] -0.00213 -0.6257 -0.01103 [12,] -0.02827 -0.5788 0.00418 Investment_corpProfLag Investment_capitalLag PrivateWages_(Intercept) [1,] 0.00477 -0.000466 -34.9530 [2,] -0.03564 -0.001347 0.0715 [3,] 0.04677 -0.004153 1.6491 [4,] -0.00347 0.002105 0.1312 [5,] 10.15755 -6.383136 19.8408 [6,] -0.39286 0.050784 -0.1534 [7,] 0.47726 -0.056526 -0.3957 [8,] -0.05653 0.032233 -0.0526 [9,] -0.39566 -0.052599 73.2779 [10,] -0.00743 -0.001878 -0.2209 [11,] 0.01439 0.002876 -1.0159 [12,] -0.01026 0.003357 0.8108 PrivateWages_gnp PrivateWages_gnpLag PrivateWages_trend [1,] 0.30855 0.26619 0.19754 [2,] -0.05491 0.05541 0.03217 [3,] 0.03767 -0.06699 0.02582 [4,] -0.00022 -0.00213 -0.02827 [5,] 0.27312 -0.62569 -0.57877 [6,] 0.01339 -0.01103 0.00418 [7,] -0.00743 0.01439 -0.01026 [8,] -0.00188 0.00288 0.00336 [9,] -0.22091 -1.01587 0.81082 [10,] 0.04154 -0.03895 -0.00995 [11,] -0.03895 0.05766 -0.00383 [12,] -0.00995 -0.00383 0.04664 > > # 3SLS Warning in systemfit(system, method = method, data = KleinI, inst = inst, : the estimation of systems of equations with unequal numbers of observations has not been thoroughly tested yet > summary systemfit results method: 3SLS N DF SSR detRCov OLS-R2 McElroy-R2 system 56 44 67.5 0.436 0.963 0.993 N DF SSR MSE RMSE R2 Adj R2 Consumption 18 14 22.4 1.598 1.264 0.974 0.968 Investment 18 14 35.0 2.503 1.582 0.793 0.749 PrivateWages 20 16 10.1 0.629 0.793 0.987 0.985 The covariance matrix of the residuals used for estimation Consumption Investment PrivateWages Consumption 1.307 0.540 -0.431 Investment 0.540 1.319 0.119 PrivateWages -0.431 0.119 0.496 The covariance matrix of the residuals Consumption Investment PrivateWages Consumption 1.309 0.638 -0.440 Investment 0.638 1.749 0.233 PrivateWages -0.440 0.233 0.519 The correlations of the residuals Consumption Investment PrivateWages Consumption 1.000 0.422 -0.532 Investment 0.422 1.000 0.247 PrivateWages -0.532 0.247 1.000 3SLS estimates for 'Consumption' (equation 1) Model Formula: consump ~ corpProf + corpProfLag + wages Instruments: ~govExp + taxes + govWage + trend + capitalLag + corpProfLag + gnpLag Estimate Std. Error t value Pr(>|t|) (Intercept) 18.0338 1.5648 11.52 1.6e-08 *** corpProf -0.0632 0.1500 -0.42 0.68 corpProfLag 0.1784 0.1154 1.55 0.14 wages 0.8224 0.0444 18.54 3.0e-11 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.264 on 14 degrees of freedom Number of observations: 18 Degrees of Freedom: 14 SSR: 22.377 MSE: 1.598 Root MSE: 1.264 Multiple R-Squared: 0.974 Adjusted R-Squared: 0.968 3SLS estimates for 'Investment' (equation 2) Model Formula: invest ~ corpProf + corpProfLag + capitalLag Instruments: ~govExp + taxes + govWage + trend + capitalLag + corpProfLag + gnpLag Estimate Std. Error t value Pr(>|t|) (Intercept) 24.6766 6.7008 3.68 0.00246 ** corpProf 0.0472 0.1843 0.26 0.80149 corpProfLag 0.6874 0.1577 4.36 0.00065 *** capitalLag -0.1776 0.0318 -5.59 6.7e-05 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.582 on 14 degrees of freedom Number of observations: 18 Degrees of Freedom: 14 SSR: 35.037 MSE: 2.503 Root MSE: 1.582 Multiple R-Squared: 0.793 Adjusted R-Squared: 0.749 3SLS estimates for 'PrivateWages' (equation 3) Model Formula: privWage ~ gnp + gnpLag + trend Instruments: ~govExp + taxes + govWage + trend + capitalLag + corpProfLag + gnpLag Estimate Std. Error t value Pr(>|t|) (Intercept) 0.7823 1.1254 0.70 0.49695 gnp 0.4257 0.0308 13.80 2.6e-10 *** gnpLag 0.1728 0.0341 5.07 0.00011 *** trend 0.1252 0.0291 4.30 0.00055 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 0.793 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 10.057 MSE: 0.629 Root MSE: 0.793 Multiple R-Squared: 0.987 Adjusted R-Squared: 0.985 > residuals Consumption Investment PrivateWages 1 NA NA NA 2 -0.8058 -1.721 -1.20135 3 -0.6573 0.337 0.43696 4 -1.1124 0.810 1.31177 5 0.0833 -1.544 -0.19794 6 0.6334 0.368 -0.46596 7 NA NA NA 8 1.7939 1.245 -0.85614 9 1.7891 0.593 0.20698 10 NA 2.303 1.10034 11 -0.5397 -1.015 -0.38801 12 -1.5147 -0.846 0.40949 13 NA NA 0.00602 14 -0.1171 1.670 0.61306 15 -0.6526 -0.075 0.49152 16 -0.3617 NA 0.17066 17 1.9331 2.086 -0.69991 18 -0.6063 -0.101 0.96136 19 -0.3990 -3.345 -0.61606 20 1.4134 0.717 -0.29343 21 1.3257 0.306 -1.14412 22 -1.4340 0.935 0.55310 > fitted Consumption Investment PrivateWages 1 NA NA NA 2 42.7 1.5213 26.7 3 45.7 1.5632 28.9 4 50.3 4.3898 32.8 5 50.5 4.5444 34.1 6 52.0 4.7320 35.9 7 NA NA NA 8 54.4 2.9547 38.8 9 55.5 2.4075 39.0 10 NA 2.7965 40.2 11 55.5 2.0150 38.3 12 52.4 -2.5541 34.1 13 NA NA 29.0 14 46.6 -6.7699 27.9 15 49.4 -2.9250 30.1 16 51.7 NA 33.0 17 55.8 0.0139 37.5 18 59.3 2.1013 40.0 19 57.9 1.4453 38.8 20 60.2 0.5828 41.9 21 63.7 2.9944 46.1 22 71.1 3.9651 52.7 > predict Consumption.pred Consumption.se.fit Consumption.lwr Consumption.upr 1 NA NA NA NA 2 42.7 0.555 39.7 45.7 3 45.7 0.628 42.6 48.7 4 50.3 0.418 47.5 53.2 5 50.5 0.492 47.6 53.4 6 52.0 0.501 49.0 54.9 7 NA NA NA NA 8 54.4 0.405 51.6 57.3 9 55.5 0.477 52.6 58.4 10 NA NA NA NA 11 55.5 0.832 52.3 58.8 12 52.4 0.792 49.2 55.6 13 NA NA NA NA 14 46.6 0.676 43.5 49.7 15 49.4 0.470 46.5 52.2 16 51.7 0.386 48.8 54.5 17 55.8 0.433 52.9 58.6 18 59.3 0.368 56.5 62.1 19 57.9 0.504 55.0 60.8 20 60.2 0.513 57.3 63.1 21 63.7 0.505 60.8 66.6 22 71.1 0.771 68.0 74.3 Investment.pred Investment.se.fit Investment.lwr Investment.upr 1 NA NA NA NA 2 1.5213 0.857 -2.337 5.380 3 1.5632 0.589 -2.058 5.184 4 4.3898 0.519 0.819 7.961 5 4.5444 0.436 1.025 8.064 6 4.7320 0.415 1.224 8.240 7 NA NA NA NA 8 2.9547 0.342 -0.517 6.426 9 2.4075 0.511 -1.158 5.973 10 2.7965 0.556 -0.800 6.393 11 2.0150 0.955 -1.948 5.978 12 -2.5541 0.874 -6.431 1.323 13 NA NA NA NA 14 -6.7699 0.865 -10.637 -2.903 15 -2.9250 0.503 -6.485 0.635 16 NA NA NA NA 17 0.0139 0.483 -3.534 3.561 18 2.1013 0.320 -1.361 5.563 19 1.4453 0.532 -2.134 5.025 20 0.5828 0.550 -3.010 4.175 21 2.9944 0.476 -0.549 6.538 22 3.9651 0.692 0.261 7.669 PrivateWages.pred PrivateWages.se.fit PrivateWages.lwr PrivateWages.upr 1 NA NA NA NA 2 26.7 0.324 24.9 28.5 3 28.9 0.331 27.0 30.7 4 32.8 0.339 31.0 34.6 5 34.1 0.248 32.3 35.9 6 35.9 0.256 34.1 37.6 7 NA NA NA NA 8 38.8 0.251 37.0 40.5 9 39.0 0.238 37.2 40.7 10 40.2 0.232 38.4 42.0 11 38.3 0.314 36.5 40.1 12 34.1 0.327 32.3 35.9 13 29.0 0.393 27.1 30.9 14 27.9 0.329 26.1 29.7 15 30.1 0.324 28.3 31.9 16 33.0 0.271 31.3 34.8 17 37.5 0.277 35.7 39.3 18 40.0 0.213 38.3 41.8 19 38.8 0.320 37.0 40.6 20 41.9 0.295 40.1 43.7 21 46.1 0.309 44.3 47.9 22 52.7 0.476 50.8 54.7 > model.frame [1] TRUE > model.matrix [1] "Attributes: < Component \"dim\": Mean relative difference: 0.0345 >" [2] "Attributes: < Component \"dimnames\": Component 1: 51 string mismatches >" [3] "Numeric: lengths (696, 672) differ" > nobs [1] 56 > linearHypothesis Linear hypothesis test (Theil's F test) Hypothesis: Consumption_corpProf + Investment_capitalLag = 0 Model 1: restricted model Model 2: kleinModel Res.Df Df F Pr(>F) 1 45 2 44 1 1.91 0.17 Linear hypothesis test (F statistic of a Wald test) Hypothesis: Consumption_corpProf + Investment_capitalLag = 0 Model 1: restricted model Model 2: kleinModel Res.Df Df F Pr(>F) 1 45 2 44 1 2.6 0.11 Linear hypothesis test (Chi^2 statistic of a Wald test) Hypothesis: Consumption_corpProf + Investment_capitalLag = 0 Model 1: restricted model Model 2: kleinModel Res.Df Df Chisq Pr(>Chisq) 1 45 2 44 1 2.6 0.11 Linear hypothesis test (Theil's F test) Hypothesis: Consumption_corpProf + Investment_capitalLag = 0 Consumption_corpProfLag - PrivateWages_trend = 0 Model 1: restricted model Model 2: kleinModel Res.Df Df F Pr(>F) 1 46 2 44 2 1.62 0.21 Linear hypothesis test (F statistic of a Wald test) Hypothesis: Consumption_corpProf + Investment_capitalLag = 0 Consumption_corpProfLag - PrivateWages_trend = 0 Model 1: restricted model Model 2: kleinModel Res.Df Df F Pr(>F) 1 46 2 44 2 2.2 0.12 Linear hypothesis test (Chi^2 statistic of a Wald test) Hypothesis: Consumption_corpProf + Investment_capitalLag = 0 Consumption_corpProfLag - PrivateWages_trend = 0 Model 1: restricted model Model 2: kleinModel Res.Df Df Chisq Pr(>Chisq) 1 46 2 44 2 4.41 0.11 > logLik 'log Lik.' -70.1 (df=18) 'log Lik.' -80.6 (df=18) Estimating function Consumption_(Intercept) Consumption_corpProf Consumption_2 -3.3369 -46.76 Consumption_3 -0.6260 -10.43 Consumption_4 0.5431 10.07 Consumption_5 -1.9287 -39.09 Consumption_6 0.9979 18.98 Consumption_8 4.7224 83.33 Consumption_9 4.2195 79.93 Consumption_11 -2.1144 -35.40 Consumption_12 -2.7531 -36.83 Consumption_14 0.7280 7.30 Consumption_15 -2.0340 -25.43 Consumption_16 -1.6770 -24.29 Consumption_17 6.1486 91.69 Consumption_18 -0.6466 -12.56 Consumption_19 -4.7474 -90.72 Consumption_20 3.3112 58.48 Consumption_21 1.5335 31.28 Consumption_22 -1.0772 -24.43 Investment_2 1.4470 20.28 Investment_3 -0.2844 -4.74 Investment_4 -0.6458 -11.98 Investment_5 1.3096 26.54 Investment_6 -0.3315 -6.31 Investment_8 -1.1056 -19.51 Investment_9 -0.5457 -10.34 Investment_10 0.0000 0.00 Investment_11 0.8919 14.93 Investment_12 0.7723 10.33 Investment_14 -1.4083 -14.12 Investment_15 0.0885 1.11 Investment_17 -1.8093 -26.98 Investment_18 0.1676 3.25 Investment_19 2.8888 55.20 Investment_20 -0.6425 -11.35 Investment_21 -0.2855 -5.82 Investment_22 -0.7925 -17.97 PrivateWages_2 -2.9611 -41.49 PrivateWages_3 1.0665 17.77 PrivateWages_4 2.5794 47.83 PrivateWages_5 -2.7951 -56.65 PrivateWages_6 -0.4865 -9.25 PrivateWages_8 1.6497 29.11 PrivateWages_9 1.8751 35.52 PrivateWages_10 0.0000 0.00 PrivateWages_11 -2.3618 -39.54 PrivateWages_12 -0.3246 -4.34 PrivateWages_13 0.0000 0.00 PrivateWages_14 3.0441 30.51 PrivateWages_15 -0.2496 -3.12 PrivateWages_16 -0.3710 -5.37 PrivateWages_17 2.5263 37.67 PrivateWages_18 0.0583 1.13 PrivateWages_19 -6.2503 -119.43 PrivateWages_20 1.3565 23.96 PrivateWages_21 -1.2791 -26.09 PrivateWages_22 1.9457 44.12 Consumption_corpProfLag Consumption_wages Consumption_2 -42.379 -99.51 Consumption_3 -7.762 -19.94 Consumption_4 9.179 19.15 Consumption_5 -35.489 -74.45 Consumption_6 19.359 38.46 Consumption_8 92.559 188.94 Consumption_9 83.547 176.28 Consumption_11 -45.883 -91.13 Consumption_12 -42.949 -109.17 Consumption_14 5.096 24.26 Consumption_15 -22.780 -75.93 Consumption_16 -20.627 -67.32 Consumption_17 86.080 256.88 Consumption_18 -11.379 -30.78 Consumption_19 -82.131 -233.73 Consumption_20 50.662 160.78 Consumption_21 29.137 81.92 Consumption_22 -22.729 -65.49 Investment_2 18.377 43.15 Investment_3 -3.526 -9.06 Investment_4 -10.914 -22.77 Investment_5 24.097 50.55 Investment_6 -6.431 -12.78 Investment_8 -21.669 -44.23 Investment_9 -10.805 -22.80 Investment_10 0.000 0.00 Investment_11 19.355 38.44 Investment_12 12.047 30.62 Investment_14 -9.858 -46.93 Investment_15 0.992 3.31 Investment_17 -25.331 -75.59 Investment_18 2.950 7.98 Investment_19 49.976 142.22 Investment_20 -9.831 -31.20 Investment_21 -5.425 -15.25 Investment_22 -16.723 -48.18 PrivateWages_2 -37.606 -88.31 PrivateWages_3 13.225 33.97 PrivateWages_4 43.593 90.94 PrivateWages_5 -51.429 -107.89 PrivateWages_6 -9.438 -18.75 PrivateWages_8 32.333 66.00 PrivateWages_9 37.126 78.33 PrivateWages_10 0.000 0.00 PrivateWages_11 -51.251 -101.80 PrivateWages_12 -5.063 -12.87 PrivateWages_13 0.000 0.00 PrivateWages_14 21.309 101.45 PrivateWages_15 -2.796 -9.32 PrivateWages_16 -4.563 -14.89 PrivateWages_17 35.368 105.55 PrivateWages_18 1.025 2.77 PrivateWages_19 -108.130 -307.72 PrivateWages_20 20.754 65.87 PrivateWages_21 -24.303 -68.33 PrivateWages_22 41.055 118.29 Investment_(Intercept) Investment_corpProf Consumption_2 1.6657 22.369 Consumption_3 0.3125 5.208 Consumption_4 -0.2711 -5.105 Consumption_5 0.9628 19.850 Consumption_6 -0.4981 -9.617 Consumption_8 -2.3573 -41.335 Consumption_9 -2.1063 -41.098 Consumption_11 1.0555 18.165 Consumption_12 1.3743 18.540 Consumption_14 -0.3634 -3.664 Consumption_15 1.0153 13.204 Consumption_16 0.0000 0.000 Consumption_17 -3.0693 -45.765 Consumption_18 0.3228 6.293 Consumption_19 2.3698 45.702 Consumption_20 -1.6529 -29.000 Consumption_21 -0.7655 -15.445 Consumption_22 0.5377 12.243 Investment_2 -2.0943 -28.124 Investment_3 0.4116 6.860 Investment_4 0.9347 17.600 Investment_5 -1.8955 -39.080 Investment_6 0.4798 9.263 Investment_8 1.6002 28.058 Investment_9 0.7899 15.412 Investment_10 2.8075 56.810 Investment_11 -1.2910 -22.218 Investment_12 -1.1178 -15.079 Investment_14 2.0383 20.552 Investment_15 -0.1282 -1.667 Investment_17 2.6188 39.047 Investment_18 -0.2426 -4.730 Investment_19 -4.1811 -80.631 Investment_20 0.9300 16.316 Investment_21 0.4133 8.338 Investment_22 1.1471 26.118 PrivateWages_2 1.8190 24.427 PrivateWages_3 -0.6551 -10.919 PrivateWages_4 -1.5845 -29.835 PrivateWages_5 1.7170 35.400 PrivateWages_6 0.2989 5.770 PrivateWages_8 -1.0134 -17.769 PrivateWages_9 -1.1518 -22.474 PrivateWages_10 -2.1257 -43.013 PrivateWages_11 1.4508 24.969 PrivateWages_12 0.1994 2.690 PrivateWages_13 0.0000 0.000 PrivateWages_14 -1.8700 -18.855 PrivateWages_15 0.1533 1.994 PrivateWages_16 0.0000 0.000 PrivateWages_17 -1.5519 -23.140 PrivateWages_18 -0.0358 -0.698 PrivateWages_19 3.8395 74.045 PrivateWages_20 -0.8333 -14.620 PrivateWages_21 0.7858 15.853 PrivateWages_22 -1.1953 -27.215 Investment_corpProfLag Investment_capitalLag Consumption_2 21.15 304.50 Consumption_3 3.87 57.06 Consumption_4 -4.58 -50.02 Consumption_5 17.72 182.64 Consumption_6 -9.66 -95.99 Consumption_8 -46.20 -479.48 Consumption_9 -41.70 -437.27 Consumption_11 22.90 227.67 Consumption_12 21.44 297.81 Consumption_14 -2.54 -75.26 Consumption_15 11.37 205.09 Consumption_16 0.00 0.00 Consumption_17 -42.97 -606.79 Consumption_18 5.68 64.49 Consumption_19 41.00 478.23 Consumption_20 -25.29 -330.42 Consumption_21 -14.54 -154.02 Consumption_22 11.35 109.96 Investment_2 -26.60 -382.84 Investment_3 5.10 75.16 Investment_4 15.80 172.46 Investment_5 -34.88 -359.58 Investment_6 9.31 92.46 Investment_8 31.36 325.47 Investment_9 15.64 163.98 Investment_10 59.24 591.25 Investment_11 -28.01 -278.46 Investment_12 -17.44 -242.22 Investment_14 14.27 422.14 Investment_15 -1.44 -25.89 Investment_17 36.66 517.73 Investment_18 -4.27 -48.47 Investment_19 -72.33 -843.75 Investment_20 14.23 185.90 Investment_21 7.85 83.15 Investment_22 24.20 234.58 PrivateWages_2 23.10 332.51 PrivateWages_3 -8.12 -119.63 PrivateWages_4 -26.78 -292.35 PrivateWages_5 31.59 325.71 PrivateWages_6 5.80 57.59 PrivateWages_8 -19.86 -206.12 PrivateWages_9 -22.81 -239.12 PrivateWages_10 -44.85 -447.66 PrivateWages_11 31.48 312.95 PrivateWages_12 3.11 43.21 PrivateWages_13 0.00 0.00 PrivateWages_14 -13.09 -387.28 PrivateWages_15 1.72 30.97 PrivateWages_16 0.00 0.00 PrivateWages_17 -21.73 -306.81 PrivateWages_18 -0.63 -7.15 PrivateWages_19 66.42 774.82 PrivateWages_20 -12.75 -166.57 PrivateWages_21 14.93 158.09 PrivateWages_22 -25.22 -244.43 PrivateWages_(Intercept) PrivateWages_gnp PrivateWages_gnpLag Consumption_2 -3.302 -155.43 -148.27 Consumption_3 -0.619 -30.71 -28.25 Consumption_4 0.537 30.39 26.93 Consumption_5 -1.909 -115.83 -109.18 Consumption_6 0.987 59.85 56.39 Consumption_8 4.673 280.38 299.09 Consumption_9 4.176 260.01 268.91 Consumption_11 -2.092 -133.31 -140.19 Consumption_12 -2.724 -149.39 -166.74 Consumption_14 0.720 30.35 31.91 Consumption_15 -2.013 -103.09 -90.78 Consumption_16 -1.660 -91.84 -82.48 Consumption_17 6.085 349.22 331.00 Consumption_18 -0.640 -42.98 -40.12 Consumption_19 -4.698 -321.88 -305.37 Consumption_20 3.277 219.03 199.56 Consumption_21 1.518 113.62 105.47 Consumption_22 -1.066 -92.61 -80.70 Investment_2 1.762 82.94 79.12 Investment_3 -0.346 -17.17 -15.79 Investment_4 -0.786 -44.47 -39.40 Investment_5 1.595 96.79 91.23 Investment_6 -0.404 -24.47 -23.05 Investment_8 -1.346 -80.78 -86.17 Investment_9 -0.665 -41.38 -42.80 Investment_10 -2.362 -152.52 -152.36 Investment_11 1.086 69.20 72.78 Investment_12 0.940 51.57 57.56 Investment_14 -1.715 -72.25 -75.98 Investment_15 0.108 5.52 4.86 Investment_17 -2.203 -126.46 -119.87 Investment_18 0.204 13.71 12.80 Investment_19 3.518 241.02 228.67 Investment_20 -0.782 -52.30 -47.65 Investment_21 -0.348 -26.03 -24.17 Investment_22 -0.965 -83.85 -73.06 PrivateWages_2 -6.697 -315.21 -300.67 PrivateWages_3 2.412 119.58 109.98 PrivateWages_4 5.833 329.84 292.25 PrivateWages_5 -6.321 -383.60 -361.56 PrivateWages_6 -1.100 -66.69 -62.82 PrivateWages_8 3.731 223.83 238.77 PrivateWages_9 4.240 264.05 273.09 PrivateWages_10 7.826 505.29 504.75 PrivateWages_11 -5.341 -340.30 -357.86 PrivateWages_12 -0.734 -40.25 -44.92 PrivateWages_13 -4.155 -195.19 -221.87 PrivateWages_14 6.884 290.02 304.97 PrivateWages_15 -0.565 -28.91 -25.46 PrivateWages_16 -0.839 -46.43 -41.70 PrivateWages_17 5.713 327.90 310.80 PrivateWages_18 0.132 8.85 8.26 PrivateWages_19 -14.135 -968.43 -918.78 PrivateWages_20 3.068 205.06 186.82 PrivateWages_21 -2.893 -216.57 -201.04 PrivateWages_22 4.400 382.29 333.10 PrivateWages_trend Consumption_2 33.022 Consumption_3 5.575 Consumption_4 -4.300 Consumption_5 13.361 Consumption_6 -5.925 Consumption_8 -18.693 Consumption_9 -12.527 Consumption_11 2.092 Consumption_12 0.000 Consumption_14 1.441 Consumption_15 -6.038 Consumption_16 -6.638 Consumption_17 30.423 Consumption_18 -3.839 Consumption_19 -32.886 Consumption_20 26.214 Consumption_21 13.658 Consumption_22 -10.660 Investment_2 -17.621 Investment_3 3.117 Investment_4 6.292 Investment_5 -11.164 Investment_6 2.422 Investment_8 5.385 Investment_9 1.994 Investment_10 4.724 Investment_11 -1.086 Investment_12 0.000 Investment_14 -3.430 Investment_15 0.323 Investment_17 -11.017 Investment_18 1.225 Investment_19 24.626 Investment_20 -6.260 Investment_21 -3.129 Investment_22 -9.652 PrivateWages_2 66.965 PrivateWages_3 -21.707 PrivateWages_4 -46.667 PrivateWages_5 44.247 PrivateWages_6 6.602 PrivateWages_8 -14.923 PrivateWages_9 -12.721 PrivateWages_10 -15.651 PrivateWages_11 5.341 PrivateWages_12 0.000 PrivateWages_13 -4.155 PrivateWages_14 13.769 PrivateWages_15 -1.694 PrivateWages_16 -3.356 PrivateWages_17 28.566 PrivateWages_18 0.791 PrivateWages_19 -98.946 PrivateWages_20 24.542 PrivateWages_21 -26.035 PrivateWages_22 44.003 [1] TRUE > Bread Consumption_(Intercept) Consumption_corpProf Consumption_corpProfLag [1,] 137.1267 -4.2997 0.8463 [2,] -4.2997 1.2597 -0.6942 [3,] 0.8463 -0.6942 0.7454 [4,] -1.7733 -0.1394 -0.0281 [5,] 105.0265 3.4241 3.4807 [6,] -4.4721 0.5244 -0.4530 [7,] 1.6442 -0.3454 0.4268 [8,] -0.2644 -0.0340 -0.0134 [9,] -38.0151 0.3680 1.7655 [10,] 0.5379 -0.0825 0.0502 [11,] 0.0809 0.0782 -0.0821 [12,] 0.1895 0.0505 0.0265 Consumption_wages Investment_(Intercept) Investment_corpProf [1,] -1.773256 105.03 -4.47211 [2,] -0.139424 3.42 0.52437 [3,] -0.028067 3.48 -0.45300 [4,] 0.110155 -5.14 0.06784 [5,] -5.138461 2514.46 -43.59967 [6,] 0.067843 -43.60 1.90216 [7,] -0.064178 34.75 -1.45456 [8,] 0.025084 -11.63 0.17310 [9,] 0.044238 27.92 -0.25822 [10,] 0.000203 1.31 0.00136 [11,] -0.000811 -1.85 0.00316 [12,] -0.035488 -0.85 0.01679 Investment_corpProfLag Investment_capitalLag PrivateWages_(Intercept) [1,] 1.64420 -0.26436 -38.0151 [2,] -0.34536 -0.03402 0.3680 [3,] 0.42680 -0.01343 1.7655 [4,] -0.06418 0.02508 0.0442 [5,] 34.75055 -11.63252 27.9186 [6,] -1.45456 0.17310 -0.2582 [7,] 1.39257 -0.16270 -0.3518 [8,] -0.16270 0.05655 -0.0905 [9,] -0.35175 -0.09046 70.9283 [10,] 0.00769 -0.00730 -0.3444 [11,] -0.00156 0.00915 -0.8533 [12,] -0.02239 0.00456 0.8163 PrivateWages_gnp PrivateWages_gnpLag PrivateWages_trend [1,] 0.537909 0.080946 0.189459 [2,] -0.082456 0.078164 0.050460 [3,] 0.050248 -0.082092 0.026511 [4,] 0.000203 -0.000811 -0.035488 [5,] 1.312267 -1.847095 -0.850461 [6,] 0.001362 0.003160 0.016792 [7,] 0.007689 -0.001565 -0.022388 [8,] -0.007301 0.009148 0.004555 [9,] -0.344428 -0.853347 0.816265 [10,] 0.053258 -0.048785 -0.014522 [11,] -0.048785 0.064956 0.000648 [12,] -0.014522 0.000648 0.047452 > > # I3SLS Warning in systemfit(system, method = method, data = KleinI, inst = inst, : the estimation of systems of equations with unequal numbers of observations has not been thoroughly tested yet > summary systemfit results method: iterated 3SLS convergence achieved after 10 iterations N DF SSR detRCov OLS-R2 McElroy-R2 system 56 44 79.4 0.55 0.956 0.994 N DF SSR MSE RMSE R2 Adj R2 Consumption 18 14 22.3 1.595 1.263 0.974 0.968 Investment 18 14 46.8 3.346 1.829 0.724 0.664 PrivateWages 20 16 10.2 0.639 0.799 0.987 0.985 The covariance matrix of the residuals used for estimation Consumption Investment PrivateWages Consumption 1.307 0.750 -0.452 Investment 0.750 2.318 0.272 PrivateWages -0.452 0.272 0.530 The covariance matrix of the residuals Consumption Investment PrivateWages Consumption 1.307 0.750 -0.452 Investment 0.750 2.318 0.272 PrivateWages -0.452 0.272 0.530 The correlations of the residuals Consumption Investment PrivateWages Consumption 1.000 0.424 -0.542 Investment 0.424 1.000 0.254 PrivateWages -0.542 0.254 1.000 3SLS estimates for 'Consumption' (equation 1) Model Formula: consump ~ corpProf + corpProfLag + wages Instruments: ~govExp + taxes + govWage + trend + capitalLag + corpProfLag + gnpLag Estimate Std. Error t value Pr(>|t|) (Intercept) 18.3252 1.5452 11.86 1.1e-08 *** corpProf -0.0436 0.1470 -0.30 0.77 corpProfLag 0.1614 0.1127 1.43 0.17 wages 0.8127 0.0436 18.65 2.8e-11 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.263 on 14 degrees of freedom Number of observations: 18 Degrees of Freedom: 14 SSR: 22.337 MSE: 1.595 Root MSE: 1.263 Multiple R-Squared: 0.974 Adjusted R-Squared: 0.968 3SLS estimates for 'Investment' (equation 2) Model Formula: invest ~ corpProf + corpProfLag + capitalLag Instruments: ~govExp + taxes + govWage + trend + capitalLag + corpProfLag + gnpLag Estimate Std. Error t value Pr(>|t|) (Intercept) 30.2418 8.3674 3.61 0.00282 ** corpProf -0.0437 0.2341 -0.19 0.85457 corpProfLag 0.7856 0.1993 3.94 0.00147 ** capitalLag -0.2065 0.0397 -5.20 0.00014 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.829 on 14 degrees of freedom Number of observations: 18 Degrees of Freedom: 14 SSR: 46.838 MSE: 3.346 Root MSE: 1.829 Multiple R-Squared: 0.724 Adjusted R-Squared: 0.664 3SLS estimates for 'PrivateWages' (equation 3) Model Formula: privWage ~ gnp + gnpLag + trend Instruments: ~govExp + taxes + govWage + trend + capitalLag + corpProfLag + gnpLag Estimate Std. Error t value Pr(>|t|) (Intercept) 0.4741 1.1280 0.42 0.67983 gnp 0.4268 0.0296 14.44 1.4e-10 *** gnpLag 0.1767 0.0330 5.35 6.5e-05 *** trend 0.1201 0.0290 4.14 0.00076 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 0.799 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 10.218 MSE: 0.639 Root MSE: 0.799 Multiple R-Squared: 0.987 Adjusted R-Squared: 0.985 > residuals Consumption Investment PrivateWages 1 NA NA NA 2 -0.8546 -2.1226 -1.1687 3 -0.7611 0.3684 0.4670 4 -1.1233 0.5912 1.3216 5 0.0781 -1.6694 -0.2108 6 0.6467 0.2952 -0.4776 7 NA NA NA 8 1.8444 1.4348 -0.8884 9 1.8309 1.0020 0.1781 10 NA 2.7265 1.0734 11 -0.3652 -1.0581 -0.4134 12 -1.3877 -0.6431 0.4203 13 NA NA 0.0623 14 -0.1818 2.4214 0.7091 15 -0.6438 0.2168 0.5845 16 -0.3417 NA 0.2455 17 1.9583 2.4607 -0.6474 18 -0.4806 -0.0468 0.9840 19 -0.2563 -3.3855 -0.5930 20 1.4832 1.1550 -0.2586 21 1.4514 0.6086 -1.1446 22 -1.2351 1.3453 0.5196 > fitted Consumption Investment PrivateWages 1 NA NA NA 2 42.8 1.923 26.7 3 45.8 1.532 28.8 4 50.3 4.609 32.8 5 50.5 4.669 34.1 6 52.0 4.805 35.9 7 NA NA NA 8 54.4 2.765 38.8 9 55.5 1.998 39.0 10 NA 2.373 40.2 11 55.4 2.058 38.3 12 52.3 -2.757 34.1 13 NA NA 28.9 14 46.7 -7.521 27.8 15 49.3 -3.217 30.0 16 51.6 NA 33.0 17 55.7 -0.361 37.4 18 59.2 2.047 40.0 19 57.8 1.485 38.8 20 60.1 0.145 41.9 21 63.5 2.691 46.1 22 70.9 3.555 52.8 > predict Consumption.pred Consumption.se.fit Consumption.lwr Consumption.upr 1 NA NA NA NA 2 42.8 0.548 41.7 43.9 3 45.8 0.618 44.5 47.0 4 50.3 0.411 49.5 51.2 5 50.5 0.481 49.6 51.5 6 52.0 0.490 51.0 52.9 7 NA NA NA NA 8 54.4 0.396 53.6 55.2 9 55.5 0.467 54.5 56.4 10 NA NA NA NA 11 55.4 0.811 53.7 57.0 12 52.3 0.775 50.7 53.8 13 NA NA NA NA 14 46.7 0.665 45.3 48.0 15 49.3 0.463 48.4 50.3 16 51.6 0.381 50.9 52.4 17 55.7 0.428 54.9 56.6 18 59.2 0.360 58.5 59.9 19 57.8 0.492 56.8 58.7 20 60.1 0.508 59.1 61.1 21 63.5 0.499 62.5 64.6 22 70.9 0.761 69.4 72.5 Investment.pred Investment.se.fit Investment.lwr Investment.upr 1 NA NA NA NA 2 1.923 1.079 -0.2526 4.098 3 1.532 0.766 -0.0119 3.075 4 4.609 0.668 3.2632 5.954 5 4.669 0.566 3.5280 5.811 6 4.805 0.543 3.7104 5.899 7 NA NA NA NA 8 2.765 0.447 1.8648 3.665 9 1.998 0.651 0.6860 3.310 10 2.373 0.710 0.9434 3.804 11 2.058 1.237 -0.4350 4.551 12 -2.757 1.139 -5.0532 -0.461 13 NA NA NA NA 14 -7.521 1.094 -9.7261 -5.317 15 -3.217 0.648 -4.5217 -1.912 16 NA NA NA NA 17 -0.361 0.615 -1.6007 0.879 18 2.047 0.417 1.2060 2.888 19 1.485 0.684 0.1062 2.865 20 0.145 0.699 -1.2632 1.553 21 2.691 0.614 1.4548 3.928 22 3.555 0.887 1.7674 5.342 PrivateWages.pred PrivateWages.se.fit PrivateWages.lwr PrivateWages.upr 1 NA NA NA NA 2 26.7 0.330 26.0 27.3 3 28.8 0.336 28.2 29.5 4 32.8 0.340 32.1 33.5 5 34.1 0.251 33.6 34.6 6 35.9 0.259 35.4 36.4 7 NA NA NA NA 8 38.8 0.253 38.3 39.3 9 39.0 0.240 38.5 39.5 10 40.2 0.236 39.8 40.7 11 38.3 0.307 37.7 38.9 12 34.1 0.313 33.4 34.7 13 28.9 0.376 28.2 29.7 14 27.8 0.327 27.1 28.4 15 30.0 0.322 29.4 30.7 16 33.0 0.270 32.4 33.5 17 37.4 0.275 36.9 38.0 18 40.0 0.216 39.6 40.5 19 38.8 0.314 38.2 39.4 20 41.9 0.296 41.3 42.5 21 46.1 0.317 45.5 46.8 22 52.8 0.480 51.8 53.7 > model.frame [1] TRUE > model.matrix [1] "Attributes: < Component \"dim\": Mean relative difference: 0.0345 >" [2] "Attributes: < Component \"dimnames\": Component 1: 51 string mismatches >" [3] "Numeric: lengths (696, 672) differ" > nobs [1] 56 > linearHypothesis Linear hypothesis test (Theil's F test) Hypothesis: Consumption_corpProf + Investment_capitalLag = 0 Model 1: restricted model Model 2: kleinModel Res.Df Df F Pr(>F) 1 45 2 44 1 2.29 0.14 Linear hypothesis test (F statistic of a Wald test) Hypothesis: Consumption_corpProf + Investment_capitalLag = 0 Model 1: restricted model Model 2: kleinModel Res.Df Df F Pr(>F) 1 45 2 44 1 2.89 0.096 . --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Linear hypothesis test (Chi^2 statistic of a Wald test) Hypothesis: Consumption_corpProf + Investment_capitalLag = 0 Model 1: restricted model Model 2: kleinModel Res.Df Df Chisq Pr(>Chisq) 1 45 2 44 1 2.89 0.089 . --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Linear hypothesis test (Theil's F test) Hypothesis: Consumption_corpProf + Investment_capitalLag = 0 Consumption_corpProfLag - PrivateWages_trend = 0 Model 1: restricted model Model 2: kleinModel Res.Df Df F Pr(>F) 1 46 2 44 2 2.3 0.11 Linear hypothesis test (F statistic of a Wald test) Hypothesis: Consumption_corpProf + Investment_capitalLag = 0 Consumption_corpProfLag - PrivateWages_trend = 0 Model 1: restricted model Model 2: kleinModel Res.Df Df F Pr(>F) 1 46 2 44 2 2.9 0.066 . --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Linear hypothesis test (Chi^2 statistic of a Wald test) Hypothesis: Consumption_corpProf + Investment_capitalLag = 0 Consumption_corpProfLag - PrivateWages_trend = 0 Model 1: restricted model Model 2: kleinModel Res.Df Df Chisq Pr(>Chisq) 1 46 2 44 2 5.79 0.055 . --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 > logLik 'log Lik.' -72.2 (df=18) 'log Lik.' -83.4 (df=18) Estimating function Consumption_(Intercept) Consumption_corpProf Consumption_2 -4.4102 -61.801 Consumption_3 -1.0169 -16.947 Consumption_4 0.6316 11.712 Consumption_5 -2.4849 -50.366 Consumption_6 1.3496 25.671 Consumption_8 6.2136 109.641 Consumption_9 5.5588 105.303 Consumption_11 -2.3690 -39.659 Consumption_12 -3.3344 -44.601 Consumption_14 0.8298 8.317 Consumption_15 -2.5803 -32.264 Consumption_16 -2.1088 -30.539 Consumption_17 7.9903 119.154 Consumption_18 -0.6538 -12.697 Consumption_19 -5.8714 -112.192 Consumption_20 4.4259 78.161 Consumption_21 2.2655 46.209 Consumption_22 -0.9489 -21.517 Investment_2 1.9674 27.570 Investment_3 -0.3392 -5.652 Investment_4 -0.5776 -10.712 Investment_5 1.5305 31.021 Investment_6 -0.2467 -4.692 Investment_8 -1.2650 -22.320 Investment_9 -0.8831 -16.728 Investment_10 0.0000 0.000 Investment_11 0.9353 15.658 Investment_12 0.5224 6.988 Investment_14 -2.2467 -22.520 Investment_15 -0.2344 -2.931 Investment_17 -2.2188 -33.088 Investment_18 -0.0466 -0.905 Investment_19 3.0409 58.107 Investment_20 -1.0335 -18.251 Investment_21 -0.5381 -10.975 Investment_22 -1.2437 -28.202 PrivateWages_2 -4.0943 -57.374 PrivateWages_3 1.5700 26.162 PrivateWages_4 3.6522 67.727 PrivateWages_5 -3.9696 -80.460 PrivateWages_6 -0.7099 -13.503 PrivateWages_8 2.2578 39.840 PrivateWages_9 2.5772 48.821 PrivateWages_10 0.0000 0.000 PrivateWages_11 -3.3861 -56.686 PrivateWages_12 -0.4354 -5.824 PrivateWages_13 0.0000 0.000 PrivateWages_14 4.5081 45.187 PrivateWages_15 -0.1430 -1.788 PrivateWages_16 -0.3534 -5.118 PrivateWages_17 3.6864 54.972 PrivateWages_18 0.1281 2.488 PrivateWages_19 -8.7578 -167.347 PrivateWages_20 1.9940 35.215 PrivateWages_21 -1.7982 -36.678 PrivateWages_22 2.6643 60.414 Consumption_corpProfLag Consumption_wages Consumption_2 -56.01 -131.52 Consumption_3 -12.61 -32.39 Consumption_4 10.67 22.27 Consumption_5 -45.72 -95.92 Consumption_6 26.18 52.02 Consumption_8 121.79 248.60 Consumption_9 110.06 232.23 Consumption_11 -51.41 -102.11 Consumption_12 -52.02 -132.22 Consumption_14 5.81 27.65 Consumption_15 -28.90 -96.33 Consumption_16 -25.94 -84.65 Consumption_17 111.86 333.82 Consumption_18 -11.51 -31.13 Consumption_19 -101.57 -289.06 Consumption_20 67.72 214.91 Consumption_21 43.05 121.02 Consumption_22 -20.02 -57.69 Investment_2 24.99 58.67 Investment_3 -4.21 -10.80 Investment_4 -9.76 -20.36 Investment_5 28.16 59.08 Investment_6 -4.79 -9.51 Investment_8 -24.79 -50.61 Investment_9 -17.48 -36.89 Investment_10 0.00 0.00 Investment_11 20.30 40.31 Investment_12 8.15 20.72 Investment_14 -15.73 -74.88 Investment_15 -2.63 -8.75 Investment_17 -31.06 -92.70 Investment_18 -0.82 -2.22 Investment_19 52.61 149.71 Investment_20 -15.81 -50.18 Investment_21 -10.22 -28.74 Investment_22 -26.24 -75.61 PrivateWages_2 -52.00 -122.10 PrivateWages_3 19.47 50.00 PrivateWages_4 61.72 128.76 PrivateWages_5 -73.04 -153.23 PrivateWages_6 -13.77 -27.36 PrivateWages_8 44.25 90.33 PrivateWages_9 51.03 107.67 PrivateWages_10 0.00 0.00 PrivateWages_11 -73.48 -145.95 PrivateWages_12 -6.79 -17.27 PrivateWages_13 0.00 0.00 PrivateWages_14 31.56 150.24 PrivateWages_15 -1.60 -5.34 PrivateWages_16 -4.35 -14.19 PrivateWages_17 51.61 154.01 PrivateWages_18 2.25 6.10 PrivateWages_19 -151.51 -431.17 PrivateWages_20 30.51 96.82 PrivateWages_21 -34.17 -96.06 PrivateWages_22 56.22 161.97 Investment_(Intercept) Investment_corpProf Consumption_2 1.9908 26.734 Consumption_3 0.4591 7.651 Consumption_4 -0.2851 -5.368 Consumption_5 1.1217 23.127 Consumption_6 -0.6092 -11.762 Consumption_8 -2.8049 -49.183 Consumption_9 -2.5093 -48.961 Consumption_11 1.0694 18.405 Consumption_12 1.5052 20.306 Consumption_14 -0.3746 -3.777 Consumption_15 1.1648 15.147 Consumption_16 0.0000 0.000 Consumption_17 -3.6069 -53.782 Consumption_18 0.2951 5.754 Consumption_19 2.6504 51.112 Consumption_20 -1.9979 -35.052 Consumption_21 -1.0227 -20.634 Consumption_22 0.4283 9.753 Investment_2 -1.8422 -24.739 Investment_3 0.3176 5.293 Investment_4 0.5409 10.184 Investment_5 -1.4331 -29.546 Investment_6 0.2310 4.459 Investment_8 1.1844 20.769 Investment_9 0.8269 16.134 Investment_10 2.3608 47.771 Investment_11 -0.8758 -15.072 Investment_12 -0.4892 -6.600 Investment_14 2.1037 21.212 Investment_15 0.2195 2.854 Investment_17 2.0776 30.979 Investment_18 0.0436 0.851 Investment_19 -2.8474 -54.911 Investment_20 0.9677 16.978 Investment_21 0.5038 10.165 Investment_22 1.1646 26.516 PrivateWages_2 2.2726 30.518 PrivateWages_3 -0.8714 -14.524 PrivateWages_4 -2.0272 -38.170 PrivateWages_5 2.2034 45.428 PrivateWages_6 0.3940 7.607 PrivateWages_8 -1.2532 -21.975 PrivateWages_9 -1.4305 -27.911 PrivateWages_10 -2.6709 -54.046 PrivateWages_11 1.8795 32.347 PrivateWages_12 0.2417 3.260 PrivateWages_13 0.0000 0.000 PrivateWages_14 -2.5023 -25.230 PrivateWages_15 0.0794 1.032 PrivateWages_16 0.0000 0.000 PrivateWages_17 -2.0461 -30.509 PrivateWages_18 -0.0711 -1.386 PrivateWages_19 4.8611 93.745 PrivateWages_20 -1.1068 -19.419 PrivateWages_21 0.9981 20.138 PrivateWages_22 -1.4788 -33.672 Investment_corpProfLag Investment_capitalLag Consumption_2 25.283 363.92 Consumption_3 5.692 83.82 Consumption_4 -4.818 -52.60 Consumption_5 20.639 212.79 Consumption_6 -11.819 -117.39 Consumption_8 -54.976 -570.52 Consumption_9 -49.684 -520.93 Consumption_11 23.206 230.67 Consumption_12 23.481 326.17 Consumption_14 -2.622 -77.57 Consumption_15 13.045 235.28 Consumption_16 0.000 0.00 Consumption_17 -50.497 -713.09 Consumption_18 5.194 58.97 Consumption_19 45.852 534.85 Consumption_20 -30.568 -399.38 Consumption_21 -19.431 -205.77 Consumption_22 9.038 87.60 Investment_2 -23.396 -336.76 Investment_3 3.938 57.99 Investment_4 9.141 99.79 Investment_5 -26.369 -271.86 Investment_6 4.481 44.51 Investment_8 23.215 240.92 Investment_9 16.372 171.66 Investment_10 49.812 497.18 Investment_11 -19.004 -188.91 Investment_12 -7.631 -106.01 Investment_14 14.726 435.68 Investment_15 2.458 44.34 Investment_17 29.086 410.74 Investment_18 0.768 8.72 Investment_19 -49.260 -574.60 Investment_20 14.806 193.44 Investment_21 9.573 101.37 Investment_22 24.572 238.15 PrivateWages_2 28.862 415.43 PrivateWages_3 -10.806 -159.12 PrivateWages_4 -34.259 -374.01 PrivateWages_5 40.542 417.98 PrivateWages_6 7.644 75.93 PrivateWages_8 -24.563 -254.91 PrivateWages_9 -28.324 -296.97 PrivateWages_10 -56.356 -562.49 PrivateWages_11 40.785 405.41 PrivateWages_12 3.770 52.37 PrivateWages_13 0.000 0.00 PrivateWages_14 -17.516 -518.22 PrivateWages_15 0.889 16.03 PrivateWages_16 0.000 0.00 PrivateWages_17 -28.646 -404.52 PrivateWages_18 -1.251 -14.21 PrivateWages_19 84.097 980.97 PrivateWages_20 -16.934 -221.25 PrivateWages_21 18.964 200.82 PrivateWages_22 -31.204 -302.42 PrivateWages_(Intercept) PrivateWages_gnp PrivateWages_gnpLag Consumption_2 -4.7927 -225.59 -215.2 Consumption_3 -1.1051 -54.79 -50.4 Consumption_4 0.6863 38.81 34.4 Consumption_5 -2.7004 -163.88 -154.5 Consumption_6 1.4666 88.89 83.7 Consumption_8 6.7526 405.14 432.2 Consumption_9 6.0409 376.16 389.0 Consumption_11 -2.5745 -164.03 -172.5 Consumption_12 -3.6236 -198.69 -221.8 Consumption_14 0.9017 37.99 39.9 Consumption_15 -2.8041 -143.62 -126.5 Consumption_16 -2.2917 -126.82 -113.9 Consumption_17 8.6833 498.37 472.4 Consumption_18 -0.7105 -47.73 -44.5 Consumption_19 -6.3806 -437.15 -414.7 Consumption_20 4.8097 321.50 292.9 Consumption_21 2.4620 184.32 171.1 Consumption_22 -1.0312 -89.59 -78.1 Investment_2 2.6290 123.75 118.0 Investment_3 -0.4532 -22.47 -20.7 Investment_4 -0.7719 -43.64 -38.7 Investment_5 2.0451 124.11 117.0 Investment_6 -0.3296 -19.98 -18.8 Investment_8 -1.6903 -101.41 -108.2 Investment_9 -1.1800 -73.48 -76.0 Investment_10 -3.3690 -217.54 -217.3 Investment_11 1.2498 79.63 83.7 Investment_12 0.6981 38.28 42.7 Investment_14 -3.0022 -126.47 -133.0 Investment_15 -0.3132 -16.04 -14.1 Investment_17 -2.9649 -170.17 -161.3 Investment_18 -0.0623 -4.18 -3.9 Investment_19 4.0635 278.40 264.1 Investment_20 -1.3810 -92.31 -84.1 Investment_21 -0.7190 -53.83 -50.0 Investment_22 -1.6619 -144.39 -125.8 PrivateWages_2 -8.0595 -379.36 -361.9 PrivateWages_3 3.0904 153.23 140.9 PrivateWages_4 7.1892 406.50 360.2 PrivateWages_5 -7.8142 -474.21 -447.0 PrivateWages_6 -1.3974 -84.70 -79.8 PrivateWages_8 4.4445 266.66 284.4 PrivateWages_9 5.0731 315.90 326.7 PrivateWages_10 9.4721 611.61 611.0 PrivateWages_11 -6.6655 -424.67 -446.6 PrivateWages_12 -0.8571 -46.99 -52.5 PrivateWages_13 -4.8476 -227.73 -258.9 PrivateWages_14 8.8741 373.85 393.1 PrivateWages_15 -0.2815 -14.42 -12.7 PrivateWages_16 -0.6957 -38.50 -34.6 PrivateWages_17 7.2565 416.48 394.8 PrivateWages_18 0.2522 16.94 15.8 PrivateWages_19 -17.2396 -1181.13 -1120.6 PrivateWages_20 3.9252 262.38 239.0 PrivateWages_21 -3.5398 -265.01 -246.0 PrivateWages_22 5.2446 455.65 397.0 PrivateWages_trend Consumption_2 47.927 Consumption_3 9.946 Consumption_4 -5.491 Consumption_5 18.903 Consumption_6 -8.800 Consumption_8 -27.010 Consumption_9 -18.123 Consumption_11 2.574 Consumption_12 0.000 Consumption_14 1.803 Consumption_15 -8.412 Consumption_16 -9.167 Consumption_17 43.417 Consumption_18 -4.263 Consumption_19 -44.664 Consumption_20 38.478 Consumption_21 22.158 Consumption_22 -10.312 Investment_2 -26.290 Investment_3 4.079 Investment_4 6.175 Investment_5 -14.316 Investment_6 1.978 Investment_8 6.761 Investment_9 3.540 Investment_10 6.738 Investment_11 -1.250 Investment_12 0.000 Investment_14 -6.004 Investment_15 -0.940 Investment_17 -14.825 Investment_18 -0.374 Investment_19 28.444 Investment_20 -11.048 Investment_21 -6.471 Investment_22 -16.619 PrivateWages_2 80.595 PrivateWages_3 -27.814 PrivateWages_4 -57.514 PrivateWages_5 54.699 PrivateWages_6 8.384 PrivateWages_8 -17.778 PrivateWages_9 -15.219 PrivateWages_10 -18.944 PrivateWages_11 6.666 PrivateWages_12 0.000 PrivateWages_13 -4.848 PrivateWages_14 17.748 PrivateWages_15 -0.844 PrivateWages_16 -2.783 PrivateWages_17 36.283 PrivateWages_18 1.513 PrivateWages_19 -120.677 PrivateWages_20 31.402 PrivateWages_21 -31.858 PrivateWages_22 52.446 [1] TRUE > Bread Consumption_(Intercept) Consumption_corpProf Consumption_corpProfLag [1,] 133.708 -4.1980 0.8576 [2,] -4.198 1.2100 -0.6653 [3,] 0.858 -0.6653 0.7119 [4,] -1.738 -0.1324 -0.0277 [5,] 125.235 3.6584 5.4171 [6,] -6.184 0.8150 -0.6677 [7,] 2.270 -0.5431 0.6187 [8,] -0.265 -0.0441 -0.0204 [9,] -39.027 0.3871 1.7425 [10,] 0.490 -0.0701 0.0456 [11,] 0.147 0.0648 -0.0766 [12,] 0.260 0.0523 0.0256 Consumption_wages Investment_(Intercept) Investment_corpProf [1,] -1.73822 125.23 -6.18369 [2,] -0.13241 3.66 0.81500 [3,] -0.02768 5.42 -0.66769 [4,] 0.10634 -6.40 0.07260 [5,] -6.40260 3920.72 -66.16832 [6,] 0.07260 -66.17 3.06783 [7,] -0.07286 52.35 -2.32206 [8,] 0.03170 -18.13 0.25629 [9,] 0.06731 57.07 -0.51824 [10,] -0.00202 2.27 0.00785 [11,] 0.00109 -3.34 0.00101 [12,] -0.03773 -1.63 0.03241 Investment_corpProfLag Investment_capitalLag PrivateWages_(Intercept) [1,] 2.27003 -0.26469 -39.0267 [2,] -0.54312 -0.04408 0.3871 [3,] 0.61867 -0.02038 1.7425 [4,] -0.07286 0.03170 0.0673 [5,] 52.35486 -18.13066 57.0659 [6,] -2.32206 0.25629 -0.5182 [7,] 2.22379 -0.24386 -0.7311 [8,] -0.24386 0.08845 -0.1851 [9,] -0.73109 -0.18506 71.2482 [10,] 0.01103 -0.01288 -0.3220 [11,] 0.00202 0.01653 -0.8851 [12,] -0.04341 0.00871 0.7698 PrivateWages_gnp PrivateWages_gnpLag PrivateWages_trend [1,] 0.49031 0.147339 0.260437 [2,] -0.07008 0.064790 0.052347 [3,] 0.04558 -0.076595 0.025629 [4,] -0.00202 0.001086 -0.037728 [5,] 2.27149 -3.339873 -1.627913 [6,] 0.00785 0.001013 0.032414 [7,] 0.01103 0.002018 -0.043407 [8,] -0.01288 0.016530 0.008714 [9,] -0.32199 -0.885080 0.769761 [10,] 0.04892 -0.044549 -0.013616 [11,] -0.04455 0.061046 0.000449 [12,] -0.01362 0.000449 0.047057 > > proc.time() user system elapsed 8.328 0.248 8.571 systemfit/tests/KleinI_noMat.Rout.save0000644000176200001440000150342513060100647017573 0ustar liggesusers R version 3.3.2 (2016-10-31) -- "Sincere Pumpkin Patch" Copyright (C) 2016 The R Foundation for Statistical Computing Platform: x86_64-pc-linux-gnu (64-bit) R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > library( "systemfit" ) Loading required package: Matrix Loading required package: car Loading required package: lmtest Loading required package: zoo Attaching package: 'zoo' The following objects are masked from 'package:base': as.Date, as.Date.numeric Please cite the 'systemfit' package as: Arne Henningsen and Jeff D. Hamann (2007). systemfit: A Package for Estimating Systems of Simultaneous Equations in R. Journal of Statistical Software 23(4), 1-40. http://www.jstatsoft.org/v23/i04/. If you have questions, suggestions, or comments regarding the 'systemfit' package, please use a forum or 'tracker' at systemfit's R-Forge site: https://r-forge.r-project.org/projects/systemfit/ > options( warn = 1 ) > options( digits = 3 ) > > data( "KleinI" ) > eqConsump <- consump ~ corpProf + corpProfLag + wages > eqInvest <- invest ~ corpProf + corpProfLag + capitalLag > eqPrivWage <- privWage ~ gnp + gnpLag + trend > inst <- ~ govExp + taxes + govWage + trend + capitalLag + corpProfLag + gnpLag > system <- list( Consumption = eqConsump, Investment = eqInvest, + PrivateWages = eqPrivWage ) > restrict <- c( "Consumption_corpProf + Investment_capitalLag = 0" ) > restrict2 <- c( restrict, "Consumption_corpProfLag - PrivateWages_trend = 0" ) > > for( dataNo in 1:5 ) { + # set some values of some variables to NA + if( dataNo == 2 ) { + KleinI$gnpLag[ 7 ] <- NA + } else if( dataNo == 3 ) { + KleinI$wages[ 10 ] <- NA + } else if( dataNo == 4 ) { + KleinI$corpProf[ 13 ] <- NA + } else if( dataNo == 5 ) { + KleinI$invest[ 16 ] <- NA + } + + # single-equation OLS + lmConsump <- lm( eqConsump, data = KleinI ) + lmInvest <- lm( eqInvest, data = KleinI ) + lmPrivWage <- lm( eqPrivWage, data = KleinI ) + + for( methodNo in 1:5 ) { + method <- c( "OLS", "2SLS", "SUR", "3SLS", "3SLS" )[ methodNo ] + maxit <- ifelse( methodNo == 5, 500, 1 ) + + cat( "> \n> # ", ifelse( maxit == 1, "", "I" ), method, "\n", sep = "" ) + if( method %in% c( "OLS", "WLS", "SUR" ) ) { + kleinModel <- systemfit( system, method = method, data = KleinI, + methodResidCov = ifelse( method == "OLS", "geomean", "noDfCor" ), + maxit = maxit, useMatrix = FALSE ) + } else { + kleinModel <- systemfit( system, method = method, data = KleinI, + inst = inst, methodResidCov = "noDfCor", maxit = maxit, + useMatrix = FALSE ) + } + cat( "> summary\n" ) + print( summary( kleinModel ) ) + if( method == "OLS" ) { + cat( "compare coef with single-equation OLS\n" ) + print( all.equal( coef( kleinModel ), + c( coef( lmConsump ), coef( lmInvest ), coef( lmPrivWage ) ), + check.attributes = FALSE ) ) + } + cat( "> residuals\n" ) + print( residuals( kleinModel ) ) + cat( "> fitted\n" ) + print( fitted( kleinModel ) ) + cat( "> predict\n" ) + print( predict( kleinModel, se.fit = TRUE, + interval = ifelse( methodNo %in% c( 1, 4 ), "prediction", "confidence" ), + useDfSys = methodNo %in% c( 1, 3, 5 ) ) ) + cat( "> model.frame\n" ) + if( methodNo == 1 ) { + mfOls <- model.frame( kleinModel ) + print( mfOls ) + } else if( methodNo == 2 ) { + mf2sls <- model.frame( kleinModel ) + print( mf2sls ) + } else if( methodNo == 3 ) { + print( all.equal( mfOls, model.frame( kleinModel ) ) ) + } else { + print( all.equal( mf2sls, model.frame( kleinModel ) ) ) + } + cat( "> model.matrix\n" ) + if( methodNo == 1 ) { + mmOls <- model.matrix( kleinModel ) + print( mmOls ) + } else { + print( all.equal( mmOls, model.matrix( kleinModel ) ) ) + } + cat( "> nobs\n" ) + print( nobs( kleinModel ) ) + cat( "> linearHypothesis\n" ) + print( linearHypothesis( kleinModel, restrict ) ) + print( linearHypothesis( kleinModel, restrict, test = "F" ) ) + print( linearHypothesis( kleinModel, restrict, test = "Chisq" ) ) + print( linearHypothesis( kleinModel, restrict2 ) ) + print( linearHypothesis( kleinModel, restrict2, test = "F" ) ) + print( linearHypothesis( kleinModel, restrict2, test = "Chisq" ) ) + cat( "> logLik\n" ) + print( logLik( kleinModel ) ) + print( logLik( kleinModel, residCovDiag = TRUE ) ) + if( method == "OLS" ) { + cat( "compare log likelihood value with single-equation OLS\n" ) + print( all.equal( logLik( kleinModel, residCovDiag = TRUE ), + logLik( lmConsump ) + logLik( lmInvest ) + logLik( lmPrivWage ), + check.attributes = FALSE ) ) + } + } + } > > # OLS > summary systemfit results method: OLS N DF SSR detRCov OLS-R2 McElroy-R2 system 63 51 45.2 0.371 0.977 0.991 N DF SSR MSE RMSE R2 Adj R2 Consumption 21 17 17.9 1.052 1.026 0.981 0.978 Investment 21 17 17.3 1.019 1.009 0.931 0.919 PrivateWages 21 17 10.0 0.589 0.767 0.987 0.985 The covariance matrix of the residuals Consumption Investment PrivateWages Consumption 1.0517 0.0611 -0.470 Investment 0.0611 1.0190 0.150 PrivateWages -0.4704 0.1497 0.589 The correlations of the residuals Consumption Investment PrivateWages Consumption 1.0000 0.0591 -0.598 Investment 0.0591 1.0000 0.193 PrivateWages -0.5979 0.1933 1.000 OLS estimates for 'Consumption' (equation 1) Model Formula: consump ~ corpProf + corpProfLag + wages Estimate Std. Error t value Pr(>|t|) (Intercept) 16.2366 1.3027 12.46 5.6e-10 *** corpProf 0.1929 0.0912 2.12 0.049 * corpProfLag 0.0899 0.0906 0.99 0.335 wages 0.7962 0.0399 19.93 3.2e-13 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.026 on 17 degrees of freedom Number of observations: 21 Degrees of Freedom: 17 SSR: 17.879 MSE: 1.052 Root MSE: 1.026 Multiple R-Squared: 0.981 Adjusted R-Squared: 0.978 OLS estimates for 'Investment' (equation 2) Model Formula: invest ~ corpProf + corpProfLag + capitalLag Estimate Std. Error t value Pr(>|t|) (Intercept) 10.1258 5.4655 1.85 0.08137 . corpProf 0.4796 0.0971 4.94 0.00012 *** corpProfLag 0.3330 0.1009 3.30 0.00421 ** capitalLag -0.1118 0.0267 -4.18 0.00062 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.009 on 17 degrees of freedom Number of observations: 21 Degrees of Freedom: 17 SSR: 17.323 MSE: 1.019 Root MSE: 1.009 Multiple R-Squared: 0.931 Adjusted R-Squared: 0.919 OLS estimates for 'PrivateWages' (equation 3) Model Formula: privWage ~ gnp + gnpLag + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 1.4970 1.2700 1.18 0.25474 gnp 0.4395 0.0324 13.56 1.5e-10 *** gnpLag 0.1461 0.0374 3.90 0.00114 ** trend 0.1302 0.0319 4.08 0.00078 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 0.767 on 17 degrees of freedom Number of observations: 21 Degrees of Freedom: 17 SSR: 10.005 MSE: 0.589 Root MSE: 0.767 Multiple R-Squared: 0.987 Adjusted R-Squared: 0.985 compare coef with single-equation OLS [1] TRUE > residuals Consumption Investment PrivateWages 1 NA NA NA 2 -0.32389 -0.0668 -1.2942 3 -1.25001 -0.0476 0.2957 4 -1.56574 1.2467 1.1877 5 -0.49350 -1.3512 -0.1358 6 0.00761 0.4154 -0.4654 7 0.86910 1.4923 -0.4838 8 1.33848 0.7889 -0.7281 9 1.05498 -0.6317 0.3392 10 -0.58856 1.0830 1.1957 11 0.28231 0.2791 -0.1508 12 -0.22965 0.0369 0.5942 13 -0.32213 0.3659 0.1027 14 0.32228 0.2237 0.4503 15 -0.05801 -0.1728 0.2816 16 -0.03466 0.0101 0.0138 17 1.61650 0.9719 -0.8508 18 -0.43597 0.0516 0.9956 19 0.21005 -2.5656 -0.4688 20 0.98920 -0.6866 -0.3795 21 0.78508 -0.7807 -1.0909 22 -2.17345 -0.6623 0.5917 > fitted Consumption Investment PrivateWages 1 NA NA NA 2 42.2 -0.133 26.8 3 46.3 1.948 29.0 4 50.8 3.953 32.9 5 51.1 4.351 34.0 6 52.6 4.685 35.9 7 54.2 4.108 37.9 8 54.9 3.411 38.6 9 56.2 3.632 38.9 10 58.4 4.017 40.1 11 54.7 0.721 38.1 12 51.1 -3.437 33.9 13 45.9 -6.566 28.9 14 46.2 -5.324 28.0 15 48.8 -2.827 30.3 16 51.3 -1.310 33.2 17 56.1 1.128 37.7 18 59.1 1.948 40.0 19 57.3 0.666 38.7 20 60.6 1.987 42.0 21 64.2 4.081 46.1 22 71.9 5.562 52.7 > predict Consumption.pred Consumption.se.fit Consumption.lwr Consumption.upr 1 NA NA NA NA 2 42.2 0.462 40.0 44.5 3 46.3 0.518 43.9 48.6 4 50.8 0.341 48.6 52.9 5 51.1 0.396 48.9 53.3 6 52.6 0.397 50.4 54.8 7 54.2 0.359 52.0 56.4 8 54.9 0.327 52.7 57.0 9 56.2 0.350 54.1 58.4 10 58.4 0.370 56.2 60.6 11 54.7 0.606 52.3 57.1 12 51.1 0.484 48.9 53.4 13 45.9 0.629 43.5 48.3 14 46.2 0.602 43.8 48.6 15 48.8 0.374 46.6 50.9 16 51.3 0.333 49.2 53.5 17 56.1 0.366 53.9 58.3 18 59.1 0.321 57.0 61.3 19 57.3 0.371 55.1 59.5 20 60.6 0.434 58.4 62.8 21 64.2 0.425 62.0 66.4 22 71.9 0.666 69.4 74.3 Investment.pred Investment.se.fit Investment.lwr Investment.upr 1 NA NA NA NA 2 -0.133 0.607 -2.498 2.231 3 1.948 0.499 -0.313 4.208 4 3.953 0.449 1.735 6.171 5 4.351 0.371 2.192 6.510 6 4.685 0.349 2.540 6.829 7 4.108 0.329 1.976 6.239 8 3.411 0.292 1.301 5.521 9 3.632 0.389 1.460 5.804 10 4.017 0.447 1.801 6.233 11 0.721 0.601 -1.638 3.080 12 -3.437 0.507 -5.704 -1.169 13 -6.566 0.616 -8.940 -4.192 14 -5.324 0.694 -7.783 -2.865 15 -2.827 0.373 -4.988 -0.667 16 -1.310 0.320 -3.436 0.816 17 1.128 0.347 -1.015 3.271 18 1.948 0.243 -0.136 4.033 19 0.666 0.312 -1.456 2.787 20 1.987 0.366 -0.169 4.143 21 4.081 0.332 1.948 6.214 22 5.562 0.461 3.334 7.790 PrivateWages.pred PrivateWages.se.fit PrivateWages.lwr PrivateWages.upr 1 NA NA NA NA 2 26.8 0.354 25.1 28.5 3 29.0 0.355 27.3 30.7 4 32.9 0.354 31.2 34.6 5 34.0 0.269 32.4 35.7 6 35.9 0.266 34.2 37.5 7 37.9 0.266 36.3 39.5 8 38.6 0.273 37.0 40.3 9 38.9 0.261 37.2 40.5 10 40.1 0.247 38.5 41.7 11 38.1 0.354 36.4 39.7 12 33.9 0.363 32.2 35.6 13 28.9 0.429 27.1 30.7 14 28.0 0.376 26.3 29.8 15 30.3 0.371 28.6 32.0 16 33.2 0.310 31.5 34.8 17 37.7 0.305 36.0 39.3 18 40.0 0.238 38.4 41.6 19 38.7 0.357 37.0 40.4 20 42.0 0.321 40.3 43.6 21 46.1 0.335 44.4 47.8 22 52.7 0.502 50.9 54.5 > model.frame consump corpProf corpProfLag wages invest capitalLag privWage gnp gnpLag 1 39.8 12.7 NA 31.0 2.7 180 28.8 44.9 NA 2 41.9 12.4 12.7 28.2 -0.2 183 25.5 45.6 44.9 3 45.0 16.9 12.4 32.2 1.9 183 29.3 50.1 45.6 4 49.2 18.4 16.9 37.0 5.2 184 34.1 57.2 50.1 5 50.6 19.4 18.4 37.0 3.0 190 33.9 57.1 57.2 6 52.6 20.1 19.4 38.6 5.1 193 35.4 61.0 57.1 7 55.1 19.6 20.1 40.7 5.6 198 37.4 64.0 61.0 8 56.2 19.8 19.6 41.5 4.2 203 37.9 64.4 64.0 9 57.3 21.1 19.8 42.9 3.0 208 39.2 64.5 64.4 10 57.8 21.7 21.1 45.3 5.1 211 41.3 67.0 64.5 11 55.0 15.6 21.7 42.1 1.0 216 37.9 61.2 67.0 12 50.9 11.4 15.6 39.3 -3.4 217 34.5 53.4 61.2 13 45.6 7.0 11.4 34.3 -6.2 213 29.0 44.3 53.4 14 46.5 11.2 7.0 34.1 -5.1 207 28.5 45.1 44.3 15 48.7 12.3 11.2 36.6 -3.0 202 30.6 49.7 45.1 16 51.3 14.0 12.3 39.3 -1.3 199 33.2 54.4 49.7 17 57.7 17.6 14.0 44.2 2.1 198 36.8 62.7 54.4 18 58.7 17.3 17.6 47.7 2.0 200 41.0 65.0 62.7 19 57.5 15.3 17.3 45.9 -1.9 202 38.2 60.9 65.0 20 61.6 19.0 15.3 49.4 1.3 200 41.6 69.5 60.9 21 65.0 21.1 19.0 53.0 3.3 201 45.0 75.7 69.5 22 69.7 23.5 21.1 61.8 4.9 204 53.3 88.4 75.7 trend 1 -11 2 -10 3 -9 4 -8 5 -7 6 -6 7 -5 8 -4 9 -3 10 -2 11 -1 12 0 13 1 14 2 15 3 16 4 17 5 18 6 19 7 20 8 21 9 22 10 > model.matrix Consumption_(Intercept) Consumption_corpProf Consumption_2 1 12.4 Consumption_3 1 16.9 Consumption_4 1 18.4 Consumption_5 1 19.4 Consumption_6 1 20.1 Consumption_7 1 19.6 Consumption_8 1 19.8 Consumption_9 1 21.1 Consumption_10 1 21.7 Consumption_11 1 15.6 Consumption_12 1 11.4 Consumption_13 1 7.0 Consumption_14 1 11.2 Consumption_15 1 12.3 Consumption_16 1 14.0 Consumption_17 1 17.6 Consumption_18 1 17.3 Consumption_19 1 15.3 Consumption_20 1 19.0 Consumption_21 1 21.1 Consumption_22 1 23.5 Investment_2 0 0.0 Investment_3 0 0.0 Investment_4 0 0.0 Investment_5 0 0.0 Investment_6 0 0.0 Investment_7 0 0.0 Investment_8 0 0.0 Investment_9 0 0.0 Investment_10 0 0.0 Investment_11 0 0.0 Investment_12 0 0.0 Investment_13 0 0.0 Investment_14 0 0.0 Investment_15 0 0.0 Investment_16 0 0.0 Investment_17 0 0.0 Investment_18 0 0.0 Investment_19 0 0.0 Investment_20 0 0.0 Investment_21 0 0.0 Investment_22 0 0.0 PrivateWages_2 0 0.0 PrivateWages_3 0 0.0 PrivateWages_4 0 0.0 PrivateWages_5 0 0.0 PrivateWages_6 0 0.0 PrivateWages_7 0 0.0 PrivateWages_8 0 0.0 PrivateWages_9 0 0.0 PrivateWages_10 0 0.0 PrivateWages_11 0 0.0 PrivateWages_12 0 0.0 PrivateWages_13 0 0.0 PrivateWages_14 0 0.0 PrivateWages_15 0 0.0 PrivateWages_16 0 0.0 PrivateWages_17 0 0.0 PrivateWages_18 0 0.0 PrivateWages_19 0 0.0 PrivateWages_20 0 0.0 PrivateWages_21 0 0.0 PrivateWages_22 0 0.0 Consumption_corpProfLag Consumption_wages Consumption_2 12.7 28.2 Consumption_3 12.4 32.2 Consumption_4 16.9 37.0 Consumption_5 18.4 37.0 Consumption_6 19.4 38.6 Consumption_7 20.1 40.7 Consumption_8 19.6 41.5 Consumption_9 19.8 42.9 Consumption_10 21.1 45.3 Consumption_11 21.7 42.1 Consumption_12 15.6 39.3 Consumption_13 11.4 34.3 Consumption_14 7.0 34.1 Consumption_15 11.2 36.6 Consumption_16 12.3 39.3 Consumption_17 14.0 44.2 Consumption_18 17.6 47.7 Consumption_19 17.3 45.9 Consumption_20 15.3 49.4 Consumption_21 19.0 53.0 Consumption_22 21.1 61.8 Investment_2 0.0 0.0 Investment_3 0.0 0.0 Investment_4 0.0 0.0 Investment_5 0.0 0.0 Investment_6 0.0 0.0 Investment_7 0.0 0.0 Investment_8 0.0 0.0 Investment_9 0.0 0.0 Investment_10 0.0 0.0 Investment_11 0.0 0.0 Investment_12 0.0 0.0 Investment_13 0.0 0.0 Investment_14 0.0 0.0 Investment_15 0.0 0.0 Investment_16 0.0 0.0 Investment_17 0.0 0.0 Investment_18 0.0 0.0 Investment_19 0.0 0.0 Investment_20 0.0 0.0 Investment_21 0.0 0.0 Investment_22 0.0 0.0 PrivateWages_2 0.0 0.0 PrivateWages_3 0.0 0.0 PrivateWages_4 0.0 0.0 PrivateWages_5 0.0 0.0 PrivateWages_6 0.0 0.0 PrivateWages_7 0.0 0.0 PrivateWages_8 0.0 0.0 PrivateWages_9 0.0 0.0 PrivateWages_10 0.0 0.0 PrivateWages_11 0.0 0.0 PrivateWages_12 0.0 0.0 PrivateWages_13 0.0 0.0 PrivateWages_14 0.0 0.0 PrivateWages_15 0.0 0.0 PrivateWages_16 0.0 0.0 PrivateWages_17 0.0 0.0 PrivateWages_18 0.0 0.0 PrivateWages_19 0.0 0.0 PrivateWages_20 0.0 0.0 PrivateWages_21 0.0 0.0 PrivateWages_22 0.0 0.0 Investment_(Intercept) Investment_corpProf Consumption_2 0 0.0 Consumption_3 0 0.0 Consumption_4 0 0.0 Consumption_5 0 0.0 Consumption_6 0 0.0 Consumption_7 0 0.0 Consumption_8 0 0.0 Consumption_9 0 0.0 Consumption_10 0 0.0 Consumption_11 0 0.0 Consumption_12 0 0.0 Consumption_13 0 0.0 Consumption_14 0 0.0 Consumption_15 0 0.0 Consumption_16 0 0.0 Consumption_17 0 0.0 Consumption_18 0 0.0 Consumption_19 0 0.0 Consumption_20 0 0.0 Consumption_21 0 0.0 Consumption_22 0 0.0 Investment_2 1 12.4 Investment_3 1 16.9 Investment_4 1 18.4 Investment_5 1 19.4 Investment_6 1 20.1 Investment_7 1 19.6 Investment_8 1 19.8 Investment_9 1 21.1 Investment_10 1 21.7 Investment_11 1 15.6 Investment_12 1 11.4 Investment_13 1 7.0 Investment_14 1 11.2 Investment_15 1 12.3 Investment_16 1 14.0 Investment_17 1 17.6 Investment_18 1 17.3 Investment_19 1 15.3 Investment_20 1 19.0 Investment_21 1 21.1 Investment_22 1 23.5 PrivateWages_2 0 0.0 PrivateWages_3 0 0.0 PrivateWages_4 0 0.0 PrivateWages_5 0 0.0 PrivateWages_6 0 0.0 PrivateWages_7 0 0.0 PrivateWages_8 0 0.0 PrivateWages_9 0 0.0 PrivateWages_10 0 0.0 PrivateWages_11 0 0.0 PrivateWages_12 0 0.0 PrivateWages_13 0 0.0 PrivateWages_14 0 0.0 PrivateWages_15 0 0.0 PrivateWages_16 0 0.0 PrivateWages_17 0 0.0 PrivateWages_18 0 0.0 PrivateWages_19 0 0.0 PrivateWages_20 0 0.0 PrivateWages_21 0 0.0 PrivateWages_22 0 0.0 Investment_corpProfLag Investment_capitalLag Consumption_2 0.0 0 Consumption_3 0.0 0 Consumption_4 0.0 0 Consumption_5 0.0 0 Consumption_6 0.0 0 Consumption_7 0.0 0 Consumption_8 0.0 0 Consumption_9 0.0 0 Consumption_10 0.0 0 Consumption_11 0.0 0 Consumption_12 0.0 0 Consumption_13 0.0 0 Consumption_14 0.0 0 Consumption_15 0.0 0 Consumption_16 0.0 0 Consumption_17 0.0 0 Consumption_18 0.0 0 Consumption_19 0.0 0 Consumption_20 0.0 0 Consumption_21 0.0 0 Consumption_22 0.0 0 Investment_2 12.7 183 Investment_3 12.4 183 Investment_4 16.9 184 Investment_5 18.4 190 Investment_6 19.4 193 Investment_7 20.1 198 Investment_8 19.6 203 Investment_9 19.8 208 Investment_10 21.1 211 Investment_11 21.7 216 Investment_12 15.6 217 Investment_13 11.4 213 Investment_14 7.0 207 Investment_15 11.2 202 Investment_16 12.3 199 Investment_17 14.0 198 Investment_18 17.6 200 Investment_19 17.3 202 Investment_20 15.3 200 Investment_21 19.0 201 Investment_22 21.1 204 PrivateWages_2 0.0 0 PrivateWages_3 0.0 0 PrivateWages_4 0.0 0 PrivateWages_5 0.0 0 PrivateWages_6 0.0 0 PrivateWages_7 0.0 0 PrivateWages_8 0.0 0 PrivateWages_9 0.0 0 PrivateWages_10 0.0 0 PrivateWages_11 0.0 0 PrivateWages_12 0.0 0 PrivateWages_13 0.0 0 PrivateWages_14 0.0 0 PrivateWages_15 0.0 0 PrivateWages_16 0.0 0 PrivateWages_17 0.0 0 PrivateWages_18 0.0 0 PrivateWages_19 0.0 0 PrivateWages_20 0.0 0 PrivateWages_21 0.0 0 PrivateWages_22 0.0 0 PrivateWages_(Intercept) PrivateWages_gnp PrivateWages_gnpLag Consumption_2 0 0.0 0.0 Consumption_3 0 0.0 0.0 Consumption_4 0 0.0 0.0 Consumption_5 0 0.0 0.0 Consumption_6 0 0.0 0.0 Consumption_7 0 0.0 0.0 Consumption_8 0 0.0 0.0 Consumption_9 0 0.0 0.0 Consumption_10 0 0.0 0.0 Consumption_11 0 0.0 0.0 Consumption_12 0 0.0 0.0 Consumption_13 0 0.0 0.0 Consumption_14 0 0.0 0.0 Consumption_15 0 0.0 0.0 Consumption_16 0 0.0 0.0 Consumption_17 0 0.0 0.0 Consumption_18 0 0.0 0.0 Consumption_19 0 0.0 0.0 Consumption_20 0 0.0 0.0 Consumption_21 0 0.0 0.0 Consumption_22 0 0.0 0.0 Investment_2 0 0.0 0.0 Investment_3 0 0.0 0.0 Investment_4 0 0.0 0.0 Investment_5 0 0.0 0.0 Investment_6 0 0.0 0.0 Investment_7 0 0.0 0.0 Investment_8 0 0.0 0.0 Investment_9 0 0.0 0.0 Investment_10 0 0.0 0.0 Investment_11 0 0.0 0.0 Investment_12 0 0.0 0.0 Investment_13 0 0.0 0.0 Investment_14 0 0.0 0.0 Investment_15 0 0.0 0.0 Investment_16 0 0.0 0.0 Investment_17 0 0.0 0.0 Investment_18 0 0.0 0.0 Investment_19 0 0.0 0.0 Investment_20 0 0.0 0.0 Investment_21 0 0.0 0.0 Investment_22 0 0.0 0.0 PrivateWages_2 1 45.6 44.9 PrivateWages_3 1 50.1 45.6 PrivateWages_4 1 57.2 50.1 PrivateWages_5 1 57.1 57.2 PrivateWages_6 1 61.0 57.1 PrivateWages_7 1 64.0 61.0 PrivateWages_8 1 64.4 64.0 PrivateWages_9 1 64.5 64.4 PrivateWages_10 1 67.0 64.5 PrivateWages_11 1 61.2 67.0 PrivateWages_12 1 53.4 61.2 PrivateWages_13 1 44.3 53.4 PrivateWages_14 1 45.1 44.3 PrivateWages_15 1 49.7 45.1 PrivateWages_16 1 54.4 49.7 PrivateWages_17 1 62.7 54.4 PrivateWages_18 1 65.0 62.7 PrivateWages_19 1 60.9 65.0 PrivateWages_20 1 69.5 60.9 PrivateWages_21 1 75.7 69.5 PrivateWages_22 1 88.4 75.7 PrivateWages_trend Consumption_2 0 Consumption_3 0 Consumption_4 0 Consumption_5 0 Consumption_6 0 Consumption_7 0 Consumption_8 0 Consumption_9 0 Consumption_10 0 Consumption_11 0 Consumption_12 0 Consumption_13 0 Consumption_14 0 Consumption_15 0 Consumption_16 0 Consumption_17 0 Consumption_18 0 Consumption_19 0 Consumption_20 0 Consumption_21 0 Consumption_22 0 Investment_2 0 Investment_3 0 Investment_4 0 Investment_5 0 Investment_6 0 Investment_7 0 Investment_8 0 Investment_9 0 Investment_10 0 Investment_11 0 Investment_12 0 Investment_13 0 Investment_14 0 Investment_15 0 Investment_16 0 Investment_17 0 Investment_18 0 Investment_19 0 Investment_20 0 Investment_21 0 Investment_22 0 PrivateWages_2 -10 PrivateWages_3 -9 PrivateWages_4 -8 PrivateWages_5 -7 PrivateWages_6 -6 PrivateWages_7 -5 PrivateWages_8 -4 PrivateWages_9 -3 PrivateWages_10 -2 PrivateWages_11 -1 PrivateWages_12 0 PrivateWages_13 1 PrivateWages_14 2 PrivateWages_15 3 PrivateWages_16 4 PrivateWages_17 5 PrivateWages_18 6 PrivateWages_19 7 PrivateWages_20 8 PrivateWages_21 9 PrivateWages_22 10 > nobs [1] 63 > linearHypothesis Linear hypothesis test (Theil's F test) Hypothesis: Consumption_corpProf + Investment_capitalLag = 0 Model 1: restricted model Model 2: kleinModel Res.Df Df F Pr(>F) 1 52 2 51 1 0.82 0.37 Linear hypothesis test (F statistic of a Wald test) Hypothesis: Consumption_corpProf + Investment_capitalLag = 0 Model 1: restricted model Model 2: kleinModel Res.Df Df F Pr(>F) 1 52 2 51 1 0.73 0.4 Linear hypothesis test (Chi^2 statistic of a Wald test) Hypothesis: Consumption_corpProf + Investment_capitalLag = 0 Model 1: restricted model Model 2: kleinModel Res.Df Df Chisq Pr(>Chisq) 1 52 2 51 1 0.73 0.39 Linear hypothesis test (Theil's F test) Hypothesis: Consumption_corpProf + Investment_capitalLag = 0 Consumption_corpProfLag - PrivateWages_trend = 0 Model 1: restricted model Model 2: kleinModel Res.Df Df F Pr(>F) 1 53 2 51 2 0.42 0.66 Linear hypothesis test (F statistic of a Wald test) Hypothesis: Consumption_corpProf + Investment_capitalLag = 0 Consumption_corpProfLag - PrivateWages_trend = 0 Model 1: restricted model Model 2: kleinModel Res.Df Df F Pr(>F) 1 53 2 51 2 0.37 0.69 Linear hypothesis test (Chi^2 statistic of a Wald test) Hypothesis: Consumption_corpProf + Investment_capitalLag = 0 Consumption_corpProfLag - PrivateWages_trend = 0 Model 1: restricted model Model 2: kleinModel Res.Df Df Chisq Pr(>Chisq) 1 53 2 51 2 0.74 0.69 > logLik 'log Lik.' -72.3 (df=13) 'log Lik.' -77.9 (df=13) compare log likelihood value with single-equation OLS [1] TRUE > > # 2SLS > summary systemfit results method: 2SLS N DF SSR detRCov OLS-R2 McElroy-R2 system 63 51 61 0.288 0.969 0.992 N DF SSR MSE RMSE R2 Adj R2 Consumption 21 17 21.9 1.290 1.136 0.977 0.973 Investment 21 17 29.0 1.709 1.307 0.885 0.865 PrivateWages 21 17 10.0 0.589 0.767 0.987 0.985 The covariance matrix of the residuals Consumption Investment PrivateWages Consumption 1.044 0.438 -0.385 Investment 0.438 1.383 0.193 PrivateWages -0.385 0.193 0.476 The correlations of the residuals Consumption Investment PrivateWages Consumption 1.000 0.364 -0.546 Investment 0.364 1.000 0.237 PrivateWages -0.546 0.237 1.000 2SLS estimates for 'Consumption' (equation 1) Model Formula: consump ~ corpProf + corpProfLag + wages Instruments: ~govExp + taxes + govWage + trend + capitalLag + corpProfLag + gnpLag Estimate Std. Error t value Pr(>|t|) (Intercept) 16.5548 1.3208 12.53 5.2e-10 *** corpProf 0.0173 0.1180 0.15 0.89 corpProfLag 0.2162 0.1073 2.02 0.06 . wages 0.8102 0.0402 20.13 2.7e-13 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.136 on 17 degrees of freedom Number of observations: 21 Degrees of Freedom: 17 SSR: 21.925 MSE: 1.29 Root MSE: 1.136 Multiple R-Squared: 0.977 Adjusted R-Squared: 0.973 2SLS estimates for 'Investment' (equation 2) Model Formula: invest ~ corpProf + corpProfLag + capitalLag Instruments: ~govExp + taxes + govWage + trend + capitalLag + corpProfLag + gnpLag Estimate Std. Error t value Pr(>|t|) (Intercept) 20.2782 7.5427 2.69 0.01555 * corpProf 0.1502 0.1732 0.87 0.39792 corpProfLag 0.6159 0.1628 3.78 0.00148 ** capitalLag -0.1578 0.0361 -4.37 0.00042 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.307 on 17 degrees of freedom Number of observations: 21 Degrees of Freedom: 17 SSR: 29.047 MSE: 1.709 Root MSE: 1.307 Multiple R-Squared: 0.885 Adjusted R-Squared: 0.865 2SLS estimates for 'PrivateWages' (equation 3) Model Formula: privWage ~ gnp + gnpLag + trend Instruments: ~govExp + taxes + govWage + trend + capitalLag + corpProfLag + gnpLag Estimate Std. Error t value Pr(>|t|) (Intercept) 1.5003 1.1478 1.31 0.20857 gnp 0.4389 0.0356 12.32 6.8e-10 *** gnpLag 0.1467 0.0388 3.78 0.00150 ** trend 0.1304 0.0291 4.47 0.00033 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 0.767 on 17 degrees of freedom Number of observations: 21 Degrees of Freedom: 17 SSR: 10.005 MSE: 0.589 Root MSE: 0.767 Multiple R-Squared: 0.987 Adjusted R-Squared: 0.985 > residuals Consumption Investment PrivateWages 1 NA NA NA 2 -0.46263 -1.320 -1.2940 3 -0.61635 0.257 0.2981 4 -1.30423 0.860 1.1918 5 -0.24588 -1.594 -0.1361 6 0.22948 0.259 -0.4634 7 0.88538 1.207 -0.4824 8 1.44189 0.969 -0.7284 9 1.34190 0.113 0.3387 10 -0.39403 1.796 1.1965 11 -0.62564 -0.953 -0.1552 12 -1.06543 -0.807 0.5882 13 -1.33021 -0.895 0.0955 14 0.61059 1.306 0.4487 15 -0.14208 -0.151 0.2822 16 0.00315 0.142 0.0145 17 2.00337 1.749 -0.8478 18 -0.60552 -0.192 0.9950 19 -0.24771 -3.291 -0.4734 20 1.38510 0.285 -0.3766 21 1.03204 -0.104 -1.0893 22 -1.89319 0.363 0.5974 > fitted Consumption Investment PrivateWages 1 NA NA NA 2 42.4 1.120 26.8 3 45.6 1.643 29.0 4 50.5 4.340 32.9 5 50.8 4.594 34.0 6 52.4 4.841 35.9 7 54.2 4.393 37.9 8 54.8 3.231 38.6 9 56.0 2.887 38.9 10 58.2 3.304 40.1 11 55.6 1.953 38.1 12 52.0 -2.593 33.9 13 46.9 -5.305 28.9 14 45.9 -6.406 28.1 15 48.8 -2.849 30.3 16 51.3 -1.442 33.2 17 55.7 0.351 37.6 18 59.3 2.192 40.0 19 57.7 1.391 38.7 20 60.2 1.015 42.0 21 64.0 3.404 46.1 22 71.6 4.537 52.7 > predict Consumption.pred Consumption.se.fit Consumption.lwr Consumption.upr 1 NA NA NA NA 2 42.4 0.471 41.4 43.4 3 45.6 0.577 44.4 46.8 4 50.5 0.354 49.8 51.3 5 50.8 0.405 50.0 51.7 6 52.4 0.404 51.5 53.2 7 54.2 0.359 53.5 55.0 8 54.8 0.328 54.1 55.4 9 56.0 0.368 55.2 56.7 10 58.2 0.377 57.4 59.0 11 55.6 0.728 54.1 57.2 12 52.0 0.604 50.7 53.2 13 46.9 0.765 45.3 48.5 14 45.9 0.615 44.6 47.2 15 48.8 0.374 48.1 49.6 16 51.3 0.333 50.6 52.0 17 55.7 0.409 54.8 56.6 18 59.3 0.326 58.6 60.0 19 57.7 0.414 56.9 58.6 20 60.2 0.478 59.2 61.2 21 64.0 0.446 63.0 64.9 22 71.6 0.689 70.1 73.0 Investment.pred Investment.se.fit Investment.lwr Investment.upr 1 NA NA NA NA 2 1.120 0.865 -0.706 2.946 3 1.643 0.594 0.390 2.895 4 4.340 0.545 3.190 5.490 5 4.594 0.443 3.660 5.527 6 4.841 0.411 3.973 5.709 7 4.393 0.399 3.550 5.235 8 3.231 0.348 2.497 3.965 9 2.887 0.542 1.744 4.030 10 3.304 0.593 2.054 4.555 11 1.953 0.855 0.148 3.757 12 -2.593 0.679 -4.026 -1.160 13 -5.305 0.876 -7.152 -3.457 14 -6.406 0.916 -8.338 -4.473 15 -2.849 0.435 -3.765 -1.932 16 -1.442 0.376 -2.236 -0.649 17 0.351 0.510 -0.724 1.426 18 2.192 0.299 1.560 2.823 19 1.391 0.464 0.411 2.371 20 1.015 0.576 -0.201 2.230 21 3.404 0.471 2.410 4.398 22 4.537 0.675 3.114 5.961 PrivateWages.pred PrivateWages.se.fit PrivateWages.lwr PrivateWages.upr 1 NA NA NA NA 2 26.8 0.318 26.1 27.5 3 29.0 0.330 28.3 29.7 4 32.9 0.346 32.2 33.6 5 34.0 0.242 33.5 34.5 6 35.9 0.248 35.3 36.4 7 37.9 0.244 37.4 38.4 8 38.6 0.246 38.1 39.1 9 38.9 0.235 38.4 39.4 10 40.1 0.224 39.6 40.6 11 38.1 0.350 37.3 38.8 12 33.9 0.382 33.1 34.7 13 28.9 0.454 27.9 29.9 14 28.1 0.342 27.3 28.8 15 30.3 0.335 29.6 31.0 16 33.2 0.280 32.6 33.8 17 37.6 0.291 37.0 38.3 18 40.0 0.215 39.6 40.5 19 38.7 0.356 37.9 39.4 20 42.0 0.304 41.3 42.6 21 46.1 0.306 45.4 46.7 22 52.7 0.489 51.7 53.7 > model.frame consump corpProf corpProfLag wages invest capitalLag privWage gnp gnpLag 1 39.8 12.7 NA 31.0 2.7 180 28.8 44.9 NA 2 41.9 12.4 12.7 28.2 -0.2 183 25.5 45.6 44.9 3 45.0 16.9 12.4 32.2 1.9 183 29.3 50.1 45.6 4 49.2 18.4 16.9 37.0 5.2 184 34.1 57.2 50.1 5 50.6 19.4 18.4 37.0 3.0 190 33.9 57.1 57.2 6 52.6 20.1 19.4 38.6 5.1 193 35.4 61.0 57.1 7 55.1 19.6 20.1 40.7 5.6 198 37.4 64.0 61.0 8 56.2 19.8 19.6 41.5 4.2 203 37.9 64.4 64.0 9 57.3 21.1 19.8 42.9 3.0 208 39.2 64.5 64.4 10 57.8 21.7 21.1 45.3 5.1 211 41.3 67.0 64.5 11 55.0 15.6 21.7 42.1 1.0 216 37.9 61.2 67.0 12 50.9 11.4 15.6 39.3 -3.4 217 34.5 53.4 61.2 13 45.6 7.0 11.4 34.3 -6.2 213 29.0 44.3 53.4 14 46.5 11.2 7.0 34.1 -5.1 207 28.5 45.1 44.3 15 48.7 12.3 11.2 36.6 -3.0 202 30.6 49.7 45.1 16 51.3 14.0 12.3 39.3 -1.3 199 33.2 54.4 49.7 17 57.7 17.6 14.0 44.2 2.1 198 36.8 62.7 54.4 18 58.7 17.3 17.6 47.7 2.0 200 41.0 65.0 62.7 19 57.5 15.3 17.3 45.9 -1.9 202 38.2 60.9 65.0 20 61.6 19.0 15.3 49.4 1.3 200 41.6 69.5 60.9 21 65.0 21.1 19.0 53.0 3.3 201 45.0 75.7 69.5 22 69.7 23.5 21.1 61.8 4.9 204 53.3 88.4 75.7 trend 1 -11 2 -10 3 -9 4 -8 5 -7 6 -6 7 -5 8 -4 9 -3 10 -2 11 -1 12 0 13 1 14 2 15 3 16 4 17 5 18 6 19 7 20 8 21 9 22 10 > model.matrix [1] TRUE > nobs [1] 63 > linearHypothesis Linear hypothesis test (Theil's F test) Hypothesis: Consumption_corpProf + Investment_capitalLag = 0 Model 1: restricted model Model 2: kleinModel Res.Df Df F Pr(>F) 1 52 2 51 1 1.08 0.3 Linear hypothesis test (F statistic of a Wald test) Hypothesis: Consumption_corpProf + Investment_capitalLag = 0 Model 1: restricted model Model 2: kleinModel Res.Df Df F Pr(>F) 1 52 2 51 1 1.29 0.26 Linear hypothesis test (Chi^2 statistic of a Wald test) Hypothesis: Consumption_corpProf + Investment_capitalLag = 0 Model 1: restricted model Model 2: kleinModel Res.Df Df Chisq Pr(>Chisq) 1 52 2 51 1 1.29 0.26 Linear hypothesis test (Theil's F test) Hypothesis: Consumption_corpProf + Investment_capitalLag = 0 Consumption_corpProfLag - PrivateWages_trend = 0 Model 1: restricted model Model 2: kleinModel Res.Df Df F Pr(>F) 1 53 2 51 2 0.54 0.58 Linear hypothesis test (F statistic of a Wald test) Hypothesis: Consumption_corpProf + Investment_capitalLag = 0 Consumption_corpProfLag - PrivateWages_trend = 0 Model 1: restricted model Model 2: kleinModel Res.Df Df F Pr(>F) 1 53 2 51 2 0.65 0.53 Linear hypothesis test (Chi^2 statistic of a Wald test) Hypothesis: Consumption_corpProf + Investment_capitalLag = 0 Consumption_corpProfLag - PrivateWages_trend = 0 Model 1: restricted model Model 2: kleinModel Res.Df Df Chisq Pr(>Chisq) 1 53 2 51 2 1.3 0.52 > logLik 'log Lik.' -76.3 (df=13) 'log Lik.' -85.5 (df=13) > > # SUR > summary systemfit results method: SUR N DF SSR detRCov OLS-R2 McElroy-R2 system 63 51 46.5 0.158 0.977 0.993 N DF SSR MSE RMSE R2 Adj R2 Consumption 21 17 18.1 1.065 1.032 0.981 0.977 Investment 21 17 17.6 1.036 1.018 0.930 0.918 PrivateWages 21 17 10.8 0.633 0.796 0.986 0.984 The covariance matrix of the residuals used for estimation Consumption Investment PrivateWages Consumption 0.8514 0.0495 -0.381 Investment 0.0495 0.8249 0.121 PrivateWages -0.3808 0.1212 0.476 The covariance matrix of the residuals Consumption Investment PrivateWages Consumption 0.8618 0.0766 -0.437 Investment 0.0766 0.8384 0.203 PrivateWages -0.4368 0.2027 0.513 The correlations of the residuals Consumption Investment PrivateWages Consumption 1.0000 0.0901 -0.657 Investment 0.0901 1.0000 0.309 PrivateWages -0.6572 0.3092 1.000 SUR estimates for 'Consumption' (equation 1) Model Formula: consump ~ corpProf + corpProfLag + wages Estimate Std. Error t value Pr(>|t|) (Intercept) 15.9805 1.1687 13.67 1.3e-10 *** corpProf 0.2302 0.0767 3.00 0.008 ** corpProfLag 0.0673 0.0769 0.87 0.394 wages 0.7962 0.0353 22.58 4.1e-14 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.032 on 17 degrees of freedom Number of observations: 21 Degrees of Freedom: 17 SSR: 18.098 MSE: 1.065 Root MSE: 1.032 Multiple R-Squared: 0.981 Adjusted R-Squared: 0.977 SUR estimates for 'Investment' (equation 2) Model Formula: invest ~ corpProf + corpProfLag + capitalLag Estimate Std. Error t value Pr(>|t|) (Intercept) 12.9293 4.8014 2.69 0.01540 * corpProf 0.4429 0.0861 5.15 8.1e-05 *** corpProfLag 0.3655 0.0894 4.09 0.00077 *** capitalLag -0.1253 0.0235 -5.34 5.4e-05 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.018 on 17 degrees of freedom Number of observations: 21 Degrees of Freedom: 17 SSR: 17.606 MSE: 1.036 Root MSE: 1.018 Multiple R-Squared: 0.93 Adjusted R-Squared: 0.918 SUR estimates for 'PrivateWages' (equation 3) Model Formula: privWage ~ gnp + gnpLag + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 1.6347 1.1173 1.46 0.16 gnp 0.4098 0.0273 15.04 3.0e-11 *** gnpLag 0.1744 0.0312 5.59 3.2e-05 *** trend 0.1558 0.0276 5.65 2.9e-05 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 0.796 on 17 degrees of freedom Number of observations: 21 Degrees of Freedom: 17 SSR: 10.763 MSE: 0.633 Root MSE: 0.796 Multiple R-Squared: 0.986 Adjusted R-Squared: 0.984 > residuals Consumption Investment PrivateWages 1 NA NA NA 2 -0.24064 -0.3522 -1.0960 3 -1.34080 -0.1605 0.5818 4 -1.61038 1.0687 1.5313 5 -0.54147 -1.4707 -0.0220 6 -0.04372 0.3299 -0.2587 7 0.85234 1.4346 -0.3243 8 1.30302 0.8306 -0.6674 9 0.97574 -0.4918 0.3660 10 -0.66060 1.2434 1.2682 11 0.45069 0.2647 -0.3467 12 -0.04295 0.0795 0.3057 13 -0.06686 0.3369 -0.2602 14 0.32177 0.4080 0.3434 15 -0.00441 -0.1533 0.2628 16 -0.01931 0.0158 -0.0216 17 1.53656 1.0372 -0.7988 18 -0.42317 0.0176 0.8550 19 0.29041 -2.6364 -0.8217 20 0.88685 -0.5822 -0.3869 21 0.68839 -0.7015 -1.1838 22 -2.31147 -0.5183 0.6742 > fitted Consumption Investment PrivateWages 1 NA NA NA 2 42.1 0.152 26.6 3 46.3 2.060 28.7 4 50.8 4.131 32.6 5 51.1 4.471 33.9 6 52.6 4.770 35.7 7 54.2 4.165 37.7 8 54.9 3.369 38.6 9 56.3 3.492 38.8 10 58.5 3.857 40.0 11 54.5 0.735 38.2 12 50.9 -3.479 34.2 13 45.7 -6.537 29.3 14 46.2 -5.508 28.2 15 48.7 -2.847 30.3 16 51.3 -1.316 33.2 17 56.2 1.063 37.6 18 59.1 1.982 40.1 19 57.2 0.736 39.0 20 60.7 1.882 42.0 21 64.3 4.002 46.2 22 72.0 5.418 52.6 > predict Consumption.pred Consumption.se.fit Consumption.lwr Consumption.upr 1 NA NA NA NA 2 42.1 0.415 41.3 43.0 3 46.3 0.449 45.4 47.2 4 50.8 0.300 50.2 51.4 5 51.1 0.348 50.4 51.8 6 52.6 0.350 51.9 53.3 7 54.2 0.317 53.6 54.9 8 54.9 0.289 54.3 55.5 9 56.3 0.309 55.7 56.9 10 58.5 0.328 57.8 59.1 11 54.5 0.516 53.5 55.6 12 50.9 0.414 50.1 51.8 13 45.7 0.544 44.6 46.8 14 46.2 0.527 45.1 47.2 15 48.7 0.332 48.0 49.4 16 51.3 0.295 50.7 51.9 17 56.2 0.319 55.5 56.8 18 59.1 0.286 58.5 59.7 19 57.2 0.323 56.6 57.9 20 60.7 0.381 59.9 61.5 21 64.3 0.381 63.5 65.1 22 72.0 0.597 70.8 73.2 Investment.pred Investment.se.fit Investment.lwr Investment.upr 1 NA NA NA NA 2 0.152 0.536 -0.924 1.229 3 2.060 0.446 1.166 2.955 4 4.131 0.397 3.334 4.929 5 4.471 0.329 3.809 5.132 6 4.770 0.311 4.145 5.395 7 4.165 0.294 3.575 4.756 8 3.369 0.263 2.842 3.897 9 3.492 0.347 2.796 4.188 10 3.857 0.398 3.058 4.656 11 0.735 0.539 -0.346 1.816 12 -3.479 0.454 -4.390 -2.569 13 -6.537 0.552 -7.646 -5.428 14 -5.508 0.617 -6.747 -4.269 15 -2.847 0.335 -3.519 -2.175 16 -1.316 0.287 -1.892 -0.739 17 1.063 0.311 0.439 1.686 18 1.982 0.218 1.545 2.420 19 0.736 0.279 0.176 1.296 20 1.882 0.327 1.227 2.538 21 4.002 0.297 3.405 4.598 22 5.418 0.412 4.591 6.245 PrivateWages.pred PrivateWages.se.fit PrivateWages.lwr PrivateWages.upr 1 NA NA NA NA 2 26.6 0.313 26.0 27.2 3 28.7 0.310 28.1 29.3 4 32.6 0.305 32.0 33.2 5 33.9 0.236 33.4 34.4 6 35.7 0.233 35.2 36.1 7 37.7 0.234 37.3 38.2 8 38.6 0.239 38.1 39.0 9 38.8 0.229 38.4 39.3 10 40.0 0.219 39.6 40.5 11 38.2 0.301 37.6 38.9 12 34.2 0.308 33.6 34.8 13 29.3 0.370 28.5 30.0 14 28.2 0.332 27.5 28.8 15 30.3 0.324 29.7 31.0 16 33.2 0.271 32.7 33.8 17 37.6 0.263 37.1 38.1 18 40.1 0.211 39.7 40.6 19 39.0 0.306 38.4 39.6 20 42.0 0.280 41.4 42.5 21 46.2 0.298 45.6 46.8 22 52.6 0.445 51.7 53.5 > model.frame [1] TRUE > model.matrix [1] TRUE > nobs [1] 63 > linearHypothesis Linear hypothesis test (Theil's F test) Hypothesis: Consumption_corpProf + Investment_capitalLag = 0 Model 1: restricted model Model 2: kleinModel Res.Df Df F Pr(>F) 1 52 2 51 1 1.44 0.24 Linear hypothesis test (F statistic of a Wald test) Hypothesis: Consumption_corpProf + Investment_capitalLag = 0 Model 1: restricted model Model 2: kleinModel Res.Df Df F Pr(>F) 1 52 2 51 1 1.69 0.2 Linear hypothesis test (Chi^2 statistic of a Wald test) Hypothesis: Consumption_corpProf + Investment_capitalLag = 0 Model 1: restricted model Model 2: kleinModel Res.Df Df Chisq Pr(>Chisq) 1 52 2 51 1 1.69 0.19 Linear hypothesis test (Theil's F test) Hypothesis: Consumption_corpProf + Investment_capitalLag = 0 Consumption_corpProfLag - PrivateWages_trend = 0 Model 1: restricted model Model 2: kleinModel Res.Df Df F Pr(>F) 1 53 2 51 2 0.77 0.47 Linear hypothesis test (F statistic of a Wald test) Hypothesis: Consumption_corpProf + Investment_capitalLag = 0 Consumption_corpProfLag - PrivateWages_trend = 0 Model 1: restricted model Model 2: kleinModel Res.Df Df F Pr(>F) 1 53 2 51 2 0.91 0.41 Linear hypothesis test (Chi^2 statistic of a Wald test) Hypothesis: Consumption_corpProf + Investment_capitalLag = 0 Consumption_corpProfLag - PrivateWages_trend = 0 Model 1: restricted model Model 2: kleinModel Res.Df Df Chisq Pr(>Chisq) 1 53 2 51 2 1.83 0.4 > logLik 'log Lik.' -70 (df=18) 'log Lik.' -79 (df=18) > > # 3SLS > summary systemfit results method: 3SLS N DF SSR detRCov OLS-R2 McElroy-R2 system 63 51 73.6 0.283 0.963 0.995 N DF SSR MSE RMSE R2 Adj R2 Consumption 21 17 18.7 1.102 1.050 0.980 0.977 Investment 21 17 44.0 2.586 1.608 0.826 0.795 PrivateWages 21 17 10.9 0.642 0.801 0.986 0.984 The covariance matrix of the residuals used for estimation Consumption Investment PrivateWages Consumption 1.044 0.438 -0.385 Investment 0.438 1.383 0.193 PrivateWages -0.385 0.193 0.476 The covariance matrix of the residuals Consumption Investment PrivateWages Consumption 0.892 0.411 -0.394 Investment 0.411 2.093 0.403 PrivateWages -0.394 0.403 0.520 The correlations of the residuals Consumption Investment PrivateWages Consumption 1.000 0.301 -0.578 Investment 0.301 1.000 0.386 PrivateWages -0.578 0.386 1.000 3SLS estimates for 'Consumption' (equation 1) Model Formula: consump ~ corpProf + corpProfLag + wages Instruments: ~govExp + taxes + govWage + trend + capitalLag + corpProfLag + gnpLag Estimate Std. Error t value Pr(>|t|) (Intercept) 16.4408 1.3045 12.60 4.7e-10 *** corpProf 0.1249 0.1081 1.16 0.26 corpProfLag 0.1631 0.1004 1.62 0.12 wages 0.7901 0.0379 20.83 1.5e-13 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.05 on 17 degrees of freedom Number of observations: 21 Degrees of Freedom: 17 SSR: 18.727 MSE: 1.102 Root MSE: 1.05 Multiple R-Squared: 0.98 Adjusted R-Squared: 0.977 3SLS estimates for 'Investment' (equation 2) Model Formula: invest ~ corpProf + corpProfLag + capitalLag Instruments: ~govExp + taxes + govWage + trend + capitalLag + corpProfLag + gnpLag Estimate Std. Error t value Pr(>|t|) (Intercept) 28.1778 6.7938 4.15 0.00067 *** corpProf -0.0131 0.1619 -0.08 0.93655 corpProfLag 0.7557 0.1529 4.94 0.00012 *** capitalLag -0.1948 0.0325 -5.99 1.5e-05 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.608 on 17 degrees of freedom Number of observations: 21 Degrees of Freedom: 17 SSR: 43.954 MSE: 2.586 Root MSE: 1.608 Multiple R-Squared: 0.826 Adjusted R-Squared: 0.795 3SLS estimates for 'PrivateWages' (equation 3) Model Formula: privWage ~ gnp + gnpLag + trend Instruments: ~govExp + taxes + govWage + trend + capitalLag + corpProfLag + gnpLag Estimate Std. Error t value Pr(>|t|) (Intercept) 1.7972 1.1159 1.61 0.13 gnp 0.4005 0.0318 12.59 4.8e-10 *** gnpLag 0.1813 0.0342 5.31 5.8e-05 *** trend 0.1497 0.0279 5.36 5.2e-05 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 0.801 on 17 degrees of freedom Number of observations: 21 Degrees of Freedom: 17 SSR: 10.921 MSE: 0.642 Root MSE: 0.801 Multiple R-Squared: 0.986 Adjusted R-Squared: 0.984 > residuals Consumption Investment PrivateWages 1 NA NA NA 2 -0.4416 -2.1951 -1.20287 3 -1.0150 0.1515 0.51834 4 -1.5289 0.4406 1.50936 5 -0.4985 -1.8667 -0.08743 6 -0.0132 0.0713 -0.28089 7 0.7759 1.0294 -0.33908 8 1.3004 1.1011 -0.69282 9 1.0993 0.5853 0.34494 10 -0.5839 2.2952 1.27590 11 -0.1917 -1.3443 -0.40414 12 -0.5598 -0.9944 0.22151 13 -0.6746 -1.3404 -0.36962 14 0.5767 1.9316 0.31006 15 -0.0211 -0.1217 0.27309 16 0.0539 0.1847 0.00716 17 1.8555 2.0937 -0.71866 18 -0.4596 -0.3216 0.90582 19 0.0613 -3.6314 -0.81881 20 1.2602 0.7582 -0.26942 21 0.9500 0.2428 -1.06125 22 -1.9451 0.9302 0.87883 > fitted Consumption Investment PrivateWages 1 NA NA NA 2 42.3 1.99510 26.7 3 46.0 1.74850 28.8 4 50.7 4.75942 32.6 5 51.1 4.86672 34.0 6 52.6 5.02874 35.7 7 54.3 4.57056 37.7 8 54.9 3.09893 38.6 9 56.2 2.41471 38.9 10 58.4 2.80476 40.0 11 55.2 2.34425 38.3 12 51.5 -2.40558 34.3 13 46.3 -4.85959 29.4 14 45.9 -7.03164 28.2 15 48.7 -2.87827 30.3 16 51.2 -1.48466 33.2 17 55.8 0.00629 37.5 18 59.2 2.32164 40.1 19 57.4 1.73138 39.0 20 60.3 0.54175 41.9 21 64.1 3.05716 46.1 22 71.6 3.96979 52.4 > predict Consumption.pred Consumption.se.fit Consumption.lwr Consumption.upr 1 NA NA NA NA 2 42.3 0.464 39.9 44.8 3 46.0 0.541 43.5 48.5 4 50.7 0.337 48.4 53.1 5 51.1 0.385 48.7 53.5 6 52.6 0.386 50.3 55.0 7 54.3 0.349 52.0 56.7 8 54.9 0.320 52.6 57.2 9 56.2 0.355 53.9 58.5 10 58.4 0.370 56.0 60.7 11 55.2 0.682 52.6 57.8 12 51.5 0.563 48.9 54.0 13 46.3 0.719 43.6 49.0 14 45.9 0.597 43.4 48.5 15 48.7 0.370 46.4 51.1 16 51.2 0.327 48.9 53.6 17 55.8 0.391 53.5 58.2 18 59.2 0.316 56.8 61.5 19 57.4 0.389 55.1 59.8 20 60.3 0.459 57.9 62.8 21 64.1 0.438 61.7 66.4 22 71.6 0.674 69.0 74.3 Investment.pred Investment.se.fit Investment.lwr Investment.upr 1 NA NA NA NA 2 1.99510 0.792 -1.787 5.777 3 1.74850 0.585 -1.861 5.358 4 4.75942 0.510 1.200 8.319 5 4.86672 0.423 1.359 8.375 6 5.02874 0.400 1.533 8.525 7 4.57056 0.391 1.079 8.062 8 3.09893 0.345 -0.371 6.568 9 2.41471 0.511 -1.145 5.974 10 2.80476 0.560 -0.788 6.397 11 2.34425 0.839 -1.482 6.170 12 -2.40558 0.673 -6.083 1.272 13 -4.85959 0.862 -8.708 -1.011 14 -7.03164 0.874 -10.893 -3.171 15 -2.87827 0.433 -6.392 0.635 16 -1.48466 0.375 -4.968 1.999 17 0.00629 0.491 -3.541 3.554 18 2.32164 0.294 -1.127 5.771 19 1.73138 0.446 -1.789 5.252 20 0.54175 0.547 -3.042 4.125 21 3.05716 0.454 -0.468 6.582 22 3.96979 0.642 0.317 7.623 PrivateWages.pred PrivateWages.se.fit PrivateWages.lwr PrivateWages.upr 1 NA NA NA NA 2 26.7 0.314 24.9 28.5 3 28.8 0.318 27.0 30.6 4 32.6 0.325 30.8 34.4 5 34.0 0.235 32.2 35.7 6 35.7 0.241 33.9 37.4 7 37.7 0.238 36.0 39.5 8 38.6 0.237 36.8 40.4 9 38.9 0.227 37.1 40.6 10 40.0 0.219 38.3 41.8 11 38.3 0.317 36.5 40.1 12 34.3 0.344 32.4 36.1 13 29.4 0.419 27.5 31.3 14 28.2 0.334 26.4 30.0 15 30.3 0.320 28.5 32.1 16 33.2 0.268 31.4 35.0 17 37.5 0.269 35.7 39.3 18 40.1 0.212 38.3 41.8 19 39.0 0.331 37.2 40.8 20 41.9 0.287 40.1 43.7 21 46.1 0.301 44.3 47.9 22 52.4 0.471 50.5 54.4 > model.frame [1] TRUE > model.matrix [1] TRUE > nobs [1] 63 > linearHypothesis Linear hypothesis test (Theil's F test) Hypothesis: Consumption_corpProf + Investment_capitalLag = 0 Model 1: restricted model Model 2: kleinModel Res.Df Df F Pr(>F) 1 52 2 51 1 0.29 0.59 Linear hypothesis test (F statistic of a Wald test) Hypothesis: Consumption_corpProf + Investment_capitalLag = 0 Model 1: restricted model Model 2: kleinModel Res.Df Df F Pr(>F) 1 52 2 51 1 0.39 0.54 Linear hypothesis test (Chi^2 statistic of a Wald test) Hypothesis: Consumption_corpProf + Investment_capitalLag = 0 Model 1: restricted model Model 2: kleinModel Res.Df Df Chisq Pr(>Chisq) 1 52 2 51 1 0.39 0.53 Linear hypothesis test (Theil's F test) Hypothesis: Consumption_corpProf + Investment_capitalLag = 0 Consumption_corpProfLag - PrivateWages_trend = 0 Model 1: restricted model Model 2: kleinModel Res.Df Df F Pr(>F) 1 53 2 51 2 0.3 0.74 Linear hypothesis test (F statistic of a Wald test) Hypothesis: Consumption_corpProf + Investment_capitalLag = 0 Consumption_corpProfLag - PrivateWages_trend = 0 Model 1: restricted model Model 2: kleinModel Res.Df Df F Pr(>F) 1 53 2 51 2 0.4 0.67 Linear hypothesis test (Chi^2 statistic of a Wald test) Hypothesis: Consumption_corpProf + Investment_capitalLag = 0 Consumption_corpProfLag - PrivateWages_trend = 0 Model 1: restricted model Model 2: kleinModel Res.Df Df Chisq Pr(>Chisq) 1 53 2 51 2 0.8 0.67 > logLik 'log Lik.' -76.1 (df=18) 'log Lik.' -89.1 (df=18) > > # I3SLS > summary systemfit results method: iterated 3SLS convergence achieved after 20 iterations N DF SSR detRCov OLS-R2 McElroy-R2 system 63 51 128 0.509 0.936 0.996 N DF SSR MSE RMSE R2 Adj R2 Consumption 21 17 19.2 1.130 1.063 0.980 0.976 Investment 21 17 95.7 5.627 2.372 0.621 0.554 PrivateWages 21 17 12.7 0.748 0.865 0.984 0.981 The covariance matrix of the residuals used for estimation Consumption Investment PrivateWages Consumption 0.915 0.642 -0.435 Investment 0.642 4.555 0.734 PrivateWages -0.435 0.734 0.606 The covariance matrix of the residuals Consumption Investment PrivateWages Consumption 0.915 0.642 -0.435 Investment 0.642 4.555 0.734 PrivateWages -0.435 0.734 0.606 The correlations of the residuals Consumption Investment PrivateWages Consumption 1.000 0.314 -0.584 Investment 0.314 1.000 0.442 PrivateWages -0.584 0.442 1.000 3SLS estimates for 'Consumption' (equation 1) Model Formula: consump ~ corpProf + corpProfLag + wages Instruments: ~govExp + taxes + govWage + trend + capitalLag + corpProfLag + gnpLag Estimate Std. Error t value Pr(>|t|) (Intercept) 16.5590 1.2244 13.52 1.6e-10 *** corpProf 0.1645 0.0962 1.71 0.105 corpProfLag 0.1766 0.0901 1.96 0.067 . wages 0.7658 0.0348 22.03 6.1e-14 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.063 on 17 degrees of freedom Number of observations: 21 Degrees of Freedom: 17 SSR: 19.213 MSE: 1.13 Root MSE: 1.063 Multiple R-Squared: 0.98 Adjusted R-Squared: 0.976 3SLS estimates for 'Investment' (equation 2) Model Formula: invest ~ corpProf + corpProfLag + capitalLag Instruments: ~govExp + taxes + govWage + trend + capitalLag + corpProfLag + gnpLag Estimate Std. Error t value Pr(>|t|) (Intercept) 42.8959 10.5937 4.05 0.00083 *** corpProf -0.3565 0.2602 -1.37 0.18838 corpProfLag 1.0113 0.2488 4.07 0.00081 *** capitalLag -0.2602 0.0509 -5.12 8.6e-05 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.372 on 17 degrees of freedom Number of observations: 21 Degrees of Freedom: 17 SSR: 95.661 MSE: 5.627 Root MSE: 2.372 Multiple R-Squared: 0.621 Adjusted R-Squared: 0.554 3SLS estimates for 'PrivateWages' (equation 3) Model Formula: privWage ~ gnp + gnpLag + trend Instruments: ~govExp + taxes + govWage + trend + capitalLag + corpProfLag + gnpLag Estimate Std. Error t value Pr(>|t|) (Intercept) 2.6247 1.1956 2.20 0.042 * gnp 0.3748 0.0311 12.05 9.4e-10 *** gnpLag 0.1937 0.0324 5.98 1.5e-05 *** trend 0.1679 0.0289 5.80 2.1e-05 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 0.865 on 17 degrees of freedom Number of observations: 21 Degrees of Freedom: 17 SSR: 12.719 MSE: 0.748 Root MSE: 0.865 Multiple R-Squared: 0.984 Adjusted R-Squared: 0.981 > residuals Consumption Investment PrivateWages 1 NA NA NA 2 -0.537 -3.95419 -1.2303 3 -1.187 0.00151 0.5797 4 -1.705 -0.22015 1.6794 5 -0.734 -2.22753 -0.0260 6 -0.251 -0.10866 -0.1362 7 0.600 0.83218 -0.1837 8 1.142 1.46624 -0.5825 9 0.921 1.62030 0.4347 10 -0.745 3.40013 1.4104 11 -0.197 -2.15443 -0.4679 12 -0.385 -1.62274 0.0106 13 -0.390 -2.62869 -0.7363 14 0.749 2.80517 0.0581 15 0.112 -0.27710 0.1113 16 0.170 0.13598 -0.1089 17 1.925 2.76200 -0.6976 18 -0.341 -0.53919 0.8651 19 0.219 -4.32845 -1.0116 20 1.383 1.71889 -0.2087 21 1.028 1.06406 -0.9656 22 -1.777 2.25466 1.2061 > fitted Consumption Investment PrivateWages 1 NA NA NA 2 42.4 3.754 26.7 3 46.2 1.898 28.7 4 50.9 5.420 32.4 5 51.3 5.228 33.9 6 52.9 5.209 35.5 7 54.5 4.768 37.6 8 55.1 2.734 38.5 9 56.4 1.380 38.8 10 58.5 1.700 39.9 11 55.2 3.154 38.4 12 51.3 -1.777 34.5 13 46.0 -3.571 29.7 14 45.8 -7.905 28.4 15 48.6 -2.723 30.5 16 51.1 -1.436 33.3 17 55.8 -0.662 37.5 18 59.0 2.539 40.1 19 57.3 2.428 39.2 20 60.2 -0.419 41.8 21 64.0 2.236 46.0 22 71.5 2.645 52.1 > predict Consumption.pred Consumption.se.fit Consumption.lwr Consumption.upr 1 NA NA NA NA 2 42.4 0.434 41.6 43.3 3 46.2 0.491 45.2 47.2 4 50.9 0.309 50.3 51.5 5 51.3 0.351 50.6 52.0 6 52.9 0.352 52.1 53.6 7 54.5 0.320 53.9 55.1 8 55.1 0.293 54.5 55.6 9 56.4 0.324 55.7 57.0 10 58.5 0.340 57.9 59.2 11 55.2 0.613 54.0 56.4 12 51.3 0.506 50.3 52.3 13 46.0 0.649 44.7 47.3 14 45.8 0.546 44.7 46.8 15 48.6 0.341 47.9 49.3 16 51.1 0.301 50.5 51.7 17 55.8 0.357 55.1 56.5 18 59.0 0.293 58.5 59.6 19 57.3 0.353 56.6 58.0 20 60.2 0.421 59.4 61.1 21 64.0 0.409 63.2 64.8 22 71.5 0.630 70.2 72.7 Investment.pred Investment.se.fit Investment.lwr Investment.upr 1 NA NA NA NA 2 3.754 1.263 1.218 6.2906 3 1.898 1.022 -0.153 3.9503 4 5.420 0.853 3.709 7.1317 5 5.228 0.727 3.767 6.6877 6 5.209 0.703 3.797 6.6200 7 4.768 0.688 3.387 6.1487 8 2.734 0.615 1.499 3.9683 9 1.380 0.852 -0.330 3.0893 10 1.700 0.938 -0.184 3.5836 11 3.154 1.437 0.269 6.0398 12 -1.777 1.173 -4.133 0.5780 13 -3.571 1.494 -6.570 -0.5725 14 -7.905 1.479 -10.875 -4.9350 15 -2.723 0.778 -4.285 -1.1613 16 -1.436 0.672 -2.784 -0.0875 17 -0.662 0.832 -2.333 1.0088 18 2.539 0.522 1.491 3.5875 19 2.428 0.753 0.918 3.9392 20 -0.419 0.907 -2.240 1.4019 21 2.236 0.775 0.679 3.7928 22 2.645 1.076 0.486 4.8047 PrivateWages.pred PrivateWages.se.fit PrivateWages.lwr PrivateWages.upr 1 NA NA NA NA 2 26.7 0.340 26.0 27.4 3 28.7 0.339 28.0 29.4 4 32.4 0.340 31.7 33.1 5 33.9 0.250 33.4 34.4 6 35.5 0.258 35.0 36.1 7 37.6 0.256 37.1 38.1 8 38.5 0.252 38.0 39.0 9 38.8 0.241 38.3 39.2 10 39.9 0.239 39.4 40.4 11 38.4 0.314 37.7 39.0 12 34.5 0.342 33.8 35.2 13 29.7 0.430 28.9 30.6 14 28.4 0.361 27.7 29.2 15 30.5 0.336 29.8 31.2 16 33.3 0.281 32.7 33.9 17 37.5 0.270 37.0 38.0 18 40.1 0.231 39.7 40.6 19 39.2 0.343 38.5 39.9 20 41.8 0.294 41.2 42.4 21 46.0 0.326 45.3 46.6 22 52.1 0.501 51.1 53.1 > model.frame [1] TRUE > model.matrix [1] TRUE > nobs [1] 63 > linearHypothesis Linear hypothesis test (Theil's F test) Hypothesis: Consumption_corpProf + Investment_capitalLag = 0 Model 1: restricted model Model 2: kleinModel Res.Df Df F Pr(>F) 1 52 2 51 1 0.59 0.45 Linear hypothesis test (F statistic of a Wald test) Hypothesis: Consumption_corpProf + Investment_capitalLag = 0 Model 1: restricted model Model 2: kleinModel Res.Df Df F Pr(>F) 1 52 2 51 1 0.73 0.4 Linear hypothesis test (Chi^2 statistic of a Wald test) Hypothesis: Consumption_corpProf + Investment_capitalLag = 0 Model 1: restricted model Model 2: kleinModel Res.Df Df Chisq Pr(>Chisq) 1 52 2 51 1 0.73 0.39 Linear hypothesis test (Theil's F test) Hypothesis: Consumption_corpProf + Investment_capitalLag = 0 Consumption_corpProfLag - PrivateWages_trend = 0 Model 1: restricted model Model 2: kleinModel Res.Df Df F Pr(>F) 1 53 2 51 2 0.72 0.49 Linear hypothesis test (F statistic of a Wald test) Hypothesis: Consumption_corpProf + Investment_capitalLag = 0 Consumption_corpProfLag - PrivateWages_trend = 0 Model 1: restricted model Model 2: kleinModel Res.Df Df F Pr(>F) 1 53 2 51 2 0.88 0.42 Linear hypothesis test (Chi^2 statistic of a Wald test) Hypothesis: Consumption_corpProf + Investment_capitalLag = 0 Consumption_corpProfLag - PrivateWages_trend = 0 Model 1: restricted model Model 2: kleinModel Res.Df Df Chisq Pr(>Chisq) 1 53 2 51 2 1.77 0.41 > logLik 'log Lik.' -82.3 (df=18) 'log Lik.' -99.1 (df=18) > > # OLS Warning in systemfit(system, method = method, data = KleinI, methodResidCov = ifelse(method == : the estimation of systems of equations with unequal numbers of observations has not been thoroughly tested yet > summary systemfit results method: OLS N DF SSR detRCov OLS-R2 McElroy-R2 system 62 50 44.9 0.372 0.977 0.991 N DF SSR MSE RMSE R2 Adj R2 Consumption 21 17 17.88 1.052 1.03 0.981 0.978 Investment 21 17 17.32 1.019 1.01 0.931 0.919 PrivateWages 20 16 9.74 0.609 0.78 0.988 0.985 The covariance matrix of the residuals Consumption Investment PrivateWages Consumption 1.0703 -0.0161 -0.463 Investment -0.0161 0.9435 0.199 PrivateWages -0.4633 0.1993 0.609 The correlations of the residuals Consumption Investment PrivateWages Consumption 1.0000 -0.0201 -0.575 Investment -0.0201 1.0000 0.264 PrivateWages -0.5747 0.2639 1.000 OLS estimates for 'Consumption' (equation 1) Model Formula: consump ~ corpProf + corpProfLag + wages Estimate Std. Error t value Pr(>|t|) (Intercept) 16.2366 1.3141 12.36 6.4e-10 *** corpProf 0.1929 0.0920 2.10 0.051 . corpProfLag 0.0899 0.0914 0.98 0.339 wages 0.7962 0.0403 19.76 3.6e-13 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.026 on 17 degrees of freedom Number of observations: 21 Degrees of Freedom: 17 SSR: 17.879 MSE: 1.052 Root MSE: 1.026 Multiple R-Squared: 0.981 Adjusted R-Squared: 0.978 OLS estimates for 'Investment' (equation 2) Model Formula: invest ~ corpProf + corpProfLag + capitalLag Estimate Std. Error t value Pr(>|t|) (Intercept) 10.1258 5.2592 1.93 0.07108 . corpProf 0.4796 0.0934 5.13 8.3e-05 *** corpProfLag 0.3330 0.0971 3.43 0.00318 ** capitalLag -0.1118 0.0257 -4.35 0.00044 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.009 on 17 degrees of freedom Number of observations: 21 Degrees of Freedom: 17 SSR: 17.323 MSE: 1.019 Root MSE: 1.009 Multiple R-Squared: 0.931 Adjusted R-Squared: 0.919 OLS estimates for 'PrivateWages' (equation 3) Model Formula: privWage ~ gnp + gnpLag + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 1.3550 1.3093 1.03 0.3161 gnp 0.4417 0.0331 13.33 4.4e-10 *** gnpLag 0.1466 0.0381 3.85 0.0014 ** trend 0.1244 0.0336 3.70 0.0020 ** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 0.78 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 9.739 MSE: 0.609 Root MSE: 0.78 Multiple R-Squared: 0.988 Adjusted R-Squared: 0.985 compare coef with single-equation OLS [1] TRUE > residuals Consumption Investment PrivateWages 1 NA NA NA 2 -0.32389 -0.0668 -1.3389 3 -1.25001 -0.0476 0.2462 4 -1.56574 1.2467 1.1255 5 -0.49350 -1.3512 -0.1959 6 0.00761 0.4154 -0.5284 7 0.86910 1.4923 NA 8 1.33848 0.7889 -0.7909 9 1.05498 -0.6317 0.2819 10 -0.58856 1.0830 1.1384 11 0.28231 0.2791 -0.1904 12 -0.22965 0.0369 0.5813 13 -0.32213 0.3659 0.1206 14 0.32228 0.2237 0.4773 15 -0.05801 -0.1728 0.3035 16 -0.03466 0.0101 0.0284 17 1.61650 0.9719 -0.8517 18 -0.43597 0.0516 0.9908 19 0.21005 -2.5656 -0.4597 20 0.98920 -0.6866 -0.3819 21 0.78508 -0.7807 -1.1062 22 -2.17345 -0.6623 0.5501 > fitted Consumption Investment PrivateWages 1 NA NA NA 2 42.2 -0.133 26.8 3 46.3 1.948 29.1 4 50.8 3.953 33.0 5 51.1 4.351 34.1 6 52.6 4.685 35.9 7 54.2 4.108 NA 8 54.9 3.411 38.7 9 56.2 3.632 38.9 10 58.4 4.017 40.2 11 54.7 0.721 38.1 12 51.1 -3.437 33.9 13 45.9 -6.566 28.9 14 46.2 -5.324 28.0 15 48.8 -2.827 30.3 16 51.3 -1.310 33.2 17 56.1 1.128 37.7 18 59.1 1.948 40.0 19 57.3 0.666 38.7 20 60.6 1.987 42.0 21 64.2 4.081 46.1 22 71.9 5.562 52.7 > predict Consumption.pred Consumption.se.fit Consumption.lwr Consumption.upr 1 NA NA NA NA 2 42.2 0.466 40.0 44.5 3 46.3 0.523 43.9 48.6 4 50.8 0.344 48.6 52.9 5 51.1 0.399 48.9 53.3 6 52.6 0.401 50.4 54.8 7 54.2 0.363 52.0 56.4 8 54.9 0.330 52.7 57.0 9 56.2 0.354 54.1 58.4 10 58.4 0.373 56.2 60.6 11 54.7 0.612 52.3 57.1 12 51.1 0.489 48.8 53.4 13 45.9 0.634 43.5 48.3 14 46.2 0.608 43.8 48.6 15 48.8 0.378 46.6 51.0 16 51.3 0.336 49.2 53.5 17 56.1 0.369 53.9 58.3 18 59.1 0.324 57.0 61.3 19 57.3 0.375 55.1 59.5 20 60.6 0.437 58.4 62.9 21 64.2 0.429 62.0 66.4 22 71.9 0.672 69.4 74.3 Investment.pred Investment.se.fit Investment.lwr Investment.upr 1 NA NA NA NA 2 -0.133 0.584 -2.476 2.209 3 1.948 0.480 -0.297 4.193 4 3.953 0.432 1.748 6.159 5 4.351 0.357 2.201 6.502 6 4.685 0.336 2.548 6.821 7 4.108 0.316 1.983 6.232 8 3.411 0.281 1.306 5.516 9 3.632 0.374 1.469 5.794 10 4.017 0.430 1.813 6.221 11 0.721 0.579 -1.616 3.058 12 -3.437 0.488 -5.688 -1.185 13 -6.566 0.592 -8.917 -4.215 14 -5.324 0.667 -7.754 -2.893 15 -2.827 0.359 -4.979 -0.675 16 -1.310 0.308 -3.430 0.810 17 1.128 0.334 -1.008 3.264 18 1.948 0.234 -0.133 4.030 19 0.666 0.300 -1.450 2.781 20 1.987 0.353 -0.161 4.134 21 4.081 0.319 1.954 6.207 22 5.562 0.444 3.348 7.777 PrivateWages.pred PrivateWages.se.fit PrivateWages.lwr PrivateWages.upr 1 NA NA NA NA 2 26.8 0.366 25.1 28.6 3 29.1 0.369 27.3 30.8 4 33.0 0.372 31.2 34.7 5 34.1 0.288 32.4 35.8 6 35.9 0.287 34.3 37.6 7 NA NA NA NA 8 38.7 0.293 37.0 40.4 9 38.9 0.279 37.3 40.6 10 40.2 0.266 38.5 41.8 11 38.1 0.365 36.4 39.8 12 33.9 0.369 32.2 35.7 13 28.9 0.438 27.1 30.7 14 28.0 0.385 26.3 29.8 15 30.3 0.379 28.6 32.0 16 33.2 0.316 31.5 34.9 17 37.7 0.310 36.0 39.3 18 40.0 0.243 38.4 41.7 19 38.7 0.363 36.9 40.4 20 42.0 0.326 40.3 43.7 21 46.1 0.341 44.4 47.8 22 52.7 0.514 50.9 54.6 > model.frame consump corpProf corpProfLag wages invest capitalLag privWage gnp gnpLag 1 39.8 12.7 NA 31.0 2.7 180 28.8 44.9 NA 2 41.9 12.4 12.7 28.2 -0.2 183 25.5 45.6 44.9 3 45.0 16.9 12.4 32.2 1.9 183 29.3 50.1 45.6 4 49.2 18.4 16.9 37.0 5.2 184 34.1 57.2 50.1 5 50.6 19.4 18.4 37.0 3.0 190 33.9 57.1 57.2 6 52.6 20.1 19.4 38.6 5.1 193 35.4 61.0 57.1 7 55.1 19.6 20.1 40.7 5.6 198 37.4 64.0 NA 8 56.2 19.8 19.6 41.5 4.2 203 37.9 64.4 64.0 9 57.3 21.1 19.8 42.9 3.0 208 39.2 64.5 64.4 10 57.8 21.7 21.1 45.3 5.1 211 41.3 67.0 64.5 11 55.0 15.6 21.7 42.1 1.0 216 37.9 61.2 67.0 12 50.9 11.4 15.6 39.3 -3.4 217 34.5 53.4 61.2 13 45.6 7.0 11.4 34.3 -6.2 213 29.0 44.3 53.4 14 46.5 11.2 7.0 34.1 -5.1 207 28.5 45.1 44.3 15 48.7 12.3 11.2 36.6 -3.0 202 30.6 49.7 45.1 16 51.3 14.0 12.3 39.3 -1.3 199 33.2 54.4 49.7 17 57.7 17.6 14.0 44.2 2.1 198 36.8 62.7 54.4 18 58.7 17.3 17.6 47.7 2.0 200 41.0 65.0 62.7 19 57.5 15.3 17.3 45.9 -1.9 202 38.2 60.9 65.0 20 61.6 19.0 15.3 49.4 1.3 200 41.6 69.5 60.9 21 65.0 21.1 19.0 53.0 3.3 201 45.0 75.7 69.5 22 69.7 23.5 21.1 61.8 4.9 204 53.3 88.4 75.7 trend 1 -11 2 -10 3 -9 4 -8 5 -7 6 -6 7 -5 8 -4 9 -3 10 -2 11 -1 12 0 13 1 14 2 15 3 16 4 17 5 18 6 19 7 20 8 21 9 22 10 > model.matrix Consumption_(Intercept) Consumption_corpProf Consumption_2 1 12.4 Consumption_3 1 16.9 Consumption_4 1 18.4 Consumption_5 1 19.4 Consumption_6 1 20.1 Consumption_7 1 19.6 Consumption_8 1 19.8 Consumption_9 1 21.1 Consumption_10 1 21.7 Consumption_11 1 15.6 Consumption_12 1 11.4 Consumption_13 1 7.0 Consumption_14 1 11.2 Consumption_15 1 12.3 Consumption_16 1 14.0 Consumption_17 1 17.6 Consumption_18 1 17.3 Consumption_19 1 15.3 Consumption_20 1 19.0 Consumption_21 1 21.1 Consumption_22 1 23.5 Investment_2 0 0.0 Investment_3 0 0.0 Investment_4 0 0.0 Investment_5 0 0.0 Investment_6 0 0.0 Investment_7 0 0.0 Investment_8 0 0.0 Investment_9 0 0.0 Investment_10 0 0.0 Investment_11 0 0.0 Investment_12 0 0.0 Investment_13 0 0.0 Investment_14 0 0.0 Investment_15 0 0.0 Investment_16 0 0.0 Investment_17 0 0.0 Investment_18 0 0.0 Investment_19 0 0.0 Investment_20 0 0.0 Investment_21 0 0.0 Investment_22 0 0.0 PrivateWages_2 0 0.0 PrivateWages_3 0 0.0 PrivateWages_4 0 0.0 PrivateWages_5 0 0.0 PrivateWages_6 0 0.0 PrivateWages_8 0 0.0 PrivateWages_9 0 0.0 PrivateWages_10 0 0.0 PrivateWages_11 0 0.0 PrivateWages_12 0 0.0 PrivateWages_13 0 0.0 PrivateWages_14 0 0.0 PrivateWages_15 0 0.0 PrivateWages_16 0 0.0 PrivateWages_17 0 0.0 PrivateWages_18 0 0.0 PrivateWages_19 0 0.0 PrivateWages_20 0 0.0 PrivateWages_21 0 0.0 PrivateWages_22 0 0.0 Consumption_corpProfLag Consumption_wages Consumption_2 12.7 28.2 Consumption_3 12.4 32.2 Consumption_4 16.9 37.0 Consumption_5 18.4 37.0 Consumption_6 19.4 38.6 Consumption_7 20.1 40.7 Consumption_8 19.6 41.5 Consumption_9 19.8 42.9 Consumption_10 21.1 45.3 Consumption_11 21.7 42.1 Consumption_12 15.6 39.3 Consumption_13 11.4 34.3 Consumption_14 7.0 34.1 Consumption_15 11.2 36.6 Consumption_16 12.3 39.3 Consumption_17 14.0 44.2 Consumption_18 17.6 47.7 Consumption_19 17.3 45.9 Consumption_20 15.3 49.4 Consumption_21 19.0 53.0 Consumption_22 21.1 61.8 Investment_2 0.0 0.0 Investment_3 0.0 0.0 Investment_4 0.0 0.0 Investment_5 0.0 0.0 Investment_6 0.0 0.0 Investment_7 0.0 0.0 Investment_8 0.0 0.0 Investment_9 0.0 0.0 Investment_10 0.0 0.0 Investment_11 0.0 0.0 Investment_12 0.0 0.0 Investment_13 0.0 0.0 Investment_14 0.0 0.0 Investment_15 0.0 0.0 Investment_16 0.0 0.0 Investment_17 0.0 0.0 Investment_18 0.0 0.0 Investment_19 0.0 0.0 Investment_20 0.0 0.0 Investment_21 0.0 0.0 Investment_22 0.0 0.0 PrivateWages_2 0.0 0.0 PrivateWages_3 0.0 0.0 PrivateWages_4 0.0 0.0 PrivateWages_5 0.0 0.0 PrivateWages_6 0.0 0.0 PrivateWages_8 0.0 0.0 PrivateWages_9 0.0 0.0 PrivateWages_10 0.0 0.0 PrivateWages_11 0.0 0.0 PrivateWages_12 0.0 0.0 PrivateWages_13 0.0 0.0 PrivateWages_14 0.0 0.0 PrivateWages_15 0.0 0.0 PrivateWages_16 0.0 0.0 PrivateWages_17 0.0 0.0 PrivateWages_18 0.0 0.0 PrivateWages_19 0.0 0.0 PrivateWages_20 0.0 0.0 PrivateWages_21 0.0 0.0 PrivateWages_22 0.0 0.0 Investment_(Intercept) Investment_corpProf Consumption_2 0 0.0 Consumption_3 0 0.0 Consumption_4 0 0.0 Consumption_5 0 0.0 Consumption_6 0 0.0 Consumption_7 0 0.0 Consumption_8 0 0.0 Consumption_9 0 0.0 Consumption_10 0 0.0 Consumption_11 0 0.0 Consumption_12 0 0.0 Consumption_13 0 0.0 Consumption_14 0 0.0 Consumption_15 0 0.0 Consumption_16 0 0.0 Consumption_17 0 0.0 Consumption_18 0 0.0 Consumption_19 0 0.0 Consumption_20 0 0.0 Consumption_21 0 0.0 Consumption_22 0 0.0 Investment_2 1 12.4 Investment_3 1 16.9 Investment_4 1 18.4 Investment_5 1 19.4 Investment_6 1 20.1 Investment_7 1 19.6 Investment_8 1 19.8 Investment_9 1 21.1 Investment_10 1 21.7 Investment_11 1 15.6 Investment_12 1 11.4 Investment_13 1 7.0 Investment_14 1 11.2 Investment_15 1 12.3 Investment_16 1 14.0 Investment_17 1 17.6 Investment_18 1 17.3 Investment_19 1 15.3 Investment_20 1 19.0 Investment_21 1 21.1 Investment_22 1 23.5 PrivateWages_2 0 0.0 PrivateWages_3 0 0.0 PrivateWages_4 0 0.0 PrivateWages_5 0 0.0 PrivateWages_6 0 0.0 PrivateWages_8 0 0.0 PrivateWages_9 0 0.0 PrivateWages_10 0 0.0 PrivateWages_11 0 0.0 PrivateWages_12 0 0.0 PrivateWages_13 0 0.0 PrivateWages_14 0 0.0 PrivateWages_15 0 0.0 PrivateWages_16 0 0.0 PrivateWages_17 0 0.0 PrivateWages_18 0 0.0 PrivateWages_19 0 0.0 PrivateWages_20 0 0.0 PrivateWages_21 0 0.0 PrivateWages_22 0 0.0 Investment_corpProfLag Investment_capitalLag Consumption_2 0.0 0 Consumption_3 0.0 0 Consumption_4 0.0 0 Consumption_5 0.0 0 Consumption_6 0.0 0 Consumption_7 0.0 0 Consumption_8 0.0 0 Consumption_9 0.0 0 Consumption_10 0.0 0 Consumption_11 0.0 0 Consumption_12 0.0 0 Consumption_13 0.0 0 Consumption_14 0.0 0 Consumption_15 0.0 0 Consumption_16 0.0 0 Consumption_17 0.0 0 Consumption_18 0.0 0 Consumption_19 0.0 0 Consumption_20 0.0 0 Consumption_21 0.0 0 Consumption_22 0.0 0 Investment_2 12.7 183 Investment_3 12.4 183 Investment_4 16.9 184 Investment_5 18.4 190 Investment_6 19.4 193 Investment_7 20.1 198 Investment_8 19.6 203 Investment_9 19.8 208 Investment_10 21.1 211 Investment_11 21.7 216 Investment_12 15.6 217 Investment_13 11.4 213 Investment_14 7.0 207 Investment_15 11.2 202 Investment_16 12.3 199 Investment_17 14.0 198 Investment_18 17.6 200 Investment_19 17.3 202 Investment_20 15.3 200 Investment_21 19.0 201 Investment_22 21.1 204 PrivateWages_2 0.0 0 PrivateWages_3 0.0 0 PrivateWages_4 0.0 0 PrivateWages_5 0.0 0 PrivateWages_6 0.0 0 PrivateWages_8 0.0 0 PrivateWages_9 0.0 0 PrivateWages_10 0.0 0 PrivateWages_11 0.0 0 PrivateWages_12 0.0 0 PrivateWages_13 0.0 0 PrivateWages_14 0.0 0 PrivateWages_15 0.0 0 PrivateWages_16 0.0 0 PrivateWages_17 0.0 0 PrivateWages_18 0.0 0 PrivateWages_19 0.0 0 PrivateWages_20 0.0 0 PrivateWages_21 0.0 0 PrivateWages_22 0.0 0 PrivateWages_(Intercept) PrivateWages_gnp PrivateWages_gnpLag Consumption_2 0 0.0 0.0 Consumption_3 0 0.0 0.0 Consumption_4 0 0.0 0.0 Consumption_5 0 0.0 0.0 Consumption_6 0 0.0 0.0 Consumption_7 0 0.0 0.0 Consumption_8 0 0.0 0.0 Consumption_9 0 0.0 0.0 Consumption_10 0 0.0 0.0 Consumption_11 0 0.0 0.0 Consumption_12 0 0.0 0.0 Consumption_13 0 0.0 0.0 Consumption_14 0 0.0 0.0 Consumption_15 0 0.0 0.0 Consumption_16 0 0.0 0.0 Consumption_17 0 0.0 0.0 Consumption_18 0 0.0 0.0 Consumption_19 0 0.0 0.0 Consumption_20 0 0.0 0.0 Consumption_21 0 0.0 0.0 Consumption_22 0 0.0 0.0 Investment_2 0 0.0 0.0 Investment_3 0 0.0 0.0 Investment_4 0 0.0 0.0 Investment_5 0 0.0 0.0 Investment_6 0 0.0 0.0 Investment_7 0 0.0 0.0 Investment_8 0 0.0 0.0 Investment_9 0 0.0 0.0 Investment_10 0 0.0 0.0 Investment_11 0 0.0 0.0 Investment_12 0 0.0 0.0 Investment_13 0 0.0 0.0 Investment_14 0 0.0 0.0 Investment_15 0 0.0 0.0 Investment_16 0 0.0 0.0 Investment_17 0 0.0 0.0 Investment_18 0 0.0 0.0 Investment_19 0 0.0 0.0 Investment_20 0 0.0 0.0 Investment_21 0 0.0 0.0 Investment_22 0 0.0 0.0 PrivateWages_2 1 45.6 44.9 PrivateWages_3 1 50.1 45.6 PrivateWages_4 1 57.2 50.1 PrivateWages_5 1 57.1 57.2 PrivateWages_6 1 61.0 57.1 PrivateWages_8 1 64.4 64.0 PrivateWages_9 1 64.5 64.4 PrivateWages_10 1 67.0 64.5 PrivateWages_11 1 61.2 67.0 PrivateWages_12 1 53.4 61.2 PrivateWages_13 1 44.3 53.4 PrivateWages_14 1 45.1 44.3 PrivateWages_15 1 49.7 45.1 PrivateWages_16 1 54.4 49.7 PrivateWages_17 1 62.7 54.4 PrivateWages_18 1 65.0 62.7 PrivateWages_19 1 60.9 65.0 PrivateWages_20 1 69.5 60.9 PrivateWages_21 1 75.7 69.5 PrivateWages_22 1 88.4 75.7 PrivateWages_trend Consumption_2 0 Consumption_3 0 Consumption_4 0 Consumption_5 0 Consumption_6 0 Consumption_7 0 Consumption_8 0 Consumption_9 0 Consumption_10 0 Consumption_11 0 Consumption_12 0 Consumption_13 0 Consumption_14 0 Consumption_15 0 Consumption_16 0 Consumption_17 0 Consumption_18 0 Consumption_19 0 Consumption_20 0 Consumption_21 0 Consumption_22 0 Investment_2 0 Investment_3 0 Investment_4 0 Investment_5 0 Investment_6 0 Investment_7 0 Investment_8 0 Investment_9 0 Investment_10 0 Investment_11 0 Investment_12 0 Investment_13 0 Investment_14 0 Investment_15 0 Investment_16 0 Investment_17 0 Investment_18 0 Investment_19 0 Investment_20 0 Investment_21 0 Investment_22 0 PrivateWages_2 -10 PrivateWages_3 -9 PrivateWages_4 -8 PrivateWages_5 -7 PrivateWages_6 -6 PrivateWages_8 -4 PrivateWages_9 -3 PrivateWages_10 -2 PrivateWages_11 -1 PrivateWages_12 0 PrivateWages_13 1 PrivateWages_14 2 PrivateWages_15 3 PrivateWages_16 4 PrivateWages_17 5 PrivateWages_18 6 PrivateWages_19 7 PrivateWages_20 8 PrivateWages_21 9 PrivateWages_22 10 > nobs [1] 62 > linearHypothesis Linear hypothesis test (Theil's F test) Hypothesis: Consumption_corpProf + Investment_capitalLag = 0 Model 1: restricted model Model 2: kleinModel Res.Df Df F Pr(>F) 1 51 2 50 1 0.8 0.37 Linear hypothesis test (F statistic of a Wald test) Hypothesis: Consumption_corpProf + Investment_capitalLag = 0 Model 1: restricted model Model 2: kleinModel Res.Df Df F Pr(>F) 1 51 2 50 1 0.72 0.4 Linear hypothesis test (Chi^2 statistic of a Wald test) Hypothesis: Consumption_corpProf + Investment_capitalLag = 0 Model 1: restricted model Model 2: kleinModel Res.Df Df Chisq Pr(>Chisq) 1 51 2 50 1 0.72 0.4 Linear hypothesis test (Theil's F test) Hypothesis: Consumption_corpProf + Investment_capitalLag = 0 Consumption_corpProfLag - PrivateWages_trend = 0 Model 1: restricted model Model 2: kleinModel Res.Df Df F Pr(>F) 1 52 2 50 2 0.42 0.66 Linear hypothesis test (F statistic of a Wald test) Hypothesis: Consumption_corpProf + Investment_capitalLag = 0 Consumption_corpProfLag - PrivateWages_trend = 0 Model 1: restricted model Model 2: kleinModel Res.Df Df F Pr(>F) 1 52 2 50 2 0.37 0.69 Linear hypothesis test (Chi^2 statistic of a Wald test) Hypothesis: Consumption_corpProf + Investment_capitalLag = 0 Consumption_corpProfLag - PrivateWages_trend = 0 Model 1: restricted model Model 2: kleinModel Res.Df Df Chisq Pr(>Chisq) 1 52 2 50 2 0.75 0.69 > logLik 'log Lik.' -71.9 (df=13) 'log Lik.' -77.1 (df=13) compare log likelihood value with single-equation OLS [1] "Mean relative difference: 0.000555" > > # 2SLS > summary systemfit results method: 2SLS N DF SSR detRCov OLS-R2 McElroy-R2 system 60 48 53.4 0.274 0.973 0.992 N DF SSR MSE RMSE R2 Adj R2 Consumption 20 16 20.67 1.292 1.14 0.978 0.974 Investment 20 16 23.02 1.438 1.20 0.901 0.883 PrivateWages 20 16 9.74 0.609 0.78 0.988 0.985 The covariance matrix of the residuals Consumption Investment PrivateWages Consumption 1.034 0.309 -0.383 Investment 0.309 1.151 0.202 PrivateWages -0.383 0.202 0.487 The correlations of the residuals Consumption Investment PrivateWages Consumption 1.000 0.284 -0.540 Investment 0.284 1.000 0.269 PrivateWages -0.540 0.269 1.000 2SLS estimates for 'Consumption' (equation 1) Model Formula: consump ~ corpProf + corpProfLag + wages Instruments: ~govExp + taxes + govWage + trend + capitalLag + corpProfLag + gnpLag Estimate Std. Error t value Pr(>|t|) (Intercept) 16.5093 1.3121 12.58 1.0e-09 *** corpProf 0.0219 0.1159 0.19 0.85 corpProfLag 0.1931 0.1071 1.80 0.09 . wages 0.8174 0.0408 20.05 9.2e-13 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.137 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 20.671 MSE: 1.292 Root MSE: 1.137 Multiple R-Squared: 0.978 Adjusted R-Squared: 0.974 2SLS estimates for 'Investment' (equation 2) Model Formula: invest ~ corpProf + corpProfLag + capitalLag Instruments: ~govExp + taxes + govWage + trend + capitalLag + corpProfLag + gnpLag Estimate Std. Error t value Pr(>|t|) (Intercept) 17.843 6.850 2.60 0.01915 * corpProf 0.217 0.155 1.40 0.18106 corpProfLag 0.542 0.148 3.65 0.00216 ** capitalLag -0.145 0.033 -4.41 0.00044 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.199 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 23.016 MSE: 1.438 Root MSE: 1.199 Multiple R-Squared: 0.901 Adjusted R-Squared: 0.883 2SLS estimates for 'PrivateWages' (equation 3) Model Formula: privWage ~ gnp + gnpLag + trend Instruments: ~govExp + taxes + govWage + trend + capitalLag + corpProfLag + gnpLag Estimate Std. Error t value Pr(>|t|) (Intercept) 1.3431 1.1772 1.14 0.27070 gnp 0.4438 0.0358 12.39 1.3e-09 *** gnpLag 0.1447 0.0389 3.72 0.00185 ** trend 0.1238 0.0306 4.05 0.00093 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 0.78 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 9.741 MSE: 0.609 Root MSE: 0.78 Multiple R-Squared: 0.988 Adjusted R-Squared: 0.985 > residuals Consumption Investment PrivateWages 1 NA NA NA 2 -0.383 -1.0104 -1.3401 3 -0.593 0.2478 0.2378 4 -1.219 1.0621 1.1117 5 -0.130 -1.4104 -0.1954 6 0.354 0.4328 -0.5355 7 NA NA NA 8 1.551 1.0463 -0.7908 9 1.440 0.0674 0.2831 10 -0.286 1.7698 1.1353 11 -0.453 -0.5912 -0.1765 12 -0.994 -0.6318 0.6007 13 -1.300 -0.6983 0.1443 14 0.521 0.9724 0.4826 15 -0.157 -0.1827 0.3016 16 -0.014 0.1167 0.0261 17 1.974 1.6266 -0.8614 18 -0.576 -0.0525 0.9927 19 -0.203 -3.0656 -0.4446 20 1.342 0.1393 -0.3914 21 1.039 -0.1305 -1.1115 22 -1.912 0.2922 0.5312 > fitted Consumption Investment PrivateWages 1 NA NA NA 2 42.3 0.810 26.8 3 45.6 1.652 29.1 4 50.4 4.138 33.0 5 50.7 4.410 34.1 6 52.2 4.667 35.9 7 NA NA NA 8 54.6 3.154 38.7 9 55.9 2.933 38.9 10 58.1 3.330 40.2 11 55.5 1.591 38.1 12 51.9 -2.768 33.9 13 46.9 -5.502 28.9 14 46.0 -6.072 28.0 15 48.9 -2.817 30.3 16 51.3 -1.417 33.2 17 55.7 0.473 37.7 18 59.3 2.053 40.0 19 57.7 1.166 38.6 20 60.3 1.161 42.0 21 64.0 3.431 46.1 22 71.6 4.608 52.8 > predict Consumption.pred Consumption.se.fit Consumption.lwr Consumption.upr 1 NA NA NA NA 2 42.3 0.473 41.3 43.3 3 45.6 0.573 44.4 46.8 4 50.4 0.366 49.6 51.2 5 50.7 0.423 49.8 51.6 6 52.2 0.426 51.3 53.1 7 NA NA NA NA 8 54.6 0.347 53.9 55.4 9 55.9 0.384 55.0 56.7 10 58.1 0.395 57.2 58.9 11 55.5 0.729 53.9 57.0 12 51.9 0.594 50.6 53.2 13 46.9 0.752 45.3 48.5 14 46.0 0.616 44.7 47.3 15 48.9 0.373 48.1 49.6 16 51.3 0.331 50.6 52.0 17 55.7 0.403 54.9 56.6 18 59.3 0.326 58.6 60.0 19 57.7 0.411 56.8 58.6 20 60.3 0.472 59.3 61.3 21 64.0 0.443 63.0 64.9 22 71.6 0.683 70.2 73.1 Investment.pred Investment.se.fit Investment.lwr Investment.upr 1 NA NA NA NA 2 0.810 0.786 -0.8569 2.48 3 1.652 0.541 0.5056 2.80 4 4.138 0.511 3.0552 5.22 5 4.410 0.421 3.5172 5.30 6 4.667 0.395 3.8294 5.51 7 NA NA NA NA 8 3.154 0.327 2.4602 3.85 9 2.933 0.489 1.8967 3.97 10 3.330 0.537 2.1915 4.47 11 1.591 0.786 -0.0748 3.26 12 -2.768 0.615 -4.0716 -1.46 13 -5.502 0.787 -7.1696 -3.83 14 -6.072 0.842 -7.8568 -4.29 15 -2.817 0.397 -3.6591 -1.98 16 -1.417 0.343 -2.1436 -0.69 17 0.473 0.457 -0.4954 1.44 18 2.053 0.286 1.4471 2.66 19 1.166 0.430 0.2549 2.08 20 1.161 0.515 0.0698 2.25 21 3.431 0.426 2.5282 4.33 22 4.608 0.606 3.3223 5.89 PrivateWages.pred PrivateWages.se.fit PrivateWages.lwr PrivateWages.upr 1 NA NA NA NA 2 26.8 0.328 26.1 27.5 3 29.1 0.340 28.3 29.8 4 33.0 0.360 32.2 33.8 5 34.1 0.258 33.5 34.6 6 35.9 0.266 35.4 36.5 7 NA NA NA NA 8 38.7 0.262 38.1 39.2 9 38.9 0.250 38.4 39.4 10 40.2 0.240 39.7 40.7 11 38.1 0.355 37.3 38.8 12 33.9 0.382 33.1 34.7 13 28.9 0.456 27.9 29.8 14 28.0 0.348 27.3 28.8 15 30.3 0.339 29.6 31.0 16 33.2 0.284 32.6 33.8 17 37.7 0.293 37.0 38.3 18 40.0 0.218 39.5 40.5 19 38.6 0.358 37.9 39.4 20 42.0 0.307 41.3 42.6 21 46.1 0.310 45.5 46.8 22 52.8 0.496 51.7 53.8 > model.frame consump corpProf corpProfLag wages invest capitalLag privWage gnp gnpLag 1 39.8 12.7 NA 31.0 2.7 180 28.8 44.9 NA 2 41.9 12.4 12.7 28.2 -0.2 183 25.5 45.6 44.9 3 45.0 16.9 12.4 32.2 1.9 183 29.3 50.1 45.6 4 49.2 18.4 16.9 37.0 5.2 184 34.1 57.2 50.1 5 50.6 19.4 18.4 37.0 3.0 190 33.9 57.1 57.2 6 52.6 20.1 19.4 38.6 5.1 193 35.4 61.0 57.1 7 55.1 19.6 20.1 40.7 5.6 198 37.4 64.0 NA 8 56.2 19.8 19.6 41.5 4.2 203 37.9 64.4 64.0 9 57.3 21.1 19.8 42.9 3.0 208 39.2 64.5 64.4 10 57.8 21.7 21.1 45.3 5.1 211 41.3 67.0 64.5 11 55.0 15.6 21.7 42.1 1.0 216 37.9 61.2 67.0 12 50.9 11.4 15.6 39.3 -3.4 217 34.5 53.4 61.2 13 45.6 7.0 11.4 34.3 -6.2 213 29.0 44.3 53.4 14 46.5 11.2 7.0 34.1 -5.1 207 28.5 45.1 44.3 15 48.7 12.3 11.2 36.6 -3.0 202 30.6 49.7 45.1 16 51.3 14.0 12.3 39.3 -1.3 199 33.2 54.4 49.7 17 57.7 17.6 14.0 44.2 2.1 198 36.8 62.7 54.4 18 58.7 17.3 17.6 47.7 2.0 200 41.0 65.0 62.7 19 57.5 15.3 17.3 45.9 -1.9 202 38.2 60.9 65.0 20 61.6 19.0 15.3 49.4 1.3 200 41.6 69.5 60.9 21 65.0 21.1 19.0 53.0 3.3 201 45.0 75.7 69.5 22 69.7 23.5 21.1 61.8 4.9 204 53.3 88.4 75.7 trend 1 -11 2 -10 3 -9 4 -8 5 -7 6 -6 7 -5 8 -4 9 -3 10 -2 11 -1 12 0 13 1 14 2 15 3 16 4 17 5 18 6 19 7 20 8 21 9 22 10 > model.matrix [1] "Attributes: < Component \"dim\": Mean relative difference: 0.0323 >" [2] "Attributes: < Component \"dimnames\": Component 1: 55 string mismatches >" [3] "Numeric: lengths (744, 720) differ" > nobs [1] 60 > linearHypothesis Linear hypothesis test (Theil's F test) Hypothesis: Consumption_corpProf + Investment_capitalLag = 0 Model 1: restricted model Model 2: kleinModel Res.Df Df F Pr(>F) 1 49 2 48 1 0.95 0.34 Linear hypothesis test (F statistic of a Wald test) Hypothesis: Consumption_corpProf + Investment_capitalLag = 0 Model 1: restricted model Model 2: kleinModel Res.Df Df F Pr(>F) 1 49 2 48 1 1.05 0.31 Linear hypothesis test (Chi^2 statistic of a Wald test) Hypothesis: Consumption_corpProf + Investment_capitalLag = 0 Model 1: restricted model Model 2: kleinModel Res.Df Df Chisq Pr(>Chisq) 1 49 2 48 1 1.05 0.3 Linear hypothesis test (Theil's F test) Hypothesis: Consumption_corpProf + Investment_capitalLag = 0 Consumption_corpProfLag - PrivateWages_trend = 0 Model 1: restricted model Model 2: kleinModel Res.Df Df F Pr(>F) 1 50 2 48 2 0.48 0.62 Linear hypothesis test (F statistic of a Wald test) Hypothesis: Consumption_corpProf + Investment_capitalLag = 0 Consumption_corpProfLag - PrivateWages_trend = 0 Model 1: restricted model Model 2: kleinModel Res.Df Df F Pr(>F) 1 50 2 48 2 0.53 0.59 Linear hypothesis test (Chi^2 statistic of a Wald test) Hypothesis: Consumption_corpProf + Investment_capitalLag = 0 Consumption_corpProfLag - PrivateWages_trend = 0 Model 1: restricted model Model 2: kleinModel Res.Df Df Chisq Pr(>Chisq) 1 50 2 48 2 1.06 0.59 > logLik 'log Lik.' -72.2 (df=13) 'log Lik.' -79.7 (df=13) > > # SUR Warning in systemfit(system, method = method, data = KleinI, methodResidCov = ifelse(method == : the estimation of systems of equations with unequal numbers of observations has not been thoroughly tested yet > summary systemfit results method: SUR N DF SSR detRCov OLS-R2 McElroy-R2 system 62 50 46.2 0.154 0.977 0.993 N DF SSR MSE RMSE R2 Adj R2 Consumption 21 17 18.1 1.062 1.031 0.981 0.977 Investment 21 17 17.5 1.030 1.015 0.931 0.918 PrivateWages 20 16 10.6 0.663 0.814 0.987 0.984 The covariance matrix of the residuals used for estimation Consumption Investment PrivateWages Consumption 0.8562 -0.0129 -0.371 Investment -0.0129 0.7548 0.159 PrivateWages -0.3706 0.1594 0.487 The covariance matrix of the residuals Consumption Investment PrivateWages Consumption 0.8684 0.0078 -0.442 Investment 0.0078 0.7702 0.237 PrivateWages -0.4416 0.2366 0.531 The correlations of the residuals Consumption Investment PrivateWages Consumption 1.00000 0.00562 -0.651 Investment 0.00562 1.00000 0.372 PrivateWages -0.65109 0.37198 1.000 SUR estimates for 'Consumption' (equation 1) Model Formula: consump ~ corpProf + corpProfLag + wages Estimate Std. Error t value Pr(>|t|) (Intercept) 16.0647 1.1729 13.70 1.3e-10 *** corpProf 0.2283 0.0775 2.94 0.0091 ** corpProfLag 0.0723 0.0771 0.94 0.3615 wages 0.7930 0.0352 22.51 4.3e-14 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.031 on 17 degrees of freedom Number of observations: 21 Degrees of Freedom: 17 SSR: 18.06 MSE: 1.062 Root MSE: 1.031 Multiple R-Squared: 0.981 Adjusted R-Squared: 0.977 SUR estimates for 'Investment' (equation 2) Model Formula: invest ~ corpProf + corpProfLag + capitalLag Estimate Std. Error t value Pr(>|t|) (Intercept) 12.3516 4.5762 2.70 0.01520 * corpProf 0.4461 0.0818 5.45 4.3e-05 *** corpProfLag 0.3609 0.0849 4.25 0.00054 *** capitalLag -0.1224 0.0223 -5.47 4.1e-05 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.015 on 17 degrees of freedom Number of observations: 21 Degrees of Freedom: 17 SSR: 17.514 MSE: 1.03 Root MSE: 1.015 Multiple R-Squared: 0.931 Adjusted R-Squared: 0.918 SUR estimates for 'PrivateWages' (equation 3) Model Formula: privWage ~ gnp + gnpLag + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 1.5433 1.1371 1.36 0.19 gnp 0.4117 0.0279 14.77 9.6e-11 *** gnpLag 0.1743 0.0317 5.50 4.8e-05 *** trend 0.1550 0.0283 5.49 5.0e-05 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 0.814 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 10.611 MSE: 0.663 Root MSE: 0.814 Multiple R-Squared: 0.987 Adjusted R-Squared: 0.984 > residuals Consumption Investment PrivateWages 1 NA NA NA 2 -0.27628 -0.3003 -1.0910 3 -1.35400 -0.1239 0.5795 4 -1.62816 1.1154 1.5172 5 -0.56494 -1.4358 -0.0341 6 -0.06584 0.3581 -0.2772 7 0.83245 1.4526 NA 8 1.28855 0.8290 -0.6896 9 0.96709 -0.5092 0.3445 10 -0.66705 1.2210 1.2429 11 0.41992 0.2497 -0.3602 12 -0.05971 0.0470 0.3068 13 -0.08649 0.3096 -0.2426 14 0.33124 0.3652 0.3591 15 -0.00604 -0.1652 0.2710 16 -0.01478 0.0124 -0.0207 17 1.55472 1.0339 -0.8117 18 -0.41250 0.0255 0.8398 19 0.29322 -2.6293 -0.8283 20 0.91756 -0.5906 -0.4091 21 0.71583 -0.7036 -1.2154 22 -2.26223 -0.5283 0.6207 > fitted Consumption Investment PrivateWages 1 NA NA NA 2 42.2 0.100 26.6 3 46.4 2.024 28.7 4 50.8 4.085 32.6 5 51.2 4.436 33.9 6 52.7 4.742 35.7 7 54.3 4.147 NA 8 54.9 3.371 38.6 9 56.3 3.509 38.9 10 58.5 3.879 40.1 11 54.6 0.750 38.3 12 51.0 -3.447 34.2 13 45.7 -6.510 29.2 14 46.2 -5.465 28.1 15 48.7 -2.835 30.3 16 51.3 -1.312 33.2 17 56.1 1.066 37.6 18 59.1 1.974 40.2 19 57.2 0.729 39.0 20 60.7 1.891 42.0 21 64.3 4.004 46.2 22 72.0 5.428 52.7 > predict Consumption.pred Consumption.se.fit Consumption.lwr Consumption.upr 1 NA NA NA NA 2 42.2 0.414 41.3 43.0 3 46.4 0.451 45.4 47.3 4 50.8 0.296 50.2 51.4 5 51.2 0.342 50.5 51.9 6 52.7 0.342 52.0 53.4 7 54.3 0.309 53.6 54.9 8 54.9 0.282 54.3 55.5 9 56.3 0.303 55.7 56.9 10 58.5 0.321 57.8 59.1 11 54.6 0.515 53.5 55.6 12 51.0 0.418 50.1 51.8 13 45.7 0.548 44.6 46.8 14 46.2 0.528 45.1 47.2 15 48.7 0.333 48.0 49.4 16 51.3 0.296 50.7 51.9 17 56.1 0.321 55.5 56.8 18 59.1 0.287 58.5 59.7 19 57.2 0.325 56.6 57.9 20 60.7 0.383 59.9 61.5 21 64.3 0.382 63.5 65.1 22 72.0 0.599 70.8 73.2 Investment.pred Investment.se.fit Investment.lwr Investment.upr 1 NA NA NA NA 2 0.100 0.511 -0.926 1.127 3 2.024 0.425 1.170 2.878 4 4.085 0.378 3.325 4.845 5 4.436 0.313 3.806 5.065 6 4.742 0.296 4.147 5.336 7 4.147 0.279 3.586 4.709 8 3.371 0.250 2.868 3.874 9 3.509 0.331 2.845 4.174 10 3.879 0.380 3.116 4.642 11 0.750 0.512 -0.279 1.779 12 -3.447 0.433 -4.316 -2.578 13 -6.510 0.527 -7.568 -5.451 14 -5.465 0.587 -6.645 -4.285 15 -2.835 0.320 -3.477 -2.193 16 -1.312 0.274 -1.863 -0.761 17 1.066 0.296 0.472 1.661 18 1.974 0.208 1.558 2.391 19 0.729 0.265 0.197 1.262 20 1.891 0.311 1.266 2.515 21 4.004 0.283 3.435 4.572 22 5.428 0.393 4.640 6.217 PrivateWages.pred PrivateWages.se.fit PrivateWages.lwr PrivateWages.upr 1 NA NA NA NA 2 26.6 0.318 26.0 27.2 3 28.7 0.317 28.1 29.4 4 32.6 0.315 32.0 33.2 5 33.9 0.243 33.4 34.4 6 35.7 0.242 35.2 36.2 7 NA NA NA NA 8 38.6 0.247 38.1 39.1 9 38.9 0.236 38.4 39.3 10 40.1 0.227 39.6 40.5 11 38.3 0.306 37.6 38.9 12 34.2 0.312 33.6 34.8 13 29.2 0.376 28.5 30.0 14 28.1 0.337 27.5 28.8 15 30.3 0.328 29.7 31.0 16 33.2 0.274 32.7 33.8 17 37.6 0.266 37.1 38.1 18 40.2 0.213 39.7 40.6 19 39.0 0.310 38.4 39.7 20 42.0 0.282 41.4 42.6 21 46.2 0.300 45.6 46.8 22 52.7 0.451 51.8 53.6 > model.frame [1] TRUE > model.matrix [1] TRUE > nobs [1] 62 > linearHypothesis Linear hypothesis test (Theil's F test) Hypothesis: Consumption_corpProf + Investment_capitalLag = 0 Model 1: restricted model Model 2: kleinModel Res.Df Df F Pr(>F) 1 51 2 50 1 1.39 0.24 Linear hypothesis test (F statistic of a Wald test) Hypothesis: Consumption_corpProf + Investment_capitalLag = 0 Model 1: restricted model Model 2: kleinModel Res.Df Df F Pr(>F) 1 51 2 50 1 1.7 0.2 Linear hypothesis test (Chi^2 statistic of a Wald test) Hypothesis: Consumption_corpProf + Investment_capitalLag = 0 Model 1: restricted model Model 2: kleinModel Res.Df Df Chisq Pr(>Chisq) 1 51 2 50 1 1.7 0.19 Linear hypothesis test (Theil's F test) Hypothesis: Consumption_corpProf + Investment_capitalLag = 0 Consumption_corpProfLag - PrivateWages_trend = 0 Model 1: restricted model Model 2: kleinModel Res.Df Df F Pr(>F) 1 52 2 50 2 0.72 0.49 Linear hypothesis test (F statistic of a Wald test) Hypothesis: Consumption_corpProf + Investment_capitalLag = 0 Consumption_corpProfLag - PrivateWages_trend = 0 Model 1: restricted model Model 2: kleinModel Res.Df Df F Pr(>F) 1 52 2 50 2 0.87 0.42 Linear hypothesis test (Chi^2 statistic of a Wald test) Hypothesis: Consumption_corpProf + Investment_capitalLag = 0 Consumption_corpProfLag - PrivateWages_trend = 0 Model 1: restricted model Model 2: kleinModel Res.Df Df Chisq Pr(>Chisq) 1 52 2 50 2 1.75 0.42 > logLik 'log Lik.' -69.4 (df=18) 'log Lik.' -78.2 (df=18) > > # 3SLS > summary systemfit results method: 3SLS N DF SSR detRCov OLS-R2 McElroy-R2 system 60 48 62.6 0.265 0.968 0.994 N DF SSR MSE RMSE R2 Adj R2 Consumption 20 16 17.8 1.114 1.06 0.981 0.977 Investment 20 16 34.3 2.143 1.46 0.853 0.825 PrivateWages 20 16 10.5 0.656 0.81 0.987 0.984 The covariance matrix of the residuals used for estimation Consumption Investment PrivateWages Consumption 1.034 0.309 -0.383 Investment 0.309 1.151 0.202 PrivateWages -0.383 0.202 0.487 The covariance matrix of the residuals Consumption Investment PrivateWages Consumption 0.891 0.304 -0.391 Investment 0.304 1.715 0.388 PrivateWages -0.391 0.388 0.525 The correlations of the residuals Consumption Investment PrivateWages Consumption 1.000 0.246 -0.571 Investment 0.246 1.000 0.409 PrivateWages -0.571 0.409 1.000 3SLS estimates for 'Consumption' (equation 1) Model Formula: consump ~ corpProf + corpProfLag + wages Instruments: ~govExp + taxes + govWage + trend + capitalLag + corpProfLag + gnpLag Estimate Std. Error t value Pr(>|t|) (Intercept) 16.3668 1.3024 12.57 1.1e-09 *** corpProf 0.1186 0.1073 1.10 0.29 corpProfLag 0.1448 0.1008 1.44 0.17 wages 0.8006 0.0391 20.47 6.7e-13 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.056 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 17.825 MSE: 1.114 Root MSE: 1.056 Multiple R-Squared: 0.981 Adjusted R-Squared: 0.977 3SLS estimates for 'Investment' (equation 2) Model Formula: invest ~ corpProf + corpProfLag + capitalLag Instruments: ~govExp + taxes + govWage + trend + capitalLag + corpProfLag + gnpLag Estimate Std. Error t value Pr(>|t|) (Intercept) 24.8872 6.2956 3.95 0.00114 ** corpProf 0.0702 0.1458 0.48 0.63648 corpProfLag 0.6688 0.1402 4.77 0.00021 *** capitalLag -0.1786 0.0303 -5.90 2.3e-05 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.464 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 34.295 MSE: 2.143 Root MSE: 1.464 Multiple R-Squared: 0.853 Adjusted R-Squared: 0.825 3SLS estimates for 'PrivateWages' (equation 3) Model Formula: privWage ~ gnp + gnpLag + trend Instruments: ~govExp + taxes + govWage + trend + capitalLag + corpProfLag + gnpLag Estimate Std. Error t value Pr(>|t|) (Intercept) 1.6387 1.1457 1.43 0.17188 gnp 0.4062 0.0324 12.52 1.1e-09 *** gnpLag 0.1784 0.0347 5.14 1.0e-04 *** trend 0.1435 0.0292 4.91 0.00016 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 0.81 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 10.497 MSE: 0.656 Root MSE: 0.81 Multiple R-Squared: 0.987 Adjusted R-Squared: 0.984 > residuals Consumption Investment PrivateWages 1 NA NA NA 2 -0.3538 -1.795 -1.2388 3 -0.9465 0.154 0.4649 4 -1.4189 0.678 1.4344 5 -0.3546 -1.666 -0.1354 6 0.1366 0.251 -0.3452 7 NA NA NA 8 1.4213 1.150 -0.7445 9 1.2173 0.476 0.3001 10 -0.4636 2.200 1.2232 11 -0.0650 -0.962 -0.4104 12 -0.5422 -0.808 0.2495 13 -0.7092 -1.098 -0.3057 14 0.4898 1.542 0.3497 15 -0.0502 -0.155 0.2949 16 0.0272 0.154 0.0214 17 1.8311 1.932 -0.7322 18 -0.4567 -0.180 0.9090 19 0.0650 -3.381 -0.7795 20 1.2135 0.557 -0.2847 21 0.9466 0.167 -1.0812 22 -1.9877 0.784 0.8102 > fitted Consumption Investment PrivateWages 1 NA NA NA 2 42.3 1.595 26.7 3 45.9 1.746 28.8 4 50.6 4.522 32.7 5 51.0 4.666 34.0 6 52.5 4.849 35.7 7 NA NA NA 8 54.8 3.050 38.6 9 56.1 2.524 38.9 10 58.3 2.900 40.1 11 55.1 1.962 38.3 12 51.4 -2.592 34.3 13 46.3 -5.102 29.3 14 46.0 -6.642 28.2 15 48.8 -2.845 30.3 16 51.3 -1.454 33.2 17 55.9 0.168 37.5 18 59.2 2.180 40.1 19 57.4 1.481 39.0 20 60.4 0.743 41.9 21 64.1 3.133 46.1 22 71.7 4.116 52.5 > predict Consumption.pred Consumption.se.fit Consumption.lwr Consumption.upr 1 NA NA NA NA 2 42.3 0.468 39.8 44.7 3 45.9 0.543 43.4 48.5 4 50.6 0.352 48.3 53.0 5 51.0 0.407 48.6 53.4 6 52.5 0.411 50.1 54.9 7 NA NA NA NA 8 54.8 0.340 52.4 57.1 9 56.1 0.372 53.7 58.5 10 58.3 0.387 55.9 60.6 11 55.1 0.687 52.4 57.7 12 51.4 0.558 48.9 54.0 13 46.3 0.713 43.6 49.0 14 46.0 0.599 43.4 48.6 15 48.8 0.368 46.4 51.1 16 51.3 0.326 48.9 53.6 17 55.9 0.388 53.5 58.3 18 59.2 0.319 56.8 61.5 19 57.4 0.391 55.0 59.8 20 60.4 0.457 57.9 62.8 21 64.1 0.437 61.6 66.5 22 71.7 0.674 69.0 74.3 Investment.pred Investment.se.fit Investment.lwr Investment.upr 1 NA NA NA NA 2 1.595 0.731 -1.8742 5.065 3 1.746 0.533 -1.5566 5.050 4 4.522 0.484 1.2530 7.791 5 4.666 0.406 1.4458 7.887 6 4.849 0.386 1.6390 8.058 7 NA NA NA NA 8 3.050 0.325 -0.1296 6.229 9 2.524 0.467 -0.7334 5.782 10 2.900 0.515 -0.3900 6.190 11 1.962 0.769 -1.5438 5.467 12 -2.592 0.608 -5.9519 0.769 13 -5.102 0.774 -8.6129 -1.592 14 -6.642 0.807 -10.1867 -3.098 15 -2.845 0.395 -6.0599 0.370 16 -1.454 0.341 -4.6409 1.733 17 0.168 0.442 -3.0739 3.410 18 2.180 0.281 -0.9807 5.340 19 1.481 0.414 -1.7440 4.706 20 0.743 0.492 -2.5310 4.017 21 3.133 0.414 -0.0924 6.358 22 4.116 0.583 0.7756 7.457 PrivateWages.pred PrivateWages.se.fit PrivateWages.lwr PrivateWages.upr 1 NA NA NA NA 2 26.7 0.322 24.9 28.6 3 28.8 0.328 27.0 30.7 4 32.7 0.340 30.8 34.5 5 34.0 0.250 32.2 35.8 6 35.7 0.257 33.9 37.5 7 NA NA NA NA 8 38.6 0.254 36.8 40.4 9 38.9 0.241 37.1 40.7 10 40.1 0.235 38.3 41.9 11 38.3 0.325 36.5 40.2 12 34.3 0.349 32.4 36.1 13 29.3 0.425 27.4 31.2 14 28.2 0.340 26.3 30.0 15 30.3 0.326 28.5 32.2 16 33.2 0.272 31.4 35.0 17 37.5 0.273 35.7 39.3 18 40.1 0.214 38.3 41.9 19 39.0 0.336 37.1 40.8 20 41.9 0.290 40.1 43.7 21 46.1 0.305 44.2 47.9 22 52.5 0.479 50.5 54.5 > model.frame [1] TRUE > model.matrix [1] "Attributes: < Component \"dim\": Mean relative difference: 0.0323 >" [2] "Attributes: < Component \"dimnames\": Component 1: 55 string mismatches >" [3] "Numeric: lengths (744, 720) differ" > nobs [1] 60 > linearHypothesis Linear hypothesis test (Theil's F test) Hypothesis: Consumption_corpProf + Investment_capitalLag = 0 Model 1: restricted model Model 2: kleinModel Res.Df Df F Pr(>F) 1 49 2 48 1 0.22 0.64 Linear hypothesis test (F statistic of a Wald test) Hypothesis: Consumption_corpProf + Investment_capitalLag = 0 Model 1: restricted model Model 2: kleinModel Res.Df Df F Pr(>F) 1 49 2 48 1 0.29 0.59 Linear hypothesis test (Chi^2 statistic of a Wald test) Hypothesis: Consumption_corpProf + Investment_capitalLag = 0 Model 1: restricted model Model 2: kleinModel Res.Df Df Chisq Pr(>Chisq) 1 49 2 48 1 0.29 0.59 Linear hypothesis test (Theil's F test) Hypothesis: Consumption_corpProf + Investment_capitalLag = 0 Consumption_corpProfLag - PrivateWages_trend = 0 Model 1: restricted model Model 2: kleinModel Res.Df Df F Pr(>F) 1 50 2 48 2 0.29 0.75 Linear hypothesis test (F statistic of a Wald test) Hypothesis: Consumption_corpProf + Investment_capitalLag = 0 Consumption_corpProfLag - PrivateWages_trend = 0 Model 1: restricted model Model 2: kleinModel Res.Df Df F Pr(>F) 1 50 2 48 2 0.38 0.68 Linear hypothesis test (Chi^2 statistic of a Wald test) Hypothesis: Consumption_corpProf + Investment_capitalLag = 0 Consumption_corpProfLag - PrivateWages_trend = 0 Model 1: restricted model Model 2: kleinModel Res.Df Df Chisq Pr(>Chisq) 1 50 2 48 2 0.77 0.68 > logLik 'log Lik.' -71.9 (df=18) 'log Lik.' -82.9 (df=18) > > # I3SLS > summary systemfit results method: iterated 3SLS convergence achieved after 22 iterations N DF SSR detRCov OLS-R2 McElroy-R2 system 60 48 107 0.47 0.946 0.996 N DF SSR MSE RMSE R2 Adj R2 Consumption 20 16 18.1 1.13 1.063 0.981 0.977 Investment 20 16 76.4 4.77 2.185 0.672 0.610 PrivateWages 20 16 12.3 0.77 0.877 0.984 0.982 The covariance matrix of the residuals used for estimation Consumption Investment PrivateWages Consumption 0.905 0.509 -0.437 Investment 0.509 3.819 0.709 PrivateWages -0.437 0.709 0.616 The covariance matrix of the residuals Consumption Investment PrivateWages Consumption 0.905 0.509 -0.437 Investment 0.509 3.819 0.709 PrivateWages -0.437 0.709 0.616 The correlations of the residuals Consumption Investment PrivateWages Consumption 1.000 0.274 -0.585 Investment 0.274 1.000 0.462 PrivateWages -0.585 0.462 1.000 3SLS estimates for 'Consumption' (equation 1) Model Formula: consump ~ corpProf + corpProfLag + wages Instruments: ~govExp + taxes + govWage + trend + capitalLag + corpProfLag + gnpLag Estimate Std. Error t value Pr(>|t|) (Intercept) 16.4728 1.2187 13.52 3.6e-10 *** corpProf 0.1642 0.0952 1.73 0.10 corpProfLag 0.1552 0.0903 1.72 0.11 wages 0.7756 0.0356 21.82 2.5e-13 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.063 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 18.095 MSE: 1.131 Root MSE: 1.063 Multiple R-Squared: 0.981 Adjusted R-Squared: 0.977 3SLS estimates for 'Investment' (equation 2) Model Formula: invest ~ corpProf + corpProfLag + capitalLag Instruments: ~govExp + taxes + govWage + trend + capitalLag + corpProfLag + gnpLag Estimate Std. Error t value Pr(>|t|) (Intercept) 38.7938 9.7249 3.99 0.00106 ** corpProf -0.2501 0.2337 -1.07 0.30036 corpProfLag 0.9129 0.2271 4.02 0.00099 *** capitalLag -0.2409 0.0469 -5.14 9.9e-05 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.185 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 76.371 MSE: 4.773 Root MSE: 2.185 Multiple R-Squared: 0.672 Adjusted R-Squared: 0.61 3SLS estimates for 'PrivateWages' (equation 3) Model Formula: privWage ~ gnp + gnpLag + trend Instruments: ~govExp + taxes + govWage + trend + capitalLag + corpProfLag + gnpLag Estimate Std. Error t value Pr(>|t|) (Intercept) 2.4620 1.2228 2.01 0.061 . gnp 0.3776 0.0318 11.88 2.4e-09 *** gnpLag 0.1937 0.0331 5.85 2.5e-05 *** trend 0.1619 0.0300 5.40 5.9e-05 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 0.877 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 12.318 MSE: 0.77 Root MSE: 0.877 Multiple R-Squared: 0.984 Adjusted R-Squared: 0.982 > residuals Consumption Investment PrivateWages 1 NA NA NA 2 -0.4522 -3.4485 -1.2596 3 -1.1470 0.0027 0.5437 4 -1.6147 0.0274 1.6290 5 -0.6117 -2.0392 -0.0707 6 -0.1229 0.0457 -0.1859 7 NA NA NA 8 1.2461 1.4658 -0.6304 9 1.0158 1.4202 0.3924 10 -0.6460 3.2062 1.3671 11 -0.0554 -1.7386 -0.4891 12 -0.3472 -1.3793 0.0179 13 -0.3947 -2.2646 -0.6968 14 0.6536 2.4092 0.1021 15 0.0821 -0.2787 0.1482 16 0.1381 0.1196 -0.0796 17 1.8826 2.5548 -0.6862 18 -0.3415 -0.4009 0.8755 19 0.2296 -4.0454 -0.9839 20 1.3178 1.4481 -0.1989 21 1.0065 0.9087 -0.9681 22 -1.8388 1.9868 1.1734 > fitted Consumption Investment PrivateWages 1 NA NA NA 2 42.4 3.249 26.8 3 46.1 1.897 28.8 4 50.8 5.173 32.5 5 51.2 5.039 34.0 6 52.7 5.054 35.6 7 NA NA NA 8 55.0 2.734 38.5 9 56.3 1.580 38.8 10 58.4 1.894 39.9 11 55.1 2.739 38.4 12 51.2 -2.021 34.5 13 46.0 -3.935 29.7 14 45.8 -7.509 28.4 15 48.6 -2.721 30.5 16 51.2 -1.420 33.3 17 55.8 -0.455 37.5 18 59.0 2.401 40.1 19 57.3 2.145 39.2 20 60.3 -0.148 41.8 21 64.0 2.391 46.0 22 71.5 2.913 52.1 > predict Consumption.pred Consumption.se.fit Consumption.lwr Consumption.upr 1 NA NA NA NA 2 42.4 0.437 41.5 43.2 3 46.1 0.492 45.2 47.1 4 50.8 0.321 50.2 51.5 5 51.2 0.369 50.5 52.0 6 52.7 0.372 52.0 53.5 7 NA NA NA NA 8 55.0 0.310 54.3 55.6 9 56.3 0.338 55.6 57.0 10 58.4 0.355 57.7 59.2 11 55.1 0.618 53.8 56.3 12 51.2 0.501 50.2 52.3 13 46.0 0.642 44.7 47.3 14 45.8 0.547 44.7 46.9 15 48.6 0.340 47.9 49.3 16 51.2 0.300 50.6 51.8 17 55.8 0.354 55.1 56.5 18 59.0 0.294 58.4 59.6 19 57.3 0.354 56.6 58.0 20 60.3 0.418 59.4 61.1 21 64.0 0.407 63.2 64.8 22 71.5 0.628 70.3 72.8 Investment.pred Investment.se.fit Investment.lwr Investment.upr 1 NA NA NA NA 2 3.249 1.160 0.91672 5.580 3 1.897 0.934 0.02009 3.775 4 5.173 0.803 3.55865 6.787 5 5.039 0.693 3.64486 6.433 6 5.054 0.674 3.69840 6.410 7 NA NA NA NA 8 2.734 0.584 1.56002 3.908 9 1.580 0.783 0.00466 3.155 10 1.894 0.868 0.14846 3.639 11 2.739 1.321 0.08241 5.395 12 -2.021 1.064 -4.16036 0.119 13 -3.935 1.349 -6.64712 -1.224 14 -7.509 1.360 -10.24349 -4.775 15 -2.721 0.712 -4.15288 -1.290 16 -1.420 0.614 -2.65412 -0.185 17 -0.455 0.751 -1.96433 1.055 18 2.401 0.498 1.39939 3.402 19 2.145 0.698 0.74152 3.549 20 -0.148 0.816 -1.78957 1.493 21 2.391 0.713 0.95855 3.824 22 2.913 0.984 0.93419 4.892 PrivateWages.pred PrivateWages.se.fit PrivateWages.lwr PrivateWages.upr 1 NA NA NA NA 2 26.8 0.347 26.1 27.5 3 28.8 0.348 28.1 29.5 4 32.5 0.354 31.8 33.2 5 34.0 0.263 33.4 34.5 6 35.6 0.274 35.0 36.1 7 NA NA NA NA 8 38.5 0.268 38.0 39.1 9 38.8 0.256 38.3 39.3 10 39.9 0.254 39.4 40.4 11 38.4 0.323 37.7 39.0 12 34.5 0.347 33.8 35.2 13 29.7 0.435 28.8 30.6 14 28.4 0.366 27.7 29.1 15 30.5 0.341 29.8 31.1 16 33.3 0.285 32.7 33.9 17 37.5 0.275 36.9 38.0 18 40.1 0.233 39.7 40.6 19 39.2 0.346 38.5 39.9 20 41.8 0.298 41.2 42.4 21 46.0 0.329 45.3 46.6 22 52.1 0.510 51.1 53.2 > model.frame [1] TRUE > model.matrix [1] "Attributes: < Component \"dim\": Mean relative difference: 0.0323 >" [2] "Attributes: < Component \"dimnames\": Component 1: 55 string mismatches >" [3] "Numeric: lengths (744, 720) differ" > nobs [1] 60 > linearHypothesis Linear hypothesis test (Theil's F test) Hypothesis: Consumption_corpProf + Investment_capitalLag = 0 Model 1: restricted model Model 2: kleinModel Res.Df Df F Pr(>F) 1 49 2 48 1 0.4 0.53 Linear hypothesis test (F statistic of a Wald test) Hypothesis: Consumption_corpProf + Investment_capitalLag = 0 Model 1: restricted model Model 2: kleinModel Res.Df Df F Pr(>F) 1 49 2 48 1 0.5 0.49 Linear hypothesis test (Chi^2 statistic of a Wald test) Hypothesis: Consumption_corpProf + Investment_capitalLag = 0 Model 1: restricted model Model 2: kleinModel Res.Df Df Chisq Pr(>Chisq) 1 49 2 48 1 0.5 0.48 Linear hypothesis test (Theil's F test) Hypothesis: Consumption_corpProf + Investment_capitalLag = 0 Consumption_corpProfLag - PrivateWages_trend = 0 Model 1: restricted model Model 2: kleinModel Res.Df Df F Pr(>F) 1 50 2 48 2 0.66 0.52 Linear hypothesis test (F statistic of a Wald test) Hypothesis: Consumption_corpProf + Investment_capitalLag = 0 Consumption_corpProfLag - PrivateWages_trend = 0 Model 1: restricted model Model 2: kleinModel Res.Df Df F Pr(>F) 1 50 2 48 2 0.83 0.44 Linear hypothesis test (Chi^2 statistic of a Wald test) Hypothesis: Consumption_corpProf + Investment_capitalLag = 0 Consumption_corpProfLag - PrivateWages_trend = 0 Model 1: restricted model Model 2: kleinModel Res.Df Df Chisq Pr(>Chisq) 1 50 2 48 2 1.66 0.44 > logLik 'log Lik.' -77.6 (df=18) 'log Lik.' -92.7 (df=18) > > # OLS Warning in systemfit(system, method = method, data = KleinI, methodResidCov = ifelse(method == : the estimation of systems of equations with unequal numbers of observations has not been thoroughly tested yet > summary systemfit results method: OLS N DF SSR detRCov OLS-R2 McElroy-R2 system 61 49 44.5 0.382 0.977 0.99 N DF SSR MSE RMSE R2 Adj R2 Consumption 20 16 17.48 1.093 1.04 0.981 0.978 Investment 21 17 17.32 1.019 1.01 0.931 0.919 PrivateWages 20 16 9.74 0.609 0.78 0.988 0.985 The covariance matrix of the residuals Consumption Investment PrivateWages Consumption 1.124 0.034 -0.442 Investment 0.034 0.928 0.130 PrivateWages -0.442 0.130 0.563 The correlations of the residuals Consumption Investment PrivateWages Consumption 1.0000 0.0266 -0.563 Investment 0.0266 1.0000 0.169 PrivateWages -0.5630 0.1689 1.000 OLS estimates for 'Consumption' (equation 1) Model Formula: consump ~ corpProf + corpProfLag + wages Estimate Std. Error t value Pr(>|t|) (Intercept) 16.1357 1.3571 11.89 2.4e-09 *** corpProf 0.1994 0.0949 2.10 0.052 . corpProfLag 0.0969 0.0944 1.03 0.320 wages 0.7940 0.0415 19.16 1.9e-12 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.045 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 17.481 MSE: 1.093 Root MSE: 1.045 Multiple R-Squared: 0.981 Adjusted R-Squared: 0.978 OLS estimates for 'Investment' (equation 2) Model Formula: invest ~ corpProf + corpProfLag + capitalLag Estimate Std. Error t value Pr(>|t|) (Intercept) 10.1258 5.2164 1.94 0.06901 . corpProf 0.4796 0.0927 5.17 7.6e-05 *** corpProfLag 0.3330 0.0963 3.46 0.00299 ** capitalLag -0.1118 0.0255 -4.38 0.00041 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.009 on 17 degrees of freedom Number of observations: 21 Degrees of Freedom: 17 SSR: 17.323 MSE: 1.019 Root MSE: 1.009 Multiple R-Squared: 0.931 Adjusted R-Squared: 0.919 OLS estimates for 'PrivateWages' (equation 3) Model Formula: privWage ~ gnp + gnpLag + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 1.3550 1.2591 1.08 0.2978 gnp 0.4417 0.0319 13.86 2.5e-10 *** gnpLag 0.1466 0.0366 4.01 0.0010 ** trend 0.1244 0.0323 3.85 0.0014 ** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 0.78 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 9.739 MSE: 0.609 Root MSE: 0.78 Multiple R-Squared: 0.988 Adjusted R-Squared: 0.985 compare coef with single-equation OLS [1] TRUE > residuals Consumption Investment PrivateWages 1 NA NA NA 2 -0.3304 -0.0668 -1.3389 3 -1.2748 -0.0476 0.2462 4 -1.6213 1.2467 1.1255 5 -0.5661 -1.3512 -0.1959 6 -0.0730 0.4154 -0.5284 7 0.7915 1.4923 NA 8 1.2648 0.7889 -0.7909 9 0.9746 -0.6317 0.2819 10 NA 1.0830 1.1384 11 0.2225 0.2791 -0.1904 12 -0.2256 0.0369 0.5813 13 -0.2711 0.3659 0.1206 14 0.3765 0.2237 0.4773 15 -0.0349 -0.1728 0.3035 16 -0.0243 0.0101 0.0284 17 1.6023 0.9719 -0.8517 18 -0.4658 0.0516 0.9908 19 0.1914 -2.5656 -0.4597 20 0.9683 -0.6866 -0.3819 21 0.7325 -0.7807 -1.1062 22 -2.2370 -0.6623 0.5501 > fitted Consumption Investment PrivateWages 1 NA NA NA 2 42.2 -0.133 26.8 3 46.3 1.948 29.1 4 50.8 3.953 33.0 5 51.2 4.351 34.1 6 52.7 4.685 35.9 7 54.3 4.108 NA 8 54.9 3.411 38.7 9 56.3 3.632 38.9 10 NA 4.017 40.2 11 54.8 0.721 38.1 12 51.1 -3.437 33.9 13 45.9 -6.566 28.9 14 46.1 -5.324 28.0 15 48.7 -2.827 30.3 16 51.3 -1.310 33.2 17 56.1 1.128 37.7 18 59.2 1.948 40.0 19 57.3 0.666 38.7 20 60.6 1.987 42.0 21 64.3 4.081 46.1 22 71.9 5.562 52.7 > predict Consumption.pred Consumption.se.fit Consumption.lwr Consumption.upr 1 NA NA NA NA 2 42.2 0.478 39.9 44.5 3 46.3 0.537 43.9 48.6 4 50.8 0.364 48.6 53.0 5 51.2 0.427 48.9 53.4 6 52.7 0.433 50.4 54.9 7 54.3 0.394 52.1 56.6 8 54.9 0.360 52.7 57.2 9 56.3 0.387 54.1 58.6 10 NA NA NA NA 11 54.8 0.635 52.3 57.2 12 51.1 0.501 48.8 53.5 13 45.9 0.656 43.4 48.4 14 46.1 0.629 43.7 48.6 15 48.7 0.389 46.5 51.0 16 51.3 0.345 49.1 53.5 17 56.1 0.379 53.9 58.3 18 59.2 0.336 57.0 61.4 19 57.3 0.385 55.1 59.5 20 60.6 0.450 58.3 62.9 21 64.3 0.448 62.0 66.6 22 71.9 0.697 69.4 74.5 Investment.pred Investment.se.fit Investment.lwr Investment.upr 1 NA NA NA NA 2 -0.133 0.579 -2.472 2.206 3 1.948 0.476 -0.295 4.190 4 3.953 0.428 1.750 6.157 5 4.351 0.354 2.202 6.501 6 4.685 0.333 2.548 6.821 7 4.108 0.314 1.983 6.232 8 3.411 0.279 1.306 5.516 9 3.632 0.371 1.470 5.793 10 4.017 0.426 1.815 6.219 11 0.721 0.574 -1.613 3.054 12 -3.437 0.484 -5.686 -1.188 13 -6.566 0.588 -8.913 -4.219 14 -5.324 0.662 -7.750 -2.898 15 -2.827 0.356 -4.978 -0.676 16 -1.310 0.305 -3.429 0.809 17 1.128 0.332 -1.007 3.263 18 1.948 0.232 -0.133 4.030 19 0.666 0.298 -1.449 2.781 20 1.987 0.350 -0.160 4.133 21 4.081 0.317 1.955 6.207 22 5.562 0.440 3.349 7.775 PrivateWages.pred PrivateWages.se.fit PrivateWages.lwr PrivateWages.upr 1 NA NA NA NA 2 26.8 0.352 25.1 28.6 3 29.1 0.355 27.3 30.8 4 33.0 0.358 31.2 34.7 5 34.1 0.277 32.4 35.8 6 35.9 0.276 34.3 37.6 7 NA NA NA NA 8 38.7 0.282 37.0 40.4 9 38.9 0.268 37.3 40.6 10 40.2 0.255 38.5 41.8 11 38.1 0.351 36.4 39.8 12 33.9 0.355 32.2 35.6 13 28.9 0.421 27.1 30.7 14 28.0 0.370 26.3 29.8 15 30.3 0.364 28.6 32.0 16 33.2 0.304 31.5 34.9 17 37.7 0.298 36.0 39.3 18 40.0 0.233 38.4 41.6 19 38.7 0.349 36.9 40.4 20 42.0 0.314 40.3 43.7 21 46.1 0.328 44.4 47.8 22 52.7 0.494 50.9 54.6 > model.frame consump corpProf corpProfLag wages invest capitalLag privWage gnp gnpLag 1 39.8 12.7 NA 31.0 2.7 180 28.8 44.9 NA 2 41.9 12.4 12.7 28.2 -0.2 183 25.5 45.6 44.9 3 45.0 16.9 12.4 32.2 1.9 183 29.3 50.1 45.6 4 49.2 18.4 16.9 37.0 5.2 184 34.1 57.2 50.1 5 50.6 19.4 18.4 37.0 3.0 190 33.9 57.1 57.2 6 52.6 20.1 19.4 38.6 5.1 193 35.4 61.0 57.1 7 55.1 19.6 20.1 40.7 5.6 198 37.4 64.0 NA 8 56.2 19.8 19.6 41.5 4.2 203 37.9 64.4 64.0 9 57.3 21.1 19.8 42.9 3.0 208 39.2 64.5 64.4 10 57.8 21.7 21.1 NA 5.1 211 41.3 67.0 64.5 11 55.0 15.6 21.7 42.1 1.0 216 37.9 61.2 67.0 12 50.9 11.4 15.6 39.3 -3.4 217 34.5 53.4 61.2 13 45.6 7.0 11.4 34.3 -6.2 213 29.0 44.3 53.4 14 46.5 11.2 7.0 34.1 -5.1 207 28.5 45.1 44.3 15 48.7 12.3 11.2 36.6 -3.0 202 30.6 49.7 45.1 16 51.3 14.0 12.3 39.3 -1.3 199 33.2 54.4 49.7 17 57.7 17.6 14.0 44.2 2.1 198 36.8 62.7 54.4 18 58.7 17.3 17.6 47.7 2.0 200 41.0 65.0 62.7 19 57.5 15.3 17.3 45.9 -1.9 202 38.2 60.9 65.0 20 61.6 19.0 15.3 49.4 1.3 200 41.6 69.5 60.9 21 65.0 21.1 19.0 53.0 3.3 201 45.0 75.7 69.5 22 69.7 23.5 21.1 61.8 4.9 204 53.3 88.4 75.7 trend 1 -11 2 -10 3 -9 4 -8 5 -7 6 -6 7 -5 8 -4 9 -3 10 -2 11 -1 12 0 13 1 14 2 15 3 16 4 17 5 18 6 19 7 20 8 21 9 22 10 > model.matrix Consumption_(Intercept) Consumption_corpProf Consumption_2 1 12.4 Consumption_3 1 16.9 Consumption_4 1 18.4 Consumption_5 1 19.4 Consumption_6 1 20.1 Consumption_7 1 19.6 Consumption_8 1 19.8 Consumption_9 1 21.1 Consumption_11 1 15.6 Consumption_12 1 11.4 Consumption_13 1 7.0 Consumption_14 1 11.2 Consumption_15 1 12.3 Consumption_16 1 14.0 Consumption_17 1 17.6 Consumption_18 1 17.3 Consumption_19 1 15.3 Consumption_20 1 19.0 Consumption_21 1 21.1 Consumption_22 1 23.5 Investment_2 0 0.0 Investment_3 0 0.0 Investment_4 0 0.0 Investment_5 0 0.0 Investment_6 0 0.0 Investment_7 0 0.0 Investment_8 0 0.0 Investment_9 0 0.0 Investment_10 0 0.0 Investment_11 0 0.0 Investment_12 0 0.0 Investment_13 0 0.0 Investment_14 0 0.0 Investment_15 0 0.0 Investment_16 0 0.0 Investment_17 0 0.0 Investment_18 0 0.0 Investment_19 0 0.0 Investment_20 0 0.0 Investment_21 0 0.0 Investment_22 0 0.0 PrivateWages_2 0 0.0 PrivateWages_3 0 0.0 PrivateWages_4 0 0.0 PrivateWages_5 0 0.0 PrivateWages_6 0 0.0 PrivateWages_8 0 0.0 PrivateWages_9 0 0.0 PrivateWages_10 0 0.0 PrivateWages_11 0 0.0 PrivateWages_12 0 0.0 PrivateWages_13 0 0.0 PrivateWages_14 0 0.0 PrivateWages_15 0 0.0 PrivateWages_16 0 0.0 PrivateWages_17 0 0.0 PrivateWages_18 0 0.0 PrivateWages_19 0 0.0 PrivateWages_20 0 0.0 PrivateWages_21 0 0.0 PrivateWages_22 0 0.0 Consumption_corpProfLag Consumption_wages Consumption_2 12.7 28.2 Consumption_3 12.4 32.2 Consumption_4 16.9 37.0 Consumption_5 18.4 37.0 Consumption_6 19.4 38.6 Consumption_7 20.1 40.7 Consumption_8 19.6 41.5 Consumption_9 19.8 42.9 Consumption_11 21.7 42.1 Consumption_12 15.6 39.3 Consumption_13 11.4 34.3 Consumption_14 7.0 34.1 Consumption_15 11.2 36.6 Consumption_16 12.3 39.3 Consumption_17 14.0 44.2 Consumption_18 17.6 47.7 Consumption_19 17.3 45.9 Consumption_20 15.3 49.4 Consumption_21 19.0 53.0 Consumption_22 21.1 61.8 Investment_2 0.0 0.0 Investment_3 0.0 0.0 Investment_4 0.0 0.0 Investment_5 0.0 0.0 Investment_6 0.0 0.0 Investment_7 0.0 0.0 Investment_8 0.0 0.0 Investment_9 0.0 0.0 Investment_10 0.0 0.0 Investment_11 0.0 0.0 Investment_12 0.0 0.0 Investment_13 0.0 0.0 Investment_14 0.0 0.0 Investment_15 0.0 0.0 Investment_16 0.0 0.0 Investment_17 0.0 0.0 Investment_18 0.0 0.0 Investment_19 0.0 0.0 Investment_20 0.0 0.0 Investment_21 0.0 0.0 Investment_22 0.0 0.0 PrivateWages_2 0.0 0.0 PrivateWages_3 0.0 0.0 PrivateWages_4 0.0 0.0 PrivateWages_5 0.0 0.0 PrivateWages_6 0.0 0.0 PrivateWages_8 0.0 0.0 PrivateWages_9 0.0 0.0 PrivateWages_10 0.0 0.0 PrivateWages_11 0.0 0.0 PrivateWages_12 0.0 0.0 PrivateWages_13 0.0 0.0 PrivateWages_14 0.0 0.0 PrivateWages_15 0.0 0.0 PrivateWages_16 0.0 0.0 PrivateWages_17 0.0 0.0 PrivateWages_18 0.0 0.0 PrivateWages_19 0.0 0.0 PrivateWages_20 0.0 0.0 PrivateWages_21 0.0 0.0 PrivateWages_22 0.0 0.0 Investment_(Intercept) Investment_corpProf Consumption_2 0 0.0 Consumption_3 0 0.0 Consumption_4 0 0.0 Consumption_5 0 0.0 Consumption_6 0 0.0 Consumption_7 0 0.0 Consumption_8 0 0.0 Consumption_9 0 0.0 Consumption_11 0 0.0 Consumption_12 0 0.0 Consumption_13 0 0.0 Consumption_14 0 0.0 Consumption_15 0 0.0 Consumption_16 0 0.0 Consumption_17 0 0.0 Consumption_18 0 0.0 Consumption_19 0 0.0 Consumption_20 0 0.0 Consumption_21 0 0.0 Consumption_22 0 0.0 Investment_2 1 12.4 Investment_3 1 16.9 Investment_4 1 18.4 Investment_5 1 19.4 Investment_6 1 20.1 Investment_7 1 19.6 Investment_8 1 19.8 Investment_9 1 21.1 Investment_10 1 21.7 Investment_11 1 15.6 Investment_12 1 11.4 Investment_13 1 7.0 Investment_14 1 11.2 Investment_15 1 12.3 Investment_16 1 14.0 Investment_17 1 17.6 Investment_18 1 17.3 Investment_19 1 15.3 Investment_20 1 19.0 Investment_21 1 21.1 Investment_22 1 23.5 PrivateWages_2 0 0.0 PrivateWages_3 0 0.0 PrivateWages_4 0 0.0 PrivateWages_5 0 0.0 PrivateWages_6 0 0.0 PrivateWages_8 0 0.0 PrivateWages_9 0 0.0 PrivateWages_10 0 0.0 PrivateWages_11 0 0.0 PrivateWages_12 0 0.0 PrivateWages_13 0 0.0 PrivateWages_14 0 0.0 PrivateWages_15 0 0.0 PrivateWages_16 0 0.0 PrivateWages_17 0 0.0 PrivateWages_18 0 0.0 PrivateWages_19 0 0.0 PrivateWages_20 0 0.0 PrivateWages_21 0 0.0 PrivateWages_22 0 0.0 Investment_corpProfLag Investment_capitalLag Consumption_2 0.0 0 Consumption_3 0.0 0 Consumption_4 0.0 0 Consumption_5 0.0 0 Consumption_6 0.0 0 Consumption_7 0.0 0 Consumption_8 0.0 0 Consumption_9 0.0 0 Consumption_11 0.0 0 Consumption_12 0.0 0 Consumption_13 0.0 0 Consumption_14 0.0 0 Consumption_15 0.0 0 Consumption_16 0.0 0 Consumption_17 0.0 0 Consumption_18 0.0 0 Consumption_19 0.0 0 Consumption_20 0.0 0 Consumption_21 0.0 0 Consumption_22 0.0 0 Investment_2 12.7 183 Investment_3 12.4 183 Investment_4 16.9 184 Investment_5 18.4 190 Investment_6 19.4 193 Investment_7 20.1 198 Investment_8 19.6 203 Investment_9 19.8 208 Investment_10 21.1 211 Investment_11 21.7 216 Investment_12 15.6 217 Investment_13 11.4 213 Investment_14 7.0 207 Investment_15 11.2 202 Investment_16 12.3 199 Investment_17 14.0 198 Investment_18 17.6 200 Investment_19 17.3 202 Investment_20 15.3 200 Investment_21 19.0 201 Investment_22 21.1 204 PrivateWages_2 0.0 0 PrivateWages_3 0.0 0 PrivateWages_4 0.0 0 PrivateWages_5 0.0 0 PrivateWages_6 0.0 0 PrivateWages_8 0.0 0 PrivateWages_9 0.0 0 PrivateWages_10 0.0 0 PrivateWages_11 0.0 0 PrivateWages_12 0.0 0 PrivateWages_13 0.0 0 PrivateWages_14 0.0 0 PrivateWages_15 0.0 0 PrivateWages_16 0.0 0 PrivateWages_17 0.0 0 PrivateWages_18 0.0 0 PrivateWages_19 0.0 0 PrivateWages_20 0.0 0 PrivateWages_21 0.0 0 PrivateWages_22 0.0 0 PrivateWages_(Intercept) PrivateWages_gnp PrivateWages_gnpLag Consumption_2 0 0.0 0.0 Consumption_3 0 0.0 0.0 Consumption_4 0 0.0 0.0 Consumption_5 0 0.0 0.0 Consumption_6 0 0.0 0.0 Consumption_7 0 0.0 0.0 Consumption_8 0 0.0 0.0 Consumption_9 0 0.0 0.0 Consumption_11 0 0.0 0.0 Consumption_12 0 0.0 0.0 Consumption_13 0 0.0 0.0 Consumption_14 0 0.0 0.0 Consumption_15 0 0.0 0.0 Consumption_16 0 0.0 0.0 Consumption_17 0 0.0 0.0 Consumption_18 0 0.0 0.0 Consumption_19 0 0.0 0.0 Consumption_20 0 0.0 0.0 Consumption_21 0 0.0 0.0 Consumption_22 0 0.0 0.0 Investment_2 0 0.0 0.0 Investment_3 0 0.0 0.0 Investment_4 0 0.0 0.0 Investment_5 0 0.0 0.0 Investment_6 0 0.0 0.0 Investment_7 0 0.0 0.0 Investment_8 0 0.0 0.0 Investment_9 0 0.0 0.0 Investment_10 0 0.0 0.0 Investment_11 0 0.0 0.0 Investment_12 0 0.0 0.0 Investment_13 0 0.0 0.0 Investment_14 0 0.0 0.0 Investment_15 0 0.0 0.0 Investment_16 0 0.0 0.0 Investment_17 0 0.0 0.0 Investment_18 0 0.0 0.0 Investment_19 0 0.0 0.0 Investment_20 0 0.0 0.0 Investment_21 0 0.0 0.0 Investment_22 0 0.0 0.0 PrivateWages_2 1 45.6 44.9 PrivateWages_3 1 50.1 45.6 PrivateWages_4 1 57.2 50.1 PrivateWages_5 1 57.1 57.2 PrivateWages_6 1 61.0 57.1 PrivateWages_8 1 64.4 64.0 PrivateWages_9 1 64.5 64.4 PrivateWages_10 1 67.0 64.5 PrivateWages_11 1 61.2 67.0 PrivateWages_12 1 53.4 61.2 PrivateWages_13 1 44.3 53.4 PrivateWages_14 1 45.1 44.3 PrivateWages_15 1 49.7 45.1 PrivateWages_16 1 54.4 49.7 PrivateWages_17 1 62.7 54.4 PrivateWages_18 1 65.0 62.7 PrivateWages_19 1 60.9 65.0 PrivateWages_20 1 69.5 60.9 PrivateWages_21 1 75.7 69.5 PrivateWages_22 1 88.4 75.7 PrivateWages_trend Consumption_2 0 Consumption_3 0 Consumption_4 0 Consumption_5 0 Consumption_6 0 Consumption_7 0 Consumption_8 0 Consumption_9 0 Consumption_11 0 Consumption_12 0 Consumption_13 0 Consumption_14 0 Consumption_15 0 Consumption_16 0 Consumption_17 0 Consumption_18 0 Consumption_19 0 Consumption_20 0 Consumption_21 0 Consumption_22 0 Investment_2 0 Investment_3 0 Investment_4 0 Investment_5 0 Investment_6 0 Investment_7 0 Investment_8 0 Investment_9 0 Investment_10 0 Investment_11 0 Investment_12 0 Investment_13 0 Investment_14 0 Investment_15 0 Investment_16 0 Investment_17 0 Investment_18 0 Investment_19 0 Investment_20 0 Investment_21 0 Investment_22 0 PrivateWages_2 -10 PrivateWages_3 -9 PrivateWages_4 -8 PrivateWages_5 -7 PrivateWages_6 -6 PrivateWages_8 -4 PrivateWages_9 -3 PrivateWages_10 -2 PrivateWages_11 -1 PrivateWages_12 0 PrivateWages_13 1 PrivateWages_14 2 PrivateWages_15 3 PrivateWages_16 4 PrivateWages_17 5 PrivateWages_18 6 PrivateWages_19 7 PrivateWages_20 8 PrivateWages_21 9 PrivateWages_22 10 > nobs [1] 61 > linearHypothesis Linear hypothesis test (Theil's F test) Hypothesis: Consumption_corpProf + Investment_capitalLag = 0 Model 1: restricted model Model 2: kleinModel Res.Df Df F Pr(>F) 1 50 2 49 1 0.87 0.35 Linear hypothesis test (F statistic of a Wald test) Hypothesis: Consumption_corpProf + Investment_capitalLag = 0 Model 1: restricted model Model 2: kleinModel Res.Df Df F Pr(>F) 1 50 2 49 1 0.8 0.38 Linear hypothesis test (Chi^2 statistic of a Wald test) Hypothesis: Consumption_corpProf + Investment_capitalLag = 0 Model 1: restricted model Model 2: kleinModel Res.Df Df Chisq Pr(>Chisq) 1 50 2 49 1 0.8 0.37 Linear hypothesis test (Theil's F test) Hypothesis: Consumption_corpProf + Investment_capitalLag = 0 Consumption_corpProfLag - PrivateWages_trend = 0 Model 1: restricted model Model 2: kleinModel Res.Df Df F Pr(>F) 1 51 2 49 2 0.48 0.62 Linear hypothesis test (F statistic of a Wald test) Hypothesis: Consumption_corpProf + Investment_capitalLag = 0 Consumption_corpProfLag - PrivateWages_trend = 0 Model 1: restricted model Model 2: kleinModel Res.Df Df F Pr(>F) 1 51 2 49 2 0.43 0.65 Linear hypothesis test (Chi^2 statistic of a Wald test) Hypothesis: Consumption_corpProf + Investment_capitalLag = 0 Consumption_corpProfLag - PrivateWages_trend = 0 Model 1: restricted model Model 2: kleinModel Res.Df Df Chisq Pr(>Chisq) 1 51 2 49 2 0.87 0.65 > logLik 'log Lik.' -71.7 (df=13) 'log Lik.' -76.1 (df=13) compare log likelihood value with single-equation OLS [1] "Mean relative difference: 0.00159" > > # 2SLS Warning in systemfit(system, method = method, data = KleinI, inst = inst, : the estimation of systems of equations with unequal numbers of observations has not been thoroughly tested yet > summary systemfit results method: 2SLS N DF SSR detRCov OLS-R2 McElroy-R2 system 59 47 53.2 0.251 0.973 0.991 N DF SSR MSE RMSE R2 Adj R2 Consumption 19 15 20.49 1.366 1.17 0.978 0.973 Investment 20 16 23.02 1.438 1.20 0.901 0.883 PrivateWages 20 16 9.74 0.609 0.78 0.988 0.985 The covariance matrix of the residuals Consumption Investment PrivateWages Consumption 1.079 0.354 -0.383 Investment 0.354 1.047 0.107 PrivateWages -0.383 0.107 0.445 The correlations of the residuals Consumption Investment PrivateWages Consumption 1.000 0.335 -0.556 Investment 0.335 1.000 0.149 PrivateWages -0.556 0.149 1.000 2SLS estimates for 'Consumption' (equation 1) Model Formula: consump ~ corpProf + corpProfLag + wages Instruments: ~govExp + taxes + govWage + trend + capitalLag + corpProfLag + gnpLag Estimate Std. Error t value Pr(>|t|) (Intercept) 16.4657 1.3505 12.19 3.5e-09 *** corpProf 0.0243 0.1180 0.21 0.839 corpProfLag 0.1981 0.1087 1.82 0.088 . wages 0.8159 0.0420 19.45 4.7e-12 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.169 on 15 degrees of freedom Number of observations: 19 Degrees of Freedom: 15 SSR: 20.493 MSE: 1.366 Root MSE: 1.169 Multiple R-Squared: 0.978 Adjusted R-Squared: 0.973 2SLS estimates for 'Investment' (equation 2) Model Formula: invest ~ corpProf + corpProfLag + capitalLag Instruments: ~govExp + taxes + govWage + trend + capitalLag + corpProfLag + gnpLag Estimate Std. Error t value Pr(>|t|) (Intercept) 17.8425 6.5319 2.73 0.01478 * corpProf 0.2167 0.1478 1.47 0.16189 corpProfLag 0.5416 0.1415 3.83 0.00149 ** capitalLag -0.1455 0.0314 -4.63 0.00028 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.199 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 23.016 MSE: 1.438 Root MSE: 1.199 Multiple R-Squared: 0.901 Adjusted R-Squared: 0.883 2SLS estimates for 'PrivateWages' (equation 3) Model Formula: privWage ~ gnp + gnpLag + trend Instruments: ~govExp + taxes + govWage + trend + capitalLag + corpProfLag + gnpLag Estimate Std. Error t value Pr(>|t|) (Intercept) 1.3431 1.1250 1.19 0.24995 gnp 0.4438 0.0342 12.97 6.6e-10 *** gnpLag 0.1447 0.0371 3.90 0.00128 ** trend 0.1238 0.0292 4.24 0.00063 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 0.78 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 9.741 MSE: 0.609 Root MSE: 0.78 Multiple R-Squared: 0.988 Adjusted R-Squared: 0.985 > residuals Consumption Investment PrivateWages 1 NA NA NA 2 -0.39161 -1.0104 -1.3401 3 -0.60524 0.2478 0.2378 4 -1.24952 1.0621 1.1117 5 -0.17101 -1.4104 -0.1954 6 0.30841 0.4328 -0.5355 7 NA NA NA 8 1.50999 1.0463 -0.7908 9 1.39649 0.0674 0.2831 10 NA 1.7698 1.1353 11 -0.49339 -0.5912 -0.1765 12 -0.99824 -0.6318 0.6007 13 -1.27965 -0.6983 0.1443 14 0.55302 0.9724 0.4826 15 -0.14553 -0.1827 0.3016 16 -0.00773 0.1167 0.0261 17 1.97001 1.6266 -0.8614 18 -0.59152 -0.0525 0.9927 19 -0.21481 -3.0656 -0.4446 20 1.33575 0.1393 -0.3914 21 1.01443 -0.1305 -1.1115 22 -1.93986 0.2922 0.5312 > fitted Consumption Investment PrivateWages 1 NA NA NA 2 42.3 0.810 26.8 3 45.6 1.652 29.1 4 50.4 4.138 33.0 5 50.8 4.410 34.1 6 52.3 4.667 35.9 7 NA NA NA 8 54.7 3.154 38.7 9 55.9 2.933 38.9 10 NA 3.330 40.2 11 55.5 1.591 38.1 12 51.9 -2.768 33.9 13 46.9 -5.502 28.9 14 45.9 -6.072 28.0 15 48.8 -2.817 30.3 16 51.3 -1.417 33.2 17 55.7 0.473 37.7 18 59.3 2.053 40.0 19 57.7 1.166 38.6 20 60.3 1.161 42.0 21 64.0 3.431 46.1 22 71.6 4.608 52.8 > predict Consumption.pred Consumption.se.fit Consumption.lwr Consumption.upr 1 NA NA NA NA 2 42.3 0.483 41.3 43.3 3 45.6 0.586 44.4 46.9 4 50.4 0.390 49.6 51.3 5 50.8 0.456 49.8 51.7 6 52.3 0.463 51.3 53.3 7 NA NA NA NA 8 54.7 0.382 53.9 55.5 9 55.9 0.422 55.0 56.8 10 NA NA NA NA 11 55.5 0.742 53.9 57.1 12 51.9 0.600 50.6 53.2 13 46.9 0.770 45.2 48.5 14 45.9 0.635 44.6 47.3 15 48.8 0.383 48.0 49.7 16 51.3 0.339 50.6 52.0 17 55.7 0.410 54.9 56.6 18 59.3 0.336 58.6 60.0 19 57.7 0.418 56.8 58.6 20 60.3 0.481 59.2 61.3 21 64.0 0.462 63.0 65.0 22 71.6 0.706 70.1 73.1 Investment.pred Investment.se.fit Investment.lwr Investment.upr 1 NA NA NA NA 2 0.810 0.750 -0.77956 2.400 3 1.652 0.516 0.55883 2.746 4 4.138 0.487 3.10541 5.170 5 4.410 0.402 3.55860 5.262 6 4.667 0.377 3.86830 5.466 7 NA NA NA NA 8 3.154 0.312 2.49238 3.815 9 2.933 0.466 1.94478 3.920 10 3.330 0.512 2.24435 4.416 11 1.591 0.749 0.00249 3.180 12 -2.768 0.586 -4.01111 -1.525 13 -5.502 0.750 -7.09222 -3.911 14 -6.072 0.803 -7.77404 -4.371 15 -2.817 0.379 -3.62002 -2.015 16 -1.417 0.327 -2.10985 -0.723 17 0.473 0.436 -0.45046 1.397 18 2.053 0.272 1.47523 2.630 19 1.166 0.410 0.29710 2.034 20 1.161 0.491 0.12044 2.201 21 3.431 0.406 2.57004 4.291 22 4.608 0.578 3.38197 5.834 PrivateWages.pred PrivateWages.se.fit PrivateWages.lwr PrivateWages.upr 1 NA NA NA NA 2 26.8 0.313 26.2 27.5 3 29.1 0.325 28.4 29.8 4 33.0 0.344 32.3 33.7 5 34.1 0.246 33.6 34.6 6 35.9 0.254 35.4 36.5 7 NA NA NA NA 8 38.7 0.251 38.2 39.2 9 38.9 0.239 38.4 39.4 10 40.2 0.229 39.7 40.7 11 38.1 0.339 37.4 38.8 12 33.9 0.365 33.1 34.7 13 28.9 0.436 27.9 29.8 14 28.0 0.333 27.3 28.7 15 30.3 0.324 29.6 31.0 16 33.2 0.271 32.6 33.7 17 37.7 0.280 37.1 38.3 18 40.0 0.208 39.6 40.4 19 38.6 0.342 37.9 39.4 20 42.0 0.293 41.4 42.6 21 46.1 0.296 45.5 46.7 22 52.8 0.474 51.8 53.8 > model.frame consump corpProf corpProfLag wages invest capitalLag privWage gnp gnpLag 1 39.8 12.7 NA 31.0 2.7 180 28.8 44.9 NA 2 41.9 12.4 12.7 28.2 -0.2 183 25.5 45.6 44.9 3 45.0 16.9 12.4 32.2 1.9 183 29.3 50.1 45.6 4 49.2 18.4 16.9 37.0 5.2 184 34.1 57.2 50.1 5 50.6 19.4 18.4 37.0 3.0 190 33.9 57.1 57.2 6 52.6 20.1 19.4 38.6 5.1 193 35.4 61.0 57.1 7 55.1 19.6 20.1 40.7 5.6 198 37.4 64.0 NA 8 56.2 19.8 19.6 41.5 4.2 203 37.9 64.4 64.0 9 57.3 21.1 19.8 42.9 3.0 208 39.2 64.5 64.4 10 57.8 21.7 21.1 NA 5.1 211 41.3 67.0 64.5 11 55.0 15.6 21.7 42.1 1.0 216 37.9 61.2 67.0 12 50.9 11.4 15.6 39.3 -3.4 217 34.5 53.4 61.2 13 45.6 7.0 11.4 34.3 -6.2 213 29.0 44.3 53.4 14 46.5 11.2 7.0 34.1 -5.1 207 28.5 45.1 44.3 15 48.7 12.3 11.2 36.6 -3.0 202 30.6 49.7 45.1 16 51.3 14.0 12.3 39.3 -1.3 199 33.2 54.4 49.7 17 57.7 17.6 14.0 44.2 2.1 198 36.8 62.7 54.4 18 58.7 17.3 17.6 47.7 2.0 200 41.0 65.0 62.7 19 57.5 15.3 17.3 45.9 -1.9 202 38.2 60.9 65.0 20 61.6 19.0 15.3 49.4 1.3 200 41.6 69.5 60.9 21 65.0 21.1 19.0 53.0 3.3 201 45.0 75.7 69.5 22 69.7 23.5 21.1 61.8 4.9 204 53.3 88.4 75.7 trend 1 -11 2 -10 3 -9 4 -8 5 -7 6 -6 7 -5 8 -4 9 -3 10 -2 11 -1 12 0 13 1 14 2 15 3 16 4 17 5 18 6 19 7 20 8 21 9 22 10 > model.matrix [1] "Attributes: < Component \"dim\": Mean relative difference: 0.0328 >" [2] "Attributes: < Component \"dimnames\": Component 1: 54 string mismatches >" [3] "Numeric: lengths (732, 708) differ" > nobs [1] 59 > linearHypothesis Linear hypothesis test (Theil's F test) Hypothesis: Consumption_corpProf + Investment_capitalLag = 0 Model 1: restricted model Model 2: kleinModel Res.Df Df F Pr(>F) 1 48 2 47 1 0.87 0.36 Linear hypothesis test (F statistic of a Wald test) Hypothesis: Consumption_corpProf + Investment_capitalLag = 0 Model 1: restricted model Model 2: kleinModel Res.Df Df F Pr(>F) 1 48 2 47 1 0.98 0.33 Linear hypothesis test (Chi^2 statistic of a Wald test) Hypothesis: Consumption_corpProf + Investment_capitalLag = 0 Model 1: restricted model Model 2: kleinModel Res.Df Df Chisq Pr(>Chisq) 1 48 2 47 1 0.98 0.32 Linear hypothesis test (Theil's F test) Hypothesis: Consumption_corpProf + Investment_capitalLag = 0 Consumption_corpProfLag - PrivateWages_trend = 0 Model 1: restricted model Model 2: kleinModel Res.Df Df F Pr(>F) 1 49 2 47 2 0.43 0.65 Linear hypothesis test (F statistic of a Wald test) Hypothesis: Consumption_corpProf + Investment_capitalLag = 0 Consumption_corpProfLag - PrivateWages_trend = 0 Model 1: restricted model Model 2: kleinModel Res.Df Df F Pr(>F) 1 49 2 47 2 0.49 0.61 Linear hypothesis test (Chi^2 statistic of a Wald test) Hypothesis: Consumption_corpProf + Investment_capitalLag = 0 Consumption_corpProfLag - PrivateWages_trend = 0 Model 1: restricted model Model 2: kleinModel Res.Df Df Chisq Pr(>Chisq) 1 49 2 47 2 0.98 0.61 > logLik 'log Lik.' -71.5 (df=13) 'log Lik.' -78.7 (df=13) > > # SUR Warning in systemfit(system, method = method, data = KleinI, methodResidCov = ifelse(method == : the estimation of systems of equations with unequal numbers of observations has not been thoroughly tested yet > summary systemfit results method: SUR N DF SSR detRCov OLS-R2 McElroy-R2 system 61 49 45.4 0.151 0.977 0.992 N DF SSR MSE RMSE R2 Adj R2 Consumption 20 16 17.6 1.102 1.050 0.981 0.977 Investment 21 17 17.5 1.029 1.015 0.931 0.918 PrivateWages 20 16 10.3 0.643 0.802 0.987 0.985 The covariance matrix of the residuals used for estimation Consumption Investment PrivateWages Consumption 0.8871 0.0268 -0.349 Investment 0.0268 0.7328 0.103 PrivateWages -0.3492 0.1029 0.444 The covariance matrix of the residuals Consumption Investment PrivateWages Consumption 0.8852 0.0508 -0.406 Investment 0.0508 0.7313 0.161 PrivateWages -0.4063 0.1609 0.467 The correlations of the residuals Consumption Investment PrivateWages Consumption 1.000 0.065 -0.635 Investment 0.065 1.000 0.262 PrivateWages -0.635 0.262 1.000 SUR estimates for 'Consumption' (equation 1) Model Formula: consump ~ corpProf + corpProfLag + wages Estimate Std. Error t value Pr(>|t|) (Intercept) 16.0876 1.2010 13.39 4.1e-10 *** corpProf 0.2173 0.0799 2.72 0.015 * corpProfLag 0.0694 0.0793 0.88 0.394 wages 0.7975 0.0360 22.15 2.0e-13 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.05 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 17.63 MSE: 1.102 Root MSE: 1.05 Multiple R-Squared: 0.981 Adjusted R-Squared: 0.977 SUR estimates for 'Investment' (equation 2) Model Formula: invest ~ corpProf + corpProfLag + capitalLag Estimate Std. Error t value Pr(>|t|) (Intercept) 12.3518 4.5615 2.71 0.01493 * corpProf 0.4511 0.0814 5.54 3.6e-05 *** corpProfLag 0.3570 0.0846 4.22 0.00058 *** capitalLag -0.1225 0.0223 -5.49 4.0e-05 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.015 on 17 degrees of freedom Number of observations: 21 Degrees of Freedom: 17 SSR: 17.5 MSE: 1.029 Root MSE: 1.015 Multiple R-Squared: 0.931 Adjusted R-Squared: 0.918 SUR estimates for 'PrivateWages' (equation 3) Model Formula: privWage ~ gnp + gnpLag + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 1.3964 1.0825 1.29 0.22 gnp 0.4177 0.0269 15.55 4.4e-11 *** gnpLag 0.1709 0.0306 5.59 4.0e-05 *** trend 0.1467 0.0272 5.40 5.9e-05 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 0.802 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 10.284 MSE: 0.643 Root MSE: 0.802 Multiple R-Squared: 0.987 Adjusted R-Squared: 0.985 > residuals Consumption Investment PrivateWages 1 NA NA NA 2 -0.2529 -0.2920 -1.15193 3 -1.2998 -0.1392 0.50193 4 -1.5662 1.1106 1.42026 5 -0.4876 -1.4391 -0.09801 6 0.0149 0.3556 -0.35678 7 0.9002 1.4558 NA 8 1.3535 0.8299 -0.74964 9 1.0406 -0.5136 0.29355 10 NA 1.2191 1.18544 11 0.4417 0.2810 -0.36558 12 -0.0892 0.0754 0.33733 13 -0.1541 0.3429 -0.17490 14 0.2984 0.3597 0.39941 15 -0.0260 -0.1602 0.29441 16 -0.0250 0.0130 -0.00177 17 1.5671 1.0231 -0.81891 18 -0.4089 0.0306 0.85516 19 0.2819 -2.6153 -0.77184 20 0.9257 -0.6030 -0.41040 21 0.7415 -0.7118 -1.21679 22 -2.2437 -0.5398 0.57166 > fitted Consumption Investment PrivateWages 1 NA NA NA 2 42.2 0.092 26.7 3 46.3 2.039 28.8 4 50.8 4.089 32.7 5 51.1 4.439 34.0 6 52.6 4.744 35.8 7 54.2 4.144 NA 8 54.8 3.370 38.6 9 56.3 3.514 38.9 10 NA 3.881 40.1 11 54.6 0.719 38.3 12 51.0 -3.475 34.2 13 45.8 -6.543 29.2 14 46.2 -5.460 28.1 15 48.7 -2.840 30.3 16 51.3 -1.313 33.2 17 56.1 1.077 37.6 18 59.1 1.969 40.1 19 57.2 0.715 39.0 20 60.7 1.903 42.0 21 64.3 4.012 46.2 22 71.9 5.440 52.7 > predict Consumption.pred Consumption.se.fit Consumption.lwr Consumption.upr 1 NA NA NA NA 2 42.2 0.422 41.3 43.0 3 46.3 0.462 45.4 47.2 4 50.8 0.309 50.1 51.4 5 51.1 0.359 50.4 51.8 6 52.6 0.362 51.9 53.3 7 54.2 0.328 53.5 54.9 8 54.8 0.300 54.2 55.4 9 56.3 0.323 55.6 56.9 10 NA NA NA NA 11 54.6 0.531 53.5 55.6 12 51.0 0.427 50.1 51.8 13 45.8 0.564 44.6 46.9 14 46.2 0.543 45.1 47.3 15 48.7 0.341 48.0 49.4 16 51.3 0.302 50.7 51.9 17 56.1 0.328 55.5 56.8 18 59.1 0.294 58.5 59.7 19 57.2 0.332 56.6 57.9 20 60.7 0.392 59.9 61.5 21 64.3 0.394 63.5 65.0 22 71.9 0.615 70.7 73.2 Investment.pred Investment.se.fit Investment.lwr Investment.upr 1 NA NA NA NA 2 0.092 0.508 -0.929 1.113 3 2.039 0.421 1.193 2.885 4 4.089 0.376 3.333 4.846 5 4.439 0.311 3.813 5.065 6 4.744 0.294 4.154 5.335 7 4.144 0.277 3.587 4.701 8 3.370 0.247 2.873 3.867 9 3.514 0.328 2.855 4.172 10 3.881 0.376 3.126 4.636 11 0.719 0.508 -0.301 1.739 12 -3.475 0.428 -4.336 -2.615 13 -6.543 0.521 -7.590 -5.496 14 -5.460 0.583 -6.632 -4.288 15 -2.840 0.316 -3.474 -2.205 16 -1.313 0.271 -1.857 -0.769 17 1.077 0.293 0.488 1.666 18 1.969 0.205 1.557 2.382 19 0.715 0.263 0.187 1.244 20 1.903 0.309 1.283 2.523 21 4.012 0.280 3.449 4.574 22 5.440 0.389 4.659 6.221 PrivateWages.pred PrivateWages.se.fit PrivateWages.lwr PrivateWages.upr 1 NA NA NA NA 2 26.7 0.306 26.0 27.3 3 28.8 0.305 28.2 29.4 4 32.7 0.302 32.1 33.3 5 34.0 0.231 33.5 34.5 6 35.8 0.230 35.3 36.2 7 NA NA NA NA 8 38.6 0.233 38.2 39.1 9 38.9 0.222 38.5 39.4 10 40.1 0.213 39.7 40.5 11 38.3 0.292 37.7 38.9 12 34.2 0.300 33.6 34.8 13 29.2 0.361 28.4 29.9 14 28.1 0.322 27.5 28.7 15 30.3 0.314 29.7 30.9 16 33.2 0.263 32.7 33.7 17 37.6 0.256 37.1 38.1 18 40.1 0.204 39.7 40.6 19 39.0 0.298 38.4 39.6 20 42.0 0.272 41.5 42.6 21 46.2 0.288 45.6 46.8 22 52.7 0.431 51.9 53.6 > model.frame [1] TRUE > model.matrix [1] TRUE > nobs [1] 61 > linearHypothesis Linear hypothesis test (Theil's F test) Hypothesis: Consumption_corpProf + Investment_capitalLag = 0 Model 1: restricted model Model 2: kleinModel Res.Df Df F Pr(>F) 1 50 2 49 1 1.01 0.32 Linear hypothesis test (F statistic of a Wald test) Hypothesis: Consumption_corpProf + Investment_capitalLag = 0 Model 1: restricted model Model 2: kleinModel Res.Df Df F Pr(>F) 1 50 2 49 1 1.3 0.26 Linear hypothesis test (Chi^2 statistic of a Wald test) Hypothesis: Consumption_corpProf + Investment_capitalLag = 0 Model 1: restricted model Model 2: kleinModel Res.Df Df Chisq Pr(>Chisq) 1 50 2 49 1 1.3 0.25 Linear hypothesis test (Theil's F test) Hypothesis: Consumption_corpProf + Investment_capitalLag = 0 Consumption_corpProfLag - PrivateWages_trend = 0 Model 1: restricted model Model 2: kleinModel Res.Df Df F Pr(>F) 1 51 2 49 2 0.53 0.59 Linear hypothesis test (F statistic of a Wald test) Hypothesis: Consumption_corpProf + Investment_capitalLag = 0 Consumption_corpProfLag - PrivateWages_trend = 0 Model 1: restricted model Model 2: kleinModel Res.Df Df F Pr(>F) 1 51 2 49 2 0.69 0.51 Linear hypothesis test (Chi^2 statistic of a Wald test) Hypothesis: Consumption_corpProf + Investment_capitalLag = 0 Consumption_corpProfLag - PrivateWages_trend = 0 Model 1: restricted model Model 2: kleinModel Res.Df Df Chisq Pr(>Chisq) 1 51 2 49 2 1.38 0.5 > logLik 'log Lik.' -69.6 (df=18) 'log Lik.' -76.9 (df=18) > > # 3SLS Warning in systemfit(system, method = method, data = KleinI, inst = inst, : the estimation of systems of equations with unequal numbers of observations has not been thoroughly tested yet > summary systemfit results method: 3SLS N DF SSR detRCov OLS-R2 McElroy-R2 system 59 47 59.5 0.241 0.97 0.994 N DF SSR MSE RMSE R2 Adj R2 Consumption 19 15 18.1 1.203 1.097 0.980 0.977 Investment 20 16 31.1 1.945 1.395 0.866 0.841 PrivateWages 20 16 10.3 0.645 0.803 0.987 0.985 The covariance matrix of the residuals used for estimation Consumption Investment PrivateWages Consumption 1.079 0.354 -0.383 Investment 0.354 1.047 0.107 PrivateWages -0.383 0.107 0.445 The covariance matrix of the residuals Consumption Investment PrivateWages Consumption 0.950 0.324 -0.395 Investment 0.324 1.385 0.242 PrivateWages -0.395 0.242 0.475 The correlations of the residuals Consumption Investment PrivateWages Consumption 1.000 0.293 -0.582 Investment 0.293 1.000 0.292 PrivateWages -0.582 0.292 1.000 3SLS estimates for 'Consumption' (equation 1) Model Formula: consump ~ corpProf + corpProfLag + wages Instruments: ~govExp + taxes + govWage + trend + capitalLag + corpProfLag + gnpLag Estimate Std. Error t value Pr(>|t|) (Intercept) 16.5606 1.3295 12.46 2.6e-09 *** corpProf 0.1100 0.1098 1.00 0.33 corpProfLag 0.1155 0.1007 1.15 0.27 wages 0.8086 0.0401 20.18 2.8e-12 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.097 on 15 degrees of freedom Number of observations: 19 Degrees of Freedom: 15 SSR: 18.051 MSE: 1.203 Root MSE: 1.097 Multiple R-Squared: 0.98 Adjusted R-Squared: 0.977 3SLS estimates for 'Investment' (equation 2) Model Formula: invest ~ corpProf + corpProfLag + capitalLag Instruments: ~govExp + taxes + govWage + trend + capitalLag + corpProfLag + gnpLag Estimate Std. Error t value Pr(>|t|) (Intercept) 23.6871 6.1159 3.87 0.00135 ** corpProf 0.1072 0.1414 0.76 0.45918 corpProfLag 0.6278 0.1361 4.61 0.00029 *** capitalLag -0.1726 0.0295 -5.85 2.5e-05 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.395 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 31.126 MSE: 1.945 Root MSE: 1.395 Multiple R-Squared: 0.866 Adjusted R-Squared: 0.841 3SLS estimates for 'PrivateWages' (equation 3) Model Formula: privWage ~ gnp + gnpLag + trend Instruments: ~govExp + taxes + govWage + trend + capitalLag + corpProfLag + gnpLag Estimate Std. Error t value Pr(>|t|) (Intercept) 1.3603 1.0927 1.24 0.23109 gnp 0.4117 0.0315 13.06 6.0e-10 *** gnpLag 0.1782 0.0336 5.31 7.1e-05 *** trend 0.1370 0.0280 4.89 0.00016 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 0.803 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 10.318 MSE: 0.645 Root MSE: 0.803 Multiple R-Squared: 0.987 Adjusted R-Squared: 0.985 > residuals Consumption Investment PrivateWages 1 NA NA NA 2 -0.29542 -1.636 -1.2658 3 -0.89033 0.135 0.4198 4 -1.25669 0.777 1.3578 5 -0.14000 -1.574 -0.2036 6 0.37365 0.341 -0.4283 7 NA NA NA 8 1.63850 1.194 -0.8319 9 1.44030 0.454 0.2186 10 NA 2.192 1.1346 11 0.17274 -0.750 -0.4603 12 -0.49629 -0.698 0.2476 13 -0.78384 -0.976 -0.2528 14 0.32420 1.365 0.4028 15 -0.10364 -0.170 0.3295 16 -0.00105 0.140 0.0377 17 1.84421 1.862 -0.7540 18 -0.36893 -0.103 0.8827 19 0.14129 -3.255 -0.7764 20 1.23511 0.475 -0.3230 21 1.06553 0.152 -1.1453 22 -1.85709 0.746 0.6843 > fitted Consumption Investment PrivateWages 1 NA NA NA 2 42.2 1.436 26.8 3 45.9 1.765 28.9 4 50.5 4.423 32.7 5 50.7 4.574 34.1 6 52.2 4.759 35.8 7 NA NA NA 8 54.6 3.006 38.7 9 55.9 2.546 39.0 10 NA 2.908 40.2 11 54.8 1.750 38.4 12 51.4 -2.702 34.3 13 46.4 -5.224 29.3 14 46.2 -6.465 28.1 15 48.8 -2.830 30.3 16 51.3 -1.440 33.2 17 55.9 0.238 37.6 18 59.1 2.103 40.1 19 57.4 1.355 39.0 20 60.4 0.825 41.9 21 63.9 3.148 46.1 22 71.6 4.154 52.6 > predict Consumption.pred Consumption.se.fit Consumption.lwr Consumption.upr 1 NA NA NA NA 2 42.2 0.475 39.6 44.7 3 45.9 0.557 43.3 48.5 4 50.5 0.372 48.0 52.9 5 50.7 0.433 48.2 53.3 6 52.2 0.438 49.7 54.7 7 NA NA NA NA 8 54.6 0.362 52.1 57.0 9 55.9 0.401 53.4 58.3 10 NA NA NA NA 11 54.8 0.684 52.1 57.6 12 51.4 0.563 48.8 54.0 13 46.4 0.733 43.6 49.2 14 46.2 0.612 43.5 48.9 15 48.8 0.379 46.3 51.3 16 51.3 0.334 48.9 53.7 17 55.9 0.394 53.4 58.3 18 59.1 0.322 56.6 61.5 19 57.4 0.392 54.9 59.8 20 60.4 0.462 57.8 62.9 21 63.9 0.448 61.4 66.5 22 71.6 0.686 68.8 74.3 Investment.pred Investment.se.fit Investment.lwr Investment.upr 1 NA NA NA NA 2 1.436 0.709 -1.8811 4.754 3 1.765 0.512 -1.3848 4.915 4 4.423 0.470 1.3027 7.543 5 4.574 0.392 1.5029 7.645 6 4.759 0.370 1.7000 7.818 7 NA NA NA NA 8 3.006 0.306 -0.0214 6.033 9 2.546 0.444 -0.5575 5.649 10 2.908 0.488 -0.2245 6.041 11 1.750 0.738 -1.5953 5.096 12 -2.702 0.583 -5.9068 0.503 13 -5.224 0.743 -8.5738 -1.874 14 -6.465 0.780 -9.8530 -3.077 15 -2.830 0.378 -5.8936 0.233 16 -1.440 0.326 -4.4762 1.597 17 0.238 0.426 -2.8533 3.329 18 2.103 0.268 -0.9077 5.114 19 1.355 0.399 -1.7201 4.431 20 0.825 0.474 -2.2981 3.947 21 3.148 0.393 0.0761 6.220 22 4.154 0.555 0.9719 7.336 PrivateWages.pred PrivateWages.se.fit PrivateWages.lwr PrivateWages.upr 1 NA NA NA NA 2 26.8 0.309 24.9 28.6 3 28.9 0.315 27.1 30.7 4 32.7 0.326 30.9 34.6 5 34.1 0.236 32.3 35.9 6 35.8 0.244 34.0 37.6 7 NA NA NA NA 8 38.7 0.237 37.0 40.5 9 39.0 0.225 37.2 40.7 10 40.2 0.219 38.4 41.9 11 38.4 0.309 36.5 40.2 12 34.3 0.336 32.4 36.1 13 29.3 0.411 27.3 31.2 14 28.1 0.326 26.3 29.9 15 30.3 0.313 28.4 32.1 16 33.2 0.262 31.4 35.0 17 37.6 0.265 35.8 39.3 18 40.1 0.205 38.4 41.9 19 39.0 0.323 37.1 40.8 20 41.9 0.282 40.1 43.7 21 46.1 0.293 44.3 48.0 22 52.6 0.463 50.7 54.6 > model.frame [1] TRUE > model.matrix [1] "Attributes: < Component \"dim\": Mean relative difference: 0.0328 >" [2] "Attributes: < Component \"dimnames\": Component 1: 54 string mismatches >" [3] "Numeric: lengths (732, 708) differ" > nobs [1] 59 > linearHypothesis Linear hypothesis test (Theil's F test) Hypothesis: Consumption_corpProf + Investment_capitalLag = 0 Model 1: restricted model Model 2: kleinModel Res.Df Df F Pr(>F) 1 48 2 47 1 0.23 0.64 Linear hypothesis test (F statistic of a Wald test) Hypothesis: Consumption_corpProf + Investment_capitalLag = 0 Model 1: restricted model Model 2: kleinModel Res.Df Df F Pr(>F) 1 48 2 47 1 0.31 0.58 Linear hypothesis test (Chi^2 statistic of a Wald test) Hypothesis: Consumption_corpProf + Investment_capitalLag = 0 Model 1: restricted model Model 2: kleinModel Res.Df Df Chisq Pr(>Chisq) 1 48 2 47 1 0.31 0.58 Linear hypothesis test (Theil's F test) Hypothesis: Consumption_corpProf + Investment_capitalLag = 0 Consumption_corpProfLag - PrivateWages_trend = 0 Model 1: restricted model Model 2: kleinModel Res.Df Df F Pr(>F) 1 49 2 47 2 0.5 0.61 Linear hypothesis test (F statistic of a Wald test) Hypothesis: Consumption_corpProf + Investment_capitalLag = 0 Consumption_corpProfLag - PrivateWages_trend = 0 Model 1: restricted model Model 2: kleinModel Res.Df Df F Pr(>F) 1 49 2 47 2 0.68 0.51 Linear hypothesis test (Chi^2 statistic of a Wald test) Hypothesis: Consumption_corpProf + Investment_capitalLag = 0 Consumption_corpProfLag - PrivateWages_trend = 0 Model 1: restricted model Model 2: kleinModel Res.Df Df Chisq Pr(>Chisq) 1 49 2 47 2 1.37 0.5 > logLik 'log Lik.' -71 (df=18) 'log Lik.' -81.1 (df=18) > > # I3SLS Warning in systemfit(system, method = method, data = KleinI, inst = inst, : the estimation of systems of equations with unequal numbers of observations has not been thoroughly tested yet > summary systemfit results method: iterated 3SLS convergence achieved after 15 iterations N DF SSR detRCov OLS-R2 McElroy-R2 system 59 47 81.3 0.349 0.958 0.995 N DF SSR MSE RMSE R2 Adj R2 Consumption 19 15 18.1 1.209 1.100 0.980 0.976 Investment 20 16 52.0 3.250 1.803 0.776 0.735 PrivateWages 20 16 11.2 0.699 0.836 0.986 0.983 The covariance matrix of the residuals used for estimation Consumption Investment PrivateWages Consumption 0.955 0.456 -0.421 Investment 0.456 2.294 0.375 PrivateWages -0.421 0.375 0.522 The covariance matrix of the residuals Consumption Investment PrivateWages Consumption 0.955 0.456 -0.421 Investment 0.456 2.294 0.375 PrivateWages -0.421 0.375 0.522 The correlations of the residuals Consumption Investment PrivateWages Consumption 1.000 0.322 -0.582 Investment 0.322 1.000 0.341 PrivateWages -0.582 0.341 1.000 3SLS estimates for 'Consumption' (equation 1) Model Formula: consump ~ corpProf + corpProfLag + wages Instruments: ~govExp + taxes + govWage + trend + capitalLag + corpProfLag + gnpLag Estimate Std. Error t value Pr(>|t|) (Intercept) 16.8311 1.2489 13.48 8.7e-10 *** corpProf 0.1468 0.0991 1.48 0.16 corpProfLag 0.0924 0.0906 1.02 0.32 wages 0.7945 0.0371 21.43 1.2e-12 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.1 on 15 degrees of freedom Number of observations: 19 Degrees of Freedom: 15 SSR: 18.14 MSE: 1.209 Root MSE: 1.1 Multiple R-Squared: 0.98 Adjusted R-Squared: 0.976 3SLS estimates for 'Investment' (equation 2) Model Formula: invest ~ corpProf + corpProfLag + capitalLag Instruments: ~govExp + taxes + govWage + trend + capitalLag + corpProfLag + gnpLag Estimate Std. Error t value Pr(>|t|) (Intercept) 32.4128 8.2695 3.92 0.00122 ** corpProf -0.0799 0.1934 -0.41 0.68498 corpProfLag 0.7607 0.1878 4.05 0.00093 *** capitalLag -0.2114 0.0400 -5.29 7.4e-05 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.803 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 51.999 MSE: 3.25 Root MSE: 1.803 Multiple R-Squared: 0.776 Adjusted R-Squared: 0.735 3SLS estimates for 'PrivateWages' (equation 3) Model Formula: privWage ~ gnp + gnpLag + trend Instruments: ~govExp + taxes + govWage + trend + capitalLag + corpProfLag + gnpLag Estimate Std. Error t value Pr(>|t|) (Intercept) 1.5421 1.1496 1.34 0.19852 gnp 0.3936 0.0313 12.57 1.0e-09 *** gnpLag 0.1945 0.0328 5.93 2.1e-05 *** trend 0.1416 0.0286 4.95 0.00014 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 0.836 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 11.181 MSE: 0.699 Root MSE: 0.836 Multiple R-Squared: 0.986 Adjusted R-Squared: 0.983 > residuals Consumption Investment PrivateWages 1 NA NA NA 2 -0.3309 -2.6308 -1.3061 3 -1.0419 0.0146 0.4450 4 -1.2918 0.4128 1.4338 5 -0.1772 -1.7488 -0.2494 6 0.3563 0.2807 -0.4066 7 NA NA NA 8 1.6778 1.4671 -0.8700 9 1.4561 1.1068 0.1712 10 NA 2.9002 1.1262 11 0.4237 -1.0652 -0.6189 12 -0.2711 -0.9488 0.0375 13 -0.5643 -1.6241 -0.5055 14 0.2845 1.8477 0.3080 15 -0.0514 -0.2379 0.3003 16 0.0521 0.1268 0.0141 17 1.8733 2.2462 -0.7083 18 -0.1962 -0.1724 0.8305 19 0.3553 -3.5810 -0.9448 20 1.3161 1.0343 -0.2738 21 1.2055 0.6622 -1.1283 22 -1.6327 1.5541 0.8257 > fitted Consumption Investment PrivateWages 1 NA NA NA 2 42.2 2.431 26.8 3 46.0 1.885 28.9 4 50.5 4.787 32.7 5 50.8 4.749 34.1 6 52.2 4.819 35.8 7 NA NA NA 8 54.5 2.733 38.8 9 55.8 1.893 39.0 10 NA 2.200 40.2 11 54.6 2.065 38.5 12 51.2 -2.451 34.5 13 46.2 -4.576 29.5 14 46.2 -6.948 28.2 15 48.8 -2.762 30.3 16 51.2 -1.427 33.2 17 55.8 -0.146 37.5 18 58.9 2.172 40.2 19 57.1 1.681 39.1 20 60.3 0.266 41.9 21 63.8 2.638 46.1 22 71.3 3.346 52.5 > predict Consumption.pred Consumption.se.fit Consumption.lwr Consumption.upr 1 NA NA NA NA 2 42.2 0.446 41.3 43.1 3 46.0 0.511 45.0 47.1 4 50.5 0.340 49.8 51.2 5 50.8 0.393 50.0 51.6 6 52.2 0.396 51.4 53.0 7 NA NA NA NA 8 54.5 0.326 53.9 55.2 9 55.8 0.362 55.1 56.6 10 NA NA NA NA 11 54.6 0.612 53.3 55.8 12 51.2 0.511 50.1 52.2 13 46.2 0.671 44.8 47.5 14 46.2 0.563 45.1 47.3 15 48.8 0.354 48.0 49.5 16 51.2 0.311 50.6 51.9 17 55.8 0.362 55.1 56.6 18 58.9 0.297 58.3 59.5 19 57.1 0.357 56.4 57.9 20 60.3 0.427 59.4 61.1 21 63.8 0.416 63.0 64.6 22 71.3 0.640 70.0 72.6 Investment.pred Investment.se.fit Investment.lwr Investment.upr 1 NA NA NA NA 2 2.431 0.970 0.4798 4.382 3 1.885 0.745 0.3859 3.385 4 4.787 0.664 3.4506 6.124 5 4.749 0.562 3.6174 5.880 6 4.819 0.537 3.7391 5.900 7 NA NA NA NA 8 2.733 0.446 1.8351 3.631 9 1.893 0.620 0.6455 3.141 10 2.200 0.684 0.8232 3.576 11 2.065 1.055 -0.0569 4.187 12 -2.451 0.845 -4.1517 -0.751 13 -4.576 1.070 -6.7293 -2.423 14 -6.948 1.103 -9.1676 -4.728 15 -2.762 0.556 -3.8806 -1.644 16 -1.427 0.480 -2.3919 -0.462 17 -0.146 0.603 -1.3588 1.066 18 2.172 0.390 1.3869 2.958 19 1.681 0.563 0.5476 2.815 20 0.266 0.661 -1.0634 1.595 21 2.638 0.558 1.5144 3.761 22 3.346 0.778 1.7808 4.911 PrivateWages.pred PrivateWages.se.fit PrivateWages.lwr PrivateWages.upr 1 NA NA NA NA 2 26.8 0.326 26.2 27.5 3 28.9 0.328 28.2 29.5 4 32.7 0.334 32.0 33.3 5 34.1 0.242 33.7 34.6 6 35.8 0.252 35.3 36.3 7 NA NA NA NA 8 38.8 0.244 38.3 39.3 9 39.0 0.232 38.6 39.5 10 40.2 0.230 39.7 40.6 11 38.5 0.308 37.9 39.1 12 34.5 0.336 33.8 35.1 13 29.5 0.420 28.7 30.4 14 28.2 0.345 27.5 28.9 15 30.3 0.325 29.6 31.0 16 33.2 0.271 32.6 33.7 17 37.5 0.267 37.0 38.0 18 40.2 0.218 39.7 40.6 19 39.1 0.331 38.5 39.8 20 41.9 0.289 41.3 42.5 21 46.1 0.311 45.5 46.8 22 52.5 0.485 51.5 53.5 > model.frame [1] TRUE > model.matrix [1] "Attributes: < Component \"dim\": Mean relative difference: 0.0328 >" [2] "Attributes: < Component \"dimnames\": Component 1: 54 string mismatches >" [3] "Numeric: lengths (732, 708) differ" > nobs [1] 59 > linearHypothesis Linear hypothesis test (Theil's F test) Hypothesis: Consumption_corpProf + Investment_capitalLag = 0 Model 1: restricted model Model 2: kleinModel Res.Df Df F Pr(>F) 1 48 2 47 1 0.28 0.6 Linear hypothesis test (F statistic of a Wald test) Hypothesis: Consumption_corpProf + Investment_capitalLag = 0 Model 1: restricted model Model 2: kleinModel Res.Df Df F Pr(>F) 1 48 2 47 1 0.37 0.55 Linear hypothesis test (Chi^2 statistic of a Wald test) Hypothesis: Consumption_corpProf + Investment_capitalLag = 0 Model 1: restricted model Model 2: kleinModel Res.Df Df Chisq Pr(>Chisq) 1 48 2 47 1 0.37 0.54 Linear hypothesis test (Theil's F test) Hypothesis: Consumption_corpProf + Investment_capitalLag = 0 Consumption_corpProfLag - PrivateWages_trend = 0 Model 1: restricted model Model 2: kleinModel Res.Df Df F Pr(>F) 1 49 2 47 2 1.25 0.3 Linear hypothesis test (F statistic of a Wald test) Hypothesis: Consumption_corpProf + Investment_capitalLag = 0 Consumption_corpProfLag - PrivateWages_trend = 0 Model 1: restricted model Model 2: kleinModel Res.Df Df F Pr(>F) 1 49 2 47 2 1.64 0.21 Linear hypothesis test (Chi^2 statistic of a Wald test) Hypothesis: Consumption_corpProf + Investment_capitalLag = 0 Consumption_corpProfLag - PrivateWages_trend = 0 Model 1: restricted model Model 2: kleinModel Res.Df Df Chisq Pr(>Chisq) 1 49 2 47 2 3.28 0.19 > logLik 'log Lik.' -74.5 (df=18) 'log Lik.' -87.1 (df=18) > > # OLS Warning in systemfit(system, method = method, data = KleinI, methodResidCov = ifelse(method == : the estimation of systems of equations with unequal numbers of observations has not been thoroughly tested yet > summary systemfit results method: OLS N DF SSR detRCov OLS-R2 McElroy-R2 system 59 47 44.2 0.453 0.976 0.99 N DF SSR MSE RMSE R2 Adj R2 Consumption 19 15 17.36 1.157 1.08 0.980 0.976 Investment 20 16 17.11 1.069 1.03 0.912 0.895 PrivateWages 20 16 9.74 0.609 0.78 0.988 0.985 The covariance matrix of the residuals Consumption Investment PrivateWages Consumption 1.1939 0.0559 -0.474 Investment 0.0559 0.9839 0.140 PrivateWages -0.4745 0.1403 0.602 The correlations of the residuals Consumption Investment PrivateWages Consumption 1.0000 0.0447 -0.568 Investment 0.0447 1.0000 0.169 PrivateWages -0.5680 0.1689 1.000 OLS estimates for 'Consumption' (equation 1) Model Formula: consump ~ corpProf + corpProfLag + wages Estimate Std. Error t value Pr(>|t|) (Intercept) 16.2957 1.4879 10.95 1.5e-08 *** corpProf 0.1796 0.1162 1.55 0.14 corpProfLag 0.1032 0.0994 1.04 0.32 wages 0.7962 0.0433 18.39 1.1e-11 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.076 on 15 degrees of freedom Number of observations: 19 Degrees of Freedom: 15 SSR: 17.362 MSE: 1.157 Root MSE: 1.076 Multiple R-Squared: 0.98 Adjusted R-Squared: 0.976 OLS estimates for 'Investment' (equation 2) Model Formula: invest ~ corpProf + corpProfLag + capitalLag Estimate Std. Error t value Pr(>|t|) (Intercept) 10.1813 5.3720 1.90 0.07627 . corpProf 0.5003 0.1052 4.75 0.00022 *** corpProfLag 0.3259 0.1003 3.25 0.00502 ** capitalLag -0.1134 0.0265 -4.28 0.00057 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.034 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 17.109 MSE: 1.069 Root MSE: 1.034 Multiple R-Squared: 0.912 Adjusted R-Squared: 0.895 OLS estimates for 'PrivateWages' (equation 3) Model Formula: privWage ~ gnp + gnpLag + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 1.3550 1.3021 1.04 0.3135 gnp 0.4417 0.0330 13.40 4.1e-10 *** gnpLag 0.1466 0.0379 3.87 0.0013 ** trend 0.1244 0.0335 3.72 0.0019 ** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 0.78 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 9.739 MSE: 0.609 Root MSE: 0.78 Multiple R-Squared: 0.988 Adjusted R-Squared: 0.985 compare coef with single-equation OLS [1] TRUE > residuals Consumption Investment PrivateWages 1 NA NA NA 2 -0.3863 -0.000301 -1.3389 3 -1.2484 -0.076489 0.2462 4 -1.6040 1.221792 1.1255 5 -0.5384 -1.377872 -0.1959 6 -0.0413 0.386104 -0.5284 7 0.8043 1.486279 NA 8 1.2830 0.784055 -0.7909 9 1.0142 -0.655354 0.2819 10 NA 1.060871 1.1384 11 0.1429 0.395249 -0.1904 12 -0.3439 0.198005 0.5813 13 NA NA 0.1206 14 0.3199 0.312725 0.4773 15 -0.1016 -0.084685 0.3035 16 -0.0702 0.066194 0.0284 17 1.6064 0.963697 -0.8517 18 -0.4980 0.078506 0.9908 19 0.1253 -2.496401 -0.4597 20 0.9805 -0.711004 -0.3819 21 0.7551 -0.820172 -1.1062 22 -2.1992 -0.731199 0.5501 > fitted Consumption Investment PrivateWages 1 NA NA NA 2 42.3 -0.200 26.8 3 46.2 1.976 29.1 4 50.8 3.978 33.0 5 51.1 4.378 34.1 6 52.6 4.714 35.9 7 54.3 4.114 NA 8 54.9 3.416 38.7 9 56.3 3.655 38.9 10 NA 4.039 40.2 11 54.9 0.605 38.1 12 51.2 -3.598 33.9 13 NA NA 28.9 14 46.2 -5.413 28.0 15 48.8 -2.915 30.3 16 51.4 -1.366 33.2 17 56.1 1.136 37.7 18 59.2 1.921 40.0 19 57.4 0.596 38.7 20 60.6 2.011 42.0 21 64.2 4.120 46.1 22 71.9 5.631 52.7 > predict Consumption.pred Consumption.se.fit Consumption.lwr Consumption.upr 1 NA NA NA NA 2 42.3 0.523 39.9 44.7 3 46.2 0.560 43.8 48.7 4 50.8 0.379 48.5 53.1 5 51.1 0.448 48.8 53.5 6 52.6 0.457 50.3 55.0 7 54.3 0.408 52.0 56.6 8 54.9 0.375 52.6 57.2 9 56.3 0.418 54.0 58.6 10 NA NA NA NA 11 54.9 0.701 52.3 57.4 12 51.2 0.638 48.7 53.8 13 NA NA NA NA 14 46.2 0.673 43.6 48.7 15 48.8 0.453 46.5 51.2 16 51.4 0.384 49.1 53.7 17 56.1 0.391 53.8 58.4 18 59.2 0.361 56.9 61.5 19 57.4 0.449 55.0 59.7 20 60.6 0.465 58.3 63.0 21 64.2 0.468 61.9 66.6 22 71.9 0.728 69.3 74.5 Investment.pred Investment.se.fit Investment.lwr Investment.upr 1 NA NA NA NA 2 -0.200 0.613 -2.618 2.219 3 1.976 0.494 -0.329 4.282 4 3.978 0.444 1.714 6.242 5 4.378 0.369 2.169 6.587 6 4.714 0.349 2.519 6.909 7 4.114 0.323 1.934 6.293 8 3.416 0.287 1.257 5.575 9 3.655 0.386 1.435 5.876 10 4.039 0.441 1.777 6.301 11 0.605 0.641 -1.843 3.053 12 -3.598 0.606 -6.010 -1.186 13 NA NA NA NA 14 -5.413 0.708 -7.934 -2.892 15 -2.915 0.412 -5.155 -0.676 16 -1.366 0.336 -3.554 0.821 17 1.136 0.342 -1.055 3.327 18 1.921 0.246 -0.217 4.060 19 0.596 0.341 -1.594 2.787 20 2.011 0.364 -0.194 4.216 21 4.120 0.337 1.932 6.308 22 5.631 0.477 3.341 7.922 PrivateWages.pred PrivateWages.se.fit PrivateWages.lwr PrivateWages.upr 1 NA NA NA NA 2 26.8 0.364 25.1 28.6 3 29.1 0.367 27.3 30.8 4 33.0 0.370 31.2 34.7 5 34.1 0.286 32.4 35.8 6 35.9 0.285 34.3 37.6 7 NA NA NA NA 8 38.7 0.292 37.0 40.4 9 38.9 0.277 37.3 40.6 10 40.2 0.264 38.5 41.8 11 38.1 0.363 36.4 39.8 12 33.9 0.367 32.2 35.7 13 28.9 0.435 27.1 30.7 14 28.0 0.383 26.3 29.8 15 30.3 0.377 28.6 32.0 16 33.2 0.315 31.5 34.9 17 37.7 0.308 36.0 39.3 18 40.0 0.241 38.4 41.7 19 38.7 0.361 36.9 40.4 20 42.0 0.324 40.3 43.7 21 46.1 0.339 44.4 47.8 22 52.7 0.511 50.9 54.6 > model.frame consump corpProf corpProfLag wages invest capitalLag privWage gnp gnpLag 1 39.8 12.7 NA 31.0 2.7 180 28.8 44.9 NA 2 41.9 12.4 12.7 28.2 -0.2 183 25.5 45.6 44.9 3 45.0 16.9 12.4 32.2 1.9 183 29.3 50.1 45.6 4 49.2 18.4 16.9 37.0 5.2 184 34.1 57.2 50.1 5 50.6 19.4 18.4 37.0 3.0 190 33.9 57.1 57.2 6 52.6 20.1 19.4 38.6 5.1 193 35.4 61.0 57.1 7 55.1 19.6 20.1 40.7 5.6 198 37.4 64.0 NA 8 56.2 19.8 19.6 41.5 4.2 203 37.9 64.4 64.0 9 57.3 21.1 19.8 42.9 3.0 208 39.2 64.5 64.4 10 57.8 21.7 21.1 NA 5.1 211 41.3 67.0 64.5 11 55.0 15.6 21.7 42.1 1.0 216 37.9 61.2 67.0 12 50.9 11.4 15.6 39.3 -3.4 217 34.5 53.4 61.2 13 45.6 NA 11.4 34.3 -6.2 213 29.0 44.3 53.4 14 46.5 11.2 7.0 34.1 -5.1 207 28.5 45.1 44.3 15 48.7 12.3 11.2 36.6 -3.0 202 30.6 49.7 45.1 16 51.3 14.0 12.3 39.3 -1.3 199 33.2 54.4 49.7 17 57.7 17.6 14.0 44.2 2.1 198 36.8 62.7 54.4 18 58.7 17.3 17.6 47.7 2.0 200 41.0 65.0 62.7 19 57.5 15.3 17.3 45.9 -1.9 202 38.2 60.9 65.0 20 61.6 19.0 15.3 49.4 1.3 200 41.6 69.5 60.9 21 65.0 21.1 19.0 53.0 3.3 201 45.0 75.7 69.5 22 69.7 23.5 21.1 61.8 4.9 204 53.3 88.4 75.7 trend 1 -11 2 -10 3 -9 4 -8 5 -7 6 -6 7 -5 8 -4 9 -3 10 -2 11 -1 12 0 13 1 14 2 15 3 16 4 17 5 18 6 19 7 20 8 21 9 22 10 > model.matrix Consumption_(Intercept) Consumption_corpProf Consumption_2 1 12.4 Consumption_3 1 16.9 Consumption_4 1 18.4 Consumption_5 1 19.4 Consumption_6 1 20.1 Consumption_7 1 19.6 Consumption_8 1 19.8 Consumption_9 1 21.1 Consumption_11 1 15.6 Consumption_12 1 11.4 Consumption_14 1 11.2 Consumption_15 1 12.3 Consumption_16 1 14.0 Consumption_17 1 17.6 Consumption_18 1 17.3 Consumption_19 1 15.3 Consumption_20 1 19.0 Consumption_21 1 21.1 Consumption_22 1 23.5 Investment_2 0 0.0 Investment_3 0 0.0 Investment_4 0 0.0 Investment_5 0 0.0 Investment_6 0 0.0 Investment_7 0 0.0 Investment_8 0 0.0 Investment_9 0 0.0 Investment_10 0 0.0 Investment_11 0 0.0 Investment_12 0 0.0 Investment_14 0 0.0 Investment_15 0 0.0 Investment_16 0 0.0 Investment_17 0 0.0 Investment_18 0 0.0 Investment_19 0 0.0 Investment_20 0 0.0 Investment_21 0 0.0 Investment_22 0 0.0 PrivateWages_2 0 0.0 PrivateWages_3 0 0.0 PrivateWages_4 0 0.0 PrivateWages_5 0 0.0 PrivateWages_6 0 0.0 PrivateWages_8 0 0.0 PrivateWages_9 0 0.0 PrivateWages_10 0 0.0 PrivateWages_11 0 0.0 PrivateWages_12 0 0.0 PrivateWages_13 0 0.0 PrivateWages_14 0 0.0 PrivateWages_15 0 0.0 PrivateWages_16 0 0.0 PrivateWages_17 0 0.0 PrivateWages_18 0 0.0 PrivateWages_19 0 0.0 PrivateWages_20 0 0.0 PrivateWages_21 0 0.0 PrivateWages_22 0 0.0 Consumption_corpProfLag Consumption_wages Consumption_2 12.7 28.2 Consumption_3 12.4 32.2 Consumption_4 16.9 37.0 Consumption_5 18.4 37.0 Consumption_6 19.4 38.6 Consumption_7 20.1 40.7 Consumption_8 19.6 41.5 Consumption_9 19.8 42.9 Consumption_11 21.7 42.1 Consumption_12 15.6 39.3 Consumption_14 7.0 34.1 Consumption_15 11.2 36.6 Consumption_16 12.3 39.3 Consumption_17 14.0 44.2 Consumption_18 17.6 47.7 Consumption_19 17.3 45.9 Consumption_20 15.3 49.4 Consumption_21 19.0 53.0 Consumption_22 21.1 61.8 Investment_2 0.0 0.0 Investment_3 0.0 0.0 Investment_4 0.0 0.0 Investment_5 0.0 0.0 Investment_6 0.0 0.0 Investment_7 0.0 0.0 Investment_8 0.0 0.0 Investment_9 0.0 0.0 Investment_10 0.0 0.0 Investment_11 0.0 0.0 Investment_12 0.0 0.0 Investment_14 0.0 0.0 Investment_15 0.0 0.0 Investment_16 0.0 0.0 Investment_17 0.0 0.0 Investment_18 0.0 0.0 Investment_19 0.0 0.0 Investment_20 0.0 0.0 Investment_21 0.0 0.0 Investment_22 0.0 0.0 PrivateWages_2 0.0 0.0 PrivateWages_3 0.0 0.0 PrivateWages_4 0.0 0.0 PrivateWages_5 0.0 0.0 PrivateWages_6 0.0 0.0 PrivateWages_8 0.0 0.0 PrivateWages_9 0.0 0.0 PrivateWages_10 0.0 0.0 PrivateWages_11 0.0 0.0 PrivateWages_12 0.0 0.0 PrivateWages_13 0.0 0.0 PrivateWages_14 0.0 0.0 PrivateWages_15 0.0 0.0 PrivateWages_16 0.0 0.0 PrivateWages_17 0.0 0.0 PrivateWages_18 0.0 0.0 PrivateWages_19 0.0 0.0 PrivateWages_20 0.0 0.0 PrivateWages_21 0.0 0.0 PrivateWages_22 0.0 0.0 Investment_(Intercept) Investment_corpProf Consumption_2 0 0.0 Consumption_3 0 0.0 Consumption_4 0 0.0 Consumption_5 0 0.0 Consumption_6 0 0.0 Consumption_7 0 0.0 Consumption_8 0 0.0 Consumption_9 0 0.0 Consumption_11 0 0.0 Consumption_12 0 0.0 Consumption_14 0 0.0 Consumption_15 0 0.0 Consumption_16 0 0.0 Consumption_17 0 0.0 Consumption_18 0 0.0 Consumption_19 0 0.0 Consumption_20 0 0.0 Consumption_21 0 0.0 Consumption_22 0 0.0 Investment_2 1 12.4 Investment_3 1 16.9 Investment_4 1 18.4 Investment_5 1 19.4 Investment_6 1 20.1 Investment_7 1 19.6 Investment_8 1 19.8 Investment_9 1 21.1 Investment_10 1 21.7 Investment_11 1 15.6 Investment_12 1 11.4 Investment_14 1 11.2 Investment_15 1 12.3 Investment_16 1 14.0 Investment_17 1 17.6 Investment_18 1 17.3 Investment_19 1 15.3 Investment_20 1 19.0 Investment_21 1 21.1 Investment_22 1 23.5 PrivateWages_2 0 0.0 PrivateWages_3 0 0.0 PrivateWages_4 0 0.0 PrivateWages_5 0 0.0 PrivateWages_6 0 0.0 PrivateWages_8 0 0.0 PrivateWages_9 0 0.0 PrivateWages_10 0 0.0 PrivateWages_11 0 0.0 PrivateWages_12 0 0.0 PrivateWages_13 0 0.0 PrivateWages_14 0 0.0 PrivateWages_15 0 0.0 PrivateWages_16 0 0.0 PrivateWages_17 0 0.0 PrivateWages_18 0 0.0 PrivateWages_19 0 0.0 PrivateWages_20 0 0.0 PrivateWages_21 0 0.0 PrivateWages_22 0 0.0 Investment_corpProfLag Investment_capitalLag Consumption_2 0.0 0 Consumption_3 0.0 0 Consumption_4 0.0 0 Consumption_5 0.0 0 Consumption_6 0.0 0 Consumption_7 0.0 0 Consumption_8 0.0 0 Consumption_9 0.0 0 Consumption_11 0.0 0 Consumption_12 0.0 0 Consumption_14 0.0 0 Consumption_15 0.0 0 Consumption_16 0.0 0 Consumption_17 0.0 0 Consumption_18 0.0 0 Consumption_19 0.0 0 Consumption_20 0.0 0 Consumption_21 0.0 0 Consumption_22 0.0 0 Investment_2 12.7 183 Investment_3 12.4 183 Investment_4 16.9 184 Investment_5 18.4 190 Investment_6 19.4 193 Investment_7 20.1 198 Investment_8 19.6 203 Investment_9 19.8 208 Investment_10 21.1 211 Investment_11 21.7 216 Investment_12 15.6 217 Investment_14 7.0 207 Investment_15 11.2 202 Investment_16 12.3 199 Investment_17 14.0 198 Investment_18 17.6 200 Investment_19 17.3 202 Investment_20 15.3 200 Investment_21 19.0 201 Investment_22 21.1 204 PrivateWages_2 0.0 0 PrivateWages_3 0.0 0 PrivateWages_4 0.0 0 PrivateWages_5 0.0 0 PrivateWages_6 0.0 0 PrivateWages_8 0.0 0 PrivateWages_9 0.0 0 PrivateWages_10 0.0 0 PrivateWages_11 0.0 0 PrivateWages_12 0.0 0 PrivateWages_13 0.0 0 PrivateWages_14 0.0 0 PrivateWages_15 0.0 0 PrivateWages_16 0.0 0 PrivateWages_17 0.0 0 PrivateWages_18 0.0 0 PrivateWages_19 0.0 0 PrivateWages_20 0.0 0 PrivateWages_21 0.0 0 PrivateWages_22 0.0 0 PrivateWages_(Intercept) PrivateWages_gnp PrivateWages_gnpLag Consumption_2 0 0.0 0.0 Consumption_3 0 0.0 0.0 Consumption_4 0 0.0 0.0 Consumption_5 0 0.0 0.0 Consumption_6 0 0.0 0.0 Consumption_7 0 0.0 0.0 Consumption_8 0 0.0 0.0 Consumption_9 0 0.0 0.0 Consumption_11 0 0.0 0.0 Consumption_12 0 0.0 0.0 Consumption_14 0 0.0 0.0 Consumption_15 0 0.0 0.0 Consumption_16 0 0.0 0.0 Consumption_17 0 0.0 0.0 Consumption_18 0 0.0 0.0 Consumption_19 0 0.0 0.0 Consumption_20 0 0.0 0.0 Consumption_21 0 0.0 0.0 Consumption_22 0 0.0 0.0 Investment_2 0 0.0 0.0 Investment_3 0 0.0 0.0 Investment_4 0 0.0 0.0 Investment_5 0 0.0 0.0 Investment_6 0 0.0 0.0 Investment_7 0 0.0 0.0 Investment_8 0 0.0 0.0 Investment_9 0 0.0 0.0 Investment_10 0 0.0 0.0 Investment_11 0 0.0 0.0 Investment_12 0 0.0 0.0 Investment_14 0 0.0 0.0 Investment_15 0 0.0 0.0 Investment_16 0 0.0 0.0 Investment_17 0 0.0 0.0 Investment_18 0 0.0 0.0 Investment_19 0 0.0 0.0 Investment_20 0 0.0 0.0 Investment_21 0 0.0 0.0 Investment_22 0 0.0 0.0 PrivateWages_2 1 45.6 44.9 PrivateWages_3 1 50.1 45.6 PrivateWages_4 1 57.2 50.1 PrivateWages_5 1 57.1 57.2 PrivateWages_6 1 61.0 57.1 PrivateWages_8 1 64.4 64.0 PrivateWages_9 1 64.5 64.4 PrivateWages_10 1 67.0 64.5 PrivateWages_11 1 61.2 67.0 PrivateWages_12 1 53.4 61.2 PrivateWages_13 1 44.3 53.4 PrivateWages_14 1 45.1 44.3 PrivateWages_15 1 49.7 45.1 PrivateWages_16 1 54.4 49.7 PrivateWages_17 1 62.7 54.4 PrivateWages_18 1 65.0 62.7 PrivateWages_19 1 60.9 65.0 PrivateWages_20 1 69.5 60.9 PrivateWages_21 1 75.7 69.5 PrivateWages_22 1 88.4 75.7 PrivateWages_trend Consumption_2 0 Consumption_3 0 Consumption_4 0 Consumption_5 0 Consumption_6 0 Consumption_7 0 Consumption_8 0 Consumption_9 0 Consumption_11 0 Consumption_12 0 Consumption_14 0 Consumption_15 0 Consumption_16 0 Consumption_17 0 Consumption_18 0 Consumption_19 0 Consumption_20 0 Consumption_21 0 Consumption_22 0 Investment_2 0 Investment_3 0 Investment_4 0 Investment_5 0 Investment_6 0 Investment_7 0 Investment_8 0 Investment_9 0 Investment_10 0 Investment_11 0 Investment_12 0 Investment_14 0 Investment_15 0 Investment_16 0 Investment_17 0 Investment_18 0 Investment_19 0 Investment_20 0 Investment_21 0 Investment_22 0 PrivateWages_2 -10 PrivateWages_3 -9 PrivateWages_4 -8 PrivateWages_5 -7 PrivateWages_6 -6 PrivateWages_8 -4 PrivateWages_9 -3 PrivateWages_10 -2 PrivateWages_11 -1 PrivateWages_12 0 PrivateWages_13 1 PrivateWages_14 2 PrivateWages_15 3 PrivateWages_16 4 PrivateWages_17 5 PrivateWages_18 6 PrivateWages_19 7 PrivateWages_20 8 PrivateWages_21 9 PrivateWages_22 10 > nobs [1] 59 > linearHypothesis Linear hypothesis test (Theil's F test) Hypothesis: Consumption_corpProf + Investment_capitalLag = 0 Model 1: restricted model Model 2: kleinModel Res.Df Df F Pr(>F) 1 48 2 47 1 0.33 0.57 Linear hypothesis test (F statistic of a Wald test) Hypothesis: Consumption_corpProf + Investment_capitalLag = 0 Model 1: restricted model Model 2: kleinModel Res.Df Df F Pr(>F) 1 48 2 47 1 0.31 0.58 Linear hypothesis test (Chi^2 statistic of a Wald test) Hypothesis: Consumption_corpProf + Investment_capitalLag = 0 Model 1: restricted model Model 2: kleinModel Res.Df Df Chisq Pr(>Chisq) 1 48 2 47 1 0.31 0.58 Linear hypothesis test (Theil's F test) Hypothesis: Consumption_corpProf + Investment_capitalLag = 0 Consumption_corpProfLag - PrivateWages_trend = 0 Model 1: restricted model Model 2: kleinModel Res.Df Df F Pr(>F) 1 49 2 47 2 0.17 0.84 Linear hypothesis test (F statistic of a Wald test) Hypothesis: Consumption_corpProf + Investment_capitalLag = 0 Consumption_corpProfLag - PrivateWages_trend = 0 Model 1: restricted model Model 2: kleinModel Res.Df Df F Pr(>F) 1 49 2 47 2 0.16 0.85 Linear hypothesis test (Chi^2 statistic of a Wald test) Hypothesis: Consumption_corpProf + Investment_capitalLag = 0 Consumption_corpProfLag - PrivateWages_trend = 0 Model 1: restricted model Model 2: kleinModel Res.Df Df Chisq Pr(>Chisq) 1 49 2 47 2 0.33 0.85 > logLik 'log Lik.' -69.6 (df=13) 'log Lik.' -74.2 (df=13) compare log likelihood value with single-equation OLS [1] "Mean relative difference: 0.00099" > > # 2SLS Warning in systemfit(system, method = method, data = KleinI, inst = inst, : the estimation of systems of equations with unequal numbers of observations has not been thoroughly tested yet > summary systemfit results method: 2SLS N DF SSR detRCov OLS-R2 McElroy-R2 system 57 45 58.2 0.333 0.968 0.991 N DF SSR MSE RMSE R2 Adj R2 Consumption 18 14 22.27 1.591 1.26 0.974 0.968 Investment 19 15 26.21 1.748 1.32 0.852 0.823 PrivateWages 20 16 9.74 0.609 0.78 0.988 0.985 The covariance matrix of the residuals Consumption Investment PrivateWages Consumption 1.237 0.518 -0.408 Investment 0.518 1.263 0.113 PrivateWages -0.408 0.113 0.468 The correlations of the residuals Consumption Investment PrivateWages Consumption 1.000 0.416 -0.538 Investment 0.416 1.000 0.139 PrivateWages -0.538 0.139 1.000 2SLS estimates for 'Consumption' (equation 1) Model Formula: consump ~ corpProf + corpProfLag + wages Instruments: ~govExp + taxes + govWage + trend + capitalLag + corpProfLag + gnpLag Estimate Std. Error t value Pr(>|t|) (Intercept) 17.2849 1.6018 10.79 3.6e-08 *** corpProf -0.0770 0.1637 -0.47 0.645 corpProfLag 0.2327 0.1242 1.87 0.082 . wages 0.8259 0.0459 17.98 4.5e-11 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.261 on 14 degrees of freedom Number of observations: 18 Degrees of Freedom: 14 SSR: 22.269 MSE: 1.591 Root MSE: 1.261 Multiple R-Squared: 0.974 Adjusted R-Squared: 0.968 2SLS estimates for 'Investment' (equation 2) Model Formula: invest ~ corpProf + corpProfLag + capitalLag Instruments: ~govExp + taxes + govWage + trend + capitalLag + corpProfLag + gnpLag Estimate Std. Error t value Pr(>|t|) (Intercept) 18.4005 7.1627 2.57 0.02138 * corpProf 0.1507 0.1905 0.79 0.44118 corpProfLag 0.5757 0.1634 3.52 0.00307 ** capitalLag -0.1452 0.0339 -4.28 0.00065 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.322 on 15 degrees of freedom Number of observations: 19 Degrees of Freedom: 15 SSR: 26.213 MSE: 1.748 Root MSE: 1.322 Multiple R-Squared: 0.852 Adjusted R-Squared: 0.823 2SLS estimates for 'PrivateWages' (equation 3) Model Formula: privWage ~ gnp + gnpLag + trend Instruments: ~govExp + taxes + govWage + trend + capitalLag + corpProfLag + gnpLag Estimate Std. Error t value Pr(>|t|) (Intercept) 1.3431 1.1544 1.16 0.26172 gnp 0.4438 0.0351 12.64 9.7e-10 *** gnpLag 0.1447 0.0381 3.80 0.00158 ** trend 0.1238 0.0300 4.13 0.00078 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 0.78 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 9.741 MSE: 0.609 Root MSE: 0.78 Multiple R-Squared: 0.988 Adjusted R-Squared: 0.985 > residuals Consumption Investment PrivateWages 1 NA NA NA 2 -0.6754 -1.23599 -1.3401 3 -0.4627 0.32957 0.2378 4 -1.1585 1.08894 1.1117 5 -0.0305 -1.37017 -0.1954 6 0.4693 0.48431 -0.5355 7 NA NA NA 8 1.6045 1.06811 -0.7908 9 1.6018 0.16695 0.2831 10 NA 1.86380 1.1353 11 -0.9031 -0.92183 -0.1765 12 -1.5948 -1.03217 0.6007 13 NA NA 0.1443 14 0.2854 0.85468 0.4826 15 -0.4718 -0.36943 0.3016 16 -0.2268 0.00554 0.0261 17 2.0079 1.69566 -0.8614 18 -0.7434 -0.12659 0.9927 19 -0.5410 -3.26209 -0.4446 20 1.4186 0.25579 -0.3914 21 1.1462 -0.00185 -1.1115 22 -1.7256 0.50679 0.5312 > fitted Consumption Investment PrivateWages 1 NA NA NA 2 42.6 1.036 26.8 3 45.5 1.570 29.1 4 50.4 4.111 33.0 5 50.6 4.370 34.1 6 52.1 4.616 35.9 7 NA NA NA 8 54.6 3.132 38.7 9 55.7 2.833 38.9 10 NA 3.236 40.2 11 55.9 1.922 38.1 12 52.5 -2.368 33.9 13 NA NA 28.9 14 46.2 -5.955 28.0 15 49.2 -2.631 30.3 16 51.5 -1.306 33.2 17 55.7 0.404 37.7 18 59.4 2.127 40.0 19 58.0 1.362 38.6 20 60.2 1.044 42.0 21 63.9 3.302 46.1 22 71.4 4.393 52.8 > predict Consumption.pred Consumption.se.fit Consumption.lwr Consumption.upr 1 NA NA NA NA 2 42.6 0.571 41.4 43.8 3 45.5 0.656 44.1 46.9 4 50.4 0.431 49.4 51.3 5 50.6 0.510 49.5 51.7 6 52.1 0.521 51.0 53.2 7 NA NA NA NA 8 54.6 0.419 53.7 55.5 9 55.7 0.496 54.6 56.8 10 NA NA NA NA 11 55.9 0.910 54.0 57.9 12 52.5 0.869 50.6 54.4 13 NA NA NA NA 14 46.2 0.694 44.7 47.7 15 49.2 0.487 48.1 50.2 16 51.5 0.396 50.7 52.4 17 55.7 0.445 54.7 56.6 18 59.4 0.386 58.6 60.3 19 58.0 0.548 56.9 59.2 20 60.2 0.528 59.0 61.3 21 63.9 0.515 62.8 65.0 22 71.4 0.786 69.7 73.1 Investment.pred Investment.se.fit Investment.lwr Investment.upr 1 NA NA NA NA 2 1.036 0.892 -0.865 2.937 3 1.570 0.579 0.335 2.805 4 4.111 0.531 2.979 5.243 5 4.370 0.440 3.432 5.308 6 4.616 0.416 3.729 5.502 7 NA NA NA NA 8 3.132 0.344 2.398 3.866 9 2.833 0.533 1.696 3.970 10 3.236 0.580 2.000 4.473 11 1.922 0.959 -0.122 3.966 12 -2.368 0.860 -4.201 -0.534 13 NA NA NA NA 14 -5.955 0.865 -7.799 -4.110 15 -2.631 0.479 -3.652 -1.610 16 -1.306 0.382 -2.120 -0.491 17 0.404 0.487 -0.635 1.443 18 2.127 0.319 1.447 2.806 19 1.362 0.537 0.218 2.506 20 1.044 0.566 -0.162 2.250 21 3.302 0.486 2.265 4.339 22 4.393 0.713 2.874 5.912 PrivateWages.pred PrivateWages.se.fit PrivateWages.lwr PrivateWages.upr 1 NA NA NA NA 2 26.8 0.321 26.2 27.5 3 29.1 0.334 28.4 29.8 4 33.0 0.353 32.2 33.7 5 34.1 0.253 33.6 34.6 6 35.9 0.261 35.4 36.5 7 NA NA NA NA 8 38.7 0.257 38.1 39.2 9 38.9 0.245 38.4 39.4 10 40.2 0.235 39.7 40.7 11 38.1 0.348 37.3 38.8 12 33.9 0.374 33.1 34.7 13 28.9 0.447 27.9 29.8 14 28.0 0.341 27.3 28.7 15 30.3 0.333 29.6 31.0 16 33.2 0.278 32.6 33.8 17 37.7 0.288 37.1 38.3 18 40.0 0.214 39.6 40.5 19 38.6 0.351 37.9 39.4 20 42.0 0.301 41.4 42.6 21 46.1 0.304 45.5 46.8 22 52.8 0.486 51.7 53.8 > model.frame consump corpProf corpProfLag wages invest capitalLag privWage gnp gnpLag 1 39.8 12.7 NA 31.0 2.7 180 28.8 44.9 NA 2 41.9 12.4 12.7 28.2 -0.2 183 25.5 45.6 44.9 3 45.0 16.9 12.4 32.2 1.9 183 29.3 50.1 45.6 4 49.2 18.4 16.9 37.0 5.2 184 34.1 57.2 50.1 5 50.6 19.4 18.4 37.0 3.0 190 33.9 57.1 57.2 6 52.6 20.1 19.4 38.6 5.1 193 35.4 61.0 57.1 7 55.1 19.6 20.1 40.7 5.6 198 37.4 64.0 NA 8 56.2 19.8 19.6 41.5 4.2 203 37.9 64.4 64.0 9 57.3 21.1 19.8 42.9 3.0 208 39.2 64.5 64.4 10 57.8 21.7 21.1 NA 5.1 211 41.3 67.0 64.5 11 55.0 15.6 21.7 42.1 1.0 216 37.9 61.2 67.0 12 50.9 11.4 15.6 39.3 -3.4 217 34.5 53.4 61.2 13 45.6 NA 11.4 34.3 -6.2 213 29.0 44.3 53.4 14 46.5 11.2 7.0 34.1 -5.1 207 28.5 45.1 44.3 15 48.7 12.3 11.2 36.6 -3.0 202 30.6 49.7 45.1 16 51.3 14.0 12.3 39.3 -1.3 199 33.2 54.4 49.7 17 57.7 17.6 14.0 44.2 2.1 198 36.8 62.7 54.4 18 58.7 17.3 17.6 47.7 2.0 200 41.0 65.0 62.7 19 57.5 15.3 17.3 45.9 -1.9 202 38.2 60.9 65.0 20 61.6 19.0 15.3 49.4 1.3 200 41.6 69.5 60.9 21 65.0 21.1 19.0 53.0 3.3 201 45.0 75.7 69.5 22 69.7 23.5 21.1 61.8 4.9 204 53.3 88.4 75.7 trend 1 -11 2 -10 3 -9 4 -8 5 -7 6 -6 7 -5 8 -4 9 -3 10 -2 11 -1 12 0 13 1 14 2 15 3 16 4 17 5 18 6 19 7 20 8 21 9 22 10 > model.matrix [1] "Attributes: < Component \"dim\": Mean relative difference: 0.0339 >" [2] "Attributes: < Component \"dimnames\": Component 1: 52 string mismatches >" [3] "Numeric: lengths (708, 684) differ" > nobs [1] 57 > linearHypothesis Linear hypothesis test (Theil's F test) Hypothesis: Consumption_corpProf + Investment_capitalLag = 0 Model 1: restricted model Model 2: kleinModel Res.Df Df F Pr(>F) 1 46 2 45 1 1.37 0.25 Linear hypothesis test (F statistic of a Wald test) Hypothesis: Consumption_corpProf + Investment_capitalLag = 0 Model 1: restricted model Model 2: kleinModel Res.Df Df F Pr(>F) 1 46 2 45 1 1.77 0.19 Linear hypothesis test (Chi^2 statistic of a Wald test) Hypothesis: Consumption_corpProf + Investment_capitalLag = 0 Model 1: restricted model Model 2: kleinModel Res.Df Df Chisq Pr(>Chisq) 1 46 2 45 1 1.77 0.18 Linear hypothesis test (Theil's F test) Hypothesis: Consumption_corpProf + Investment_capitalLag = 0 Consumption_corpProfLag - PrivateWages_trend = 0 Model 1: restricted model Model 2: kleinModel Res.Df Df F Pr(>F) 1 47 2 45 2 0.69 0.51 Linear hypothesis test (F statistic of a Wald test) Hypothesis: Consumption_corpProf + Investment_capitalLag = 0 Consumption_corpProfLag - PrivateWages_trend = 0 Model 1: restricted model Model 2: kleinModel Res.Df Df F Pr(>F) 1 47 2 45 2 0.89 0.42 Linear hypothesis test (Chi^2 statistic of a Wald test) Hypothesis: Consumption_corpProf + Investment_capitalLag = 0 Consumption_corpProfLag - PrivateWages_trend = 0 Model 1: restricted model Model 2: kleinModel Res.Df Df Chisq Pr(>Chisq) 1 47 2 45 2 1.78 0.41 > logLik 'log Lik.' -70.6 (df=13) 'log Lik.' -78.7 (df=13) > > # SUR Warning in systemfit(system, method = method, data = KleinI, methodResidCov = ifelse(method == : the estimation of systems of equations with unequal numbers of observations has not been thoroughly tested yet > summary systemfit results method: SUR N DF SSR detRCov OLS-R2 McElroy-R2 system 59 47 45.1 0.168 0.976 0.992 N DF SSR MSE RMSE R2 Adj R2 Consumption 19 15 17.5 1.167 1.080 0.980 0.975 Investment 20 16 17.3 1.083 1.041 0.911 0.894 PrivateWages 20 16 10.3 0.642 0.801 0.987 0.985 The covariance matrix of the residuals used for estimation Consumption Investment PrivateWages Consumption 0.9286 0.0435 -0.369 Investment 0.0435 0.7653 0.109 PrivateWages -0.3690 0.1091 0.468 The covariance matrix of the residuals Consumption Investment PrivateWages Consumption 0.9251 0.0748 -0.427 Investment 0.0748 0.7653 0.171 PrivateWages -0.4268 0.1706 0.492 The correlations of the residuals Consumption Investment PrivateWages Consumption 1.0000 0.0888 -0.636 Investment 0.0888 1.0000 0.268 PrivateWages -0.6364 0.2678 1.000 SUR estimates for 'Consumption' (equation 1) Model Formula: consump ~ corpProf + corpProfLag + wages Estimate Std. Error t value Pr(>|t|) (Intercept) 16.2684 1.2781 12.73 1.9e-09 *** corpProf 0.1942 0.0927 2.10 0.054 . corpProfLag 0.0746 0.0819 0.91 0.377 wages 0.8011 0.0372 21.53 1.1e-12 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.08 on 15 degrees of freedom Number of observations: 19 Degrees of Freedom: 15 SSR: 17.501 MSE: 1.167 Root MSE: 1.08 Multiple R-Squared: 0.98 Adjusted R-Squared: 0.975 SUR estimates for 'Investment' (equation 2) Model Formula: invest ~ corpProf + corpProfLag + capitalLag Estimate Std. Error t value Pr(>|t|) (Intercept) 12.6462 4.6500 2.72 0.01515 * corpProf 0.4707 0.0916 5.14 9.9e-05 *** corpProfLag 0.3519 0.0874 4.03 0.00097 *** capitalLag -0.1253 0.0229 -5.47 5.1e-05 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.041 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 17.325 MSE: 1.083 Root MSE: 1.041 Multiple R-Squared: 0.911 Adjusted R-Squared: 0.894 SUR estimates for 'PrivateWages' (equation 3) Model Formula: privWage ~ gnp + gnpLag + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 1.3245 1.0946 1.21 0.24 gnp 0.4184 0.0260 16.08 2.7e-11 *** gnpLag 0.1714 0.0307 5.59 4.1e-05 *** trend 0.1455 0.0276 5.27 7.6e-05 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 0.801 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 10.265 MSE: 0.642 Root MSE: 0.801 Multiple R-Squared: 0.987 Adjusted R-Squared: 0.985 > residuals Consumption Investment PrivateWages 1 NA NA NA 2 -0.3146 -0.2419 -1.1439 3 -1.2707 -0.1795 0.5080 4 -1.5428 1.0691 1.4208 5 -0.4489 -1.4778 -0.1000 6 0.0588 0.3168 -0.3599 7 0.9215 1.4450 NA 8 1.3791 0.8287 -0.7561 9 1.0901 -0.5272 0.2880 10 NA 1.2089 1.1795 11 0.3577 0.4081 -0.3681 12 -0.2286 0.2569 0.3439 13 NA NA -0.1574 14 0.2172 0.4743 0.4225 15 -0.1124 -0.0607 0.3154 16 -0.0876 0.0761 0.0151 17 1.5611 1.0205 -0.8084 18 -0.4529 0.0580 0.8611 19 0.1999 -2.5444 -0.7635 20 0.9266 -0.6202 -0.4039 21 0.7589 -0.7478 -1.2175 22 -2.2135 -0.6029 0.5611 > fitted Consumption Investment PrivateWages 1 NA NA NA 2 42.2 0.0419 26.6 3 46.3 2.0795 28.8 4 50.7 4.1309 32.7 5 51.0 4.4778 34.0 6 52.5 4.7832 35.8 7 54.2 4.1550 NA 8 54.8 3.3713 38.7 9 56.2 3.5272 38.9 10 NA 3.8911 40.1 11 54.6 0.5919 38.3 12 51.1 -3.6569 34.2 13 NA NA 29.2 14 46.3 -5.5743 28.1 15 48.8 -2.9393 30.3 16 51.4 -1.3761 33.2 17 56.1 1.0795 37.6 18 59.2 1.9420 40.1 19 57.3 0.6444 39.0 20 60.7 1.9202 42.0 21 64.2 4.0478 46.2 22 71.9 5.5029 52.7 > predict Consumption.pred Consumption.se.fit Consumption.lwr Consumption.upr 1 NA NA NA NA 2 42.2 0.448 41.3 43.1 3 46.3 0.476 45.3 47.2 4 50.7 0.318 50.1 51.4 5 51.0 0.373 50.3 51.8 6 52.5 0.378 51.8 53.3 7 54.2 0.337 53.5 54.9 8 54.8 0.310 54.2 55.4 9 56.2 0.343 55.5 56.9 10 NA NA NA NA 11 54.6 0.567 53.5 55.8 12 51.1 0.509 50.1 52.2 13 NA NA NA NA 14 46.3 0.573 45.1 47.4 15 48.8 0.382 48.0 49.6 16 51.4 0.328 50.7 52.0 17 56.1 0.336 55.5 56.8 18 59.2 0.309 58.5 59.8 19 57.3 0.370 56.6 58.0 20 60.7 0.401 59.9 61.5 21 64.2 0.405 63.4 65.1 22 71.9 0.633 70.6 73.2 Investment.pred Investment.se.fit Investment.lwr Investment.upr 1 NA NA NA NA 2 0.0419 0.533 -1.0309 1.115 3 2.0795 0.433 1.2082 2.951 4 4.1309 0.387 3.3532 4.909 5 4.4778 0.322 3.8307 5.125 6 4.7832 0.305 4.1700 5.396 7 4.1550 0.283 3.5852 4.725 8 3.3713 0.253 2.8630 3.880 9 3.5272 0.337 2.8488 4.206 10 3.8911 0.386 3.1149 4.667 11 0.5919 0.561 -0.5376 1.722 12 -3.6569 0.530 -4.7223 -2.591 13 NA NA NA NA 14 -5.5743 0.618 -6.8176 -4.331 15 -2.9393 0.362 -3.6671 -2.212 16 -1.3761 0.296 -1.9710 -0.781 17 1.0795 0.300 0.4763 1.683 18 1.9420 0.216 1.5081 2.376 19 0.6444 0.298 0.0451 1.244 20 1.9202 0.318 1.2798 2.561 21 4.0478 0.295 3.4537 4.642 22 5.5029 0.417 4.6638 6.342 PrivateWages.pred PrivateWages.se.fit PrivateWages.lwr PrivateWages.upr 1 NA NA NA NA 2 26.6 0.312 26.0 27.3 3 28.8 0.312 28.2 29.4 4 32.7 0.307 32.1 33.3 5 34.0 0.237 33.5 34.5 6 35.8 0.235 35.3 36.2 7 NA NA NA NA 8 38.7 0.239 38.2 39.1 9 38.9 0.228 38.5 39.4 10 40.1 0.218 39.7 40.6 11 38.3 0.293 37.7 38.9 12 34.2 0.290 33.6 34.7 13 29.2 0.343 28.5 29.8 14 28.1 0.321 27.4 28.7 15 30.3 0.320 29.6 30.9 16 33.2 0.268 32.6 33.7 17 37.6 0.263 37.1 38.1 18 40.1 0.207 39.7 40.6 19 39.0 0.293 38.4 39.6 20 42.0 0.279 41.4 42.6 21 46.2 0.295 45.6 46.8 22 52.7 0.435 51.9 53.6 > model.frame [1] TRUE > model.matrix [1] TRUE > nobs [1] 59 > linearHypothesis Linear hypothesis test (Theil's F test) Hypothesis: Consumption_corpProf + Investment_capitalLag = 0 Model 1: restricted model Model 2: kleinModel Res.Df Df F Pr(>F) 1 48 2 47 1 0.41 0.52 Linear hypothesis test (F statistic of a Wald test) Hypothesis: Consumption_corpProf + Investment_capitalLag = 0 Model 1: restricted model Model 2: kleinModel Res.Df Df F Pr(>F) 1 48 2 47 1 0.52 0.47 Linear hypothesis test (Chi^2 statistic of a Wald test) Hypothesis: Consumption_corpProf + Investment_capitalLag = 0 Model 1: restricted model Model 2: kleinModel Res.Df Df Chisq Pr(>Chisq) 1 48 2 47 1 0.52 0.47 Linear hypothesis test (Theil's F test) Hypothesis: Consumption_corpProf + Investment_capitalLag = 0 Consumption_corpProfLag - PrivateWages_trend = 0 Model 1: restricted model Model 2: kleinModel Res.Df Df F Pr(>F) 1 49 2 47 2 0.31 0.73 Linear hypothesis test (F statistic of a Wald test) Hypothesis: Consumption_corpProf + Investment_capitalLag = 0 Consumption_corpProfLag - PrivateWages_trend = 0 Model 1: restricted model Model 2: kleinModel Res.Df Df F Pr(>F) 1 49 2 47 2 0.4 0.67 Linear hypothesis test (Chi^2 statistic of a Wald test) Hypothesis: Consumption_corpProf + Investment_capitalLag = 0 Consumption_corpProfLag - PrivateWages_trend = 0 Model 1: restricted model Model 2: kleinModel Res.Df Df Chisq Pr(>Chisq) 1 49 2 47 2 0.79 0.67 > logLik 'log Lik.' -67.3 (df=18) 'log Lik.' -74.9 (df=18) > > # 3SLS Warning in systemfit(system, method = method, data = KleinI, inst = inst, : the estimation of systems of equations with unequal numbers of observations has not been thoroughly tested yet > summary systemfit results method: 3SLS N DF SSR detRCov OLS-R2 McElroy-R2 system 57 45 66.8 0.361 0.963 0.993 N DF SSR MSE RMSE R2 Adj R2 Consumption 18 14 22.6 1.616 1.271 0.974 0.968 Investment 19 15 34.1 2.277 1.509 0.807 0.769 PrivateWages 20 16 10.1 0.628 0.793 0.987 0.985 The covariance matrix of the residuals used for estimation Consumption Investment PrivateWages Consumption 1.237 0.518 -0.408 Investment 0.518 1.263 0.113 PrivateWages -0.408 0.113 0.468 The covariance matrix of the residuals Consumption Investment PrivateWages Consumption 1.257 0.601 -0.421 Investment 0.601 1.601 0.214 PrivateWages -0.421 0.214 0.491 The correlations of the residuals Consumption Investment PrivateWages Consumption 1.000 0.425 -0.537 Investment 0.425 1.000 0.239 PrivateWages -0.537 0.239 1.000 3SLS estimates for 'Consumption' (equation 1) Model Formula: consump ~ corpProf + corpProfLag + wages Instruments: ~govExp + taxes + govWage + trend + capitalLag + corpProfLag + gnpLag Estimate Std. Error t value Pr(>|t|) (Intercept) 18.2100 1.5273 11.92 1e-08 *** corpProf -0.0639 0.1461 -0.44 0.67 corpProfLag 0.1687 0.1125 1.50 0.16 wages 0.8230 0.0431 19.07 2e-11 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.271 on 14 degrees of freedom Number of observations: 18 Degrees of Freedom: 14 SSR: 22.626 MSE: 1.616 Root MSE: 1.271 Multiple R-Squared: 0.974 Adjusted R-Squared: 0.968 3SLS estimates for 'Investment' (equation 2) Model Formula: invest ~ corpProf + corpProfLag + capitalLag Instruments: ~govExp + taxes + govWage + trend + capitalLag + corpProfLag + gnpLag Estimate Std. Error t value Pr(>|t|) (Intercept) 24.7534 6.5548 3.78 0.00183 ** corpProf 0.0524 0.1807 0.29 0.77600 corpProfLag 0.6584 0.1551 4.24 0.00071 *** capitalLag -0.1756 0.0311 -5.64 4.7e-05 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.509 on 15 degrees of freedom Number of observations: 19 Degrees of Freedom: 15 SSR: 34.149 MSE: 2.277 Root MSE: 1.509 Multiple R-Squared: 0.807 Adjusted R-Squared: 0.769 3SLS estimates for 'PrivateWages' (equation 3) Model Formula: privWage ~ gnp + gnpLag + trend Instruments: ~govExp + taxes + govWage + trend + capitalLag + corpProfLag + gnpLag Estimate Std. Error t value Pr(>|t|) (Intercept) 0.8154 1.0961 0.74 0.46772 gnp 0.4250 0.0299 14.19 1.7e-10 *** gnpLag 0.1731 0.0331 5.23 8.3e-05 *** trend 0.1255 0.0283 4.43 0.00042 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 0.793 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 10.054 MSE: 0.628 Root MSE: 0.793 Multiple R-Squared: 0.987 Adjusted R-Squared: 0.985 > residuals Consumption Investment PrivateWages 1 NA NA NA 2 -0.8680 -1.857 -1.21010 3 -0.7217 0.170 0.43075 4 -1.1353 0.762 1.30899 5 0.0755 -1.565 -0.20270 6 0.6348 0.367 -0.46842 7 NA NA NA 8 1.7953 1.230 -0.85853 9 1.7924 0.568 0.20422 10 NA 2.308 1.09889 11 -0.5211 -0.972 -0.39427 12 -1.5560 -0.960 0.39889 13 NA NA -0.00934 14 -0.2384 1.327 0.59990 15 -0.7342 -0.292 0.48094 16 -0.4331 0.068 0.16188 17 1.8775 1.932 -0.70448 18 -0.6294 -0.154 0.95616 19 -0.4252 -3.400 -0.62489 20 1.3682 0.589 -0.29589 21 1.3155 0.271 -1.14466 22 -1.4276 0.942 0.55941 > fitted Consumption Investment PrivateWages 1 NA NA NA 2 42.8 1.657 26.7 3 45.7 1.730 28.9 4 50.3 4.438 32.8 5 50.5 4.565 34.1 6 52.0 4.733 35.9 7 NA NA NA 8 54.4 2.970 38.8 9 55.5 2.432 39.0 10 NA 2.792 40.2 11 55.5 1.972 38.3 12 52.5 -2.440 34.1 13 NA NA 29.0 14 46.7 -6.427 27.9 15 49.4 -2.708 30.1 16 51.7 -1.368 33.0 17 55.8 0.168 37.5 18 59.3 2.154 40.0 19 57.9 1.500 38.8 20 60.2 0.711 41.9 21 63.7 3.029 46.1 22 71.1 3.958 52.7 > predict Consumption.pred Consumption.se.fit Consumption.lwr Consumption.upr 1 NA NA NA NA 2 42.8 0.542 39.8 45.7 3 45.7 0.612 42.7 48.7 4 50.3 0.407 47.5 53.2 5 50.5 0.478 47.6 53.4 6 52.0 0.488 49.0 54.9 7 NA NA NA NA 8 54.4 0.394 51.5 57.3 9 55.5 0.464 52.6 58.4 10 NA NA NA NA 11 55.5 0.811 52.3 58.8 12 52.5 0.773 49.3 55.6 13 NA NA NA NA 14 46.7 0.666 43.7 49.8 15 49.4 0.463 46.5 52.3 16 51.7 0.381 48.9 54.6 17 55.8 0.424 52.9 58.7 18 59.3 0.359 56.5 62.2 19 57.9 0.492 55.0 60.8 20 60.2 0.501 57.3 63.2 21 63.7 0.491 60.8 66.6 22 71.1 0.749 68.0 74.3 Investment.pred Investment.se.fit Investment.lwr Investment.upr 1 NA NA NA NA 2 1.657 0.831 -2.015 5.329 3 1.730 0.574 -1.711 5.171 4 4.438 0.507 1.045 7.831 5 4.565 0.426 1.223 7.907 6 4.733 0.406 1.402 8.064 7 NA NA NA NA 8 2.970 0.334 -0.324 6.263 9 2.432 0.501 -0.957 5.820 10 2.792 0.544 -0.627 6.211 11 1.972 0.937 -1.814 5.757 12 -2.440 0.849 -6.131 1.250 13 NA NA NA NA 14 -6.427 0.836 -10.104 -2.750 15 -2.708 0.477 -6.081 0.665 16 -1.368 0.381 -4.685 1.949 17 0.168 0.473 -3.202 3.538 18 2.154 0.311 -1.130 5.438 19 1.500 0.518 -1.900 4.900 20 0.711 0.541 -2.705 4.127 21 3.029 0.467 -0.338 6.395 22 3.958 0.677 0.432 7.483 PrivateWages.pred PrivateWages.se.fit PrivateWages.lwr PrivateWages.upr 1 NA NA NA NA 2 26.7 0.315 24.9 28.5 3 28.9 0.322 27.1 30.7 4 32.8 0.330 31.0 34.6 5 34.1 0.241 32.3 35.9 6 35.9 0.249 34.1 37.6 7 NA NA NA NA 8 38.8 0.243 37.0 40.5 9 39.0 0.231 37.2 40.7 10 40.2 0.225 38.5 41.9 11 38.3 0.305 36.5 40.1 12 34.1 0.317 32.3 35.9 13 29.0 0.382 27.1 30.9 14 27.9 0.321 26.1 29.7 15 30.1 0.316 28.3 31.9 16 33.0 0.265 31.3 34.8 17 37.5 0.270 35.7 39.3 18 40.0 0.207 38.3 41.8 19 38.8 0.311 37.0 40.6 20 41.9 0.287 40.1 43.7 21 46.1 0.300 44.3 47.9 22 52.7 0.463 50.8 54.7 > model.frame [1] TRUE > model.matrix [1] "Attributes: < Component \"dim\": Mean relative difference: 0.0339 >" [2] "Attributes: < Component \"dimnames\": Component 1: 52 string mismatches >" [3] "Numeric: lengths (708, 684) differ" > nobs [1] 57 > linearHypothesis Linear hypothesis test (Theil's F test) Hypothesis: Consumption_corpProf + Investment_capitalLag = 0 Model 1: restricted model Model 2: kleinModel Res.Df Df F Pr(>F) 1 46 2 45 1 1.95 0.17 Linear hypothesis test (F statistic of a Wald test) Hypothesis: Consumption_corpProf + Investment_capitalLag = 0 Model 1: restricted model Model 2: kleinModel Res.Df Df F Pr(>F) 1 46 2 45 1 2.71 0.11 Linear hypothesis test (Chi^2 statistic of a Wald test) Hypothesis: Consumption_corpProf + Investment_capitalLag = 0 Model 1: restricted model Model 2: kleinModel Res.Df Df Chisq Pr(>Chisq) 1 46 2 45 1 2.71 0.1 . --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Linear hypothesis test (Theil's F test) Hypothesis: Consumption_corpProf + Investment_capitalLag = 0 Consumption_corpProfLag - PrivateWages_trend = 0 Model 1: restricted model Model 2: kleinModel Res.Df Df F Pr(>F) 1 47 2 45 2 1.78 0.18 Linear hypothesis test (F statistic of a Wald test) Hypothesis: Consumption_corpProf + Investment_capitalLag = 0 Consumption_corpProfLag - PrivateWages_trend = 0 Model 1: restricted model Model 2: kleinModel Res.Df Df F Pr(>F) 1 47 2 45 2 2.48 0.095 . --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Linear hypothesis test (Chi^2 statistic of a Wald test) Hypothesis: Consumption_corpProf + Investment_capitalLag = 0 Consumption_corpProfLag - PrivateWages_trend = 0 Model 1: restricted model Model 2: kleinModel Res.Df Df Chisq Pr(>Chisq) 1 47 2 45 2 4.95 0.084 . --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 > logLik 'log Lik.' -71.2 (df=18) 'log Lik.' -81.7 (df=18) > > # I3SLS Warning in systemfit(system, method = method, data = KleinI, inst = inst, : the estimation of systems of equations with unequal numbers of observations has not been thoroughly tested yet > summary systemfit results method: iterated 3SLS convergence achieved after 9 iterations N DF SSR detRCov OLS-R2 McElroy-R2 system 57 45 75 0.422 0.959 0.993 N DF SSR MSE RMSE R2 Adj R2 Consumption 18 14 22.7 1.622 1.273 0.973 0.968 Investment 19 15 42.1 2.809 1.676 0.762 0.715 PrivateWages 20 16 10.2 0.638 0.799 0.987 0.985 The covariance matrix of the residuals used for estimation Consumption Investment PrivateWages Consumption 1.261 0.675 -0.439 Investment 0.675 1.949 0.237 PrivateWages -0.439 0.237 0.503 The covariance matrix of the residuals Consumption Investment PrivateWages Consumption 1.261 0.675 -0.439 Investment 0.675 1.949 0.237 PrivateWages -0.439 0.237 0.503 The correlations of the residuals Consumption Investment PrivateWages Consumption 1.000 0.431 -0.550 Investment 0.431 1.000 0.239 PrivateWages -0.550 0.239 1.000 3SLS estimates for 'Consumption' (equation 1) Model Formula: consump ~ corpProf + corpProfLag + wages Instruments: ~govExp + taxes + govWage + trend + capitalLag + corpProfLag + gnpLag Estimate Std. Error t value Pr(>|t|) (Intercept) 18.5887 1.5250 12.19 7.6e-09 *** corpProf -0.0438 0.1441 -0.30 0.77 corpProfLag 0.1456 0.1109 1.31 0.21 wages 0.8141 0.0428 19.01 2.1e-11 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.273 on 14 degrees of freedom Number of observations: 18 Degrees of Freedom: 14 SSR: 22.704 MSE: 1.622 Root MSE: 1.273 Multiple R-Squared: 0.973 Adjusted R-Squared: 0.968 3SLS estimates for 'Investment' (equation 2) Model Formula: invest ~ corpProf + corpProfLag + capitalLag Instruments: ~govExp + taxes + govWage + trend + capitalLag + corpProfLag + gnpLag Estimate Std. Error t value Pr(>|t|) (Intercept) 29.4725 7.6857 3.83 0.0016 ** corpProf -0.0183 0.2154 -0.09 0.9333 corpProfLag 0.7195 0.1850 3.89 0.0015 ** capitalLag -0.1985 0.0366 -5.43 6.9e-05 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.676 on 15 degrees of freedom Number of observations: 19 Degrees of Freedom: 15 SSR: 42.136 MSE: 2.809 Root MSE: 1.676 Multiple R-Squared: 0.762 Adjusted R-Squared: 0.715 3SLS estimates for 'PrivateWages' (equation 3) Model Formula: privWage ~ gnp + gnpLag + trend Instruments: ~govExp + taxes + govWage + trend + capitalLag + corpProfLag + gnpLag Estimate Std. Error t value Pr(>|t|) (Intercept) 0.5385 1.1055 0.49 0.63277 gnp 0.4251 0.0287 14.80 9.3e-11 *** gnpLag 0.1776 0.0322 5.51 4.7e-05 *** trend 0.1211 0.0283 4.28 0.00057 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 0.799 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 10.204 MSE: 0.638 Root MSE: 0.799 Multiple R-Squared: 0.987 Adjusted R-Squared: 0.985 > residuals Consumption Investment PrivateWages 1 NA NA NA 2 -0.9524 -2.2888 -1.1837 3 -0.8681 0.0698 0.4581 4 -1.1653 0.5368 1.3199 5 0.0601 -1.6917 -0.2194 6 0.6426 0.2972 -0.4805 7 NA NA NA 8 1.8394 1.3723 -0.8931 9 1.8275 0.8861 0.1723 10 NA 2.6574 1.0707 11 -0.3387 -0.9736 -0.4288 12 -1.4550 -0.8630 0.3956 13 NA NA 0.0277 14 -0.3782 1.7151 0.6823 15 -0.7768 -0.1993 0.5638 16 -0.4606 0.1448 0.2281 17 1.8605 2.1295 -0.6557 18 -0.5262 -0.1493 0.9718 19 -0.3047 -3.4730 -0.6148 20 1.3992 0.8566 -0.2636 21 1.4216 0.4910 -1.1472 22 -1.2431 1.2792 0.5323 > fitted Consumption Investment PrivateWages 1 NA NA NA 2 42.9 2.0888 26.7 3 45.9 1.8302 28.8 4 50.4 4.6632 32.8 5 50.5 4.6917 34.1 6 52.0 4.8028 35.9 7 NA NA NA 8 54.4 2.8277 38.8 9 55.5 2.1139 39.0 10 NA 2.4426 40.2 11 55.3 1.9736 38.3 12 52.4 -2.5370 34.1 13 NA NA 29.0 14 46.9 -6.8151 27.8 15 49.5 -2.8007 30.0 16 51.8 -1.4448 33.0 17 55.8 -0.0295 37.5 18 59.2 2.1493 40.0 19 57.8 1.5730 38.8 20 60.2 0.4434 41.9 21 63.6 2.8090 46.1 22 70.9 3.6208 52.8 > predict Consumption.pred Consumption.se.fit Consumption.lwr Consumption.upr 1 NA NA NA NA 2 42.9 0.541 41.8 43.9 3 45.9 0.608 44.6 47.1 4 50.4 0.403 49.6 51.2 5 50.5 0.472 49.6 51.5 6 52.0 0.481 51.0 52.9 7 NA NA NA NA 8 54.4 0.388 53.6 55.1 9 55.5 0.458 54.6 56.4 10 NA NA NA NA 11 55.3 0.795 53.7 56.9 12 52.4 0.762 50.8 53.9 13 NA NA NA NA 14 46.9 0.663 45.5 48.2 15 49.5 0.462 48.5 50.4 16 51.8 0.381 51.0 52.5 17 55.8 0.423 55.0 56.7 18 59.2 0.355 58.5 59.9 19 57.8 0.484 56.8 58.8 20 60.2 0.500 59.2 61.2 21 63.6 0.490 62.6 64.6 22 70.9 0.747 69.4 72.4 Investment.pred Investment.se.fit Investment.lwr Investment.upr 1 NA NA NA NA 2 2.0888 0.985 0.105 4.072 3 1.8302 0.708 0.404 3.257 4 4.6632 0.612 3.430 5.897 5 4.6917 0.519 3.645 5.738 6 4.8028 0.498 3.800 5.806 7 NA NA NA NA 8 2.8277 0.410 2.003 3.653 9 2.1139 0.599 0.908 3.320 10 2.4426 0.651 1.131 3.754 11 1.9736 1.138 -0.320 4.267 12 -2.5370 1.038 -4.627 -0.447 13 NA NA NA NA 14 -6.8151 1.011 -8.851 -4.779 15 -2.8007 0.587 -3.984 -1.617 16 -1.4448 0.470 -2.392 -0.498 17 -0.0295 0.573 -1.183 1.124 18 2.1493 0.380 1.384 2.915 19 1.5730 0.624 0.315 2.831 20 0.4434 0.649 -0.864 1.751 21 2.8090 0.565 1.671 3.947 22 3.6208 0.814 1.982 5.260 PrivateWages.pred PrivateWages.se.fit PrivateWages.lwr PrivateWages.upr 1 NA NA NA NA 2 26.7 0.322 26.0 27.3 3 28.8 0.328 28.2 29.5 4 32.8 0.332 32.1 33.4 5 34.1 0.244 33.6 34.6 6 35.9 0.252 35.4 36.4 7 NA NA NA NA 8 38.8 0.246 38.3 39.3 9 39.0 0.234 38.6 39.5 10 40.2 0.230 39.8 40.7 11 38.3 0.299 37.7 38.9 12 34.1 0.304 33.5 34.7 13 29.0 0.366 28.2 29.7 14 27.8 0.321 27.2 28.5 15 30.0 0.317 29.4 30.7 16 33.0 0.266 32.4 33.5 17 37.5 0.270 36.9 38.0 18 40.0 0.211 39.6 40.5 19 38.8 0.305 38.2 39.4 20 41.9 0.290 41.3 42.4 21 46.1 0.309 45.5 46.8 22 52.8 0.468 51.8 53.7 > model.frame [1] TRUE > model.matrix [1] "Attributes: < Component \"dim\": Mean relative difference: 0.0339 >" [2] "Attributes: < Component \"dimnames\": Component 1: 52 string mismatches >" [3] "Numeric: lengths (708, 684) differ" > nobs [1] 57 > linearHypothesis Linear hypothesis test (Theil's F test) Hypothesis: Consumption_corpProf + Investment_capitalLag = 0 Model 1: restricted model Model 2: kleinModel Res.Df Df F Pr(>F) 1 46 2 45 1 2.17 0.15 Linear hypothesis test (F statistic of a Wald test) Hypothesis: Consumption_corpProf + Investment_capitalLag = 0 Model 1: restricted model Model 2: kleinModel Res.Df Df F Pr(>F) 1 46 2 45 1 2.84 0.099 . --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Linear hypothesis test (Chi^2 statistic of a Wald test) Hypothesis: Consumption_corpProf + Investment_capitalLag = 0 Model 1: restricted model Model 2: kleinModel Res.Df Df Chisq Pr(>Chisq) 1 46 2 45 1 2.84 0.092 . --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Linear hypothesis test (Theil's F test) Hypothesis: Consumption_corpProf + Investment_capitalLag = 0 Consumption_corpProfLag - PrivateWages_trend = 0 Model 1: restricted model Model 2: kleinModel Res.Df Df F Pr(>F) 1 47 2 45 2 2.45 0.098 . --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Linear hypothesis test (F statistic of a Wald test) Hypothesis: Consumption_corpProf + Investment_capitalLag = 0 Consumption_corpProfLag - PrivateWages_trend = 0 Model 1: restricted model Model 2: kleinModel Res.Df Df F Pr(>F) 1 47 2 45 2 3.2 0.05 . --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Linear hypothesis test (Chi^2 statistic of a Wald test) Hypothesis: Consumption_corpProf + Investment_capitalLag = 0 Consumption_corpProfLag - PrivateWages_trend = 0 Model 1: restricted model Model 2: kleinModel Res.Df Df Chisq Pr(>Chisq) 1 47 2 45 2 6.4 0.041 * --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 > logLik 'log Lik.' -72.7 (df=18) 'log Lik.' -83.9 (df=18) > > # OLS Warning in systemfit(system, method = method, data = KleinI, methodResidCov = ifelse(method == : the estimation of systems of equations with unequal numbers of observations has not been thoroughly tested yet > summary systemfit results method: OLS N DF SSR detRCov OLS-R2 McElroy-R2 system 58 46 44.2 0.565 0.976 0.991 N DF SSR MSE RMSE R2 Adj R2 Consumption 19 15 17.36 1.157 1.08 0.980 0.976 Investment 19 15 17.11 1.140 1.07 0.907 0.889 PrivateWages 20 16 9.74 0.609 0.78 0.988 0.985 The covariance matrix of the residuals Consumption Investment PrivateWages Consumption 1.285 0.061 -0.511 Investment 0.061 1.059 0.151 PrivateWages -0.511 0.151 0.648 The correlations of the residuals Consumption Investment PrivateWages Consumption 1.0000 0.0457 -0.568 Investment 0.0457 1.0000 0.168 PrivateWages -0.5681 0.1676 1.000 OLS estimates for 'Consumption' (equation 1) Model Formula: consump ~ corpProf + corpProfLag + wages Estimate Std. Error t value Pr(>|t|) (Intercept) 16.2957 1.5438 10.56 2.4e-08 *** corpProf 0.1796 0.1206 1.49 0.16 corpProfLag 0.1032 0.1031 1.00 0.33 wages 0.7962 0.0449 17.73 1.8e-11 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.076 on 15 degrees of freedom Number of observations: 19 Degrees of Freedom: 15 SSR: 17.362 MSE: 1.157 Root MSE: 1.076 Multiple R-Squared: 0.98 Adjusted R-Squared: 0.976 OLS estimates for 'Investment' (equation 2) Model Formula: invest ~ corpProf + corpProfLag + capitalLag Estimate Std. Error t value Pr(>|t|) (Intercept) 10.1724 5.5758 1.82 0.08808 . corpProf 0.5004 0.1092 4.58 0.00036 *** corpProfLag 0.3270 0.1052 3.11 0.00718 ** capitalLag -0.1134 0.0275 -4.13 0.00090 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.068 on 15 degrees of freedom Number of observations: 19 Degrees of Freedom: 15 SSR: 17.105 MSE: 1.14 Root MSE: 1.068 Multiple R-Squared: 0.907 Adjusted R-Squared: 0.889 OLS estimates for 'PrivateWages' (equation 3) Model Formula: privWage ~ gnp + gnpLag + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 1.3550 1.3512 1.00 0.3309 gnp 0.4417 0.0342 12.92 7e-10 *** gnpLag 0.1466 0.0393 3.73 0.0018 ** trend 0.1244 0.0347 3.58 0.0025 ** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 0.78 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 9.739 MSE: 0.609 Root MSE: 0.78 Multiple R-Squared: 0.988 Adjusted R-Squared: 0.985 compare coef with single-equation OLS [1] TRUE > residuals Consumption Investment PrivateWages 1 NA NA NA 2 -0.3863 0.00693 -1.3389 3 -1.2484 -0.06954 0.2462 4 -1.6040 1.22401 1.1255 5 -0.5384 -1.37697 -0.1959 6 -0.0413 0.38610 -0.5284 7 0.8043 1.48598 NA 8 1.2830 0.78465 -0.7909 9 1.0142 -0.65483 0.2819 10 NA 1.06018 1.1384 11 0.1429 0.39508 -0.1904 12 -0.3439 0.20479 0.5813 13 NA NA 0.1206 14 0.3199 0.32778 0.4773 15 -0.1016 -0.07450 0.3035 16 -0.0702 NA 0.0284 17 1.6064 0.96998 -0.8517 18 -0.4980 0.08124 0.9908 19 0.1253 -2.49295 -0.4597 20 0.9805 -0.70609 -0.3819 21 0.7551 -0.81928 -1.1062 22 -2.1992 -0.73256 0.5501 > fitted Consumption Investment PrivateWages 1 NA NA NA 2 42.3 -0.207 26.8 3 46.2 1.970 29.1 4 50.8 3.976 33.0 5 51.1 4.377 34.1 6 52.6 4.714 35.9 7 54.3 4.114 NA 8 54.9 3.415 38.7 9 56.3 3.655 38.9 10 NA 4.040 40.2 11 54.9 0.605 38.1 12 51.2 -3.605 33.9 13 NA NA 28.9 14 46.2 -5.428 28.0 15 48.8 -2.926 30.3 16 51.4 NA 33.2 17 56.1 1.130 37.7 18 59.2 1.919 40.0 19 57.4 0.593 38.7 20 60.6 2.006 42.0 21 64.2 4.119 46.1 22 71.9 5.633 52.7 > predict Consumption.pred Consumption.se.fit Consumption.lwr Consumption.upr 1 NA NA NA NA 2 42.3 0.543 39.9 44.7 3 46.2 0.581 43.8 48.7 4 50.8 0.394 48.5 53.1 5 51.1 0.465 48.8 53.5 6 52.6 0.474 50.3 55.0 7 54.3 0.423 52.0 56.6 8 54.9 0.389 52.6 57.2 9 56.3 0.434 54.0 58.6 10 NA NA NA NA 11 54.9 0.727 52.2 57.5 12 51.2 0.662 48.7 53.8 13 NA NA NA NA 14 46.2 0.698 43.6 48.8 15 48.8 0.470 46.4 51.2 16 51.4 0.398 49.1 53.7 17 56.1 0.405 53.8 58.4 18 59.2 0.375 56.9 61.5 19 57.4 0.466 55.0 59.7 20 60.6 0.482 58.2 63.0 21 64.2 0.485 61.9 66.6 22 71.9 0.755 69.3 74.5 Investment.pred Investment.se.fit Investment.lwr Investment.upr 1 NA NA NA NA 2 -0.207 0.645 -2.718 2.30 3 1.970 0.523 -0.423 4.36 4 3.976 0.462 1.634 6.32 5 4.377 0.383 2.094 6.66 6 4.714 0.362 2.444 6.98 7 4.114 0.336 1.861 6.37 8 3.415 0.298 1.184 5.65 9 3.655 0.400 1.359 5.95 10 4.040 0.458 1.701 6.38 11 0.605 0.666 -1.928 3.14 12 -3.605 0.637 -6.108 -1.10 13 NA NA NA NA 14 -5.428 0.767 -8.074 -2.78 15 -2.926 0.453 -5.261 -0.59 16 NA NA NA NA 17 1.130 0.366 -1.142 3.40 18 1.919 0.258 -0.293 4.13 19 0.593 0.357 -1.674 2.86 20 2.006 0.384 -0.278 4.29 21 4.119 0.350 1.858 6.38 22 5.633 0.495 3.263 8.00 PrivateWages.pred PrivateWages.se.fit PrivateWages.lwr PrivateWages.upr 1 NA NA NA NA 2 26.8 0.378 25.1 28.6 3 29.1 0.381 27.3 30.8 4 33.0 0.384 31.2 34.7 5 34.1 0.297 32.4 35.8 6 35.9 0.296 34.2 37.6 7 NA NA NA NA 8 38.7 0.303 37.0 40.4 9 38.9 0.288 37.2 40.6 10 40.2 0.274 38.5 41.8 11 38.1 0.377 36.3 39.8 12 33.9 0.381 32.2 35.7 13 28.9 0.452 27.1 30.7 14 28.0 0.397 26.3 29.8 15 30.3 0.391 28.5 32.1 16 33.2 0.327 31.5 34.9 17 37.7 0.320 36.0 39.3 18 40.0 0.250 38.4 41.7 19 38.7 0.375 36.9 40.4 20 42.0 0.337 40.3 43.7 21 46.1 0.352 44.4 47.8 22 52.7 0.530 50.9 54.6 > model.frame consump corpProf corpProfLag wages invest capitalLag privWage gnp gnpLag 1 39.8 12.7 NA 31.0 2.7 180 28.8 44.9 NA 2 41.9 12.4 12.7 28.2 -0.2 183 25.5 45.6 44.9 3 45.0 16.9 12.4 32.2 1.9 183 29.3 50.1 45.6 4 49.2 18.4 16.9 37.0 5.2 184 34.1 57.2 50.1 5 50.6 19.4 18.4 37.0 3.0 190 33.9 57.1 57.2 6 52.6 20.1 19.4 38.6 5.1 193 35.4 61.0 57.1 7 55.1 19.6 20.1 40.7 5.6 198 37.4 64.0 NA 8 56.2 19.8 19.6 41.5 4.2 203 37.9 64.4 64.0 9 57.3 21.1 19.8 42.9 3.0 208 39.2 64.5 64.4 10 57.8 21.7 21.1 NA 5.1 211 41.3 67.0 64.5 11 55.0 15.6 21.7 42.1 1.0 216 37.9 61.2 67.0 12 50.9 11.4 15.6 39.3 -3.4 217 34.5 53.4 61.2 13 45.6 NA 11.4 34.3 -6.2 213 29.0 44.3 53.4 14 46.5 11.2 7.0 34.1 -5.1 207 28.5 45.1 44.3 15 48.7 12.3 11.2 36.6 -3.0 202 30.6 49.7 45.1 16 51.3 14.0 12.3 39.3 NA 199 33.2 54.4 49.7 17 57.7 17.6 14.0 44.2 2.1 198 36.8 62.7 54.4 18 58.7 17.3 17.6 47.7 2.0 200 41.0 65.0 62.7 19 57.5 15.3 17.3 45.9 -1.9 202 38.2 60.9 65.0 20 61.6 19.0 15.3 49.4 1.3 200 41.6 69.5 60.9 21 65.0 21.1 19.0 53.0 3.3 201 45.0 75.7 69.5 22 69.7 23.5 21.1 61.8 4.9 204 53.3 88.4 75.7 trend 1 -11 2 -10 3 -9 4 -8 5 -7 6 -6 7 -5 8 -4 9 -3 10 -2 11 -1 12 0 13 1 14 2 15 3 16 4 17 5 18 6 19 7 20 8 21 9 22 10 > model.matrix Consumption_(Intercept) Consumption_corpProf Consumption_2 1 12.4 Consumption_3 1 16.9 Consumption_4 1 18.4 Consumption_5 1 19.4 Consumption_6 1 20.1 Consumption_7 1 19.6 Consumption_8 1 19.8 Consumption_9 1 21.1 Consumption_11 1 15.6 Consumption_12 1 11.4 Consumption_14 1 11.2 Consumption_15 1 12.3 Consumption_16 1 14.0 Consumption_17 1 17.6 Consumption_18 1 17.3 Consumption_19 1 15.3 Consumption_20 1 19.0 Consumption_21 1 21.1 Consumption_22 1 23.5 Investment_2 0 0.0 Investment_3 0 0.0 Investment_4 0 0.0 Investment_5 0 0.0 Investment_6 0 0.0 Investment_7 0 0.0 Investment_8 0 0.0 Investment_9 0 0.0 Investment_10 0 0.0 Investment_11 0 0.0 Investment_12 0 0.0 Investment_14 0 0.0 Investment_15 0 0.0 Investment_17 0 0.0 Investment_18 0 0.0 Investment_19 0 0.0 Investment_20 0 0.0 Investment_21 0 0.0 Investment_22 0 0.0 PrivateWages_2 0 0.0 PrivateWages_3 0 0.0 PrivateWages_4 0 0.0 PrivateWages_5 0 0.0 PrivateWages_6 0 0.0 PrivateWages_8 0 0.0 PrivateWages_9 0 0.0 PrivateWages_10 0 0.0 PrivateWages_11 0 0.0 PrivateWages_12 0 0.0 PrivateWages_13 0 0.0 PrivateWages_14 0 0.0 PrivateWages_15 0 0.0 PrivateWages_16 0 0.0 PrivateWages_17 0 0.0 PrivateWages_18 0 0.0 PrivateWages_19 0 0.0 PrivateWages_20 0 0.0 PrivateWages_21 0 0.0 PrivateWages_22 0 0.0 Consumption_corpProfLag Consumption_wages Consumption_2 12.7 28.2 Consumption_3 12.4 32.2 Consumption_4 16.9 37.0 Consumption_5 18.4 37.0 Consumption_6 19.4 38.6 Consumption_7 20.1 40.7 Consumption_8 19.6 41.5 Consumption_9 19.8 42.9 Consumption_11 21.7 42.1 Consumption_12 15.6 39.3 Consumption_14 7.0 34.1 Consumption_15 11.2 36.6 Consumption_16 12.3 39.3 Consumption_17 14.0 44.2 Consumption_18 17.6 47.7 Consumption_19 17.3 45.9 Consumption_20 15.3 49.4 Consumption_21 19.0 53.0 Consumption_22 21.1 61.8 Investment_2 0.0 0.0 Investment_3 0.0 0.0 Investment_4 0.0 0.0 Investment_5 0.0 0.0 Investment_6 0.0 0.0 Investment_7 0.0 0.0 Investment_8 0.0 0.0 Investment_9 0.0 0.0 Investment_10 0.0 0.0 Investment_11 0.0 0.0 Investment_12 0.0 0.0 Investment_14 0.0 0.0 Investment_15 0.0 0.0 Investment_17 0.0 0.0 Investment_18 0.0 0.0 Investment_19 0.0 0.0 Investment_20 0.0 0.0 Investment_21 0.0 0.0 Investment_22 0.0 0.0 PrivateWages_2 0.0 0.0 PrivateWages_3 0.0 0.0 PrivateWages_4 0.0 0.0 PrivateWages_5 0.0 0.0 PrivateWages_6 0.0 0.0 PrivateWages_8 0.0 0.0 PrivateWages_9 0.0 0.0 PrivateWages_10 0.0 0.0 PrivateWages_11 0.0 0.0 PrivateWages_12 0.0 0.0 PrivateWages_13 0.0 0.0 PrivateWages_14 0.0 0.0 PrivateWages_15 0.0 0.0 PrivateWages_16 0.0 0.0 PrivateWages_17 0.0 0.0 PrivateWages_18 0.0 0.0 PrivateWages_19 0.0 0.0 PrivateWages_20 0.0 0.0 PrivateWages_21 0.0 0.0 PrivateWages_22 0.0 0.0 Investment_(Intercept) Investment_corpProf Consumption_2 0 0.0 Consumption_3 0 0.0 Consumption_4 0 0.0 Consumption_5 0 0.0 Consumption_6 0 0.0 Consumption_7 0 0.0 Consumption_8 0 0.0 Consumption_9 0 0.0 Consumption_11 0 0.0 Consumption_12 0 0.0 Consumption_14 0 0.0 Consumption_15 0 0.0 Consumption_16 0 0.0 Consumption_17 0 0.0 Consumption_18 0 0.0 Consumption_19 0 0.0 Consumption_20 0 0.0 Consumption_21 0 0.0 Consumption_22 0 0.0 Investment_2 1 12.4 Investment_3 1 16.9 Investment_4 1 18.4 Investment_5 1 19.4 Investment_6 1 20.1 Investment_7 1 19.6 Investment_8 1 19.8 Investment_9 1 21.1 Investment_10 1 21.7 Investment_11 1 15.6 Investment_12 1 11.4 Investment_14 1 11.2 Investment_15 1 12.3 Investment_17 1 17.6 Investment_18 1 17.3 Investment_19 1 15.3 Investment_20 1 19.0 Investment_21 1 21.1 Investment_22 1 23.5 PrivateWages_2 0 0.0 PrivateWages_3 0 0.0 PrivateWages_4 0 0.0 PrivateWages_5 0 0.0 PrivateWages_6 0 0.0 PrivateWages_8 0 0.0 PrivateWages_9 0 0.0 PrivateWages_10 0 0.0 PrivateWages_11 0 0.0 PrivateWages_12 0 0.0 PrivateWages_13 0 0.0 PrivateWages_14 0 0.0 PrivateWages_15 0 0.0 PrivateWages_16 0 0.0 PrivateWages_17 0 0.0 PrivateWages_18 0 0.0 PrivateWages_19 0 0.0 PrivateWages_20 0 0.0 PrivateWages_21 0 0.0 PrivateWages_22 0 0.0 Investment_corpProfLag Investment_capitalLag Consumption_2 0.0 0 Consumption_3 0.0 0 Consumption_4 0.0 0 Consumption_5 0.0 0 Consumption_6 0.0 0 Consumption_7 0.0 0 Consumption_8 0.0 0 Consumption_9 0.0 0 Consumption_11 0.0 0 Consumption_12 0.0 0 Consumption_14 0.0 0 Consumption_15 0.0 0 Consumption_16 0.0 0 Consumption_17 0.0 0 Consumption_18 0.0 0 Consumption_19 0.0 0 Consumption_20 0.0 0 Consumption_21 0.0 0 Consumption_22 0.0 0 Investment_2 12.7 183 Investment_3 12.4 183 Investment_4 16.9 184 Investment_5 18.4 190 Investment_6 19.4 193 Investment_7 20.1 198 Investment_8 19.6 203 Investment_9 19.8 208 Investment_10 21.1 211 Investment_11 21.7 216 Investment_12 15.6 217 Investment_14 7.0 207 Investment_15 11.2 202 Investment_17 14.0 198 Investment_18 17.6 200 Investment_19 17.3 202 Investment_20 15.3 200 Investment_21 19.0 201 Investment_22 21.1 204 PrivateWages_2 0.0 0 PrivateWages_3 0.0 0 PrivateWages_4 0.0 0 PrivateWages_5 0.0 0 PrivateWages_6 0.0 0 PrivateWages_8 0.0 0 PrivateWages_9 0.0 0 PrivateWages_10 0.0 0 PrivateWages_11 0.0 0 PrivateWages_12 0.0 0 PrivateWages_13 0.0 0 PrivateWages_14 0.0 0 PrivateWages_15 0.0 0 PrivateWages_16 0.0 0 PrivateWages_17 0.0 0 PrivateWages_18 0.0 0 PrivateWages_19 0.0 0 PrivateWages_20 0.0 0 PrivateWages_21 0.0 0 PrivateWages_22 0.0 0 PrivateWages_(Intercept) PrivateWages_gnp PrivateWages_gnpLag Consumption_2 0 0.0 0.0 Consumption_3 0 0.0 0.0 Consumption_4 0 0.0 0.0 Consumption_5 0 0.0 0.0 Consumption_6 0 0.0 0.0 Consumption_7 0 0.0 0.0 Consumption_8 0 0.0 0.0 Consumption_9 0 0.0 0.0 Consumption_11 0 0.0 0.0 Consumption_12 0 0.0 0.0 Consumption_14 0 0.0 0.0 Consumption_15 0 0.0 0.0 Consumption_16 0 0.0 0.0 Consumption_17 0 0.0 0.0 Consumption_18 0 0.0 0.0 Consumption_19 0 0.0 0.0 Consumption_20 0 0.0 0.0 Consumption_21 0 0.0 0.0 Consumption_22 0 0.0 0.0 Investment_2 0 0.0 0.0 Investment_3 0 0.0 0.0 Investment_4 0 0.0 0.0 Investment_5 0 0.0 0.0 Investment_6 0 0.0 0.0 Investment_7 0 0.0 0.0 Investment_8 0 0.0 0.0 Investment_9 0 0.0 0.0 Investment_10 0 0.0 0.0 Investment_11 0 0.0 0.0 Investment_12 0 0.0 0.0 Investment_14 0 0.0 0.0 Investment_15 0 0.0 0.0 Investment_17 0 0.0 0.0 Investment_18 0 0.0 0.0 Investment_19 0 0.0 0.0 Investment_20 0 0.0 0.0 Investment_21 0 0.0 0.0 Investment_22 0 0.0 0.0 PrivateWages_2 1 45.6 44.9 PrivateWages_3 1 50.1 45.6 PrivateWages_4 1 57.2 50.1 PrivateWages_5 1 57.1 57.2 PrivateWages_6 1 61.0 57.1 PrivateWages_8 1 64.4 64.0 PrivateWages_9 1 64.5 64.4 PrivateWages_10 1 67.0 64.5 PrivateWages_11 1 61.2 67.0 PrivateWages_12 1 53.4 61.2 PrivateWages_13 1 44.3 53.4 PrivateWages_14 1 45.1 44.3 PrivateWages_15 1 49.7 45.1 PrivateWages_16 1 54.4 49.7 PrivateWages_17 1 62.7 54.4 PrivateWages_18 1 65.0 62.7 PrivateWages_19 1 60.9 65.0 PrivateWages_20 1 69.5 60.9 PrivateWages_21 1 75.7 69.5 PrivateWages_22 1 88.4 75.7 PrivateWages_trend Consumption_2 0 Consumption_3 0 Consumption_4 0 Consumption_5 0 Consumption_6 0 Consumption_7 0 Consumption_8 0 Consumption_9 0 Consumption_11 0 Consumption_12 0 Consumption_14 0 Consumption_15 0 Consumption_16 0 Consumption_17 0 Consumption_18 0 Consumption_19 0 Consumption_20 0 Consumption_21 0 Consumption_22 0 Investment_2 0 Investment_3 0 Investment_4 0 Investment_5 0 Investment_6 0 Investment_7 0 Investment_8 0 Investment_9 0 Investment_10 0 Investment_11 0 Investment_12 0 Investment_14 0 Investment_15 0 Investment_17 0 Investment_18 0 Investment_19 0 Investment_20 0 Investment_21 0 Investment_22 0 PrivateWages_2 -10 PrivateWages_3 -9 PrivateWages_4 -8 PrivateWages_5 -7 PrivateWages_6 -6 PrivateWages_8 -4 PrivateWages_9 -3 PrivateWages_10 -2 PrivateWages_11 -1 PrivateWages_12 0 PrivateWages_13 1 PrivateWages_14 2 PrivateWages_15 3 PrivateWages_16 4 PrivateWages_17 5 PrivateWages_18 6 PrivateWages_19 7 PrivateWages_20 8 PrivateWages_21 9 PrivateWages_22 10 > nobs [1] 58 > linearHypothesis Linear hypothesis test (Theil's F test) Hypothesis: Consumption_corpProf + Investment_capitalLag = 0 Model 1: restricted model Model 2: kleinModel Res.Df Df F Pr(>F) 1 47 2 46 1 0.3 0.59 Linear hypothesis test (F statistic of a Wald test) Hypothesis: Consumption_corpProf + Investment_capitalLag = 0 Model 1: restricted model Model 2: kleinModel Res.Df Df F Pr(>F) 1 47 2 46 1 0.29 0.6 Linear hypothesis test (Chi^2 statistic of a Wald test) Hypothesis: Consumption_corpProf + Investment_capitalLag = 0 Model 1: restricted model Model 2: kleinModel Res.Df Df Chisq Pr(>Chisq) 1 47 2 46 1 0.29 0.59 Linear hypothesis test (Theil's F test) Hypothesis: Consumption_corpProf + Investment_capitalLag = 0 Consumption_corpProfLag - PrivateWages_trend = 0 Model 1: restricted model Model 2: kleinModel Res.Df Df F Pr(>F) 1 48 2 46 2 0.16 0.85 Linear hypothesis test (F statistic of a Wald test) Hypothesis: Consumption_corpProf + Investment_capitalLag = 0 Consumption_corpProfLag - PrivateWages_trend = 0 Model 1: restricted model Model 2: kleinModel Res.Df Df F Pr(>F) 1 48 2 46 2 0.15 0.86 Linear hypothesis test (Chi^2 statistic of a Wald test) Hypothesis: Consumption_corpProf + Investment_capitalLag = 0 Consumption_corpProfLag - PrivateWages_trend = 0 Model 1: restricted model Model 2: kleinModel Res.Df Df Chisq Pr(>Chisq) 1 48 2 46 2 0.3 0.86 > logLik 'log Lik.' -68.8 (df=13) 'log Lik.' -73.3 (df=13) compare log likelihood value with single-equation OLS [1] "Mean relative difference: 0.0011" > > # 2SLS Warning in systemfit(system, method = method, data = KleinI, inst = inst, : the estimation of systems of equations with unequal numbers of observations has not been thoroughly tested yet > summary systemfit results method: 2SLS N DF SSR detRCov OLS-R2 McElroy-R2 system 56 44 57.9 0.391 0.968 0.992 N DF SSR MSE RMSE R2 Adj R2 Consumption 18 14 22.27 1.591 1.26 0.974 0.968 Investment 18 14 25.85 1.847 1.36 0.847 0.815 PrivateWages 20 16 9.74 0.609 0.78 0.988 0.985 The covariance matrix of the residuals Consumption Investment PrivateWages Consumption 1.307 0.540 -0.431 Investment 0.540 1.319 0.119 PrivateWages -0.431 0.119 0.496 The correlations of the residuals Consumption Investment PrivateWages Consumption 1.000 0.414 -0.538 Investment 0.414 1.000 0.139 PrivateWages -0.538 0.139 1.000 2SLS estimates for 'Consumption' (equation 1) Model Formula: consump ~ corpProf + corpProfLag + wages Instruments: ~govExp + taxes + govWage + trend + capitalLag + corpProfLag + gnpLag Estimate Std. Error t value Pr(>|t|) (Intercept) 17.2849 1.6463 10.50 5.1e-08 *** corpProf -0.0770 0.1683 -0.46 0.65 corpProfLag 0.2327 0.1276 1.82 0.09 . wages 0.8259 0.0472 17.49 6.6e-11 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.261 on 14 degrees of freedom Number of observations: 18 Degrees of Freedom: 14 SSR: 22.269 MSE: 1.591 Root MSE: 1.261 Multiple R-Squared: 0.974 Adjusted R-Squared: 0.968 2SLS estimates for 'Investment' (equation 2) Model Formula: invest ~ corpProf + corpProfLag + capitalLag Instruments: ~govExp + taxes + govWage + trend + capitalLag + corpProfLag + gnpLag Estimate Std. Error t value Pr(>|t|) (Intercept) 18.2571 7.3132 2.50 0.02564 * corpProf 0.1564 0.1942 0.81 0.43408 corpProfLag 0.5714 0.1672 3.42 0.00417 ** capitalLag -0.1446 0.0346 -4.18 0.00093 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.359 on 14 degrees of freedom Number of observations: 18 Degrees of Freedom: 14 SSR: 25.852 MSE: 1.847 Root MSE: 1.359 Multiple R-Squared: 0.847 Adjusted R-Squared: 0.815 2SLS estimates for 'PrivateWages' (equation 3) Model Formula: privWage ~ gnp + gnpLag + trend Instruments: ~govExp + taxes + govWage + trend + capitalLag + corpProfLag + gnpLag Estimate Std. Error t value Pr(>|t|) (Intercept) 1.3431 1.1879 1.13 0.275 gnp 0.4438 0.0361 12.28 1.5e-09 *** gnpLag 0.1447 0.0392 3.69 0.002 ** trend 0.1238 0.0308 4.01 0.001 ** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 0.78 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 9.741 MSE: 0.609 Root MSE: 0.78 Multiple R-Squared: 0.988 Adjusted R-Squared: 0.985 > residuals Consumption Investment PrivateWages 1 NA NA NA 2 -0.6754 -1.214 -1.3401 3 -0.4627 0.325 0.2378 4 -1.1585 1.094 1.1117 5 -0.0305 -1.368 -0.1954 6 0.4693 0.486 -0.5355 7 NA NA NA 8 1.6045 1.066 -0.7908 9 1.6018 0.156 0.2831 10 NA 1.853 1.1353 11 -0.9031 -0.898 -0.1765 12 -1.5948 -1.012 0.6007 13 NA NA 0.1443 14 0.2854 0.845 0.4826 15 -0.4718 -0.365 0.3016 16 -0.2268 NA 0.0261 17 2.0079 1.685 -0.8614 18 -0.7434 -0.121 0.9927 19 -0.5410 -3.248 -0.4446 20 1.4186 0.241 -0.3914 21 1.1462 -0.013 -1.1115 22 -1.7256 0.489 0.5312 > fitted Consumption Investment PrivateWages 1 NA NA NA 2 42.6 1.014 26.8 3 45.5 1.575 29.1 4 50.4 4.106 33.0 5 50.6 4.368 34.1 6 52.1 4.614 35.9 7 NA NA NA 8 54.6 3.134 38.7 9 55.7 2.844 38.9 10 NA 3.247 40.2 11 55.9 1.898 38.1 12 52.5 -2.388 33.9 13 NA NA 28.9 14 46.2 -5.945 28.0 15 49.2 -2.635 30.3 16 51.5 NA 33.2 17 55.7 0.415 37.7 18 59.4 2.121 40.0 19 58.0 1.348 38.6 20 60.2 1.059 42.0 21 63.9 3.313 46.1 22 71.4 4.411 52.8 > predict Consumption.pred Consumption.se.fit Consumption.lwr Consumption.upr 1 NA NA NA NA 2 42.6 0.586 41.3 43.8 3 45.5 0.674 44.0 46.9 4 50.4 0.443 49.4 51.3 5 50.6 0.524 49.5 51.8 6 52.1 0.535 51.0 53.3 7 NA NA NA NA 8 54.6 0.431 53.7 55.5 9 55.7 0.510 54.6 56.8 10 NA NA NA NA 11 55.9 0.936 53.9 57.9 12 52.5 0.893 50.6 54.4 13 NA NA NA NA 14 46.2 0.713 44.7 47.7 15 49.2 0.501 48.1 50.2 16 51.5 0.407 50.7 52.4 17 55.7 0.457 54.7 56.7 18 59.4 0.397 58.6 60.3 19 58.0 0.564 56.8 59.2 20 60.2 0.543 59.0 61.3 21 63.9 0.529 62.7 65.0 22 71.4 0.808 69.7 73.2 Investment.pred Investment.se.fit Investment.lwr Investment.upr 1 NA NA NA NA 2 1.014 0.919 -0.957 2.985 3 1.575 0.602 0.284 2.867 4 4.106 0.544 2.940 5.272 5 4.368 0.450 3.402 5.333 6 4.614 0.425 3.703 5.526 7 NA NA NA NA 8 3.134 0.352 2.380 3.889 9 2.844 0.544 1.677 4.012 10 3.247 0.592 1.976 4.518 11 1.898 0.978 -0.200 3.996 12 -2.388 0.886 -4.289 -0.488 13 NA NA NA NA 14 -5.945 0.916 -7.909 -3.980 15 -2.635 0.518 -3.745 -1.525 16 NA NA NA NA 17 0.415 0.507 -0.671 1.501 18 2.121 0.329 1.416 2.826 19 1.348 0.551 0.166 2.529 20 1.059 0.582 -0.189 2.306 21 3.313 0.496 2.248 4.377 22 4.411 0.728 2.850 5.971 PrivateWages.pred PrivateWages.se.fit PrivateWages.lwr PrivateWages.upr 1 NA NA NA NA 2 26.8 0.330 26.1 27.5 3 29.1 0.344 28.3 29.8 4 33.0 0.363 32.2 33.8 5 34.1 0.260 33.5 34.6 6 35.9 0.268 35.4 36.5 7 NA NA NA NA 8 38.7 0.265 38.1 39.3 9 38.9 0.252 38.4 39.5 10 40.2 0.242 39.7 40.7 11 38.1 0.358 37.3 38.8 12 33.9 0.385 33.1 34.7 13 28.9 0.460 27.9 29.8 14 28.0 0.351 27.3 28.8 15 30.3 0.343 29.6 31.0 16 33.2 0.287 32.6 33.8 17 37.7 0.296 37.0 38.3 18 40.0 0.220 39.5 40.5 19 38.6 0.361 37.9 39.4 20 42.0 0.309 41.3 42.6 21 46.1 0.312 45.4 46.8 22 52.8 0.501 51.7 53.8 > model.frame consump corpProf corpProfLag wages invest capitalLag privWage gnp gnpLag 1 39.8 12.7 NA 31.0 2.7 180 28.8 44.9 NA 2 41.9 12.4 12.7 28.2 -0.2 183 25.5 45.6 44.9 3 45.0 16.9 12.4 32.2 1.9 183 29.3 50.1 45.6 4 49.2 18.4 16.9 37.0 5.2 184 34.1 57.2 50.1 5 50.6 19.4 18.4 37.0 3.0 190 33.9 57.1 57.2 6 52.6 20.1 19.4 38.6 5.1 193 35.4 61.0 57.1 7 55.1 19.6 20.1 40.7 5.6 198 37.4 64.0 NA 8 56.2 19.8 19.6 41.5 4.2 203 37.9 64.4 64.0 9 57.3 21.1 19.8 42.9 3.0 208 39.2 64.5 64.4 10 57.8 21.7 21.1 NA 5.1 211 41.3 67.0 64.5 11 55.0 15.6 21.7 42.1 1.0 216 37.9 61.2 67.0 12 50.9 11.4 15.6 39.3 -3.4 217 34.5 53.4 61.2 13 45.6 NA 11.4 34.3 -6.2 213 29.0 44.3 53.4 14 46.5 11.2 7.0 34.1 -5.1 207 28.5 45.1 44.3 15 48.7 12.3 11.2 36.6 -3.0 202 30.6 49.7 45.1 16 51.3 14.0 12.3 39.3 NA 199 33.2 54.4 49.7 17 57.7 17.6 14.0 44.2 2.1 198 36.8 62.7 54.4 18 58.7 17.3 17.6 47.7 2.0 200 41.0 65.0 62.7 19 57.5 15.3 17.3 45.9 -1.9 202 38.2 60.9 65.0 20 61.6 19.0 15.3 49.4 1.3 200 41.6 69.5 60.9 21 65.0 21.1 19.0 53.0 3.3 201 45.0 75.7 69.5 22 69.7 23.5 21.1 61.8 4.9 204 53.3 88.4 75.7 trend 1 -11 2 -10 3 -9 4 -8 5 -7 6 -6 7 -5 8 -4 9 -3 10 -2 11 -1 12 0 13 1 14 2 15 3 16 4 17 5 18 6 19 7 20 8 21 9 22 10 > model.matrix [1] "Attributes: < Component \"dim\": Mean relative difference: 0.0345 >" [2] "Attributes: < Component \"dimnames\": Component 1: 51 string mismatches >" [3] "Numeric: lengths (696, 672) differ" > nobs [1] 56 > linearHypothesis Linear hypothesis test (Theil's F test) Hypothesis: Consumption_corpProf + Investment_capitalLag = 0 Model 1: restricted model Model 2: kleinModel Res.Df Df F Pr(>F) 1 45 2 44 1 1.27 0.27 Linear hypothesis test (F statistic of a Wald test) Hypothesis: Consumption_corpProf + Investment_capitalLag = 0 Model 1: restricted model Model 2: kleinModel Res.Df Df F Pr(>F) 1 45 2 44 1 1.66 0.2 Linear hypothesis test (Chi^2 statistic of a Wald test) Hypothesis: Consumption_corpProf + Investment_capitalLag = 0 Model 1: restricted model Model 2: kleinModel Res.Df Df Chisq Pr(>Chisq) 1 45 2 44 1 1.66 0.2 Linear hypothesis test (Theil's F test) Hypothesis: Consumption_corpProf + Investment_capitalLag = 0 Consumption_corpProfLag - PrivateWages_trend = 0 Model 1: restricted model Model 2: kleinModel Res.Df Df F Pr(>F) 1 46 2 44 2 0.64 0.53 Linear hypothesis test (F statistic of a Wald test) Hypothesis: Consumption_corpProf + Investment_capitalLag = 0 Consumption_corpProfLag - PrivateWages_trend = 0 Model 1: restricted model Model 2: kleinModel Res.Df Df F Pr(>F) 1 46 2 44 2 0.84 0.44 Linear hypothesis test (Chi^2 statistic of a Wald test) Hypothesis: Consumption_corpProf + Investment_capitalLag = 0 Consumption_corpProfLag - PrivateWages_trend = 0 Model 1: restricted model Model 2: kleinModel Res.Df Df Chisq Pr(>Chisq) 1 46 2 44 2 1.68 0.43 > logLik 'log Lik.' -69.5 (df=13) 'log Lik.' -77.5 (df=13) > > # SUR Warning in systemfit(system, method = method, data = KleinI, methodResidCov = ifelse(method == : the estimation of systems of equations with unequal numbers of observations has not been thoroughly tested yet > summary systemfit results method: SUR N DF SSR detRCov OLS-R2 McElroy-R2 system 58 46 45.1 0.199 0.975 0.993 N DF SSR MSE RMSE R2 Adj R2 Consumption 19 15 17.5 1.167 1.080 0.980 0.975 Investment 19 15 17.3 1.155 1.075 0.906 0.887 PrivateWages 20 16 10.3 0.642 0.801 0.987 0.985 The covariance matrix of the residuals used for estimation Consumption Investment PrivateWages Consumption 0.9830 0.0466 -0.391 Investment 0.0466 0.8101 0.115 PrivateWages -0.3906 0.1155 0.496 The covariance matrix of the residuals Consumption Investment PrivateWages Consumption 0.979 0.080 -0.452 Investment 0.080 0.810 0.181 PrivateWages -0.452 0.181 0.521 The correlations of the residuals Consumption Investment PrivateWages Consumption 1.0000 0.0907 -0.636 Investment 0.0907 1.0000 0.267 PrivateWages -0.6362 0.2671 1.000 SUR estimates for 'Consumption' (equation 1) Model Formula: consump ~ corpProf + corpProfLag + wages Estimate Std. Error t value Pr(>|t|) (Intercept) 16.2670 1.3148 12.37 2.8e-09 *** corpProf 0.1942 0.0954 2.04 0.06 . corpProfLag 0.0747 0.0842 0.89 0.39 wages 0.8011 0.0383 20.93 1.6e-12 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.08 on 15 degrees of freedom Number of observations: 19 Degrees of Freedom: 15 SSR: 17.501 MSE: 1.167 Root MSE: 1.08 Multiple R-Squared: 0.98 Adjusted R-Squared: 0.975 SUR estimates for 'Investment' (equation 2) Model Formula: invest ~ corpProf + corpProfLag + capitalLag Estimate Std. Error t value Pr(>|t|) (Intercept) 12.6390 4.7856 2.64 0.01852 * corpProf 0.4708 0.0943 4.99 0.00016 *** corpProfLag 0.3533 0.0907 3.89 0.00144 ** capitalLag -0.1254 0.0236 -5.32 8.6e-05 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.075 on 15 degrees of freedom Number of observations: 19 Degrees of Freedom: 15 SSR: 17.321 MSE: 1.155 Root MSE: 1.075 Multiple R-Squared: 0.906 Adjusted R-Squared: 0.887 SUR estimates for 'PrivateWages' (equation 3) Model Formula: privWage ~ gnp + gnpLag + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 1.3264 1.1240 1.18 0.2552 gnp 0.4184 0.0268 15.63 4.1e-11 *** gnpLag 0.1714 0.0315 5.43 5.5e-05 *** trend 0.1456 0.0284 5.13 0.0001 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 0.801 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 10.266 MSE: 0.642 Root MSE: 0.801 Multiple R-Squared: 0.987 Adjusted R-Squared: 0.985 > residuals Consumption Investment PrivateWages 1 NA NA NA 2 -0.3143 -0.2326 -1.1434 3 -1.2700 -0.1705 0.5084 4 -1.5426 1.0718 1.4211 5 -0.4489 -1.4767 -0.0992 6 0.0588 0.3167 -0.3594 7 0.9213 1.4446 NA 8 1.3789 0.8296 -0.7554 9 1.0900 -0.5263 0.2887 10 NA 1.2083 1.1800 11 0.3569 0.4082 -0.3673 12 -0.2288 0.2663 0.3445 13 NA NA -0.1571 14 0.2181 0.4946 0.4220 15 -0.1120 -0.0470 0.3147 16 -0.0872 NA 0.0145 17 1.5615 1.0289 -0.8091 18 -0.4530 0.0617 0.8608 19 0.1997 -2.5397 -0.7635 20 0.9268 -0.6136 -0.4046 21 0.7588 -0.7465 -1.2179 22 -2.2137 -0.6044 0.5606 > fitted Consumption Investment PrivateWages 1 NA NA NA 2 42.2 0.0326 26.6 3 46.3 2.0705 28.8 4 50.7 4.1282 32.7 5 51.0 4.4767 34.0 6 52.5 4.7833 35.8 7 54.2 4.1554 NA 8 54.8 3.3704 38.7 9 56.2 3.5263 38.9 10 NA 3.8917 40.1 11 54.6 0.5918 38.3 12 51.1 -3.6663 34.2 13 NA NA 29.2 14 46.3 -5.5946 28.1 15 48.8 -2.9530 30.3 16 51.4 NA 33.2 17 56.1 1.0711 37.6 18 59.2 1.9383 40.1 19 57.3 0.6397 39.0 20 60.7 1.9136 42.0 21 64.2 4.0465 46.2 22 71.9 5.5044 52.7 > predict Consumption.pred Consumption.se.fit Consumption.lwr Consumption.upr 1 NA NA NA NA 2 42.2 0.460 41.3 43.1 3 46.3 0.489 45.3 47.3 4 50.7 0.328 50.1 51.4 5 51.0 0.384 50.3 51.8 6 52.5 0.389 51.8 53.3 7 54.2 0.347 53.5 54.9 8 54.8 0.319 54.2 55.5 9 56.2 0.353 55.5 56.9 10 NA NA NA NA 11 54.6 0.583 53.5 55.8 12 51.1 0.524 50.1 52.2 13 NA NA NA NA 14 46.3 0.589 45.1 47.5 15 48.8 0.393 48.0 49.6 16 51.4 0.337 50.7 52.1 17 56.1 0.345 55.4 56.8 18 59.2 0.318 58.5 59.8 19 57.3 0.381 56.5 58.1 20 60.7 0.413 59.8 61.5 21 64.2 0.417 63.4 65.1 22 71.9 0.651 70.6 73.2 Investment.pred Investment.se.fit Investment.lwr Investment.upr 1 NA NA NA NA 2 0.0326 0.556 -1.0866 1.15 3 2.0705 0.454 1.1575 2.98 4 4.1282 0.399 3.3256 4.93 5 4.4767 0.331 3.8101 5.14 6 4.7833 0.314 4.1520 5.41 7 4.1554 0.291 3.5687 4.74 8 3.3704 0.260 2.8469 3.89 9 3.5263 0.347 2.8278 4.22 10 3.8917 0.397 3.0924 4.69 11 0.5918 0.578 -0.5711 1.75 12 -3.6663 0.551 -4.7762 -2.56 13 NA NA NA NA 14 -5.5946 0.661 -6.9261 -4.26 15 -2.9530 0.392 -3.7430 -2.16 16 NA NA NA NA 17 1.0711 0.318 0.4315 1.71 18 1.9383 0.225 1.4863 2.39 19 0.6397 0.310 0.0165 1.26 20 1.9136 0.333 1.2436 2.58 21 4.0465 0.304 3.4345 4.66 22 5.5044 0.429 4.6400 6.37 PrivateWages.pred PrivateWages.se.fit PrivateWages.lwr PrivateWages.upr 1 NA NA NA NA 2 26.6 0.321 26.0 27.3 3 28.8 0.321 28.1 29.4 4 32.7 0.316 32.0 33.3 5 34.0 0.244 33.5 34.5 6 35.8 0.242 35.3 36.2 7 NA NA NA NA 8 38.7 0.246 38.2 39.2 9 38.9 0.234 38.4 39.4 10 40.1 0.225 39.7 40.6 11 38.3 0.301 37.7 38.9 12 34.2 0.298 33.6 34.8 13 29.2 0.353 28.4 29.9 14 28.1 0.330 27.4 28.7 15 30.3 0.328 29.6 30.9 16 33.2 0.275 32.6 33.7 17 37.6 0.270 37.1 38.2 18 40.1 0.213 39.7 40.6 19 39.0 0.301 38.4 39.6 20 42.0 0.287 41.4 42.6 21 46.2 0.304 45.6 46.8 22 52.7 0.448 51.8 53.6 > model.frame [1] TRUE > model.matrix [1] TRUE > nobs [1] 58 > linearHypothesis Linear hypothesis test (Theil's F test) Hypothesis: Consumption_corpProf + Investment_capitalLag = 0 Model 1: restricted model Model 2: kleinModel Res.Df Df F Pr(>F) 1 47 2 46 1 0.4 0.53 Linear hypothesis test (F statistic of a Wald test) Hypothesis: Consumption_corpProf + Investment_capitalLag = 0 Model 1: restricted model Model 2: kleinModel Res.Df Df F Pr(>F) 1 47 2 46 1 0.49 0.49 Linear hypothesis test (Chi^2 statistic of a Wald test) Hypothesis: Consumption_corpProf + Investment_capitalLag = 0 Model 1: restricted model Model 2: kleinModel Res.Df Df Chisq Pr(>Chisq) 1 47 2 46 1 0.49 0.48 Linear hypothesis test (Theil's F test) Hypothesis: Consumption_corpProf + Investment_capitalLag = 0 Consumption_corpProfLag - PrivateWages_trend = 0 Model 1: restricted model Model 2: kleinModel Res.Df Df F Pr(>F) 1 48 2 46 2 0.31 0.74 Linear hypothesis test (F statistic of a Wald test) Hypothesis: Consumption_corpProf + Investment_capitalLag = 0 Consumption_corpProfLag - PrivateWages_trend = 0 Model 1: restricted model Model 2: kleinModel Res.Df Df F Pr(>F) 1 48 2 46 2 0.37 0.69 Linear hypothesis test (Chi^2 statistic of a Wald test) Hypothesis: Consumption_corpProf + Investment_capitalLag = 0 Consumption_corpProfLag - PrivateWages_trend = 0 Model 1: restricted model Model 2: kleinModel Res.Df Df Chisq Pr(>Chisq) 1 48 2 46 2 0.75 0.69 > logLik 'log Lik.' -66.4 (df=18) 'log Lik.' -74.1 (df=18) > > # 3SLS Warning in systemfit(system, method = method, data = KleinI, inst = inst, : the estimation of systems of equations with unequal numbers of observations has not been thoroughly tested yet > summary systemfit results method: 3SLS N DF SSR detRCov OLS-R2 McElroy-R2 system 56 44 67.5 0.436 0.963 0.993 N DF SSR MSE RMSE R2 Adj R2 Consumption 18 14 22.4 1.598 1.264 0.974 0.968 Investment 18 14 35.0 2.503 1.582 0.793 0.749 PrivateWages 20 16 10.1 0.629 0.793 0.987 0.985 The covariance matrix of the residuals used for estimation Consumption Investment PrivateWages Consumption 1.307 0.540 -0.431 Investment 0.540 1.319 0.119 PrivateWages -0.431 0.119 0.496 The covariance matrix of the residuals Consumption Investment PrivateWages Consumption 1.309 0.638 -0.440 Investment 0.638 1.749 0.233 PrivateWages -0.440 0.233 0.519 The correlations of the residuals Consumption Investment PrivateWages Consumption 1.000 0.422 -0.532 Investment 0.422 1.000 0.247 PrivateWages -0.532 0.247 1.000 3SLS estimates for 'Consumption' (equation 1) Model Formula: consump ~ corpProf + corpProfLag + wages Instruments: ~govExp + taxes + govWage + trend + capitalLag + corpProfLag + gnpLag Estimate Std. Error t value Pr(>|t|) (Intercept) 18.0338 1.5648 11.52 1.6e-08 *** corpProf -0.0632 0.1500 -0.42 0.68 corpProfLag 0.1784 0.1154 1.55 0.14 wages 0.8224 0.0444 18.54 3.0e-11 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.264 on 14 degrees of freedom Number of observations: 18 Degrees of Freedom: 14 SSR: 22.377 MSE: 1.598 Root MSE: 1.264 Multiple R-Squared: 0.974 Adjusted R-Squared: 0.968 3SLS estimates for 'Investment' (equation 2) Model Formula: invest ~ corpProf + corpProfLag + capitalLag Instruments: ~govExp + taxes + govWage + trend + capitalLag + corpProfLag + gnpLag Estimate Std. Error t value Pr(>|t|) (Intercept) 24.6766 6.7008 3.68 0.00246 ** corpProf 0.0472 0.1843 0.26 0.80149 corpProfLag 0.6874 0.1577 4.36 0.00065 *** capitalLag -0.1776 0.0318 -5.59 6.7e-05 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.582 on 14 degrees of freedom Number of observations: 18 Degrees of Freedom: 14 SSR: 35.037 MSE: 2.503 Root MSE: 1.582 Multiple R-Squared: 0.793 Adjusted R-Squared: 0.749 3SLS estimates for 'PrivateWages' (equation 3) Model Formula: privWage ~ gnp + gnpLag + trend Instruments: ~govExp + taxes + govWage + trend + capitalLag + corpProfLag + gnpLag Estimate Std. Error t value Pr(>|t|) (Intercept) 0.7823 1.1254 0.70 0.49695 gnp 0.4257 0.0308 13.80 2.6e-10 *** gnpLag 0.1728 0.0341 5.07 0.00011 *** trend 0.1252 0.0291 4.30 0.00055 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 0.793 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 10.057 MSE: 0.629 Root MSE: 0.793 Multiple R-Squared: 0.987 Adjusted R-Squared: 0.985 > residuals Consumption Investment PrivateWages 1 NA NA NA 2 -0.8058 -1.721 -1.20135 3 -0.6573 0.337 0.43696 4 -1.1124 0.810 1.31177 5 0.0833 -1.544 -0.19794 6 0.6334 0.368 -0.46596 7 NA NA NA 8 1.7939 1.245 -0.85614 9 1.7891 0.593 0.20698 10 NA 2.303 1.10034 11 -0.5397 -1.015 -0.38801 12 -1.5147 -0.846 0.40949 13 NA NA 0.00602 14 -0.1171 1.670 0.61306 15 -0.6526 -0.075 0.49152 16 -0.3617 NA 0.17066 17 1.9331 2.086 -0.69991 18 -0.6063 -0.101 0.96136 19 -0.3990 -3.345 -0.61606 20 1.4134 0.717 -0.29343 21 1.3257 0.306 -1.14412 22 -1.4340 0.935 0.55310 > fitted Consumption Investment PrivateWages 1 NA NA NA 2 42.7 1.5213 26.7 3 45.7 1.5632 28.9 4 50.3 4.3898 32.8 5 50.5 4.5444 34.1 6 52.0 4.7320 35.9 7 NA NA NA 8 54.4 2.9547 38.8 9 55.5 2.4075 39.0 10 NA 2.7965 40.2 11 55.5 2.0150 38.3 12 52.4 -2.5541 34.1 13 NA NA 29.0 14 46.6 -6.7699 27.9 15 49.4 -2.9250 30.1 16 51.7 NA 33.0 17 55.8 0.0139 37.5 18 59.3 2.1013 40.0 19 57.9 1.4453 38.8 20 60.2 0.5828 41.9 21 63.7 2.9944 46.1 22 71.1 3.9651 52.7 > predict Consumption.pred Consumption.se.fit Consumption.lwr Consumption.upr 1 NA NA NA NA 2 42.7 0.555 39.7 45.7 3 45.7 0.628 42.6 48.7 4 50.3 0.418 47.5 53.2 5 50.5 0.492 47.6 53.4 6 52.0 0.501 49.0 54.9 7 NA NA NA NA 8 54.4 0.405 51.6 57.3 9 55.5 0.477 52.6 58.4 10 NA NA NA NA 11 55.5 0.832 52.3 58.8 12 52.4 0.792 49.2 55.6 13 NA NA NA NA 14 46.6 0.676 43.5 49.7 15 49.4 0.470 46.5 52.2 16 51.7 0.386 48.8 54.5 17 55.8 0.433 52.9 58.6 18 59.3 0.368 56.5 62.1 19 57.9 0.504 55.0 60.8 20 60.2 0.513 57.3 63.1 21 63.7 0.505 60.8 66.6 22 71.1 0.771 68.0 74.3 Investment.pred Investment.se.fit Investment.lwr Investment.upr 1 NA NA NA NA 2 1.5213 0.857 -2.337 5.380 3 1.5632 0.589 -2.058 5.184 4 4.3898 0.519 0.819 7.961 5 4.5444 0.436 1.025 8.064 6 4.7320 0.415 1.224 8.240 7 NA NA NA NA 8 2.9547 0.342 -0.517 6.426 9 2.4075 0.511 -1.158 5.973 10 2.7965 0.556 -0.800 6.393 11 2.0150 0.955 -1.948 5.978 12 -2.5541 0.874 -6.431 1.323 13 NA NA NA NA 14 -6.7699 0.865 -10.637 -2.903 15 -2.9250 0.503 -6.485 0.635 16 NA NA NA NA 17 0.0139 0.483 -3.534 3.561 18 2.1013 0.320 -1.361 5.563 19 1.4453 0.532 -2.134 5.025 20 0.5828 0.550 -3.010 4.175 21 2.9944 0.476 -0.549 6.538 22 3.9651 0.692 0.261 7.669 PrivateWages.pred PrivateWages.se.fit PrivateWages.lwr PrivateWages.upr 1 NA NA NA NA 2 26.7 0.324 24.9 28.5 3 28.9 0.331 27.0 30.7 4 32.8 0.339 31.0 34.6 5 34.1 0.248 32.3 35.9 6 35.9 0.256 34.1 37.6 7 NA NA NA NA 8 38.8 0.251 37.0 40.5 9 39.0 0.238 37.2 40.7 10 40.2 0.232 38.4 42.0 11 38.3 0.314 36.5 40.1 12 34.1 0.327 32.3 35.9 13 29.0 0.393 27.1 30.9 14 27.9 0.329 26.1 29.7 15 30.1 0.324 28.3 31.9 16 33.0 0.271 31.3 34.8 17 37.5 0.277 35.7 39.3 18 40.0 0.213 38.3 41.8 19 38.8 0.320 37.0 40.6 20 41.9 0.295 40.1 43.7 21 46.1 0.309 44.3 47.9 22 52.7 0.476 50.8 54.7 > model.frame [1] TRUE > model.matrix [1] "Attributes: < Component \"dim\": Mean relative difference: 0.0345 >" [2] "Attributes: < Component \"dimnames\": Component 1: 51 string mismatches >" [3] "Numeric: lengths (696, 672) differ" > nobs [1] 56 > linearHypothesis Linear hypothesis test (Theil's F test) Hypothesis: Consumption_corpProf + Investment_capitalLag = 0 Model 1: restricted model Model 2: kleinModel Res.Df Df F Pr(>F) 1 45 2 44 1 1.91 0.17 Linear hypothesis test (F statistic of a Wald test) Hypothesis: Consumption_corpProf + Investment_capitalLag = 0 Model 1: restricted model Model 2: kleinModel Res.Df Df F Pr(>F) 1 45 2 44 1 2.6 0.11 Linear hypothesis test (Chi^2 statistic of a Wald test) Hypothesis: Consumption_corpProf + Investment_capitalLag = 0 Model 1: restricted model Model 2: kleinModel Res.Df Df Chisq Pr(>Chisq) 1 45 2 44 1 2.6 0.11 Linear hypothesis test (Theil's F test) Hypothesis: Consumption_corpProf + Investment_capitalLag = 0 Consumption_corpProfLag - PrivateWages_trend = 0 Model 1: restricted model Model 2: kleinModel Res.Df Df F Pr(>F) 1 46 2 44 2 1.62 0.21 Linear hypothesis test (F statistic of a Wald test) Hypothesis: Consumption_corpProf + Investment_capitalLag = 0 Consumption_corpProfLag - PrivateWages_trend = 0 Model 1: restricted model Model 2: kleinModel Res.Df Df F Pr(>F) 1 46 2 44 2 2.2 0.12 Linear hypothesis test (Chi^2 statistic of a Wald test) Hypothesis: Consumption_corpProf + Investment_capitalLag = 0 Consumption_corpProfLag - PrivateWages_trend = 0 Model 1: restricted model Model 2: kleinModel Res.Df Df Chisq Pr(>Chisq) 1 46 2 44 2 4.41 0.11 > logLik 'log Lik.' -70.1 (df=18) 'log Lik.' -80.6 (df=18) > > # I3SLS Warning in systemfit(system, method = method, data = KleinI, inst = inst, : the estimation of systems of equations with unequal numbers of observations has not been thoroughly tested yet > summary systemfit results method: iterated 3SLS convergence achieved after 10 iterations N DF SSR detRCov OLS-R2 McElroy-R2 system 56 44 79.4 0.55 0.956 0.994 N DF SSR MSE RMSE R2 Adj R2 Consumption 18 14 22.3 1.595 1.263 0.974 0.968 Investment 18 14 46.8 3.346 1.829 0.724 0.664 PrivateWages 20 16 10.2 0.639 0.799 0.987 0.985 The covariance matrix of the residuals used for estimation Consumption Investment PrivateWages Consumption 1.307 0.750 -0.452 Investment 0.750 2.318 0.272 PrivateWages -0.452 0.272 0.530 The covariance matrix of the residuals Consumption Investment PrivateWages Consumption 1.307 0.750 -0.452 Investment 0.750 2.318 0.272 PrivateWages -0.452 0.272 0.530 The correlations of the residuals Consumption Investment PrivateWages Consumption 1.000 0.424 -0.542 Investment 0.424 1.000 0.254 PrivateWages -0.542 0.254 1.000 3SLS estimates for 'Consumption' (equation 1) Model Formula: consump ~ corpProf + corpProfLag + wages Instruments: ~govExp + taxes + govWage + trend + capitalLag + corpProfLag + gnpLag Estimate Std. Error t value Pr(>|t|) (Intercept) 18.3252 1.5452 11.86 1.1e-08 *** corpProf -0.0436 0.1470 -0.30 0.77 corpProfLag 0.1614 0.1127 1.43 0.17 wages 0.8127 0.0436 18.65 2.8e-11 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.263 on 14 degrees of freedom Number of observations: 18 Degrees of Freedom: 14 SSR: 22.337 MSE: 1.595 Root MSE: 1.263 Multiple R-Squared: 0.974 Adjusted R-Squared: 0.968 3SLS estimates for 'Investment' (equation 2) Model Formula: invest ~ corpProf + corpProfLag + capitalLag Instruments: ~govExp + taxes + govWage + trend + capitalLag + corpProfLag + gnpLag Estimate Std. Error t value Pr(>|t|) (Intercept) 30.2418 8.3674 3.61 0.00282 ** corpProf -0.0437 0.2341 -0.19 0.85457 corpProfLag 0.7856 0.1993 3.94 0.00147 ** capitalLag -0.2065 0.0397 -5.20 0.00014 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.829 on 14 degrees of freedom Number of observations: 18 Degrees of Freedom: 14 SSR: 46.838 MSE: 3.346 Root MSE: 1.829 Multiple R-Squared: 0.724 Adjusted R-Squared: 0.664 3SLS estimates for 'PrivateWages' (equation 3) Model Formula: privWage ~ gnp + gnpLag + trend Instruments: ~govExp + taxes + govWage + trend + capitalLag + corpProfLag + gnpLag Estimate Std. Error t value Pr(>|t|) (Intercept) 0.4741 1.1280 0.42 0.67983 gnp 0.4268 0.0296 14.44 1.4e-10 *** gnpLag 0.1767 0.0330 5.35 6.5e-05 *** trend 0.1201 0.0290 4.14 0.00076 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 0.799 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 10.218 MSE: 0.639 Root MSE: 0.799 Multiple R-Squared: 0.987 Adjusted R-Squared: 0.985 > residuals Consumption Investment PrivateWages 1 NA NA NA 2 -0.8546 -2.1226 -1.1687 3 -0.7611 0.3684 0.4670 4 -1.1233 0.5912 1.3216 5 0.0781 -1.6694 -0.2108 6 0.6467 0.2952 -0.4776 7 NA NA NA 8 1.8444 1.4348 -0.8884 9 1.8309 1.0020 0.1781 10 NA 2.7265 1.0734 11 -0.3652 -1.0581 -0.4134 12 -1.3877 -0.6431 0.4203 13 NA NA 0.0623 14 -0.1818 2.4214 0.7091 15 -0.6438 0.2168 0.5845 16 -0.3417 NA 0.2455 17 1.9583 2.4607 -0.6474 18 -0.4806 -0.0468 0.9840 19 -0.2563 -3.3855 -0.5930 20 1.4832 1.1550 -0.2586 21 1.4514 0.6086 -1.1446 22 -1.2351 1.3453 0.5196 > fitted Consumption Investment PrivateWages 1 NA NA NA 2 42.8 1.923 26.7 3 45.8 1.532 28.8 4 50.3 4.609 32.8 5 50.5 4.669 34.1 6 52.0 4.805 35.9 7 NA NA NA 8 54.4 2.765 38.8 9 55.5 1.998 39.0 10 NA 2.373 40.2 11 55.4 2.058 38.3 12 52.3 -2.757 34.1 13 NA NA 28.9 14 46.7 -7.521 27.8 15 49.3 -3.217 30.0 16 51.6 NA 33.0 17 55.7 -0.361 37.4 18 59.2 2.047 40.0 19 57.8 1.485 38.8 20 60.1 0.145 41.9 21 63.5 2.691 46.1 22 70.9 3.555 52.8 > predict Consumption.pred Consumption.se.fit Consumption.lwr Consumption.upr 1 NA NA NA NA 2 42.8 0.548 41.7 43.9 3 45.8 0.618 44.5 47.0 4 50.3 0.411 49.5 51.2 5 50.5 0.481 49.6 51.5 6 52.0 0.490 51.0 52.9 7 NA NA NA NA 8 54.4 0.396 53.6 55.2 9 55.5 0.467 54.5 56.4 10 NA NA NA NA 11 55.4 0.811 53.7 57.0 12 52.3 0.775 50.7 53.8 13 NA NA NA NA 14 46.7 0.665 45.3 48.0 15 49.3 0.463 48.4 50.3 16 51.6 0.381 50.9 52.4 17 55.7 0.428 54.9 56.6 18 59.2 0.360 58.5 59.9 19 57.8 0.492 56.8 58.7 20 60.1 0.508 59.1 61.1 21 63.5 0.499 62.5 64.6 22 70.9 0.761 69.4 72.5 Investment.pred Investment.se.fit Investment.lwr Investment.upr 1 NA NA NA NA 2 1.923 1.079 -0.2526 4.098 3 1.532 0.766 -0.0119 3.075 4 4.609 0.668 3.2632 5.954 5 4.669 0.566 3.5280 5.811 6 4.805 0.543 3.7104 5.899 7 NA NA NA NA 8 2.765 0.447 1.8648 3.665 9 1.998 0.651 0.6860 3.310 10 2.373 0.710 0.9434 3.804 11 2.058 1.237 -0.4350 4.551 12 -2.757 1.139 -5.0532 -0.461 13 NA NA NA NA 14 -7.521 1.094 -9.7261 -5.317 15 -3.217 0.648 -4.5217 -1.912 16 NA NA NA NA 17 -0.361 0.615 -1.6007 0.879 18 2.047 0.417 1.2060 2.888 19 1.485 0.684 0.1062 2.865 20 0.145 0.699 -1.2632 1.553 21 2.691 0.614 1.4548 3.928 22 3.555 0.887 1.7674 5.342 PrivateWages.pred PrivateWages.se.fit PrivateWages.lwr PrivateWages.upr 1 NA NA NA NA 2 26.7 0.330 26.0 27.3 3 28.8 0.336 28.2 29.5 4 32.8 0.340 32.1 33.5 5 34.1 0.251 33.6 34.6 6 35.9 0.259 35.4 36.4 7 NA NA NA NA 8 38.8 0.253 38.3 39.3 9 39.0 0.240 38.5 39.5 10 40.2 0.236 39.8 40.7 11 38.3 0.307 37.7 38.9 12 34.1 0.313 33.4 34.7 13 28.9 0.376 28.2 29.7 14 27.8 0.327 27.1 28.4 15 30.0 0.322 29.4 30.7 16 33.0 0.270 32.4 33.5 17 37.4 0.275 36.9 38.0 18 40.0 0.216 39.6 40.5 19 38.8 0.314 38.2 39.4 20 41.9 0.296 41.3 42.5 21 46.1 0.317 45.5 46.8 22 52.8 0.480 51.8 53.7 > model.frame [1] TRUE > model.matrix [1] "Attributes: < Component \"dim\": Mean relative difference: 0.0345 >" [2] "Attributes: < Component \"dimnames\": Component 1: 51 string mismatches >" [3] "Numeric: lengths (696, 672) differ" > nobs [1] 56 > linearHypothesis Linear hypothesis test (Theil's F test) Hypothesis: Consumption_corpProf + Investment_capitalLag = 0 Model 1: restricted model Model 2: kleinModel Res.Df Df F Pr(>F) 1 45 2 44 1 2.29 0.14 Linear hypothesis test (F statistic of a Wald test) Hypothesis: Consumption_corpProf + Investment_capitalLag = 0 Model 1: restricted model Model 2: kleinModel Res.Df Df F Pr(>F) 1 45 2 44 1 2.89 0.096 . --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Linear hypothesis test (Chi^2 statistic of a Wald test) Hypothesis: Consumption_corpProf + Investment_capitalLag = 0 Model 1: restricted model Model 2: kleinModel Res.Df Df Chisq Pr(>Chisq) 1 45 2 44 1 2.89 0.089 . --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Linear hypothesis test (Theil's F test) Hypothesis: Consumption_corpProf + Investment_capitalLag = 0 Consumption_corpProfLag - PrivateWages_trend = 0 Model 1: restricted model Model 2: kleinModel Res.Df Df F Pr(>F) 1 46 2 44 2 2.3 0.11 Linear hypothesis test (F statistic of a Wald test) Hypothesis: Consumption_corpProf + Investment_capitalLag = 0 Consumption_corpProfLag - PrivateWages_trend = 0 Model 1: restricted model Model 2: kleinModel Res.Df Df F Pr(>F) 1 46 2 44 2 2.9 0.066 . --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Linear hypothesis test (Chi^2 statistic of a Wald test) Hypothesis: Consumption_corpProf + Investment_capitalLag = 0 Consumption_corpProfLag - PrivateWages_trend = 0 Model 1: restricted model Model 2: kleinModel Res.Df Df Chisq Pr(>Chisq) 1 46 2 44 2 5.79 0.055 . --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 > logLik 'log Lik.' -72.2 (df=18) 'log Lik.' -83.4 (df=18) > > proc.time() user system elapsed 3.20 0.12 3.32 systemfit/tests/test_ols.R0000644000176200001440000006046312565325302015436 0ustar liggesuserslibrary( systemfit ) options( digits = 3 ) data( "Kmenta" ) useMatrix <- FALSE demand <- consump ~ price + income supply <- consump ~ price + farmPrice + trend system <- list( demand = demand, supply = supply ) restrm <- matrix(0,1,7) # restriction matrix "R" restrm[1,3] <- 1 restrm[1,7] <- -1 restrict <- "demand_income - supply_trend = 0" restr2m <- matrix(0,2,7) # restriction matrix "R" 2 restr2m[1,3] <- 1 restr2m[1,7] <- -1 restr2m[2,2] <- -1 restr2m[2,5] <- 1 restr2q <- c( 0, 0.5 ) # restriction vector "q" 2 restrict2 <- c( "demand_income - supply_trend = 0", "- demand_price + supply_price = 0.5" ) tc <- matrix(0,7,6) tc[1,1] <- 1 tc[2,2] <- 1 tc[3,3] <- 1 tc[4,4] <- 1 tc[5,5] <- 1 tc[6,6] <- 1 tc[7,3] <- 1 restr3m <- matrix(0,1,6) # restriction matrix "R" 2 restr3m[1,2] <- -1 restr3m[1,5] <- 1 restr3q <- c( 0.5 ) # restriction vector "q" 2 restrict3 <- "- C2 + C5 = 0.5" # It is not possible to estimate OLS with systemfit # exactly as EViews does, because EViews uses # methodResidCov == "geomean" for the coefficient covariance matrix and # methodResidCov == "noDfCor" for the residual covariance matrix, while # systemfit uses always the same formulas for both calculations. ## ******* single-equation OLS estimations ********************* lmDemand <- lm( demand, data = Kmenta ) lmSupply <- lm( supply, data = Kmenta ) ## *************** OLS estimation ************************ ## ********** OLS estimation (default) ******************** fitols1 <- systemfit( system, "OLS", data = Kmenta, useMatrix = useMatrix ) print( summary( fitols1 ) ) nobs( fitols1 ) all.equal( coef( fitols1 ), c( coef( lmDemand ), coef( lmSupply ) ), check.attributes = FALSE ) all.equal( coef( summary( fitols1 ) ), rbind( coef( summary( lmDemand ) ), coef( summary( lmSupply ) ) ), check.attributes = FALSE ) all.equal( vcov( fitols1 ), as.matrix( bdiag( vcov( lmDemand ), vcov( lmSupply ) ) ), check.attributes = FALSE ) ## ********** OLS estimation (no singleEqSigma=F) ****************** fitols1s <- systemfit( system, "OLS", data = Kmenta, singleEqSigma = FALSE, useMatrix = useMatrix ) print( summary( fitols1s ) ) all.equal( coef( fitols1s ), c( coef( lmDemand ), coef( lmSupply ) ), check.attributes = FALSE ) ## **************** OLS (useDfSys=T) *********************** print( summary( fitols1, useDfSys = TRUE ) ) ## **************** OLS (methodResidCov="noDfCor") *********************** fitols1r <- systemfit( system, "OLS", data = Kmenta, methodResidCov = "noDfCor", x = TRUE, useMatrix = useMatrix ) print( summary( fitols1r ) ) all.equal( coef( fitols1r ), c( coef( lmDemand ), coef( lmSupply ) ), check.attributes = FALSE ) ## ******** OLS (methodResidCov="noDfCor", singleEqSigma=F) *********** fitols1rs <- systemfit( system, "OLS", data = Kmenta, methodResidCov = "noDfCor", singleEqSigma = FALSE, useMatrix = useMatrix ) print( summary( fitols1rs ) ) all.equal( coef( fitols1rs ), c( coef( lmDemand ), coef( lmSupply ) ), check.attributes = FALSE ) ## **************** OLS (methodResidCov="Theil" ) *********************** fitols1r <- systemfit( system, "OLS", data = Kmenta, methodResidCov = "Theil", x = TRUE, useMatrix = useMatrix ) print( summary( fitols1r ) ) all.equal( coef( fitols1r ), c( coef( lmDemand ), coef( lmSupply ) ), check.attributes = FALSE ) ## **************** OLS (methodResidCov="max") *********************** fitols1r <- systemfit( system, "OLS", data = Kmenta, methodResidCov = "max", x = TRUE, useMatrix = useMatrix ) print( summary( fitols1r ) ) ## ******** OLS (methodResidCov="max", singleEqSigma=F) *********** fitols1rs <- systemfit( system, "OLS", data = Kmenta, methodResidCov = "max", singleEqSigma = FALSE, useMatrix = useMatrix ) print( summary( fitols1rs ) ) ## ********* OLS with cross-equation restriction ************ ## ****** OLS with cross-equation restriction (default) ********* fitols2 <- systemfit( system, "OLS", data = Kmenta, restrict.matrix = restrm, useMatrix = useMatrix ) print( summary( fitols2 ) ) # the same with symbolically specified restrictions fitols2Sym <- systemfit( system, "OLS", data = Kmenta, restrict.matrix = restrict, useMatrix = useMatrix ) all.equal( fitols2, fitols2Sym ) ## ****** OLS with cross-equation restriction (singleEqSigma=T) ******* fitols2s <- systemfit( system, "OLS", data = Kmenta, restrict.matrix = restrm, singleEqSigma = TRUE, useMatrix = useMatrix ) print( summary( fitols2s ) ) ## ****** OLS with cross-equation restriction (useDfSys=F) ******* print( summary( fitols2, useDfSys = FALSE ) ) ## ****** OLS with cross-equation restriction (methodResidCov="noDfCor") ******* fitols2r <- systemfit( system, "OLS", data = Kmenta, restrict.matrix = restrm, methodResidCov = "noDfCor", useMatrix = useMatrix ) print( summary( fitols2r ) ) ## ** OLS with cross-equation restriction (methodResidCov="noDfCor",singleEqSigma=T) *** fitols2rs <- systemfit( system, "OLS", data = Kmenta, restrict.matrix = restrm, methodResidCov = "noDfCor", x = TRUE, useMatrix = useMatrix ) print( summary( fitols2rs ) ) ## *** OLS with cross-equation restriction via restrict.regMat *** ## *** OLS with cross-equation restriction via restrict.regMat (default) *** fitols3 <- systemfit( system, "OLS", data = Kmenta, restrict.regMat = tc, x = TRUE, useMatrix = useMatrix ) print( summary( fitols3 ) ) ## *** OLS with cross-equation restriction via restrict.regMat (singleEqSigma=T) *** fitols3s <- systemfit( system, "OLS", data = Kmenta, restrict.regMat = tc, singleEqSigma = TRUE, useMatrix = useMatrix ) print( summary( fitols3s ) ) ## *** OLS with cross-equation restriction via restrict.regMat (useDfSys=F) *** print( summary( fitols3, useDfSys = FALSE ) ) ## *** OLS with cross-equation restriction via restrict.regMat (methodResidCov="noDfCor") *** fitols3r <- systemfit( system, "OLS", data = Kmenta, restrict.regMat = tc, methodResidCov = "noDfCor", useMatrix = useMatrix ) print( summary( fitols3r ) ) ## OLS with cross-equation restriction via restrict.regMat (methodResidCov="noDfCor",singleEqSigma=T) fitols3rs <- systemfit( system, "OLS", data = Kmenta, restrict.regMat = tc, methodResidCov = "noDfCor", singleEqSigma = TRUE, useMatrix = useMatrix ) print( summary( fitols3rs ) ) ## ********* OLS with 2 cross-equation restrictions *********** ## ********* OLS with 2 cross-equation restrictions (default) *********** fitols4 <- systemfit( system, "OLS", data = Kmenta, restrict.matrix = restr2m, restrict.rhs = restr2q, useMatrix = useMatrix ) print( summary( fitols4 ) ) # the same with symbolically specified restrictions fitols4Sym <- systemfit( system, "OLS", data = Kmenta, restrict.matrix = restrict2, useMatrix = useMatrix ) all.equal( fitols4, fitols4Sym ) ## ****** OLS with 2 cross-equation restrictions (singleEqSigma=T) ******* fitols4s <- systemfit( system, "OLS", data = Kmenta, restrict.matrix = restr2m, restrict.rhs = restr2q, singleEqSigma = TRUE, x = TRUE, useMatrix = useMatrix ) print( summary( fitols4s ) ) ## ****** OLS with 2 cross-equation restrictions (useDfSys=F) ******* print( summary( fitols4, useDfSys = FALSE ) ) ## ****** OLS with 2 cross-equation restrictions (methodResidCov="noDfCor") ******* fitols4r <- systemfit( system, "OLS", data = Kmenta, restrict.matrix = restr2m, restrict.rhs = restr2q, methodResidCov = "noDfCor", useMatrix = useMatrix ) print( summary( fitols4r ) ) ## OLS with 2 cross-equation restrictions (methodResidCov="noDfCor", singleEqSigma=T) * fitols4rs <- systemfit( system, "OLS", data = Kmenta, restrict.matrix = restr2m, restrict.rhs = restr2q, methodResidCov = "noDfCor", singleEqSigma = TRUE, useMatrix = useMatrix ) print( summary( fitols4rs ) ) ## ***** OLS with 2 cross-equation restrictions via R and restrict.regMat **** ## ***** OLS with 2 cross-equation restrictions via R and restrict.regMat (default) **** fitols5 <- systemfit( system, "OLS", data = Kmenta, restrict.matrix = restr3m, restrict.rhs = restr3q, restrict.regMat = tc, methodResidCov = "noDfCor", useMatrix = useMatrix ) print( summary( fitols5 ) ) # the same with symbolically specified restrictions fitols5Sym <- systemfit( system, "OLS", data = Kmenta, restrict.matrix = restrict3, restrict.regMat = tc, methodResidCov = "noDfCor", useMatrix = useMatrix ) all.equal( fitols5, fitols5Sym ) ## ***** OLS with 2 cross-equation restrictions via R and restrict.regMat (singleEqSigma=T) **** fitols5s <- systemfit( system, "OLS", data = Kmenta,restrict.matrix = restr3m, restrict.rhs = restr3q, restrict.regMat = tc, singleEqSigma = T, x = TRUE, useMatrix = useMatrix ) print( summary( fitols5s ) ) ## ***** OLS with 2 cross-equation restrictions via R and restrict.regMat (useDfSys=F) **** fitols5o <- systemfit( system, "OLS", data = Kmenta,restrict.matrix = restr3m, restrict.rhs = restr3q, restrict.regMat = tc, useMatrix = useMatrix ) print( summary( fitols5o, useDfSys = FALSE ) ) ## OLS with 2 cross-equation restr. via R and restrict.regMat (methodResidCov="noDfCor",singleEqSigma=T) fitols5rs <- systemfit( system, "OLS", data = Kmenta,restrict.matrix = restr3m, restrict.rhs = restr3q, restrict.regMat = tc, methodResidCov = "noDfCor", singleEqSigma = TRUE, useMatrix = useMatrix ) print( summary( fitols5rs ) ) ## *********** estimations with a single regressor ************ fitolsS1 <- systemfit( list( consump ~ price - 1, consump ~ price + trend ), "OLS", data = Kmenta, useMatrix = useMatrix ) print( summary( fitolsS1 ) ) fitolsS2 <- systemfit( list( consump ~ price - 1, consump ~ trend - 1 ), "OLS", data = Kmenta, useMatrix = useMatrix ) print( summary( fitolsS2 ) ) fitolsS3 <- systemfit( list( consump ~ trend - 1, price ~ trend - 1 ), "OLS", data = Kmenta, useMatrix = useMatrix ) print( summary( fitolsS3 ) ) fitolsS4 <- systemfit( list( consump ~ trend - 1, price ~ trend - 1 ), "OLS", data = Kmenta, restrict.matrix = matrix( c( 1, -1 ), nrow = 1 ), useMatrix = useMatrix ) print( summary( fitolsS4 ) ) fitolsS5 <- systemfit( list( consump ~ 1, farmPrice ~ 1 ), "OLS", data = Kmenta, useMatrix = useMatrix ) print( summary( fitolsS5 ) ) ## **************** shorter summaries ********************** print( summary( fitols1, useDfSys = TRUE, equations = FALSE ) ) print( summary( fitols2r ), residCov = FALSE, equations = FALSE ) print( summary( fitols3s, useDfSys = FALSE ), residCov = TRUE ) print( summary( fitols4rs, residCov = FALSE, equations = FALSE ) ) print( summary( fitols5, equations = FALSE ), residCov = FALSE ) ## ****************** residuals ************************** print( residuals( fitols1 ) ) print( residuals( fitols1$eq[[ 2 ]] ) ) print( residuals( fitols2r ) ) print( residuals( fitols2r$eq[[ 1 ]] ) ) print( residuals( fitols3s ) ) print( residuals( fitols3s$eq[[ 2 ]] ) ) print( residuals( fitols4rs ) ) print( residuals( fitols4rs$eq[[ 1 ]] ) ) print( residuals( fitols5 ) ) print( residuals( fitols5$eq[[ 2 ]] ) ) ## *************** coefficients ********************* print( round( coef( fitols1rs ), digits = 6 ) ) print( round( coef( fitols1rs$eq[[ 2 ]] ), digits = 6 ) ) print( round( coef( fitols2s ), digits = 6 ) ) print( round( coef( fitols2s$eq[[ 1 ]] ), digits = 6 ) ) print( round( coef( fitols3 ), digits = 6 ) ) print( round( coef( fitols3, modified.regMat = TRUE ), digits = 6 ) ) print( round( coef( fitols3$eq[[ 2 ]] ), digits = 6 ) ) print( round( coef( fitols4r ), digits = 6 ) ) print( round( coef( fitols4r$eq[[ 1 ]] ), digits = 6 ) ) print( round( coef( fitols5 ), digits = 6 ) ) print( round( coef( fitols5, modified.regMat = TRUE ), digits = 6 ) ) print( round( coef( fitols5$eq[[ 2 ]] ), digits = 6 ) ) ## *************** coefficients with stats ********************* print( round( coef( summary( fitols1rs, useDfSys = FALSE ) ), digits = 6 ) ) print( round( coef( summary( fitols1rs$eq[[ 2 ]], useDfSys = FALSE ) ), digits = 6 ) ) print( round( coef( summary( fitols2s ) ), digits = 6 ) ) print( round( coef( summary( fitols2s$eq[[ 1 ]] ) ), digits = 6 ) ) print( round( coef( summary( fitols3, useDfSys = FALSE ) ), digits = 6 ) ) print( round( coef( summary( fitols3, useDfSys = FALSE ), modified.regMat = TRUE ), digits = 6 ) ) print( round( coef( summary( fitols3$eq[[ 2 ]], useDfSys = FALSE ) ), digits = 6 ) ) print( round( coef( summary( fitols4r, useDfSys = FALSE ) ), digits = 6 ) ) print( round( coef( summary( fitols4r$eq[[ 1 ]], useDfSys = FALSE ) ), digits = 6 ) ) print( round( coef( summary( fitols5 ) ), digits = 6 ) ) print( round( coef( summary( fitols5 ), modified.regMat = TRUE ), digits = 6 ) ) print( round( coef( summary( fitols5$eq[[ 2 ]] ) ), digits = 6 ) ) ## *********** variance covariance matrix of the coefficients ******* print( round( vcov( fitols1rs ), digits = 6 ) ) print( round( vcov( fitols1rs$eq[[ 2 ]] ), digits = 6 ) ) print( round( vcov( fitols2s ), digits = 6 ) ) print( round( vcov( fitols2s$eq[[ 1 ]] ), digits = 6 ) ) print( round( vcov( fitols3 ), digits = 6 ) ) print( round( vcov( fitols3, modified.regMat = TRUE ), digits = 6 ) ) print( round( vcov( fitols3$eq[[ 2 ]] ), digits = 6 ) ) print( round( vcov( fitols4r ), digits = 6 ) ) print( round( vcov( fitols4r$eq[[ 1 ]] ), digits = 6 ) ) print( round( vcov( fitols5 ), digits = 6 ) ) print( round( vcov( fitols5, modified.regMat = TRUE ), digits = 6 ) ) print( round( vcov( fitols5$eq[[ 2 ]] ), digits = 6 ) ) ## *********** confidence intervals of coefficients ************* print( confint( fitols1, useDfSys = TRUE ) ) print( confint( fitols1$eq[[ 2 ]], level = 0.9, useDfSys = TRUE ) ) print( confint( fitols2r, level = 0.9 ) ) print( confint( fitols2r$eq[[ 1 ]], level = 0.99 ) ) print( confint( fitols3s, level = 0.99 ) ) print( confint( fitols3s$eq[[ 2 ]], level = 0.5 ) ) print( confint( fitols4rs, level = 0.5 ) ) print( confint( fitols4rs$eq[[ 1 ]], level = 0.25 ) ) print( confint( fitols5, level = 0.25 ) ) print( confint( fitols5$eq[[ 2 ]], level = 0.999 ) ) print( confint( fitols3, level = 0.999, useDfSys = FALSE ) ) print( confint( fitols3$eq[[ 1 ]], useDfSys = FALSE ) ) ## *********** fitted values ************* print( fitted( fitols1 ) ) print( fitted( fitols1$eq[[ 2 ]] ) ) print( fitted( fitols2r ) ) print( fitted( fitols2r$eq[[ 1 ]] ) ) print( fitted( fitols3s ) ) print( fitted( fitols3s$eq[[ 2 ]] ) ) print( fitted( fitols4rs ) ) print( fitted( fitols4rs$eq[[ 1 ]] ) ) print( fitted( fitols5 ) ) print( fitted( fitols5$eq[[ 2 ]] ) ) ## *********** predicted values ************* predictData <- Kmenta predictData$consump <- NULL predictData$price <- Kmenta$price * 0.9 predictData$income <- Kmenta$income * 1.1 print( predict( fitols1, se.fit = TRUE, interval = "prediction", useDfSys = TRUE ) ) print( predict( fitols1$eq[[ 2 ]], se.fit = TRUE, interval = "prediction", useDfSys = TRUE ) ) print( predict( fitols2r, se.pred = TRUE, interval = "confidence", level = 0.999, newdata = predictData ) ) print( predict( fitols2r$eq[[ 1 ]], se.pred = TRUE, interval = "confidence", level = 0.999, newdata = predictData ) ) print( predict( fitols3s, se.fit = TRUE, se.pred = TRUE, interval = "prediction", level = 0.5, newdata = predictData ) ) print( predict( fitols3s$eq[[ 2 ]], se.fit = TRUE, se.pred = TRUE, interval = "prediction", level = 0.5, newdata = predictData ) ) print( predict( fitols4rs, se.fit = TRUE, se.pred = TRUE, interval = "confidence", level = 0.99 ) ) print( predict( fitols4rs$eq[[ 1 ]], se.fit = TRUE, se.pred = TRUE, interval = "confidence", level = 0.99 ) ) print( predict( fitols5, se.fit = TRUE, interval = "prediction", level = 0.9, newdata = predictData ) ) print( predict( fitols5$eq[[ 2 ]], se.fit = TRUE, interval = "prediction", level = 0.9, newdata = predictData ) ) # predict just one observation smallData <- data.frame( price = 130, income = 150, farmPrice = 120, trend = 25 ) print( predict( fitols1, newdata = smallData ) ) print( predict( fitols1$eq[[ 1 ]], newdata = smallData ) ) print( predict( fitols2r, se.fit = TRUE, level = 0.9, newdata = smallData ) ) print( predict( fitols2r$eq[[ 1 ]], se.pred = TRUE, level = 0.99, newdata = smallData ) ) print( predict( fitols3s, interval = "prediction", level = 0.975, newdata = smallData ) ) print( predict( fitols3s$eq[[ 1 ]], interval = "confidence", level = 0.8, newdata = smallData ) ) print( predict( fitols4rs, se.fit = TRUE, interval = "confidence", level = 0.999, newdata = smallData ) ) print( predict( fitols4rs$eq[[ 2 ]], se.pred = TRUE, interval = "prediction", level = 0.75, newdata = smallData ) ) print( predict( fitols5, se.fit = TRUE, interval = "prediction", newdata = smallData ) ) print( predict( fitols5$eq[[ 1 ]], se.pred = TRUE, interval = "confidence", newdata = smallData ) ) print( predict( fitols5rs, se.fit = TRUE, se.pred = TRUE, interval = "prediction", level = 0.5, newdata = smallData ) ) print( predict( fitols5rs$eq[[ 1 ]], se.fit = TRUE, se.pred = TRUE, interval = "confidence", level = 0.25, newdata = smallData ) ) ## ************ correlation of predicted values *************** print( correlation.systemfit( fitols1, 1, 2 ) ) print( correlation.systemfit( fitols2r, 2, 1 ) ) print( correlation.systemfit( fitols3s, 1, 2 ) ) print( correlation.systemfit( fitols4rs, 2, 1 ) ) print( correlation.systemfit( fitols5, 1, 2 ) ) ## ************ Log-Likelihood values *************** print( logLik( fitols1 ) ) print( logLik( fitols1, residCovDiag = TRUE ) ) all.equal( logLik( fitols1, residCovDiag = TRUE ), logLik( lmDemand ) + logLik( lmSupply ), check.attributes = FALSE ) print( logLik( fitols2r ) ) print( logLik( fitols2r, residCovDiag = TRUE ) ) print( logLik( fitols3s ) ) print( logLik( fitols3s, residCovDiag = TRUE ) ) print( logLik( fitols4rs ) ) print( logLik( fitols4rs, residCovDiag = TRUE ) ) print( logLik( fitols5 ) ) print( logLik( fitols5, residCovDiag = TRUE ) ) ## ************** F tests **************** # testing first restriction print( linearHypothesis( fitols1, restrm ) ) linearHypothesis( fitols1, restrict ) print( linearHypothesis( fitols1s, restrm ) ) linearHypothesis( fitols1s, restrict ) print( linearHypothesis( fitols1, restrm ) ) linearHypothesis( fitols1, restrict ) print( linearHypothesis( fitols1r, restrm ) ) linearHypothesis( fitols1r, restrict ) # testing second restriction restrOnly2m <- matrix(0,1,7) restrOnly2q <- 0.5 restrOnly2m[1,2] <- -1 restrOnly2m[1,5] <- 1 restrictOnly2 <- "- demand_price + supply_price = 0.5" # first restriction not imposed print( linearHypothesis( fitols1, restrOnly2m, restrOnly2q ) ) linearHypothesis( fitols1, restrictOnly2 ) # first restriction imposed print( linearHypothesis( fitols2, restrOnly2m, restrOnly2q ) ) linearHypothesis( fitols2, restrictOnly2 ) print( linearHypothesis( fitols3, restrOnly2m, restrOnly2q ) ) linearHypothesis( fitols3, restrictOnly2 ) # testing both of the restrictions print( linearHypothesis( fitols1, restr2m, restr2q ) ) linearHypothesis( fitols1, restrict2 ) ## ************** Wald tests **************** # testing first restriction print( linearHypothesis( fitols1, restrm, test = "Chisq" ) ) linearHypothesis( fitols1, restrict, test = "Chisq" ) print( linearHypothesis( fitols1s, restrm, test = "Chisq" ) ) linearHypothesis( fitols1s, restrict, test = "Chisq" ) print( linearHypothesis( fitols1, restrm, test = "Chisq" ) ) linearHypothesis( fitols1, restrict, test = "Chisq" ) print( linearHypothesis( fitols1r, restrm, test = "Chisq" ) ) linearHypothesis( fitols1r, restrict, test = "Chisq" ) # testing second restriction # first restriction not imposed print( linearHypothesis( fitols1, restrOnly2m, restrOnly2q, test = "Chisq" ) ) linearHypothesis( fitols1, restrictOnly2, test = "Chisq" ) # first restriction imposed print( linearHypothesis( fitols2, restrOnly2m, restrOnly2q, test = "Chisq" ) ) linearHypothesis( fitols2, restrictOnly2, test = "Chisq" ) print( linearHypothesis( fitols3, restrOnly2m, restrOnly2q, test = "Chisq" ) ) linearHypothesis( fitols3, restrictOnly2, test = "Chisq" ) # testing both of the restrictions print( linearHypothesis( fitols1, restr2m, restr2q, test = "Chisq" ) ) linearHypothesis( fitols1, restrict2, test = "Chisq" ) ## ****************** model frame ************************** print( mf <- model.frame( fitols1 ) ) print( mf1 <- model.frame( fitols1$eq[[ 1 ]] ) ) print( attributes( mf1 )$terms ) print( mf2 <- model.frame( fitols1$eq[[ 2 ]] ) ) print( attributes( mf2 )$terms ) print( all.equal( mf, model.frame( fitols2r ) ) ) print( all.equal( mf1, model.frame( fitols2r$eq[[ 1 ]] ) ) ) print( all.equal( mf, model.frame( fitols3s ) ) ) print( all.equal( mf2, model.frame( fitols3s$eq[[ 2 ]] ) ) ) print( all.equal( mf, model.frame( fitols4rs ) ) ) print( all.equal( mf1, model.frame( fitols4rs$eq[[ 1 ]] ) ) ) print( all.equal( mf, model.frame( fitols5 ) ) ) print( all.equal( mf2, model.frame( fitols5$eq[[ 2 ]] ) ) ) ## **************** model matrix ************************ # with x (returnModelMatrix) = TRUE print( !is.null( fitols1r$eq[[ 1 ]]$x ) ) print( mm <- model.matrix( fitols1r ) ) print( mm1 <- model.matrix( fitols1r$eq[[ 1 ]] ) ) print( mm2 <- model.matrix( fitols1r$eq[[ 2 ]] ) ) # with x (returnModelMatrix) = FALSE print( all.equal( mm, model.matrix( fitols1rs ) ) ) print( all.equal( mm1, model.matrix( fitols1rs$eq[[ 1 ]] ) ) ) print( all.equal( mm2, model.matrix( fitols1rs$eq[[ 2 ]] ) ) ) print( !is.null( fitols1rs$eq[[ 1 ]]$x ) ) # with x (returnModelMatrix) = TRUE print( !is.null( fitols2rs$eq[[ 1 ]]$x ) ) print( all.equal( mm, model.matrix( fitols2rs ) ) ) print( all.equal( mm1, model.matrix( fitols2rs$eq[[ 1 ]] ) ) ) print( all.equal( mm2, model.matrix( fitols2rs$eq[[ 2 ]] ) ) ) # with x (returnModelMatrix) = FALSE print( all.equal( mm, model.matrix( fitols2 ) ) ) print( all.equal( mm1, model.matrix( fitols2$eq[[ 1 ]] ) ) ) print( all.equal( mm2, model.matrix( fitols2$eq[[ 2 ]] ) ) ) print( !is.null( fitols2$eq[[ 1 ]]$x ) ) # with x (returnModelMatrix) = TRUE print( !is.null( fitols3$eq[[ 1 ]]$x ) ) print( all.equal( mm, model.matrix( fitols3 ) ) ) print( all.equal( mm1, model.matrix( fitols3$eq[[ 1 ]] ) ) ) print( all.equal( mm2, model.matrix( fitols3$eq[[ 2 ]] ) ) ) # with x (returnModelMatrix) = FALSE print( all.equal( mm, model.matrix( fitols3r ) ) ) print( all.equal( mm1, model.matrix( fitols3r$eq[[ 1 ]] ) ) ) print( all.equal( mm2, model.matrix( fitols3r$eq[[ 2 ]] ) ) ) print( !is.null( fitols3r$eq[[ 1 ]]$x ) ) # with x (returnModelMatrix) = TRUE print( !is.null( fitols4s$eq[[ 1 ]]$x ) ) print( all.equal( mm, model.matrix( fitols4s ) ) ) print( all.equal( mm1, model.matrix( fitols4s$eq[[ 1 ]] ) ) ) print( all.equal( mm2, model.matrix( fitols4s$eq[[ 2 ]] ) ) ) # with x (returnModelMatrix) = FALSE print( all.equal( mm, model.matrix( fitols4Sym ) ) ) print( all.equal( mm1, model.matrix( fitols4Sym$eq[[ 1 ]] ) ) ) print( all.equal( mm2, model.matrix( fitols4Sym$eq[[ 2 ]] ) ) ) print( !is.null( fitols4Sym$eq[[ 1 ]]$x ) ) # with x (returnModelMatrix) = TRUE print( !is.null( fitols5s$eq[[ 1 ]]$x ) ) print( all.equal( mm, model.matrix( fitols5s ) ) ) print( all.equal( mm1, model.matrix( fitols5s$eq[[ 1 ]] ) ) ) print( all.equal( mm2, model.matrix( fitols5s$eq[[ 2 ]] ) ) ) # with x (returnModelMatrix) = FALSE print( all.equal( mm, model.matrix( fitols5 ) ) ) print( all.equal( mm1, model.matrix( fitols5$eq[[ 1 ]] ) ) ) print( all.equal( mm2, model.matrix( fitols5$eq[[ 2 ]] ) ) ) print( !is.null( fitols5$eq[[ 1 ]]$x ) ) try( model.matrix( fitols1, which = "z" ) ) ## **************** formulas ************************ formula( fitols1 ) formula( fitols1$eq[[ 2 ]] ) formula( fitols2r ) formula( fitols2r$eq[[ 1 ]] ) formula( fitols3s ) formula( fitols3s$eq[[ 2 ]] ) formula( fitols4rs ) formula( fitols4rs$eq[[ 1 ]] ) formula( fitols5 ) formula( fitols5$eq[[ 2 ]] ) ## **************** model terms ******************* terms( fitols1 ) terms( fitols1$eq[[ 2 ]] ) terms( fitols2r ) terms( fitols2r$eq[[ 1 ]] ) terms( fitols3s ) terms( fitols3s$eq[[ 2 ]] ) terms( fitols4rs ) terms( fitols4rs$eq[[ 1 ]] ) terms( fitols5 ) terms( fitols5$eq[[ 2 ]] ) ## **************** estfun ************************ library( "sandwich" ) estfun( fitols1 ) round( colSums( estfun( fitols1 ) ), digits = 7 ) estfun( fitols1s ) round( colSums( estfun( fitols1s ) ), digits = 7 ) estfun( fitols1r ) round( colSums( estfun( fitols1r ) ), digits = 7 ) try( estfun( fitols2 ) ) try( estfun( fitols2Sym ) ) try( estfun( fitols3s ) ) try( estfun( fitols4r ) ) try( estfun( fitols4Sym ) ) try( estfun( fitols5 ) ) try( estfun( fitols5Sym ) ) ## **************** bread ************************ bread( fitols1 ) bread( fitols1s ) bread( fitols1r ) try( bread( fitols2 ) ) systemfit/tests/test_sur.Rout.save0000644000176200001440000132464213060100647017134 0ustar liggesusers R version 3.3.2 (2016-10-31) -- "Sincere Pumpkin Patch" Copyright (C) 2016 The R Foundation for Statistical Computing Platform: x86_64-pc-linux-gnu (64-bit) R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > library( systemfit ) Loading required package: Matrix Loading required package: car Loading required package: lmtest Loading required package: zoo Attaching package: 'zoo' The following objects are masked from 'package:base': as.Date, as.Date.numeric Please cite the 'systemfit' package as: Arne Henningsen and Jeff D. Hamann (2007). systemfit: A Package for Estimating Systems of Simultaneous Equations in R. Journal of Statistical Software 23(4), 1-40. http://www.jstatsoft.org/v23/i04/. If you have questions, suggestions, or comments regarding the 'systemfit' package, please use a forum or 'tracker' at systemfit's R-Forge site: https://r-forge.r-project.org/projects/systemfit/ > options( digits = 3 ) > > data( "Kmenta" ) > useMatrix <- FALSE > > demand <- consump ~ price + income > supply <- consump ~ price + farmPrice + trend > system <- list( demand = demand, supply = supply ) > restrm <- matrix(0,1,7) # restriction matrix "R" > restrm[1,3] <- 1 > restrm[1,7] <- -1 > restrict <- "demand_income - supply_trend = 0" > restr2m <- matrix(0,2,7) # restriction matrix "R" 2 > restr2m[1,3] <- 1 > restr2m[1,7] <- -1 > restr2m[2,2] <- -1 > restr2m[2,5] <- 1 > restr2q <- c( 0, 0.5 ) # restriction vector "q" 2 > restrict2 <- c( "demand_income - supply_trend = 0", + "- demand_price + supply_price = 0.5" ) > restrict2i <- c( "demand_income - supply_trend = 0", + "- demand_price + supply_income = 0.5" ) > tc <- matrix(0,7,6) > tc[1,1] <- 1 > tc[2,2] <- 1 > tc[3,3] <- 1 > tc[4,4] <- 1 > tc[5,5] <- 1 > tc[6,6] <- 1 > tc[7,3] <- 1 > restr3m <- matrix(0,1,6) # restriction matrix "R" 2 > restr3m[1,2] <- -1 > restr3m[1,5] <- 1 > restr3q <- c( 0.5 ) # restriction vector "q" 2 > restrict3 <- "- C2 + C5 = 0.5" > > # the standard equations do not converge and lead to a singular weighting matrix > # both in R and in EViews, since both equations have the same endogenous variable > supply2 <- price ~ income + farmPrice + trend > system2 <- list( demand = demand, supply = supply2 ) > > > ## *************** SUR estimation ************************ > fitsur1 <- systemfit( system, "SUR", data = Kmenta, useMatrix = useMatrix ) > print( summary( fitsur1 ) ) systemfit results method: SUR N DF SSR detRCov OLS-R2 McElroy-R2 system 40 33 170 0.879 0.683 0.789 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 65.7 3.86 1.97 0.755 0.726 supply 20 16 104.1 6.50 2.55 0.612 0.539 The covariance matrix of the residuals used for estimation demand supply demand 3.73 4.14 supply 4.14 5.78 The covariance matrix of the residuals demand supply demand 3.86 4.92 supply 4.92 6.50 The correlations of the residuals demand supply demand 1.000 0.982 supply 0.982 1.000 SUR estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Estimate Std. Error t value Pr(>|t|) (Intercept) 99.3329 7.5145 13.22 2.3e-10 *** price -0.2755 0.0885 -3.11 0.0063 ** income 0.2986 0.0419 7.12 1.7e-06 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.966 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 65.683 MSE: 3.864 Root MSE: 1.966 Multiple R-Squared: 0.755 Adjusted R-Squared: 0.726 SUR estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 61.9662 11.0808 5.59 4.0e-05 *** price 0.1469 0.0944 1.56 0.13941 farmPrice 0.2140 0.0399 5.37 6.3e-05 *** trend 0.3393 0.0679 5.00 0.00013 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.55 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 104.058 MSE: 6.504 Root MSE: 2.55 Multiple R-Squared: 0.612 Adjusted R-Squared: 0.539 > nobs( fitsur1 ) [1] 40 > > ## ********************* SUR (EViews-like) ***************** > fitsur1e <- systemfit( system, "SUR", data = Kmenta, methodResidCov = "noDfCor", + useMatrix = useMatrix ) > print( summary( fitsur1e, useDfSys = TRUE ) ) systemfit results method: SUR N DF SSR detRCov OLS-R2 McElroy-R2 system 40 33 170 0.598 0.683 0.748 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 66.2 3.89 1.97 0.753 0.724 supply 20 16 103.5 6.47 2.54 0.614 0.541 The covariance matrix of the residuals used for estimation demand supply demand 3.17 3.41 supply 3.41 4.63 The covariance matrix of the residuals demand supply demand 3.31 4.07 supply 4.07 5.18 The correlations of the residuals demand supply demand 1.000 0.982 supply 0.982 1.000 SUR estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Estimate Std. Error t value Pr(>|t|) (Intercept) 99.2757 6.9280 14.33 8.9e-16 *** price -0.2713 0.0816 -3.33 0.0022 ** income 0.2949 0.0387 7.63 8.9e-09 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.973 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 66.186 MSE: 3.893 Root MSE: 1.973 Multiple R-Squared: 0.753 Adjusted R-Squared: 0.724 SUR estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 62.2942 9.9110 6.29 4.2e-07 *** price 0.1461 0.0845 1.73 0.093 . farmPrice 0.2121 0.0357 5.95 1.1e-06 *** trend 0.3322 0.0607 5.47 4.6e-06 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.544 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 103.55 MSE: 6.472 Root MSE: 2.544 Multiple R-Squared: 0.614 Adjusted R-Squared: 0.541 > nobs( fitsur1e ) [1] 40 > > ## ********************* SUR (methodResidCov="Theil") ***************** > fitsur1r2 <- systemfit( system, "SUR", data = Kmenta, methodResidCov = "Theil", + useMatrix = useMatrix ) > print( summary( fitsur1r2 ) ) systemfit results method: SUR N DF SSR detRCov OLS-R2 McElroy-R2 system 40 33 172 -0.896 0.679 1.01 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 66.8 3.93 1.98 0.751 0.722 supply 20 16 105.3 6.58 2.57 0.607 0.534 The covariance matrix of the residuals used for estimation demand supply demand 3.73 4.28 supply 4.28 5.78 warning: this covariance matrix is NOT positive semidefinit! The covariance matrix of the residuals demand supply demand 3.93 5.17 supply 5.17 6.58 The correlations of the residuals demand supply demand 1.000 0.984 supply 0.984 1.000 SUR estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Estimate Std. Error t value Pr(>|t|) (Intercept) 99.2120 7.5127 13.21 2.3e-10 *** price -0.2667 0.0877 -3.04 0.0074 ** income 0.2908 0.0406 7.16 1.6e-06 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.982 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 66.802 MSE: 3.93 Root MSE: 1.982 Multiple R-Squared: 0.751 Adjusted R-Squared: 0.722 SUR estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 63.0768 10.9735 5.75 3.0e-05 *** price 0.1439 0.0943 1.52 0.15 farmPrice 0.2064 0.0384 5.37 6.2e-05 *** trend 0.3325 0.0640 5.19 8.9e-05 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.566 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 105.322 MSE: 6.583 Root MSE: 2.566 Multiple R-Squared: 0.607 Adjusted R-Squared: 0.534 > > ## *************** SUR (methodResidCov="Theil", useDfSys = TRUE ) *************** > fitsur1e2 <- systemfit( system, "SUR", data = Kmenta, methodResidCov = "Theil", + x = TRUE, useMatrix = useMatrix ) > print( summary( fitsur1e2, useDfSys = TRUE ) ) systemfit results method: SUR N DF SSR detRCov OLS-R2 McElroy-R2 system 40 33 172 -0.896 0.679 1.01 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 66.8 3.93 1.98 0.751 0.722 supply 20 16 105.3 6.58 2.57 0.607 0.534 The covariance matrix of the residuals used for estimation demand supply demand 3.73 4.28 supply 4.28 5.78 warning: this covariance matrix is NOT positive semidefinit! The covariance matrix of the residuals demand supply demand 3.93 5.17 supply 5.17 6.58 The correlations of the residuals demand supply demand 1.000 0.984 supply 0.984 1.000 SUR estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Estimate Std. Error t value Pr(>|t|) (Intercept) 99.2120 7.5127 13.21 1.0e-14 *** price -0.2667 0.0877 -3.04 0.0046 ** income 0.2908 0.0406 7.16 3.3e-08 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.982 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 66.802 MSE: 3.93 Root MSE: 1.982 Multiple R-Squared: 0.751 Adjusted R-Squared: 0.722 SUR estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 63.0768 10.9735 5.75 2.0e-06 *** price 0.1439 0.0943 1.52 0.14 farmPrice 0.2064 0.0384 5.37 6.1e-06 *** trend 0.3325 0.0640 5.19 1.0e-05 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.566 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 105.322 MSE: 6.583 Root MSE: 2.566 Multiple R-Squared: 0.607 Adjusted R-Squared: 0.534 > > ## ********************* SUR (methodResidCov="max") ***************** > fitsur1r3 <- systemfit( system, "SUR", data = Kmenta, methodResidCov = "max", + useMatrix = useMatrix ) > print( summary( fitsur1r3 ) ) systemfit results method: SUR N DF SSR detRCov OLS-R2 McElroy-R2 system 40 33 172 -0.735 0.68 0.957 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 66.7 3.92 1.98 0.751 0.722 supply 20 16 105.2 6.57 2.56 0.608 0.534 The covariance matrix of the residuals used for estimation demand supply demand 3.73 4.26 supply 4.26 5.78 warning: this covariance matrix is NOT positive semidefinit! The covariance matrix of the residuals demand supply demand 3.92 5.15 supply 5.15 6.57 The correlations of the residuals demand supply demand 1.000 0.984 supply 0.984 1.000 SUR estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Estimate Std. Error t value Pr(>|t|) (Intercept) 99.2250 7.5129 13.21 2.3e-10 *** price -0.2677 0.0878 -3.05 0.0073 ** income 0.2916 0.0408 7.15 1.6e-06 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.98 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 66.671 MSE: 3.922 Root MSE: 1.98 Multiple R-Squared: 0.751 Adjusted R-Squared: 0.722 SUR estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 62.9575 10.9850 5.73 3.1e-05 *** price 0.1442 0.0944 1.53 0.15 farmPrice 0.2072 0.0386 5.37 6.2e-05 *** trend 0.3333 0.0644 5.18 9.2e-05 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.564 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 105.187 MSE: 6.574 Root MSE: 2.564 Multiple R-Squared: 0.608 Adjusted R-Squared: 0.534 > > ## *************** WSUR estimation ************************ > fitsur1w <- systemfit( system, "SUR", data = Kmenta, residCovWeighted = TRUE, + useMatrix = useMatrix ) > summary( fitsur1w ) systemfit results method: SUR N DF SSR detRCov OLS-R2 McElroy-R2 system 40 33 170 0.879 0.683 0.789 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 65.7 3.86 1.97 0.755 0.726 supply 20 16 104.1 6.50 2.55 0.612 0.539 The covariance matrix of the residuals used for estimation demand supply demand 3.73 4.14 supply 4.14 5.78 The covariance matrix of the residuals demand supply demand 3.86 4.92 supply 4.92 6.50 The correlations of the residuals demand supply demand 1.000 0.982 supply 0.982 1.000 SUR estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Estimate Std. Error t value Pr(>|t|) (Intercept) 99.3329 7.5145 13.22 2.3e-10 *** price -0.2755 0.0885 -3.11 0.0063 ** income 0.2986 0.0419 7.12 1.7e-06 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.966 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 65.683 MSE: 3.864 Root MSE: 1.966 Multiple R-Squared: 0.755 Adjusted R-Squared: 0.726 SUR estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 61.9662 11.0808 5.59 4.0e-05 *** price 0.1469 0.0944 1.56 0.13941 farmPrice 0.2140 0.0399 5.37 6.3e-05 *** trend 0.3393 0.0679 5.00 0.00013 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.55 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 104.058 MSE: 6.504 Root MSE: 2.55 Multiple R-Squared: 0.612 Adjusted R-Squared: 0.539 > nobs( fitsur1w ) [1] 40 > > ## *************** WSUR (methodResidCov="Theil", useDfSys = TRUE ) *************** > fitsur1we2 <- systemfit( system, "SUR", data = Kmenta, methodResidCov = "Theil", + residCovWeighted = TRUE, useMatrix = useMatrix ) > summary( fitsur1we2, useDfSys = TRUE ) systemfit results method: SUR N DF SSR detRCov OLS-R2 McElroy-R2 system 40 33 172 -0.896 0.679 1.01 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 66.8 3.93 1.98 0.751 0.722 supply 20 16 105.3 6.58 2.57 0.607 0.534 The covariance matrix of the residuals used for estimation demand supply demand 3.73 4.28 supply 4.28 5.78 warning: this covariance matrix is NOT positive semidefinit! The covariance matrix of the residuals demand supply demand 3.93 5.17 supply 5.17 6.58 The correlations of the residuals demand supply demand 1.000 0.984 supply 0.984 1.000 SUR estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Estimate Std. Error t value Pr(>|t|) (Intercept) 99.2120 7.5127 13.21 1.0e-14 *** price -0.2667 0.0877 -3.04 0.0046 ** income 0.2908 0.0406 7.16 3.3e-08 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.982 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 66.802 MSE: 3.93 Root MSE: 1.982 Multiple R-Squared: 0.751 Adjusted R-Squared: 0.722 SUR estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 63.0768 10.9735 5.75 2.0e-06 *** price 0.1439 0.0943 1.52 0.14 farmPrice 0.2064 0.0384 5.37 6.1e-06 *** trend 0.3325 0.0640 5.19 1.0e-05 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.566 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 105.322 MSE: 6.583 Root MSE: 2.566 Multiple R-Squared: 0.607 Adjusted R-Squared: 0.534 > > > ## *************** SUR with cross-equation restriction ************** > fitsur2 <- systemfit( system, "SUR", data = Kmenta, restrict.matrix = restrm, + useMatrix = useMatrix ) > print( summary( fitsur2 ) ) systemfit results method: SUR N DF SSR detRCov OLS-R2 McElroy-R2 system 40 34 179 0.933 0.665 0.753 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 71.6 4.21 2.05 0.733 0.702 supply 20 16 107.8 6.74 2.60 0.598 0.523 The covariance matrix of the residuals used for estimation demand supply demand 3.78 4.47 supply 4.47 5.94 The covariance matrix of the residuals demand supply demand 4.21 5.24 supply 5.24 6.74 The correlations of the residuals demand supply demand 1.000 0.983 supply 0.983 1.000 SUR estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Estimate Std. Error t value Pr(>|t|) (Intercept) 98.8408 7.5581 13.08 8.0e-15 *** price -0.2398 0.0860 -2.79 0.0086 ** income 0.2670 0.0368 7.25 2.2e-08 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.052 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 71.597 MSE: 4.212 Root MSE: 2.052 Multiple R-Squared: 0.733 Adjusted R-Squared: 0.702 SUR estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 67.4283 10.6647 6.32 3.3e-07 *** price 0.1332 0.0953 1.40 0.17 farmPrice 0.1795 0.0337 5.33 6.3e-06 *** trend 0.2670 0.0368 7.25 2.2e-08 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.596 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 107.806 MSE: 6.738 Root MSE: 2.596 Multiple R-Squared: 0.598 Adjusted R-Squared: 0.523 > nobs( fitsur2 ) [1] 40 > # the same with symbolically specified restrictions > fitsur2Sym <- systemfit( system, "SUR", data = Kmenta, + restrict.matrix = restrict, useMatrix = useMatrix ) > all.equal( fitsur2, fitsur2Sym ) [1] "Component \"call\": target, current do not match when deparsed" > nobs( fitsur2Sym ) [1] 40 > > ## *************** SUR with cross-equation restriction (EViews-like) ** > fitsur2e <- systemfit( system, "SUR", data = Kmenta, restrict.matrix = restrm, + methodResidCov = "noDfCor", x = TRUE, + useMatrix = useMatrix ) > print( summary( fitsur2e ) ) systemfit results method: SUR N DF SSR detRCov OLS-R2 McElroy-R2 system 40 34 180 0.62 0.663 0.707 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 72.6 4.27 2.07 0.729 0.697 supply 20 16 107.9 6.75 2.60 0.597 0.522 The covariance matrix of the residuals used for estimation demand supply demand 3.21 3.68 supply 3.68 4.75 The covariance matrix of the residuals demand supply demand 3.63 4.35 supply 4.35 5.40 The correlations of the residuals demand supply demand 1.000 0.984 supply 0.984 1.000 SUR estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Estimate Std. Error t value Pr(>|t|) (Intercept) 98.7799 6.9687 14.17 8.9e-16 *** price -0.2354 0.0795 -2.96 0.0056 ** income 0.2631 0.0344 7.66 6.7e-09 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.066 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 72.577 MSE: 4.269 Root MSE: 2.066 Multiple R-Squared: 0.729 Adjusted R-Squared: 0.697 SUR estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 67.6039 9.5712 7.06 3.7e-08 *** price 0.1328 0.0853 1.56 0.13 farmPrice 0.1785 0.0305 5.85 1.3e-06 *** trend 0.2631 0.0344 7.66 6.7e-09 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.597 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 107.917 MSE: 6.745 Root MSE: 2.597 Multiple R-Squared: 0.597 Adjusted R-Squared: 0.522 > > ## *************** WSUR with cross-equation restriction (EViews-like) ** > fitsur2we <- systemfit( system, "SUR", data = Kmenta, restrict.matrix = restrm, + methodResidCov = "noDfCor", residCovWeighted = TRUE, + x = TRUE, useMatrix = useMatrix ) > summary( fitsur2we ) systemfit results method: SUR N DF SSR detRCov OLS-R2 McElroy-R2 system 40 34 182 0.609 0.661 0.711 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 73 4.29 2.07 0.728 0.696 supply 20 16 109 6.79 2.61 0.595 0.519 The covariance matrix of the residuals used for estimation demand supply demand 3.19 3.69 supply 3.69 4.78 The covariance matrix of the residuals demand supply demand 3.65 4.38 supply 4.38 5.43 The correlations of the residuals demand supply demand 1.000 0.985 supply 0.985 1.000 SUR estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Estimate Std. Error t value Pr(>|t|) (Intercept) 98.7542 6.9468 14.22 6.7e-16 *** price -0.2335 0.0790 -2.96 0.0056 ** income 0.2614 0.0338 7.74 5.3e-09 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.072 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 73.009 MSE: 4.295 Root MSE: 2.072 Multiple R-Squared: 0.728 Adjusted R-Squared: 0.696 SUR estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 67.8882 9.5640 7.10 3.4e-08 *** price 0.1320 0.0855 1.55 0.13 farmPrice 0.1765 0.0301 5.86 1.3e-06 *** trend 0.2614 0.0338 7.74 5.3e-09 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.606 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 108.634 MSE: 6.79 Root MSE: 2.606 Multiple R-Squared: 0.595 Adjusted R-Squared: 0.519 > > > ## *************** SUR with restriction via restrict.regMat ******************* > fitsur3 <- systemfit( system, "SUR", data = Kmenta, restrict.regMat = tc, + useMatrix = useMatrix ) > print( summary( fitsur3 ) ) systemfit results method: SUR N DF SSR detRCov OLS-R2 McElroy-R2 system 40 34 179 0.933 0.665 0.753 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 71.6 4.21 2.05 0.733 0.702 supply 20 16 107.8 6.74 2.60 0.598 0.523 The covariance matrix of the residuals used for estimation demand supply demand 3.78 4.47 supply 4.47 5.94 The covariance matrix of the residuals demand supply demand 4.21 5.24 supply 5.24 6.74 The correlations of the residuals demand supply demand 1.000 0.983 supply 0.983 1.000 SUR estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Estimate Std. Error t value Pr(>|t|) (Intercept) 98.8408 7.5581 13.08 8.0e-15 *** price -0.2398 0.0860 -2.79 0.0086 ** income 0.2670 0.0368 7.25 2.2e-08 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.052 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 71.597 MSE: 4.212 Root MSE: 2.052 Multiple R-Squared: 0.733 Adjusted R-Squared: 0.702 SUR estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 67.4283 10.6647 6.32 3.3e-07 *** price 0.1332 0.0953 1.40 0.17 farmPrice 0.1795 0.0337 5.33 6.3e-06 *** trend 0.2670 0.0368 7.25 2.2e-08 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.596 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 107.806 MSE: 6.738 Root MSE: 2.596 Multiple R-Squared: 0.598 Adjusted R-Squared: 0.523 > nobs( fitsur3 ) [1] 40 > > ## *************** SUR with restriction via restrict.regMat (EViews-like) ************** > fitsur3e <- systemfit( system, "SUR", data = Kmenta, restrict.regMat = tc, + methodResidCov = "noDfCor", x = TRUE, + useMatrix = useMatrix ) > print( summary( fitsur3e ) ) systemfit results method: SUR N DF SSR detRCov OLS-R2 McElroy-R2 system 40 34 180 0.62 0.663 0.707 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 72.6 4.27 2.07 0.729 0.697 supply 20 16 107.9 6.75 2.60 0.597 0.522 The covariance matrix of the residuals used for estimation demand supply demand 3.21 3.68 supply 3.68 4.75 The covariance matrix of the residuals demand supply demand 3.63 4.35 supply 4.35 5.40 The correlations of the residuals demand supply demand 1.000 0.984 supply 0.984 1.000 SUR estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Estimate Std. Error t value Pr(>|t|) (Intercept) 98.7799 6.9687 14.17 8.9e-16 *** price -0.2354 0.0795 -2.96 0.0056 ** income 0.2631 0.0344 7.66 6.7e-09 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.066 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 72.577 MSE: 4.269 Root MSE: 2.066 Multiple R-Squared: 0.729 Adjusted R-Squared: 0.697 SUR estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 67.6039 9.5712 7.06 3.7e-08 *** price 0.1328 0.0853 1.56 0.13 farmPrice 0.1785 0.0305 5.85 1.3e-06 *** trend 0.2631 0.0344 7.66 6.7e-09 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.597 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 107.917 MSE: 6.745 Root MSE: 2.597 Multiple R-Squared: 0.597 Adjusted R-Squared: 0.522 > > ## *************** WSUR with restriction via restrict.regMat ******************* > fitsur3w <- systemfit( system, "SUR", data = Kmenta, restrict.regMat = tc, + residCovWeighted = TRUE, x = TRUE, useMatrix = useMatrix ) > summary( fitsur3w ) systemfit results method: SUR N DF SSR detRCov OLS-R2 McElroy-R2 system 40 34 181 0.919 0.663 0.757 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 72 4.24 2.06 0.731 0.700 supply 20 16 109 6.79 2.60 0.595 0.519 The covariance matrix of the residuals used for estimation demand supply demand 3.75 4.48 supply 4.48 5.98 The covariance matrix of the residuals demand supply demand 4.24 5.28 supply 5.28 6.79 The correlations of the residuals demand supply demand 1.000 0.984 supply 0.984 1.000 SUR estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Estimate Std. Error t value Pr(>|t|) (Intercept) 98.8139 7.5317 13.12 7.3e-15 *** price -0.2378 0.0854 -2.79 0.0087 ** income 0.2653 0.0361 7.34 1.7e-08 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.058 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 72.023 MSE: 4.237 Root MSE: 2.058 Multiple R-Squared: 0.731 Adjusted R-Squared: 0.7 SUR estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 67.7366 10.6556 6.36 3.0e-07 *** price 0.1324 0.0955 1.39 0.17 farmPrice 0.1774 0.0332 5.35 6.1e-06 *** trend 0.2653 0.0361 7.34 1.7e-08 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.605 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 108.579 MSE: 6.786 Root MSE: 2.605 Multiple R-Squared: 0.595 Adjusted R-Squared: 0.519 > > > ## *************** SUR with 2 restrictions *************************** > fitsur4 <- systemfit( system, "SUR", data = Kmenta, restrict.matrix = restr2m, + restrict.rhs = restr2q, useMatrix = useMatrix ) > print( summary( fitsur4 ) ) systemfit results method: SUR N DF SSR detRCov OLS-R2 McElroy-R2 system 40 35 165 1.76 0.691 0.69 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 64 3.76 1.94 0.761 0.733 supply 20 16 101 6.34 2.52 0.622 0.551 The covariance matrix of the residuals used for estimation demand supply demand 3.76 4.46 supply 4.46 5.99 The covariance matrix of the residuals demand supply demand 3.76 4.70 supply 4.70 6.34 The correlations of the residuals demand supply demand 1.000 0.962 supply 0.962 1.000 SUR estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Estimate Std. Error t value Pr(>|t|) (Intercept) 96.8275 7.4665 12.97 6.2e-15 *** price -0.2798 0.0840 -3.33 0.002 ** income 0.3286 0.0206 15.93 < 2e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.94 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 63.987 MSE: 3.764 Root MSE: 1.94 Multiple R-Squared: 0.761 Adjusted R-Squared: 0.733 SUR estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 52.9386 7.6655 6.91 5.1e-08 *** price 0.2202 0.0840 2.62 0.013 * farmPrice 0.2327 0.0212 10.97 7.2e-13 *** trend 0.3286 0.0206 15.93 < 2e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.518 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 101.473 MSE: 6.342 Root MSE: 2.518 Multiple R-Squared: 0.622 Adjusted R-Squared: 0.551 > nobs( fitsur4 ) [1] 40 > # the same with symbolically specified restrictions > fitsur4Sym <- systemfit( system, "SUR", data = Kmenta, + restrict.matrix = restrict2, useMatrix = useMatrix ) > all.equal( fitsur4, fitsur4Sym ) [1] "Component \"call\": target, current do not match when deparsed" > > ## *************** SUR with 2 restrictions (EViews-like) ************** > fitsur4e <- systemfit( system, "SUR", data = Kmenta, methodResidCov = "noDfCor", + restrict.matrix = restr2m, restrict.rhs = restr2q, useMatrix = useMatrix ) > print( summary( fitsur4e ) ) systemfit results method: SUR N DF SSR detRCov OLS-R2 McElroy-R2 system 40 35 165 1.2 0.693 0.653 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 63.8 3.75 1.94 0.762 0.734 supply 20 16 100.8 6.30 2.51 0.624 0.553 The covariance matrix of the residuals used for estimation demand supply demand 3.20 3.67 supply 3.67 4.79 The covariance matrix of the residuals demand supply demand 3.19 3.86 supply 3.86 5.04 The correlations of the residuals demand supply demand 1.000 0.962 supply 0.962 1.000 SUR estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Estimate Std. Error t value Pr(>|t|) (Intercept) 97.2678 6.9200 14.06 4.4e-16 *** price -0.2851 0.0767 -3.72 7e-04 *** income 0.3296 0.0184 17.86 < 2e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.937 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 63.811 MSE: 3.754 Root MSE: 1.937 Multiple R-Squared: 0.762 Adjusted R-Squared: 0.734 SUR estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 53.3040 7.1045 7.5 8.7e-09 *** price 0.2149 0.0767 2.8 0.0082 ** farmPrice 0.2343 0.0187 12.6 1.6e-14 *** trend 0.3296 0.0184 17.9 < 2e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.51 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 100.835 MSE: 6.302 Root MSE: 2.51 Multiple R-Squared: 0.624 Adjusted R-Squared: 0.553 > > ## *************** SUR with 2 restrictions (methodResidCov = "Theil") ************** > fitsur4r2 <- systemfit( system, "SUR", data = Kmenta, methodResidCov = "Theil", + restrict.matrix = restr2m, restrict.rhs = restr2q, useMatrix = useMatrix ) > print( summary( fitsur4r2 ) ) systemfit results method: SUR N DF SSR detRCov OLS-R2 McElroy-R2 system 40 35 175 0.034 0.673 0.708 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 67 3.94 1.99 0.750 0.721 supply 20 16 108 6.76 2.60 0.596 0.521 The covariance matrix of the residuals used for estimation demand supply demand 3.76 4.61 supply 4.61 5.99 The covariance matrix of the residuals demand supply demand 3.94 5.16 supply 5.16 6.76 The correlations of the residuals demand supply demand 1.000 0.967 supply 0.967 1.000 SUR estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Estimate Std. Error t value Pr(>|t|) (Intercept) 92.5266 7.2896 12.69 1.2e-14 *** price -0.2304 0.0827 -2.79 0.0086 ** income 0.3221 0.0166 19.37 < 2e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.986 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 67.048 MSE: 3.944 Root MSE: 1.986 Multiple R-Squared: 0.75 Adjusted R-Squared: 0.721 SUR estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 48.7011 7.4034 6.58 1.3e-07 *** price 0.2696 0.0827 3.26 0.0025 ** farmPrice 0.2261 0.0166 13.62 1.6e-15 *** trend 0.3221 0.0166 19.37 < 2e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.601 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 108.217 MSE: 6.764 Root MSE: 2.601 Multiple R-Squared: 0.596 Adjusted R-Squared: 0.521 > > ## *************** SUR with 2 restrictions (methodResidCov = "max") ************** > fitsur4r3 <- systemfit( system, "SUR", data = Kmenta, methodResidCov = "max", + restrict.matrix = restr2m, restrict.rhs = restr2q, + x = TRUE, useMatrix = useMatrix ) > print( summary( fitsur4r3 ) ) systemfit results method: SUR N DF SSR detRCov OLS-R2 McElroy-R2 system 40 35 173 0.217 0.677 0.702 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 66.4 3.91 1.98 0.752 0.723 supply 20 16 106.9 6.68 2.58 0.601 0.526 The covariance matrix of the residuals used for estimation demand supply demand 3.76 4.59 supply 4.59 5.99 The covariance matrix of the residuals demand supply demand 3.91 5.09 supply 5.09 6.68 The correlations of the residuals demand supply demand 1.000 0.966 supply 0.966 1.000 SUR estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Estimate Std. Error t value Pr(>|t|) (Intercept) 93.1978 7.3168 12.74 1.1e-14 *** price -0.2381 0.0829 -2.87 0.0069 ** income 0.3231 0.0170 18.96 < 2e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.976 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 66.405 MSE: 3.906 Root MSE: 1.976 Multiple R-Squared: 0.752 Adjusted R-Squared: 0.723 SUR estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 49.3676 7.4381 6.64 1.1e-07 *** price 0.2619 0.0829 3.16 0.0033 ** farmPrice 0.2271 0.0171 13.29 3.1e-15 *** trend 0.3231 0.0170 18.96 < 2e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.585 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 106.924 MSE: 6.683 Root MSE: 2.585 Multiple R-Squared: 0.601 Adjusted R-Squared: 0.526 > > ## *************** WSUR with 2 restrictions (EViews-like) ************** > fitsur4we <- systemfit( system, "SUR", data = Kmenta, methodResidCov = "noDfCor", + restrict.matrix = restr2m, restrict.rhs = restr2q, residCovWeighted = TRUE, + useMatrix = useMatrix ) > summary( fitsur4we ) systemfit results method: SUR N DF SSR detRCov OLS-R2 McElroy-R2 system 40 35 165 1.2 0.692 0.654 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 63.9 3.76 1.94 0.762 0.733 supply 20 16 101.2 6.33 2.52 0.623 0.552 The covariance matrix of the residuals used for estimation demand supply demand 3.18 3.69 supply 3.69 4.81 The covariance matrix of the residuals demand supply demand 3.20 3.87 supply 3.87 5.06 The correlations of the residuals demand supply demand 1.000 0.962 supply 0.962 1.000 SUR estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Estimate Std. Error t value Pr(>|t|) (Intercept) 96.9414 6.8894 14.07 4.4e-16 *** price -0.2814 0.0766 -3.67 8e-04 *** income 0.3291 0.0181 18.18 < 2e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.939 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 63.936 MSE: 3.761 Root MSE: 1.939 Multiple R-Squared: 0.762 Adjusted R-Squared: 0.733 SUR estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 52.9963 7.0652 7.50 8.7e-09 *** price 0.2186 0.0766 2.85 0.0072 ** farmPrice 0.2337 0.0183 12.76 1.0e-14 *** trend 0.3291 0.0181 18.18 < 2e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.515 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 101.201 MSE: 6.325 Root MSE: 2.515 Multiple R-Squared: 0.623 Adjusted R-Squared: 0.552 > > > ## *************** SUR with 2 restrictions via R and restrict.regMat **************** > fitsur5 <- systemfit( system, "SUR", data = Kmenta, restrict.matrix = restr3m, + restrict.rhs = restr3q, restrict.regMat = tc, + x = TRUE, useMatrix = useMatrix ) > print( summary( fitsur5 ) ) systemfit results method: SUR N DF SSR detRCov OLS-R2 McElroy-R2 system 40 35 165 1.76 0.691 0.69 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 64 3.76 1.94 0.761 0.733 supply 20 16 101 6.34 2.52 0.622 0.551 The covariance matrix of the residuals used for estimation demand supply demand 3.76 4.46 supply 4.46 5.99 The covariance matrix of the residuals demand supply demand 3.76 4.70 supply 4.70 6.34 The correlations of the residuals demand supply demand 1.000 0.962 supply 0.962 1.000 SUR estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Estimate Std. Error t value Pr(>|t|) (Intercept) 96.8275 7.4665 12.97 6.2e-15 *** price -0.2798 0.0840 -3.33 0.002 ** income 0.3286 0.0206 15.93 < 2e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.94 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 63.987 MSE: 3.764 Root MSE: 1.94 Multiple R-Squared: 0.761 Adjusted R-Squared: 0.733 SUR estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 52.9386 7.6655 6.91 5.1e-08 *** price 0.2202 0.0840 2.62 0.013 * farmPrice 0.2327 0.0212 10.97 7.2e-13 *** trend 0.3286 0.0206 15.93 < 2e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.518 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 101.473 MSE: 6.342 Root MSE: 2.518 Multiple R-Squared: 0.622 Adjusted R-Squared: 0.551 > nobs( fitsur5 ) [1] 40 > # the same with symbolically specified restrictions > fitsur5Sym <- systemfit( system, "SUR", data = Kmenta, + restrict.matrix = restrict3, restrict.regMat = tc, + x = TRUE, useMatrix = useMatrix ) > all.equal( fitsur5, fitsur5Sym ) [1] "Component \"call\": target, current do not match when deparsed" > > ## *************** SUR with 2 restrictions via R and restrict.regMat (EViews-like) ************** > fitsur5e <- systemfit( system, "SUR", data = Kmenta, methodResidCov = "noDfCor", + restrict.matrix = restr3m, restrict.rhs = restr3q, restrict.regMat = tc, + useMatrix = useMatrix ) > print( summary( fitsur5e ) ) systemfit results method: SUR N DF SSR detRCov OLS-R2 McElroy-R2 system 40 35 165 1.2 0.693 0.653 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 63.8 3.75 1.94 0.762 0.734 supply 20 16 100.8 6.30 2.51 0.624 0.553 The covariance matrix of the residuals used for estimation demand supply demand 3.20 3.67 supply 3.67 4.79 The covariance matrix of the residuals demand supply demand 3.19 3.86 supply 3.86 5.04 The correlations of the residuals demand supply demand 1.000 0.962 supply 0.962 1.000 SUR estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Estimate Std. Error t value Pr(>|t|) (Intercept) 97.2678 6.9200 14.06 4.4e-16 *** price -0.2851 0.0767 -3.72 7e-04 *** income 0.3296 0.0184 17.86 < 2e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.937 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 63.811 MSE: 3.754 Root MSE: 1.937 Multiple R-Squared: 0.762 Adjusted R-Squared: 0.734 SUR estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 53.3040 7.1045 7.5 8.7e-09 *** price 0.2149 0.0767 2.8 0.0082 ** farmPrice 0.2343 0.0187 12.6 1.6e-14 *** trend 0.3296 0.0184 17.9 < 2e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.51 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 100.835 MSE: 6.302 Root MSE: 2.51 Multiple R-Squared: 0.624 Adjusted R-Squared: 0.553 > > ## ************ WSUR with 2 restrictions via R and restrict.regMat ************ > fitsur5w <- systemfit( system, "SUR", data = Kmenta, restrict.matrix = restr3m, + restrict.rhs = restr3q, restrict.regMat = tc, residCovWeighted = TRUE, + useMatrix = useMatrix ) > summary( fitsur5w ) systemfit results method: SUR N DF SSR detRCov OLS-R2 McElroy-R2 system 40 35 166 1.75 0.69 0.691 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 64.2 3.77 1.94 0.761 0.733 supply 20 16 102.0 6.37 2.52 0.620 0.548 The covariance matrix of the residuals used for estimation demand supply demand 3.74 4.47 supply 4.47 6.02 The covariance matrix of the residuals demand supply demand 3.77 4.72 supply 4.72 6.37 The correlations of the residuals demand supply demand 1.000 0.963 supply 0.963 1.000 SUR estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Estimate Std. Error t value Pr(>|t|) (Intercept) 96.4421 7.4234 12.99 6e-15 *** price -0.2753 0.0838 -3.29 0.0023 ** income 0.3280 0.0202 16.21 <2e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.943 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 64.16 MSE: 3.774 Root MSE: 1.943 Multiple R-Squared: 0.761 Adjusted R-Squared: 0.733 SUR estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 52.5761 7.6099 6.91 5.0e-08 *** price 0.2247 0.0838 2.68 0.011 * farmPrice 0.2318 0.0208 11.14 4.7e-13 *** trend 0.3280 0.0202 16.21 < 2e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.524 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 101.967 MSE: 6.373 Root MSE: 2.524 Multiple R-Squared: 0.62 Adjusted R-Squared: 0.548 > > > ## ************** iterated SUR **************************** > fitsuri1 <- systemfit( system2, "SUR", data = Kmenta, maxit = 100, + useMatrix = useMatrix ) > print( summary( fitsuri1 ) ) systemfit results method: iterated SUR convergence achieved after 6 iterations N DF SSR detRCov OLS-R2 McElroy-R2 system 40 33 108 4.42 0.885 0.958 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 66.3 3.90 1.98 0.753 0.724 supply 20 16 41.4 2.59 1.61 0.938 0.926 The covariance matrix of the residuals used for estimation demand supply demand 3.90 -2.38 supply -2.38 2.59 The covariance matrix of the residuals demand supply demand 3.90 -2.38 supply -2.38 2.59 The correlations of the residuals demand supply demand 1.000 -0.749 supply -0.749 1.000 SUR estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Estimate Std. Error t value Pr(>|t|) (Intercept) 94.0537 7.4051 12.70 4.2e-10 *** price -0.2355 0.0882 -2.67 0.016 * income 0.3117 0.0457 6.81 3.0e-06 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.975 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 66.286 MSE: 3.899 Root MSE: 1.975 Multiple R-Squared: 0.753 Adjusted R-Squared: 0.724 SUR estimates for 'supply' (equation 2) Model Formula: price ~ income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 89.2982 3.3822 26.4 1.3e-14 *** income 0.6655 0.0423 15.7 3.7e-11 *** farmPrice -0.4742 0.0372 -12.7 8.7e-10 *** trend -0.7966 0.0656 -12.2 1.7e-09 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.609 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 41.411 MSE: 2.588 Root MSE: 1.609 Multiple R-Squared: 0.938 Adjusted R-Squared: 0.926 > nobs( fitsuri1 ) [1] 40 > > ## ************** iterated SUR (EViews-like) ***************** > fitsuri1e <- systemfit( system2, "SUR", data = Kmenta, methodResidCov = "noDfCor", + maxit = 100, useMatrix = useMatrix ) > print( summary( fitsuri1e, useDfSys = TRUE ) ) systemfit results method: iterated SUR convergence achieved after 7 iterations N DF SSR detRCov OLS-R2 McElroy-R2 system 40 33 108 3.01 0.885 0.959 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 66.7 3.93 1.98 0.751 0.722 supply 20 16 41.2 2.57 1.60 0.938 0.927 The covariance matrix of the residuals used for estimation demand supply demand 3.34 -1.97 supply -1.97 2.06 The covariance matrix of the residuals demand supply demand 3.34 -1.97 supply -1.97 2.06 The correlations of the residuals demand supply demand 1.00 -0.75 supply -0.75 1.00 SUR estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Estimate Std. Error t value Pr(>|t|) (Intercept) 93.6193 6.8499 13.67 4.0e-15 *** price -0.2295 0.0816 -2.81 0.0082 ** income 0.3100 0.0423 7.33 2.1e-08 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.981 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 66.742 MSE: 3.926 Root MSE: 1.981 Multiple R-Squared: 0.751 Adjusted R-Squared: 0.722 SUR estimates for 'supply' (equation 2) Model Formula: price ~ income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 89.2690 3.0165 29.6 < 2e-16 *** income 0.6641 0.0377 17.6 < 2e-16 *** farmPrice -0.4730 0.0332 -14.2 1.3e-15 *** trend -0.7919 0.0585 -13.6 4.9e-15 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.604 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 41.176 MSE: 2.573 Root MSE: 1.604 Multiple R-Squared: 0.938 Adjusted R-Squared: 0.927 > > ## ************** iterated SUR (methodResidCov = "Theil") **************************** > fitsuri1r2 <- systemfit( system2, "SUR", data = Kmenta, maxit = 100, + methodResidCov = "Theil", useMatrix = useMatrix ) > print( summary( fitsuri1r2 ) ) systemfit results method: iterated SUR convergence achieved after 7 iterations N DF SSR detRCov OLS-R2 McElroy-R2 system 40 33 109 4 0.884 0.961 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 66.9 3.94 1.98 0.750 0.721 supply 20 16 41.8 2.61 1.62 0.937 0.926 The covariance matrix of the residuals used for estimation demand supply demand 3.94 -2.51 supply -2.51 2.61 The covariance matrix of the residuals demand supply demand 3.94 -2.51 supply -2.51 2.61 The correlations of the residuals demand supply demand 1.000 -0.754 supply -0.754 1.000 SUR estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Estimate Std. Error t value Pr(>|t|) (Intercept) 93.4405 7.3821 12.66 4.4e-10 *** price -0.2271 0.0877 -2.59 0.019 * income 0.3093 0.0458 6.75 3.4e-06 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.984 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 66.939 MSE: 3.938 Root MSE: 1.984 Multiple R-Squared: 0.75 Adjusted R-Squared: 0.721 SUR estimates for 'supply' (equation 2) Model Formula: price ~ income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 89.1602 3.3868 26.3 1.3e-14 *** income 0.6635 0.0423 15.7 3.9e-11 *** farmPrice -0.4710 0.0369 -12.8 8.5e-10 *** trend -0.7952 0.0643 -12.4 1.3e-09 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.616 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 41.764 MSE: 2.61 Root MSE: 1.616 Multiple R-Squared: 0.937 Adjusted R-Squared: 0.926 > > ## ************** iterated SUR (methodResidCov="Theil", useDfSys=TRUE) ***************** > fitsuri1e2 <- systemfit( system2, "SUR", data = Kmenta, methodResidCov = "Theil", + maxit = 100, x = TRUE, useMatrix = useMatrix ) > print( summary( fitsuri1e2, useDfSys = TRUE ) ) systemfit results method: iterated SUR convergence achieved after 7 iterations N DF SSR detRCov OLS-R2 McElroy-R2 system 40 33 109 4 0.884 0.961 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 66.9 3.94 1.98 0.750 0.721 supply 20 16 41.8 2.61 1.62 0.937 0.926 The covariance matrix of the residuals used for estimation demand supply demand 3.94 -2.51 supply -2.51 2.61 The covariance matrix of the residuals demand supply demand 3.94 -2.51 supply -2.51 2.61 The correlations of the residuals demand supply demand 1.000 -0.754 supply -0.754 1.000 SUR estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Estimate Std. Error t value Pr(>|t|) (Intercept) 93.4405 7.3821 12.66 3.3e-14 *** price -0.2271 0.0877 -2.59 0.014 * income 0.3093 0.0458 6.75 1.1e-07 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.984 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 66.939 MSE: 3.938 Root MSE: 1.984 Multiple R-Squared: 0.75 Adjusted R-Squared: 0.721 SUR estimates for 'supply' (equation 2) Model Formula: price ~ income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 89.1602 3.3868 26.3 < 2e-16 *** income 0.6635 0.0423 15.7 < 2e-16 *** farmPrice -0.4710 0.0369 -12.8 2.7e-14 *** trend -0.7952 0.0643 -12.4 6.0e-14 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.616 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 41.764 MSE: 2.61 Root MSE: 1.616 Multiple R-Squared: 0.937 Adjusted R-Squared: 0.926 > > ## ************** iterated SUR (methodResidCov = "max") **************************** > fitsuri1r3 <- systemfit( system2, "SUR", data = Kmenta, maxit = 100, + methodResidCov = "max", useMatrix = useMatrix ) > print( summary( fitsuri1r3 ) ) systemfit results method: iterated SUR convergence achieved after 7 iterations N DF SSR detRCov OLS-R2 McElroy-R2 system 40 33 109 4.06 0.884 0.96 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 66.8 3.93 1.98 0.751 0.721 supply 20 16 41.7 2.61 1.61 0.937 0.926 The covariance matrix of the residuals used for estimation demand supply demand 3.93 -2.49 supply -2.49 2.61 The covariance matrix of the residuals demand supply demand 3.93 -2.49 supply -2.49 2.61 The correlations of the residuals demand supply demand 1.000 -0.754 supply -0.754 1.000 SUR estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Estimate Std. Error t value Pr(>|t|) (Intercept) 93.5427 7.3858 12.67 4.4e-10 *** price -0.2285 0.0877 -2.60 0.019 * income 0.3097 0.0458 6.76 3.3e-06 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.983 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 66.826 MSE: 3.931 Root MSE: 1.983 Multiple R-Squared: 0.751 Adjusted R-Squared: 0.721 SUR estimates for 'supply' (equation 2) Model Formula: price ~ income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 89.1830 3.3861 26.3 1.3e-14 *** income 0.6639 0.0423 15.7 3.8e-11 *** farmPrice -0.4715 0.0370 -12.8 8.5e-10 *** trend -0.7955 0.0645 -12.3 1.4e-09 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.615 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 41.708 MSE: 2.607 Root MSE: 1.615 Multiple R-Squared: 0.937 Adjusted R-Squared: 0.926 > > ## ************** iterated WSUR (methodResidCov = "max") **************************** > fitsuri1wr3 <- systemfit( system2, "SUR", data = Kmenta, maxit = 100, + methodResidCov = "max", residCovWeighted = TRUE, useMatrix = useMatrix ) > summary( fitsuri1wr3 ) systemfit results method: iterated SUR convergence achieved after 7 iterations N DF SSR detRCov OLS-R2 McElroy-R2 system 40 33 109 4.06 0.884 0.96 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 66.8 3.93 1.98 0.751 0.721 supply 20 16 41.7 2.61 1.61 0.937 0.926 The covariance matrix of the residuals used for estimation demand supply demand 3.93 -2.49 supply -2.49 2.61 The covariance matrix of the residuals demand supply demand 3.93 -2.49 supply -2.49 2.61 The correlations of the residuals demand supply demand 1.000 -0.754 supply -0.754 1.000 SUR estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Estimate Std. Error t value Pr(>|t|) (Intercept) 93.5427 7.3858 12.67 4.4e-10 *** price -0.2285 0.0877 -2.60 0.019 * income 0.3097 0.0458 6.76 3.3e-06 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.983 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 66.826 MSE: 3.931 Root MSE: 1.983 Multiple R-Squared: 0.751 Adjusted R-Squared: 0.721 SUR estimates for 'supply' (equation 2) Model Formula: price ~ income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 89.1830 3.3861 26.3 1.3e-14 *** income 0.6639 0.0423 15.7 3.8e-11 *** farmPrice -0.4715 0.0370 -12.8 8.5e-10 *** trend -0.7955 0.0645 -12.3 1.4e-09 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.615 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 41.708 MSE: 2.607 Root MSE: 1.615 Multiple R-Squared: 0.937 Adjusted R-Squared: 0.926 > > > ## *********** iterated SUR with restriction ******************* > fitsuri2 <- systemfit( system2, "SUR", data = Kmenta, restrict.matrix = restrm, + maxit = 100, useMatrix = useMatrix ) > print( summary( fitsuri2 ) ) systemfit results method: iterated SUR convergence achieved after 21 iterations N DF SSR detRCov OLS-R2 McElroy-R2 system 40 34 587 110 0.372 0.669 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 67 3.94 1.99 0.75 0.721 supply 20 16 520 32.52 5.70 0.22 0.074 The covariance matrix of the residuals used for estimation demand supply demand 3.94 4.24 supply 4.24 32.52 The covariance matrix of the residuals demand supply demand 3.94 4.24 supply 4.24 32.52 The correlations of the residuals demand supply demand 1.000 0.375 supply 0.375 1.000 SUR estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Estimate Std. Error t value Pr(>|t|) (Intercept) 107.3678 7.4986 14.32 4.4e-16 *** price -0.3945 0.0912 -4.33 0.00013 *** income 0.3382 0.0466 7.25 2.1e-08 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.986 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 67.024 MSE: 3.943 Root MSE: 1.986 Multiple R-Squared: 0.75 Adjusted R-Squared: 0.721 SUR estimates for 'supply' (equation 2) Model Formula: price ~ income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 85.0448 12.1069 7.02 4.2e-08 *** income 0.3125 0.1233 2.53 0.016 * farmPrice -0.1972 0.1157 -1.70 0.097 . trend 0.3382 0.0466 7.25 2.1e-08 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 5.703 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 520.329 MSE: 32.521 Root MSE: 5.703 Multiple R-Squared: 0.22 Adjusted R-Squared: 0.074 > > ## *********** iterated SUR with restriction (EViews-like) *************** > fitsuri2e <- systemfit( system2, "SUR", data = Kmenta, restrict.matrix = restrm, + methodResidCov = "noDfCor", maxit = 100, x = TRUE, + useMatrix = useMatrix ) > print( summary( fitsuri2e ) ) systemfit results method: iterated SUR convergence achieved after 22 iterations N DF SSR detRCov OLS-R2 McElroy-R2 system 40 34 588 74.9 0.372 0.664 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 67.5 3.97 1.99 0.748 0.719 supply 20 16 520.2 32.51 5.70 0.220 0.074 The covariance matrix of the residuals used for estimation demand supply demand 3.37 3.58 supply 3.58 26.01 The covariance matrix of the residuals demand supply demand 3.37 3.58 supply 3.58 26.01 The correlations of the residuals demand supply demand 1.000 0.382 supply 0.382 1.000 SUR estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Estimate Std. Error t value Pr(>|t|) (Intercept) 107.8051 6.9270 15.56 < 2e-16 *** price -0.3986 0.0843 -4.73 3.8e-05 *** income 0.3379 0.0431 7.84 4.0e-09 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.992 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 67.47 MSE: 3.969 Root MSE: 1.992 Multiple R-Squared: 0.748 Adjusted R-Squared: 0.719 SUR estimates for 'supply' (equation 2) Model Formula: price ~ income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 85.1071 10.8287 7.86 3.8e-09 *** income 0.3106 0.1101 2.82 0.0079 ** farmPrice -0.1960 0.1034 -1.89 0.0667 . trend 0.3379 0.0431 7.84 4.0e-09 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 5.702 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 520.205 MSE: 32.513 Root MSE: 5.702 Multiple R-Squared: 0.22 Adjusted R-Squared: 0.074 > > ## *********** iterated WSUR with restriction ******************* > fitsuri2w <- systemfit( system2, "SUR", data = Kmenta, restrict.matrix = restrm, + maxit = 100, residCovWeighted = TRUE, useMatrix = useMatrix ) > summary( fitsuri2w ) systemfit results method: iterated SUR convergence achieved after 18 iterations N DF SSR detRCov OLS-R2 McElroy-R2 system 40 34 587 110 0.372 0.669 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 67 3.94 1.99 0.75 0.721 supply 20 16 520 32.52 5.70 0.22 0.074 The covariance matrix of the residuals used for estimation demand supply demand 3.94 4.24 supply 4.24 32.52 The covariance matrix of the residuals demand supply demand 3.94 4.24 supply 4.24 32.52 The correlations of the residuals demand supply demand 1.000 0.375 supply 0.375 1.000 SUR estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Estimate Std. Error t value Pr(>|t|) (Intercept) 107.3672 7.4986 14.32 4.4e-16 *** price -0.3945 0.0912 -4.33 0.00013 *** income 0.3382 0.0466 7.25 2.1e-08 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.986 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 67.023 MSE: 3.943 Root MSE: 1.986 Multiple R-Squared: 0.75 Adjusted R-Squared: 0.721 SUR estimates for 'supply' (equation 2) Model Formula: price ~ income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 85.0448 12.1069 7.02 4.2e-08 *** income 0.3125 0.1233 2.53 0.016 * farmPrice -0.1972 0.1157 -1.70 0.097 . trend 0.3382 0.0466 7.25 2.1e-08 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 5.703 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 520.327 MSE: 32.52 Root MSE: 5.703 Multiple R-Squared: 0.22 Adjusted R-Squared: 0.074 > > > ## *********** iterated SUR with restriction via restrict.regMat ******************** > fitsuri3 <- systemfit( system2, "SUR", data = Kmenta, restrict.regMat = tc, + maxit = 100, useMatrix = useMatrix ) > print( summary( fitsuri3 ) ) systemfit results method: iterated SUR convergence achieved after 21 iterations N DF SSR detRCov OLS-R2 McElroy-R2 system 40 34 587 110 0.372 0.669 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 67 3.94 1.99 0.75 0.721 supply 20 16 520 32.52 5.70 0.22 0.074 The covariance matrix of the residuals used for estimation demand supply demand 3.94 4.24 supply 4.24 32.52 The covariance matrix of the residuals demand supply demand 3.94 4.24 supply 4.24 32.52 The correlations of the residuals demand supply demand 1.000 0.375 supply 0.375 1.000 SUR estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Estimate Std. Error t value Pr(>|t|) (Intercept) 107.3678 7.4986 14.32 4.4e-16 *** price -0.3945 0.0912 -4.33 0.00013 *** income 0.3382 0.0466 7.25 2.1e-08 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.986 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 67.024 MSE: 3.943 Root MSE: 1.986 Multiple R-Squared: 0.75 Adjusted R-Squared: 0.721 SUR estimates for 'supply' (equation 2) Model Formula: price ~ income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 85.0448 12.1069 7.02 4.2e-08 *** income 0.3125 0.1233 2.53 0.016 * farmPrice -0.1972 0.1157 -1.70 0.097 . trend 0.3382 0.0466 7.25 2.1e-08 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 5.703 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 520.329 MSE: 32.521 Root MSE: 5.703 Multiple R-Squared: 0.22 Adjusted R-Squared: 0.074 > > ## *********** iterated SUR with restriction via restrict.regMat (EViews-like) *************** > fitsuri3e <- systemfit( system2, "SUR", data = Kmenta, restrict.regMat = tc, + methodResidCov = "noDfCor", maxit = 100, x = TRUE, + useMatrix = useMatrix ) > print( summary( fitsuri3e ) ) systemfit results method: iterated SUR convergence achieved after 22 iterations N DF SSR detRCov OLS-R2 McElroy-R2 system 40 34 588 74.9 0.372 0.664 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 67.5 3.97 1.99 0.748 0.719 supply 20 16 520.2 32.51 5.70 0.220 0.074 The covariance matrix of the residuals used for estimation demand supply demand 3.37 3.58 supply 3.58 26.01 The covariance matrix of the residuals demand supply demand 3.37 3.58 supply 3.58 26.01 The correlations of the residuals demand supply demand 1.000 0.382 supply 0.382 1.000 SUR estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Estimate Std. Error t value Pr(>|t|) (Intercept) 107.8051 6.9270 15.56 < 2e-16 *** price -0.3986 0.0843 -4.73 3.8e-05 *** income 0.3379 0.0431 7.84 4.0e-09 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.992 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 67.47 MSE: 3.969 Root MSE: 1.992 Multiple R-Squared: 0.748 Adjusted R-Squared: 0.719 SUR estimates for 'supply' (equation 2) Model Formula: price ~ income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 85.1071 10.8287 7.86 3.8e-09 *** income 0.3106 0.1101 2.82 0.0079 ** farmPrice -0.1960 0.1034 -1.89 0.0667 . trend 0.3379 0.0431 7.84 4.0e-09 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 5.702 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 520.205 MSE: 32.513 Root MSE: 5.702 Multiple R-Squared: 0.22 Adjusted R-Squared: 0.074 > > ## *********** iterated WSUR with restriction via restrict.regMat (EViews-like) *************** > fitsuri3we <- systemfit( system2, "SUR", data = Kmenta, restrict.regMat = tc, + methodResidCov = "noDfCor", maxit = 100, residCovWeighted = TRUE, + useMatrix = useMatrix ) > summary( fitsuri3we ) systemfit results method: iterated SUR convergence achieved after 20 iterations N DF SSR detRCov OLS-R2 McElroy-R2 system 40 34 588 74.9 0.372 0.664 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 67.5 3.97 1.99 0.748 0.719 supply 20 16 520.2 32.51 5.70 0.220 0.074 The covariance matrix of the residuals used for estimation demand supply demand 3.37 3.58 supply 3.58 26.01 The covariance matrix of the residuals demand supply demand 3.37 3.58 supply 3.58 26.01 The correlations of the residuals demand supply demand 1.000 0.382 supply 0.382 1.000 SUR estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Estimate Std. Error t value Pr(>|t|) (Intercept) 107.8055 6.9270 15.56 < 2e-16 *** price -0.3986 0.0843 -4.73 3.8e-05 *** income 0.3379 0.0431 7.84 4.0e-09 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.992 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 67.471 MSE: 3.969 Root MSE: 1.992 Multiple R-Squared: 0.748 Adjusted R-Squared: 0.719 SUR estimates for 'supply' (equation 2) Model Formula: price ~ income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 85.1071 10.8288 7.86 3.8e-09 *** income 0.3106 0.1101 2.82 0.008 ** farmPrice -0.1960 0.1034 -1.89 0.067 . trend 0.3379 0.0431 7.84 4.0e-09 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 5.702 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 520.206 MSE: 32.513 Root MSE: 5.702 Multiple R-Squared: 0.22 Adjusted R-Squared: 0.074 > > > ## *************** iterated SUR with 2 restrictions *************************** > fitsurio4 <- systemfit( system, "SUR", data = Kmenta, restrict.matrix = restr2m, + restrict.rhs = restr2q, maxit = 100, useMatrix = useMatrix ) > print( summary( fitsurio4 ) ) systemfit results method: iterated SUR convergence achieved after 10 iterations N DF SSR detRCov OLS-R2 McElroy-R2 system 40 35 176 1.74 0.671 0.705 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 67.2 3.95 1.99 0.749 0.720 supply 20 16 109.2 6.83 2.61 0.593 0.516 The covariance matrix of the residuals used for estimation demand supply demand 3.95 5.02 supply 5.02 6.83 The covariance matrix of the residuals demand supply demand 3.95 5.02 supply 5.02 6.83 The correlations of the residuals demand supply demand 1.000 0.967 supply 0.967 1.000 SUR estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Estimate Std. Error t value Pr(>|t|) (Intercept) 92.4262 7.3543 12.57 1.6e-14 *** price -0.2276 0.0850 -2.68 0.011 * income 0.3203 0.0185 17.32 < 2e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.988 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 67.206 MSE: 3.953 Root MSE: 1.988 Multiple R-Squared: 0.749 Adjusted R-Squared: 0.72 SUR estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 48.7295 7.4587 6.53 1.5e-07 *** price 0.2724 0.0850 3.20 0.0029 ** farmPrice 0.2232 0.0190 11.76 1.0e-13 *** trend 0.3203 0.0185 17.32 < 2e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.613 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 109.234 MSE: 6.827 Root MSE: 2.613 Multiple R-Squared: 0.593 Adjusted R-Squared: 0.516 > fitsuri4 <- systemfit( system2, "SUR", data = Kmenta, restrict.matrix = restr2m, + restrict.rhs = restr2q, maxit = 100, useMatrix = useMatrix ) > print( summary( fitsuri4 ) ) systemfit results method: iterated SUR convergence achieved after 19 iterations N DF SSR detRCov OLS-R2 McElroy-R2 system 40 35 575 121 0.385 0.637 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 65.5 3.85 1.96 0.756 0.727 supply 20 16 509.3 31.83 5.64 0.237 0.094 The covariance matrix of the residuals used for estimation demand supply demand 3.85 1.23 supply 1.23 31.83 The covariance matrix of the residuals demand supply demand 3.85 1.23 supply 1.23 31.83 The correlations of the residuals demand supply demand 1.000 0.111 supply 0.111 1.000 SUR estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Estimate Std. Error t value Pr(>|t|) (Intercept) 98.0356 6.7437 14.54 2.2e-16 *** price -0.2646 0.0777 -3.40 0.0017 ** income 0.3007 0.0436 6.89 5.3e-08 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.963 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 65.532 MSE: 3.855 Root MSE: 1.963 Multiple R-Squared: 0.756 Adjusted R-Squared: 0.727 SUR estimates for 'supply' (equation 2) Model Formula: price ~ income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 90.0046 10.4367 8.62 3.5e-10 *** income 0.2354 0.0777 3.03 0.0046 ** farmPrice -0.1667 0.1108 -1.50 0.1416 trend 0.3007 0.0436 6.89 5.3e-08 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 5.642 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 509.345 MSE: 31.834 Root MSE: 5.642 Multiple R-Squared: 0.237 Adjusted R-Squared: 0.094 > > ## *************** iterated SUR with 2 restrictions (EViews-like) ************** > fitsurio4e <- systemfit( system, "SUR", data = Kmenta, methodResidCov = "noDfCor", + restrict.matrix = restr2m, restrict.rhs = restr2q, maxit = 100, + useMatrix = useMatrix ) > print( summary( fitsurio4e ) ) systemfit results method: iterated SUR convergence achieved after 9 iterations N DF SSR detRCov OLS-R2 McElroy-R2 system 40 35 173 1.18 0.677 0.665 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 66.3 3.90 1.97 0.753 0.724 supply 20 16 106.7 6.67 2.58 0.602 0.527 The covariance matrix of the residuals used for estimation demand supply demand 3.31 4.06 supply 4.06 5.34 The covariance matrix of the residuals demand supply demand 3.31 4.06 supply 4.06 5.34 The correlations of the residuals demand supply demand 1.000 0.966 supply 0.966 1.000 SUR estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Estimate Std. Error t value Pr(>|t|) (Intercept) 93.3596 6.8576 13.61 1.6e-15 *** price -0.2398 0.0779 -3.08 0.0041 ** income 0.3232 0.0163 19.81 < 2e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.974 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 66.265 MSE: 3.898 Root MSE: 1.974 Multiple R-Squared: 0.753 Adjusted R-Squared: 0.724 SUR estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 49.5456 6.9727 7.11 2.8e-08 *** price 0.2602 0.0779 3.34 0.002 ** farmPrice 0.2270 0.0164 13.81 8.9e-16 *** trend 0.3232 0.0163 19.81 < 2e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.583 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 106.722 MSE: 6.67 Root MSE: 2.583 Multiple R-Squared: 0.602 Adjusted R-Squared: 0.527 > fitsuri4e <- systemfit( system2, "SUR", data = Kmenta, methodResidCov = "noDfCor", + restrict.matrix = restr2m, restrict.rhs = restr2q, maxit = 100, + useMatrix = useMatrix ) > print( summary( fitsuri4e ) ) systemfit results method: iterated SUR convergence achieved after 20 iterations N DF SSR detRCov OLS-R2 McElroy-R2 system 40 35 570 82.4 0.391 0.629 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 66 3.88 1.97 0.754 0.725 supply 20 16 504 31.50 5.61 0.245 0.103 The covariance matrix of the residuals used for estimation demand supply demand 3.300 0.876 supply 0.876 25.203 The covariance matrix of the residuals demand supply demand 3.300 0.876 supply 0.876 25.203 The correlations of the residuals demand supply demand 1.0000 0.0961 supply 0.0961 1.0000 SUR estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Estimate Std. Error t value Pr(>|t|) (Intercept) 97.6297 6.1560 15.86 < 2e-16 *** price -0.2576 0.0709 -3.63 0.00089 *** income 0.2976 0.0403 7.38 1.2e-08 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.97 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 65.995 MSE: 3.882 Root MSE: 1.97 Multiple R-Squared: 0.754 Adjusted R-Squared: 0.725 SUR estimates for 'supply' (equation 2) Model Formula: price ~ income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 89.5437 9.3372 9.59 2.5e-11 *** income 0.2424 0.0709 3.42 0.0016 ** farmPrice -0.1687 0.0988 -1.71 0.0967 . trend 0.2976 0.0403 7.38 1.2e-08 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 5.613 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 504.066 MSE: 31.504 Root MSE: 5.613 Multiple R-Squared: 0.245 Adjusted R-Squared: 0.103 > > ## *************** iterated WSUR with 2 restrictions *************************** > fitsurio4w <- systemfit( system, "SUR", data = Kmenta, restrict.matrix = restr2m, + restrict.rhs = restr2q, maxit = 100, residCovWeighted = TRUE, + useMatrix = useMatrix ) > summary( fitsurio4w ) systemfit results method: iterated SUR convergence achieved after 10 iterations N DF SSR detRCov OLS-R2 McElroy-R2 system 40 35 176 1.74 0.671 0.705 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 67.2 3.95 1.99 0.749 0.720 supply 20 16 109.2 6.83 2.61 0.593 0.516 The covariance matrix of the residuals used for estimation demand supply demand 3.95 5.02 supply 5.02 6.83 The covariance matrix of the residuals demand supply demand 3.95 5.02 supply 5.02 6.83 The correlations of the residuals demand supply demand 1.000 0.967 supply 0.967 1.000 SUR estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Estimate Std. Error t value Pr(>|t|) (Intercept) 92.4262 7.3543 12.57 1.6e-14 *** price -0.2276 0.0850 -2.68 0.011 * income 0.3203 0.0185 17.32 < 2e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.988 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 67.206 MSE: 3.953 Root MSE: 1.988 Multiple R-Squared: 0.749 Adjusted R-Squared: 0.72 SUR estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 48.7294 7.4587 6.53 1.5e-07 *** price 0.2724 0.0850 3.20 0.0029 ** farmPrice 0.2232 0.0190 11.76 1.0e-13 *** trend 0.3203 0.0185 17.32 < 2e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.613 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 109.234 MSE: 6.827 Root MSE: 2.613 Multiple R-Squared: 0.593 Adjusted R-Squared: 0.516 > fitsuri4w <- systemfit( system2, "SUR", data = Kmenta, restrict.matrix = restr2m, + restrict.rhs = restr2q, maxit = 100, residCovWeighted = TRUE, + useMatrix = useMatrix ) > summary( fitsuri4w ) systemfit results method: iterated SUR convergence achieved after 18 iterations N DF SSR detRCov OLS-R2 McElroy-R2 system 40 35 575 121 0.385 0.637 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 65.5 3.85 1.96 0.756 0.727 supply 20 16 509.3 31.83 5.64 0.237 0.094 The covariance matrix of the residuals used for estimation demand supply demand 3.85 1.23 supply 1.23 31.83 The covariance matrix of the residuals demand supply demand 3.85 1.23 supply 1.23 31.83 The correlations of the residuals demand supply demand 1.000 0.111 supply 0.111 1.000 SUR estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Estimate Std. Error t value Pr(>|t|) (Intercept) 98.0361 6.7437 14.54 2.2e-16 *** price -0.2646 0.0777 -3.40 0.0017 ** income 0.3007 0.0436 6.89 5.3e-08 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.963 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 65.531 MSE: 3.855 Root MSE: 1.963 Multiple R-Squared: 0.756 Adjusted R-Squared: 0.727 SUR estimates for 'supply' (equation 2) Model Formula: price ~ income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 90.0052 10.4368 8.62 3.5e-10 *** income 0.2354 0.0777 3.03 0.0046 ** farmPrice -0.1667 0.1108 -1.50 0.1416 trend 0.3007 0.0436 6.89 5.3e-08 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 5.642 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 509.349 MSE: 31.834 Root MSE: 5.642 Multiple R-Squared: 0.237 Adjusted R-Squared: 0.094 > > > ## *************** iterated SUR with 2 restrictions via R and restrict.regMat **************** > fitsurio5 <- systemfit( system, "SUR", data = Kmenta, restrict.matrix = restr3m, + restrict.rhs = restr3q, restrict.regMat = tc, maxit = 100, + useMatrix = useMatrix ) > print( summary( fitsurio5 ) ) systemfit results method: iterated SUR convergence achieved after 10 iterations N DF SSR detRCov OLS-R2 McElroy-R2 system 40 35 176 1.74 0.671 0.705 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 67.2 3.95 1.99 0.749 0.720 supply 20 16 109.2 6.83 2.61 0.593 0.516 The covariance matrix of the residuals used for estimation demand supply demand 3.95 5.02 supply 5.02 6.83 The covariance matrix of the residuals demand supply demand 3.95 5.02 supply 5.02 6.83 The correlations of the residuals demand supply demand 1.000 0.967 supply 0.967 1.000 SUR estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Estimate Std. Error t value Pr(>|t|) (Intercept) 92.4262 7.3543 12.57 1.6e-14 *** price -0.2276 0.0850 -2.68 0.011 * income 0.3203 0.0185 17.32 < 2e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.988 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 67.206 MSE: 3.953 Root MSE: 1.988 Multiple R-Squared: 0.749 Adjusted R-Squared: 0.72 SUR estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 48.7295 7.4587 6.53 1.5e-07 *** price 0.2724 0.0850 3.20 0.0029 ** farmPrice 0.2232 0.0190 11.76 1.0e-13 *** trend 0.3203 0.0185 17.32 < 2e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.613 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 109.234 MSE: 6.827 Root MSE: 2.613 Multiple R-Squared: 0.593 Adjusted R-Squared: 0.516 > fitsuri5 <- systemfit( system2, "SUR", data = Kmenta, restrict.matrix = restr3m, + restrict.rhs = restr3q, restrict.regMat = tc, maxit = 100, + useMatrix = useMatrix ) > print( summary( fitsuri5 ) ) systemfit results method: iterated SUR convergence achieved after 19 iterations N DF SSR detRCov OLS-R2 McElroy-R2 system 40 35 575 121 0.385 0.637 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 65.5 3.85 1.96 0.756 0.727 supply 20 16 509.3 31.83 5.64 0.237 0.094 The covariance matrix of the residuals used for estimation demand supply demand 3.85 1.23 supply 1.23 31.83 The covariance matrix of the residuals demand supply demand 3.85 1.23 supply 1.23 31.83 The correlations of the residuals demand supply demand 1.000 0.111 supply 0.111 1.000 SUR estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Estimate Std. Error t value Pr(>|t|) (Intercept) 98.0356 6.7437 14.54 2.2e-16 *** price -0.2646 0.0777 -3.40 0.0017 ** income 0.3007 0.0436 6.89 5.3e-08 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.963 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 65.532 MSE: 3.855 Root MSE: 1.963 Multiple R-Squared: 0.756 Adjusted R-Squared: 0.727 SUR estimates for 'supply' (equation 2) Model Formula: price ~ income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 90.0046 10.4367 8.62 3.5e-10 *** income 0.2354 0.0777 3.03 0.0046 ** farmPrice -0.1667 0.1108 -1.50 0.1416 trend 0.3007 0.0436 6.89 5.3e-08 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 5.642 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 509.345 MSE: 31.834 Root MSE: 5.642 Multiple R-Squared: 0.237 Adjusted R-Squared: 0.094 > > ## ********* iterated SUR with 2 restrictions via R and restrict.regMat (EViews-like) ********** > fitsurio5e <- systemfit( system, "SUR", data = Kmenta, methodResidCov = "noDfCor", + restrict.matrix = restr3m, restrict.rhs = restr3q, restrict.regMat = tc, + maxit = 100, useMatrix = useMatrix ) > print( summary( fitsurio5e ) ) systemfit results method: iterated SUR convergence achieved after 9 iterations N DF SSR detRCov OLS-R2 McElroy-R2 system 40 35 173 1.18 0.677 0.665 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 66.3 3.90 1.97 0.753 0.724 supply 20 16 106.7 6.67 2.58 0.602 0.527 The covariance matrix of the residuals used for estimation demand supply demand 3.31 4.06 supply 4.06 5.34 The covariance matrix of the residuals demand supply demand 3.31 4.06 supply 4.06 5.34 The correlations of the residuals demand supply demand 1.000 0.966 supply 0.966 1.000 SUR estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Estimate Std. Error t value Pr(>|t|) (Intercept) 93.3596 6.8576 13.61 1.6e-15 *** price -0.2398 0.0779 -3.08 0.0041 ** income 0.3232 0.0163 19.81 < 2e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.974 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 66.265 MSE: 3.898 Root MSE: 1.974 Multiple R-Squared: 0.753 Adjusted R-Squared: 0.724 SUR estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 49.5456 6.9727 7.11 2.8e-08 *** price 0.2602 0.0779 3.34 0.002 ** farmPrice 0.2270 0.0164 13.81 8.9e-16 *** trend 0.3232 0.0163 19.81 < 2e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.583 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 106.722 MSE: 6.67 Root MSE: 2.583 Multiple R-Squared: 0.602 Adjusted R-Squared: 0.527 > fitsuri5e <- systemfit( system2, "SUR", data = Kmenta, methodResidCov = "noDfCor", + restrict.matrix = restr3m, restrict.rhs = restr3q, restrict.regMat = tc, + maxit = 100, useMatrix = useMatrix ) > print( summary( fitsuri5e ) ) systemfit results method: iterated SUR convergence achieved after 20 iterations N DF SSR detRCov OLS-R2 McElroy-R2 system 40 35 570 82.4 0.391 0.629 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 66 3.88 1.97 0.754 0.725 supply 20 16 504 31.50 5.61 0.245 0.103 The covariance matrix of the residuals used for estimation demand supply demand 3.300 0.876 supply 0.876 25.203 The covariance matrix of the residuals demand supply demand 3.300 0.876 supply 0.876 25.203 The correlations of the residuals demand supply demand 1.0000 0.0961 supply 0.0961 1.0000 SUR estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Estimate Std. Error t value Pr(>|t|) (Intercept) 97.6297 6.1560 15.86 < 2e-16 *** price -0.2576 0.0709 -3.63 0.00089 *** income 0.2976 0.0403 7.38 1.2e-08 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.97 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 65.995 MSE: 3.882 Root MSE: 1.97 Multiple R-Squared: 0.754 Adjusted R-Squared: 0.725 SUR estimates for 'supply' (equation 2) Model Formula: price ~ income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 89.5437 9.3372 9.59 2.5e-11 *** income 0.2424 0.0709 3.42 0.0016 ** farmPrice -0.1687 0.0988 -1.71 0.0967 . trend 0.2976 0.0403 7.38 1.2e-08 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 5.613 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 504.066 MSE: 31.504 Root MSE: 5.613 Multiple R-Squared: 0.245 Adjusted R-Squared: 0.103 > nobs( fitsuri5e ) [1] 40 > > ## ********* iterated SUR with 2 restrictions via R and restrict.regMat (methodResidCov="Theil") ********** > fitsurio5r2 <- systemfit( system, "SUR", data = Kmenta, methodResidCov = "Theil", + restrict.matrix = restr3m, restrict.rhs = restr3q, restrict.regMat = tc, + maxit = 100, x = TRUE, useMatrix = useMatrix ) > print( summary( fitsurio5r2 ) ) systemfit results method: iterated SUR warning: convergence not achieved after 100 iterations N DF SSR detRCov OLS-R2 McElroy-R2 system 40 35 253 -1.67 0.527 0.927 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 95.8 5.63 2.37 0.643 0.601 supply 20 16 157.7 9.86 3.14 0.412 0.301 The covariance matrix of the residuals used for estimation demand supply demand 4.26 5.29 supply 5.29 6.69 warning: this covariance matrix is NOT positive semidefinit! The covariance matrix of the residuals demand supply demand 5.63 7.56 supply 7.56 9.86 The correlations of the residuals demand supply demand 1.000 0.982 supply 0.982 1.000 SUR estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Estimate Std. Error t value Pr(>|t|) (Intercept) 78.0342 7.1638 10.89 8.6e-13 *** price -0.0647 0.0815 -0.79 0.43 income 0.3007 0.0131 23.01 < 2e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.373 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 95.76 MSE: 5.633 Root MSE: 2.373 Multiple R-Squared: 0.643 Adjusted R-Squared: 0.601 SUR estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 34.1958 7.2257 4.73 3.6e-05 *** price 0.4353 0.0815 5.34 5.7e-06 *** farmPrice 0.2070 0.0124 16.68 < 2e-16 *** trend 0.3007 0.0131 23.01 < 2e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 3.14 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 157.737 MSE: 9.859 Root MSE: 3.14 Multiple R-Squared: 0.412 Adjusted R-Squared: 0.301 > fitsuri5r2 <- systemfit( system2, "SUR", data = Kmenta, methodResidCov = "Theil", + restrict.matrix = restr3m, restrict.rhs = restr3q, restrict.regMat = tc, + maxit = 100, x = TRUE, useMatrix = useMatrix ) > print( summary( fitsuri5r2 ) ) systemfit results method: iterated SUR convergence achieved after 21 iterations N DF SSR detRCov OLS-R2 McElroy-R2 system 40 35 576 121 0.384 0.637 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 65.4 3.85 1.96 0.756 0.727 supply 20 16 510.8 31.92 5.65 0.235 0.091 The covariance matrix of the residuals used for estimation demand supply demand 3.85 1.34 supply 1.34 31.92 The covariance matrix of the residuals demand supply demand 3.85 1.34 supply 1.34 31.92 The correlations of the residuals demand supply demand 1.000 0.117 supply 0.117 1.000 SUR estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Estimate Std. Error t value Pr(>|t|) (Intercept) 98.2200 6.7593 14.53 2.2e-16 *** price -0.2669 0.0778 -3.43 0.0016 ** income 0.3011 0.0435 6.92 4.9e-08 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.962 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 65.447 MSE: 3.85 Root MSE: 1.962 Multiple R-Squared: 0.756 Adjusted R-Squared: 0.727 SUR estimates for 'supply' (equation 2) Model Formula: price ~ income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 90.2167 10.4342 8.65 3.3e-10 *** income 0.2331 0.0778 3.00 0.005 ** farmPrice -0.1666 0.1111 -1.50 0.143 trend 0.3011 0.0435 6.92 4.9e-08 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 5.65 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 510.75 MSE: 31.922 Root MSE: 5.65 Multiple R-Squared: 0.235 Adjusted R-Squared: 0.091 > > ## ********* iterated SUR with 2 restrictions via R and restrict.regMat (methodResidCov="max") ********** > # fitsuri5e <- systemfit( system, "SUR", data = Kmenta, methodResidCov = "max", > # restrict.matrix = restr3m, restrict.rhs = restr3q, restrict.regMat = tc, > # maxit = 100, useMatrix = useMatrix ) > # print( summary( fitsuri5e ) ) > # print( round( vcov( fitsuri5e ), digits = 6 ) ) > # disabled, because the estimation does not converge > > ## ********* iterated WSUR with 2 restrictions via R and restrict.regMat (methodResidCov="Theil") ********** > fitsurio5wr2 <- systemfit( system, "SUR", data = Kmenta, methodResidCov = "Theil", + restrict.matrix = restr3m, restrict.rhs = restr3q, restrict.regMat = tc, + maxit = 100, residCovWeighted = TRUE, useMatrix = useMatrix ) > summary( fitsurio5wr2 ) systemfit results method: iterated SUR warning: convergence not achieved after 100 iterations N DF SSR detRCov OLS-R2 McElroy-R2 system 40 35 253 -1.67 0.527 0.927 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 95.8 5.63 2.37 0.643 0.601 supply 20 16 157.7 9.86 3.14 0.412 0.301 The covariance matrix of the residuals used for estimation demand supply demand 4.26 5.29 supply 5.29 6.69 warning: this covariance matrix is NOT positive semidefinit! The covariance matrix of the residuals demand supply demand 5.63 7.56 supply 7.56 9.86 The correlations of the residuals demand supply demand 1.000 0.982 supply 0.982 1.000 SUR estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Estimate Std. Error t value Pr(>|t|) (Intercept) 78.0342 7.1638 10.89 8.6e-13 *** price -0.0647 0.0815 -0.79 0.43 income 0.3007 0.0131 23.01 < 2e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.373 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 95.76 MSE: 5.633 Root MSE: 2.373 Multiple R-Squared: 0.643 Adjusted R-Squared: 0.601 SUR estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 34.1958 7.2257 4.73 3.6e-05 *** price 0.4353 0.0815 5.34 5.7e-06 *** farmPrice 0.2070 0.0124 16.68 < 2e-16 *** trend 0.3007 0.0131 23.01 < 2e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 3.14 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 157.737 MSE: 9.859 Root MSE: 3.14 Multiple R-Squared: 0.412 Adjusted R-Squared: 0.301 > fitsuri5wr2 <- systemfit( system2, "SUR", data = Kmenta, methodResidCov = "Theil", + restrict.matrix = restr3m, restrict.rhs = restr3q, restrict.regMat = tc, + maxit = 100, residCovWeighted = TRUE, useMatrix = useMatrix ) > summary( fitsuri5wr2 ) systemfit results method: iterated SUR convergence achieved after 19 iterations N DF SSR detRCov OLS-R2 McElroy-R2 system 40 35 576 121 0.384 0.637 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 65.4 3.85 1.96 0.756 0.727 supply 20 16 510.8 31.92 5.65 0.235 0.091 The covariance matrix of the residuals used for estimation demand supply demand 3.85 1.34 supply 1.34 31.92 The covariance matrix of the residuals demand supply demand 3.85 1.34 supply 1.34 31.92 The correlations of the residuals demand supply demand 1.000 0.117 supply 0.117 1.000 SUR estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Estimate Std. Error t value Pr(>|t|) (Intercept) 98.2200 6.7593 14.53 2.2e-16 *** price -0.2669 0.0778 -3.43 0.0016 ** income 0.3011 0.0435 6.92 4.9e-08 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.962 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 65.447 MSE: 3.85 Root MSE: 1.962 Multiple R-Squared: 0.756 Adjusted R-Squared: 0.727 SUR estimates for 'supply' (equation 2) Model Formula: price ~ income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 90.2168 10.4342 8.65 3.3e-10 *** income 0.2331 0.0778 3.00 0.005 ** farmPrice -0.1666 0.1111 -1.50 0.143 trend 0.3011 0.0435 6.92 4.9e-08 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 5.65 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 510.75 MSE: 31.922 Root MSE: 5.65 Multiple R-Squared: 0.235 Adjusted R-Squared: 0.091 > > > ## *********** estimations with a single regressor ************ > fitsurS1 <- systemfit( + list( price ~ consump - 1, farmPrice ~ consump + trend ), "SUR", + data = Kmenta, useMatrix = useMatrix ) > print( summary( fitsurS1 ) ) systemfit results method: SUR N DF SSR detRCov OLS-R2 McElroy-R2 system 40 36 2060 2543 0.449 0.465 N DF SSR MSE RMSE R2 Adj R2 eq1 20 19 848 44.6 6.68 -0.271 -0.271 eq2 20 17 1211 71.3 8.44 0.605 0.559 The covariance matrix of the residuals used for estimation eq1 eq2 eq1 44.6 -20.5 eq2 -20.5 68.9 The covariance matrix of the residuals eq1 eq2 eq1 44.6 -25.3 eq2 -25.3 71.3 The correlations of the residuals eq1 eq2 eq1 1.000 -0.448 eq2 -0.448 1.000 SUR estimates for 'eq1' (equation 1) Model Formula: price ~ consump - 1 Estimate Std. Error t value Pr(>|t|) consump 0.9902 0.0148 66.9 <2e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 6.682 on 19 degrees of freedom Number of observations: 20 Degrees of Freedom: 19 SSR: 848.208 MSE: 44.643 Root MSE: 6.682 Multiple R-Squared: -0.271 Adjusted R-Squared: -0.271 SUR estimates for 'eq2' (equation 2) Model Formula: farmPrice ~ consump + trend Estimate Std. Error t value Pr(>|t|) (Intercept) -108.487 47.754 -2.27 0.03638 * consump 2.123 0.477 4.45 0.00035 *** trend -0.862 0.303 -2.85 0.01111 * --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 8.441 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 1211.393 MSE: 71.258 Root MSE: 8.441 Multiple R-Squared: 0.605 Adjusted R-Squared: 0.559 > nobs( fitsurS1 ) [1] 40 > fitsurS2 <- systemfit( + list( consump ~ price - 1, consump ~ trend - 1 ), "SUR", + data = Kmenta, useMatrix = useMatrix ) > print( summary( fitsurS2 ) ) systemfit results method: SUR N DF SSR detRCov OLS-R2 McElroy-R2 system 40 38 47370 110949 -87.3 -5.28 N DF SSR MSE RMSE R2 Adj R2 eq1 20 19 861 45.3 6.73 -2.21 -2.21 eq2 20 19 46509 2447.8 49.48 -172.47 -172.47 The covariance matrix of the residuals used for estimation eq1 eq2 eq1 45.34 -5.15 eq2 -5.15 2447.84 The covariance matrix of the residuals eq1 eq2 eq1 45.34 -6.37 eq2 -6.37 2447.84 The correlations of the residuals eq1 eq2 eq1 1.0000 -0.0439 eq2 -0.0439 1.0000 SUR estimates for 'eq1' (equation 1) Model Formula: consump ~ price - 1 Estimate Std. Error t value Pr(>|t|) price 1.006 0.015 67 <2e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 6.734 on 19 degrees of freedom Number of observations: 20 Degrees of Freedom: 19 SSR: 861.496 MSE: 45.342 Root MSE: 6.734 Multiple R-Squared: -2.213 Adjusted R-Squared: -2.213 SUR estimates for 'eq2' (equation 2) Model Formula: consump ~ trend - 1 Estimate Std. Error t value Pr(>|t|) trend 7.410 0.924 8.02 1.6e-07 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 49.476 on 19 degrees of freedom Number of observations: 20 Degrees of Freedom: 19 SSR: 46508.986 MSE: 2447.841 Root MSE: 49.476 Multiple R-Squared: -172.467 Adjusted R-Squared: -172.467 > nobs( fitsurS2 ) [1] 40 > fitsurS3 <- systemfit( + list( consump ~ trend - 1, price ~ trend - 1 ), "SUR", + data = Kmenta, useMatrix = useMatrix ) > nobs( fitsurS3 ) [1] 40 > print( summary( fitsurS3 ) ) systemfit results method: SUR N DF SSR detRCov OLS-R2 McElroy-R2 system 40 38 93537 108970 -99 -0.977 N DF SSR MSE RMSE R2 Adj R2 eq1 20 19 46509 2448 49.5 -172.5 -172.5 eq2 20 19 47028 2475 49.8 -69.5 -69.5 The covariance matrix of the residuals used for estimation eq1 eq2 eq1 2448 2439 eq2 2439 2475 The covariance matrix of the residuals eq1 eq2 eq1 2448 2439 eq2 2439 2475 The correlations of the residuals eq1 eq2 eq1 1.000 0.988 eq2 0.988 1.000 SUR estimates for 'eq1' (equation 1) Model Formula: consump ~ trend - 1 Estimate Std. Error t value Pr(>|t|) trend 7.405 0.924 8.02 1.6e-07 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 49.476 on 19 degrees of freedom Number of observations: 20 Degrees of Freedom: 19 SSR: 46508.922 MSE: 2447.838 Root MSE: 49.476 Multiple R-Squared: -172.467 Adjusted R-Squared: -172.467 SUR estimates for 'eq2' (equation 2) Model Formula: price ~ trend - 1 Estimate Std. Error t value Pr(>|t|) trend 7.318 0.929 7.88 2.1e-07 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 49.751 on 19 degrees of freedom Number of observations: 20 Degrees of Freedom: 19 SSR: 47028.107 MSE: 2475.164 Root MSE: 49.751 Multiple R-Squared: -69.48 Adjusted R-Squared: -69.48 > fitsurS4 <- systemfit( + list( consump ~ trend - 1, price ~ trend - 1 ), "SUR", + data = Kmenta, restrict.matrix = matrix( c( 1, -1 ), nrow = 1 ), + useMatrix = useMatrix ) > print( summary( fitsurS4 ) ) systemfit results method: SUR N DF SSR detRCov OLS-R2 McElroy-R2 system 40 39 93552 111731 -99 -1.03 N DF SSR MSE RMSE R2 Adj R2 eq1 20 19 46510 2448 49.5 -172.5 -172.5 eq2 20 19 47042 2476 49.8 -69.5 -69.5 The covariance matrix of the residuals used for estimation eq1 eq2 eq1 2448 2439 eq2 2439 2475 The covariance matrix of the residuals eq1 eq2 eq1 2448 2439 eq2 2439 2476 The correlations of the residuals eq1 eq2 eq1 1.000 0.988 eq2 0.988 1.000 SUR estimates for 'eq1' (equation 1) Model Formula: consump ~ trend - 1 Estimate Std. Error t value Pr(>|t|) trend 7.388 0.923 8 9.4e-10 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 49.476 on 19 degrees of freedom Number of observations: 20 Degrees of Freedom: 19 SSR: 46509.787 MSE: 2447.884 Root MSE: 49.476 Multiple R-Squared: -172.47 Adjusted R-Squared: -172.47 SUR estimates for 'eq2' (equation 2) Model Formula: price ~ trend - 1 Estimate Std. Error t value Pr(>|t|) trend 7.388 0.923 8 9.4e-10 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 49.758 on 19 degrees of freedom Number of observations: 20 Degrees of Freedom: 19 SSR: 47041.803 MSE: 2475.884 Root MSE: 49.758 Multiple R-Squared: -69.501 Adjusted R-Squared: -69.501 > nobs( fitsurS4 ) [1] 40 > fitsurS5 <- systemfit( + list( consump ~ 1, price ~ 1 ), "SUR", + data = Kmenta, useMatrix = useMatrix ) > print( summary( fitsurS5 ) ) systemfit results method: SUR N DF SSR detRCov OLS-R2 McElroy-R2 system 40 38 935 491 0 0 N DF SSR MSE RMSE R2 Adj R2 eq1 20 19 268 14.1 3.76 0 0 eq2 20 19 667 35.1 5.93 0 0 The covariance matrix of the residuals used for estimation eq1 eq2 eq1 14.11 2.18 eq2 2.18 35.12 The covariance matrix of the residuals eq1 eq2 eq1 14.11 2.18 eq2 2.18 35.12 The correlations of the residuals eq1 eq2 eq1 1.0000 0.0981 eq2 0.0981 1.0000 SUR estimates for 'eq1' (equation 1) Model Formula: consump ~ 1 Estimate Std. Error t value Pr(>|t|) (Intercept) 100.90 0.84 120 <2e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 3.756 on 19 degrees of freedom Number of observations: 20 Degrees of Freedom: 19 SSR: 268.114 MSE: 14.111 Root MSE: 3.756 Multiple R-Squared: 0 Adjusted R-Squared: 0 SUR estimates for 'eq2' (equation 2) Model Formula: price ~ 1 Estimate Std. Error t value Pr(>|t|) (Intercept) 100.02 1.33 75.5 <2e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 5.926 on 19 degrees of freedom Number of observations: 20 Degrees of Freedom: 19 SSR: 667.251 MSE: 35.118 Root MSE: 5.926 Multiple R-Squared: 0 Adjusted R-Squared: 0 > nobs( fitsurS5 ) [1] 40 > > > ## **************** shorter summaries ********************** > print( summary( fitsur1e2, useDfSys = TRUE, equations = FALSE ) ) systemfit results method: SUR N DF SSR detRCov OLS-R2 McElroy-R2 system 40 33 172 -0.896 0.679 1.01 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 66.8 3.93 1.98 0.751 0.722 supply 20 16 105.3 6.58 2.57 0.607 0.534 The covariance matrix of the residuals used for estimation demand supply demand 3.73 4.28 supply 4.28 5.78 warning: this covariance matrix is NOT positive semidefinit! The covariance matrix of the residuals demand supply demand 3.93 5.17 supply 5.17 6.58 The correlations of the residuals demand supply demand 1.000 0.984 supply 0.984 1.000 Coefficients: Estimate Std. Error t value Pr(>|t|) demand_(Intercept) 99.2120 7.5127 13.21 1.0e-14 *** demand_price -0.2667 0.0877 -3.04 0.0046 ** demand_income 0.2908 0.0406 7.16 3.3e-08 *** supply_(Intercept) 63.0768 10.9735 5.75 2.0e-06 *** supply_price 0.1439 0.0943 1.52 0.1368 supply_farmPrice 0.2064 0.0384 5.37 6.1e-06 *** supply_trend 0.3325 0.0640 5.19 1.0e-05 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 > > print( summary( fitsur2e, useDfSys = FALSE, residCov = FALSE ) ) systemfit results method: SUR N DF SSR detRCov OLS-R2 McElroy-R2 system 40 34 180 0.62 0.663 0.707 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 72.6 4.27 2.07 0.729 0.697 supply 20 16 107.9 6.75 2.60 0.597 0.522 SUR estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Estimate Std. Error t value Pr(>|t|) (Intercept) 98.7799 6.9687 14.17 7.6e-11 *** price -0.2354 0.0795 -2.96 0.0088 ** income 0.2631 0.0344 7.66 6.6e-07 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.066 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 72.577 MSE: 4.269 Root MSE: 2.066 Multiple R-Squared: 0.729 Adjusted R-Squared: 0.697 SUR estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 67.6039 9.5712 7.06 2.7e-06 *** price 0.1328 0.0853 1.56 0.14 farmPrice 0.1785 0.0305 5.85 2.5e-05 *** trend 0.2631 0.0344 7.66 9.7e-07 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.597 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 107.917 MSE: 6.745 Root MSE: 2.597 Multiple R-Squared: 0.597 Adjusted R-Squared: 0.522 > > print( summary( fitsur3 ), equations = FALSE ) systemfit results method: SUR N DF SSR detRCov OLS-R2 McElroy-R2 system 40 34 179 0.933 0.665 0.753 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 71.6 4.21 2.05 0.733 0.702 supply 20 16 107.8 6.74 2.60 0.598 0.523 The covariance matrix of the residuals used for estimation demand supply demand 3.78 4.47 supply 4.47 5.94 The covariance matrix of the residuals demand supply demand 4.21 5.24 supply 5.24 6.74 The correlations of the residuals demand supply demand 1.000 0.983 supply 0.983 1.000 Coefficients: Estimate Std. Error t value Pr(>|t|) demand_(Intercept) 98.8408 7.5581 13.08 8.0e-15 *** demand_price -0.2398 0.0860 -2.79 0.0086 ** demand_income 0.2670 0.0368 7.25 2.2e-08 *** supply_(Intercept) 67.4283 10.6647 6.32 3.3e-07 *** supply_price 0.1332 0.0953 1.40 0.1713 supply_farmPrice 0.1795 0.0337 5.33 6.3e-06 *** supply_trend 0.2670 0.0368 7.25 2.2e-08 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 > > print( summary( fitsur4r3 ), residCov = FALSE, equations = FALSE ) systemfit results method: SUR N DF SSR detRCov OLS-R2 McElroy-R2 system 40 35 173 0.217 0.677 0.702 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 66.4 3.91 1.98 0.752 0.723 supply 20 16 106.9 6.68 2.58 0.601 0.526 Coefficients: Estimate Std. Error t value Pr(>|t|) demand_(Intercept) 93.1978 7.3168 12.74 1.1e-14 *** demand_price -0.2381 0.0829 -2.87 0.0069 ** demand_income 0.3231 0.0170 18.96 < 2e-16 *** supply_(Intercept) 49.3676 7.4381 6.64 1.1e-07 *** supply_price 0.2619 0.0829 3.16 0.0033 ** supply_farmPrice 0.2271 0.0171 13.29 3.1e-15 *** supply_trend 0.3231 0.0170 18.96 < 2e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 > > print( summary( fitsur5, residCov = FALSE ), equations = FALSE ) systemfit results method: SUR N DF SSR detRCov OLS-R2 McElroy-R2 system 40 35 165 1.76 0.691 0.69 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 64 3.76 1.94 0.761 0.733 supply 20 16 101 6.34 2.52 0.622 0.551 Coefficients: Estimate Std. Error t value Pr(>|t|) demand_(Intercept) 96.8275 7.4665 12.97 6.2e-15 *** demand_price -0.2798 0.0840 -3.33 0.002 ** demand_income 0.3286 0.0206 15.93 < 2e-16 *** supply_(Intercept) 52.9386 7.6655 6.91 5.1e-08 *** supply_price 0.2202 0.0840 2.62 0.013 * supply_farmPrice 0.2327 0.0212 10.97 7.2e-13 *** supply_trend 0.3286 0.0206 15.93 < 2e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 > > print( summary( fitsur5w, equations = FALSE, residCov = FALSE ), + equations = TRUE ) systemfit results method: SUR N DF SSR detRCov OLS-R2 McElroy-R2 system 40 35 166 1.75 0.69 0.691 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 64.2 3.77 1.94 0.761 0.733 supply 20 16 102.0 6.37 2.52 0.620 0.548 SUR estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Estimate Std. Error t value Pr(>|t|) (Intercept) 96.4421 7.4234 12.99 6e-15 *** price -0.2753 0.0838 -3.29 0.0023 ** income 0.3280 0.0202 16.21 <2e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.943 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 64.16 MSE: 3.774 Root MSE: 1.943 Multiple R-Squared: 0.761 Adjusted R-Squared: 0.733 SUR estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 52.5761 7.6099 6.91 5.0e-08 *** price 0.2247 0.0838 2.68 0.011 * farmPrice 0.2318 0.0208 11.14 4.7e-13 *** trend 0.3280 0.0202 16.21 < 2e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.524 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 101.967 MSE: 6.373 Root MSE: 2.524 Multiple R-Squared: 0.62 Adjusted R-Squared: 0.548 > > print( summary( fitsuri1r3, useDfSys = FALSE ), residCov = FALSE ) systemfit results method: iterated SUR convergence achieved after 7 iterations N DF SSR detRCov OLS-R2 McElroy-R2 system 40 33 109 4.06 0.884 0.96 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 66.8 3.93 1.98 0.751 0.721 supply 20 16 41.7 2.61 1.61 0.937 0.926 SUR estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Estimate Std. Error t value Pr(>|t|) (Intercept) 93.5427 7.3858 12.67 4.4e-10 *** price -0.2285 0.0877 -2.60 0.019 * income 0.3097 0.0458 6.76 3.3e-06 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.983 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 66.826 MSE: 3.931 Root MSE: 1.983 Multiple R-Squared: 0.751 Adjusted R-Squared: 0.721 SUR estimates for 'supply' (equation 2) Model Formula: price ~ income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 89.1830 3.3861 26.3 1.3e-14 *** income 0.6639 0.0423 15.7 3.8e-11 *** farmPrice -0.4715 0.0370 -12.8 8.5e-10 *** trend -0.7955 0.0645 -12.3 1.4e-09 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.615 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 41.708 MSE: 2.607 Root MSE: 1.615 Multiple R-Squared: 0.937 Adjusted R-Squared: 0.926 > > print( summary( fitsuri2 ), residCov = FALSE ) systemfit results method: iterated SUR convergence achieved after 21 iterations N DF SSR detRCov OLS-R2 McElroy-R2 system 40 34 587 110 0.372 0.669 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 67 3.94 1.99 0.75 0.721 supply 20 16 520 32.52 5.70 0.22 0.074 SUR estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Estimate Std. Error t value Pr(>|t|) (Intercept) 107.3678 7.4986 14.32 4.4e-16 *** price -0.3945 0.0912 -4.33 0.00013 *** income 0.3382 0.0466 7.25 2.1e-08 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.986 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 67.024 MSE: 3.943 Root MSE: 1.986 Multiple R-Squared: 0.75 Adjusted R-Squared: 0.721 SUR estimates for 'supply' (equation 2) Model Formula: price ~ income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 85.0448 12.1069 7.02 4.2e-08 *** income 0.3125 0.1233 2.53 0.016 * farmPrice -0.1972 0.1157 -1.70 0.097 . trend 0.3382 0.0466 7.25 2.1e-08 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 5.703 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 520.329 MSE: 32.521 Root MSE: 5.703 Multiple R-Squared: 0.22 Adjusted R-Squared: 0.074 > > print( summary( fitsuri3e, residCov = FALSE, equations = FALSE ) ) systemfit results method: iterated SUR convergence achieved after 22 iterations N DF SSR detRCov OLS-R2 McElroy-R2 system 40 34 588 74.9 0.372 0.664 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 67.5 3.97 1.99 0.748 0.719 supply 20 16 520.2 32.51 5.70 0.220 0.074 Coefficients: Estimate Std. Error t value Pr(>|t|) demand_(Intercept) 107.8051 6.9270 15.56 < 2e-16 *** demand_price -0.3986 0.0843 -4.73 3.8e-05 *** demand_income 0.3379 0.0431 7.84 4.0e-09 *** supply_(Intercept) 85.1071 10.8287 7.86 3.8e-09 *** supply_income 0.3106 0.1101 2.82 0.0079 ** supply_farmPrice -0.1960 0.1034 -1.89 0.0667 . supply_trend 0.3379 0.0431 7.84 4.0e-09 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 > > print( summary( fitsurio4, residCov = FALSE ), equations = FALSE ) systemfit results method: iterated SUR convergence achieved after 10 iterations N DF SSR detRCov OLS-R2 McElroy-R2 system 40 35 176 1.74 0.671 0.705 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 67.2 3.95 1.99 0.749 0.720 supply 20 16 109.2 6.83 2.61 0.593 0.516 Coefficients: Estimate Std. Error t value Pr(>|t|) demand_(Intercept) 92.4262 7.3543 12.57 1.6e-14 *** demand_price -0.2276 0.0850 -2.68 0.0112 * demand_income 0.3203 0.0185 17.32 < 2e-16 *** supply_(Intercept) 48.7295 7.4587 6.53 1.5e-07 *** supply_price 0.2724 0.0850 3.20 0.0029 ** supply_farmPrice 0.2232 0.0190 11.76 1.0e-13 *** supply_trend 0.3203 0.0185 17.32 < 2e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 > print( summary( fitsuri4, equations = FALSE ), residCov = FALSE ) systemfit results method: iterated SUR convergence achieved after 19 iterations N DF SSR detRCov OLS-R2 McElroy-R2 system 40 35 575 121 0.385 0.637 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 65.5 3.85 1.96 0.756 0.727 supply 20 16 509.3 31.83 5.64 0.237 0.094 Coefficients: Estimate Std. Error t value Pr(>|t|) demand_(Intercept) 98.0356 6.7437 14.54 2.2e-16 *** demand_price -0.2646 0.0777 -3.40 0.0017 ** demand_income 0.3007 0.0436 6.89 5.3e-08 *** supply_(Intercept) 90.0046 10.4367 8.62 3.5e-10 *** supply_income 0.2354 0.0777 3.03 0.0046 ** supply_farmPrice -0.1667 0.1108 -1.50 0.1416 supply_trend 0.3007 0.0436 6.89 5.3e-08 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 > > print( summary( fitsuri4w, useDfSys = FALSE, equations = FALSE ) ) systemfit results method: iterated SUR convergence achieved after 18 iterations N DF SSR detRCov OLS-R2 McElroy-R2 system 40 35 575 121 0.385 0.637 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 65.5 3.85 1.96 0.756 0.727 supply 20 16 509.3 31.83 5.64 0.237 0.094 The covariance matrix of the residuals used for estimation demand supply demand 3.85 1.23 supply 1.23 31.83 The covariance matrix of the residuals demand supply demand 3.85 1.23 supply 1.23 31.83 The correlations of the residuals demand supply demand 1.000 0.111 supply 0.111 1.000 Coefficients: Estimate Std. Error t value Pr(>|t|) demand_(Intercept) 98.0361 6.7437 14.54 5.1e-11 *** demand_price -0.2646 0.0777 -3.40 0.0034 ** demand_income 0.3007 0.0436 6.89 2.6e-06 *** supply_(Intercept) 90.0052 10.4368 8.62 2.1e-07 *** supply_income 0.2354 0.0777 3.03 0.0080 ** supply_farmPrice -0.1667 0.1108 -1.50 0.1521 supply_trend 0.3007 0.0436 6.89 3.6e-06 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 > > print( summary( fitsurio5r2, equations = FALSE ) ) systemfit results method: iterated SUR warning: convergence not achieved after 100 iterations N DF SSR detRCov OLS-R2 McElroy-R2 system 40 35 253 -1.67 0.527 0.927 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 95.8 5.63 2.37 0.643 0.601 supply 20 16 157.7 9.86 3.14 0.412 0.301 The covariance matrix of the residuals used for estimation demand supply demand 4.26 5.29 supply 5.29 6.69 warning: this covariance matrix is NOT positive semidefinit! The covariance matrix of the residuals demand supply demand 5.63 7.56 supply 7.56 9.86 The correlations of the residuals demand supply demand 1.000 0.982 supply 0.982 1.000 Coefficients: Estimate Std. Error t value Pr(>|t|) demand_(Intercept) 78.0342 7.1638 10.89 8.6e-13 *** demand_price -0.0647 0.0815 -0.79 0.43 demand_income 0.3007 0.0131 23.01 < 2e-16 *** supply_(Intercept) 34.1958 7.2257 4.73 3.6e-05 *** supply_price 0.4353 0.0815 5.34 5.7e-06 *** supply_farmPrice 0.2070 0.0124 16.68 < 2e-16 *** supply_trend 0.3007 0.0131 23.01 < 2e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 > print( summary( fitsuri5r2 ), residCov = FALSE ) systemfit results method: iterated SUR convergence achieved after 21 iterations N DF SSR detRCov OLS-R2 McElroy-R2 system 40 35 576 121 0.384 0.637 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 65.4 3.85 1.96 0.756 0.727 supply 20 16 510.8 31.92 5.65 0.235 0.091 SUR estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Estimate Std. Error t value Pr(>|t|) (Intercept) 98.2200 6.7593 14.53 2.2e-16 *** price -0.2669 0.0778 -3.43 0.0016 ** income 0.3011 0.0435 6.92 4.9e-08 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.962 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 65.447 MSE: 3.85 Root MSE: 1.962 Multiple R-Squared: 0.756 Adjusted R-Squared: 0.727 SUR estimates for 'supply' (equation 2) Model Formula: price ~ income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 90.2167 10.4342 8.65 3.3e-10 *** income 0.2331 0.0778 3.00 0.005 ** farmPrice -0.1666 0.1111 -1.50 0.143 trend 0.3011 0.0435 6.92 4.9e-08 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 5.65 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 510.75 MSE: 31.922 Root MSE: 5.65 Multiple R-Squared: 0.235 Adjusted R-Squared: 0.091 > > > ## ****************** residuals ************************** > print( residuals( fitsur1e2 ) ) demand supply 1 0.615 0.41825 2 -0.598 -0.00625 3 2.419 2.75649 4 1.609 1.81727 5 2.145 2.53566 6 1.332 1.53338 7 1.727 2.25581 8 -2.718 -3.56834 9 -1.229 -2.02733 10 2.088 2.53245 11 -0.789 -1.40733 12 -2.799 -3.01416 13 -1.831 -2.30119 14 -0.461 0.01871 15 1.974 2.93624 16 -3.291 -4.00484 17 -0.652 -0.45580 18 -1.899 -3.18683 19 2.030 2.18284 20 0.329 0.98497 > print( residuals( fitsur1e2$eq[[ 2 ]] ) ) 1 2 3 4 5 6 7 8 0.41825 -0.00625 2.75649 1.81727 2.53566 1.53338 2.25581 -3.56834 9 10 11 12 13 14 15 16 -2.02733 2.53245 -1.40733 -3.01416 -2.30119 0.01871 2.93624 -4.00484 17 18 19 20 -0.45580 -3.18683 2.18284 0.98497 > > print( residuals( fitsur1w ) ) demand supply 1 0.696 0.4713 2 -0.561 0.0197 3 2.455 2.7782 4 1.643 1.8366 5 2.110 2.4709 6 1.304 1.4773 7 1.692 2.2079 8 -2.756 -3.6663 9 -1.253 -2.0985 10 2.078 2.5321 11 -0.675 -1.2705 12 -2.649 -2.8068 13 -1.706 -2.1305 14 -0.419 0.1150 15 1.887 2.8772 16 -3.364 -4.1013 17 -0.762 -0.5650 18 -1.918 -3.2183 19 1.978 2.1637 20 0.218 0.9075 > print( residuals( fitsur1w$eq[[ 2 ]] ) ) 1 2 3 4 5 6 7 8 9 10 0.4713 0.0197 2.7782 1.8366 2.4709 1.4773 2.2079 -3.6663 -2.0985 2.5321 11 12 13 14 15 16 17 18 19 20 -1.2705 -2.8068 -2.1305 0.1150 2.8772 -4.1013 -0.5650 -3.2183 2.1637 0.9075 > > print( residuals( fitsur2e ) ) demand supply 1 0.325 -0.200 2 -0.729 -0.481 3 2.288 2.342 4 1.487 1.457 5 2.271 2.527 6 1.432 1.537 7 1.851 2.275 8 -2.582 -3.322 9 -1.143 -1.834 10 2.124 2.512 11 -1.193 -1.885 12 -3.332 -3.705 13 -2.280 -2.813 14 -0.614 -0.177 15 2.281 3.353 16 -3.032 -3.407 17 -0.260 0.233 18 -1.834 -2.737 19 2.215 2.632 20 0.726 1.692 > print( residuals( fitsur2e$eq[[ 1 ]] ) ) 1 2 3 4 5 6 7 8 9 10 11 0.325 -0.729 2.288 1.487 2.271 1.432 1.851 -2.582 -1.143 2.124 -1.193 12 13 14 15 16 17 18 19 20 -3.332 -2.280 -0.614 2.281 -3.032 -0.260 -1.834 2.215 0.726 > > print( residuals( fitsur3 ) ) demand supply 1 0.366 -0.164 2 -0.711 -0.452 3 2.307 2.368 4 1.504 1.479 5 2.253 2.535 6 1.418 1.544 7 1.833 2.279 8 -2.601 -3.327 9 -1.155 -1.839 10 2.119 2.513 11 -1.136 -1.869 12 -3.257 -3.682 13 -2.217 -2.798 14 -0.593 -0.175 15 2.238 3.332 16 -3.069 -3.436 17 -0.315 0.199 18 -1.844 -2.764 19 2.189 2.604 20 0.671 1.654 > print( residuals( fitsur3$eq[[ 2 ]] ) ) 1 2 3 4 5 6 7 8 9 10 11 -0.164 -0.452 2.368 1.479 2.535 1.544 2.279 -3.327 -1.839 2.513 -1.869 12 13 14 15 16 17 18 19 20 -3.682 -2.798 -0.175 3.332 -3.436 0.199 -2.764 2.604 1.654 > > print( residuals( fitsur4r3 ) ) demand supply 1 0.934 0.265 2 -0.721 -0.638 3 2.348 2.232 4 1.459 1.196 5 2.129 2.428 6 1.253 1.318 7 1.514 1.913 8 -3.185 -4.425 9 -1.097 -1.870 10 2.619 3.483 11 0.135 -0.260 12 -2.097 -2.275 13 -1.496 -2.085 14 -0.201 0.516 15 1.934 3.439 16 -3.491 -3.942 17 -0.229 0.913 18 -2.236 -3.503 19 1.440 1.736 20 -1.012 -0.441 > print( residuals( fitsur4r3$eq[[ 1 ]] ) ) 1 2 3 4 5 6 7 8 9 10 11 0.934 -0.721 2.348 1.459 2.129 1.253 1.514 -3.185 -1.097 2.619 0.135 12 13 14 15 16 17 18 19 20 -2.097 -1.496 -0.201 1.934 -3.491 -0.229 -2.236 1.440 -1.012 > > print( residuals( fitsur5 ) ) demand supply 1 1.0025 0.3219 2 -0.5449 -0.4286 3 2.4949 2.4014 4 1.6426 1.4106 5 2.0329 2.2956 6 1.2129 1.2545 7 1.5260 1.9262 8 -3.0444 -4.2868 9 -1.2406 -2.0779 10 2.3001 3.0973 11 -0.0303 -0.4650 12 -2.0337 -2.1783 13 -1.3041 -1.8356 14 -0.2155 0.5292 15 1.6991 3.1787 16 -3.5980 -4.0840 17 -0.7860 0.2371 18 -2.1070 -3.3544 19 1.6070 1.9694 20 -0.6134 0.0885 > print( residuals( fitsur5$eq[[ 2 ]] ) ) 1 2 3 4 5 6 7 8 9 10 0.3219 -0.4286 2.4014 1.4106 2.2956 1.2545 1.9262 -4.2868 -2.0779 3.0973 11 12 13 14 15 16 17 18 19 20 -0.4650 -2.1783 -1.8356 0.5292 3.1787 -4.0840 0.2371 -3.3544 1.9694 0.0885 > > print( residuals( fitsuri1r3 ) ) demand supply 1 0.7952 0.123 2 -0.7614 -1.393 3 2.3039 -0.829 4 1.4250 -0.430 5 2.1792 -1.213 6 1.2979 -0.653 7 1.5795 -1.266 8 -3.0935 2.153 9 -1.0750 1.548 10 2.5876 -1.582 11 -0.0991 0.990 12 -2.3616 0.460 13 -1.6970 1.335 14 -0.2819 -1.054 15 2.0557 -2.339 16 -3.3745 1.734 17 -0.1140 -1.054 18 -2.1822 3.461 19 1.5612 0.318 20 -0.7450 -0.308 > print( residuals( fitsuri1r3$eq[[ 1 ]] ) ) 1 2 3 4 5 6 7 8 9 10 0.7952 -0.7614 2.3039 1.4250 2.1792 1.2979 1.5795 -3.0935 -1.0750 2.5876 11 12 13 14 15 16 17 18 19 20 -0.0991 -2.3616 -1.6970 -0.2819 2.0557 -3.3745 -0.1140 -2.1822 1.5612 -0.7450 > > print( residuals( fitsuri2 ) ) demand supply 1 1.1341 6.955 2 -0.0587 7.587 3 2.8946 6.701 4 2.1508 6.768 5 1.7798 1.930 6 1.1200 2.315 7 1.5920 2.230 8 -2.5983 4.980 9 -1.6414 -0.392 10 1.3742 -5.140 11 -0.6115 -3.174 12 -1.9764 -0.804 13 -0.8493 1.012 14 -0.2942 -3.282 15 1.0840 -7.042 16 -3.8500 -4.140 17 -2.3259 -12.628 18 -1.7141 -1.498 19 2.1409 -2.683 20 0.6494 0.305 > print( residuals( fitsuri2$eq[[ 2 ]] ) ) 1 2 3 4 5 6 7 8 9 10 6.955 7.587 6.701 6.768 1.930 2.315 2.230 4.980 -0.392 -5.140 11 12 13 14 15 16 17 18 19 20 -3.174 -0.804 1.012 -3.282 -7.042 -4.140 -12.628 -1.498 -2.683 0.305 > > print( residuals( fitsuri3e ) ) demand supply 1 1.1327 6.932 2 -0.0412 7.582 3 2.9085 6.695 4 2.1695 6.766 5 1.7721 1.915 6 1.1185 2.305 7 1.5978 2.229 8 -2.5761 4.982 9 -1.6564 -0.410 10 1.3358 -5.161 11 -0.6458 -3.196 12 -1.9868 -0.807 13 -0.8408 1.021 14 -0.3012 -3.275 15 1.0652 -7.037 16 -3.8545 -4.135 17 -2.3819 -12.646 18 -1.6959 -1.478 19 2.1679 -2.647 20 0.7125 0.366 > print( residuals( fitsuri3e$eq[[ 1 ]] ) ) 1 2 3 4 5 6 7 8 9 10 1.1327 -0.0412 2.9085 2.1695 1.7721 1.1185 1.5978 -2.5761 -1.6564 1.3358 11 12 13 14 15 16 17 18 19 20 -0.6458 -1.9868 -0.8408 -0.3012 1.0652 -3.8545 -2.3819 -1.6959 2.1679 0.7125 > > print( residuals( fitsurio4 ) ) demand supply 1 0.9019 0.240 2 -0.7658 -0.697 3 2.3097 2.184 4 1.4141 1.136 5 2.1571 2.490 6 1.2670 1.356 7 1.5188 1.928 8 -3.2060 -4.430 9 -1.0620 -1.789 10 2.6864 3.589 11 0.1438 -0.248 12 -2.1427 -2.369 13 -1.5629 -2.210 14 -0.2076 0.479 15 2.0012 3.526 16 -3.4530 -3.876 17 -0.0902 1.129 18 -2.2581 -3.539 19 1.4172 1.671 20 -1.0688 -0.569 > print( residuals( fitsurio4$eq[[ 2 ]] ) ) 1 2 3 4 5 6 7 8 9 10 11 0.240 -0.697 2.184 1.136 2.490 1.356 1.928 -4.430 -1.789 3.589 -0.248 12 13 14 15 16 17 18 19 20 -2.369 -2.210 0.479 3.526 -3.876 1.129 -3.539 1.671 -0.569 > print( residuals( fitsuri4 ) ) demand supply 1 0.7146 5.775 2 -0.6076 7.198 3 2.4197 6.280 4 1.5931 6.531 5 2.1268 1.465 6 1.3043 2.021 7 1.6685 2.261 8 -2.8295 5.275 9 -1.2125 -0.890 10 2.1921 -5.945 11 -0.5521 -4.407 12 -2.5920 -1.482 13 -1.7095 0.895 14 -0.3902 -3.220 15 1.9290 -6.617 16 -3.3627 -3.607 17 -0.6125 -12.896 18 -1.9758 -0.562 19 1.8877 -1.126 20 0.0085 3.051 > print( residuals( fitsuri4$eq[[ 2 ]] ) ) 1 2 3 4 5 6 7 8 9 10 5.775 7.198 6.280 6.531 1.465 2.021 2.261 5.275 -0.890 -5.945 11 12 13 14 15 16 17 18 19 20 -4.407 -1.482 0.895 -3.220 -6.617 -3.607 -12.896 -0.562 -1.126 3.051 > > print( residuals( fitsuri4w ) ) demand supply 1 0.71463 5.775 2 -0.60754 7.198 3 2.41972 6.280 4 1.59308 6.531 5 2.12679 1.465 6 1.30430 2.021 7 1.66846 2.262 8 -2.82945 5.275 9 -1.21248 -0.890 10 2.19209 -5.946 11 -0.55215 -4.407 12 -2.59194 -1.482 13 -1.70948 0.895 14 -0.39018 -3.220 15 1.92897 -6.617 16 -3.36276 -3.607 17 -0.61256 -12.896 18 -1.97579 -0.562 19 1.88776 -1.126 20 0.00854 3.051 > print( residuals( fitsuri4w$eq[[ 2 ]] ) ) 1 2 3 4 5 6 7 8 9 10 5.775 7.198 6.280 6.531 1.465 2.021 2.262 5.275 -0.890 -5.946 11 12 13 14 15 16 17 18 19 20 -4.407 -1.482 0.895 -3.220 -6.617 -3.607 -12.896 -0.562 -1.126 3.051 > > print( residuals( fitsurio5r2 ) ) demand supply 1 0.655 0.0269 2 -1.456 -1.5152 3 1.737 1.5210 4 0.696 0.3020 5 2.530 2.9397 6 1.417 1.5469 7 1.459 1.8336 8 -3.779 -5.0391 9 -0.498 -1.0416 10 3.950 5.0761 11 0.836 0.6398 12 -2.347 -2.5930 13 -2.286 -3.0468 14 -0.137 0.5081 15 2.908 4.5036 16 -3.050 -3.3786 17 2.091 3.6824 18 -2.775 -4.1107 19 0.737 0.7819 20 -2.686 -2.6370 > print( residuals( fitsurio5r2$eq[[ 1 ]] ) ) 1 2 3 4 5 6 7 8 9 10 11 0.655 -1.456 1.737 0.696 2.530 1.417 1.459 -3.779 -0.498 3.950 0.836 12 13 14 15 16 17 18 19 20 -2.347 -2.286 -0.137 2.908 -3.050 2.091 -2.775 0.737 -2.686 > print( residuals( fitsuri5r2 ) ) demand supply 1 0.7199 5.756 2 -0.5979 7.202 3 2.4279 6.281 4 1.6030 6.535 5 2.1212 1.472 6 1.3017 2.029 7 1.6683 2.275 8 -2.8233 5.299 9 -1.2202 -0.892 10 2.1760 -5.965 11 -0.5578 -4.458 12 -2.5854 -1.528 13 -1.6970 0.866 14 -0.3899 -3.237 15 1.9153 -6.607 16 -3.3698 -3.593 17 -0.6429 -12.902 18 -1.9698 -0.549 19 1.8949 -1.099 20 0.0259 3.114 > print( residuals( fitsuri5r2$eq[[ 1 ]] ) ) 1 2 3 4 5 6 7 8 9 10 0.7199 -0.5979 2.4279 1.6030 2.1212 1.3017 1.6683 -2.8233 -1.2202 2.1760 11 12 13 14 15 16 17 18 19 20 -0.5578 -2.5854 -1.6970 -0.3899 1.9153 -3.3698 -0.6429 -1.9698 1.8949 0.0259 > > > ## *************** coefficients ********************* > print( round( coef( fitsur1r3 ), digits = 6 ) ) demand_(Intercept) demand_price demand_income supply_(Intercept) 99.225 -0.268 0.292 62.958 supply_price supply_farmPrice supply_trend 0.144 0.207 0.333 > print( round( coef( fitsur1r3$eq[[ 2 ]] ), digits = 6 ) ) (Intercept) price farmPrice trend 62.958 0.144 0.207 0.333 > > print( round( coef( fitsuri2 ), digits = 6 ) ) demand_(Intercept) demand_price demand_income supply_(Intercept) 107.368 -0.394 0.338 85.045 supply_income supply_farmPrice supply_trend 0.312 -0.197 0.338 > print( round( coef( fitsuri2$eq[[ 1 ]] ), digits = 6 ) ) (Intercept) price income 107.368 -0.394 0.338 > > print( round( coef( fitsur2we ), digits = 6 ) ) demand_(Intercept) demand_price demand_income supply_(Intercept) 98.754 -0.234 0.261 67.888 supply_price supply_farmPrice supply_trend 0.132 0.177 0.261 > print( round( coef( fitsur2we$eq[[ 1 ]] ), digits = 6 ) ) (Intercept) price income 98.754 -0.234 0.261 > > print( round( coef( fitsur3 ), digits = 6 ) ) demand_(Intercept) demand_price demand_income supply_(Intercept) 98.841 -0.240 0.267 67.428 supply_price supply_farmPrice supply_trend 0.133 0.179 0.267 > print( round( coef( fitsur3, modified.regMat = TRUE ), digits = 6 ) ) C1 C2 C3 C4 C5 C6 98.841 -0.240 0.267 67.428 0.133 0.179 > print( round( coef( fitsur3$eq[[ 2 ]] ), digits = 6 ) ) (Intercept) price farmPrice trend 67.428 0.133 0.179 0.267 > > print( round( coef( fitsur4r2 ), digits = 6 ) ) demand_(Intercept) demand_price demand_income supply_(Intercept) 92.527 -0.230 0.322 48.701 supply_price supply_farmPrice supply_trend 0.270 0.226 0.322 > print( round( coef( fitsur4r2$eq[[ 1 ]] ), digits = 6 ) ) (Intercept) price income 92.527 -0.230 0.322 > > print( round( coef( fitsuri5e ), digits = 6 ) ) demand_(Intercept) demand_price demand_income supply_(Intercept) 97.630 -0.258 0.298 89.544 supply_income supply_farmPrice supply_trend 0.242 -0.169 0.298 > print( round( coef( fitsuri5e, modified.regMat = TRUE ), digits = 6 ) ) C1 C2 C3 C4 C5 C6 97.630 -0.258 0.298 89.544 0.242 -0.169 > print( round( coef( fitsuri5e$eq[[ 2 ]] ), digits = 6 ) ) (Intercept) income farmPrice trend 89.544 0.242 -0.169 0.298 > > print( round( coef( fitsur5w ), digits = 6 ) ) demand_(Intercept) demand_price demand_income supply_(Intercept) 96.442 -0.275 0.328 52.576 supply_price supply_farmPrice supply_trend 0.225 0.232 0.328 > print( round( coef( fitsur5w, modified.regMat = TRUE ), digits = 6 ) ) C1 C2 C3 C4 C5 C6 96.442 -0.275 0.328 52.576 0.225 0.232 > print( round( coef( fitsur5w$eq[[ 1 ]] ), digits = 6 ) ) (Intercept) price income 96.442 -0.275 0.328 > > > ## *************** coefficients with stats ********************* > print( round( coef( summary( fitsur1r3 ) ), digits = 6 ) ) Estimate Std. Error t value Pr(>|t|) demand_(Intercept) 99.225 7.5129 13.21 0.000000 demand_price -0.268 0.0878 -3.05 0.007262 demand_income 0.292 0.0408 7.15 0.000002 supply_(Intercept) 62.958 10.9850 5.73 0.000031 supply_price 0.144 0.0944 1.53 0.145991 supply_farmPrice 0.207 0.0386 5.37 0.000062 supply_trend 0.333 0.0644 5.18 0.000092 > print( round( coef( summary( fitsur1r3$eq[[ 2 ]] ) ), digits = 6 ) ) Estimate Std. Error t value Pr(>|t|) (Intercept) 62.958 10.9850 5.73 0.000031 price 0.144 0.0944 1.53 0.145991 farmPrice 0.207 0.0386 5.37 0.000062 trend 0.333 0.0644 5.18 0.000092 > > print( round( coef( summary( fitsuri2, useDfSys = FALSE ) ), digits = 6 ) ) Estimate Std. Error t value Pr(>|t|) demand_(Intercept) 107.368 7.4986 14.32 0.000000 demand_price -0.394 0.0912 -4.33 0.000459 demand_income 0.338 0.0466 7.25 0.000001 supply_(Intercept) 85.045 12.1069 7.02 0.000003 supply_income 0.312 0.1233 2.53 0.022132 supply_farmPrice -0.197 0.1157 -1.70 0.107654 supply_trend 0.338 0.0466 7.25 0.000002 > print( round( coef( summary( fitsuri2$eq[[ 1 ]], useDfSys = FALSE ) ), + digits = 6 ) ) Estimate Std. Error t value Pr(>|t|) (Intercept) 107.368 7.4986 14.32 0.000000 price -0.394 0.0912 -4.33 0.000459 income 0.338 0.0466 7.25 0.000001 > > print( round( coef( summary( fitsur3 ) ), digits = 6 ) ) Estimate Std. Error t value Pr(>|t|) demand_(Intercept) 98.841 7.5581 13.08 0.000000 demand_price -0.240 0.0860 -2.79 0.008613 demand_income 0.267 0.0368 7.25 0.000000 supply_(Intercept) 67.428 10.6647 6.32 0.000000 supply_price 0.133 0.0953 1.40 0.171250 supply_farmPrice 0.179 0.0337 5.33 0.000006 supply_trend 0.267 0.0368 7.25 0.000000 > print( round( coef( summary( fitsur3 ), modified.regMat = TRUE ), digits = 6 ) ) Estimate Std. Error t value Pr(>|t|) C1 98.841 7.5581 13.08 0.000000 C2 -0.240 0.0860 -2.79 0.008613 C3 0.267 0.0368 7.25 0.000000 C4 67.428 10.6647 6.32 0.000000 C5 0.133 0.0953 1.40 0.171250 C6 0.179 0.0337 5.33 0.000006 > print( round( coef( summary( fitsur3$eq[[ 2 ]] ) ), digits = 6 ) ) Estimate Std. Error t value Pr(>|t|) (Intercept) 67.428 10.6647 6.32 0.000000 price 0.133 0.0953 1.40 0.171250 farmPrice 0.179 0.0337 5.33 0.000006 trend 0.267 0.0368 7.25 0.000000 > > print( round( coef( summary( fitsuri3we ) ), digits = 6 ) ) Estimate Std. Error t value Pr(>|t|) demand_(Intercept) 107.806 6.9270 15.56 0.000000 demand_price -0.399 0.0843 -4.73 0.000038 demand_income 0.338 0.0431 7.84 0.000000 supply_(Intercept) 85.107 10.8288 7.86 0.000000 supply_income 0.311 0.1101 2.82 0.007950 supply_farmPrice -0.196 0.1034 -1.89 0.066671 supply_trend 0.338 0.0431 7.84 0.000000 > print( round( coef( summary( fitsuri3we ), modified.regMat = TRUE ), digits = 6 ) ) Estimate Std. Error t value Pr(>|t|) C1 107.806 6.9270 15.56 0.000000 C2 -0.399 0.0843 -4.73 0.000038 C3 0.338 0.0431 7.84 0.000000 C4 85.107 10.8288 7.86 0.000000 C5 0.311 0.1101 2.82 0.007950 C6 -0.196 0.1034 -1.89 0.066671 > print( round( coef( summary( fitsuri3we$eq[[ 1 ]] ) ), digits = 6 ) ) Estimate Std. Error t value Pr(>|t|) (Intercept) 107.806 6.9270 15.56 0.0e+00 price -0.399 0.0843 -4.73 3.8e-05 income 0.338 0.0431 7.84 0.0e+00 > > print( round( coef( summary( fitsur4r2 ) ), digits = 6 ) ) Estimate Std. Error t value Pr(>|t|) demand_(Intercept) 92.527 7.2896 12.69 0.00000 demand_price -0.230 0.0827 -2.79 0.00855 demand_income 0.322 0.0166 19.37 0.00000 supply_(Intercept) 48.701 7.4034 6.58 0.00000 supply_price 0.270 0.0827 3.26 0.00248 supply_farmPrice 0.226 0.0166 13.62 0.00000 supply_trend 0.322 0.0166 19.37 0.00000 > print( round( coef( summary( fitsur4r2$eq[[ 1 ]] ) ), digits = 6 ) ) Estimate Std. Error t value Pr(>|t|) (Intercept) 92.527 7.2896 12.69 0.00000 price -0.230 0.0827 -2.79 0.00855 income 0.322 0.0166 19.37 0.00000 > > print( round( coef( summary( fitsur4we ) ), digits = 6 ) ) Estimate Std. Error t value Pr(>|t|) demand_(Intercept) 96.941 6.8894 14.07 0.000000 demand_price -0.281 0.0766 -3.67 0.000796 demand_income 0.329 0.0181 18.18 0.000000 supply_(Intercept) 52.996 7.0652 7.50 0.000000 supply_price 0.219 0.0766 2.85 0.007215 supply_farmPrice 0.234 0.0183 12.76 0.000000 supply_trend 0.329 0.0181 18.18 0.000000 > print( round( coef( summary( fitsur4we$eq[[ 2 ]] ) ), digits = 6 ) ) Estimate Std. Error t value Pr(>|t|) (Intercept) 52.996 7.0652 7.50 0.00000 price 0.219 0.0766 2.85 0.00722 farmPrice 0.234 0.0183 12.76 0.00000 trend 0.329 0.0181 18.18 0.00000 > > print( round( coef( summary( fitsuri5e, useDfSys = FALSE ) ), digits = 6 ) ) Estimate Std. Error t value Pr(>|t|) demand_(Intercept) 97.630 6.1560 15.86 0.000000 demand_price -0.258 0.0709 -3.63 0.002060 demand_income 0.298 0.0403 7.38 0.000001 supply_(Intercept) 89.544 9.3372 9.59 0.000000 supply_income 0.242 0.0709 3.42 0.003516 supply_farmPrice -0.169 0.0988 -1.71 0.107123 supply_trend 0.298 0.0403 7.38 0.000002 > print( round( coef( summary( fitsuri5e, useDfSys = FALSE ), + modified.regMat = TRUE ), digits = 6 ) ) Estimate Std. Error t value Pr(>|t|) C1 97.630 6.1560 15.86 NA C2 -0.258 0.0709 -3.63 NA C3 0.298 0.0403 7.38 NA C4 89.544 9.3372 9.59 NA C5 0.242 0.0709 3.42 NA C6 -0.169 0.0988 -1.71 NA > print( round( coef( summary( fitsuri5e$eq[[ 2 ]], useDfSys = FALSE ) ), + digits = 6 ) ) Estimate Std. Error t value Pr(>|t|) (Intercept) 89.544 9.3372 9.59 0.000000 income 0.242 0.0709 3.42 0.003516 farmPrice -0.169 0.0988 -1.71 0.107123 trend 0.298 0.0403 7.38 0.000002 > > > ## *********** variance covariance matrix of the coefficients ******* > print( round( vcov( fitsur1e2 ), digits = 6 ) ) demand_(Intercept) demand_price demand_income demand_(Intercept) 56.4403 -0.58751 0.025716 demand_price -0.5875 0.00769 -0.001866 demand_income 0.0257 -0.00187 0.001650 supply_(Intercept) 61.0550 -0.40370 -0.209805 supply_price -0.6325 0.00579 0.000546 supply_farmPrice 0.0215 -0.00156 0.001379 supply_trend 0.0327 -0.00237 0.002095 supply_(Intercept) supply_price supply_farmPrice demand_(Intercept) 61.055 -0.632489 0.021495 demand_price -0.404 0.005792 -0.001559 demand_income -0.210 0.000546 0.001379 supply_(Intercept) 120.418 -0.954714 -0.221454 supply_price -0.955 0.008900 0.000584 supply_farmPrice -0.221 0.000584 0.001476 supply_trend -0.309 0.000772 0.001950 supply_trend demand_(Intercept) 0.032652 demand_price -0.002369 demand_income 0.002095 supply_(Intercept) -0.308674 supply_price 0.000772 supply_farmPrice 0.001950 supply_trend 0.004100 > print( round( vcov( fitsur1e2$eq[[ 1 ]] ), digits = 6 ) ) (Intercept) price income (Intercept) 56.4403 -0.58751 0.02572 price -0.5875 0.00769 -0.00187 income 0.0257 -0.00187 0.00165 > > print( round( vcov( fitsur1r3 ), digits = 6 ) ) demand_(Intercept) demand_price demand_income demand_(Intercept) 56.4432 -0.58772 0.025901 demand_price -0.5877 0.00771 -0.001879 demand_income 0.0259 -0.00188 0.001662 supply_(Intercept) 60.8607 -0.40086 -0.210729 supply_price -0.6307 0.00577 0.000548 supply_farmPrice 0.0216 -0.00157 0.001385 supply_trend 0.0328 -0.00238 0.002104 supply_(Intercept) supply_price supply_farmPrice demand_(Intercept) 60.861 -0.630659 0.021589 demand_price -0.401 0.005771 -0.001566 demand_income -0.211 0.000548 0.001385 supply_(Intercept) 120.671 -0.955395 -0.223176 supply_price -0.955 0.008902 0.000589 supply_farmPrice -0.223 0.000589 0.001487 supply_trend -0.310 0.000776 0.001959 supply_trend demand_(Intercept) 0.032796 demand_price -0.002379 demand_income 0.002104 supply_(Intercept) -0.310422 supply_price 0.000776 supply_farmPrice 0.001959 supply_trend 0.004149 > print( round( vcov( fitsur1r3$eq[[ 2 ]] ), digits = 6 ) ) (Intercept) price farmPrice trend (Intercept) 120.671 -0.955395 -0.223176 -0.310422 price -0.955 0.008902 0.000589 0.000776 farmPrice -0.223 0.000589 0.001487 0.001959 trend -0.310 0.000776 0.001959 0.004149 > > print( round( vcov( fitsur2e ), digits = 6 ) ) demand_(Intercept) demand_price demand_income demand_(Intercept) 48.5631 -0.50188 0.018400 demand_price -0.5019 0.00632 -0.001335 demand_income 0.0184 -0.00134 0.001180 supply_(Intercept) 53.2014 -0.39283 -0.140738 supply_price -0.5462 0.00510 0.000373 supply_farmPrice 0.0147 -0.00107 0.000942 supply_trend 0.0184 -0.00134 0.001180 supply_(Intercept) supply_price supply_farmPrice demand_(Intercept) 53.201 -0.546194 0.014689 demand_price -0.393 0.005097 -0.001066 demand_income -0.141 0.000373 0.000942 supply_(Intercept) 91.607 -0.766739 -0.136644 supply_price -0.767 0.007271 0.000368 supply_farmPrice -0.137 0.000368 0.000931 supply_trend -0.141 0.000373 0.000942 supply_trend demand_(Intercept) 0.018400 demand_price -0.001335 demand_income 0.001180 supply_(Intercept) -0.140738 supply_price 0.000373 supply_farmPrice 0.000942 supply_trend 0.001180 > print( round( vcov( fitsur2e$eq[[ 1 ]] ), digits = 6 ) ) (Intercept) price income (Intercept) 48.5631 -0.50188 0.01840 price -0.5019 0.00632 -0.00134 income 0.0184 -0.00134 0.00118 > > print( round( vcov( fitsur3 ), digits = 6 ) ) demand_(Intercept) demand_price demand_income demand_(Intercept) 57.1254 -0.58989 0.02116 demand_price -0.5899 0.00739 -0.00153 demand_income 0.0212 -0.00153 0.00136 supply_(Intercept) 64.5952 -0.48211 -0.16560 supply_price -0.6626 0.00619 0.00044 supply_farmPrice 0.0173 -0.00126 0.00111 supply_trend 0.0212 -0.00153 0.00136 supply_(Intercept) supply_price supply_farmPrice demand_(Intercept) 64.595 -0.662552 0.017322 demand_price -0.482 0.006195 -0.001257 demand_income -0.166 0.000440 0.001111 supply_(Intercept) 113.736 -0.956493 -0.165927 supply_price -0.956 0.009084 0.000448 supply_farmPrice -0.166 0.000448 0.001133 supply_trend -0.166 0.000440 0.001111 supply_trend demand_(Intercept) 0.02116 demand_price -0.00153 demand_income 0.00136 supply_(Intercept) -0.16560 supply_price 0.00044 supply_farmPrice 0.00111 supply_trend 0.00136 > print( round( vcov( fitsur3, modified.regMat = TRUE ), digits = 6 ) ) C1 C2 C3 C4 C5 C6 C1 57.1254 -0.58989 0.02116 64.595 -0.662552 0.017322 C2 -0.5899 0.00739 -0.00153 -0.482 0.006195 -0.001257 C3 0.0212 -0.00153 0.00136 -0.166 0.000440 0.001111 C4 64.5952 -0.48211 -0.16560 113.736 -0.956493 -0.165927 C5 -0.6626 0.00619 0.00044 -0.956 0.009084 0.000448 C6 0.0173 -0.00126 0.00111 -0.166 0.000448 0.001133 > print( round( vcov( fitsur3$eq[[ 2 ]] ), digits = 6 ) ) (Intercept) price farmPrice trend (Intercept) 113.736 -0.956493 -0.165927 -0.16560 price -0.956 0.009084 0.000448 0.00044 farmPrice -0.166 0.000448 0.001133 0.00111 trend -0.166 0.000440 0.001111 0.00136 > > print( round( vcov( fitsur3w ), digits = 6 ) ) demand_(Intercept) demand_price demand_income demand_(Intercept) 56.7267 -0.58513 0.020348 demand_price -0.5851 0.00729 -0.001476 demand_income 0.0203 -0.00148 0.001305 supply_(Intercept) 64.8820 -0.48999 -0.160451 supply_price -0.6648 0.00623 0.000426 supply_farmPrice 0.0168 -0.00122 0.001077 supply_trend 0.0203 -0.00148 0.001305 supply_(Intercept) supply_price supply_farmPrice demand_(Intercept) 64.882 -0.664819 0.016795 demand_price -0.490 0.006231 -0.001219 demand_income -0.160 0.000426 0.001077 supply_(Intercept) 113.543 -0.959668 -0.161181 supply_price -0.960 0.009129 0.000435 supply_farmPrice -0.161 0.000435 0.001100 supply_trend -0.160 0.000426 0.001077 supply_trend demand_(Intercept) 0.020348 demand_price -0.001476 demand_income 0.001305 supply_(Intercept) -0.160451 supply_price 0.000426 supply_farmPrice 0.001077 supply_trend 0.001305 > print( round( vcov( fitsur3w, modified.regMat = TRUE ), digits = 6 ) ) C1 C2 C3 C4 C5 C6 C1 56.7267 -0.58513 0.020348 64.882 -0.664819 0.016795 C2 -0.5851 0.00729 -0.001476 -0.490 0.006231 -0.001219 C3 0.0203 -0.00148 0.001305 -0.160 0.000426 0.001077 C4 64.8820 -0.48999 -0.160451 113.543 -0.959668 -0.161181 C5 -0.6648 0.00623 0.000426 -0.960 0.009129 0.000435 C6 0.0168 -0.00122 0.001077 -0.161 0.000435 0.001100 > print( round( vcov( fitsur3w$eq[[ 1 ]] ), digits = 6 ) ) (Intercept) price income (Intercept) 56.7267 -0.58513 0.02035 price -0.5851 0.00729 -0.00148 income 0.0203 -0.00148 0.00130 > > print( round( vcov( fitsur4r2 ), digits = 6 ) ) demand_(Intercept) demand_price demand_income demand_(Intercept) 53.1384 -0.593514 0.065746 demand_price -0.5935 0.006838 -0.000927 demand_income 0.0657 -0.000927 0.000276 supply_(Intercept) 53.3903 -0.599312 0.069540 supply_price -0.5935 0.006838 -0.000927 supply_farmPrice 0.0570 -0.000775 0.000210 supply_trend 0.0657 -0.000927 0.000276 supply_(Intercept) supply_price supply_farmPrice demand_(Intercept) 53.3903 -0.593514 0.057048 demand_price -0.5993 0.006838 -0.000775 demand_income 0.0695 -0.000927 0.000210 supply_(Intercept) 54.8108 -0.599312 0.048653 supply_price -0.5993 0.006838 -0.000775 supply_farmPrice 0.0487 -0.000775 0.000276 supply_trend 0.0695 -0.000927 0.000210 supply_trend demand_(Intercept) 0.065746 demand_price -0.000927 demand_income 0.000276 supply_(Intercept) 0.069540 supply_price -0.000927 supply_farmPrice 0.000210 supply_trend 0.000276 > print( round( vcov( fitsur4r2$eq[[ 1 ]] ), digits = 6 ) ) (Intercept) price income (Intercept) 53.1384 -0.593514 0.065746 price -0.5935 0.006838 -0.000927 income 0.0657 -0.000927 0.000276 > > print( round( vcov( fitsur5e ), digits = 6 ) ) demand_(Intercept) demand_price demand_income demand_(Intercept) 47.8867 -0.516747 0.040579 demand_price -0.5167 0.005886 -0.000738 demand_income 0.0406 -0.000738 0.000340 supply_(Intercept) 48.2187 -0.526670 0.047594 supply_price -0.5167 0.005886 -0.000738 supply_farmPrice 0.0334 -0.000562 0.000234 supply_trend 0.0406 -0.000738 0.000340 supply_(Intercept) supply_price supply_farmPrice demand_(Intercept) 48.2187 -0.516747 0.033361 demand_price -0.5267 0.005886 -0.000562 demand_income 0.0476 -0.000738 0.000234 supply_(Intercept) 50.4739 -0.526670 0.020109 supply_price -0.5267 0.005886 -0.000562 supply_farmPrice 0.0201 -0.000562 0.000348 supply_trend 0.0476 -0.000738 0.000234 supply_trend demand_(Intercept) 0.040579 demand_price -0.000738 demand_income 0.000340 supply_(Intercept) 0.047594 supply_price -0.000738 supply_farmPrice 0.000234 supply_trend 0.000340 > print( round( vcov( fitsur5e, modified.regMat = TRUE ), digits = 6 ) ) C1 C2 C3 C4 C5 C6 C1 47.8867 -0.516747 0.040579 48.2187 -0.516747 0.033361 C2 -0.5167 0.005886 -0.000738 -0.5267 0.005886 -0.000562 C3 0.0406 -0.000738 0.000340 0.0476 -0.000738 0.000234 C4 48.2187 -0.526670 0.047594 50.4739 -0.526670 0.020109 C5 -0.5167 0.005886 -0.000738 -0.5267 0.005886 -0.000562 C6 0.0334 -0.000562 0.000234 0.0201 -0.000562 0.000348 > print( round( vcov( fitsur5e$eq[[ 2 ]] ), digits = 6 ) ) (Intercept) price farmPrice trend (Intercept) 50.4739 -0.526670 0.020109 0.047594 price -0.5267 0.005886 -0.000562 -0.000738 farmPrice 0.0201 -0.000562 0.000348 0.000234 trend 0.0476 -0.000738 0.000234 0.000340 > > print( round( vcov( fitsuri1r3 ), digits = 6 ) ) demand_(Intercept) demand_price demand_income demand_(Intercept) 54.5505 -0.55698 0.013891 demand_price -0.5570 0.00770 -0.002185 demand_income 0.0139 -0.00218 0.002098 supply_(Intercept) -2.7032 -0.08733 0.115993 supply_income 0.2249 -0.00185 -0.000411 supply_farmPrice -0.1721 0.00238 -0.000675 supply_trend -0.2597 0.00359 -0.001019 supply_(Intercept) supply_income supply_farmPrice demand_(Intercept) -2.7032 0.224902 -0.172110 demand_price -0.0873 -0.001848 0.002379 demand_income 0.1160 -0.000411 -0.000675 supply_(Intercept) 11.4659 -0.058750 -0.051728 supply_income -0.0587 0.001787 -0.001018 supply_farmPrice -0.0517 -0.001018 0.001368 supply_trend -0.0578 -0.001631 0.001794 supply_trend demand_(Intercept) -0.25970 demand_price 0.00359 demand_income -0.00102 supply_(Intercept) -0.05784 supply_income -0.00163 supply_farmPrice 0.00179 supply_trend 0.00416 > print( round( vcov( fitsuri1r3$eq[[ 1 ]] ), digits = 6 ) ) (Intercept) price income (Intercept) 54.5505 -0.55698 0.01389 price -0.5570 0.00770 -0.00218 income 0.0139 -0.00218 0.00210 > > print( round( vcov( fitsuri2 ), digits = 6 ) ) demand_(Intercept) demand_price demand_income demand_(Intercept) 56.2287 -0.59260 0.033216 demand_price -0.5926 0.00831 -0.002451 demand_income 0.0332 -0.00245 0.002173 supply_(Intercept) 5.9548 0.14141 -0.203885 supply_income -0.2516 0.00201 0.000518 supply_farmPrice 0.1910 -0.00323 0.001351 supply_trend 0.0332 -0.00245 0.002173 supply_(Intercept) supply_income supply_farmPrice demand_(Intercept) 5.955 -0.251647 0.19097 demand_price 0.141 0.002011 -0.00323 demand_income -0.204 0.000518 0.00135 supply_(Intercept) 146.577 -0.828954 -0.64122 supply_income -0.829 0.015214 -0.00683 supply_farmPrice -0.641 -0.006835 0.01339 supply_trend -0.204 0.000518 0.00135 supply_trend demand_(Intercept) 0.033216 demand_price -0.002451 demand_income 0.002173 supply_(Intercept) -0.203885 supply_income 0.000518 supply_farmPrice 0.001351 supply_trend 0.002173 > print( round( vcov( fitsuri2$eq[[ 2 ]] ), digits = 6 ) ) (Intercept) income farmPrice trend (Intercept) 146.577 -0.828954 -0.64122 -0.203885 income -0.829 0.015214 -0.00683 0.000518 farmPrice -0.641 -0.006835 0.01339 0.001351 trend -0.204 0.000518 0.00135 0.002173 > > print( round( vcov( fitsuri3e ), digits = 6 ) ) demand_(Intercept) demand_price demand_income demand_(Intercept) 47.9834 -0.50592 0.028570 demand_price -0.5059 0.00710 -0.002098 demand_income 0.0286 -0.00210 0.001859 supply_(Intercept) 4.9860 0.11975 -0.172089 supply_income -0.2118 0.00170 0.000428 supply_farmPrice 0.1609 -0.00273 0.001147 supply_trend 0.0286 -0.00210 0.001859 supply_(Intercept) supply_income supply_farmPrice demand_(Intercept) 4.986 -0.211763 0.16090 demand_price 0.120 0.001700 -0.00273 demand_income -0.172 0.000428 0.00115 supply_(Intercept) 117.261 -0.661134 -0.51405 supply_income -0.661 0.012132 -0.00545 supply_farmPrice -0.514 -0.005450 0.01070 supply_trend -0.172 0.000428 0.00115 supply_trend demand_(Intercept) 0.028570 demand_price -0.002098 demand_income 0.001859 supply_(Intercept) -0.172089 supply_income 0.000428 supply_farmPrice 0.001147 supply_trend 0.001859 > print( round( vcov( fitsuri3e, modified.regMat = TRUE ), digits = 6 ) ) C1 C2 C3 C4 C5 C6 C1 47.9834 -0.50592 0.028570 4.986 -0.211763 0.16090 C2 -0.5059 0.00710 -0.002098 0.120 0.001700 -0.00273 C3 0.0286 -0.00210 0.001859 -0.172 0.000428 0.00115 C4 4.9860 0.11975 -0.172089 117.261 -0.661134 -0.51405 C5 -0.2118 0.00170 0.000428 -0.661 0.012132 -0.00545 C6 0.1609 -0.00273 0.001147 -0.514 -0.005450 0.01070 > print( round( vcov( fitsuri3e$eq[[ 1 ]] ), digits = 6 ) ) (Intercept) price income (Intercept) 47.9834 -0.5059 0.02857 price -0.5059 0.0071 -0.00210 income 0.0286 -0.0021 0.00186 > > print( round( vcov( fitsurio4e ), digits = 6 ) ) demand_(Intercept) demand_price demand_income demand_(Intercept) 47.0268 -0.525375 0.058300 demand_price -0.5254 0.006074 -0.000842 demand_income 0.0583 -0.000842 0.000266 supply_(Intercept) 47.2346 -0.530682 0.061997 supply_price -0.5254 0.006074 -0.000842 supply_farmPrice 0.0508 -0.000704 0.000201 supply_trend 0.0583 -0.000842 0.000266 supply_(Intercept) supply_price supply_farmPrice demand_(Intercept) 47.2346 -0.525375 0.050751 demand_price -0.5307 0.006074 -0.000704 demand_income 0.0620 -0.000842 0.000201 supply_(Intercept) 48.6183 -0.530682 0.042182 supply_price -0.5307 0.006074 -0.000704 supply_farmPrice 0.0422 -0.000704 0.000270 supply_trend 0.0620 -0.000842 0.000201 supply_trend demand_(Intercept) 0.058300 demand_price -0.000842 demand_income 0.000266 supply_(Intercept) 0.061997 supply_price -0.000842 supply_farmPrice 0.000201 supply_trend 0.000266 > print( round( vcov( fitsurio4e$eq[[ 2 ]] ), digits = 6 ) ) (Intercept) price farmPrice trend (Intercept) 48.6183 -0.530682 0.042182 0.061997 price -0.5307 0.006074 -0.000704 -0.000842 farmPrice 0.0422 -0.000704 0.000270 0.000201 trend 0.0620 -0.000842 0.000201 0.000266 > print( round( vcov( fitsuri4e ), digits = 6 ) ) demand_(Intercept) demand_price demand_income demand_(Intercept) 37.8960 -0.36274 -0.01487 demand_price -0.3627 0.00503 -0.00144 demand_income -0.0149 -0.00144 0.00163 supply_(Intercept) 19.0822 -0.20611 0.01617 supply_income -0.3627 0.00503 -0.00144 supply_farmPrice 0.1707 -0.00279 0.00111 supply_trend -0.0149 -0.00144 0.00163 supply_(Intercept) supply_income supply_farmPrice demand_(Intercept) 19.0822 -0.36274 0.17073 demand_price -0.2061 0.00503 -0.00279 demand_income 0.0162 -0.00144 0.00111 supply_(Intercept) 87.1827 -0.20611 -0.68294 supply_income -0.2061 0.00503 -0.00279 supply_farmPrice -0.6829 -0.00279 0.00976 supply_trend 0.0162 -0.00144 0.00111 supply_trend demand_(Intercept) -0.01487 demand_price -0.00144 demand_income 0.00163 supply_(Intercept) 0.01617 supply_income -0.00144 supply_farmPrice 0.00111 supply_trend 0.00163 > print( round( vcov( fitsuri4e$eq[[ 2 ]] ), digits = 6 ) ) (Intercept) income farmPrice trend (Intercept) 87.1827 -0.20611 -0.68294 0.01617 income -0.2061 0.00503 -0.00279 -0.00144 farmPrice -0.6829 -0.00279 0.00976 0.00111 trend 0.0162 -0.00144 0.00111 0.00163 > > print( round( vcov( fitsurio5r2 ), digits = 6 ) ) demand_(Intercept) demand_price demand_income demand_(Intercept) 51.3196 -0.579747 0.070528 demand_price -0.5797 0.006646 -0.000872 demand_income 0.0705 -0.000872 0.000171 supply_(Intercept) 51.5518 -0.583025 0.072036 supply_price -0.5797 0.006646 -0.000872 supply_farmPrice 0.0617 -0.000751 0.000138 supply_trend 0.0705 -0.000872 0.000171 supply_(Intercept) supply_price supply_farmPrice demand_(Intercept) 51.5518 -0.579747 0.061658 demand_price -0.5830 0.006646 -0.000751 demand_income 0.0720 -0.000872 0.000138 supply_(Intercept) 52.2109 -0.583025 0.058794 supply_price -0.5830 0.006646 -0.000751 supply_farmPrice 0.0588 -0.000751 0.000154 supply_trend 0.0720 -0.000872 0.000138 supply_trend demand_(Intercept) 0.070528 demand_price -0.000872 demand_income 0.000171 supply_(Intercept) 0.072036 supply_price -0.000872 supply_farmPrice 0.000138 supply_trend 0.000171 > print( round( vcov( fitsurio5r2, modified.regMat = TRUE ), digits = 6 ) ) C1 C2 C3 C4 C5 C6 C1 51.3196 -0.579747 0.070528 51.5518 -0.579747 0.061658 C2 -0.5797 0.006646 -0.000872 -0.5830 0.006646 -0.000751 C3 0.0705 -0.000872 0.000171 0.0720 -0.000872 0.000138 C4 51.5518 -0.583025 0.072036 52.2109 -0.583025 0.058794 C5 -0.5797 0.006646 -0.000872 -0.5830 0.006646 -0.000751 C6 0.0617 -0.000751 0.000138 0.0588 -0.000751 0.000154 > print( round( vcov( fitsurio5r2$eq[[ 1 ]] ), digits = 6 ) ) (Intercept) price income (Intercept) 51.3196 -0.579747 0.070528 price -0.5797 0.006646 -0.000872 income 0.0705 -0.000872 0.000171 > print( round( vcov( fitsuri5r2 ), digits = 6 ) ) demand_(Intercept) demand_price demand_income demand_(Intercept) 45.6881 -0.44008 -0.01517 demand_price -0.4401 0.00605 -0.00170 demand_income -0.0152 -0.00170 0.00190 supply_(Intercept) 22.8172 -0.23903 0.01186 supply_income -0.4401 0.00605 -0.00170 supply_farmPrice 0.2104 -0.00345 0.00138 supply_trend -0.0152 -0.00170 0.00190 supply_(Intercept) supply_income supply_farmPrice demand_(Intercept) 22.8172 -0.44008 0.21042 demand_price -0.2390 0.00605 -0.00345 demand_income 0.0119 -0.00170 0.00138 supply_(Intercept) 108.8722 -0.23903 -0.87024 supply_income -0.2390 0.00605 -0.00345 supply_farmPrice -0.8702 -0.00345 0.01234 supply_trend 0.0119 -0.00170 0.00138 supply_trend demand_(Intercept) -0.01517 demand_price -0.00170 demand_income 0.00190 supply_(Intercept) 0.01186 supply_income -0.00170 supply_farmPrice 0.00138 supply_trend 0.00190 > print( round( vcov( fitsuri5r2, modified.regMat = TRUE ), digits = 6 ) ) C1 C2 C3 C4 C5 C6 C1 45.6881 -0.44008 -0.01517 22.8172 -0.44008 0.21042 C2 -0.4401 0.00605 -0.00170 -0.2390 0.00605 -0.00345 C3 -0.0152 -0.00170 0.00190 0.0119 -0.00170 0.00138 C4 22.8172 -0.23903 0.01186 108.8722 -0.23903 -0.87024 C5 -0.4401 0.00605 -0.00170 -0.2390 0.00605 -0.00345 C6 0.2104 -0.00345 0.00138 -0.8702 -0.00345 0.01234 > print( round( vcov( fitsuri5r2$eq[[ 1 ]] ), digits = 6 ) ) (Intercept) price income (Intercept) 45.6881 -0.44008 -0.0152 price -0.4401 0.00605 -0.0017 income -0.0152 -0.00170 0.0019 > > print( round( vcov( fitsurio5wr2 ), digits = 6 ) ) demand_(Intercept) demand_price demand_income demand_(Intercept) 51.3196 -0.579747 0.070528 demand_price -0.5797 0.006646 -0.000872 demand_income 0.0705 -0.000872 0.000171 supply_(Intercept) 51.5518 -0.583025 0.072036 supply_price -0.5797 0.006646 -0.000872 supply_farmPrice 0.0617 -0.000751 0.000138 supply_trend 0.0705 -0.000872 0.000171 supply_(Intercept) supply_price supply_farmPrice demand_(Intercept) 51.5518 -0.579747 0.061658 demand_price -0.5830 0.006646 -0.000751 demand_income 0.0720 -0.000872 0.000138 supply_(Intercept) 52.2109 -0.583025 0.058794 supply_price -0.5830 0.006646 -0.000751 supply_farmPrice 0.0588 -0.000751 0.000154 supply_trend 0.0720 -0.000872 0.000138 supply_trend demand_(Intercept) 0.070528 demand_price -0.000872 demand_income 0.000171 supply_(Intercept) 0.072036 supply_price -0.000872 supply_farmPrice 0.000138 supply_trend 0.000171 > print( round( vcov( fitsurio5wr2, modified.regMat = TRUE ), digits = 6 ) ) C1 C2 C3 C4 C5 C6 C1 51.3196 -0.579747 0.070528 51.5518 -0.579747 0.061658 C2 -0.5797 0.006646 -0.000872 -0.5830 0.006646 -0.000751 C3 0.0705 -0.000872 0.000171 0.0720 -0.000872 0.000138 C4 51.5518 -0.583025 0.072036 52.2109 -0.583025 0.058794 C5 -0.5797 0.006646 -0.000872 -0.5830 0.006646 -0.000751 C6 0.0617 -0.000751 0.000138 0.0588 -0.000751 0.000154 > print( round( vcov( fitsurio5wr2$eq[[ 2 ]] ), digits = 6 ) ) (Intercept) price farmPrice trend (Intercept) 52.2109 -0.583025 0.058794 0.072036 price -0.5830 0.006646 -0.000751 -0.000872 farmPrice 0.0588 -0.000751 0.000154 0.000138 trend 0.0720 -0.000872 0.000138 0.000171 > > > ## *********** confidence intervals of coefficients ************* > print( confint( fitsur1e2, useDfSys = TRUE ) ) 2.5 % 97.5 % demand_(Intercept) 83.927 114.497 demand_price -0.445 -0.088 demand_income 0.208 0.373 supply_(Intercept) 40.751 85.403 supply_price -0.048 0.336 supply_farmPrice 0.128 0.285 supply_trend 0.202 0.463 > print( confint( fitsur1e2$eq[[ 2 ]], level = 0.9, useDfSys = TRUE ) ) 5 % 95 % (Intercept) 44.506 81.648 price -0.016 0.304 farmPrice 0.141 0.271 trend 0.224 0.441 > > print( confint( fitsur1we2, useDfSys = TRUE ) ) 2.5 % 97.5 % demand_(Intercept) 83.927 114.497 demand_price -0.445 -0.088 demand_income 0.208 0.373 supply_(Intercept) 40.751 85.403 supply_price -0.048 0.336 supply_farmPrice 0.128 0.285 supply_trend 0.202 0.463 > print( confint( fitsur1we2$eq[[ 1 ]], level = 0.9, useDfSys = TRUE ) ) 5 % 95 % (Intercept) 86.498 111.926 price -0.415 -0.118 income 0.222 0.360 > > print( confint( fitsur2e, level = 0.9 ) ) 5 % 95 % demand_(Intercept) 84.618 112.942 demand_price -0.397 -0.074 demand_income 0.193 0.333 supply_(Intercept) 48.153 87.055 supply_price -0.040 0.306 supply_farmPrice 0.116 0.240 supply_trend 0.193 0.333 > print( confint( fitsur2e$eq[[ 1 ]], level = 0.99 ) ) 0.5 % 99.5 % (Intercept) 79.767 117.793 price -0.452 -0.018 income 0.169 0.357 > > print( confint( fitsur3, level = 0.99 ) ) 0.5 % 99.5 % demand_(Intercept) 83.481 114.201 demand_price -0.415 -0.065 demand_income 0.192 0.342 supply_(Intercept) 45.755 89.102 supply_price -0.060 0.327 supply_farmPrice 0.111 0.248 supply_trend 0.192 0.342 > print( confint( fitsur3$eq[[ 2 ]], level = 0.5 ) ) 25 % 75 % (Intercept) 60.157 74.699 price 0.068 0.198 farmPrice 0.157 0.202 trend 0.242 0.292 > > print( confint( fitsur4r3, level = 0.5 ) ) 25 % 75 % demand_(Intercept) 78.344 108.052 demand_price -0.406 -0.070 demand_income 0.289 0.358 supply_(Intercept) 34.267 64.468 supply_price 0.094 0.430 supply_farmPrice 0.192 0.262 supply_trend 0.289 0.358 > print( confint( fitsur4r3$eq[[ 1 ]], level = 0.25 ) ) 37.5 % 62.5 % (Intercept) 90.848 95.548 price -0.265 -0.211 income 0.318 0.329 > > print( confint( fitsur5, level = 0.25 ) ) 37.5 % 62.5 % demand_(Intercept) 81.670 111.985 demand_price -0.450 -0.109 demand_income 0.287 0.371 supply_(Intercept) 37.377 68.500 supply_price 0.050 0.391 supply_farmPrice 0.190 0.276 supply_trend 0.287 0.371 > print( confint( fitsur5$eq[[ 2 ]], level = 0.975 ) ) 1.3 % 98.8 % (Intercept) 34.986 70.891 price 0.024 0.417 farmPrice 0.183 0.282 trend 0.280 0.377 > > print( confint( fitsuri1r3, level = 0.975 ) ) 1.3 % 98.8 % demand_(Intercept) 77.960 109.125 demand_price -0.414 -0.043 demand_income 0.213 0.406 supply_(Intercept) 82.005 96.361 supply_income 0.574 0.753 supply_farmPrice -0.550 -0.393 supply_trend -0.932 -0.659 > print( confint( fitsuri1r3$eq[[ 1 ]], level = 0.999 ) ) 0.1 % 100 % (Intercept) 64.257 122.828 price -0.576 0.119 income 0.128 0.491 > > print( confint( fitsuri2, level = 0.999 ) ) 0.1 % 100 % demand_(Intercept) 92.129 122.607 demand_price -0.580 -0.209 demand_income 0.243 0.433 supply_(Intercept) 60.441 109.649 supply_income 0.062 0.563 supply_farmPrice -0.432 0.038 supply_trend 0.243 0.433 > print( confint( fitsuri2$eq[[ 2 ]], level = 0.1 ) ) 45 % 55 % (Intercept) 83.512 86.578 income 0.297 0.328 farmPrice -0.212 -0.183 trend 0.332 0.344 > > print( confint( fitsuri3e, level = 0.1 ) ) 45 % 55 % demand_(Intercept) 93.728 121.882 demand_price -0.570 -0.227 demand_income 0.250 0.426 supply_(Intercept) 63.100 107.114 supply_income 0.087 0.534 supply_farmPrice -0.406 0.014 supply_trend 0.250 0.426 > print( confint( fitsuri3e$eq[[ 1 ]], level = 0.01 ) ) 49.5 % 50.5 % (Intercept) 107.718 107.893 price -0.400 -0.398 income 0.337 0.338 > > print( confint( fitsurio4, level = 0.01 ) ) 49.5 % 50.5 % demand_(Intercept) 77.496 107.356 demand_price -0.400 -0.055 demand_income 0.283 0.358 supply_(Intercept) 33.588 63.871 supply_price 0.100 0.445 supply_farmPrice 0.185 0.262 supply_trend 0.283 0.358 > print( confint( fitsurio4$eq[[ 2 ]], level = 0.33 ) ) 33.5 % 66.5 % (Intercept) 45.524 51.935 price 0.236 0.309 farmPrice 0.215 0.231 trend 0.312 0.328 > print( confint( fitsuri4, level = 0.01 ) ) 49.5 % 50.5 % demand_(Intercept) 84.345 111.726 demand_price -0.422 -0.107 demand_income 0.212 0.389 supply_(Intercept) 68.817 111.192 supply_income 0.078 0.393 supply_farmPrice -0.392 0.058 supply_trend 0.212 0.389 > print( confint( fitsuri4$eq[[ 2 ]], level = 0.33 ) ) 33.5 % 66.5 % (Intercept) 85.519 94.490 income 0.202 0.269 farmPrice -0.214 -0.119 trend 0.282 0.319 > > print( confint( fitsurio4w, level = 0.01 ) ) 49.5 % 50.5 % demand_(Intercept) 77.496 107.356 demand_price -0.400 -0.055 demand_income 0.283 0.358 supply_(Intercept) 33.587 63.871 supply_price 0.100 0.445 supply_farmPrice 0.185 0.262 supply_trend 0.283 0.358 > print( confint( fitsurio4w$eq[[ 1 ]], level = 0.33 ) ) 33.5 % 66.5 % (Intercept) 89.266 95.587 price -0.264 -0.191 income 0.312 0.328 > > print( confint( fitsurio5r2, level = 0.33 ) ) 33.5 % 66.5 % demand_(Intercept) 63.491 92.577 demand_price -0.230 0.101 demand_income 0.274 0.327 supply_(Intercept) 19.527 48.865 supply_price 0.270 0.601 supply_farmPrice 0.182 0.232 supply_trend 0.274 0.327 > print( confint( fitsurio5r2$eq[[ 1 ]] ) ) 2.5 % 97.5 % (Intercept) 63.491 92.577 price -0.230 0.101 income 0.274 0.327 > print( confint( fitsuri5r2, level = 0.33 ) ) 33.5 % 66.5 % demand_(Intercept) 84.498 111.942 demand_price -0.425 -0.109 demand_income 0.213 0.390 supply_(Intercept) 69.034 111.399 supply_income 0.075 0.391 supply_farmPrice -0.392 0.059 supply_trend 0.213 0.390 > print( confint( fitsuri5r2$eq[[ 1 ]] ) ) 2.5 % 97.5 % (Intercept) 84.498 111.942 price -0.425 -0.109 income 0.213 0.390 > > > ## *********** fitted values ************* > print( fitted( fitsur1e2 ) ) demand supply 1 97.9 98.1 2 99.8 99.2 3 99.7 99.4 4 99.9 99.7 5 102.1 101.7 6 101.9 101.7 7 102.3 101.7 8 102.6 103.5 9 101.6 102.4 10 100.7 100.3 11 96.2 96.8 12 95.2 95.4 13 96.4 96.8 14 99.2 98.7 15 103.8 102.9 16 103.5 104.2 17 104.2 104.0 18 101.8 103.1 19 103.2 103.0 20 105.9 105.2 > print( fitted( fitsur1e2$eq[[ 2 ]] ) ) 1 2 3 4 5 6 7 8 9 10 11 12 13 98.1 99.2 99.4 99.7 101.7 101.7 101.7 103.5 102.4 100.3 96.8 95.4 96.8 14 15 16 17 18 19 20 98.7 102.9 104.2 104.0 103.1 103.0 105.2 > > print( fitted( fitsur2e ) ) demand supply 1 98.2 98.7 2 99.9 99.7 3 99.9 99.8 4 100.0 100.0 5 102.0 101.7 6 101.8 101.7 7 102.1 101.7 8 102.5 103.2 9 101.5 102.2 10 100.7 100.3 11 96.6 97.3 12 95.8 96.1 13 96.8 97.3 14 99.4 98.9 15 103.5 102.4 16 103.3 103.6 17 103.8 103.3 18 101.8 102.7 19 103.0 102.6 20 105.5 104.5 > print( fitted( fitsur2e$eq[[ 1 ]] ) ) 1 2 3 4 5 6 7 8 9 10 11 12 13 98.2 99.9 99.9 100.0 102.0 101.8 102.1 102.5 101.5 100.7 96.6 95.8 96.8 14 15 16 17 18 19 20 99.4 103.5 103.3 103.8 101.8 103.0 105.5 > > print( fitted( fitsur2we ) ) demand supply 1 98.2 98.7 2 99.9 99.7 3 99.9 99.8 4 100.0 100.1 5 102.0 101.7 6 101.8 101.7 7 102.1 101.7 8 102.5 103.2 9 101.5 102.2 10 100.7 100.3 11 96.7 97.4 12 95.8 96.2 13 96.8 97.4 14 99.4 99.0 15 103.5 102.4 16 103.2 103.6 17 103.8 103.3 18 101.8 102.7 19 103.0 102.6 20 105.5 104.5 > print( fitted( fitsur2we$eq[[ 2 ]] ) ) 1 2 3 4 5 6 7 8 9 10 11 12 13 98.7 99.7 99.8 100.1 101.7 101.7 101.7 103.2 102.2 100.3 97.4 96.2 97.4 14 15 16 17 18 19 20 99.0 102.4 103.6 103.3 102.7 102.6 104.5 > > print( fitted( fitsur3 ) ) demand supply 1 98.1 98.6 2 99.9 99.6 3 99.9 99.8 4 100.0 100.0 5 102.0 101.7 6 101.8 101.7 7 102.2 101.7 8 102.5 103.2 9 101.5 102.2 10 100.7 100.3 11 96.6 97.3 12 95.7 96.1 13 96.8 97.3 14 99.3 98.9 15 103.6 102.5 16 103.3 103.7 17 103.8 103.3 18 101.8 102.7 19 103.0 102.6 20 105.6 104.6 > print( fitted( fitsur3$eq[[ 2 ]] ) ) 1 2 3 4 5 6 7 8 9 10 11 12 13 98.6 99.6 99.8 100.0 101.7 101.7 101.7 103.2 102.2 100.3 97.3 96.1 97.3 14 15 16 17 18 19 20 98.9 102.5 103.7 103.3 102.7 102.6 104.6 > > print( fitted( fitsur4r3 ) ) demand supply 1 97.6 98.2 2 99.9 99.8 3 99.8 99.9 4 100.0 100.3 5 102.1 101.8 6 102.0 101.9 7 102.5 102.1 8 103.1 104.3 9 101.4 102.2 10 100.2 99.3 11 95.3 95.7 12 94.5 94.7 13 96.0 96.6 14 99.0 98.2 15 103.9 102.4 16 103.7 104.2 17 103.8 102.6 18 102.2 103.4 19 103.8 103.5 20 107.2 106.7 > print( fitted( fitsur4r3$eq[[ 1 ]] ) ) 1 2 3 4 5 6 7 8 9 10 11 12 13 97.6 99.9 99.8 100.0 102.1 102.0 102.5 103.1 101.4 100.2 95.3 94.5 96.0 14 15 16 17 18 19 20 99.0 103.9 103.7 103.8 102.2 103.8 107.2 > > print( fitted( fitsur5 ) ) demand supply 1 97.5 98.2 2 99.7 99.6 3 99.7 99.8 4 99.9 100.1 5 102.2 101.9 6 102.0 102.0 7 102.5 102.1 8 102.9 104.2 9 101.6 102.4 10 100.5 99.7 11 95.5 95.9 12 94.5 94.6 13 95.8 96.4 14 99.0 98.2 15 104.1 102.6 16 103.8 104.3 17 104.3 103.3 18 102.0 103.3 19 103.6 103.3 20 106.8 106.1 > print( fitted( fitsur5$eq[[ 2 ]] ) ) 1 2 3 4 5 6 7 8 9 10 11 12 13 98.2 99.6 99.8 100.1 101.9 102.0 102.1 104.2 102.4 99.7 95.9 94.6 96.4 14 15 16 17 18 19 20 98.2 102.6 104.3 103.3 103.3 103.3 106.1 > > print( fitted( fitsuri1r3 ) ) demand supply 1 97.7 100.2 2 99.9 105.7 3 99.9 104.3 4 100.1 104.9 5 102.1 99.2 6 101.9 100.1 7 102.4 102.3 8 103.0 102.6 9 101.4 94.9 10 100.2 92.8 11 95.5 92.1 12 94.8 98.3 13 96.2 101.6 14 99.0 99.8 15 103.7 97.5 16 103.6 96.7 17 103.6 87.6 18 102.1 100.6 19 103.7 105.5 20 107.0 113.8 > print( fitted( fitsuri1r3$eq[[ 1 ]] ) ) 1 2 3 4 5 6 7 8 9 10 11 12 13 97.7 99.9 99.9 100.1 102.1 101.9 102.4 103.0 101.4 100.2 95.5 94.8 96.2 14 15 16 17 18 19 20 99.0 103.7 103.6 103.6 102.1 103.7 107.0 > > print( fitted( fitsuri1wr3 ) ) demand supply 1 97.7 100.2 2 99.9 105.7 3 99.9 104.3 4 100.1 104.9 5 102.1 99.2 6 101.9 100.1 7 102.4 102.3 8 103.0 102.6 9 101.4 94.9 10 100.2 92.8 11 95.5 92.1 12 94.8 98.3 13 96.2 101.6 14 99.0 99.8 15 103.7 97.5 16 103.6 96.7 17 103.6 87.6 18 102.1 100.6 19 103.7 105.5 20 107.0 113.8 > print( fitted( fitsuri1wr3$eq[[ 2 ]] ) ) 1 2 3 4 5 6 7 8 9 10 11 12 13 100.2 105.7 104.3 104.9 99.2 100.1 102.3 102.6 94.9 92.8 92.1 98.3 101.6 14 15 16 17 18 19 20 99.8 97.5 96.7 87.6 100.6 105.5 113.8 > > print( fitted( fitsuri2 ) ) demand supply 1 97.4 93.4 2 99.2 96.7 3 99.3 96.7 4 99.4 97.7 5 102.5 96.1 6 102.1 97.1 7 102.4 98.8 8 102.5 99.8 9 102.0 96.8 10 101.4 96.4 11 96.0 96.3 12 94.4 99.6 13 95.4 101.9 14 99.1 102.0 15 104.7 102.2 16 104.1 102.6 17 105.8 99.1 18 101.6 105.5 19 103.1 108.5 20 105.6 113.2 > print( fitted( fitsuri2$eq[[ 2 ]] ) ) 1 2 3 4 5 6 7 8 9 10 11 12 13 93.4 96.7 96.7 97.7 96.1 97.1 98.8 99.8 96.8 96.4 96.3 99.6 101.9 14 15 16 17 18 19 20 102.0 102.2 102.6 99.1 105.5 108.5 113.2 > > print( fitted( fitsuri3e ) ) demand supply 1 97.4 93.4 2 99.2 96.7 3 99.3 96.7 4 99.3 97.7 5 102.5 96.1 6 102.1 97.2 7 102.4 98.8 8 102.5 99.8 9 102.0 96.9 10 101.5 96.4 11 96.1 96.3 12 94.4 99.6 13 95.4 101.9 14 99.1 102.0 15 104.7 102.2 16 104.1 102.6 17 105.9 99.1 18 101.6 105.5 19 103.1 108.4 20 105.5 113.1 > print( fitted( fitsuri3e$eq[[ 1 ]] ) ) 1 2 3 4 5 6 7 8 9 10 11 12 13 97.4 99.2 99.3 99.3 102.5 102.1 102.4 102.5 102.0 101.5 96.1 94.4 95.4 14 15 16 17 18 19 20 99.1 104.7 104.1 105.9 101.6 103.1 105.5 > > print( fitted( fitsurio4 ) ) demand supply 1 97.6 98.2 2 100.0 99.9 3 99.9 100.0 4 100.1 100.4 5 102.1 101.8 6 102.0 101.9 7 102.5 102.1 8 103.1 104.3 9 101.4 102.1 10 100.1 99.2 11 95.3 95.7 12 94.6 94.8 13 96.1 96.7 14 99.0 98.3 15 103.8 102.3 16 103.7 104.1 17 103.6 102.4 18 102.2 103.5 19 103.8 103.6 20 107.3 106.8 > print( fitted( fitsurio4$eq[[ 2 ]] ) ) 1 2 3 4 5 6 7 8 9 10 11 12 13 98.2 99.9 100.0 100.4 101.8 101.9 102.1 104.3 102.1 99.2 95.7 94.8 96.7 14 15 16 17 18 19 20 98.3 102.3 104.1 102.4 103.5 103.6 106.8 > print( fitted( fitsuri4 ) ) demand supply 1 97.8 94.5 2 99.8 97.1 3 99.7 97.2 4 99.9 98.0 5 102.1 96.5 6 101.9 97.4 7 102.3 98.8 8 102.7 99.5 9 101.6 97.3 10 100.6 97.2 11 96.0 97.5 12 95.0 100.3 13 96.2 102.0 14 99.1 102.0 15 103.9 101.7 16 103.6 102.1 17 104.1 99.4 18 101.9 104.6 19 103.3 106.9 20 106.2 110.4 > print( fitted( fitsuri4$eq[[ 2 ]] ) ) 1 2 3 4 5 6 7 8 9 10 11 12 13 94.5 97.1 97.2 98.0 96.5 97.4 98.8 99.5 97.3 97.2 97.5 100.3 102.0 14 15 16 17 18 19 20 102.0 101.7 102.1 99.4 104.6 106.9 110.4 > > print( fitted( fitsurio5r2 ) ) demand supply 1 97.8 98.5 2 100.6 100.7 3 100.4 100.6 4 100.8 101.2 5 101.7 101.3 6 101.8 101.7 7 102.5 102.2 8 103.7 104.9 9 100.8 101.4 10 98.9 97.7 11 94.6 94.8 12 94.8 95.0 13 96.8 97.6 14 98.9 98.2 15 102.9 101.3 16 103.3 103.6 17 101.4 99.8 18 102.7 104.0 19 104.5 104.4 20 108.9 108.9 > print( fitted( fitsurio5r2$eq[[ 1 ]] ) ) 1 2 3 4 5 6 7 8 9 10 11 12 13 97.8 100.6 100.4 100.8 101.7 101.8 102.5 103.7 100.8 98.9 94.6 94.8 96.8 14 15 16 17 18 19 20 98.9 102.9 103.3 101.4 102.7 104.5 108.9 > print( fitted( fitsuri5r2 ) ) demand supply 1 97.8 94.6 2 99.8 97.1 3 99.7 97.2 4 99.9 98.0 5 102.1 96.5 6 101.9 97.4 7 102.3 98.8 8 102.7 99.5 9 101.6 97.3 10 100.6 97.2 11 96.0 97.5 12 95.0 100.3 13 96.2 102.0 14 99.1 102.0 15 103.9 101.7 16 103.6 102.0 17 104.2 99.4 18 101.9 104.6 19 103.3 106.9 20 106.2 110.4 > print( fitted( fitsuri5r2$eq[[ 1 ]] ) ) 1 2 3 4 5 6 7 8 9 10 11 12 13 97.8 99.8 99.7 99.9 102.1 101.9 102.3 102.7 101.6 100.6 96.0 95.0 96.2 14 15 16 17 18 19 20 99.1 103.9 103.6 104.2 101.9 103.3 106.2 > > > ## *********** predicted values ************* > predictData <- Kmenta > predictData$consump <- NULL > predictData$price <- Kmenta$price * 0.9 > predictData$income <- Kmenta$income * 1.1 > > print( predict( fitsur1e2, se.fit = TRUE, interval = "prediction", + useDfSys = TRUE ) ) demand.pred demand.se.fit demand.lwr demand.upr supply.pred supply.se.fit 1 97.9 0.607 93.7 102.1 98.1 0.780 2 99.8 0.569 95.6 104.0 99.2 0.793 3 99.7 0.537 95.6 103.9 99.4 0.728 4 99.9 0.575 95.7 104.1 99.7 0.755 5 102.1 0.493 97.9 106.3 101.7 0.652 6 101.9 0.458 97.8 106.0 101.7 0.605 7 102.3 0.475 98.1 106.4 101.7 0.592 8 102.6 0.593 98.4 106.8 103.5 0.835 9 101.6 0.523 97.4 105.8 102.4 0.717 10 100.7 0.788 96.4 105.1 100.3 0.980 11 96.2 0.898 91.8 100.7 96.8 1.081 12 95.2 0.898 90.8 99.7 95.4 1.159 13 96.4 0.816 92.0 100.7 96.8 1.019 14 99.2 0.495 95.1 103.4 98.7 0.710 15 103.8 0.724 99.5 108.1 102.9 0.816 16 103.5 0.586 99.3 107.7 104.2 0.830 17 104.2 1.240 99.4 108.9 104.0 1.540 18 101.8 0.533 97.7 106.0 103.1 0.770 19 103.2 0.666 98.9 107.4 103.0 0.862 20 105.9 1.240 101.1 110.7 105.2 1.517 supply.lwr supply.upr 1 92.6 104 2 93.7 105 3 94.0 105 4 94.2 105 5 96.3 107 6 96.3 107 7 96.4 107 8 98.0 109 9 97.0 108 10 94.7 106 11 91.2 103 12 89.7 101 13 91.2 102 14 93.3 104 15 97.4 108 16 98.7 110 17 97.9 110 18 97.7 109 19 97.5 109 20 99.2 111 > print( predict( fitsur1e2$eq[[ 2 ]], se.fit = TRUE, interval = "prediction", + useDfSys = TRUE ) ) fit se.fit lwr upr 1 98.1 0.780 92.6 104 2 99.2 0.793 93.7 105 3 99.4 0.728 94.0 105 4 99.7 0.755 94.2 105 5 101.7 0.652 96.3 107 6 101.7 0.605 96.3 107 7 101.7 0.592 96.4 107 8 103.5 0.835 98.0 109 9 102.4 0.717 97.0 108 10 100.3 0.980 94.7 106 11 96.8 1.081 91.2 103 12 95.4 1.159 89.7 101 13 96.8 1.019 91.2 102 14 98.7 0.710 93.3 104 15 102.9 0.816 97.4 108 16 104.2 0.830 98.7 110 17 104.0 1.540 97.9 110 18 103.1 0.770 97.7 109 19 103.0 0.862 97.5 109 20 105.2 1.517 99.2 111 > > print( predict( fitsur2e, se.pred = TRUE, interval = "confidence", + level = 0.999, newdata = predictData ) ) demand.pred demand.se.pred demand.lwr demand.upr supply.pred supply.se.pred 1 103 2.23 99.8 106 97.4 2.80 2 105 2.22 102.0 108 98.3 2.71 3 105 2.23 101.8 108 98.4 2.72 4 105 2.23 102.1 108 98.7 2.70 5 107 2.42 102.3 111 100.4 2.83 6 107 2.39 102.5 111 100.4 2.79 7 107 2.37 103.0 111 100.4 2.75 8 108 2.34 103.8 112 101.8 2.70 9 106 2.44 101.7 111 100.9 2.87 10 105 2.54 99.8 111 99.1 3.05 11 101 2.39 96.5 105 96.1 3.05 12 100 2.24 97.0 103 94.8 2.96 13 101 2.17 99.1 104 96.0 2.83 14 104 2.30 100.5 108 97.6 2.85 15 108 2.58 102.9 114 101.2 2.91 16 108 2.49 103.4 113 102.3 2.83 17 108 2.85 101.3 115 102.1 3.26 18 107 2.31 103.2 111 101.3 2.70 19 108 2.36 104.3 113 101.2 2.68 20 112 2.52 106.4 117 103.0 2.66 supply.lwr supply.upr 1 93.6 101.1 2 95.5 101.1 3 95.5 101.3 4 96.0 101.3 5 96.4 104.4 6 96.7 104.1 7 97.1 103.7 8 99.2 104.5 9 96.5 105.3 10 93.4 104.8 11 90.3 101.8 12 89.7 99.9 13 91.9 100.0 14 93.4 101.8 15 96.4 105.9 16 98.3 106.4 17 95.1 109.2 18 98.6 103.9 19 98.9 103.5 20 101.0 105.1 > print( predict( fitsur2e$eq[[ 1 ]], se.pred = TRUE, interval = "confidence", + level = 0.999, newdata = predictData ) ) fit se.pred lwr upr 1 103 2.23 99.8 106 2 105 2.22 102.0 108 3 105 2.23 101.8 108 4 105 2.23 102.1 108 5 107 2.42 102.3 111 6 107 2.39 102.5 111 7 107 2.37 103.0 111 8 108 2.34 103.8 112 9 106 2.44 101.7 111 10 105 2.54 99.8 111 11 101 2.39 96.5 105 12 100 2.24 97.0 103 13 101 2.17 99.1 104 14 104 2.30 100.5 108 15 108 2.58 102.9 114 16 108 2.49 103.4 113 17 108 2.85 101.3 115 18 107 2.31 103.2 111 19 108 2.36 104.3 113 20 112 2.52 106.4 117 > > print( predict( fitsur3, se.pred = TRUE, interval = "prediction", + level = 0.975 ) ) demand.pred demand.se.pred demand.lwr demand.upr supply.pred supply.se.pred 1 98.1 2.13 93.1 103 98.6 2.67 2 99.9 2.13 94.9 105 99.6 2.69 3 99.9 2.12 94.9 105 99.8 2.68 4 100.0 2.13 95.0 105 100.0 2.69 5 102.0 2.11 97.0 107 101.7 2.67 6 101.8 2.10 96.9 107 101.7 2.66 7 102.2 2.11 97.2 107 101.7 2.66 8 102.5 2.14 97.5 108 103.2 2.72 9 101.5 2.12 96.5 106 102.2 2.69 10 100.7 2.20 95.5 106 100.3 2.78 11 96.6 2.23 91.3 102 97.3 2.80 12 95.7 2.22 90.5 101 96.1 2.81 13 96.8 2.19 91.6 102 97.3 2.77 14 99.3 2.11 94.4 104 98.9 2.69 15 103.6 2.17 98.5 109 102.5 2.71 16 103.3 2.13 98.3 108 103.7 2.69 17 103.8 2.39 98.2 109 103.3 2.99 18 101.8 2.12 96.8 107 102.7 2.69 19 103.0 2.16 98.0 108 102.6 2.71 20 105.6 2.39 100.0 111 104.6 2.97 supply.lwr supply.upr 1 92.4 105 2 93.3 106 3 93.5 106 4 93.7 106 5 95.4 108 6 95.5 108 7 95.5 108 8 96.8 110 9 95.9 109 10 93.8 107 11 90.7 104 12 89.5 103 13 90.8 104 14 92.6 105 15 96.1 109 16 97.3 110 17 96.3 110 18 96.4 109 19 96.3 109 20 97.6 112 > print( predict( fitsur3$eq[[ 2 ]], se.pred = TRUE, interval = "prediction", + level = 0.975 ) ) fit se.pred lwr upr 1 98.6 2.67 92.4 105 2 99.6 2.69 93.3 106 3 99.8 2.68 93.5 106 4 100.0 2.69 93.7 106 5 101.7 2.67 95.4 108 6 101.7 2.66 95.5 108 7 101.7 2.66 95.5 108 8 103.2 2.72 96.8 110 9 102.2 2.69 95.9 109 10 100.3 2.78 93.8 107 11 97.3 2.80 90.7 104 12 96.1 2.81 89.5 103 13 97.3 2.77 90.8 104 14 98.9 2.69 92.6 105 15 102.5 2.71 96.1 109 16 103.7 2.69 97.3 110 17 103.3 2.99 96.3 110 18 102.7 2.69 96.4 109 19 102.6 2.71 96.3 109 20 104.6 2.97 97.6 112 > > print( predict( fitsur4r3, se.fit = TRUE, interval = "confidence", + level = 0.25 ) ) demand.pred demand.se.fit demand.lwr demand.upr supply.pred supply.se.fit 1 97.6 0.474 97.4 97.7 98.2 0.571 2 99.9 0.558 99.7 100.1 99.8 0.699 3 99.8 0.523 99.6 100.0 99.9 0.651 4 100.0 0.567 99.9 100.2 100.3 0.701 5 102.1 0.476 102.0 102.3 101.8 0.620 6 102.0 0.443 101.8 102.1 101.9 0.574 7 102.5 0.440 102.3 102.6 102.1 0.559 8 103.1 0.532 102.9 103.3 104.3 0.646 9 101.4 0.520 101.3 101.6 102.2 0.692 10 100.2 0.774 100.0 100.4 99.3 0.939 11 95.3 0.612 95.1 95.5 95.7 0.732 12 94.5 0.525 94.4 94.7 94.7 0.687 13 96.0 0.603 95.8 96.2 96.6 0.791 14 99.0 0.444 98.8 99.1 98.2 0.580 15 103.9 0.643 103.7 104.1 102.4 0.759 16 103.7 0.494 103.6 103.9 104.2 0.634 17 103.8 1.191 103.4 104.1 102.6 1.456 18 102.2 0.510 102.0 102.3 103.4 0.622 19 103.8 0.570 103.6 104.0 103.5 0.714 20 107.2 0.973 106.9 107.6 106.7 1.183 supply.lwr supply.upr 1 98.0 98.4 2 99.6 100.0 3 99.7 100.1 4 100.1 100.5 5 101.6 102.0 6 101.7 102.1 7 101.9 102.3 8 104.1 104.5 9 102.0 102.4 10 99.0 99.6 11 95.5 95.9 12 94.5 94.9 13 96.4 96.9 14 98.1 98.4 15 102.1 102.6 16 104.0 104.4 17 102.1 103.1 18 103.2 103.6 19 103.3 103.7 20 106.3 107.1 > print( predict( fitsur4r3$eq[[ 1 ]], se.fit = TRUE, interval = "confidence", + level = 0.25 ) ) fit se.fit lwr upr 1 97.6 0.474 97.4 97.7 2 99.9 0.558 99.7 100.1 3 99.8 0.523 99.6 100.0 4 100.0 0.567 99.9 100.2 5 102.1 0.476 102.0 102.3 6 102.0 0.443 101.8 102.1 7 102.5 0.440 102.3 102.6 8 103.1 0.532 102.9 103.3 9 101.4 0.520 101.3 101.6 10 100.2 0.774 100.0 100.4 11 95.3 0.612 95.1 95.5 12 94.5 0.525 94.4 94.7 13 96.0 0.603 95.8 96.2 14 99.0 0.444 98.8 99.1 15 103.9 0.643 103.7 104.1 16 103.7 0.494 103.6 103.9 17 103.8 1.191 103.4 104.1 18 102.2 0.510 102.0 102.3 19 103.8 0.570 103.6 104.0 20 107.2 0.973 106.9 107.6 > > print( predict( fitsur4we, se.fit = TRUE, interval = "confidence", + level = 0.25 ) ) demand.pred demand.se.fit demand.lwr demand.upr supply.pred supply.se.fit 1 97.5 0.445 97.3 97.6 98.2 0.519 2 99.7 0.514 99.6 99.9 99.6 0.636 3 99.7 0.482 99.5 99.8 99.8 0.591 4 99.9 0.523 99.7 100.0 100.1 0.636 5 102.2 0.438 102.1 102.4 102.0 0.568 6 102.0 0.408 101.9 102.2 102.0 0.523 7 102.5 0.409 102.3 102.6 102.1 0.508 8 102.9 0.503 102.8 103.1 104.2 0.603 9 101.6 0.479 101.4 101.7 102.4 0.631 10 100.5 0.724 100.3 100.8 99.7 0.856 11 95.5 0.612 95.3 95.7 95.9 0.694 12 94.4 0.520 94.3 94.6 94.6 0.677 13 95.8 0.565 95.6 96.0 96.3 0.748 14 99.0 0.414 98.8 99.1 98.2 0.540 15 104.1 0.592 103.9 104.3 102.6 0.690 16 103.8 0.458 103.7 104.0 104.3 0.581 17 104.3 1.100 104.0 104.7 103.3 1.334 18 102.0 0.477 101.9 102.2 103.3 0.564 19 103.6 0.545 103.4 103.8 103.2 0.651 20 106.8 0.958 106.5 107.1 106.1 1.091 supply.lwr supply.upr 1 98.0 98.3 2 99.4 99.8 3 99.6 99.9 4 99.9 100.3 5 101.8 102.1 6 101.8 102.2 7 101.9 102.2 8 104.0 104.4 9 102.2 102.6 10 99.5 100.0 11 95.7 96.1 12 94.4 94.8 13 96.1 96.6 14 98.0 98.4 15 102.4 102.9 16 104.1 104.5 17 102.9 103.8 18 103.1 103.5 19 103.0 103.5 20 105.8 106.5 > print( predict( fitsur4we$eq[[ 2 ]], se.fit = TRUE, interval = "confidence", + level = 0.25 ) ) fit se.fit lwr upr 1 98.2 0.519 98.0 98.3 2 99.6 0.636 99.4 99.8 3 99.8 0.591 99.6 99.9 4 100.1 0.636 99.9 100.3 5 102.0 0.568 101.8 102.1 6 102.0 0.523 101.8 102.2 7 102.1 0.508 101.9 102.2 8 104.2 0.603 104.0 104.4 9 102.4 0.631 102.2 102.6 10 99.7 0.856 99.5 100.0 11 95.9 0.694 95.7 96.1 12 94.6 0.677 94.4 94.8 13 96.3 0.748 96.1 96.6 14 98.2 0.540 98.0 98.4 15 102.6 0.690 102.4 102.9 16 104.3 0.581 104.1 104.5 17 103.3 1.334 102.9 103.8 18 103.3 0.564 103.1 103.5 19 103.2 0.651 103.0 103.5 20 106.1 1.091 105.8 106.5 > > print( predict( fitsur5, se.fit = TRUE, se.pred = TRUE, + interval = "prediction", level = 0.5, newdata = predictData ) ) demand.pred demand.se.fit demand.se.pred demand.lwr demand.upr supply.pred 1 103.2 0.911 2.14 101.7 105 96.0 2 105.9 0.786 2.09 104.4 107 97.3 3 105.7 0.824 2.11 104.3 107 97.5 4 106.0 0.780 2.09 104.6 107 97.8 5 108.2 1.233 2.30 106.7 110 99.8 6 108.1 1.143 2.25 106.6 110 99.8 7 108.7 1.076 2.22 107.2 110 99.8 8 109.4 0.919 2.15 108.0 111 101.9 9 107.5 1.295 2.33 105.9 109 100.3 10 106.0 1.568 2.49 104.3 108 97.7 11 100.5 1.292 2.33 98.9 102 93.8 12 99.7 0.921 2.15 98.3 101 92.4 13 101.5 0.720 2.07 100.1 103 94.1 14 104.7 1.054 2.21 103.2 106 96.1 15 110.1 1.485 2.44 108.5 112 100.5 16 110.0 1.284 2.33 108.4 112 102.1 17 109.9 2.013 2.80 108.0 112 101.4 18 108.4 0.906 2.14 106.9 110 101.0 19 110.2 0.911 2.14 108.8 112 100.9 20 114.2 0.898 2.14 112.7 116 103.6 supply.se.fit supply.se.pred supply.lwr supply.upr 1 0.916 2.68 94.1 97.8 2 0.715 2.62 95.5 99.1 3 0.760 2.63 95.7 99.3 4 0.708 2.62 96.0 99.6 5 1.213 2.80 97.9 101.7 6 1.100 2.75 97.9 101.7 7 0.982 2.70 98.0 101.7 8 0.825 2.65 100.1 103.7 9 1.339 2.85 98.4 102.2 10 1.631 3.00 95.7 99.8 11 1.375 2.87 91.9 95.8 12 1.025 2.72 90.6 94.3 13 0.831 2.65 92.3 95.9 14 1.033 2.72 94.2 97.9 15 1.434 2.90 98.5 102.5 16 1.249 2.81 100.2 104.1 17 2.163 3.32 99.1 103.6 18 0.809 2.65 99.2 102.8 19 0.712 2.62 99.1 102.7 20 0.572 2.58 101.9 105.4 > print( predict( fitsur5$eq[[ 2 ]], se.fit = TRUE, se.pred = TRUE, + interval = "prediction", level = 0.5, newdata = predictData ) ) fit se.fit se.pred lwr upr 1 96.0 0.916 2.68 94.1 97.8 2 97.3 0.715 2.62 95.5 99.1 3 97.5 0.760 2.63 95.7 99.3 4 97.8 0.708 2.62 96.0 99.6 5 99.8 1.213 2.80 97.9 101.7 6 99.8 1.100 2.75 97.9 101.7 7 99.8 0.982 2.70 98.0 101.7 8 101.9 0.825 2.65 100.1 103.7 9 100.3 1.339 2.85 98.4 102.2 10 97.7 1.631 3.00 95.7 99.8 11 93.8 1.375 2.87 91.9 95.8 12 92.4 1.025 2.72 90.6 94.3 13 94.1 0.831 2.65 92.3 95.9 14 96.1 1.033 2.72 94.2 97.9 15 100.5 1.434 2.90 98.5 102.5 16 102.1 1.249 2.81 100.2 104.1 17 101.4 2.163 3.32 99.1 103.6 18 101.0 0.809 2.65 99.2 102.8 19 100.9 0.712 2.62 99.1 102.7 20 103.6 0.572 2.58 101.9 105.4 > > print( predict( fitsuri1r3, se.fit = TRUE, se.pred = TRUE, + interval = "confidence", level = 0.99 ) ) demand.pred demand.se.fit demand.se.pred demand.lwr demand.upr supply.pred 1 97.7 0.653 2.09 95.8 99.6 100.2 2 99.9 0.578 2.07 98.3 101.6 105.7 3 99.9 0.548 2.06 98.3 101.4 104.3 4 100.1 0.583 2.07 98.4 101.8 104.9 5 102.1 0.509 2.05 100.6 103.5 99.2 6 101.9 0.474 2.04 100.6 103.3 100.1 7 102.4 0.496 2.04 101.0 103.9 102.3 8 103.0 0.615 2.08 101.2 104.8 102.6 9 101.4 0.531 2.05 99.9 103.0 94.9 10 100.2 0.785 2.13 98.0 102.5 92.8 11 95.5 0.971 2.21 92.7 98.3 92.1 12 94.8 0.996 2.22 91.9 97.7 98.3 13 96.2 0.880 2.17 93.7 98.8 101.6 14 99.0 0.521 2.05 97.5 100.5 99.8 15 103.7 0.752 2.12 101.6 105.9 97.5 16 103.6 0.622 2.08 101.8 105.4 96.7 17 103.6 1.241 2.34 100.0 107.2 87.6 18 102.1 0.546 2.06 100.5 103.7 100.6 19 103.7 0.696 2.10 101.6 105.7 105.5 20 107.0 1.299 2.37 103.2 110.7 113.8 supply.se.fit supply.se.pred supply.lwr supply.upr 1 0.599 1.72 98.4 101.9 2 0.604 1.72 103.9 107.4 3 0.539 1.70 102.7 105.8 4 0.536 1.70 103.4 106.5 5 0.486 1.69 97.8 100.6 6 0.448 1.68 98.8 101.4 7 0.444 1.67 101.0 103.6 8 0.522 1.70 101.1 104.1 9 0.542 1.70 93.3 96.5 10 0.579 1.72 91.1 94.5 11 0.812 1.81 89.7 94.5 12 0.865 1.83 95.8 100.9 13 0.747 1.78 99.4 103.8 14 0.507 1.69 98.3 101.3 15 0.509 1.69 96.0 98.9 16 0.596 1.72 95.0 98.5 17 0.975 1.89 84.7 90.4 18 0.500 1.69 99.1 102.0 19 0.649 1.74 103.6 107.3 20 1.124 1.97 110.5 117.1 > print( predict( fitsuri1r3$eq[[ 1 ]], se.fit = TRUE, se.pred = TRUE, + interval = "confidence", level = 0.99 ) ) fit se.fit se.pred lwr upr 1 97.7 0.653 2.09 95.8 99.6 2 99.9 0.578 2.07 98.3 101.6 3 99.9 0.548 2.06 98.3 101.4 4 100.1 0.583 2.07 98.4 101.8 5 102.1 0.509 2.05 100.6 103.5 6 101.9 0.474 2.04 100.6 103.3 7 102.4 0.496 2.04 101.0 103.9 8 103.0 0.615 2.08 101.2 104.8 9 101.4 0.531 2.05 99.9 103.0 10 100.2 0.785 2.13 98.0 102.5 11 95.5 0.971 2.21 92.7 98.3 12 94.8 0.996 2.22 91.9 97.7 13 96.2 0.880 2.17 93.7 98.8 14 99.0 0.521 2.05 97.5 100.5 15 103.7 0.752 2.12 101.6 105.9 16 103.6 0.622 2.08 101.8 105.4 17 103.6 1.241 2.34 100.0 107.2 18 102.1 0.546 2.06 100.5 103.7 19 103.7 0.696 2.10 101.6 105.7 20 107.0 1.299 2.37 103.2 110.7 > > print( predict( fitsuri2, se.fit = TRUE, interval = "prediction", + level = 0.9, newdata = predictData ) ) demand.pred demand.se.fit demand.lwr demand.upr supply.pred supply.se.fit 1 104 0.960 100.5 108 96.1 1.37 2 107 1.011 102.9 110 99.7 1.69 3 107 1.032 102.8 110 99.8 1.61 4 107 1.019 103.0 111 100.8 1.76 5 110 1.547 105.4 114 99.2 2.00 6 109 1.468 105.3 114 100.3 1.94 7 110 1.465 105.7 114 102.1 2.12 8 110 1.423 106.1 114 103.2 2.60 9 109 1.543 104.8 113 99.9 1.80 10 108 1.699 103.6 112 99.1 1.35 11 102 1.299 98.2 106 98.6 2.25 12 101 0.939 97.2 105 102.0 3.10 13 102 0.731 98.7 106 104.5 3.01 14 106 1.164 102.1 110 104.9 2.27 15 112 1.896 107.3 117 105.4 2.20 16 112 1.733 107.1 116 105.9 2.40 17 113 2.316 107.4 118 102.1 2.02 18 109 1.316 105.2 113 108.8 2.75 19 111 1.497 106.8 115 111.9 3.73 20 114 1.918 109.7 119 117.2 5.62 supply.lwr supply.upr 1 86.2 106 2 89.7 110 3 89.7 110 4 90.7 111 5 89.0 109 6 90.1 110 7 91.8 112 8 92.6 114 9 89.7 110 10 89.2 109 11 88.2 109 12 91.0 113 13 93.6 115 14 94.5 115 15 95.0 116 16 95.4 116 17 91.9 112 18 98.1 119 19 100.4 123 20 103.6 131 > print( predict( fitsuri2$eq[[ 2 ]], se.fit = TRUE, interval = "prediction", + level = 0.9, newdata = predictData ) ) fit se.fit lwr upr 1 96.1 1.37 86.2 106 2 99.7 1.69 89.7 110 3 99.8 1.61 89.7 110 4 100.8 1.76 90.7 111 5 99.2 2.00 89.0 109 6 100.3 1.94 90.1 110 7 102.1 2.12 91.8 112 8 103.2 2.60 92.6 114 9 99.9 1.80 89.7 110 10 99.1 1.35 89.2 109 11 98.6 2.25 88.2 109 12 102.0 3.10 91.0 113 13 104.5 3.01 93.6 115 14 104.9 2.27 94.5 115 15 105.4 2.20 95.0 116 16 105.9 2.40 95.4 116 17 102.1 2.02 91.9 112 18 108.8 2.75 98.1 119 19 111.9 3.73 100.4 123 20 117.2 5.62 103.6 131 > > print( predict( fitsuri2w, se.fit = TRUE, interval = "prediction", + level = 0.9, newdata = predictData ) ) demand.pred demand.se.fit demand.lwr demand.upr supply.pred supply.se.fit 1 104 0.960 100.5 108 96.1 1.37 2 107 1.011 102.9 110 99.7 1.69 3 107 1.032 102.8 110 99.8 1.61 4 107 1.019 103.0 111 100.8 1.76 5 110 1.547 105.4 114 99.2 2.00 6 109 1.468 105.3 114 100.3 1.94 7 110 1.465 105.7 114 102.1 2.12 8 110 1.423 106.1 114 103.2 2.60 9 109 1.543 104.8 113 99.9 1.80 10 108 1.699 103.6 112 99.1 1.35 11 102 1.299 98.2 106 98.6 2.25 12 101 0.939 97.2 105 102.0 3.10 13 102 0.731 98.7 106 104.5 3.01 14 106 1.164 102.1 110 104.9 2.27 15 112 1.896 107.3 117 105.4 2.20 16 112 1.733 107.1 116 105.9 2.40 17 113 2.316 107.4 118 102.1 2.02 18 109 1.316 105.2 113 108.8 2.75 19 111 1.497 106.8 115 111.9 3.73 20 114 1.918 109.7 119 117.2 5.62 supply.lwr supply.upr 1 86.2 106 2 89.7 110 3 89.7 110 4 90.7 111 5 89.0 109 6 90.1 110 7 91.8 112 8 92.6 114 9 89.7 110 10 89.2 109 11 88.2 109 12 91.0 113 13 93.6 115 14 94.5 115 15 95.0 116 16 95.4 116 17 91.9 112 18 98.1 119 19 100.4 123 20 103.6 131 > print( predict( fitsuri2w$eq[[ 2 ]], se.fit = TRUE, interval = "prediction", + level = 0.9, newdata = predictData ) ) fit se.fit lwr upr 1 96.1 1.37 86.2 106 2 99.7 1.69 89.7 110 3 99.8 1.61 89.7 110 4 100.8 1.76 90.7 111 5 99.2 2.00 89.0 109 6 100.3 1.94 90.1 110 7 102.1 2.12 91.8 112 8 103.2 2.60 92.6 114 9 99.9 1.80 89.7 110 10 99.1 1.35 89.2 109 11 98.6 2.25 88.2 109 12 102.0 3.10 91.0 113 13 104.5 3.01 93.6 115 14 104.9 2.27 94.5 115 15 105.4 2.20 95.0 116 16 105.9 2.40 95.4 116 17 102.1 2.02 91.9 112 18 108.8 2.75 98.1 119 19 111.9 3.73 100.4 123 20 117.2 5.62 103.6 131 > > print( predict( fitsuri3e, interval = "prediction", level = 0.925 ) ) demand.pred demand.lwr demand.upr supply.pred supply.lwr supply.upr 1 97.4 93.5 101.2 93.4 82.5 104 2 99.2 95.4 103.0 96.7 86.0 107 3 99.3 95.5 103.0 96.7 86.0 107 4 99.3 95.5 103.1 97.7 87.0 108 5 102.5 98.7 106.2 96.1 85.1 107 6 102.1 98.4 105.9 97.2 86.3 108 7 102.4 98.6 106.2 98.8 88.1 110 8 102.5 98.7 106.3 99.8 88.9 111 9 102.0 98.2 105.8 96.9 85.9 108 10 101.5 97.6 105.4 96.4 85.5 107 11 96.1 92.1 100.1 96.3 84.9 108 12 94.4 90.4 98.4 99.6 87.9 111 13 95.4 91.4 99.3 101.9 90.4 113 14 99.1 95.3 102.8 102.0 91.1 113 15 104.7 100.8 108.6 102.2 91.4 113 16 104.1 100.3 107.9 102.6 91.8 113 17 105.9 101.6 110.2 99.1 88.1 110 18 101.6 97.9 105.4 105.5 94.6 116 19 103.1 99.2 106.9 108.4 97.1 120 20 105.5 101.3 109.8 113.1 100.7 126 > print( predict( fitsuri3e$eq[[ 1 ]], interval = "prediction", level = 0.925 ) ) fit lwr upr 1 97.4 93.5 101.2 2 99.2 95.4 103.0 3 99.3 95.5 103.0 4 99.3 95.5 103.1 5 102.5 98.7 106.2 6 102.1 98.4 105.9 7 102.4 98.6 106.2 8 102.5 98.7 106.3 9 102.0 98.2 105.8 10 101.5 97.6 105.4 11 96.1 92.1 100.1 12 94.4 90.4 98.4 13 95.4 91.4 99.3 14 99.1 95.3 102.8 15 104.7 100.8 108.6 16 104.1 100.3 107.9 17 105.9 101.6 110.2 18 101.6 97.9 105.4 19 103.1 99.2 106.9 20 105.5 101.3 109.8 > > print( predict( fitsurio4, interval = "confidence", newdata = predictData ) ) demand.pred demand.lwr demand.upr supply.pred supply.lwr supply.upr 1 102.7 100.8 105 95.5 93.6 97.4 2 105.5 103.8 107 97.0 95.5 98.5 3 105.3 103.6 107 97.2 95.6 98.8 4 105.6 104.0 107 97.5 96.0 99.0 5 107.5 105.0 110 99.1 96.5 101.6 6 107.5 105.1 110 99.2 96.9 101.5 7 108.1 105.9 110 99.3 97.2 101.4 8 108.9 107.1 111 101.5 99.7 103.2 9 106.7 104.0 109 99.5 96.7 102.3 10 105.1 101.8 108 96.7 93.4 100.1 11 99.8 97.2 102 93.1 90.4 95.9 12 99.3 97.4 101 92.1 90.1 94.1 13 101.1 99.7 103 93.9 92.3 95.5 14 104.1 101.9 106 95.6 93.5 97.7 15 109.3 106.2 112 99.7 96.7 102.7 16 109.3 106.6 112 101.4 98.8 104.0 17 108.7 104.5 113 100.0 95.5 104.5 18 107.9 106.0 110 100.6 98.9 102.3 19 109.8 107.9 112 100.7 99.2 102.2 20 114.0 112.3 116 103.7 102.5 104.9 > print( predict( fitsurio4$eq[[ 2 ]], interval = "confidence", + newdata = predictData ) ) fit lwr upr 1 95.5 93.6 97.4 2 97.0 95.5 98.5 3 97.2 95.6 98.8 4 97.5 96.0 99.0 5 99.1 96.5 101.6 6 99.2 96.9 101.5 7 99.3 97.2 101.4 8 101.5 99.7 103.2 9 99.5 96.7 102.3 10 96.7 93.4 100.1 11 93.1 90.4 95.9 12 92.1 90.1 94.1 13 93.9 92.3 95.5 14 95.6 93.5 97.7 15 99.7 96.7 102.7 16 101.4 98.8 104.0 17 100.0 95.5 104.5 18 100.6 98.9 102.3 19 100.7 99.2 102.2 20 103.7 102.5 104.9 > print( predict( fitsuri4, interval = "confidence", newdata = predictData ) ) demand.pred demand.lwr demand.upr supply.pred supply.lwr supply.upr 1 103.1 101.3 105 96.6 93.9 99.3 2 105.5 103.7 107 99.4 96.2 102.5 3 105.4 103.5 107 99.4 96.4 102.5 4 105.6 103.8 107 100.3 97.1 103.5 5 107.7 105.0 110 98.9 94.9 102.9 6 107.6 105.0 110 99.8 96.1 103.5 7 108.1 105.5 111 101.2 97.6 104.9 8 108.7 106.1 111 102.0 97.7 106.4 9 107.0 104.3 110 99.6 96.0 103.2 10 105.7 102.7 109 99.3 96.6 102.0 11 100.7 98.3 103 99.3 95.0 103.5 12 99.9 98.2 102 102.1 95.8 108.4 13 101.5 100.2 103 104.0 97.9 110.1 14 104.5 102.4 107 104.1 99.8 108.4 15 109.5 106.1 113 104.2 100.8 107.5 16 109.4 106.3 112 104.5 100.9 108.2 17 109.3 105.3 113 101.7 97.7 105.6 18 107.8 105.4 110 107.0 103.1 110.9 19 109.5 106.7 112 109.5 104.4 114.6 20 113.0 109.4 117 113.4 106.3 120.6 > print( predict( fitsuri4$eq[[ 2 ]], interval = "confidence", + newdata = predictData ) ) fit lwr upr 1 96.6 93.9 99.3 2 99.4 96.2 102.5 3 99.4 96.4 102.5 4 100.3 97.1 103.5 5 98.9 94.9 102.9 6 99.8 96.1 103.5 7 101.2 97.6 104.9 8 102.0 97.7 106.4 9 99.6 96.0 103.2 10 99.3 96.6 102.0 11 99.3 95.0 103.5 12 102.1 95.8 108.4 13 104.0 97.9 110.1 14 104.1 99.8 108.4 15 104.2 100.8 107.5 16 104.5 100.9 108.2 17 101.7 97.7 105.6 18 107.0 103.1 110.9 19 109.5 104.4 114.6 20 113.4 106.3 120.6 > > print( predict( fitsurio5r2 ) ) demand.pred supply.pred 1 97.8 98.5 2 100.6 100.7 3 100.4 100.6 4 100.8 101.2 5 101.7 101.3 6 101.8 101.7 7 102.5 102.2 8 103.7 104.9 9 100.8 101.4 10 98.9 97.7 11 94.6 94.8 12 94.8 95.0 13 96.8 97.6 14 98.9 98.2 15 102.9 101.3 16 103.3 103.6 17 101.4 99.8 18 102.7 104.0 19 104.5 104.4 20 108.9 108.9 > print( predict( fitsurio5r2$eq[[ 1 ]] ) ) fit 1 97.8 2 100.6 3 100.4 4 100.8 5 101.7 6 101.8 7 102.5 8 103.7 9 100.8 10 98.9 11 94.6 12 94.8 13 96.8 14 98.9 15 102.9 16 103.3 17 101.4 18 102.7 19 104.5 20 108.9 > print( predict( fitsuri5r2 ) ) demand.pred supply.pred 1 97.8 94.6 2 99.8 97.1 3 99.7 97.2 4 99.9 98.0 5 102.1 96.5 6 101.9 97.4 7 102.3 98.8 8 102.7 99.5 9 101.6 97.3 10 100.6 97.2 11 96.0 97.5 12 95.0 100.3 13 96.2 102.0 14 99.1 102.0 15 103.9 101.7 16 103.6 102.0 17 104.2 99.4 18 101.9 104.6 19 103.3 106.9 20 106.2 110.4 > print( predict( fitsuri5r2$eq[[ 1 ]] ) ) fit 1 97.8 2 99.8 3 99.7 4 99.9 5 102.1 6 101.9 7 102.3 8 102.7 9 101.6 10 100.6 11 96.0 12 95.0 13 96.2 14 99.1 15 103.9 16 103.6 17 104.2 18 101.9 19 103.3 20 106.2 > > # predict just one observation > smallData <- data.frame( price = 130, income = 150, farmPrice = 120, + trend = 25 ) > > print( predict( fitsur1e2, newdata = smallData ) ) demand.pred supply.pred 1 108 115 > print( predict( fitsur1e2$eq[[ 1 ]], newdata = smallData ) ) fit 1 108 > > print( predict( fitsur2e, se.fit = TRUE, level = 0.9, + newdata = smallData ) ) demand.pred demand.se.fit supply.pred supply.se.fit 1 108 2.21 113 3 > print( predict( fitsur2e$eq[[ 1 ]], se.pred = TRUE, level = 0.99, + newdata = smallData ) ) fit se.pred 1 108 3.03 > > print( predict( fitsur3, interval = "prediction", level = 0.975, + newdata = smallData ) ) demand.pred demand.lwr demand.upr supply.pred supply.lwr supply.upr 1 108 100 115 113 103 123 > print( predict( fitsur3$eq[[ 1 ]], interval = "confidence", level = 0.8, + newdata = smallData ) ) fit lwr upr 1 108 105 111 > > print( predict( fitsur4r3, se.fit = TRUE, interval = "confidence", + level = 0.999, newdata = smallData ) ) demand.pred demand.se.fit demand.lwr demand.upr supply.pred supply.se.fit 1 111 2.06 103 118 119 2.22 supply.lwr supply.upr 1 111 127 > print( predict( fitsur4r3$eq[[ 2 ]], se.pred = TRUE, interval = "prediction", + level = 0.75, newdata = smallData ) ) fit se.pred lwr upr 1 119 3.41 115 123 > > print( predict( fitsur5, se.fit = TRUE, interval = "prediction", + newdata = smallData ) ) demand.pred demand.se.fit demand.lwr demand.upr supply.pred supply.se.fit 1 110 2.15 104 116 118 2.29 supply.lwr supply.upr 1 111 125 > print( predict( fitsur5$eq[[ 1 ]], se.pred = TRUE, interval = "confidence", + newdata = smallData ) ) fit se.pred lwr upr 1 110 2.9 105 114 > > print( predict( fitsurio5r2, se.fit = TRUE, se.pred = TRUE, + interval = "prediction", level = 0.5, newdata = smallData ) ) demand.pred demand.se.fit demand.se.pred demand.lwr demand.upr supply.pred 1 115 1.98 3.09 113 117 123 supply.se.fit supply.se.pred supply.lwr supply.upr 1 2.17 3.82 121 126 > print( predict( fitsurio5r2$eq[[ 1 ]], se.fit = TRUE, se.pred = TRUE, + interval = "confidence", level = 0.25, newdata = smallData ) ) fit se.fit se.pred lwr upr 1 115 1.98 3.09 114 115 > print( predict( fitsuri5r2, se.fit = TRUE, se.pred = TRUE, + interval = "prediction", level = 0.5, newdata = smallData ) ) demand.pred demand.se.fit demand.se.pred demand.lwr demand.upr supply.pred 1 109 2.35 3.06 107 111 113 supply.se.fit supply.se.pred supply.lwr supply.upr 1 3.91 6.87 108 117 > print( predict( fitsuri5r2$eq[[ 1 ]], se.fit = TRUE, se.pred = TRUE, + interval = "confidence", level = 0.25, newdata = smallData ) ) fit se.fit se.pred lwr upr 1 109 2.35 3.06 108 109 > > print( predict( fitsuri5wr2, se.fit = TRUE, se.pred = TRUE, + interval = "prediction", level = 0.5, newdata = smallData ) ) demand.pred demand.se.fit demand.se.pred demand.lwr demand.upr supply.pred 1 109 2.35 3.06 107 111 113 supply.se.fit supply.se.pred supply.lwr supply.upr 1 3.91 6.87 108 117 > print( predict( fitsuri5wr2$eq[[ 1 ]], se.fit = TRUE, se.pred = TRUE, + interval = "confidence", level = 0.25, newdata = smallData ) ) fit se.fit se.pred lwr upr 1 109 2.35 3.06 108 109 > > > ## ************ correlation of predicted values *************** > print( correlation.systemfit( fitsur1e2, 2, 1 ) ) [,1] [1,] 0.849 [2,] 0.856 [3,] 0.864 [4,] 0.882 [5,] 0.844 [6,] 0.861 [7,] 0.875 [8,] 0.877 [9,] 0.884 [10,] 0.918 [11,] 0.903 [12,] 0.884 [13,] 0.880 [14,] 0.863 [15,] 0.896 [16,] 0.897 [17,] 0.914 [18,] 0.839 [19,] 0.867 [20,] 0.902 > > print( correlation.systemfit( fitsur2e, 1, 2 ) ) [,1] [1,] 0.942 [2,] 0.944 [3,] 0.942 [4,] 0.941 [5,] 0.902 [6,] 0.909 [7,] 0.917 [8,] 0.903 [9,] 0.910 [10,] 0.941 [11,] 0.923 [12,] 0.902 [13,] 0.901 [14,] 0.893 [15,] 0.925 [16,] 0.952 [17,] 0.944 [18,] 0.935 [19,] 0.930 [20,] 0.938 > > print( correlation.systemfit( fitsur3, 2, 1 ) ) [,1] [1,] 0.939 [2,] 0.943 [3,] 0.941 [4,] 0.940 [5,] 0.902 [6,] 0.909 [7,] 0.918 [8,] 0.903 [9,] 0.910 [10,] 0.941 [11,] 0.922 [12,] 0.900 [13,] 0.899 [14,] 0.892 [15,] 0.923 [16,] 0.952 [17,] 0.943 [18,] 0.936 [19,] 0.929 [20,] 0.937 > > print( correlation.systemfit( fitsur3w, 2, 1 ) ) [,1] [1,] 0.940 [2,] 0.946 [3,] 0.944 [4,] 0.944 [5,] 0.908 [6,] 0.914 [7,] 0.922 [8,] 0.907 [9,] 0.914 [10,] 0.944 [11,] 0.926 [12,] 0.904 [13,] 0.903 [14,] 0.897 [15,] 0.926 [16,] 0.954 [17,] 0.946 [18,] 0.940 [19,] 0.932 [20,] 0.940 > > print( correlation.systemfit( fitsur4r3, 1, 2 ) ) [,1] [1,] 0.963 [2,] 0.971 [3,] 0.971 [4,] 0.973 [5,] 0.940 [6,] 0.944 [7,] 0.947 [8,] 0.942 [9,] 0.947 [10,] 0.973 [11,] 0.910 [12,] 0.858 [13,] 0.914 [14,] 0.923 [15,] 0.977 [16,] 0.964 [17,] 0.978 [18,] 0.969 [19,] 0.946 [20,] 0.941 > > print( correlation.systemfit( fitsur5, 2, 1 ) ) [,1] [1,] 0.938 [2,] 0.948 [3,] 0.948 [4,] 0.951 [5,] 0.892 [6,] 0.897 [7,] 0.903 [8,] 0.900 [9,] 0.907 [10,] 0.952 [11,] 0.853 [12,] 0.784 [13,] 0.858 [14,] 0.867 [15,] 0.961 [16,] 0.935 [17,] 0.961 [18,] 0.944 [19,] 0.907 [20,] 0.904 > > print( correlation.systemfit( fitsuri1r3, 1, 2 ) ) [,1] [1,] -0.662 [2,] -0.656 [3,] -0.664 [4,] -0.689 [5,] -0.629 [6,] -0.664 [7,] -0.696 [8,] -0.675 [9,] -0.722 [10,] -0.757 [11,] -0.759 [12,] -0.732 [13,] -0.710 [14,] -0.669 [15,] -0.728 [16,] -0.737 [17,] -0.741 [18,] -0.583 [19,] -0.684 [20,] -0.746 > > print( correlation.systemfit( fitsuri2, 2, 1 ) ) [,1] [1,] 0.360 [2,] 0.337 [3,] 0.337 [4,] 0.336 [5,] 0.286 [6,] 0.299 [7,] 0.317 [8,] 0.275 [9,] 0.322 [10,] 0.318 [11,] 0.334 [12,] 0.334 [13,] 0.318 [14,] 0.286 [15,] 0.358 [16,] 0.432 [17,] 0.367 [18,] 0.362 [19,] 0.333 [20,] 0.335 > > print( correlation.systemfit( fitsuri2w, 1, 2 ) ) [,1] [1,] 0.360 [2,] 0.337 [3,] 0.337 [4,] 0.336 [5,] 0.286 [6,] 0.299 [7,] 0.317 [8,] 0.275 [9,] 0.322 [10,] 0.318 [11,] 0.334 [12,] 0.334 [13,] 0.318 [14,] 0.286 [15,] 0.358 [16,] 0.432 [17,] 0.367 [18,] 0.362 [19,] 0.333 [20,] 0.335 > > print( correlation.systemfit( fitsuri3e, 1, 2 ) ) [,1] [1,] 0.368 [2,] 0.345 [3,] 0.344 [4,] 0.344 [5,] 0.292 [6,] 0.305 [7,] 0.323 [8,] 0.280 [9,] 0.329 [10,] 0.325 [11,] 0.340 [12,] 0.340 [13,] 0.324 [14,] 0.291 [15,] 0.366 [16,] 0.441 [17,] 0.375 [18,] 0.369 [19,] 0.340 [20,] 0.342 > > print( correlation.systemfit( fitsurio4, 2, 1 ) ) [,1] [1,] 0.961 [2,] 0.971 [3,] 0.971 [4,] 0.973 [5,] 0.940 [6,] 0.944 [7,] 0.947 [8,] 0.939 [9,] 0.947 [10,] 0.972 [11,] 0.904 [12,] 0.861 [13,] 0.917 [14,] 0.922 [15,] 0.976 [16,] 0.964 [17,] 0.978 [18,] 0.967 [19,] 0.942 [20,] 0.934 > print( correlation.systemfit( fitsuri4, 2, 1 ) ) [,1] [1,] 0.0384 [2,] 0.1213 [3,] 0.0975 [4,] 0.1381 [5,] 0.1295 [6,] 0.0937 [7,] 0.0630 [8,] 0.1056 [9,] 0.2180 [10,] 0.4042 [11,] 0.1074 [12,] 0.0337 [13,] 0.0760 [14,] 0.0701 [15,] 0.0680 [16,] 0.1263 [17,] 0.3859 [18,] 0.2715 [19,] 0.2850 [20,] 0.3967 > > print( correlation.systemfit( fitsurio5r2, 1, 2 ) ) [,1] [1,] 0.986 [2,] 0.991 [3,] 0.991 [4,] 0.991 [5,] 0.981 [6,] 0.983 [7,] 0.984 [8,] 0.980 [9,] 0.982 [10,] 0.991 [11,] 0.968 [12,] 0.947 [13,] 0.970 [14,] 0.975 [15,] 0.991 [16,] 0.989 [17,] 0.992 [18,] 0.990 [19,] 0.982 [20,] 0.978 > print( correlation.systemfit( fitsuri5r2, 1, 2 ) ) [,1] [1,] 0.0440 [2,] 0.1279 [3,] 0.1045 [4,] 0.1451 [5,] 0.1375 [6,] 0.1021 [7,] 0.0719 [8,] 0.1124 [9,] 0.2252 [10,] 0.4097 [11,] 0.1145 [12,] 0.0410 [13,] 0.0834 [14,] 0.0778 [15,] 0.0750 [16,] 0.1344 [17,] 0.3900 [18,] 0.2789 [19,] 0.2897 [20,] 0.4005 > > > ## ************ Log-Likelihood values *************** > print( logLik( fitsur1e2 ) ) 'log Lik.' -50.9 (df=10) > print( logLik( fitsur1e2, residCovDiag = TRUE ) ) 'log Lik.' -85.4 (df=10) > > print( logLik( fitsur2e ) ) 'log Lik.' -52 (df=9) > print( logLik( fitsur2e, residCovDiag = TRUE ) ) 'log Lik.' -86.5 (df=9) > > print( logLik( fitsur3 ) ) 'log Lik.' -52.2 (df=9) > print( logLik( fitsur3, residCovDiag = TRUE ) ) 'log Lik.' -86.4 (df=9) > > print( logLik( fitsur4r3 ) ) 'log Lik.' -58.4 (df=8) > print( logLik( fitsur4r3, residCovDiag = TRUE ) ) 'log Lik.' -85.5 (df=8) > > print( logLik( fitsur5 ) ) 'log Lik.' -58.5 (df=8) > print( logLik( fitsur5, residCovDiag = TRUE ) ) 'log Lik.' -84.6 (df=8) > > print( logLik( fitsur5w ) ) 'log Lik.' -58.5 (df=8) > print( logLik( fitsur5w, residCovDiag = TRUE ) ) 'log Lik.' -84.7 (df=8) > > print( logLik( fitsuri1r3 ) ) 'log Lik.' -67.8 (df=10) > print( logLik( fitsuri1r3, residCovDiag = TRUE ) ) 'log Lik.' -76.2 (df=10) > > print( logLik( fitsuri2 ) ) 'log Lik.' -99.9 (df=9) > print( logLik( fitsuri2, residCovDiag = TRUE ) ) 'log Lik.' -101 (df=9) > > print( logLik( fitsuri3e ) ) 'log Lik.' -99.9 (df=9) > print( logLik( fitsuri3e, residCovDiag = TRUE ) ) 'log Lik.' -102 (df=9) > > print( logLik( fitsurio4 ) ) 'log Lik.' -58.5 (df=8) > print( logLik( fitsurio4, residCovDiag = TRUE ) ) 'log Lik.' -85.9 (df=8) > > print( logLik( fitsuri4 ) ) 'log Lik.' -101 (df=8) > print( logLik( fitsuri4, residCovDiag = TRUE ) ) 'log Lik.' -101 (df=8) > > print( logLik( fitsuri4w ) ) 'log Lik.' -101 (df=8) > print( logLik( fitsuri4w, residCovDiag = TRUE ) ) 'log Lik.' -101 (df=8) > > print( logLik( fitsurio5r2 ) ) 'log Lik.' -59.8 (df=8) > print( logLik( fitsurio5r2, residCovDiag = TRUE ) ) 'log Lik.' -93.1 (df=8) > > print( logLik( fitsuri5r2 ) ) 'log Lik.' -101 (df=8) > print( logLik( fitsuri5r2, residCovDiag = TRUE ) ) 'log Lik.' -101 (df=8) > > > ## *********** likelihood ratio tests ************* > # testing first restriction > # non-iterating, methodResidCov = 1 > print( lrtest( fitsur2, fitsur1 ) ) Likelihood ratio test Model 1: fitsur2 Model 2: fitsur1 #Df LogLik Df Chisq Pr(>Chisq) 1 9 -52.2 2 10 -51.6 1 1.19 0.28 > print( lrtest( fitsur3, fitsur1 ) ) Likelihood ratio test Model 1: fitsur3 Model 2: fitsur1 #Df LogLik Df Chisq Pr(>Chisq) 1 9 -52.2 2 10 -51.6 1 1.19 0.28 > # non-iterating, methodResidCov = 0 > print( lrtest( fitsur2e, fitsur1e ) ) Likelihood ratio test Model 1: fitsur2e Model 2: fitsur1e #Df LogLik Df Chisq Pr(>Chisq) 1 9 -52.0 2 10 -51.6 1 0.7 0.4 > print( lrtest( fitsur3e, fitsur1e ) ) Likelihood ratio test Model 1: fitsur3e Model 2: fitsur1e #Df LogLik Df Chisq Pr(>Chisq) 1 9 -52.0 2 10 -51.6 1 0.7 0.4 > # iterating, methodResidCov = 1 > print( lrtest( fitsuri2, fitsuri1 ) ) Likelihood ratio test Model 1: fitsuri2 Model 2: fitsuri1 #Df LogLik Df Chisq Pr(>Chisq) 1 9 -99.9 2 10 -67.8 1 64.3 1.1e-15 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 > print( lrtest( fitsuri3, fitsuri1 ) ) Likelihood ratio test Model 1: fitsuri3 Model 2: fitsuri1 #Df LogLik Df Chisq Pr(>Chisq) 1 9 -99.9 2 10 -67.8 1 64.3 1.1e-15 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 > # iterating, methodResidCov = 0 > print( lrtest( fitsuri2e, fitsuri1e ) ) Likelihood ratio test Model 1: fitsuri2e Model 2: fitsuri1e #Df LogLik Df Chisq Pr(>Chisq) 1 9 -99.9 2 10 -67.8 1 64.3 1.1e-15 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 > print( lrtest( fitsuri3e, fitsuri1e ) ) Likelihood ratio test Model 1: fitsuri3e Model 2: fitsuri1e #Df LogLik Df Chisq Pr(>Chisq) 1 9 -99.9 2 10 -67.8 1 64.3 1.1e-15 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 > # non-iterating, methodResidCov = 1, WSUR > print( lrtest( fitsur3w, fitsur1w ) ) Likelihood ratio test Model 1: fitsur3w Model 2: fitsur1w #Df LogLik Df Chisq Pr(>Chisq) 1 9 -52.1 2 10 -51.6 1 0.87 0.35 > > # testing second restriction > # non-iterating, methodResidCov = 1 > print( lrtest( fitsur4, fitsur2 ) ) Likelihood ratio test Model 1: fitsur4 Model 2: fitsur2 #Df LogLik Df Chisq Pr(>Chisq) 1 8 -58.5 2 9 -52.2 1 12.7 0.00037 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 > print( lrtest( fitsur4, fitsur3 ) ) Likelihood ratio test Model 1: fitsur4 Model 2: fitsur3 #Df LogLik Df Chisq Pr(>Chisq) 1 8 -58.5 2 9 -52.2 1 12.7 0.00037 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 > print( lrtest( fitsur5, fitsur2 ) ) Likelihood ratio test Model 1: fitsur5 Model 2: fitsur2 #Df LogLik Df Chisq Pr(>Chisq) 1 8 -58.5 2 9 -52.2 1 12.7 0.00037 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 > print( lrtest( fitsur5, fitsur3 ) ) Likelihood ratio test Model 1: fitsur5 Model 2: fitsur3 #Df LogLik Df Chisq Pr(>Chisq) 1 8 -58.5 2 9 -52.2 1 12.7 0.00037 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 > # non-iterating, methodResidCov = 0 > print( lrtest( fitsur4e, fitsur2e ) ) Likelihood ratio test Model 1: fitsur4e Model 2: fitsur2e #Df LogLik Df Chisq Pr(>Chisq) 1 8 -58.6 2 9 -52.0 1 13.2 0.00028 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 > print( lrtest( fitsur4e, fitsur3e ) ) Likelihood ratio test Model 1: fitsur4e Model 2: fitsur3e #Df LogLik Df Chisq Pr(>Chisq) 1 8 -58.6 2 9 -52.0 1 13.2 0.00028 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 > print( lrtest( fitsur5e, fitsur2e ) ) Likelihood ratio test Model 1: fitsur5e Model 2: fitsur2e #Df LogLik Df Chisq Pr(>Chisq) 1 8 -58.6 2 9 -52.0 1 13.2 0.00028 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 > print( lrtest( fitsur5e, fitsur3e ) ) Likelihood ratio test Model 1: fitsur5e Model 2: fitsur3e #Df LogLik Df Chisq Pr(>Chisq) 1 8 -58.6 2 9 -52.0 1 13.2 0.00028 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 > # iterating, methodResidCov = 1 > print( lrtest( fitsurio4, fitsuri2 ) ) Likelihood ratio test Model 1: fitsurio4 Model 2: fitsuri2 #Df LogLik Df Chisq Pr(>Chisq) 1 8 -58.5 2 9 -99.9 1 82.9 <2e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Warning message: In lrtest.systemfit(fitsurio4, fitsuri2) : model '2' has a smaller log-likelihood value than the more restricted model '1' > print( lrtest( fitsurio4, fitsuri3 ) ) Likelihood ratio test Model 1: fitsurio4 Model 2: fitsuri3 #Df LogLik Df Chisq Pr(>Chisq) 1 8 -58.5 2 9 -99.9 1 82.9 <2e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Warning message: In lrtest.systemfit(fitsurio4, fitsuri3) : model '2' has a smaller log-likelihood value than the more restricted model '1' > print( lrtest( fitsurio5, fitsuri2 ) ) Likelihood ratio test Model 1: fitsurio5 Model 2: fitsuri2 #Df LogLik Df Chisq Pr(>Chisq) 1 8 -58.5 2 9 -99.9 1 82.9 <2e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Warning message: In lrtest.systemfit(fitsurio5, fitsuri2) : model '2' has a smaller log-likelihood value than the more restricted model '1' > print( lrtest( fitsurio5, fitsuri3 ) ) Likelihood ratio test Model 1: fitsurio5 Model 2: fitsuri3 #Df LogLik Df Chisq Pr(>Chisq) 1 8 -58.5 2 9 -99.9 1 82.9 <2e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Warning message: In lrtest.systemfit(fitsurio5, fitsuri3) : model '2' has a smaller log-likelihood value than the more restricted model '1' > # corrected > print( lrtest( fitsuri2, fitsuri4 ) ) Likelihood ratio test Model 1: fitsuri2 Model 2: fitsuri4 #Df LogLik Df Chisq Pr(>Chisq) 1 9 -99.9 2 8 -100.9 -1 1.9 0.17 > print( lrtest( fitsuri3, fitsuri4 ) ) Likelihood ratio test Model 1: fitsuri3 Model 2: fitsuri4 #Df LogLik Df Chisq Pr(>Chisq) 1 9 -99.9 2 8 -100.9 -1 1.9 0.17 > print( lrtest( fitsuri2, fitsuri5 ) ) Likelihood ratio test Model 1: fitsuri2 Model 2: fitsuri5 #Df LogLik Df Chisq Pr(>Chisq) 1 9 -99.9 2 8 -100.9 -1 1.9 0.17 > print( lrtest( fitsuri3, fitsuri5 ) ) Likelihood ratio test Model 1: fitsuri3 Model 2: fitsuri5 #Df LogLik Df Chisq Pr(>Chisq) 1 9 -99.9 2 8 -100.9 -1 1.9 0.17 > > # iterating, methodResidCov = 0 > print( lrtest( fitsurio4e, fitsuri2e ) ) Likelihood ratio test Model 1: fitsurio4e Model 2: fitsuri2e #Df LogLik Df Chisq Pr(>Chisq) 1 8 -58.4 2 9 -99.9 1 83 <2e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Warning message: In lrtest.systemfit(fitsurio4e, fitsuri2e) : model '2' has a smaller log-likelihood value than the more restricted model '1' > print( lrtest( fitsurio4e, fitsuri3e ) ) Likelihood ratio test Model 1: fitsurio4e Model 2: fitsuri3e #Df LogLik Df Chisq Pr(>Chisq) 1 8 -58.4 2 9 -99.9 1 83 <2e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Warning message: In lrtest.systemfit(fitsurio4e, fitsuri3e) : model '2' has a smaller log-likelihood value than the more restricted model '1' > print( lrtest( fitsurio5e, fitsuri2e ) ) Likelihood ratio test Model 1: fitsurio5e Model 2: fitsuri2e #Df LogLik Df Chisq Pr(>Chisq) 1 8 -58.4 2 9 -99.9 1 83 <2e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Warning message: In lrtest.systemfit(fitsurio5e, fitsuri2e) : model '2' has a smaller log-likelihood value than the more restricted model '1' > print( lrtest( fitsurio5e, fitsuri3e ) ) Likelihood ratio test Model 1: fitsurio5e Model 2: fitsuri3e #Df LogLik Df Chisq Pr(>Chisq) 1 8 -58.4 2 9 -99.9 1 83 <2e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Warning message: In lrtest.systemfit(fitsurio5e, fitsuri3e) : model '2' has a smaller log-likelihood value than the more restricted model '1' > # corrected > print( lrtest( fitsuri2e, fitsuri4e ) ) Likelihood ratio test Model 1: fitsuri2e Model 2: fitsuri4e #Df LogLik Df Chisq Pr(>Chisq) 1 9 -99.9 2 8 -100.9 -1 1.9 0.17 > print( lrtest( fitsuri3e, fitsuri4e ) ) Likelihood ratio test Model 1: fitsuri3e Model 2: fitsuri4e #Df LogLik Df Chisq Pr(>Chisq) 1 9 -99.9 2 8 -100.9 -1 1.9 0.17 > print( lrtest( fitsuri2e, fitsuri5e ) ) Likelihood ratio test Model 1: fitsuri2e Model 2: fitsuri5e #Df LogLik Df Chisq Pr(>Chisq) 1 9 -99.9 2 8 -100.9 -1 1.9 0.17 > print( lrtest( fitsuri3e, fitsuri5e ) ) Likelihood ratio test Model 1: fitsuri3e Model 2: fitsuri5e #Df LogLik Df Chisq Pr(>Chisq) 1 9 -99.9 2 8 -100.9 -1 1.9 0.17 > > # non-iterating, methodResidCov = 0, WSUR > print( lrtest( fitsur4we, fitsur2we ) ) Likelihood ratio test Model 1: fitsur4we Model 2: fitsur2we #Df LogLik Df Chisq Pr(>Chisq) 1 8 -58.6 2 9 -51.8 1 13.5 0.00024 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 > > # iterating, methodResidCov = 1, WSUR > print( lrtest( fitsuri2w, fitsuri4w ) ) Likelihood ratio test Model 1: fitsuri2w Model 2: fitsuri4w #Df LogLik Df Chisq Pr(>Chisq) 1 9 -99.9 2 8 -100.9 -1 1.9 0.17 > > # testing both of the restrictions > # non-iterating, methodResidCov = 1 > print( lrtest( fitsur4, fitsur1 ) ) Likelihood ratio test Model 1: fitsur4 Model 2: fitsur1 #Df LogLik Df Chisq Pr(>Chisq) 1 8 -58.5 2 10 -51.6 2 13.8 0.00098 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 > print( lrtest( fitsur5, fitsur1 ) ) Likelihood ratio test Model 1: fitsur5 Model 2: fitsur1 #Df LogLik Df Chisq Pr(>Chisq) 1 8 -58.5 2 10 -51.6 2 13.8 0.00098 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 > # non-iterating, methodResidCov = 0 > print( lrtest( fitsur4e, fitsur1e ) ) Likelihood ratio test Model 1: fitsur4e Model 2: fitsur1e #Df LogLik Df Chisq Pr(>Chisq) 1 8 -58.6 2 10 -51.6 2 13.9 0.00095 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 > print( lrtest( fitsur5e, fitsur1e ) ) Likelihood ratio test Model 1: fitsur5e Model 2: fitsur1e #Df LogLik Df Chisq Pr(>Chisq) 1 8 -58.6 2 10 -51.6 2 13.9 0.00095 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 > # iterating, methodResidCov = 1 > print( lrtest( fitsurio4, fitsuri1 ) ) Likelihood ratio test Model 1: fitsurio4 Model 2: fitsuri1 #Df LogLik Df Chisq Pr(>Chisq) 1 8 -58.5 2 10 -67.8 2 18.6 9e-05 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Warning message: In lrtest.systemfit(fitsurio4, fitsuri1) : model '2' has a smaller log-likelihood value than the more restricted model '1' > print( lrtest( fitsurio5, fitsuri1 ) ) Likelihood ratio test Model 1: fitsurio5 Model 2: fitsuri1 #Df LogLik Df Chisq Pr(>Chisq) 1 8 -58.5 2 10 -67.8 2 18.6 9e-05 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Warning message: In lrtest.systemfit(fitsurio5, fitsuri1) : model '2' has a smaller log-likelihood value than the more restricted model '1' > # corrected > print( lrtest( fitsuri1, fitsuri4 ) ) Likelihood ratio test Model 1: fitsuri1 Model 2: fitsuri4 #Df LogLik Df Chisq Pr(>Chisq) 1 10 -67.8 2 8 -100.9 -2 66.2 4.2e-15 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 > print( lrtest( fitsuri1, fitsuri5 ) ) Likelihood ratio test Model 1: fitsuri1 Model 2: fitsuri5 #Df LogLik Df Chisq Pr(>Chisq) 1 10 -67.8 2 8 -100.9 -2 66.2 4.2e-15 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 > # iterating, methodResidCov = 0 > print( lrtest( fitsurio4e, fitsuri1e ) ) Likelihood ratio test Model 1: fitsurio4e Model 2: fitsuri1e #Df LogLik Df Chisq Pr(>Chisq) 1 8 -58.4 2 10 -67.8 2 18.7 8.9e-05 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Warning message: In lrtest.systemfit(fitsurio4e, fitsuri1e) : model '2' has a smaller log-likelihood value than the more restricted model '1' > print( lrtest( fitsurio5e, fitsuri1e ) ) Likelihood ratio test Model 1: fitsurio5e Model 2: fitsuri1e #Df LogLik Df Chisq Pr(>Chisq) 1 8 -58.4 2 10 -67.8 2 18.7 8.9e-05 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Warning message: In lrtest.systemfit(fitsurio5e, fitsuri1e) : model '2' has a smaller log-likelihood value than the more restricted model '1' > # corrected > print( lrtest( fitsuri1e, fitsuri4e ) ) Likelihood ratio test Model 1: fitsuri1e Model 2: fitsuri4e #Df LogLik Df Chisq Pr(>Chisq) 1 10 -67.8 2 8 -100.9 -2 66.2 4.2e-15 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 > print( lrtest( fitsuri1e, fitsuri5e ) ) Likelihood ratio test Model 1: fitsuri1e Model 2: fitsuri5e #Df LogLik Df Chisq Pr(>Chisq) 1 10 -67.8 2 8 -100.9 -2 66.2 4.2e-15 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 > # non-iterating, methodResidCov = 1, WSUR > print( lrtest( fitsur5w, fitsur1w ) ) Likelihood ratio test Model 1: fitsur5w Model 2: fitsur1w #Df LogLik Df Chisq Pr(>Chisq) 1 8 -58.5 2 10 -51.6 2 13.8 0.001 ** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 > > # testing the two restrictions with one call > # non-iterating, methodResidCov = 1 > print( lrtest( fitsur4, fitsur2, fitsur1 ) ) Likelihood ratio test Model 1: fitsur4 Model 2: fitsur2 Model 3: fitsur1 #Df LogLik Df Chisq Pr(>Chisq) 1 8 -58.5 2 9 -52.2 1 12.66 0.00037 *** 3 10 -51.6 1 1.19 0.27520 --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 > print( lrtest( fitsur5, fitsur3, fitsur1 ) ) Likelihood ratio test Model 1: fitsur5 Model 2: fitsur3 Model 3: fitsur1 #Df LogLik Df Chisq Pr(>Chisq) 1 8 -58.5 2 9 -52.2 1 12.66 0.00037 *** 3 10 -51.6 1 1.19 0.27520 --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 > print( lrtest( fitsur1, fitsur3, fitsur5 ) ) Likelihood ratio test Model 1: fitsur1 Model 2: fitsur3 Model 3: fitsur5 #Df LogLik Df Chisq Pr(>Chisq) 1 10 -51.6 2 9 -52.2 -1 1.19 0.27520 3 8 -58.5 -1 12.66 0.00037 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 > print( lrtest( object = fitsur5, fitsur3, fitsur1 ) ) Likelihood ratio test Model 1: fitsur5 Model 2: fitsur3 Model 3: fitsur1 #Df LogLik Df Chisq Pr(>Chisq) 1 8 -58.5 2 9 -52.2 1 12.66 0.00037 *** 3 10 -51.6 1 1.19 0.27520 --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 > print( lrtest( fitsur3, object = fitsur5, fitsur1 ) ) Likelihood ratio test Model 1: fitsur5 Model 2: fitsur3 Model 3: fitsur1 #Df LogLik Df Chisq Pr(>Chisq) 1 8 -58.5 2 9 -52.2 1 12.66 0.00037 *** 3 10 -51.6 1 1.19 0.27520 --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 > print( lrtest( fitsur3, fitsur1, object = fitsur5 ) ) Likelihood ratio test Model 1: fitsur5 Model 2: fitsur3 Model 3: fitsur1 #Df LogLik Df Chisq Pr(>Chisq) 1 8 -58.5 2 9 -52.2 1 12.66 0.00037 *** 3 10 -51.6 1 1.19 0.27520 --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 > # iterating, methodResidCov = 0 > print( lrtest( fitsuri4e, fitsuri2e, fitsuri1e ) ) Likelihood ratio test Model 1: fitsuri4e Model 2: fitsuri2e Model 3: fitsuri1e #Df LogLik Df Chisq Pr(>Chisq) 1 8 -100.9 2 9 -99.9 1 1.9 0.17 3 10 -67.8 1 64.3 1.1e-15 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 > print( lrtest( fitsuri5e, fitsuri3e, fitsuri1e ) ) Likelihood ratio test Model 1: fitsuri5e Model 2: fitsuri3e Model 3: fitsuri1e #Df LogLik Df Chisq Pr(>Chisq) 1 8 -100.9 2 9 -99.9 1 1.9 0.17 3 10 -67.8 1 64.3 1.1e-15 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 > > ## ************** F tests **************** > # testing first restriction > print( linearHypothesis( fitsur1, restrm ) ) Linear hypothesis test (Theil's F test) Hypothesis: demand_income - supply_trend = 0 Model 1: restricted model Model 2: fitsur1 Res.Df Df F Pr(>F) 1 34 2 33 1 1.24 0.27 > linearHypothesis( fitsur1, restrict ) Linear hypothesis test (Theil's F test) Hypothesis: demand_income - supply_trend = 0 Model 1: restricted model Model 2: fitsur1 Res.Df Df F Pr(>F) 1 34 2 33 1 1.24 0.27 > > print( linearHypothesis( fitsur1r2, restrm ) ) Linear hypothesis test (Theil's F test) Hypothesis: demand_income - supply_trend = 0 Model 1: restricted model Model 2: fitsur1r2 Res.Df Df F Pr(>F) 1 34 2 33 1 1.65 0.21 > linearHypothesis( fitsur1r2, restrict ) Linear hypothesis test (Theil's F test) Hypothesis: demand_income - supply_trend = 0 Model 1: restricted model Model 2: fitsur1r2 Res.Df Df F Pr(>F) 1 34 2 33 1 1.65 0.21 > > print( linearHypothesis( fitsuri1e2, restrm ) ) Linear hypothesis test (Theil's F test) Hypothesis: demand_income - supply_trend = 0 Model 1: restricted model Model 2: fitsuri1e2 Res.Df Df F Pr(>F) 1 34 2 33 1 140 2.1e-13 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 > linearHypothesis( fitsuri1e2, restrict ) Linear hypothesis test (Theil's F test) Hypothesis: demand_income - supply_trend = 0 Model 1: restricted model Model 2: fitsuri1e2 Res.Df Df F Pr(>F) 1 34 2 33 1 140 2.1e-13 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 > > print( linearHypothesis( fitsuri1r3, restrm ) ) Linear hypothesis test (Theil's F test) Hypothesis: demand_income - supply_trend = 0 Model 1: restricted model Model 2: fitsuri1r3 Res.Df Df F Pr(>F) 1 34 2 33 1 141 1.9e-13 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 > linearHypothesis( fitsuri1r3, restrict ) Linear hypothesis test (Theil's F test) Hypothesis: demand_income - supply_trend = 0 Model 1: restricted model Model 2: fitsuri1r3 Res.Df Df F Pr(>F) 1 34 2 33 1 141 1.9e-13 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 > > print( linearHypothesis( fitsur1we2, restrm ) ) Linear hypothesis test (Theil's F test) Hypothesis: demand_income - supply_trend = 0 Model 1: restricted model Model 2: fitsur1we2 Res.Df Df F Pr(>F) 1 34 2 33 1 1.65 0.21 > linearHypothesis( fitsur1we2, restrict ) Linear hypothesis test (Theil's F test) Hypothesis: demand_income - supply_trend = 0 Model 1: restricted model Model 2: fitsur1we2 Res.Df Df F Pr(>F) 1 34 2 33 1 1.65 0.21 > > print( linearHypothesis( fitsuri1wr3, restrm ) ) Linear hypothesis test (Theil's F test) Hypothesis: demand_income - supply_trend = 0 Model 1: restricted model Model 2: fitsuri1wr3 Res.Df Df F Pr(>F) 1 34 2 33 1 141 1.9e-13 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 > linearHypothesis( fitsuri1wr3, restrict ) Linear hypothesis test (Theil's F test) Hypothesis: demand_income - supply_trend = 0 Model 1: restricted model Model 2: fitsuri1wr3 Res.Df Df F Pr(>F) 1 34 2 33 1 141 1.9e-13 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 > > # testing second restriction > restrOnly2m <- matrix(0,1,7) > restrOnly2q <- 0.5 > restrOnly2m[1,2] <- -1 > restrOnly2m[1,5] <- 1 > restrictOnly2 <- "- demand_price + supply_price = 0.5" > restrictOnly2i <- "- demand_price + supply_income = 0.5" > # first restriction not imposed > print( linearHypothesis( fitsur1e2, restrOnly2m, restrOnly2q ) ) Linear hypothesis test (Theil's F test) Hypothesis: - demand_price + supply_price = 0.5 Model 1: restricted model Model 2: fitsur1e2 Res.Df Df F Pr(>F) 1 34 2 33 1 2.36 0.13 > linearHypothesis( fitsur1e2, restrictOnly2 ) Linear hypothesis test (Theil's F test) Hypothesis: - demand_price + supply_price = 0.5 Model 1: restricted model Model 2: fitsur1e2 Res.Df Df F Pr(>F) 1 34 2 33 1 2.36 0.13 > > print( linearHypothesis( fitsuri1, restrOnly2m, restrOnly2q ) ) Linear hypothesis test (Theil's F test) Hypothesis: - demand_price + supply_income = 0.5 Model 1: restricted model Model 2: fitsuri1 Res.Df Df F Pr(>F) 1 34 2 33 1 12.2 0.0014 ** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 > linearHypothesis( fitsuri1, restrictOnly2i ) Linear hypothesis test (Theil's F test) Hypothesis: - demand_price + supply_income = 0.5 Model 1: restricted model Model 2: fitsuri1 Res.Df Df F Pr(>F) 1 34 2 33 1 12.2 0.0014 ** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 > > # first restriction imposed > print( linearHypothesis( fitsur2, restrOnly2m, restrOnly2q ) ) Linear hypothesis test (Theil's F test) Hypothesis: - demand_price + supply_price = 0.5 Model 1: restricted model Model 2: fitsur2 Res.Df Df F Pr(>F) 1 35 2 34 1 5.5 0.025 * --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 > linearHypothesis( fitsur2, restrictOnly2 ) Linear hypothesis test (Theil's F test) Hypothesis: - demand_price + supply_price = 0.5 Model 1: restricted model Model 2: fitsur2 Res.Df Df F Pr(>F) 1 35 2 34 1 5.5 0.025 * --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 > > print( linearHypothesis( fitsur3, restrOnly2m, restrOnly2q ) ) Linear hypothesis test (Theil's F test) Hypothesis: - demand_price + supply_price = 0.5 Model 1: restricted model Model 2: fitsur3 Res.Df Df F Pr(>F) 1 35 2 34 1 5.5 0.025 * --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 > linearHypothesis( fitsur3, restrictOnly2 ) Linear hypothesis test (Theil's F test) Hypothesis: - demand_price + supply_price = 0.5 Model 1: restricted model Model 2: fitsur3 Res.Df Df F Pr(>F) 1 35 2 34 1 5.5 0.025 * --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 > > print( linearHypothesis( fitsuri2e, restrOnly2m, restrOnly2q ) ) Linear hypothesis test (Theil's F test) Hypothesis: - demand_price + supply_income = 0.5 Model 1: restricted model Model 2: fitsuri2e Res.Df Df F Pr(>F) 1 35 2 34 1 2.35 0.13 > linearHypothesis( fitsuri2e, restrictOnly2i ) Linear hypothesis test (Theil's F test) Hypothesis: - demand_price + supply_income = 0.5 Model 1: restricted model Model 2: fitsuri2e Res.Df Df F Pr(>F) 1 35 2 34 1 2.35 0.13 > > print( linearHypothesis( fitsuri3e, restrOnly2m, restrOnly2q ) ) Linear hypothesis test (Theil's F test) Hypothesis: - demand_price + supply_income = 0.5 Model 1: restricted model Model 2: fitsuri3e Res.Df Df F Pr(>F) 1 35 2 34 1 2.35 0.13 > linearHypothesis( fitsuri3e, restrictOnly2i ) Linear hypothesis test (Theil's F test) Hypothesis: - demand_price + supply_income = 0.5 Model 1: restricted model Model 2: fitsuri3e Res.Df Df F Pr(>F) 1 35 2 34 1 2.35 0.13 > > print( linearHypothesis( fitsur2we, restrOnly2m, restrOnly2q ) ) Linear hypothesis test (Theil's F test) Hypothesis: - demand_price + supply_price = 0.5 Model 1: restricted model Model 2: fitsur2we Res.Df Df F Pr(>F) 1 35 2 34 1 6.26 0.017 * --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 > linearHypothesis( fitsur2we, restrictOnly2 ) Linear hypothesis test (Theil's F test) Hypothesis: - demand_price + supply_price = 0.5 Model 1: restricted model Model 2: fitsur2we Res.Df Df F Pr(>F) 1 35 2 34 1 6.26 0.017 * --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 > > print( linearHypothesis( fitsuri3we, restrOnly2m, restrOnly2q ) ) Linear hypothesis test (Theil's F test) Hypothesis: - demand_price + supply_income = 0.5 Model 1: restricted model Model 2: fitsuri3we Res.Df Df F Pr(>F) 1 35 2 34 1 2.35 0.13 > linearHypothesis( fitsuri3we, restrictOnly2i ) Linear hypothesis test (Theil's F test) Hypothesis: - demand_price + supply_income = 0.5 Model 1: restricted model Model 2: fitsuri3we Res.Df Df F Pr(>F) 1 35 2 34 1 2.35 0.13 > > # testing both of the restrictions > print( linearHypothesis( fitsur1r3, restr2m, restr2q ) ) Linear hypothesis test (Theil's F test) Hypothesis: demand_income - supply_trend = 0 - demand_price + supply_price = 0.5 Model 1: restricted model Model 2: fitsur1r3 Res.Df Df F Pr(>F) 1 35 2 33 2 2.6 0.089 . --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 > linearHypothesis( fitsur1r3, restrict2 ) Linear hypothesis test (Theil's F test) Hypothesis: demand_income - supply_trend = 0 - demand_price + supply_price = 0.5 Model 1: restricted model Model 2: fitsur1r3 Res.Df Df F Pr(>F) 1 35 2 33 2 2.6 0.089 . --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 > > print( linearHypothesis( fitsuri1e2, restr2m, restr2q ) ) Linear hypothesis test (Theil's F test) Hypothesis: demand_income - supply_trend = 0 - demand_price + supply_income = 0.5 Model 1: restricted model Model 2: fitsuri1e2 Res.Df Df F Pr(>F) 1 35 2 33 2 89.1 5e-14 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 > linearHypothesis( fitsuri1e2, restrict2i ) Linear hypothesis test (Theil's F test) Hypothesis: demand_income - supply_trend = 0 - demand_price + supply_income = 0.5 Model 1: restricted model Model 2: fitsuri1e2 Res.Df Df F Pr(>F) 1 35 2 33 2 89.1 5e-14 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 > > print( linearHypothesis( fitsur1w, restr2m, restr2q ) ) Linear hypothesis test (Theil's F test) Hypothesis: demand_income - supply_trend = 0 - demand_price + supply_price = 0.5 Model 1: restricted model Model 2: fitsur1w Res.Df Df F Pr(>F) 1 35 2 33 2 1.8 0.18 > linearHypothesis( fitsur1w, restrict2 ) Linear hypothesis test (Theil's F test) Hypothesis: demand_income - supply_trend = 0 - demand_price + supply_price = 0.5 Model 1: restricted model Model 2: fitsur1w Res.Df Df F Pr(>F) 1 35 2 33 2 1.8 0.18 > > print( linearHypothesis( fitsuri1wr3, restr2m, restr2q ) ) Linear hypothesis test (Theil's F test) Hypothesis: demand_income - supply_trend = 0 - demand_price + supply_income = 0.5 Model 1: restricted model Model 2: fitsuri1wr3 Res.Df Df F Pr(>F) 1 35 2 33 2 89.6 4.6e-14 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 > linearHypothesis( fitsuri1wr3, restrict2i ) Linear hypothesis test (Theil's F test) Hypothesis: demand_income - supply_trend = 0 - demand_price + supply_income = 0.5 Model 1: restricted model Model 2: fitsuri1wr3 Res.Df Df F Pr(>F) 1 35 2 33 2 89.6 4.6e-14 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 > > > ## ************** Wald tests **************** > # testing first restriction > print( linearHypothesis( fitsur1, restrm, test = "Chisq" ) ) Linear hypothesis test (Chi^2 statistic of a Wald test) Hypothesis: demand_income - supply_trend = 0 Model 1: restricted model Model 2: fitsur1 Res.Df Df Chisq Pr(>Chisq) 1 34 2 33 1 0.81 0.37 > linearHypothesis( fitsur1, restrict, test = "Chisq" ) Linear hypothesis test (Chi^2 statistic of a Wald test) Hypothesis: demand_income - supply_trend = 0 Model 1: restricted model Model 2: fitsur1 Res.Df Df Chisq Pr(>Chisq) 1 34 2 33 1 0.81 0.37 > > print( linearHypothesis( fitsur1r2, restrm, test = "Chisq" ) ) Linear hypothesis test (Chi^2 statistic of a Wald test) Hypothesis: demand_income - supply_trend = 0 Model 1: restricted model Model 2: fitsur1r2 Res.Df Df Chisq Pr(>Chisq) 1 34 2 33 1 1.12 0.29 > linearHypothesis( fitsur1r2, restrict, test = "Chisq" ) Linear hypothesis test (Chi^2 statistic of a Wald test) Hypothesis: demand_income - supply_trend = 0 Model 1: restricted model Model 2: fitsur1r2 Res.Df Df Chisq Pr(>Chisq) 1 34 2 33 1 1.12 0.29 > > print( linearHypothesis( fitsuri1e2, restrm, test = "Chisq" ) ) Linear hypothesis test (Chi^2 statistic of a Wald test) Hypothesis: demand_income - supply_trend = 0 Model 1: restricted model Model 2: fitsuri1e2 Res.Df Df Chisq Pr(>Chisq) 1 34 2 33 1 147 <2e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 > linearHypothesis( fitsuri1e2, restrict, test = "Chisq" ) Linear hypothesis test (Chi^2 statistic of a Wald test) Hypothesis: demand_income - supply_trend = 0 Model 1: restricted model Model 2: fitsuri1e2 Res.Df Df Chisq Pr(>Chisq) 1 34 2 33 1 147 <2e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 > > print( linearHypothesis( fitsuri1r3, restrm, test = "Chisq" ) ) Linear hypothesis test (Chi^2 statistic of a Wald test) Hypothesis: demand_income - supply_trend = 0 Model 1: restricted model Model 2: fitsuri1r3 Res.Df Df Chisq Pr(>Chisq) 1 34 2 33 1 147 <2e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 > linearHypothesis( fitsuri1r3, restrict, test = "Chisq" ) Linear hypothesis test (Chi^2 statistic of a Wald test) Hypothesis: demand_income - supply_trend = 0 Model 1: restricted model Model 2: fitsuri1r3 Res.Df Df Chisq Pr(>Chisq) 1 34 2 33 1 147 <2e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 > > print( linearHypothesis( fitsur1w, restrm, test = "Chisq" ) ) Linear hypothesis test (Chi^2 statistic of a Wald test) Hypothesis: demand_income - supply_trend = 0 Model 1: restricted model Model 2: fitsur1w Res.Df Df Chisq Pr(>Chisq) 1 34 2 33 1 0.81 0.37 > linearHypothesis( fitsur1w, restrict, test = "Chisq" ) Linear hypothesis test (Chi^2 statistic of a Wald test) Hypothesis: demand_income - supply_trend = 0 Model 1: restricted model Model 2: fitsur1w Res.Df Df Chisq Pr(>Chisq) 1 34 2 33 1 0.81 0.37 > > # testing second restriction > # first restriction not imposed > print( linearHypothesis( fitsur1e2, restrOnly2m, restrOnly2q, test = "Chisq" ) ) Linear hypothesis test (Chi^2 statistic of a Wald test) Hypothesis: - demand_price + supply_price = 0.5 Model 1: restricted model Model 2: fitsur1e2 Res.Df Df Chisq Pr(>Chisq) 1 34 2 33 1 1.6 0.21 > linearHypothesis( fitsur1e2, restrictOnly2, test = "Chisq" ) Linear hypothesis test (Chi^2 statistic of a Wald test) Hypothesis: - demand_price + supply_price = 0.5 Model 1: restricted model Model 2: fitsur1e2 Res.Df Df Chisq Pr(>Chisq) 1 34 2 33 1 1.6 0.21 > > print( linearHypothesis( fitsuri1, restrOnly2m, restrOnly2q, test = "Chisq" ) ) Linear hypothesis test (Chi^2 statistic of a Wald test) Hypothesis: - demand_price + supply_income = 0.5 Model 1: restricted model Model 2: fitsuri1 Res.Df Df Chisq Pr(>Chisq) 1 34 2 33 1 12.2 0.00047 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 > linearHypothesis( fitsuri1, restrictOnly2i, test = "Chisq" ) Linear hypothesis test (Chi^2 statistic of a Wald test) Hypothesis: - demand_price + supply_income = 0.5 Model 1: restricted model Model 2: fitsuri1 Res.Df Df Chisq Pr(>Chisq) 1 34 2 33 1 12.2 0.00047 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 > > # first restriction imposed > print( linearHypothesis( fitsur2, restrOnly2m, restrOnly2q, test = "Chisq" ) ) Linear hypothesis test (Chi^2 statistic of a Wald test) Hypothesis: - demand_price + supply_price = 0.5 Model 1: restricted model Model 2: fitsur2 Res.Df Df Chisq Pr(>Chisq) 1 35 2 34 1 3.95 0.047 * --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 > linearHypothesis( fitsur2, restrictOnly2, test = "Chisq" ) Linear hypothesis test (Chi^2 statistic of a Wald test) Hypothesis: - demand_price + supply_price = 0.5 Model 1: restricted model Model 2: fitsur2 Res.Df Df Chisq Pr(>Chisq) 1 35 2 34 1 3.95 0.047 * --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 > > print( linearHypothesis( fitsur3, restrOnly2m, restrOnly2q, test = "Chisq" ) ) Linear hypothesis test (Chi^2 statistic of a Wald test) Hypothesis: - demand_price + supply_price = 0.5 Model 1: restricted model Model 2: fitsur3 Res.Df Df Chisq Pr(>Chisq) 1 35 2 34 1 3.95 0.047 * --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 > linearHypothesis( fitsur3, restrictOnly2, test = "Chisq" ) Linear hypothesis test (Chi^2 statistic of a Wald test) Hypothesis: - demand_price + supply_price = 0.5 Model 1: restricted model Model 2: fitsur3 Res.Df Df Chisq Pr(>Chisq) 1 35 2 34 1 3.95 0.047 * --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 > > print( linearHypothesis( fitsuri2e, restrOnly2m, restrOnly2q, test = "Chisq" ) ) Linear hypothesis test (Chi^2 statistic of a Wald test) Hypothesis: - demand_price + supply_income = 0.5 Model 1: restricted model Model 2: fitsuri2e Res.Df Df Chisq Pr(>Chisq) 1 35 2 34 1 2.76 0.096 . --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 > linearHypothesis( fitsuri2e, restrictOnly2i, test = "Chisq" ) Linear hypothesis test (Chi^2 statistic of a Wald test) Hypothesis: - demand_price + supply_income = 0.5 Model 1: restricted model Model 2: fitsuri2e Res.Df Df Chisq Pr(>Chisq) 1 35 2 34 1 2.76 0.096 . --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 > > print( linearHypothesis( fitsuri3e, restrOnly2m, restrOnly2q, test = "Chisq" ) ) Linear hypothesis test (Chi^2 statistic of a Wald test) Hypothesis: - demand_price + supply_income = 0.5 Model 1: restricted model Model 2: fitsuri3e Res.Df Df Chisq Pr(>Chisq) 1 35 2 34 1 2.76 0.096 . --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 > linearHypothesis( fitsuri3e, restrictOnly2i, test = "Chisq" ) Linear hypothesis test (Chi^2 statistic of a Wald test) Hypothesis: - demand_price + supply_income = 0.5 Model 1: restricted model Model 2: fitsuri3e Res.Df Df Chisq Pr(>Chisq) 1 35 2 34 1 2.76 0.096 . --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 > > print( linearHypothesis( fitsuri2w, restrOnly2m, restrOnly2q, test = "Chisq" ) ) Linear hypothesis test (Chi^2 statistic of a Wald test) Hypothesis: - demand_price + supply_income = 0.5 Model 1: restricted model Model 2: fitsuri2w Res.Df Df Chisq Pr(>Chisq) 1 35 2 34 1 2.2 0.14 > linearHypothesis( fitsuri2w, restrictOnly2i, test = "Chisq" ) Linear hypothesis test (Chi^2 statistic of a Wald test) Hypothesis: - demand_price + supply_income = 0.5 Model 1: restricted model Model 2: fitsuri2w Res.Df Df Chisq Pr(>Chisq) 1 35 2 34 1 2.2 0.14 > > print( linearHypothesis( fitsur3w, restrOnly2m, restrOnly2q, test = "Chisq" ) ) Linear hypothesis test (Chi^2 statistic of a Wald test) Hypothesis: - demand_price + supply_price = 0.5 Model 1: restricted model Model 2: fitsur3w Res.Df Df Chisq Pr(>Chisq) 1 35 2 34 1 4.26 0.039 * --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 > linearHypothesis( fitsur3w, restrictOnly2, test = "Chisq" ) Linear hypothesis test (Chi^2 statistic of a Wald test) Hypothesis: - demand_price + supply_price = 0.5 Model 1: restricted model Model 2: fitsur3w Res.Df Df Chisq Pr(>Chisq) 1 35 2 34 1 4.26 0.039 * --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 > > > # testing both of the restrictions > print( linearHypothesis( fitsur1r3, restr2m, restr2q, test = "Chisq" ) ) Linear hypothesis test (Chi^2 statistic of a Wald test) Hypothesis: demand_income - supply_trend = 0 - demand_price + supply_price = 0.5 Model 1: restricted model Model 2: fitsur1r3 Res.Df Df Chisq Pr(>Chisq) 1 35 2 33 2 3.51 0.17 > linearHypothesis( fitsur1r3, restrict2, test = "Chisq" ) Linear hypothesis test (Chi^2 statistic of a Wald test) Hypothesis: demand_income - supply_trend = 0 - demand_price + supply_price = 0.5 Model 1: restricted model Model 2: fitsur1r3 Res.Df Df Chisq Pr(>Chisq) 1 35 2 33 2 3.51 0.17 > > print( linearHypothesis( fitsuri1e2, restr2m, restr2q, test = "Chisq" ) ) Linear hypothesis test (Chi^2 statistic of a Wald test) Hypothesis: demand_income - supply_trend = 0 - demand_price + supply_income = 0.5 Model 1: restricted model Model 2: fitsuri1e2 Res.Df Df Chisq Pr(>Chisq) 1 35 2 33 2 188 <2e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 > linearHypothesis( fitsuri1e2, restrict2i, test = "Chisq" ) Linear hypothesis test (Chi^2 statistic of a Wald test) Hypothesis: demand_income - supply_trend = 0 - demand_price + supply_income = 0.5 Model 1: restricted model Model 2: fitsuri1e2 Res.Df Df Chisq Pr(>Chisq) 1 35 2 33 2 188 <2e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 > > print( linearHypothesis( fitsur1we2, restr2m, restr2q, test = "Chisq" ) ) Linear hypothesis test (Chi^2 statistic of a Wald test) Hypothesis: demand_income - supply_trend = 0 - demand_price + supply_price = 0.5 Model 1: restricted model Model 2: fitsur1we2 Res.Df Df Chisq Pr(>Chisq) 1 35 2 33 2 3.66 0.16 > linearHypothesis( fitsur1we2, restrict2, test = "Chisq" ) Linear hypothesis test (Chi^2 statistic of a Wald test) Hypothesis: demand_income - supply_trend = 0 - demand_price + supply_price = 0.5 Model 1: restricted model Model 2: fitsur1we2 Res.Df Df Chisq Pr(>Chisq) 1 35 2 33 2 3.66 0.16 > > print( linearHypothesis( fitsuri1wr3, restr2m, restr2q, test = "Chisq" ) ) Linear hypothesis test (Chi^2 statistic of a Wald test) Hypothesis: demand_income - supply_trend = 0 - demand_price + supply_income = 0.5 Model 1: restricted model Model 2: fitsuri1wr3 Res.Df Df Chisq Pr(>Chisq) 1 35 2 33 2 187 <2e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 > linearHypothesis( fitsuri1wr3, restrict2i, test = "Chisq" ) Linear hypothesis test (Chi^2 statistic of a Wald test) Hypothesis: demand_income - supply_trend = 0 - demand_price + supply_income = 0.5 Model 1: restricted model Model 2: fitsuri1wr3 Res.Df Df Chisq Pr(>Chisq) 1 35 2 33 2 187 <2e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 > > > ## ****************** model frame ************************** > print( mf <- model.frame( fitsur1e2 ) ) consump price income farmPrice trend 1 98.5 100.3 87.4 98.0 1 2 99.2 104.3 97.6 99.1 2 3 102.2 103.4 96.7 99.1 3 4 101.5 104.5 98.2 98.1 4 5 104.2 98.0 99.8 110.8 5 6 103.2 99.5 100.5 108.2 6 7 104.0 101.1 103.2 105.6 7 8 99.9 104.8 107.8 109.8 8 9 100.3 96.4 96.6 108.7 9 10 102.8 91.2 88.9 100.6 10 11 95.4 93.1 75.1 81.0 11 12 92.4 98.8 76.9 68.6 12 13 94.5 102.9 84.6 70.9 13 14 98.8 98.8 90.6 81.4 14 15 105.8 95.1 103.1 102.3 15 16 100.2 98.5 105.1 105.0 16 17 103.5 86.5 96.4 110.5 17 18 99.9 104.0 104.4 92.5 18 19 105.2 105.8 110.7 89.3 19 20 106.2 113.5 127.1 93.0 20 > print( mf1 <- model.frame( fitsur1e2$eq[[ 1 ]] ) ) consump price income 1 98.5 100.3 87.4 2 99.2 104.3 97.6 3 102.2 103.4 96.7 4 101.5 104.5 98.2 5 104.2 98.0 99.8 6 103.2 99.5 100.5 7 104.0 101.1 103.2 8 99.9 104.8 107.8 9 100.3 96.4 96.6 10 102.8 91.2 88.9 11 95.4 93.1 75.1 12 92.4 98.8 76.9 13 94.5 102.9 84.6 14 98.8 98.8 90.6 15 105.8 95.1 103.1 16 100.2 98.5 105.1 17 103.5 86.5 96.4 18 99.9 104.0 104.4 19 105.2 105.8 110.7 20 106.2 113.5 127.1 > print( attributes( mf1 )$terms ) consump ~ price + income attr(,"variables") list(consump, price, income) attr(,"factors") price income consump 0 0 price 1 0 income 0 1 attr(,"term.labels") [1] "price" "income" attr(,"order") [1] 1 1 attr(,"intercept") [1] 1 attr(,"response") [1] 1 attr(,".Environment") attr(,"predvars") list(consump, price, income) attr(,"dataClasses") consump price income "numeric" "numeric" "numeric" > print( mf2 <- model.frame( fitsur1e2$eq[[ 2 ]] ) ) consump price farmPrice trend 1 98.5 100.3 98.0 1 2 99.2 104.3 99.1 2 3 102.2 103.4 99.1 3 4 101.5 104.5 98.1 4 5 104.2 98.0 110.8 5 6 103.2 99.5 108.2 6 7 104.0 101.1 105.6 7 8 99.9 104.8 109.8 8 9 100.3 96.4 108.7 9 10 102.8 91.2 100.6 10 11 95.4 93.1 81.0 11 12 92.4 98.8 68.6 12 13 94.5 102.9 70.9 13 14 98.8 98.8 81.4 14 15 105.8 95.1 102.3 15 16 100.2 98.5 105.0 16 17 103.5 86.5 110.5 17 18 99.9 104.0 92.5 18 19 105.2 105.8 89.3 19 20 106.2 113.5 93.0 20 > print( attributes( mf2 )$terms ) consump ~ price + farmPrice + trend attr(,"variables") list(consump, price, farmPrice, trend) attr(,"factors") price farmPrice trend consump 0 0 0 price 1 0 0 farmPrice 0 1 0 trend 0 0 1 attr(,"term.labels") [1] "price" "farmPrice" "trend" attr(,"order") [1] 1 1 1 attr(,"intercept") [1] 1 attr(,"response") [1] 1 attr(,".Environment") attr(,"predvars") list(consump, price, farmPrice, trend) attr(,"dataClasses") consump price farmPrice trend "numeric" "numeric" "numeric" "numeric" > > print( all.equal( mf, model.frame( fitsur1w ) ) ) [1] TRUE > print( all.equal( mf1, model.frame( fitsur1w$eq[[ 1 ]] ) ) ) [1] TRUE > > print( all.equal( mf, model.frame( fitsur2e ) ) ) [1] TRUE > print( all.equal( mf1, model.frame( fitsur2e$eq[[ 1 ]] ) ) ) [1] TRUE > > print( all.equal( mf, model.frame( fitsur3 ) ) ) [1] TRUE > print( all.equal( mf2, model.frame( fitsur3$eq[[ 2 ]] ) ) ) [1] TRUE > > print( all.equal( mf, model.frame( fitsur4r3 ) ) ) [1] TRUE > print( all.equal( mf1, model.frame( fitsur4r3$eq[[ 1 ]] ) ) ) [1] TRUE > > print( all.equal( mf, model.frame( fitsur4we ) ) ) [1] TRUE > print( all.equal( mf2, model.frame( fitsur4we$eq[[ 2 ]] ) ) ) [1] TRUE > > print( all.equal( mf, model.frame( fitsur5 ) ) ) [1] TRUE > print( all.equal( mf2, model.frame( fitsur5$eq[[ 2 ]] ) ) ) [1] TRUE > > print( all.equal( mf, model.frame( fitsuri1r3 ) ) ) [1] TRUE > print( all.equal( mf1, model.frame( fitsuri1r3$eq[[ 1 ]] ) ) ) [1] TRUE > > print( all.equal( mf, model.frame( fitsuri2 ) ) ) [1] TRUE > print( all.equal( mf1, model.frame( fitsuri2$eq[[ 1 ]] ) ) ) [1] TRUE > > print( all.equal( mf, model.frame( fitsuri3e ) ) ) [1] TRUE > print( all.equal( mf1, model.frame( fitsuri3e$eq[[ 1 ]] ) ) ) [1] TRUE > > print( all.equal( mf, model.frame( fitsurio4 ) ) ) [1] TRUE > print( all.equal( mf2, model.frame( fitsurio4$eq[[ 2 ]] ) ) ) [1] TRUE > print( all.equal( mf, model.frame( fitsuri4 ) ) ) [1] TRUE > print( all.equal( mf1, model.frame( fitsuri4$eq[[ 1 ]] ) ) ) [1] TRUE > > print( all.equal( mf, model.frame( fitsurio5r2 ) ) ) [1] TRUE > print( all.equal( mf1, model.frame( fitsurio5r2$eq[[ 1 ]] ) ) ) [1] TRUE > print( all.equal( mf, model.frame( fitsuri5r2 ) ) ) [1] TRUE > print( all.equal( mf1, model.frame( fitsuri5r2$eq[[ 1 ]] ) ) ) [1] TRUE > > print( all.equal( mf, model.frame( fitsuri5wr2 ) ) ) [1] TRUE > print( all.equal( mf1, model.frame( fitsuri5wr2$eq[[ 1 ]] ) ) ) [1] TRUE > > > ## **************** model matrix ************************ > # with x (returnModelMatrix) = TRUE > print( !is.null( fitsur1e2$eq[[ 1 ]]$x ) ) [1] TRUE > print( mm <- model.matrix( fitsur1e2 ) ) demand_(Intercept) demand_price demand_income supply_(Intercept) demand_1 1 100.3 87.4 0 demand_2 1 104.3 97.6 0 demand_3 1 103.4 96.7 0 demand_4 1 104.5 98.2 0 demand_5 1 98.0 99.8 0 demand_6 1 99.5 100.5 0 demand_7 1 101.1 103.2 0 demand_8 1 104.8 107.8 0 demand_9 1 96.4 96.6 0 demand_10 1 91.2 88.9 0 demand_11 1 93.1 75.1 0 demand_12 1 98.8 76.9 0 demand_13 1 102.9 84.6 0 demand_14 1 98.8 90.6 0 demand_15 1 95.1 103.1 0 demand_16 1 98.5 105.1 0 demand_17 1 86.5 96.4 0 demand_18 1 104.0 104.4 0 demand_19 1 105.8 110.7 0 demand_20 1 113.5 127.1 0 supply_1 0 0.0 0.0 1 supply_2 0 0.0 0.0 1 supply_3 0 0.0 0.0 1 supply_4 0 0.0 0.0 1 supply_5 0 0.0 0.0 1 supply_6 0 0.0 0.0 1 supply_7 0 0.0 0.0 1 supply_8 0 0.0 0.0 1 supply_9 0 0.0 0.0 1 supply_10 0 0.0 0.0 1 supply_11 0 0.0 0.0 1 supply_12 0 0.0 0.0 1 supply_13 0 0.0 0.0 1 supply_14 0 0.0 0.0 1 supply_15 0 0.0 0.0 1 supply_16 0 0.0 0.0 1 supply_17 0 0.0 0.0 1 supply_18 0 0.0 0.0 1 supply_19 0 0.0 0.0 1 supply_20 0 0.0 0.0 1 supply_price supply_farmPrice supply_trend demand_1 0.0 0.0 0 demand_2 0.0 0.0 0 demand_3 0.0 0.0 0 demand_4 0.0 0.0 0 demand_5 0.0 0.0 0 demand_6 0.0 0.0 0 demand_7 0.0 0.0 0 demand_8 0.0 0.0 0 demand_9 0.0 0.0 0 demand_10 0.0 0.0 0 demand_11 0.0 0.0 0 demand_12 0.0 0.0 0 demand_13 0.0 0.0 0 demand_14 0.0 0.0 0 demand_15 0.0 0.0 0 demand_16 0.0 0.0 0 demand_17 0.0 0.0 0 demand_18 0.0 0.0 0 demand_19 0.0 0.0 0 demand_20 0.0 0.0 0 supply_1 100.3 98.0 1 supply_2 104.3 99.1 2 supply_3 103.4 99.1 3 supply_4 104.5 98.1 4 supply_5 98.0 110.8 5 supply_6 99.5 108.2 6 supply_7 101.1 105.6 7 supply_8 104.8 109.8 8 supply_9 96.4 108.7 9 supply_10 91.2 100.6 10 supply_11 93.1 81.0 11 supply_12 98.8 68.6 12 supply_13 102.9 70.9 13 supply_14 98.8 81.4 14 supply_15 95.1 102.3 15 supply_16 98.5 105.0 16 supply_17 86.5 110.5 17 supply_18 104.0 92.5 18 supply_19 105.8 89.3 19 supply_20 113.5 93.0 20 > print( mm1 <- model.matrix( fitsur1e2$eq[[ 1 ]] ) ) (Intercept) price income 1 1 100.3 87.4 2 1 104.3 97.6 3 1 103.4 96.7 4 1 104.5 98.2 5 1 98.0 99.8 6 1 99.5 100.5 7 1 101.1 103.2 8 1 104.8 107.8 9 1 96.4 96.6 10 1 91.2 88.9 11 1 93.1 75.1 12 1 98.8 76.9 13 1 102.9 84.6 14 1 98.8 90.6 15 1 95.1 103.1 16 1 98.5 105.1 17 1 86.5 96.4 18 1 104.0 104.4 19 1 105.8 110.7 20 1 113.5 127.1 attr(,"assign") [1] 0 1 2 > print( mm2 <- model.matrix( fitsur1e2$eq[[ 2 ]] ) ) (Intercept) price farmPrice trend 1 1 100.3 98.0 1 2 1 104.3 99.1 2 3 1 103.4 99.1 3 4 1 104.5 98.1 4 5 1 98.0 110.8 5 6 1 99.5 108.2 6 7 1 101.1 105.6 7 8 1 104.8 109.8 8 9 1 96.4 108.7 9 10 1 91.2 100.6 10 11 1 93.1 81.0 11 12 1 98.8 68.6 12 13 1 102.9 70.9 13 14 1 98.8 81.4 14 15 1 95.1 102.3 15 16 1 98.5 105.0 16 17 1 86.5 110.5 17 18 1 104.0 92.5 18 19 1 105.8 89.3 19 20 1 113.5 93.0 20 attr(,"assign") [1] 0 1 2 3 > > # with x (returnModelMatrix) = FALSE > print( all.equal( mm, model.matrix( fitsur1r2 ) ) ) [1] TRUE > print( all.equal( mm1, model.matrix( fitsur1r2$eq[[ 1 ]] ) ) ) [1] TRUE > print( all.equal( mm2, model.matrix( fitsur1r2$eq[[ 2 ]] ) ) ) [1] TRUE > print( !is.null( fitsur1r2$eq[[ 1 ]]$x ) ) [1] FALSE > > # with x (returnModelMatrix) = TRUE > print( !is.null( fitsur2e$eq[[ 1 ]]$x ) ) [1] TRUE > print( all.equal( mm, model.matrix( fitsur2e ) ) ) [1] TRUE > print( all.equal( mm1, model.matrix( fitsur2e$eq[[ 1 ]] ) ) ) [1] TRUE > print( all.equal( mm2, model.matrix( fitsur2e$eq[[ 2 ]] ) ) ) [1] TRUE > > # with x (returnModelMatrix) = FALSE > print( all.equal( mm, model.matrix( fitsur2 ) ) ) [1] TRUE > print( all.equal( mm1, model.matrix( fitsur2$eq[[ 1 ]] ) ) ) [1] TRUE > print( all.equal( mm2, model.matrix( fitsur2$eq[[ 2 ]] ) ) ) [1] TRUE > print( !is.null( fitsur2$eq[[ 1 ]]$x ) ) [1] FALSE > > # with x (returnModelMatrix) = TRUE > print( !is.null( fitsur2we$eq[[ 1 ]]$x ) ) [1] TRUE > print( all.equal( mm, model.matrix( fitsur2we ) ) ) [1] TRUE > print( all.equal( mm1, model.matrix( fitsur2we$eq[[ 1 ]] ) ) ) [1] TRUE > print( all.equal( mm2, model.matrix( fitsur2we$eq[[ 2 ]] ) ) ) [1] TRUE > > # with x (returnModelMatrix) = FALSE > print( all.equal( mm, model.matrix( fitsur2 ) ) ) [1] TRUE > print( all.equal( mm1, model.matrix( fitsur2$eq[[ 1 ]] ) ) ) [1] TRUE > print( all.equal( mm2, model.matrix( fitsur2$eq[[ 2 ]] ) ) ) [1] TRUE > print( !is.null( fitsuri2$eq[[ 1 ]]$x ) ) [1] FALSE > > # with x (returnModelMatrix) = TRUE > print( !is.null( fitsur3e$eq[[ 1 ]]$x ) ) [1] TRUE > print( all.equal( mm, model.matrix( fitsur3e ) ) ) [1] TRUE > print( all.equal( mm1, model.matrix( fitsur3e$eq[[ 1 ]] ) ) ) [1] TRUE > print( all.equal( mm2, model.matrix( fitsur3e$eq[[ 2 ]] ) ) ) [1] TRUE > > # with x (returnModelMatrix) = FALSE > print( all.equal( mm, model.matrix( fitsur3 ) ) ) [1] TRUE > print( all.equal( mm1, model.matrix( fitsur3$eq[[ 1 ]] ) ) ) [1] TRUE > print( all.equal( mm2, model.matrix( fitsur3$eq[[ 2 ]] ) ) ) [1] TRUE > print( !is.null( fitsur3$eq[[ 1 ]]$x ) ) [1] FALSE > > # with x (returnModelMatrix) = TRUE > print( !is.null( fitsur3w$eq[[ 1 ]]$x ) ) [1] TRUE > print( all.equal( mm, model.matrix( fitsur3w ) ) ) [1] TRUE > print( all.equal( mm1, model.matrix( fitsur3w$eq[[ 1 ]] ) ) ) [1] TRUE > print( all.equal( mm2, model.matrix( fitsur3w$eq[[ 2 ]] ) ) ) [1] TRUE > > # with x (returnModelMatrix) = FALSE > print( all.equal( mm, model.matrix( fitsur3 ) ) ) [1] TRUE > print( all.equal( mm1, model.matrix( fitsur3$eq[[ 1 ]] ) ) ) [1] TRUE > print( all.equal( mm2, model.matrix( fitsur3$eq[[ 2 ]] ) ) ) [1] TRUE > print( !is.null( fitsuri3$eq[[ 1 ]]$x ) ) [1] FALSE > > # with x (returnModelMatrix) = TRUE > print( !is.null( fitsur4r3$eq[[ 1 ]]$x ) ) [1] TRUE > print( all.equal( mm, model.matrix( fitsur4r3 ) ) ) [1] TRUE > print( all.equal( mm1, model.matrix( fitsur4r3$eq[[ 1 ]] ) ) ) [1] TRUE > print( all.equal( mm2, model.matrix( fitsur4r3$eq[[ 2 ]] ) ) ) [1] TRUE > > # with x (returnModelMatrix) = FALSE > print( all.equal( mm, model.matrix( fitsur4we ) ) ) [1] TRUE > print( all.equal( mm1, model.matrix( fitsur4we$eq[[ 1 ]] ) ) ) [1] TRUE > print( all.equal( mm2, model.matrix( fitsur4we$eq[[ 2 ]] ) ) ) [1] TRUE > print( !is.null( fitsur4we$eq[[ 1 ]]$x ) ) [1] FALSE > > # with x (returnModelMatrix) = TRUE > print( !is.null( fitsurio5r2$eq[[ 1 ]]$x ) ) [1] TRUE > print( !is.null( fitsur5$eq[[ 1 ]]$x ) ) [1] TRUE > print( all.equal( mm, model.matrix( fitsurio5r2 ) ) ) [1] TRUE > print( all.equal( mm1, model.matrix( fitsurio5r2$eq[[ 1 ]] ) ) ) [1] TRUE > print( all.equal( mm, model.matrix( fitsur5 ) ) ) [1] TRUE > print( all.equal( mm1, model.matrix( fitsur5$eq[[ 1 ]] ) ) ) [1] TRUE > #print( all.equal( mm2, model.matrix( fitsuri5r2$eq[[ 2 ]] ) ) ) > > # with x (returnModelMatrix) = FALSE > print( all.equal( mm, model.matrix( fitsurio5 ) ) ) [1] TRUE > print( all.equal( mm1, model.matrix( fitsurio5$eq[[ 1 ]] ) ) ) [1] TRUE > > # with x (returnModelMatrix) = FALSE > print( all.equal( mm, model.matrix( fitsur5w ) ) ) [1] TRUE > print( all.equal( mm1, model.matrix( fitsur5w$eq[[ 1 ]] ) ) ) [1] TRUE > #print( all.equal( mm2, model.matrix( fitsuri5r2$eq[[ 1 ]] ) ) ) > print( !is.null( fitsurio5$eq[[ 1 ]]$x ) ) [1] FALSE > print( !is.null( fitsur5w$eq[[ 1 ]]$x ) ) [1] FALSE > > > ## **************** formulas ************************ > formula( fitsur1e2 ) $demand consump ~ price + income $supply consump ~ price + farmPrice + trend > formula( fitsur1e2$eq[[ 2 ]] ) consump ~ price + farmPrice + trend > > formula( fitsur2e ) $demand consump ~ price + income $supply consump ~ price + farmPrice + trend > formula( fitsur2e$eq[[ 1 ]] ) consump ~ price + income > > formula( fitsur2we ) $demand consump ~ price + income $supply consump ~ price + farmPrice + trend > formula( fitsur2we$eq[[ 1 ]] ) consump ~ price + income > > formula( fitsur3 ) $demand consump ~ price + income $supply consump ~ price + farmPrice + trend > formula( fitsur3$eq[[ 2 ]] ) consump ~ price + farmPrice + trend > > formula( fitsur4r3 ) $demand consump ~ price + income $supply consump ~ price + farmPrice + trend > formula( fitsur4r3$eq[[ 1 ]] ) consump ~ price + income > > formula( fitsur5 ) $demand consump ~ price + income $supply consump ~ price + farmPrice + trend > formula( fitsur5$eq[[ 2 ]] ) consump ~ price + farmPrice + trend > > formula( fitsuri1r3 ) $demand consump ~ price + income $supply price ~ income + farmPrice + trend > formula( fitsuri1r3$eq[[ 1 ]] ) consump ~ price + income > > formula( fitsuri2 ) $demand consump ~ price + income $supply price ~ income + farmPrice + trend > formula( fitsuri2$eq[[ 2 ]] ) price ~ income + farmPrice + trend > > formula( fitsuri3e ) $demand consump ~ price + income $supply price ~ income + farmPrice + trend > formula( fitsuri3e$eq[[ 1 ]] ) consump ~ price + income > > formula( fitsurio4 ) $demand consump ~ price + income $supply consump ~ price + farmPrice + trend > formula( fitsurio4$eq[[ 2 ]] ) consump ~ price + farmPrice + trend > formula( fitsuri4 ) $demand consump ~ price + income $supply price ~ income + farmPrice + trend > formula( fitsuri4$eq[[ 2 ]] ) price ~ income + farmPrice + trend > > formula( fitsurio5r2 ) $demand consump ~ price + income $supply consump ~ price + farmPrice + trend > formula( fitsurio5r2$eq[[ 1 ]] ) consump ~ price + income > formula( fitsuri5r2 ) $demand consump ~ price + income $supply price ~ income + farmPrice + trend > formula( fitsuri5r2$eq[[ 1 ]] ) consump ~ price + income > > formula( fitsuri5wr2 ) $demand consump ~ price + income $supply price ~ income + farmPrice + trend > formula( fitsuri5wr2$eq[[ 1 ]] ) consump ~ price + income > > > ## **************** model terms ******************* > terms( fitsur1e2 ) $demand consump ~ price + income attr(,"variables") list(consump, price, income) attr(,"factors") price income consump 0 0 price 1 0 income 0 1 attr(,"term.labels") [1] "price" "income" attr(,"order") [1] 1 1 attr(,"intercept") [1] 1 attr(,"response") [1] 1 attr(,".Environment") attr(,"predvars") list(consump, price, income) attr(,"dataClasses") consump price income "numeric" "numeric" "numeric" $supply consump ~ price + farmPrice + trend attr(,"variables") list(consump, price, farmPrice, trend) attr(,"factors") price farmPrice trend consump 0 0 0 price 1 0 0 farmPrice 0 1 0 trend 0 0 1 attr(,"term.labels") [1] "price" "farmPrice" "trend" attr(,"order") [1] 1 1 1 attr(,"intercept") [1] 1 attr(,"response") [1] 1 attr(,".Environment") attr(,"predvars") list(consump, price, farmPrice, trend) attr(,"dataClasses") consump price farmPrice trend "numeric" "numeric" "numeric" "numeric" > terms( fitsur1e2$eq[[ 2 ]] ) consump ~ price + farmPrice + trend attr(,"variables") list(consump, price, farmPrice, trend) attr(,"factors") price farmPrice trend consump 0 0 0 price 1 0 0 farmPrice 0 1 0 trend 0 0 1 attr(,"term.labels") [1] "price" "farmPrice" "trend" attr(,"order") [1] 1 1 1 attr(,"intercept") [1] 1 attr(,"response") [1] 1 attr(,".Environment") attr(,"predvars") list(consump, price, farmPrice, trend) attr(,"dataClasses") consump price farmPrice trend "numeric" "numeric" "numeric" "numeric" > > terms( fitsur2e ) $demand consump ~ price + income attr(,"variables") list(consump, price, income) attr(,"factors") price income consump 0 0 price 1 0 income 0 1 attr(,"term.labels") [1] "price" "income" attr(,"order") [1] 1 1 attr(,"intercept") [1] 1 attr(,"response") [1] 1 attr(,".Environment") attr(,"predvars") list(consump, price, income) attr(,"dataClasses") consump price income "numeric" "numeric" "numeric" $supply consump ~ price + farmPrice + trend attr(,"variables") list(consump, price, farmPrice, trend) attr(,"factors") price farmPrice trend consump 0 0 0 price 1 0 0 farmPrice 0 1 0 trend 0 0 1 attr(,"term.labels") [1] "price" "farmPrice" "trend" attr(,"order") [1] 1 1 1 attr(,"intercept") [1] 1 attr(,"response") [1] 1 attr(,".Environment") attr(,"predvars") list(consump, price, farmPrice, trend) attr(,"dataClasses") consump price farmPrice trend "numeric" "numeric" "numeric" "numeric" > terms( fitsur2e$eq[[ 1 ]] ) consump ~ price + income attr(,"variables") list(consump, price, income) attr(,"factors") price income consump 0 0 price 1 0 income 0 1 attr(,"term.labels") [1] "price" "income" attr(,"order") [1] 1 1 attr(,"intercept") [1] 1 attr(,"response") [1] 1 attr(,".Environment") attr(,"predvars") list(consump, price, income) attr(,"dataClasses") consump price income "numeric" "numeric" "numeric" > > terms( fitsur3 ) $demand consump ~ price + income attr(,"variables") list(consump, price, income) attr(,"factors") price income consump 0 0 price 1 0 income 0 1 attr(,"term.labels") [1] "price" "income" attr(,"order") [1] 1 1 attr(,"intercept") [1] 1 attr(,"response") [1] 1 attr(,".Environment") attr(,"predvars") list(consump, price, income) attr(,"dataClasses") consump price income "numeric" "numeric" "numeric" $supply consump ~ price + farmPrice + trend attr(,"variables") list(consump, price, farmPrice, trend) attr(,"factors") price farmPrice trend consump 0 0 0 price 1 0 0 farmPrice 0 1 0 trend 0 0 1 attr(,"term.labels") [1] "price" "farmPrice" "trend" attr(,"order") [1] 1 1 1 attr(,"intercept") [1] 1 attr(,"response") [1] 1 attr(,".Environment") attr(,"predvars") list(consump, price, farmPrice, trend) attr(,"dataClasses") consump price farmPrice trend "numeric" "numeric" "numeric" "numeric" > terms( fitsur3$eq[[ 2 ]] ) consump ~ price + farmPrice + trend attr(,"variables") list(consump, price, farmPrice, trend) attr(,"factors") price farmPrice trend consump 0 0 0 price 1 0 0 farmPrice 0 1 0 trend 0 0 1 attr(,"term.labels") [1] "price" "farmPrice" "trend" attr(,"order") [1] 1 1 1 attr(,"intercept") [1] 1 attr(,"response") [1] 1 attr(,".Environment") attr(,"predvars") list(consump, price, farmPrice, trend) attr(,"dataClasses") consump price farmPrice trend "numeric" "numeric" "numeric" "numeric" > > terms( fitsur3w ) $demand consump ~ price + income attr(,"variables") list(consump, price, income) attr(,"factors") price income consump 0 0 price 1 0 income 0 1 attr(,"term.labels") [1] "price" "income" attr(,"order") [1] 1 1 attr(,"intercept") [1] 1 attr(,"response") [1] 1 attr(,".Environment") attr(,"predvars") list(consump, price, income) attr(,"dataClasses") consump price income "numeric" "numeric" "numeric" $supply consump ~ price + farmPrice + trend attr(,"variables") list(consump, price, farmPrice, trend) attr(,"factors") price farmPrice trend consump 0 0 0 price 1 0 0 farmPrice 0 1 0 trend 0 0 1 attr(,"term.labels") [1] "price" "farmPrice" "trend" attr(,"order") [1] 1 1 1 attr(,"intercept") [1] 1 attr(,"response") [1] 1 attr(,".Environment") attr(,"predvars") list(consump, price, farmPrice, trend) attr(,"dataClasses") consump price farmPrice trend "numeric" "numeric" "numeric" "numeric" > terms( fitsur3w$eq[[ 2 ]] ) consump ~ price + farmPrice + trend attr(,"variables") list(consump, price, farmPrice, trend) attr(,"factors") price farmPrice trend consump 0 0 0 price 1 0 0 farmPrice 0 1 0 trend 0 0 1 attr(,"term.labels") [1] "price" "farmPrice" "trend" attr(,"order") [1] 1 1 1 attr(,"intercept") [1] 1 attr(,"response") [1] 1 attr(,".Environment") attr(,"predvars") list(consump, price, farmPrice, trend) attr(,"dataClasses") consump price farmPrice trend "numeric" "numeric" "numeric" "numeric" > > terms( fitsur4r3 ) $demand consump ~ price + income attr(,"variables") list(consump, price, income) attr(,"factors") price income consump 0 0 price 1 0 income 0 1 attr(,"term.labels") [1] "price" "income" attr(,"order") [1] 1 1 attr(,"intercept") [1] 1 attr(,"response") [1] 1 attr(,".Environment") attr(,"predvars") list(consump, price, income) attr(,"dataClasses") consump price income "numeric" "numeric" "numeric" $supply consump ~ price + farmPrice + trend attr(,"variables") list(consump, price, farmPrice, trend) attr(,"factors") price farmPrice trend consump 0 0 0 price 1 0 0 farmPrice 0 1 0 trend 0 0 1 attr(,"term.labels") [1] "price" "farmPrice" "trend" attr(,"order") [1] 1 1 1 attr(,"intercept") [1] 1 attr(,"response") [1] 1 attr(,".Environment") attr(,"predvars") list(consump, price, farmPrice, trend) attr(,"dataClasses") consump price farmPrice trend "numeric" "numeric" "numeric" "numeric" > terms( fitsur4r3$eq[[ 1 ]] ) consump ~ price + income attr(,"variables") list(consump, price, income) attr(,"factors") price income consump 0 0 price 1 0 income 0 1 attr(,"term.labels") [1] "price" "income" attr(,"order") [1] 1 1 attr(,"intercept") [1] 1 attr(,"response") [1] 1 attr(,".Environment") attr(,"predvars") list(consump, price, income) attr(,"dataClasses") consump price income "numeric" "numeric" "numeric" > > terms( fitsur4we ) $demand consump ~ price + income attr(,"variables") list(consump, price, income) attr(,"factors") price income consump 0 0 price 1 0 income 0 1 attr(,"term.labels") [1] "price" "income" attr(,"order") [1] 1 1 attr(,"intercept") [1] 1 attr(,"response") [1] 1 attr(,".Environment") attr(,"predvars") list(consump, price, income) attr(,"dataClasses") consump price income "numeric" "numeric" "numeric" $supply consump ~ price + farmPrice + trend attr(,"variables") list(consump, price, farmPrice, trend) attr(,"factors") price farmPrice trend consump 0 0 0 price 1 0 0 farmPrice 0 1 0 trend 0 0 1 attr(,"term.labels") [1] "price" "farmPrice" "trend" attr(,"order") [1] 1 1 1 attr(,"intercept") [1] 1 attr(,"response") [1] 1 attr(,".Environment") attr(,"predvars") list(consump, price, farmPrice, trend) attr(,"dataClasses") consump price farmPrice trend "numeric" "numeric" "numeric" "numeric" > terms( fitsur4we$eq[[ 1 ]] ) consump ~ price + income attr(,"variables") list(consump, price, income) attr(,"factors") price income consump 0 0 price 1 0 income 0 1 attr(,"term.labels") [1] "price" "income" attr(,"order") [1] 1 1 attr(,"intercept") [1] 1 attr(,"response") [1] 1 attr(,".Environment") attr(,"predvars") list(consump, price, income) attr(,"dataClasses") consump price income "numeric" "numeric" "numeric" > > terms( fitsur5 ) $demand consump ~ price + income attr(,"variables") list(consump, price, income) attr(,"factors") price income consump 0 0 price 1 0 income 0 1 attr(,"term.labels") [1] "price" "income" attr(,"order") [1] 1 1 attr(,"intercept") [1] 1 attr(,"response") [1] 1 attr(,".Environment") attr(,"predvars") list(consump, price, income) attr(,"dataClasses") consump price income "numeric" "numeric" "numeric" $supply consump ~ price + farmPrice + trend attr(,"variables") list(consump, price, farmPrice, trend) attr(,"factors") price farmPrice trend consump 0 0 0 price 1 0 0 farmPrice 0 1 0 trend 0 0 1 attr(,"term.labels") [1] "price" "farmPrice" "trend" attr(,"order") [1] 1 1 1 attr(,"intercept") [1] 1 attr(,"response") [1] 1 attr(,".Environment") attr(,"predvars") list(consump, price, farmPrice, trend) attr(,"dataClasses") consump price farmPrice trend "numeric" "numeric" "numeric" "numeric" > terms( fitsur5$eq[[ 2 ]] ) consump ~ price + farmPrice + trend attr(,"variables") list(consump, price, farmPrice, trend) attr(,"factors") price farmPrice trend consump 0 0 0 price 1 0 0 farmPrice 0 1 0 trend 0 0 1 attr(,"term.labels") [1] "price" "farmPrice" "trend" attr(,"order") [1] 1 1 1 attr(,"intercept") [1] 1 attr(,"response") [1] 1 attr(,".Environment") attr(,"predvars") list(consump, price, farmPrice, trend) attr(,"dataClasses") consump price farmPrice trend "numeric" "numeric" "numeric" "numeric" > > terms( fitsuri1r3 ) $demand consump ~ price + income attr(,"variables") list(consump, price, income) attr(,"factors") price income consump 0 0 price 1 0 income 0 1 attr(,"term.labels") [1] "price" "income" attr(,"order") [1] 1 1 attr(,"intercept") [1] 1 attr(,"response") [1] 1 attr(,".Environment") attr(,"predvars") list(consump, price, income) attr(,"dataClasses") consump price income "numeric" "numeric" "numeric" $supply price ~ income + farmPrice + trend attr(,"variables") list(price, income, farmPrice, trend) attr(,"factors") income farmPrice trend price 0 0 0 income 1 0 0 farmPrice 0 1 0 trend 0 0 1 attr(,"term.labels") [1] "income" "farmPrice" "trend" attr(,"order") [1] 1 1 1 attr(,"intercept") [1] 1 attr(,"response") [1] 1 attr(,".Environment") attr(,"predvars") list(price, income, farmPrice, trend) attr(,"dataClasses") price income farmPrice trend "numeric" "numeric" "numeric" "numeric" > terms( fitsuri1r3$eq[[ 1 ]] ) consump ~ price + income attr(,"variables") list(consump, price, income) attr(,"factors") price income consump 0 0 price 1 0 income 0 1 attr(,"term.labels") [1] "price" "income" attr(,"order") [1] 1 1 attr(,"intercept") [1] 1 attr(,"response") [1] 1 attr(,".Environment") attr(,"predvars") list(consump, price, income) attr(,"dataClasses") consump price income "numeric" "numeric" "numeric" > > terms( fitsuri2 ) $demand consump ~ price + income attr(,"variables") list(consump, price, income) attr(,"factors") price income consump 0 0 price 1 0 income 0 1 attr(,"term.labels") [1] "price" "income" attr(,"order") [1] 1 1 attr(,"intercept") [1] 1 attr(,"response") [1] 1 attr(,".Environment") attr(,"predvars") list(consump, price, income) attr(,"dataClasses") consump price income "numeric" "numeric" "numeric" $supply price ~ income + farmPrice + trend attr(,"variables") list(price, income, farmPrice, trend) attr(,"factors") income farmPrice trend price 0 0 0 income 1 0 0 farmPrice 0 1 0 trend 0 0 1 attr(,"term.labels") [1] "income" "farmPrice" "trend" attr(,"order") [1] 1 1 1 attr(,"intercept") [1] 1 attr(,"response") [1] 1 attr(,".Environment") attr(,"predvars") list(price, income, farmPrice, trend) attr(,"dataClasses") price income farmPrice trend "numeric" "numeric" "numeric" "numeric" > terms( fitsuri2$eq[[ 2 ]] ) price ~ income + farmPrice + trend attr(,"variables") list(price, income, farmPrice, trend) attr(,"factors") income farmPrice trend price 0 0 0 income 1 0 0 farmPrice 0 1 0 trend 0 0 1 attr(,"term.labels") [1] "income" "farmPrice" "trend" attr(,"order") [1] 1 1 1 attr(,"intercept") [1] 1 attr(,"response") [1] 1 attr(,".Environment") attr(,"predvars") list(price, income, farmPrice, trend) attr(,"dataClasses") price income farmPrice trend "numeric" "numeric" "numeric" "numeric" > > terms( fitsuri3e ) $demand consump ~ price + income attr(,"variables") list(consump, price, income) attr(,"factors") price income consump 0 0 price 1 0 income 0 1 attr(,"term.labels") [1] "price" "income" attr(,"order") [1] 1 1 attr(,"intercept") [1] 1 attr(,"response") [1] 1 attr(,".Environment") attr(,"predvars") list(consump, price, income) attr(,"dataClasses") consump price income "numeric" "numeric" "numeric" $supply price ~ income + farmPrice + trend attr(,"variables") list(price, income, farmPrice, trend) attr(,"factors") income farmPrice trend price 0 0 0 income 1 0 0 farmPrice 0 1 0 trend 0 0 1 attr(,"term.labels") [1] "income" "farmPrice" "trend" attr(,"order") [1] 1 1 1 attr(,"intercept") [1] 1 attr(,"response") [1] 1 attr(,".Environment") attr(,"predvars") list(price, income, farmPrice, trend) attr(,"dataClasses") price income farmPrice trend "numeric" "numeric" "numeric" "numeric" > terms( fitsuri3e$eq[[ 1 ]] ) consump ~ price + income attr(,"variables") list(consump, price, income) attr(,"factors") price income consump 0 0 price 1 0 income 0 1 attr(,"term.labels") [1] "price" "income" attr(,"order") [1] 1 1 attr(,"intercept") [1] 1 attr(,"response") [1] 1 attr(,".Environment") attr(,"predvars") list(consump, price, income) attr(,"dataClasses") consump price income "numeric" "numeric" "numeric" > > terms( fitsurio4 ) $demand consump ~ price + income attr(,"variables") list(consump, price, income) attr(,"factors") price income consump 0 0 price 1 0 income 0 1 attr(,"term.labels") [1] "price" "income" attr(,"order") [1] 1 1 attr(,"intercept") [1] 1 attr(,"response") [1] 1 attr(,".Environment") attr(,"predvars") list(consump, price, income) attr(,"dataClasses") consump price income "numeric" "numeric" "numeric" $supply consump ~ price + farmPrice + trend attr(,"variables") list(consump, price, farmPrice, trend) attr(,"factors") price farmPrice trend consump 0 0 0 price 1 0 0 farmPrice 0 1 0 trend 0 0 1 attr(,"term.labels") [1] "price" "farmPrice" "trend" attr(,"order") [1] 1 1 1 attr(,"intercept") [1] 1 attr(,"response") [1] 1 attr(,".Environment") attr(,"predvars") list(consump, price, farmPrice, trend) attr(,"dataClasses") consump price farmPrice trend "numeric" "numeric" "numeric" "numeric" > terms( fitsurio4$eq[[ 2 ]] ) consump ~ price + farmPrice + trend attr(,"variables") list(consump, price, farmPrice, trend) attr(,"factors") price farmPrice trend consump 0 0 0 price 1 0 0 farmPrice 0 1 0 trend 0 0 1 attr(,"term.labels") [1] "price" "farmPrice" "trend" attr(,"order") [1] 1 1 1 attr(,"intercept") [1] 1 attr(,"response") [1] 1 attr(,".Environment") attr(,"predvars") list(consump, price, farmPrice, trend) attr(,"dataClasses") consump price farmPrice trend "numeric" "numeric" "numeric" "numeric" > terms( fitsuri4 ) $demand consump ~ price + income attr(,"variables") list(consump, price, income) attr(,"factors") price income consump 0 0 price 1 0 income 0 1 attr(,"term.labels") [1] "price" "income" attr(,"order") [1] 1 1 attr(,"intercept") [1] 1 attr(,"response") [1] 1 attr(,".Environment") attr(,"predvars") list(consump, price, income) attr(,"dataClasses") consump price income "numeric" "numeric" "numeric" $supply price ~ income + farmPrice + trend attr(,"variables") list(price, income, farmPrice, trend) attr(,"factors") income farmPrice trend price 0 0 0 income 1 0 0 farmPrice 0 1 0 trend 0 0 1 attr(,"term.labels") [1] "income" "farmPrice" "trend" attr(,"order") [1] 1 1 1 attr(,"intercept") [1] 1 attr(,"response") [1] 1 attr(,".Environment") attr(,"predvars") list(price, income, farmPrice, trend) attr(,"dataClasses") price income farmPrice trend "numeric" "numeric" "numeric" "numeric" > terms( fitsuri4$eq[[ 2 ]] ) price ~ income + farmPrice + trend attr(,"variables") list(price, income, farmPrice, trend) attr(,"factors") income farmPrice trend price 0 0 0 income 1 0 0 farmPrice 0 1 0 trend 0 0 1 attr(,"term.labels") [1] "income" "farmPrice" "trend" attr(,"order") [1] 1 1 1 attr(,"intercept") [1] 1 attr(,"response") [1] 1 attr(,".Environment") attr(,"predvars") list(price, income, farmPrice, trend) attr(,"dataClasses") price income farmPrice trend "numeric" "numeric" "numeric" "numeric" > > terms( fitsurio5r2 ) $demand consump ~ price + income attr(,"variables") list(consump, price, income) attr(,"factors") price income consump 0 0 price 1 0 income 0 1 attr(,"term.labels") [1] "price" "income" attr(,"order") [1] 1 1 attr(,"intercept") [1] 1 attr(,"response") [1] 1 attr(,".Environment") attr(,"predvars") list(consump, price, income) attr(,"dataClasses") consump price income "numeric" "numeric" "numeric" $supply consump ~ price + farmPrice + trend attr(,"variables") list(consump, price, farmPrice, trend) attr(,"factors") price farmPrice trend consump 0 0 0 price 1 0 0 farmPrice 0 1 0 trend 0 0 1 attr(,"term.labels") [1] "price" "farmPrice" "trend" attr(,"order") [1] 1 1 1 attr(,"intercept") [1] 1 attr(,"response") [1] 1 attr(,".Environment") attr(,"predvars") list(consump, price, farmPrice, trend) attr(,"dataClasses") consump price farmPrice trend "numeric" "numeric" "numeric" "numeric" > terms( fitsurio5r2$eq[[ 1 ]] ) consump ~ price + income attr(,"variables") list(consump, price, income) attr(,"factors") price income consump 0 0 price 1 0 income 0 1 attr(,"term.labels") [1] "price" "income" attr(,"order") [1] 1 1 attr(,"intercept") [1] 1 attr(,"response") [1] 1 attr(,".Environment") attr(,"predvars") list(consump, price, income) attr(,"dataClasses") consump price income "numeric" "numeric" "numeric" > terms( fitsuri5r2 ) $demand consump ~ price + income attr(,"variables") list(consump, price, income) attr(,"factors") price income consump 0 0 price 1 0 income 0 1 attr(,"term.labels") [1] "price" "income" attr(,"order") [1] 1 1 attr(,"intercept") [1] 1 attr(,"response") [1] 1 attr(,".Environment") attr(,"predvars") list(consump, price, income) attr(,"dataClasses") consump price income "numeric" "numeric" "numeric" $supply price ~ income + farmPrice + trend attr(,"variables") list(price, income, farmPrice, trend) attr(,"factors") income farmPrice trend price 0 0 0 income 1 0 0 farmPrice 0 1 0 trend 0 0 1 attr(,"term.labels") [1] "income" "farmPrice" "trend" attr(,"order") [1] 1 1 1 attr(,"intercept") [1] 1 attr(,"response") [1] 1 attr(,".Environment") attr(,"predvars") list(price, income, farmPrice, trend) attr(,"dataClasses") price income farmPrice trend "numeric" "numeric" "numeric" "numeric" > terms( fitsuri5r2$eq[[ 1 ]] ) consump ~ price + income attr(,"variables") list(consump, price, income) attr(,"factors") price income consump 0 0 price 1 0 income 0 1 attr(,"term.labels") [1] "price" "income" attr(,"order") [1] 1 1 attr(,"intercept") [1] 1 attr(,"response") [1] 1 attr(,".Environment") attr(,"predvars") list(consump, price, income) attr(,"dataClasses") consump price income "numeric" "numeric" "numeric" > > > ## **************** estfun ************************ > library( "sandwich" ) > > estfun( fitsur1 ) demand_(Intercept) demand_price demand_income supply_(Intercept) demand_1 0.9083 91.12 79.38 -0.6496 demand_2 -0.7320 -76.32 -71.44 0.5235 demand_3 3.2023 331.23 309.66 -2.2902 demand_4 2.1435 224.00 210.49 -1.5330 demand_5 2.7516 269.66 274.61 -1.9679 demand_6 1.7015 169.22 171.00 -1.2169 demand_7 2.2068 223.03 227.74 -1.5783 demand_8 -3.5946 -376.58 -387.50 2.5708 demand_9 -1.6348 -157.67 -157.92 1.1692 demand_10 2.7103 247.26 240.95 -1.9384 demand_11 -0.8810 -82.01 -66.16 0.6301 demand_12 -3.4554 -341.39 -265.72 2.4712 demand_13 -2.2246 -228.93 -188.20 1.5910 demand_14 -0.5461 -53.93 -49.48 0.3906 demand_15 2.4619 234.17 253.82 -1.7607 demand_16 -4.3873 -431.94 -461.11 3.1378 demand_17 -0.9942 -85.99 -95.84 0.7110 demand_18 -2.5012 -260.17 -261.13 1.7888 demand_19 2.5805 272.93 285.66 -1.8455 demand_20 0.2846 32.30 36.17 -0.2036 supply_1 -0.4396 -44.11 -38.42 0.3959 supply_2 -0.0184 -1.92 -1.79 0.0166 supply_3 -2.5916 -268.06 -250.60 2.3337 supply_4 -1.7132 -179.04 -168.24 1.5428 supply_5 -2.3049 -225.88 -230.03 2.0756 supply_6 -1.3780 -137.06 -138.49 1.2410 supply_7 -2.0596 -208.16 -212.55 1.8547 supply_8 3.4200 358.29 368.68 -3.0798 supply_9 1.9576 188.80 189.10 -1.7628 supply_10 -2.3620 -215.48 -209.98 2.1270 supply_11 1.1852 110.32 89.01 -1.0673 supply_12 2.6183 258.69 201.34 -2.3578 supply_13 1.9874 204.52 168.14 -1.7897 supply_14 -0.1072 -10.59 -9.72 0.0966 supply_15 -2.6839 -255.29 -276.71 2.4169 supply_16 3.8259 376.66 402.10 -3.4452 supply_17 0.5270 45.59 50.80 -0.4746 supply_18 3.0021 312.27 313.42 -2.7035 supply_19 -2.0184 -213.48 -223.44 1.8176 supply_20 -0.8466 -96.08 -107.60 0.7623 supply_price supply_farmPrice supply_trend demand_1 -65.17 -63.66 -0.6496 demand_2 54.58 51.88 1.0470 demand_3 -236.89 -226.96 -6.8707 demand_4 -160.20 -150.38 -6.1319 demand_5 -192.86 -218.05 -9.8397 demand_6 -121.02 -131.66 -7.3012 demand_7 -159.51 -166.67 -11.0480 demand_8 269.33 282.28 20.5665 demand_9 112.76 127.09 10.5227 demand_10 -176.84 -195.00 -19.3840 demand_11 58.65 51.04 6.9309 demand_12 244.16 169.53 29.6547 demand_13 163.73 112.80 20.6833 demand_14 38.57 31.79 5.4681 demand_15 -167.48 -180.12 -26.4104 demand_16 308.92 329.47 50.2044 demand_17 61.50 78.57 12.0871 demand_18 186.07 165.47 32.1991 demand_19 -195.20 -164.81 -35.0650 demand_20 -23.10 -18.93 -4.0710 supply_1 39.72 38.80 0.3959 supply_2 1.73 1.64 0.0331 supply_3 241.39 231.27 7.0012 supply_4 161.23 151.34 6.1710 supply_5 203.41 229.98 10.3781 supply_6 123.42 134.27 7.4457 supply_7 187.45 195.86 12.9829 supply_8 -322.64 -338.16 -24.6380 supply_9 -170.02 -191.62 -15.8653 supply_10 194.04 213.98 21.2699 supply_11 -99.35 -86.45 -11.7402 supply_12 -232.95 -161.74 -28.2933 supply_13 -184.18 -126.89 -23.2663 supply_14 9.54 7.86 1.3521 supply_15 229.90 247.25 36.2539 supply_16 -339.19 -361.75 -55.1237 supply_17 -41.05 -52.44 -8.0678 supply_18 -281.20 -250.07 -48.6623 supply_19 192.24 162.31 34.5341 supply_20 86.52 70.90 15.2466 > round( colSums( estfun( fitsur1 ) ), digits = 7 ) demand_(Intercept) demand_price demand_income supply_(Intercept) 0 0 0 0 supply_price supply_farmPrice supply_trend 0 0 0 > > estfun( fitsur1e2 ) demand_(Intercept) demand_price demand_income supply_(Intercept) demand_1 1.09034 109.386 95.295 -0.80605 demand_2 -1.05992 -110.511 -103.448 0.78356 demand_3 4.28760 443.488 414.611 -3.16968 demand_4 2.85253 298.107 280.119 -2.10878 demand_5 3.80226 372.625 379.466 -2.81088 demand_6 2.36197 234.912 237.378 -1.74612 demand_7 3.06088 309.351 315.883 -2.26280 demand_8 -4.81806 -504.754 -519.386 3.56182 demand_9 -2.17915 -210.170 -210.506 1.61097 demand_10 3.70159 337.689 329.071 -2.73646 demand_11 -1.39799 -130.132 -104.989 1.03349 demand_12 -4.96091 -490.143 -381.494 3.66743 demand_13 -3.24623 -334.063 -274.631 2.39983 demand_14 -0.81794 -80.776 -74.105 0.60467 demand_15 3.49861 332.784 360.707 -2.58640 demand_16 -5.83443 -574.406 -613.199 4.31320 demand_17 -1.15650 -100.035 -111.487 0.85496 demand_18 -3.36717 -350.239 -351.532 2.48923 demand_19 3.59870 380.631 398.376 -2.66040 demand_20 0.58382 66.257 74.203 -0.43160 supply_1 -0.54811 -54.988 -47.905 0.47751 supply_2 0.00819 0.854 0.799 -0.00713 supply_3 -3.61236 -373.644 -349.315 3.14703 supply_4 -2.38151 -248.882 -233.865 2.07474 supply_5 -3.32295 -325.653 -331.631 2.89490 supply_6 -2.00948 -199.855 -201.953 1.75063 supply_7 -2.95622 -298.773 -305.081 2.57541 supply_8 4.67628 489.901 504.103 -4.07390 supply_9 2.65680 256.238 256.647 -2.31456 supply_10 -3.31875 -302.763 -295.037 2.89124 supply_11 1.84429 171.676 138.506 -1.60672 supply_12 3.95003 390.267 303.757 -3.44120 supply_13 3.01568 310.338 255.127 -2.62722 supply_14 -0.02452 -2.421 -2.221 0.02136 supply_15 -3.84791 -366.010 -396.720 3.35224 supply_16 5.24831 516.701 551.597 -4.57224 supply_17 0.59732 51.667 57.582 -0.52037 supply_18 4.17631 434.404 436.007 -3.63834 supply_19 -2.86060 -302.562 -316.668 2.49211 supply_20 -1.29079 -146.492 -164.060 1.12452 supply_price supply_farmPrice supply_trend demand_1 -80.865 -78.993 -0.8060 demand_2 81.697 77.651 1.5671 demand_3 -327.856 -314.115 -9.5090 demand_4 -220.380 -206.871 -8.4351 demand_5 -275.469 -311.446 -14.0544 demand_6 -173.662 -188.931 -10.4767 demand_7 -228.692 -238.952 -15.8396 demand_8 373.147 391.088 28.4946 demand_9 155.372 175.113 14.4987 demand_10 -249.642 -275.288 -27.3646 demand_11 96.202 83.712 11.3683 demand_12 362.346 251.586 44.0092 demand_13 246.962 170.148 31.1978 demand_14 59.715 49.220 8.4654 demand_15 -246.016 -264.589 -38.7961 demand_16 424.638 452.886 69.0111 demand_17 73.953 94.473 14.5344 demand_18 258.920 230.254 44.8061 demand_19 -281.388 -237.573 -50.5475 demand_20 -48.982 -40.138 -8.6319 supply_1 47.905 46.796 0.4775 supply_2 -0.744 -0.707 -0.0143 supply_3 325.513 311.871 9.4411 supply_4 216.822 203.532 8.2989 supply_5 283.704 320.755 14.4745 supply_6 174.111 189.418 10.5038 supply_7 260.286 271.963 18.0279 supply_8 -426.794 -447.314 -32.5912 supply_9 -223.230 -251.593 -20.8310 supply_10 263.762 290.859 28.9124 supply_11 -149.561 -130.144 -17.6739 supply_12 -339.994 -236.066 -41.2944 supply_13 -270.361 -186.270 -34.1538 supply_14 2.109 1.739 0.2990 supply_15 318.862 342.934 50.2836 supply_16 -450.142 -480.085 -73.1559 supply_17 -45.011 -57.501 -8.8464 supply_18 -378.445 -336.546 -65.4901 supply_19 263.588 222.545 47.3500 supply_20 127.621 104.580 22.4903 > round( colSums( estfun( fitsur1e2 ) ), digits = 7 ) demand_(Intercept) demand_price demand_income supply_(Intercept) 0 0 0 0 supply_price supply_farmPrice supply_trend 0 0 0 > > estfun( fitsur1r3 ) demand_(Intercept) demand_price demand_income supply_(Intercept) demand_1 1.07229 107.575 93.718 -0.79049 demand_2 -1.02096 -106.450 -99.646 0.75265 demand_3 4.16424 430.729 402.682 -3.06988 demand_4 2.77231 289.723 272.240 -2.04374 demand_5 3.68037 360.680 367.301 -2.71316 demand_6 2.28513 227.270 229.656 -1.68460 demand_7 2.96157 299.314 305.634 -2.18327 demand_8 -4.67889 -490.175 -504.385 3.44927 demand_9 -2.11749 -204.223 -204.549 1.56101 demand_10 3.58740 327.271 318.920 -2.64463 demand_11 -1.33464 -124.235 -100.231 0.98389 demand_12 -4.78276 -472.541 -367.794 3.52584 demand_13 -3.12449 -321.535 -264.332 2.30337 demand_14 -0.78522 -77.545 -71.141 0.57886 demand_15 3.37652 321.171 348.119 -2.48917 demand_16 -5.67080 -558.296 -596.001 4.18051 demand_17 -1.14172 -98.757 -110.062 0.84168 demand_18 -3.26836 -339.962 -341.217 2.40943 demand_19 3.47995 368.071 385.231 -2.56542 demand_20 0.54555 61.914 69.339 -0.40218 supply_1 -0.53834 -54.008 -47.051 0.47031 supply_2 0.00335 0.349 0.327 -0.00293 supply_3 -3.49682 -361.694 -338.143 3.05492 supply_4 -2.30621 -241.013 -226.470 2.01477 supply_5 -3.20507 -314.100 -319.866 2.80004 supply_6 -1.93606 -192.553 -194.574 1.69139 supply_7 -2.85248 -288.289 -294.376 2.49200 supply_8 4.53460 475.059 488.830 -3.96155 supply_9 2.57840 248.676 249.073 -2.25256 supply_10 -3.20906 -292.756 -285.286 2.80352 supply_11 1.76494 164.289 132.547 -1.54190 supply_12 3.79168 374.622 291.580 -3.31251 supply_13 2.89330 297.744 244.773 -2.52766 supply_14 -0.03625 -3.580 -3.284 0.03167 supply_15 -3.71220 -353.101 -382.728 3.24307 supply_16 5.08854 500.972 534.805 -4.44548 supply_17 0.59312 51.303 57.176 -0.51816 supply_18 4.04346 420.584 422.137 -3.53247 supply_19 -2.76240 -292.176 -305.797 2.41330 supply_20 -1.23648 -140.329 -157.157 1.08023 supply_price supply_farmPrice supply_trend demand_1 -79.304 -77.47 -0.79049 demand_2 78.475 74.59 1.50531 demand_3 -317.533 -304.22 -9.20963 demand_4 -213.583 -200.49 -8.17496 demand_5 -265.893 -300.62 -13.56581 demand_6 -167.543 -182.27 -10.10759 demand_7 -220.654 -230.55 -15.28289 demand_8 361.356 378.73 27.59420 demand_9 150.553 169.68 14.04907 demand_10 -241.264 -266.05 -26.44627 demand_11 91.586 79.70 10.82281 demand_12 348.357 241.87 42.31014 demand_13 237.035 163.31 29.94383 demand_14 57.166 47.12 8.10410 demand_15 -236.767 -254.64 -37.33751 demand_16 411.575 438.95 66.88809 demand_17 72.803 93.01 14.30850 demand_18 250.619 222.87 43.36977 demand_19 -271.341 -229.09 -48.74290 demand_20 -45.643 -37.40 -8.04353 supply_1 47.183 46.09 0.47031 supply_2 -0.305 -0.29 -0.00585 supply_3 315.985 302.74 9.16476 supply_4 210.555 197.65 8.05908 supply_5 274.406 310.24 14.00018 supply_6 168.219 183.01 10.14835 supply_7 251.857 263.16 17.44401 supply_8 -415.024 -434.98 -31.69241 supply_9 -217.250 -244.85 -20.27300 supply_10 255.760 282.03 28.03523 supply_11 -143.528 -124.89 -16.96088 supply_12 -327.279 -227.24 -39.75013 supply_13 -260.117 -179.21 -32.85963 supply_14 3.128 2.58 0.44339 supply_15 308.478 331.77 48.64611 supply_16 -437.662 -466.78 -71.12773 supply_17 -44.820 -57.26 -8.80876 supply_18 -367.434 -326.75 -63.58452 supply_19 255.253 215.51 45.85274 supply_20 122.595 100.46 21.60450 > round( colSums( estfun( fitsur1r3 ) ), digits = 7 ) demand_(Intercept) demand_price demand_income supply_(Intercept) 0 0 0 0 supply_price supply_farmPrice supply_trend 0 0 0 > > estfun( fitsur1w ) demand_(Intercept) demand_price demand_income supply_(Intercept) demand_1 0.9083 91.12 79.38 -0.6496 demand_2 -0.7320 -76.32 -71.44 0.5235 demand_3 3.2023 331.23 309.66 -2.2902 demand_4 2.1435 224.00 210.49 -1.5330 demand_5 2.7516 269.66 274.61 -1.9679 demand_6 1.7015 169.22 171.00 -1.2169 demand_7 2.2068 223.03 227.74 -1.5783 demand_8 -3.5946 -376.58 -387.50 2.5708 demand_9 -1.6348 -157.67 -157.92 1.1692 demand_10 2.7103 247.26 240.95 -1.9384 demand_11 -0.8810 -82.01 -66.16 0.6301 demand_12 -3.4554 -341.39 -265.72 2.4712 demand_13 -2.2246 -228.93 -188.20 1.5910 demand_14 -0.5461 -53.93 -49.48 0.3906 demand_15 2.4619 234.17 253.82 -1.7607 demand_16 -4.3873 -431.94 -461.11 3.1378 demand_17 -0.9942 -85.99 -95.84 0.7110 demand_18 -2.5012 -260.17 -261.13 1.7888 demand_19 2.5805 272.93 285.66 -1.8455 demand_20 0.2846 32.30 36.17 -0.2036 supply_1 -0.4396 -44.11 -38.42 0.3959 supply_2 -0.0184 -1.92 -1.79 0.0166 supply_3 -2.5916 -268.06 -250.60 2.3337 supply_4 -1.7132 -179.04 -168.24 1.5428 supply_5 -2.3049 -225.88 -230.03 2.0756 supply_6 -1.3780 -137.06 -138.49 1.2410 supply_7 -2.0596 -208.16 -212.55 1.8547 supply_8 3.4200 358.29 368.68 -3.0798 supply_9 1.9576 188.80 189.10 -1.7628 supply_10 -2.3620 -215.48 -209.98 2.1270 supply_11 1.1852 110.32 89.01 -1.0673 supply_12 2.6183 258.69 201.34 -2.3578 supply_13 1.9874 204.52 168.14 -1.7897 supply_14 -0.1072 -10.59 -9.72 0.0966 supply_15 -2.6839 -255.29 -276.71 2.4169 supply_16 3.8259 376.66 402.10 -3.4452 supply_17 0.5270 45.59 50.80 -0.4746 supply_18 3.0021 312.27 313.42 -2.7035 supply_19 -2.0184 -213.48 -223.44 1.8176 supply_20 -0.8466 -96.08 -107.60 0.7623 supply_price supply_farmPrice supply_trend demand_1 -65.17 -63.66 -0.6496 demand_2 54.58 51.88 1.0470 demand_3 -236.89 -226.96 -6.8707 demand_4 -160.20 -150.38 -6.1319 demand_5 -192.86 -218.05 -9.8397 demand_6 -121.02 -131.66 -7.3012 demand_7 -159.51 -166.67 -11.0480 demand_8 269.33 282.28 20.5665 demand_9 112.76 127.09 10.5227 demand_10 -176.84 -195.00 -19.3840 demand_11 58.65 51.04 6.9309 demand_12 244.16 169.53 29.6547 demand_13 163.73 112.80 20.6833 demand_14 38.57 31.79 5.4681 demand_15 -167.48 -180.12 -26.4104 demand_16 308.92 329.47 50.2044 demand_17 61.50 78.57 12.0871 demand_18 186.07 165.47 32.1991 demand_19 -195.20 -164.81 -35.0650 demand_20 -23.10 -18.93 -4.0710 supply_1 39.72 38.80 0.3959 supply_2 1.73 1.64 0.0331 supply_3 241.39 231.27 7.0012 supply_4 161.23 151.34 6.1710 supply_5 203.41 229.98 10.3781 supply_6 123.42 134.27 7.4457 supply_7 187.45 195.86 12.9829 supply_8 -322.64 -338.16 -24.6380 supply_9 -170.02 -191.62 -15.8653 supply_10 194.04 213.98 21.2699 supply_11 -99.35 -86.45 -11.7402 supply_12 -232.95 -161.74 -28.2933 supply_13 -184.18 -126.89 -23.2663 supply_14 9.54 7.86 1.3521 supply_15 229.90 247.25 36.2539 supply_16 -339.19 -361.75 -55.1237 supply_17 -41.05 -52.44 -8.0678 supply_18 -281.20 -250.07 -48.6623 supply_19 192.24 162.31 34.5341 supply_20 86.52 70.90 15.2466 > round( colSums( estfun( fitsur1w ) ), digits = 7 ) demand_(Intercept) demand_price demand_income supply_(Intercept) 0 0 0 0 supply_price supply_farmPrice supply_trend 0 0 0 > > estfun( fitsuri1e ) demand_(Intercept) demand_price demand_income supply_(Intercept) demand_1 0.5467 54.84 47.78 0.5219 demand_2 -0.5182 -54.03 -50.58 -0.4947 demand_3 1.5799 163.41 152.77 1.5082 demand_4 0.9787 102.28 96.11 0.9343 demand_5 1.4899 146.02 148.70 1.4224 demand_6 0.8875 88.27 89.19 0.8472 demand_7 1.0809 109.24 111.55 1.0319 demand_8 -2.1165 -221.73 -228.15 -2.0205 demand_9 -0.7383 -71.21 -71.32 -0.7049 demand_10 1.7668 161.19 157.07 1.6867 demand_11 -0.0682 -6.35 -5.12 -0.0651 demand_12 -1.6133 -159.40 -124.07 -1.5402 demand_13 -1.1570 -119.06 -97.88 -1.1045 demand_14 -0.1925 -19.01 -17.44 -0.1838 demand_15 1.4026 133.41 144.61 1.3390 demand_16 -2.3128 -227.70 -243.08 -2.2080 demand_17 -0.0876 -7.58 -8.44 -0.0836 demand_18 -1.4924 -155.23 -155.81 -1.4247 demand_19 1.0702 113.20 118.47 1.0217 demand_20 -0.5064 -57.47 -64.36 -0.4834 supply_1 0.1054 10.57 9.21 0.1789 supply_2 -0.8882 -92.60 -86.68 -1.5080 supply_3 -0.5218 -53.97 -50.46 -0.8859 supply_4 -0.2644 -27.63 -25.96 -0.4489 supply_5 -0.7666 -75.13 -76.51 -1.3016 supply_6 -0.4056 -40.34 -40.77 -0.6887 supply_7 -0.8114 -82.00 -83.74 -1.3777 supply_8 1.4243 149.22 153.54 2.4183 supply_9 1.0270 99.05 99.21 1.7438 supply_10 -1.0278 -93.77 -91.37 -1.7451 supply_11 0.6336 58.98 47.58 1.0758 supply_12 0.2724 26.92 20.95 0.4626 supply_13 0.8434 86.79 71.35 1.4319 supply_14 -0.7107 -70.19 -64.39 -1.2067 supply_15 -1.5343 -145.94 -158.18 -2.6050 supply_16 1.1276 111.01 118.51 1.9145 supply_17 -0.6907 -59.75 -66.58 -1.1727 supply_18 2.2394 232.94 233.79 3.8022 supply_19 0.1792 18.96 19.84 0.3043 supply_20 -0.2309 -26.21 -29.35 -0.3921 supply_income supply_farmPrice supply_trend demand_1 45.61 51.15 0.522 demand_2 -48.28 -49.03 -0.989 demand_3 145.85 149.47 4.525 demand_4 91.75 91.66 3.737 demand_5 141.95 157.60 7.112 demand_6 85.15 91.67 5.083 demand_7 106.49 108.97 7.223 demand_8 -217.81 -221.85 -16.164 demand_9 -68.09 -76.62 -6.344 demand_10 149.95 169.69 16.867 demand_11 -4.89 -5.28 -0.717 demand_12 -118.44 -105.66 -18.482 demand_13 -93.44 -78.31 -14.359 demand_14 -16.65 -14.96 -2.573 demand_15 138.05 136.98 20.085 demand_16 -232.06 -231.84 -35.327 demand_17 -8.06 -9.24 -1.421 demand_18 -148.74 -131.79 -25.645 demand_19 113.10 91.24 19.412 demand_20 -61.44 -44.96 -9.668 supply_1 15.64 17.53 0.179 supply_2 -147.18 -149.44 -3.016 supply_3 -85.67 -87.79 -2.658 supply_4 -44.08 -44.04 -1.796 supply_5 -129.90 -144.21 -6.508 supply_6 -69.22 -74.52 -4.132 supply_7 -142.17 -145.48 -9.644 supply_8 260.69 265.53 19.346 supply_9 168.45 189.55 15.694 supply_10 -155.14 -175.56 -17.451 supply_11 80.79 87.14 11.833 supply_12 35.57 31.73 5.551 supply_13 121.14 101.52 18.615 supply_14 -109.33 -98.23 -16.894 supply_15 -268.57 -266.49 -39.075 supply_16 201.22 201.03 30.633 supply_17 -113.05 -129.59 -19.937 supply_18 396.95 351.71 68.440 supply_19 33.69 27.18 5.782 supply_20 -49.83 -36.46 -7.841 > round( colSums( estfun( fitsuri1e ) ), digits = 7 ) demand_(Intercept) demand_price demand_income supply_(Intercept) 0 0 0 0 supply_income supply_farmPrice supply_trend 0 0 0 > > estfun( fitsuri1wr3 ) demand_(Intercept) demand_price demand_income supply_(Intercept) demand_1 0.5102 51.19 44.59 0.4867 demand_2 -0.4886 -50.94 -47.68 -0.4661 demand_3 1.4782 152.90 142.94 1.4102 demand_4 0.9143 95.55 89.79 0.8722 demand_5 1.3982 137.03 139.54 1.3339 demand_6 0.8327 82.82 83.69 0.7944 demand_7 1.0134 102.42 104.59 0.9668 demand_8 -1.9849 -207.94 -213.97 -1.8935 demand_9 -0.6897 -66.52 -66.63 -0.6580 demand_10 1.6602 151.46 147.60 1.5838 demand_11 -0.0636 -5.92 -4.77 -0.0606 demand_12 -1.5152 -149.71 -116.52 -1.4455 demand_13 -1.0888 -112.05 -92.11 -1.0387 demand_14 -0.1809 -17.86 -16.39 -0.1726 demand_15 1.3190 125.46 135.99 1.2583 demand_16 -2.1651 -213.16 -227.55 -2.0655 demand_17 -0.0731 -6.33 -7.05 -0.0698 demand_18 -1.4001 -145.63 -146.17 -1.3357 demand_19 1.0017 105.95 110.89 0.9556 demand_20 -0.4780 -54.25 -60.76 -0.4560 supply_1 0.0755 7.57 6.60 0.1193 supply_2 -0.8526 -88.90 -83.22 -1.3478 supply_3 -0.5074 -52.48 -49.07 -0.8021 supply_4 -0.2631 -27.49 -25.83 -0.4159 supply_5 -0.7425 -72.77 -74.10 -1.1737 supply_6 -0.3998 -39.77 -40.18 -0.6320 supply_7 -0.7750 -78.33 -79.98 -1.2251 supply_8 1.3178 138.06 142.06 2.0831 supply_9 0.9476 91.39 91.54 1.4979 supply_10 -0.9683 -88.34 -86.08 -1.5306 supply_11 0.6060 56.40 45.51 0.9578 supply_12 0.2813 27.79 21.63 0.4446 supply_13 0.8170 84.07 69.12 1.2914 supply_14 -0.6451 -63.71 -58.44 -1.0197 supply_15 -1.4315 -136.17 -147.59 -2.2629 supply_16 1.0615 104.50 111.56 1.6779 supply_17 -0.6453 -55.82 -62.21 -1.0200 supply_18 2.1183 220.33 221.15 3.3484 supply_19 0.1946 20.58 21.54 0.3076 supply_20 -0.1888 -21.42 -23.99 -0.2984 supply_income supply_farmPrice supply_trend demand_1 42.54 47.70 0.487 demand_2 -45.49 -46.19 -0.932 demand_3 136.37 139.75 4.231 demand_4 85.65 85.57 3.489 demand_5 133.12 147.79 6.669 demand_6 79.84 85.95 4.766 demand_7 99.77 102.09 6.768 demand_8 -204.12 -207.91 -15.148 demand_9 -63.56 -71.52 -5.922 demand_10 140.80 159.34 15.838 demand_11 -4.55 -4.91 -0.667 demand_12 -111.16 -99.16 -17.346 demand_13 -87.88 -73.64 -13.503 demand_14 -15.63 -14.05 -2.416 demand_15 129.73 128.72 18.874 demand_16 -217.08 -216.88 -33.048 demand_17 -6.73 -7.71 -1.186 demand_18 -139.45 -123.55 -24.042 demand_19 105.78 85.33 18.156 demand_20 -57.96 -42.41 -9.120 supply_1 10.43 11.69 0.119 supply_2 -131.54 -133.56 -2.696 supply_3 -77.56 -79.49 -2.406 supply_4 -40.84 -40.80 -1.663 supply_5 -117.13 -130.04 -5.868 supply_6 -63.52 -68.39 -3.792 supply_7 -126.43 -129.37 -8.575 supply_8 224.56 228.72 16.665 supply_9 144.70 162.82 13.481 supply_10 -136.07 -153.98 -15.306 supply_11 71.93 77.58 10.536 supply_12 34.19 30.50 5.335 supply_13 109.25 91.56 16.788 supply_14 -92.38 -83.00 -14.276 supply_15 -233.30 -231.49 -33.943 supply_16 176.34 176.17 26.846 supply_17 -98.33 -112.71 -17.341 supply_18 349.57 309.73 60.271 supply_19 34.05 27.47 5.845 supply_20 -37.92 -27.75 -5.967 > round( colSums( estfun( fitsuri1wr3 ) ), digits = 7 ) demand_(Intercept) demand_price demand_income supply_(Intercept) 0 0 0 0 supply_income supply_farmPrice supply_trend 0 0 0 > > estfun( fitsurS1 ) eq1_consump eq2_(Intercept) eq2_consump eq2_trend eq1_1 7.162 0.02160 2.127 0.0216 eq1_2 15.562 0.04659 4.621 0.0932 eq1_3 6.026 0.01752 1.789 0.0525 eq1_4 10.524 0.03079 3.125 0.1232 eq1_5 -14.099 -0.04017 -4.187 -0.2008 eq1_6 -7.426 -0.02136 -2.205 -0.1282 eq1_7 -5.141 -0.01468 -1.527 -0.1028 eq1_8 15.138 0.04500 4.495 0.3600 eq1_9 -7.596 -0.02248 -2.256 -0.2023 eq1_10 -28.217 -0.08150 -8.379 -0.8150 eq1_11 -3.498 -0.01088 -1.039 -0.1197 eq1_12 17.457 0.05609 5.184 0.6731 eq1_13 22.800 0.07162 6.771 0.9311 eq1_14 2.479 0.00746 0.736 0.1044 eq1_15 -26.446 -0.07423 -7.853 -1.1135 eq1_16 -2.054 -0.00609 -0.610 -0.0974 eq1_17 -42.973 -0.12327 -12.761 -2.0956 eq1_18 13.132 0.03902 3.900 0.7024 eq1_19 4.307 0.01216 1.279 0.2310 eq1_20 22.866 0.06392 6.790 1.2784 eq2_1 -1.322 -0.02928 -2.884 -0.0293 eq2_2 -0.971 -0.02136 -2.118 -0.0427 eq2_3 -5.293 -0.11298 -11.542 -0.3389 eq2_4 -4.273 -0.09180 -9.318 -0.3672 eq2_5 1.836 0.03840 4.003 0.1920 eq2_6 2.119 0.04477 4.622 0.2686 eq2_7 -0.532 -0.01115 -1.160 -0.0781 eq2_8 10.068 0.21978 21.956 1.7582 eq2_9 9.192 0.19974 20.044 1.7977 eq2_10 -0.465 -0.00986 -1.014 -0.0986 eq2_11 -2.679 -0.06122 -5.843 -0.6735 eq2_12 -6.257 -0.14762 -13.644 -1.7715 eq2_13 -7.360 -0.16978 -16.050 -2.2072 eq2_14 -5.865 -0.12951 -12.790 -1.8131 eq2_15 -0.730 -0.01505 -1.593 -0.2258 eq2_16 11.188 0.24342 24.396 3.8947 eq2_17 11.047 0.23271 24.091 3.9561 eq2_18 3.346 0.07302 7.297 1.3144 eq2_19 -7.478 -0.15498 -16.307 -2.9445 eq2_20 -5.570 -0.11434 -12.146 -2.2868 > round( colSums( estfun( fitsurS1 ) ), digits = 7 ) eq1_consump eq2_(Intercept) eq2_consump eq2_trend 0 0 0 0 > > estfun( fitsurS2 ) eq1_price eq2_trend eq1_1 -5.42871 -0.000114 eq1_2 -13.14782 -0.000531 eq1_3 -4.34907 -0.000266 eq1_4 -8.39779 -0.000677 eq1_5 12.19030 0.001310 eq1_6 6.97176 0.000886 eq1_7 5.14513 0.000750 eq1_8 -12.72321 -0.002046 eq1_9 7.04895 0.001385 eq1_10 22.20478 0.005126 eq1_11 3.65437 0.000909 eq1_12 -15.21951 -0.003893 eq1_13 -20.44077 -0.005438 eq1_14 -1.31641 -0.000393 eq1_15 21.18383 0.007035 eq1_16 2.54257 0.000870 eq1_17 31.47441 0.013026 eq1_18 -10.84129 -0.003951 eq1_19 -2.78655 -0.001054 eq1_20 -19.91341 -0.007390 eq2_1 0.42448 0.037215 eq2_2 0.40866 0.068949 eq2_3 0.38411 0.097989 eq2_4 0.34891 0.117463 eq2_5 0.30591 0.137281 eq2_6 0.27161 0.144126 eq2_7 0.24474 0.149098 eq2_8 0.19771 0.132796 eq2_9 0.15083 0.123801 eq2_10 0.12174 0.117373 eq2_11 0.06024 0.062610 eq2_12 0.01611 0.017205 eq2_13 -0.00856 -0.009507 eq2_14 -0.02284 -0.028474 eq2_15 -0.02363 -0.032773 eq2_16 -0.08383 -0.119831 eq2_17 -0.09018 -0.155889 eq2_18 -0.16161 -0.245985 eq2_19 -0.17473 -0.276076 eq2_20 -0.22123 -0.342915 > round( colSums( estfun( fitsurS2 ) ), digits = 7 ) eq1_price eq2_trend 0 0 > > estfun( fitsurS3 ) eq1_trend eq2_trend eq1_1 2.069 -2.039 eq1_2 3.833 -3.777 eq1_3 5.448 -5.369 eq1_4 6.531 -6.436 eq1_5 7.634 -7.523 eq1_6 8.015 -7.899 eq1_7 8.293 -8.173 eq1_8 7.389 -7.281 eq1_9 6.890 -6.790 eq1_10 6.535 -6.440 eq1_11 3.493 -3.443 eq1_12 0.972 -0.958 eq1_13 -0.510 0.503 eq1_14 -1.562 1.539 eq1_15 -1.798 1.772 eq1_16 -6.634 6.537 eq1_17 -8.634 8.509 eq1_18 -13.639 13.441 eq1_19 -15.308 15.085 eq1_20 -19.019 18.743 eq2_1 -2.082 2.089 eq2_2 -4.012 4.027 eq2_3 -5.472 5.491 eq2_4 -6.736 6.760 eq2_5 -6.873 6.897 eq2_6 -7.460 7.486 eq2_7 -7.809 7.837 eq2_8 -8.276 8.305 eq2_9 -6.161 6.182 eq2_10 -4.039 4.053 eq2_11 -3.098 3.109 eq2_12 -2.949 2.960 eq2_13 -2.261 2.269 eq2_14 1.160 -1.164 eq2_15 4.921 -4.939 eq2_16 6.677 -6.701 eq2_17 14.428 -14.479 eq2_18 11.167 -11.207 eq2_19 14.155 -14.205 eq2_20 14.719 -14.771 > round( colSums( estfun( fitsurS3 ) ), digits = 7 ) eq1_trend eq2_trend 0 0 > > try( estfun( fitsurS4 ) ) Error in estfun.systemfit(fitsurS4) : returning the estimation function for models with restrictions has not yet been implemented. > > estfun( fitsurS5 ) eq1_(Intercept) eq2_(Intercept) eq1_1 -0.17267 0.01074 eq1_2 -0.12244 0.00761 eq1_3 0.09050 -0.00563 eq1_4 0.04335 -0.00270 eq1_5 0.23912 -0.01487 eq1_6 0.16778 -0.01043 eq1_7 0.22144 -0.01377 eq1_8 -0.07143 0.00444 eq1_9 -0.03923 0.00244 eq1_10 0.13751 -0.00855 eq1_11 -0.39091 0.02431 eq1_12 -0.60636 0.03770 eq1_13 -0.45531 0.02831 eq1_14 -0.15321 0.00953 eq1_15 0.35053 -0.02180 eq1_16 -0.04817 0.00300 eq1_17 0.18774 -0.01167 eq1_18 -0.06935 0.00431 eq1_19 0.30946 -0.01924 eq1_20 0.38165 -0.02373 eq2_1 -0.00135 0.00874 eq2_2 -0.01889 0.12205 eq2_3 -0.01520 0.09821 eq2_4 -0.01996 0.12901 eq2_5 0.00898 -0.05802 eq2_6 0.00251 -0.01619 eq2_7 -0.00466 0.03010 eq2_8 -0.02111 0.13640 eq2_9 0.01590 -0.10273 eq2_10 0.03911 -0.25276 eq2_11 0.03085 -0.19937 eq2_12 0.00542 -0.03502 eq2_13 -0.01285 0.08306 eq2_14 0.00562 -0.03631 eq2_15 0.02180 -0.14088 eq2_16 0.00698 -0.04508 eq2_17 0.06016 -0.38875 eq2_18 -0.01778 0.11492 eq2_19 -0.02558 0.16532 eq2_20 -0.05994 0.38731 > round( colSums( estfun( fitsurS5 ) ), digits = 7 ) eq1_(Intercept) eq2_(Intercept) 0 0 > > > ## **************** bread ************************ > round( bread( fitsur1 ), digits = 7 ) demand_(Intercept) demand_price demand_income supply_(Intercept) [1,] 2258.680 -23.5779 1.0971 2354.23 [2,] -23.578 0.3134 -0.0796 -15.01 [3,] 1.097 -0.0796 0.0704 -8.66 [4,] 2354.232 -15.0109 -8.6593 4911.36 [5,] -24.454 0.2225 0.0225 -38.45 [6,] 0.887 -0.0644 0.0569 -9.51 [7,] 1.348 -0.0978 0.0864 -12.94 supply_price supply_farmPrice supply_trend [1,] -24.4536 0.8871 1.3477 [2,] 0.2225 -0.0644 -0.0978 [3,] 0.0225 0.0569 0.0864 [4,] -38.4456 -9.5077 -12.9352 [5,] 0.3567 0.0252 0.0320 [6,] 0.0252 0.0636 0.0807 [7,] 0.0320 0.0807 0.1845 > > round( bread( fitsur1e2 ), digits = 7 ) demand_(Intercept) demand_price demand_income supply_(Intercept) [1,] 2257.61 -23.5004 1.0286 2442.20 [2,] -23.50 0.3077 -0.0746 -16.15 [3,] 1.03 -0.0746 0.0660 -8.39 [4,] 2442.20 -16.1480 -8.3922 4816.72 [5,] -25.30 0.2317 0.0218 -38.19 [6,] 0.86 -0.0624 0.0552 -8.86 [7,] 1.31 -0.0948 0.0838 -12.35 supply_price supply_farmPrice supply_trend [1,] -25.2995 0.8598 1.3061 [2,] 0.2317 -0.0624 -0.0948 [3,] 0.0218 0.0552 0.0838 [4,] -38.1886 -8.8582 -12.3470 [5,] 0.3560 0.0234 0.0309 [6,] 0.0234 0.0590 0.0780 [7,] 0.0309 0.0780 0.1640 > > round( bread( fitsur1r3 ), digits = 7 ) demand_(Intercept) demand_price demand_income supply_(Intercept) [1,] 2257.728 -23.5088 1.0361 2434.43 [2,] -23.509 0.3083 -0.0752 -16.03 [3,] 1.036 -0.0752 0.0665 -8.43 [4,] 2434.429 -16.0346 -8.4292 4826.83 [5,] -25.226 0.2308 0.0219 -38.22 [6,] 0.864 -0.0627 0.0554 -8.93 [7,] 1.312 -0.0952 0.0842 -12.42 supply_price supply_farmPrice supply_trend [1,] -25.2264 0.8636 1.3118 [2,] 0.2308 -0.0627 -0.0952 [3,] 0.0219 0.0554 0.0842 [4,] -38.2158 -8.9270 -12.4169 [5,] 0.3561 0.0235 0.0310 [6,] 0.0235 0.0595 0.0784 [7,] 0.0310 0.0784 0.1660 > > round( bread( fitsur1w ), digits = 7 ) demand_(Intercept) demand_price demand_income supply_(Intercept) [1,] 2258.680 -23.5779 1.0971 2354.23 [2,] -23.578 0.3134 -0.0796 -15.01 [3,] 1.097 -0.0796 0.0704 -8.66 [4,] 2354.232 -15.0109 -8.6593 4911.36 [5,] -24.454 0.2225 0.0225 -38.45 [6,] 0.887 -0.0644 0.0569 -9.51 [7,] 1.348 -0.0978 0.0864 -12.94 supply_price supply_farmPrice supply_trend [1,] -24.4536 0.8871 1.3477 [2,] 0.2225 -0.0644 -0.0978 [3,] 0.0225 0.0569 0.0864 [4,] -38.4456 -9.5077 -12.9352 [5,] 0.3567 0.0252 0.0320 [6,] 0.0252 0.0636 0.0807 [7,] 0.0320 0.0807 0.1845 > > round( bread( fitsuri1e ), digits = 7 ) demand_(Intercept) demand_price demand_income supply_(Intercept) [1,] 1876.862 -19.2519 0.5677 -81.89 [2,] -19.252 0.2661 -0.0755 -2.81 [3,] 0.568 -0.0755 0.0716 3.68 [4,] -81.887 -2.8102 3.6811 363.96 [5,] 7.186 -0.0595 -0.0127 -1.84 [6,] -5.538 0.0766 -0.0217 -1.67 [7,] -8.357 0.1155 -0.0328 -1.82 supply_income supply_farmPrice supply_trend [1,] 7.1857 -5.5385 -8.3572 [2,] -0.0595 0.0766 0.1155 [3,] -0.0127 -0.0217 -0.0328 [4,] -1.8380 -1.6714 -1.8169 [5,] 0.0569 -0.0327 -0.0527 [6,] -0.0327 0.0441 0.0571 [7,] -0.0527 0.0571 0.1367 > > round( bread( fitsuri1wr3 ), digits = 7 ) demand_(Intercept) demand_price demand_income supply_(Intercept) [1,] 2182.020 -22.2793 0.5557 -108.13 [2,] -22.279 0.3080 -0.0874 -3.49 [3,] 0.556 -0.0874 0.0839 4.64 [4,] -108.127 -3.4932 4.6397 458.64 [5,] 8.996 -0.0739 -0.0164 -2.35 [6,] -6.884 0.0952 -0.0270 -2.07 [7,] -10.388 0.1436 -0.0408 -2.31 supply_income supply_farmPrice supply_trend [1,] 8.9961 -6.8844 -10.3882 [2,] -0.0739 0.0952 0.1436 [3,] -0.0164 -0.0270 -0.0408 [4,] -2.3500 -2.0691 -2.3134 [5,] 0.0715 -0.0407 -0.0653 [6,] -0.0407 0.0547 0.0717 [7,] -0.0653 0.0717 0.1662 > > round( bread( fitsurS1 ), digits = 7 ) eq1_consump eq2_(Intercept) eq2_consump eq2_trend [1,] 0.00876 0.0 -4.02e-03 0.000 [2,] 0.00000 91218.4 -9.08e+02 48.892 [3,] -0.00402 -908.0 9.09e+00 -0.866 [4,] 0.00000 48.9 -8.66e-01 3.664 > > round( bread( fitsurS2 ), digits = 7 ) eq1_price eq2_trend [1,] 0.00903 -0.00752 [2,] -0.00752 34.11430 > > round( bread( fitsurS3 ), digits = 7 ) eq1_trend eq2_trend [1,] 34.1 34.0 [2,] 34.0 34.5 > > try( bread( fitsurS4 ) ) Error in bread.systemfit(fitsurS4) : returning the 'bread' for models with restrictions has not yet been implemented. > > proc.time() user system elapsed 3.560 0.088 3.645 systemfit/tests/test_sur.R0000644000176200001440000013401512565331457015455 0ustar liggesuserslibrary( systemfit ) options( digits = 3 ) data( "Kmenta" ) useMatrix <- FALSE demand <- consump ~ price + income supply <- consump ~ price + farmPrice + trend system <- list( demand = demand, supply = supply ) restrm <- matrix(0,1,7) # restriction matrix "R" restrm[1,3] <- 1 restrm[1,7] <- -1 restrict <- "demand_income - supply_trend = 0" restr2m <- matrix(0,2,7) # restriction matrix "R" 2 restr2m[1,3] <- 1 restr2m[1,7] <- -1 restr2m[2,2] <- -1 restr2m[2,5] <- 1 restr2q <- c( 0, 0.5 ) # restriction vector "q" 2 restrict2 <- c( "demand_income - supply_trend = 0", "- demand_price + supply_price = 0.5" ) restrict2i <- c( "demand_income - supply_trend = 0", "- demand_price + supply_income = 0.5" ) tc <- matrix(0,7,6) tc[1,1] <- 1 tc[2,2] <- 1 tc[3,3] <- 1 tc[4,4] <- 1 tc[5,5] <- 1 tc[6,6] <- 1 tc[7,3] <- 1 restr3m <- matrix(0,1,6) # restriction matrix "R" 2 restr3m[1,2] <- -1 restr3m[1,5] <- 1 restr3q <- c( 0.5 ) # restriction vector "q" 2 restrict3 <- "- C2 + C5 = 0.5" # the standard equations do not converge and lead to a singular weighting matrix # both in R and in EViews, since both equations have the same endogenous variable supply2 <- price ~ income + farmPrice + trend system2 <- list( demand = demand, supply = supply2 ) ## *************** SUR estimation ************************ fitsur1 <- systemfit( system, "SUR", data = Kmenta, useMatrix = useMatrix ) print( summary( fitsur1 ) ) nobs( fitsur1 ) ## ********************* SUR (EViews-like) ***************** fitsur1e <- systemfit( system, "SUR", data = Kmenta, methodResidCov = "noDfCor", useMatrix = useMatrix ) print( summary( fitsur1e, useDfSys = TRUE ) ) nobs( fitsur1e ) ## ********************* SUR (methodResidCov="Theil") ***************** fitsur1r2 <- systemfit( system, "SUR", data = Kmenta, methodResidCov = "Theil", useMatrix = useMatrix ) print( summary( fitsur1r2 ) ) ## *************** SUR (methodResidCov="Theil", useDfSys = TRUE ) *************** fitsur1e2 <- systemfit( system, "SUR", data = Kmenta, methodResidCov = "Theil", x = TRUE, useMatrix = useMatrix ) print( summary( fitsur1e2, useDfSys = TRUE ) ) ## ********************* SUR (methodResidCov="max") ***************** fitsur1r3 <- systemfit( system, "SUR", data = Kmenta, methodResidCov = "max", useMatrix = useMatrix ) print( summary( fitsur1r3 ) ) ## *************** WSUR estimation ************************ fitsur1w <- systemfit( system, "SUR", data = Kmenta, residCovWeighted = TRUE, useMatrix = useMatrix ) summary( fitsur1w ) nobs( fitsur1w ) ## *************** WSUR (methodResidCov="Theil", useDfSys = TRUE ) *************** fitsur1we2 <- systemfit( system, "SUR", data = Kmenta, methodResidCov = "Theil", residCovWeighted = TRUE, useMatrix = useMatrix ) summary( fitsur1we2, useDfSys = TRUE ) ## *************** SUR with cross-equation restriction ************** fitsur2 <- systemfit( system, "SUR", data = Kmenta, restrict.matrix = restrm, useMatrix = useMatrix ) print( summary( fitsur2 ) ) nobs( fitsur2 ) # the same with symbolically specified restrictions fitsur2Sym <- systemfit( system, "SUR", data = Kmenta, restrict.matrix = restrict, useMatrix = useMatrix ) all.equal( fitsur2, fitsur2Sym ) nobs( fitsur2Sym ) ## *************** SUR with cross-equation restriction (EViews-like) ** fitsur2e <- systemfit( system, "SUR", data = Kmenta, restrict.matrix = restrm, methodResidCov = "noDfCor", x = TRUE, useMatrix = useMatrix ) print( summary( fitsur2e ) ) ## *************** WSUR with cross-equation restriction (EViews-like) ** fitsur2we <- systemfit( system, "SUR", data = Kmenta, restrict.matrix = restrm, methodResidCov = "noDfCor", residCovWeighted = TRUE, x = TRUE, useMatrix = useMatrix ) summary( fitsur2we ) ## *************** SUR with restriction via restrict.regMat ******************* fitsur3 <- systemfit( system, "SUR", data = Kmenta, restrict.regMat = tc, useMatrix = useMatrix ) print( summary( fitsur3 ) ) nobs( fitsur3 ) ## *************** SUR with restriction via restrict.regMat (EViews-like) ************** fitsur3e <- systemfit( system, "SUR", data = Kmenta, restrict.regMat = tc, methodResidCov = "noDfCor", x = TRUE, useMatrix = useMatrix ) print( summary( fitsur3e ) ) ## *************** WSUR with restriction via restrict.regMat ******************* fitsur3w <- systemfit( system, "SUR", data = Kmenta, restrict.regMat = tc, residCovWeighted = TRUE, x = TRUE, useMatrix = useMatrix ) summary( fitsur3w ) ## *************** SUR with 2 restrictions *************************** fitsur4 <- systemfit( system, "SUR", data = Kmenta, restrict.matrix = restr2m, restrict.rhs = restr2q, useMatrix = useMatrix ) print( summary( fitsur4 ) ) nobs( fitsur4 ) # the same with symbolically specified restrictions fitsur4Sym <- systemfit( system, "SUR", data = Kmenta, restrict.matrix = restrict2, useMatrix = useMatrix ) all.equal( fitsur4, fitsur4Sym ) ## *************** SUR with 2 restrictions (EViews-like) ************** fitsur4e <- systemfit( system, "SUR", data = Kmenta, methodResidCov = "noDfCor", restrict.matrix = restr2m, restrict.rhs = restr2q, useMatrix = useMatrix ) print( summary( fitsur4e ) ) ## *************** SUR with 2 restrictions (methodResidCov = "Theil") ************** fitsur4r2 <- systemfit( system, "SUR", data = Kmenta, methodResidCov = "Theil", restrict.matrix = restr2m, restrict.rhs = restr2q, useMatrix = useMatrix ) print( summary( fitsur4r2 ) ) ## *************** SUR with 2 restrictions (methodResidCov = "max") ************** fitsur4r3 <- systemfit( system, "SUR", data = Kmenta, methodResidCov = "max", restrict.matrix = restr2m, restrict.rhs = restr2q, x = TRUE, useMatrix = useMatrix ) print( summary( fitsur4r3 ) ) ## *************** WSUR with 2 restrictions (EViews-like) ************** fitsur4we <- systemfit( system, "SUR", data = Kmenta, methodResidCov = "noDfCor", restrict.matrix = restr2m, restrict.rhs = restr2q, residCovWeighted = TRUE, useMatrix = useMatrix ) summary( fitsur4we ) ## *************** SUR with 2 restrictions via R and restrict.regMat **************** fitsur5 <- systemfit( system, "SUR", data = Kmenta, restrict.matrix = restr3m, restrict.rhs = restr3q, restrict.regMat = tc, x = TRUE, useMatrix = useMatrix ) print( summary( fitsur5 ) ) nobs( fitsur5 ) # the same with symbolically specified restrictions fitsur5Sym <- systemfit( system, "SUR", data = Kmenta, restrict.matrix = restrict3, restrict.regMat = tc, x = TRUE, useMatrix = useMatrix ) all.equal( fitsur5, fitsur5Sym ) ## *************** SUR with 2 restrictions via R and restrict.regMat (EViews-like) ************** fitsur5e <- systemfit( system, "SUR", data = Kmenta, methodResidCov = "noDfCor", restrict.matrix = restr3m, restrict.rhs = restr3q, restrict.regMat = tc, useMatrix = useMatrix ) print( summary( fitsur5e ) ) ## ************ WSUR with 2 restrictions via R and restrict.regMat ************ fitsur5w <- systemfit( system, "SUR", data = Kmenta, restrict.matrix = restr3m, restrict.rhs = restr3q, restrict.regMat = tc, residCovWeighted = TRUE, useMatrix = useMatrix ) summary( fitsur5w ) ## ************** iterated SUR **************************** fitsuri1 <- systemfit( system2, "SUR", data = Kmenta, maxit = 100, useMatrix = useMatrix ) print( summary( fitsuri1 ) ) nobs( fitsuri1 ) ## ************** iterated SUR (EViews-like) ***************** fitsuri1e <- systemfit( system2, "SUR", data = Kmenta, methodResidCov = "noDfCor", maxit = 100, useMatrix = useMatrix ) print( summary( fitsuri1e, useDfSys = TRUE ) ) ## ************** iterated SUR (methodResidCov = "Theil") **************************** fitsuri1r2 <- systemfit( system2, "SUR", data = Kmenta, maxit = 100, methodResidCov = "Theil", useMatrix = useMatrix ) print( summary( fitsuri1r2 ) ) ## ************** iterated SUR (methodResidCov="Theil", useDfSys=TRUE) ***************** fitsuri1e2 <- systemfit( system2, "SUR", data = Kmenta, methodResidCov = "Theil", maxit = 100, x = TRUE, useMatrix = useMatrix ) print( summary( fitsuri1e2, useDfSys = TRUE ) ) ## ************** iterated SUR (methodResidCov = "max") **************************** fitsuri1r3 <- systemfit( system2, "SUR", data = Kmenta, maxit = 100, methodResidCov = "max", useMatrix = useMatrix ) print( summary( fitsuri1r3 ) ) ## ************** iterated WSUR (methodResidCov = "max") **************************** fitsuri1wr3 <- systemfit( system2, "SUR", data = Kmenta, maxit = 100, methodResidCov = "max", residCovWeighted = TRUE, useMatrix = useMatrix ) summary( fitsuri1wr3 ) ## *********** iterated SUR with restriction ******************* fitsuri2 <- systemfit( system2, "SUR", data = Kmenta, restrict.matrix = restrm, maxit = 100, useMatrix = useMatrix ) print( summary( fitsuri2 ) ) ## *********** iterated SUR with restriction (EViews-like) *************** fitsuri2e <- systemfit( system2, "SUR", data = Kmenta, restrict.matrix = restrm, methodResidCov = "noDfCor", maxit = 100, x = TRUE, useMatrix = useMatrix ) print( summary( fitsuri2e ) ) ## *********** iterated WSUR with restriction ******************* fitsuri2w <- systemfit( system2, "SUR", data = Kmenta, restrict.matrix = restrm, maxit = 100, residCovWeighted = TRUE, useMatrix = useMatrix ) summary( fitsuri2w ) ## *********** iterated SUR with restriction via restrict.regMat ******************** fitsuri3 <- systemfit( system2, "SUR", data = Kmenta, restrict.regMat = tc, maxit = 100, useMatrix = useMatrix ) print( summary( fitsuri3 ) ) ## *********** iterated SUR with restriction via restrict.regMat (EViews-like) *************** fitsuri3e <- systemfit( system2, "SUR", data = Kmenta, restrict.regMat = tc, methodResidCov = "noDfCor", maxit = 100, x = TRUE, useMatrix = useMatrix ) print( summary( fitsuri3e ) ) ## *********** iterated WSUR with restriction via restrict.regMat (EViews-like) *************** fitsuri3we <- systemfit( system2, "SUR", data = Kmenta, restrict.regMat = tc, methodResidCov = "noDfCor", maxit = 100, residCovWeighted = TRUE, useMatrix = useMatrix ) summary( fitsuri3we ) ## *************** iterated SUR with 2 restrictions *************************** fitsurio4 <- systemfit( system, "SUR", data = Kmenta, restrict.matrix = restr2m, restrict.rhs = restr2q, maxit = 100, useMatrix = useMatrix ) print( summary( fitsurio4 ) ) fitsuri4 <- systemfit( system2, "SUR", data = Kmenta, restrict.matrix = restr2m, restrict.rhs = restr2q, maxit = 100, useMatrix = useMatrix ) print( summary( fitsuri4 ) ) ## *************** iterated SUR with 2 restrictions (EViews-like) ************** fitsurio4e <- systemfit( system, "SUR", data = Kmenta, methodResidCov = "noDfCor", restrict.matrix = restr2m, restrict.rhs = restr2q, maxit = 100, useMatrix = useMatrix ) print( summary( fitsurio4e ) ) fitsuri4e <- systemfit( system2, "SUR", data = Kmenta, methodResidCov = "noDfCor", restrict.matrix = restr2m, restrict.rhs = restr2q, maxit = 100, useMatrix = useMatrix ) print( summary( fitsuri4e ) ) ## *************** iterated WSUR with 2 restrictions *************************** fitsurio4w <- systemfit( system, "SUR", data = Kmenta, restrict.matrix = restr2m, restrict.rhs = restr2q, maxit = 100, residCovWeighted = TRUE, useMatrix = useMatrix ) summary( fitsurio4w ) fitsuri4w <- systemfit( system2, "SUR", data = Kmenta, restrict.matrix = restr2m, restrict.rhs = restr2q, maxit = 100, residCovWeighted = TRUE, useMatrix = useMatrix ) summary( fitsuri4w ) ## *************** iterated SUR with 2 restrictions via R and restrict.regMat **************** fitsurio5 <- systemfit( system, "SUR", data = Kmenta, restrict.matrix = restr3m, restrict.rhs = restr3q, restrict.regMat = tc, maxit = 100, useMatrix = useMatrix ) print( summary( fitsurio5 ) ) fitsuri5 <- systemfit( system2, "SUR", data = Kmenta, restrict.matrix = restr3m, restrict.rhs = restr3q, restrict.regMat = tc, maxit = 100, useMatrix = useMatrix ) print( summary( fitsuri5 ) ) ## ********* iterated SUR with 2 restrictions via R and restrict.regMat (EViews-like) ********** fitsurio5e <- systemfit( system, "SUR", data = Kmenta, methodResidCov = "noDfCor", restrict.matrix = restr3m, restrict.rhs = restr3q, restrict.regMat = tc, maxit = 100, useMatrix = useMatrix ) print( summary( fitsurio5e ) ) fitsuri5e <- systemfit( system2, "SUR", data = Kmenta, methodResidCov = "noDfCor", restrict.matrix = restr3m, restrict.rhs = restr3q, restrict.regMat = tc, maxit = 100, useMatrix = useMatrix ) print( summary( fitsuri5e ) ) nobs( fitsuri5e ) ## ********* iterated SUR with 2 restrictions via R and restrict.regMat (methodResidCov="Theil") ********** fitsurio5r2 <- systemfit( system, "SUR", data = Kmenta, methodResidCov = "Theil", restrict.matrix = restr3m, restrict.rhs = restr3q, restrict.regMat = tc, maxit = 100, x = TRUE, useMatrix = useMatrix ) print( summary( fitsurio5r2 ) ) fitsuri5r2 <- systemfit( system2, "SUR", data = Kmenta, methodResidCov = "Theil", restrict.matrix = restr3m, restrict.rhs = restr3q, restrict.regMat = tc, maxit = 100, x = TRUE, useMatrix = useMatrix ) print( summary( fitsuri5r2 ) ) ## ********* iterated SUR with 2 restrictions via R and restrict.regMat (methodResidCov="max") ********** # fitsuri5e <- systemfit( system, "SUR", data = Kmenta, methodResidCov = "max", # restrict.matrix = restr3m, restrict.rhs = restr3q, restrict.regMat = tc, # maxit = 100, useMatrix = useMatrix ) # print( summary( fitsuri5e ) ) # print( round( vcov( fitsuri5e ), digits = 6 ) ) # disabled, because the estimation does not converge ## ********* iterated WSUR with 2 restrictions via R and restrict.regMat (methodResidCov="Theil") ********** fitsurio5wr2 <- systemfit( system, "SUR", data = Kmenta, methodResidCov = "Theil", restrict.matrix = restr3m, restrict.rhs = restr3q, restrict.regMat = tc, maxit = 100, residCovWeighted = TRUE, useMatrix = useMatrix ) summary( fitsurio5wr2 ) fitsuri5wr2 <- systemfit( system2, "SUR", data = Kmenta, methodResidCov = "Theil", restrict.matrix = restr3m, restrict.rhs = restr3q, restrict.regMat = tc, maxit = 100, residCovWeighted = TRUE, useMatrix = useMatrix ) summary( fitsuri5wr2 ) ## *********** estimations with a single regressor ************ fitsurS1 <- systemfit( list( price ~ consump - 1, farmPrice ~ consump + trend ), "SUR", data = Kmenta, useMatrix = useMatrix ) print( summary( fitsurS1 ) ) nobs( fitsurS1 ) fitsurS2 <- systemfit( list( consump ~ price - 1, consump ~ trend - 1 ), "SUR", data = Kmenta, useMatrix = useMatrix ) print( summary( fitsurS2 ) ) nobs( fitsurS2 ) fitsurS3 <- systemfit( list( consump ~ trend - 1, price ~ trend - 1 ), "SUR", data = Kmenta, useMatrix = useMatrix ) nobs( fitsurS3 ) print( summary( fitsurS3 ) ) fitsurS4 <- systemfit( list( consump ~ trend - 1, price ~ trend - 1 ), "SUR", data = Kmenta, restrict.matrix = matrix( c( 1, -1 ), nrow = 1 ), useMatrix = useMatrix ) print( summary( fitsurS4 ) ) nobs( fitsurS4 ) fitsurS5 <- systemfit( list( consump ~ 1, price ~ 1 ), "SUR", data = Kmenta, useMatrix = useMatrix ) print( summary( fitsurS5 ) ) nobs( fitsurS5 ) ## **************** shorter summaries ********************** print( summary( fitsur1e2, useDfSys = TRUE, equations = FALSE ) ) print( summary( fitsur2e, useDfSys = FALSE, residCov = FALSE ) ) print( summary( fitsur3 ), equations = FALSE ) print( summary( fitsur4r3 ), residCov = FALSE, equations = FALSE ) print( summary( fitsur5, residCov = FALSE ), equations = FALSE ) print( summary( fitsur5w, equations = FALSE, residCov = FALSE ), equations = TRUE ) print( summary( fitsuri1r3, useDfSys = FALSE ), residCov = FALSE ) print( summary( fitsuri2 ), residCov = FALSE ) print( summary( fitsuri3e, residCov = FALSE, equations = FALSE ) ) print( summary( fitsurio4, residCov = FALSE ), equations = FALSE ) print( summary( fitsuri4, equations = FALSE ), residCov = FALSE ) print( summary( fitsuri4w, useDfSys = FALSE, equations = FALSE ) ) print( summary( fitsurio5r2, equations = FALSE ) ) print( summary( fitsuri5r2 ), residCov = FALSE ) ## ****************** residuals ************************** print( residuals( fitsur1e2 ) ) print( residuals( fitsur1e2$eq[[ 2 ]] ) ) print( residuals( fitsur1w ) ) print( residuals( fitsur1w$eq[[ 2 ]] ) ) print( residuals( fitsur2e ) ) print( residuals( fitsur2e$eq[[ 1 ]] ) ) print( residuals( fitsur3 ) ) print( residuals( fitsur3$eq[[ 2 ]] ) ) print( residuals( fitsur4r3 ) ) print( residuals( fitsur4r3$eq[[ 1 ]] ) ) print( residuals( fitsur5 ) ) print( residuals( fitsur5$eq[[ 2 ]] ) ) print( residuals( fitsuri1r3 ) ) print( residuals( fitsuri1r3$eq[[ 1 ]] ) ) print( residuals( fitsuri2 ) ) print( residuals( fitsuri2$eq[[ 2 ]] ) ) print( residuals( fitsuri3e ) ) print( residuals( fitsuri3e$eq[[ 1 ]] ) ) print( residuals( fitsurio4 ) ) print( residuals( fitsurio4$eq[[ 2 ]] ) ) print( residuals( fitsuri4 ) ) print( residuals( fitsuri4$eq[[ 2 ]] ) ) print( residuals( fitsuri4w ) ) print( residuals( fitsuri4w$eq[[ 2 ]] ) ) print( residuals( fitsurio5r2 ) ) print( residuals( fitsurio5r2$eq[[ 1 ]] ) ) print( residuals( fitsuri5r2 ) ) print( residuals( fitsuri5r2$eq[[ 1 ]] ) ) ## *************** coefficients ********************* print( round( coef( fitsur1r3 ), digits = 6 ) ) print( round( coef( fitsur1r3$eq[[ 2 ]] ), digits = 6 ) ) print( round( coef( fitsuri2 ), digits = 6 ) ) print( round( coef( fitsuri2$eq[[ 1 ]] ), digits = 6 ) ) print( round( coef( fitsur2we ), digits = 6 ) ) print( round( coef( fitsur2we$eq[[ 1 ]] ), digits = 6 ) ) print( round( coef( fitsur3 ), digits = 6 ) ) print( round( coef( fitsur3, modified.regMat = TRUE ), digits = 6 ) ) print( round( coef( fitsur3$eq[[ 2 ]] ), digits = 6 ) ) print( round( coef( fitsur4r2 ), digits = 6 ) ) print( round( coef( fitsur4r2$eq[[ 1 ]] ), digits = 6 ) ) print( round( coef( fitsuri5e ), digits = 6 ) ) print( round( coef( fitsuri5e, modified.regMat = TRUE ), digits = 6 ) ) print( round( coef( fitsuri5e$eq[[ 2 ]] ), digits = 6 ) ) print( round( coef( fitsur5w ), digits = 6 ) ) print( round( coef( fitsur5w, modified.regMat = TRUE ), digits = 6 ) ) print( round( coef( fitsur5w$eq[[ 1 ]] ), digits = 6 ) ) ## *************** coefficients with stats ********************* print( round( coef( summary( fitsur1r3 ) ), digits = 6 ) ) print( round( coef( summary( fitsur1r3$eq[[ 2 ]] ) ), digits = 6 ) ) print( round( coef( summary( fitsuri2, useDfSys = FALSE ) ), digits = 6 ) ) print( round( coef( summary( fitsuri2$eq[[ 1 ]], useDfSys = FALSE ) ), digits = 6 ) ) print( round( coef( summary( fitsur3 ) ), digits = 6 ) ) print( round( coef( summary( fitsur3 ), modified.regMat = TRUE ), digits = 6 ) ) print( round( coef( summary( fitsur3$eq[[ 2 ]] ) ), digits = 6 ) ) print( round( coef( summary( fitsuri3we ) ), digits = 6 ) ) print( round( coef( summary( fitsuri3we ), modified.regMat = TRUE ), digits = 6 ) ) print( round( coef( summary( fitsuri3we$eq[[ 1 ]] ) ), digits = 6 ) ) print( round( coef( summary( fitsur4r2 ) ), digits = 6 ) ) print( round( coef( summary( fitsur4r2$eq[[ 1 ]] ) ), digits = 6 ) ) print( round( coef( summary( fitsur4we ) ), digits = 6 ) ) print( round( coef( summary( fitsur4we$eq[[ 2 ]] ) ), digits = 6 ) ) print( round( coef( summary( fitsuri5e, useDfSys = FALSE ) ), digits = 6 ) ) print( round( coef( summary( fitsuri5e, useDfSys = FALSE ), modified.regMat = TRUE ), digits = 6 ) ) print( round( coef( summary( fitsuri5e$eq[[ 2 ]], useDfSys = FALSE ) ), digits = 6 ) ) ## *********** variance covariance matrix of the coefficients ******* print( round( vcov( fitsur1e2 ), digits = 6 ) ) print( round( vcov( fitsur1e2$eq[[ 1 ]] ), digits = 6 ) ) print( round( vcov( fitsur1r3 ), digits = 6 ) ) print( round( vcov( fitsur1r3$eq[[ 2 ]] ), digits = 6 ) ) print( round( vcov( fitsur2e ), digits = 6 ) ) print( round( vcov( fitsur2e$eq[[ 1 ]] ), digits = 6 ) ) print( round( vcov( fitsur3 ), digits = 6 ) ) print( round( vcov( fitsur3, modified.regMat = TRUE ), digits = 6 ) ) print( round( vcov( fitsur3$eq[[ 2 ]] ), digits = 6 ) ) print( round( vcov( fitsur3w ), digits = 6 ) ) print( round( vcov( fitsur3w, modified.regMat = TRUE ), digits = 6 ) ) print( round( vcov( fitsur3w$eq[[ 1 ]] ), digits = 6 ) ) print( round( vcov( fitsur4r2 ), digits = 6 ) ) print( round( vcov( fitsur4r2$eq[[ 1 ]] ), digits = 6 ) ) print( round( vcov( fitsur5e ), digits = 6 ) ) print( round( vcov( fitsur5e, modified.regMat = TRUE ), digits = 6 ) ) print( round( vcov( fitsur5e$eq[[ 2 ]] ), digits = 6 ) ) print( round( vcov( fitsuri1r3 ), digits = 6 ) ) print( round( vcov( fitsuri1r3$eq[[ 1 ]] ), digits = 6 ) ) print( round( vcov( fitsuri2 ), digits = 6 ) ) print( round( vcov( fitsuri2$eq[[ 2 ]] ), digits = 6 ) ) print( round( vcov( fitsuri3e ), digits = 6 ) ) print( round( vcov( fitsuri3e, modified.regMat = TRUE ), digits = 6 ) ) print( round( vcov( fitsuri3e$eq[[ 1 ]] ), digits = 6 ) ) print( round( vcov( fitsurio4e ), digits = 6 ) ) print( round( vcov( fitsurio4e$eq[[ 2 ]] ), digits = 6 ) ) print( round( vcov( fitsuri4e ), digits = 6 ) ) print( round( vcov( fitsuri4e$eq[[ 2 ]] ), digits = 6 ) ) print( round( vcov( fitsurio5r2 ), digits = 6 ) ) print( round( vcov( fitsurio5r2, modified.regMat = TRUE ), digits = 6 ) ) print( round( vcov( fitsurio5r2$eq[[ 1 ]] ), digits = 6 ) ) print( round( vcov( fitsuri5r2 ), digits = 6 ) ) print( round( vcov( fitsuri5r2, modified.regMat = TRUE ), digits = 6 ) ) print( round( vcov( fitsuri5r2$eq[[ 1 ]] ), digits = 6 ) ) print( round( vcov( fitsurio5wr2 ), digits = 6 ) ) print( round( vcov( fitsurio5wr2, modified.regMat = TRUE ), digits = 6 ) ) print( round( vcov( fitsurio5wr2$eq[[ 2 ]] ), digits = 6 ) ) ## *********** confidence intervals of coefficients ************* print( confint( fitsur1e2, useDfSys = TRUE ) ) print( confint( fitsur1e2$eq[[ 2 ]], level = 0.9, useDfSys = TRUE ) ) print( confint( fitsur1we2, useDfSys = TRUE ) ) print( confint( fitsur1we2$eq[[ 1 ]], level = 0.9, useDfSys = TRUE ) ) print( confint( fitsur2e, level = 0.9 ) ) print( confint( fitsur2e$eq[[ 1 ]], level = 0.99 ) ) print( confint( fitsur3, level = 0.99 ) ) print( confint( fitsur3$eq[[ 2 ]], level = 0.5 ) ) print( confint( fitsur4r3, level = 0.5 ) ) print( confint( fitsur4r3$eq[[ 1 ]], level = 0.25 ) ) print( confint( fitsur5, level = 0.25 ) ) print( confint( fitsur5$eq[[ 2 ]], level = 0.975 ) ) print( confint( fitsuri1r3, level = 0.975 ) ) print( confint( fitsuri1r3$eq[[ 1 ]], level = 0.999 ) ) print( confint( fitsuri2, level = 0.999 ) ) print( confint( fitsuri2$eq[[ 2 ]], level = 0.1 ) ) print( confint( fitsuri3e, level = 0.1 ) ) print( confint( fitsuri3e$eq[[ 1 ]], level = 0.01 ) ) print( confint( fitsurio4, level = 0.01 ) ) print( confint( fitsurio4$eq[[ 2 ]], level = 0.33 ) ) print( confint( fitsuri4, level = 0.01 ) ) print( confint( fitsuri4$eq[[ 2 ]], level = 0.33 ) ) print( confint( fitsurio4w, level = 0.01 ) ) print( confint( fitsurio4w$eq[[ 1 ]], level = 0.33 ) ) print( confint( fitsurio5r2, level = 0.33 ) ) print( confint( fitsurio5r2$eq[[ 1 ]] ) ) print( confint( fitsuri5r2, level = 0.33 ) ) print( confint( fitsuri5r2$eq[[ 1 ]] ) ) ## *********** fitted values ************* print( fitted( fitsur1e2 ) ) print( fitted( fitsur1e2$eq[[ 2 ]] ) ) print( fitted( fitsur2e ) ) print( fitted( fitsur2e$eq[[ 1 ]] ) ) print( fitted( fitsur2we ) ) print( fitted( fitsur2we$eq[[ 2 ]] ) ) print( fitted( fitsur3 ) ) print( fitted( fitsur3$eq[[ 2 ]] ) ) print( fitted( fitsur4r3 ) ) print( fitted( fitsur4r3$eq[[ 1 ]] ) ) print( fitted( fitsur5 ) ) print( fitted( fitsur5$eq[[ 2 ]] ) ) print( fitted( fitsuri1r3 ) ) print( fitted( fitsuri1r3$eq[[ 1 ]] ) ) print( fitted( fitsuri1wr3 ) ) print( fitted( fitsuri1wr3$eq[[ 2 ]] ) ) print( fitted( fitsuri2 ) ) print( fitted( fitsuri2$eq[[ 2 ]] ) ) print( fitted( fitsuri3e ) ) print( fitted( fitsuri3e$eq[[ 1 ]] ) ) print( fitted( fitsurio4 ) ) print( fitted( fitsurio4$eq[[ 2 ]] ) ) print( fitted( fitsuri4 ) ) print( fitted( fitsuri4$eq[[ 2 ]] ) ) print( fitted( fitsurio5r2 ) ) print( fitted( fitsurio5r2$eq[[ 1 ]] ) ) print( fitted( fitsuri5r2 ) ) print( fitted( fitsuri5r2$eq[[ 1 ]] ) ) ## *********** predicted values ************* predictData <- Kmenta predictData$consump <- NULL predictData$price <- Kmenta$price * 0.9 predictData$income <- Kmenta$income * 1.1 print( predict( fitsur1e2, se.fit = TRUE, interval = "prediction", useDfSys = TRUE ) ) print( predict( fitsur1e2$eq[[ 2 ]], se.fit = TRUE, interval = "prediction", useDfSys = TRUE ) ) print( predict( fitsur2e, se.pred = TRUE, interval = "confidence", level = 0.999, newdata = predictData ) ) print( predict( fitsur2e$eq[[ 1 ]], se.pred = TRUE, interval = "confidence", level = 0.999, newdata = predictData ) ) print( predict( fitsur3, se.pred = TRUE, interval = "prediction", level = 0.975 ) ) print( predict( fitsur3$eq[[ 2 ]], se.pred = TRUE, interval = "prediction", level = 0.975 ) ) print( predict( fitsur4r3, se.fit = TRUE, interval = "confidence", level = 0.25 ) ) print( predict( fitsur4r3$eq[[ 1 ]], se.fit = TRUE, interval = "confidence", level = 0.25 ) ) print( predict( fitsur4we, se.fit = TRUE, interval = "confidence", level = 0.25 ) ) print( predict( fitsur4we$eq[[ 2 ]], se.fit = TRUE, interval = "confidence", level = 0.25 ) ) print( predict( fitsur5, se.fit = TRUE, se.pred = TRUE, interval = "prediction", level = 0.5, newdata = predictData ) ) print( predict( fitsur5$eq[[ 2 ]], se.fit = TRUE, se.pred = TRUE, interval = "prediction", level = 0.5, newdata = predictData ) ) print( predict( fitsuri1r3, se.fit = TRUE, se.pred = TRUE, interval = "confidence", level = 0.99 ) ) print( predict( fitsuri1r3$eq[[ 1 ]], se.fit = TRUE, se.pred = TRUE, interval = "confidence", level = 0.99 ) ) print( predict( fitsuri2, se.fit = TRUE, interval = "prediction", level = 0.9, newdata = predictData ) ) print( predict( fitsuri2$eq[[ 2 ]], se.fit = TRUE, interval = "prediction", level = 0.9, newdata = predictData ) ) print( predict( fitsuri2w, se.fit = TRUE, interval = "prediction", level = 0.9, newdata = predictData ) ) print( predict( fitsuri2w$eq[[ 2 ]], se.fit = TRUE, interval = "prediction", level = 0.9, newdata = predictData ) ) print( predict( fitsuri3e, interval = "prediction", level = 0.925 ) ) print( predict( fitsuri3e$eq[[ 1 ]], interval = "prediction", level = 0.925 ) ) print( predict( fitsurio4, interval = "confidence", newdata = predictData ) ) print( predict( fitsurio4$eq[[ 2 ]], interval = "confidence", newdata = predictData ) ) print( predict( fitsuri4, interval = "confidence", newdata = predictData ) ) print( predict( fitsuri4$eq[[ 2 ]], interval = "confidence", newdata = predictData ) ) print( predict( fitsurio5r2 ) ) print( predict( fitsurio5r2$eq[[ 1 ]] ) ) print( predict( fitsuri5r2 ) ) print( predict( fitsuri5r2$eq[[ 1 ]] ) ) # predict just one observation smallData <- data.frame( price = 130, income = 150, farmPrice = 120, trend = 25 ) print( predict( fitsur1e2, newdata = smallData ) ) print( predict( fitsur1e2$eq[[ 1 ]], newdata = smallData ) ) print( predict( fitsur2e, se.fit = TRUE, level = 0.9, newdata = smallData ) ) print( predict( fitsur2e$eq[[ 1 ]], se.pred = TRUE, level = 0.99, newdata = smallData ) ) print( predict( fitsur3, interval = "prediction", level = 0.975, newdata = smallData ) ) print( predict( fitsur3$eq[[ 1 ]], interval = "confidence", level = 0.8, newdata = smallData ) ) print( predict( fitsur4r3, se.fit = TRUE, interval = "confidence", level = 0.999, newdata = smallData ) ) print( predict( fitsur4r3$eq[[ 2 ]], se.pred = TRUE, interval = "prediction", level = 0.75, newdata = smallData ) ) print( predict( fitsur5, se.fit = TRUE, interval = "prediction", newdata = smallData ) ) print( predict( fitsur5$eq[[ 1 ]], se.pred = TRUE, interval = "confidence", newdata = smallData ) ) print( predict( fitsurio5r2, se.fit = TRUE, se.pred = TRUE, interval = "prediction", level = 0.5, newdata = smallData ) ) print( predict( fitsurio5r2$eq[[ 1 ]], se.fit = TRUE, se.pred = TRUE, interval = "confidence", level = 0.25, newdata = smallData ) ) print( predict( fitsuri5r2, se.fit = TRUE, se.pred = TRUE, interval = "prediction", level = 0.5, newdata = smallData ) ) print( predict( fitsuri5r2$eq[[ 1 ]], se.fit = TRUE, se.pred = TRUE, interval = "confidence", level = 0.25, newdata = smallData ) ) print( predict( fitsuri5wr2, se.fit = TRUE, se.pred = TRUE, interval = "prediction", level = 0.5, newdata = smallData ) ) print( predict( fitsuri5wr2$eq[[ 1 ]], se.fit = TRUE, se.pred = TRUE, interval = "confidence", level = 0.25, newdata = smallData ) ) ## ************ correlation of predicted values *************** print( correlation.systemfit( fitsur1e2, 2, 1 ) ) print( correlation.systemfit( fitsur2e, 1, 2 ) ) print( correlation.systemfit( fitsur3, 2, 1 ) ) print( correlation.systemfit( fitsur3w, 2, 1 ) ) print( correlation.systemfit( fitsur4r3, 1, 2 ) ) print( correlation.systemfit( fitsur5, 2, 1 ) ) print( correlation.systemfit( fitsuri1r3, 1, 2 ) ) print( correlation.systemfit( fitsuri2, 2, 1 ) ) print( correlation.systemfit( fitsuri2w, 1, 2 ) ) print( correlation.systemfit( fitsuri3e, 1, 2 ) ) print( correlation.systemfit( fitsurio4, 2, 1 ) ) print( correlation.systemfit( fitsuri4, 2, 1 ) ) print( correlation.systemfit( fitsurio5r2, 1, 2 ) ) print( correlation.systemfit( fitsuri5r2, 1, 2 ) ) ## ************ Log-Likelihood values *************** print( logLik( fitsur1e2 ) ) print( logLik( fitsur1e2, residCovDiag = TRUE ) ) print( logLik( fitsur2e ) ) print( logLik( fitsur2e, residCovDiag = TRUE ) ) print( logLik( fitsur3 ) ) print( logLik( fitsur3, residCovDiag = TRUE ) ) print( logLik( fitsur4r3 ) ) print( logLik( fitsur4r3, residCovDiag = TRUE ) ) print( logLik( fitsur5 ) ) print( logLik( fitsur5, residCovDiag = TRUE ) ) print( logLik( fitsur5w ) ) print( logLik( fitsur5w, residCovDiag = TRUE ) ) print( logLik( fitsuri1r3 ) ) print( logLik( fitsuri1r3, residCovDiag = TRUE ) ) print( logLik( fitsuri2 ) ) print( logLik( fitsuri2, residCovDiag = TRUE ) ) print( logLik( fitsuri3e ) ) print( logLik( fitsuri3e, residCovDiag = TRUE ) ) print( logLik( fitsurio4 ) ) print( logLik( fitsurio4, residCovDiag = TRUE ) ) print( logLik( fitsuri4 ) ) print( logLik( fitsuri4, residCovDiag = TRUE ) ) print( logLik( fitsuri4w ) ) print( logLik( fitsuri4w, residCovDiag = TRUE ) ) print( logLik( fitsurio5r2 ) ) print( logLik( fitsurio5r2, residCovDiag = TRUE ) ) print( logLik( fitsuri5r2 ) ) print( logLik( fitsuri5r2, residCovDiag = TRUE ) ) ## *********** likelihood ratio tests ************* # testing first restriction # non-iterating, methodResidCov = 1 print( lrtest( fitsur2, fitsur1 ) ) print( lrtest( fitsur3, fitsur1 ) ) # non-iterating, methodResidCov = 0 print( lrtest( fitsur2e, fitsur1e ) ) print( lrtest( fitsur3e, fitsur1e ) ) # iterating, methodResidCov = 1 print( lrtest( fitsuri2, fitsuri1 ) ) print( lrtest( fitsuri3, fitsuri1 ) ) # iterating, methodResidCov = 0 print( lrtest( fitsuri2e, fitsuri1e ) ) print( lrtest( fitsuri3e, fitsuri1e ) ) # non-iterating, methodResidCov = 1, WSUR print( lrtest( fitsur3w, fitsur1w ) ) # testing second restriction # non-iterating, methodResidCov = 1 print( lrtest( fitsur4, fitsur2 ) ) print( lrtest( fitsur4, fitsur3 ) ) print( lrtest( fitsur5, fitsur2 ) ) print( lrtest( fitsur5, fitsur3 ) ) # non-iterating, methodResidCov = 0 print( lrtest( fitsur4e, fitsur2e ) ) print( lrtest( fitsur4e, fitsur3e ) ) print( lrtest( fitsur5e, fitsur2e ) ) print( lrtest( fitsur5e, fitsur3e ) ) # iterating, methodResidCov = 1 print( lrtest( fitsurio4, fitsuri2 ) ) print( lrtest( fitsurio4, fitsuri3 ) ) print( lrtest( fitsurio5, fitsuri2 ) ) print( lrtest( fitsurio5, fitsuri3 ) ) # corrected print( lrtest( fitsuri2, fitsuri4 ) ) print( lrtest( fitsuri3, fitsuri4 ) ) print( lrtest( fitsuri2, fitsuri5 ) ) print( lrtest( fitsuri3, fitsuri5 ) ) # iterating, methodResidCov = 0 print( lrtest( fitsurio4e, fitsuri2e ) ) print( lrtest( fitsurio4e, fitsuri3e ) ) print( lrtest( fitsurio5e, fitsuri2e ) ) print( lrtest( fitsurio5e, fitsuri3e ) ) # corrected print( lrtest( fitsuri2e, fitsuri4e ) ) print( lrtest( fitsuri3e, fitsuri4e ) ) print( lrtest( fitsuri2e, fitsuri5e ) ) print( lrtest( fitsuri3e, fitsuri5e ) ) # non-iterating, methodResidCov = 0, WSUR print( lrtest( fitsur4we, fitsur2we ) ) # iterating, methodResidCov = 1, WSUR print( lrtest( fitsuri2w, fitsuri4w ) ) # testing both of the restrictions # non-iterating, methodResidCov = 1 print( lrtest( fitsur4, fitsur1 ) ) print( lrtest( fitsur5, fitsur1 ) ) # non-iterating, methodResidCov = 0 print( lrtest( fitsur4e, fitsur1e ) ) print( lrtest( fitsur5e, fitsur1e ) ) # iterating, methodResidCov = 1 print( lrtest( fitsurio4, fitsuri1 ) ) print( lrtest( fitsurio5, fitsuri1 ) ) # corrected print( lrtest( fitsuri1, fitsuri4 ) ) print( lrtest( fitsuri1, fitsuri5 ) ) # iterating, methodResidCov = 0 print( lrtest( fitsurio4e, fitsuri1e ) ) print( lrtest( fitsurio5e, fitsuri1e ) ) # corrected print( lrtest( fitsuri1e, fitsuri4e ) ) print( lrtest( fitsuri1e, fitsuri5e ) ) # non-iterating, methodResidCov = 1, WSUR print( lrtest( fitsur5w, fitsur1w ) ) # testing the two restrictions with one call # non-iterating, methodResidCov = 1 print( lrtest( fitsur4, fitsur2, fitsur1 ) ) print( lrtest( fitsur5, fitsur3, fitsur1 ) ) print( lrtest( fitsur1, fitsur3, fitsur5 ) ) print( lrtest( object = fitsur5, fitsur3, fitsur1 ) ) print( lrtest( fitsur3, object = fitsur5, fitsur1 ) ) print( lrtest( fitsur3, fitsur1, object = fitsur5 ) ) # iterating, methodResidCov = 0 print( lrtest( fitsuri4e, fitsuri2e, fitsuri1e ) ) print( lrtest( fitsuri5e, fitsuri3e, fitsuri1e ) ) ## ************** F tests **************** # testing first restriction print( linearHypothesis( fitsur1, restrm ) ) linearHypothesis( fitsur1, restrict ) print( linearHypothesis( fitsur1r2, restrm ) ) linearHypothesis( fitsur1r2, restrict ) print( linearHypothesis( fitsuri1e2, restrm ) ) linearHypothesis( fitsuri1e2, restrict ) print( linearHypothesis( fitsuri1r3, restrm ) ) linearHypothesis( fitsuri1r3, restrict ) print( linearHypothesis( fitsur1we2, restrm ) ) linearHypothesis( fitsur1we2, restrict ) print( linearHypothesis( fitsuri1wr3, restrm ) ) linearHypothesis( fitsuri1wr3, restrict ) # testing second restriction restrOnly2m <- matrix(0,1,7) restrOnly2q <- 0.5 restrOnly2m[1,2] <- -1 restrOnly2m[1,5] <- 1 restrictOnly2 <- "- demand_price + supply_price = 0.5" restrictOnly2i <- "- demand_price + supply_income = 0.5" # first restriction not imposed print( linearHypothesis( fitsur1e2, restrOnly2m, restrOnly2q ) ) linearHypothesis( fitsur1e2, restrictOnly2 ) print( linearHypothesis( fitsuri1, restrOnly2m, restrOnly2q ) ) linearHypothesis( fitsuri1, restrictOnly2i ) # first restriction imposed print( linearHypothesis( fitsur2, restrOnly2m, restrOnly2q ) ) linearHypothesis( fitsur2, restrictOnly2 ) print( linearHypothesis( fitsur3, restrOnly2m, restrOnly2q ) ) linearHypothesis( fitsur3, restrictOnly2 ) print( linearHypothesis( fitsuri2e, restrOnly2m, restrOnly2q ) ) linearHypothesis( fitsuri2e, restrictOnly2i ) print( linearHypothesis( fitsuri3e, restrOnly2m, restrOnly2q ) ) linearHypothesis( fitsuri3e, restrictOnly2i ) print( linearHypothesis( fitsur2we, restrOnly2m, restrOnly2q ) ) linearHypothesis( fitsur2we, restrictOnly2 ) print( linearHypothesis( fitsuri3we, restrOnly2m, restrOnly2q ) ) linearHypothesis( fitsuri3we, restrictOnly2i ) # testing both of the restrictions print( linearHypothesis( fitsur1r3, restr2m, restr2q ) ) linearHypothesis( fitsur1r3, restrict2 ) print( linearHypothesis( fitsuri1e2, restr2m, restr2q ) ) linearHypothesis( fitsuri1e2, restrict2i ) print( linearHypothesis( fitsur1w, restr2m, restr2q ) ) linearHypothesis( fitsur1w, restrict2 ) print( linearHypothesis( fitsuri1wr3, restr2m, restr2q ) ) linearHypothesis( fitsuri1wr3, restrict2i ) ## ************** Wald tests **************** # testing first restriction print( linearHypothesis( fitsur1, restrm, test = "Chisq" ) ) linearHypothesis( fitsur1, restrict, test = "Chisq" ) print( linearHypothesis( fitsur1r2, restrm, test = "Chisq" ) ) linearHypothesis( fitsur1r2, restrict, test = "Chisq" ) print( linearHypothesis( fitsuri1e2, restrm, test = "Chisq" ) ) linearHypothesis( fitsuri1e2, restrict, test = "Chisq" ) print( linearHypothesis( fitsuri1r3, restrm, test = "Chisq" ) ) linearHypothesis( fitsuri1r3, restrict, test = "Chisq" ) print( linearHypothesis( fitsur1w, restrm, test = "Chisq" ) ) linearHypothesis( fitsur1w, restrict, test = "Chisq" ) # testing second restriction # first restriction not imposed print( linearHypothesis( fitsur1e2, restrOnly2m, restrOnly2q, test = "Chisq" ) ) linearHypothesis( fitsur1e2, restrictOnly2, test = "Chisq" ) print( linearHypothesis( fitsuri1, restrOnly2m, restrOnly2q, test = "Chisq" ) ) linearHypothesis( fitsuri1, restrictOnly2i, test = "Chisq" ) # first restriction imposed print( linearHypothesis( fitsur2, restrOnly2m, restrOnly2q, test = "Chisq" ) ) linearHypothesis( fitsur2, restrictOnly2, test = "Chisq" ) print( linearHypothesis( fitsur3, restrOnly2m, restrOnly2q, test = "Chisq" ) ) linearHypothesis( fitsur3, restrictOnly2, test = "Chisq" ) print( linearHypothesis( fitsuri2e, restrOnly2m, restrOnly2q, test = "Chisq" ) ) linearHypothesis( fitsuri2e, restrictOnly2i, test = "Chisq" ) print( linearHypothesis( fitsuri3e, restrOnly2m, restrOnly2q, test = "Chisq" ) ) linearHypothesis( fitsuri3e, restrictOnly2i, test = "Chisq" ) print( linearHypothesis( fitsuri2w, restrOnly2m, restrOnly2q, test = "Chisq" ) ) linearHypothesis( fitsuri2w, restrictOnly2i, test = "Chisq" ) print( linearHypothesis( fitsur3w, restrOnly2m, restrOnly2q, test = "Chisq" ) ) linearHypothesis( fitsur3w, restrictOnly2, test = "Chisq" ) # testing both of the restrictions print( linearHypothesis( fitsur1r3, restr2m, restr2q, test = "Chisq" ) ) linearHypothesis( fitsur1r3, restrict2, test = "Chisq" ) print( linearHypothesis( fitsuri1e2, restr2m, restr2q, test = "Chisq" ) ) linearHypothesis( fitsuri1e2, restrict2i, test = "Chisq" ) print( linearHypothesis( fitsur1we2, restr2m, restr2q, test = "Chisq" ) ) linearHypothesis( fitsur1we2, restrict2, test = "Chisq" ) print( linearHypothesis( fitsuri1wr3, restr2m, restr2q, test = "Chisq" ) ) linearHypothesis( fitsuri1wr3, restrict2i, test = "Chisq" ) ## ****************** model frame ************************** print( mf <- model.frame( fitsur1e2 ) ) print( mf1 <- model.frame( fitsur1e2$eq[[ 1 ]] ) ) print( attributes( mf1 )$terms ) print( mf2 <- model.frame( fitsur1e2$eq[[ 2 ]] ) ) print( attributes( mf2 )$terms ) print( all.equal( mf, model.frame( fitsur1w ) ) ) print( all.equal( mf1, model.frame( fitsur1w$eq[[ 1 ]] ) ) ) print( all.equal( mf, model.frame( fitsur2e ) ) ) print( all.equal( mf1, model.frame( fitsur2e$eq[[ 1 ]] ) ) ) print( all.equal( mf, model.frame( fitsur3 ) ) ) print( all.equal( mf2, model.frame( fitsur3$eq[[ 2 ]] ) ) ) print( all.equal( mf, model.frame( fitsur4r3 ) ) ) print( all.equal( mf1, model.frame( fitsur4r3$eq[[ 1 ]] ) ) ) print( all.equal( mf, model.frame( fitsur4we ) ) ) print( all.equal( mf2, model.frame( fitsur4we$eq[[ 2 ]] ) ) ) print( all.equal( mf, model.frame( fitsur5 ) ) ) print( all.equal( mf2, model.frame( fitsur5$eq[[ 2 ]] ) ) ) print( all.equal( mf, model.frame( fitsuri1r3 ) ) ) print( all.equal( mf1, model.frame( fitsuri1r3$eq[[ 1 ]] ) ) ) print( all.equal( mf, model.frame( fitsuri2 ) ) ) print( all.equal( mf1, model.frame( fitsuri2$eq[[ 1 ]] ) ) ) print( all.equal( mf, model.frame( fitsuri3e ) ) ) print( all.equal( mf1, model.frame( fitsuri3e$eq[[ 1 ]] ) ) ) print( all.equal( mf, model.frame( fitsurio4 ) ) ) print( all.equal( mf2, model.frame( fitsurio4$eq[[ 2 ]] ) ) ) print( all.equal( mf, model.frame( fitsuri4 ) ) ) print( all.equal( mf1, model.frame( fitsuri4$eq[[ 1 ]] ) ) ) print( all.equal( mf, model.frame( fitsurio5r2 ) ) ) print( all.equal( mf1, model.frame( fitsurio5r2$eq[[ 1 ]] ) ) ) print( all.equal( mf, model.frame( fitsuri5r2 ) ) ) print( all.equal( mf1, model.frame( fitsuri5r2$eq[[ 1 ]] ) ) ) print( all.equal( mf, model.frame( fitsuri5wr2 ) ) ) print( all.equal( mf1, model.frame( fitsuri5wr2$eq[[ 1 ]] ) ) ) ## **************** model matrix ************************ # with x (returnModelMatrix) = TRUE print( !is.null( fitsur1e2$eq[[ 1 ]]$x ) ) print( mm <- model.matrix( fitsur1e2 ) ) print( mm1 <- model.matrix( fitsur1e2$eq[[ 1 ]] ) ) print( mm2 <- model.matrix( fitsur1e2$eq[[ 2 ]] ) ) # with x (returnModelMatrix) = FALSE print( all.equal( mm, model.matrix( fitsur1r2 ) ) ) print( all.equal( mm1, model.matrix( fitsur1r2$eq[[ 1 ]] ) ) ) print( all.equal( mm2, model.matrix( fitsur1r2$eq[[ 2 ]] ) ) ) print( !is.null( fitsur1r2$eq[[ 1 ]]$x ) ) # with x (returnModelMatrix) = TRUE print( !is.null( fitsur2e$eq[[ 1 ]]$x ) ) print( all.equal( mm, model.matrix( fitsur2e ) ) ) print( all.equal( mm1, model.matrix( fitsur2e$eq[[ 1 ]] ) ) ) print( all.equal( mm2, model.matrix( fitsur2e$eq[[ 2 ]] ) ) ) # with x (returnModelMatrix) = FALSE print( all.equal( mm, model.matrix( fitsur2 ) ) ) print( all.equal( mm1, model.matrix( fitsur2$eq[[ 1 ]] ) ) ) print( all.equal( mm2, model.matrix( fitsur2$eq[[ 2 ]] ) ) ) print( !is.null( fitsur2$eq[[ 1 ]]$x ) ) # with x (returnModelMatrix) = TRUE print( !is.null( fitsur2we$eq[[ 1 ]]$x ) ) print( all.equal( mm, model.matrix( fitsur2we ) ) ) print( all.equal( mm1, model.matrix( fitsur2we$eq[[ 1 ]] ) ) ) print( all.equal( mm2, model.matrix( fitsur2we$eq[[ 2 ]] ) ) ) # with x (returnModelMatrix) = FALSE print( all.equal( mm, model.matrix( fitsur2 ) ) ) print( all.equal( mm1, model.matrix( fitsur2$eq[[ 1 ]] ) ) ) print( all.equal( mm2, model.matrix( fitsur2$eq[[ 2 ]] ) ) ) print( !is.null( fitsuri2$eq[[ 1 ]]$x ) ) # with x (returnModelMatrix) = TRUE print( !is.null( fitsur3e$eq[[ 1 ]]$x ) ) print( all.equal( mm, model.matrix( fitsur3e ) ) ) print( all.equal( mm1, model.matrix( fitsur3e$eq[[ 1 ]] ) ) ) print( all.equal( mm2, model.matrix( fitsur3e$eq[[ 2 ]] ) ) ) # with x (returnModelMatrix) = FALSE print( all.equal( mm, model.matrix( fitsur3 ) ) ) print( all.equal( mm1, model.matrix( fitsur3$eq[[ 1 ]] ) ) ) print( all.equal( mm2, model.matrix( fitsur3$eq[[ 2 ]] ) ) ) print( !is.null( fitsur3$eq[[ 1 ]]$x ) ) # with x (returnModelMatrix) = TRUE print( !is.null( fitsur3w$eq[[ 1 ]]$x ) ) print( all.equal( mm, model.matrix( fitsur3w ) ) ) print( all.equal( mm1, model.matrix( fitsur3w$eq[[ 1 ]] ) ) ) print( all.equal( mm2, model.matrix( fitsur3w$eq[[ 2 ]] ) ) ) # with x (returnModelMatrix) = FALSE print( all.equal( mm, model.matrix( fitsur3 ) ) ) print( all.equal( mm1, model.matrix( fitsur3$eq[[ 1 ]] ) ) ) print( all.equal( mm2, model.matrix( fitsur3$eq[[ 2 ]] ) ) ) print( !is.null( fitsuri3$eq[[ 1 ]]$x ) ) # with x (returnModelMatrix) = TRUE print( !is.null( fitsur4r3$eq[[ 1 ]]$x ) ) print( all.equal( mm, model.matrix( fitsur4r3 ) ) ) print( all.equal( mm1, model.matrix( fitsur4r3$eq[[ 1 ]] ) ) ) print( all.equal( mm2, model.matrix( fitsur4r3$eq[[ 2 ]] ) ) ) # with x (returnModelMatrix) = FALSE print( all.equal( mm, model.matrix( fitsur4we ) ) ) print( all.equal( mm1, model.matrix( fitsur4we$eq[[ 1 ]] ) ) ) print( all.equal( mm2, model.matrix( fitsur4we$eq[[ 2 ]] ) ) ) print( !is.null( fitsur4we$eq[[ 1 ]]$x ) ) # with x (returnModelMatrix) = TRUE print( !is.null( fitsurio5r2$eq[[ 1 ]]$x ) ) print( !is.null( fitsur5$eq[[ 1 ]]$x ) ) print( all.equal( mm, model.matrix( fitsurio5r2 ) ) ) print( all.equal( mm1, model.matrix( fitsurio5r2$eq[[ 1 ]] ) ) ) print( all.equal( mm, model.matrix( fitsur5 ) ) ) print( all.equal( mm1, model.matrix( fitsur5$eq[[ 1 ]] ) ) ) #print( all.equal( mm2, model.matrix( fitsuri5r2$eq[[ 2 ]] ) ) ) # with x (returnModelMatrix) = FALSE print( all.equal( mm, model.matrix( fitsurio5 ) ) ) print( all.equal( mm1, model.matrix( fitsurio5$eq[[ 1 ]] ) ) ) # with x (returnModelMatrix) = FALSE print( all.equal( mm, model.matrix( fitsur5w ) ) ) print( all.equal( mm1, model.matrix( fitsur5w$eq[[ 1 ]] ) ) ) #print( all.equal( mm2, model.matrix( fitsuri5r2$eq[[ 1 ]] ) ) ) print( !is.null( fitsurio5$eq[[ 1 ]]$x ) ) print( !is.null( fitsur5w$eq[[ 1 ]]$x ) ) ## **************** formulas ************************ formula( fitsur1e2 ) formula( fitsur1e2$eq[[ 2 ]] ) formula( fitsur2e ) formula( fitsur2e$eq[[ 1 ]] ) formula( fitsur2we ) formula( fitsur2we$eq[[ 1 ]] ) formula( fitsur3 ) formula( fitsur3$eq[[ 2 ]] ) formula( fitsur4r3 ) formula( fitsur4r3$eq[[ 1 ]] ) formula( fitsur5 ) formula( fitsur5$eq[[ 2 ]] ) formula( fitsuri1r3 ) formula( fitsuri1r3$eq[[ 1 ]] ) formula( fitsuri2 ) formula( fitsuri2$eq[[ 2 ]] ) formula( fitsuri3e ) formula( fitsuri3e$eq[[ 1 ]] ) formula( fitsurio4 ) formula( fitsurio4$eq[[ 2 ]] ) formula( fitsuri4 ) formula( fitsuri4$eq[[ 2 ]] ) formula( fitsurio5r2 ) formula( fitsurio5r2$eq[[ 1 ]] ) formula( fitsuri5r2 ) formula( fitsuri5r2$eq[[ 1 ]] ) formula( fitsuri5wr2 ) formula( fitsuri5wr2$eq[[ 1 ]] ) ## **************** model terms ******************* terms( fitsur1e2 ) terms( fitsur1e2$eq[[ 2 ]] ) terms( fitsur2e ) terms( fitsur2e$eq[[ 1 ]] ) terms( fitsur3 ) terms( fitsur3$eq[[ 2 ]] ) terms( fitsur3w ) terms( fitsur3w$eq[[ 2 ]] ) terms( fitsur4r3 ) terms( fitsur4r3$eq[[ 1 ]] ) terms( fitsur4we ) terms( fitsur4we$eq[[ 1 ]] ) terms( fitsur5 ) terms( fitsur5$eq[[ 2 ]] ) terms( fitsuri1r3 ) terms( fitsuri1r3$eq[[ 1 ]] ) terms( fitsuri2 ) terms( fitsuri2$eq[[ 2 ]] ) terms( fitsuri3e ) terms( fitsuri3e$eq[[ 1 ]] ) terms( fitsurio4 ) terms( fitsurio4$eq[[ 2 ]] ) terms( fitsuri4 ) terms( fitsuri4$eq[[ 2 ]] ) terms( fitsurio5r2 ) terms( fitsurio5r2$eq[[ 1 ]] ) terms( fitsuri5r2 ) terms( fitsuri5r2$eq[[ 1 ]] ) ## **************** estfun ************************ library( "sandwich" ) estfun( fitsur1 ) round( colSums( estfun( fitsur1 ) ), digits = 7 ) estfun( fitsur1e2 ) round( colSums( estfun( fitsur1e2 ) ), digits = 7 ) estfun( fitsur1r3 ) round( colSums( estfun( fitsur1r3 ) ), digits = 7 ) estfun( fitsur1w ) round( colSums( estfun( fitsur1w ) ), digits = 7 ) estfun( fitsuri1e ) round( colSums( estfun( fitsuri1e ) ), digits = 7 ) estfun( fitsuri1wr3 ) round( colSums( estfun( fitsuri1wr3 ) ), digits = 7 ) estfun( fitsurS1 ) round( colSums( estfun( fitsurS1 ) ), digits = 7 ) estfun( fitsurS2 ) round( colSums( estfun( fitsurS2 ) ), digits = 7 ) estfun( fitsurS3 ) round( colSums( estfun( fitsurS3 ) ), digits = 7 ) try( estfun( fitsurS4 ) ) estfun( fitsurS5 ) round( colSums( estfun( fitsurS5 ) ), digits = 7 ) ## **************** bread ************************ round( bread( fitsur1 ), digits = 7 ) round( bread( fitsur1e2 ), digits = 7 ) round( bread( fitsur1r3 ), digits = 7 ) round( bread( fitsur1w ), digits = 7 ) round( bread( fitsuri1e ), digits = 7 ) round( bread( fitsuri1wr3 ), digits = 7 ) round( bread( fitsurS1 ), digits = 7 ) round( bread( fitsurS2 ), digits = 7 ) round( bread( fitsurS3 ), digits = 7 ) try( bread( fitsurS4 ) ) systemfit/tests/test_panel.Rout.save0000644000176200001440000221177214254025245017430 0ustar liggesusers R version 4.2.0 (2022-04-22) -- "Vigorous Calisthenics" Copyright (C) 2022 The R Foundation for Statistical Computing Platform: x86_64-pc-linux-gnu (64-bit) R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > library( systemfit ) Loading required package: Matrix Loading required package: car Loading required package: carData Loading required package: lmtest Loading required package: zoo Attaching package: 'zoo' The following objects are masked from 'package:base': as.Date, as.Date.numeric Please cite the 'systemfit' package as: Arne Henningsen and Jeff D. Hamann (2007). systemfit: A Package for Estimating Systems of Simultaneous Equations in R. Journal of Statistical Software 23(4), 1-40. http://www.jstatsoft.org/v23/i04/. If you have questions, suggestions, or comments regarding the 'systemfit' package, please use a forum or 'tracker' at systemfit's R-Forge site: https://r-forge.r-project.org/projects/systemfit/ > if(requireNamespace( 'plm', quietly = TRUE ) ) { + library( plm ) + options( digits = 3 ) + useMatrix <- FALSE + } > > ## Repeating the OLS and SUR estimations in Theil (1971, pp. 295, 300) > if(requireNamespace( 'plm', quietly = TRUE ) ) { + data( "GrunfeldGreene" ) + GrunfeldTheil <- subset( GrunfeldGreene, + firm %in% c( "General Electric", "Westinghouse" ) ) + GrunfeldTheil <- pdata.frame( GrunfeldTheil, c( "firm", "year" ) ) + formulaGrunfeld <- invest ~ value + capital + } > > # OLS > if(requireNamespace( 'plm', quietly = TRUE ) ) { + theilOls <- systemfit( formulaGrunfeld, "OLS", + data = GrunfeldTheil, useMatrix = useMatrix ) + print( theilOls ) + print( summary( theilOls ) ) + print( summary( theilOls, useDfSys = TRUE, residCov = FALSE, + equations = FALSE ) ) + print( summary( theilOls, equations = FALSE ) ) + print( coef( theilOls ) ) + print( coef( summary(theilOls ) ) ) + print( vcov( theilOls ) ) + print( residuals( theilOls ) ) + print( confint( theilOls ) ) + print( fitted(theilOls ) ) + print( logLik( theilOls ) ) + print( logLik( theilOls, residCovDiag = TRUE ) ) + print( nobs( theilOls ) ) + print( model.frame( theilOls ) ) + print( model.matrix( theilOls ) ) + print( formula( theilOls ) ) + print( formula( theilOls$eq[[ 1 ]] ) ) + print( terms( theilOls ) ) + print( terms( theilOls$eq[[ 1 ]] ) ) + } systemfit results method: OLS Coefficients: General.Electric_(Intercept) General.Electric_value -9.9563 0.0266 General.Electric_capital Westinghouse_(Intercept) 0.1517 -0.5094 Westinghouse_value Westinghouse_capital 0.0529 0.0924 systemfit results method: OLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 34 14990 38001 0.711 0.618 N DF SSR MSE RMSE R2 Adj R2 General.Electric 20 17 13217 777 27.9 0.705 0.671 Westinghouse 20 17 1773 104 10.2 0.744 0.714 The covariance matrix of the residuals General.Electric Westinghouse General.Electric 777 208 Westinghouse 208 104 The correlations of the residuals General.Electric Westinghouse General.Electric 1.000 0.729 Westinghouse 0.729 1.000 OLS estimates for 'General.Electric' (equation 1) Model Formula: General.Electric_invest ~ General.Electric_value + General.Electric_capital Estimate Std. Error t value Pr(>|t|) (Intercept) -9.9563 31.3742 -0.32 0.75 value 0.0266 0.0156 1.71 0.11 capital 0.1517 0.0257 5.90 1.7e-05 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 27.883 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 13216.588 MSE: 777.446 Root MSE: 27.883 Multiple R-Squared: 0.705 Adjusted R-Squared: 0.671 OLS estimates for 'Westinghouse' (equation 2) Model Formula: Westinghouse_invest ~ Westinghouse_value + Westinghouse_capital Estimate Std. Error t value Pr(>|t|) (Intercept) -0.5094 8.0153 -0.06 0.9501 value 0.0529 0.0157 3.37 0.0037 ** capital 0.0924 0.0561 1.65 0.1179 --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 10.213 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 1773.234 MSE: 104.308 Root MSE: 10.213 Multiple R-Squared: 0.744 Adjusted R-Squared: 0.714 systemfit results method: OLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 34 14990 38001 0.711 0.618 N DF SSR MSE RMSE R2 Adj R2 General.Electric 20 17 13217 777 27.9 0.705 0.671 Westinghouse 20 17 1773 104 10.2 0.744 0.714 Coefficients: Estimate Std. Error t value Pr(>|t|) General.Electric_(Intercept) -9.9563 31.3742 -0.32 0.7529 General.Electric_value 0.0266 0.0156 1.71 0.0972 . General.Electric_capital 0.1517 0.0257 5.90 1.2e-06 *** Westinghouse_(Intercept) -0.5094 8.0153 -0.06 0.9497 Westinghouse_value 0.0529 0.0157 3.37 0.0019 ** Westinghouse_capital 0.0924 0.0561 1.65 0.1087 --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 systemfit results method: OLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 34 14990 38001 0.711 0.618 N DF SSR MSE RMSE R2 Adj R2 General.Electric 20 17 13217 777 27.9 0.705 0.671 Westinghouse 20 17 1773 104 10.2 0.744 0.714 The covariance matrix of the residuals General.Electric Westinghouse General.Electric 777 208 Westinghouse 208 104 The correlations of the residuals General.Electric Westinghouse General.Electric 1.000 0.729 Westinghouse 0.729 1.000 Coefficients: Estimate Std. Error t value Pr(>|t|) General.Electric_(Intercept) -9.9563 31.3742 -0.32 0.7548 General.Electric_value 0.0266 0.0156 1.71 0.1063 General.Electric_capital 0.1517 0.0257 5.90 1.7e-05 *** Westinghouse_(Intercept) -0.5094 8.0153 -0.06 0.9501 Westinghouse_value 0.0529 0.0157 3.37 0.0037 ** Westinghouse_capital 0.0924 0.0561 1.65 0.1179 --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 General.Electric_(Intercept) General.Electric_value -9.9563 0.0266 General.Electric_capital Westinghouse_(Intercept) 0.1517 -0.5094 Westinghouse_value Westinghouse_capital 0.0529 0.0924 Estimate Std. Error t value Pr(>|t|) General.Electric_(Intercept) -9.9563 31.3742 -0.3173 7.55e-01 General.Electric_value 0.0266 0.0156 1.7057 1.06e-01 General.Electric_capital 0.1517 0.0257 5.9015 1.74e-05 Westinghouse_(Intercept) -0.5094 8.0153 -0.0636 9.50e-01 Westinghouse_value 0.0529 0.0157 3.3677 3.65e-03 Westinghouse_capital 0.0924 0.0561 1.6472 1.18e-01 General.Electric_(Intercept) General.Electric_(Intercept) 984.344 General.Electric_value -0.451 General.Electric_capital -0.173 Westinghouse_(Intercept) 0.000 Westinghouse_value 0.000 Westinghouse_capital 0.000 General.Electric_value General.Electric_capital General.Electric_(Intercept) -4.51e-01 -1.73e-01 General.Electric_value 2.42e-04 -4.73e-05 General.Electric_capital -4.73e-05 6.61e-04 Westinghouse_(Intercept) 0.00e+00 0.00e+00 Westinghouse_value 0.00e+00 0.00e+00 Westinghouse_capital 0.00e+00 0.00e+00 Westinghouse_(Intercept) Westinghouse_value General.Electric_(Intercept) 0.000 0.000000 General.Electric_value 0.000 0.000000 General.Electric_capital 0.000 0.000000 Westinghouse_(Intercept) 64.245 -0.109545 Westinghouse_value -0.110 0.000247 Westinghouse_capital 0.169 -0.000653 Westinghouse_capital General.Electric_(Intercept) 0.000000 General.Electric_value 0.000000 General.Electric_capital 0.000000 Westinghouse_(Intercept) 0.168911 Westinghouse_value -0.000653 Westinghouse_capital 0.003147 General.Electric Westinghouse X1935 -2.860 3.144 X1936 -14.402 -0.958 X1937 -5.175 -3.684 X1938 -23.295 -7.915 X1939 -28.031 -10.322 X1940 -0.562 -6.613 X1941 40.750 17.265 X1942 16.036 8.547 X1943 -23.719 -2.916 X1944 -26.780 -3.257 X1945 1.768 -7.753 X1946 58.737 5.796 X1947 43.936 15.050 X1948 31.227 2.969 X1949 -23.552 -11.433 X1950 -37.511 -13.481 X1951 -4.983 4.619 X1952 1.893 13.138 X1953 5.087 11.308 X1954 -8.563 -13.505 2.5 % 97.5 % General.Electric_(Intercept) -76.150 56.238 General.Electric_value -0.006 0.059 General.Electric_capital 0.097 0.206 Westinghouse_(Intercept) -17.420 16.401 Westinghouse_value 0.020 0.086 Westinghouse_capital -0.026 0.211 General.Electric Westinghouse X1935 36.0 9.79 X1936 59.4 26.86 X1937 82.4 38.73 X1938 67.9 30.81 X1939 76.1 29.16 X1940 75.0 35.18 X1941 72.3 31.25 X1942 75.9 34.79 X1943 85.0 39.94 X1944 83.6 41.07 X1945 91.8 47.02 X1946 101.2 47.66 X1947 103.3 40.51 X1948 115.1 46.59 X1949 121.9 43.47 X1950 131.0 45.72 X1951 140.2 49.76 X1952 155.4 58.64 X1953 174.4 78.77 X1954 198.2 82.11 'log Lik.' -159 (df=7) 'log Lik.' -167 (df=7) [1] 40 General.Electric_invest General.Electric_value General.Electric_capital X1935 33.1 1171 97.8 X1936 45.0 2016 104.4 X1937 77.2 2803 118.0 X1938 44.6 2040 156.2 X1939 48.1 2256 172.6 X1940 74.4 2132 186.6 X1941 113.0 1834 220.9 X1942 91.9 1588 287.8 X1943 61.3 1749 319.9 X1944 56.8 1687 321.3 X1945 93.6 2008 319.6 X1946 159.9 2208 346.0 X1947 147.2 1657 456.4 X1948 146.3 1604 543.4 X1949 98.3 1432 618.3 X1950 93.5 1610 647.4 X1951 135.2 1819 671.3 X1952 157.3 2080 726.1 X1953 179.5 2372 800.3 X1954 189.6 2760 888.9 Westinghouse_invest Westinghouse_value Westinghouse_capital X1935 12.9 192 1.8 X1936 25.9 516 0.8 X1937 35.0 729 7.4 X1938 22.9 560 18.1 X1939 18.8 520 23.5 X1940 28.6 628 26.5 X1941 48.5 537 36.2 X1942 43.3 561 60.8 X1943 37.0 617 84.4 X1944 37.8 627 91.2 X1945 39.3 737 92.4 X1946 53.5 760 86.0 X1947 55.6 581 111.1 X1948 49.6 662 130.6 X1949 32.0 584 141.8 X1950 32.2 635 136.7 X1951 54.4 724 129.7 X1952 71.8 864 145.5 X1953 90.1 1194 174.8 X1954 68.6 1189 213.5 General.Electric_(Intercept) General.Electric_value General.Electric_X1935 1 1171 General.Electric_X1936 1 2016 General.Electric_X1937 1 2803 General.Electric_X1938 1 2040 General.Electric_X1939 1 2256 General.Electric_X1940 1 2132 General.Electric_X1941 1 1834 General.Electric_X1942 1 1588 General.Electric_X1943 1 1749 General.Electric_X1944 1 1687 General.Electric_X1945 1 2008 General.Electric_X1946 1 2208 General.Electric_X1947 1 1657 General.Electric_X1948 1 1604 General.Electric_X1949 1 1432 General.Electric_X1950 1 1610 General.Electric_X1951 1 1819 General.Electric_X1952 1 2080 General.Electric_X1953 1 2372 General.Electric_X1954 1 2760 Westinghouse_X1935 0 0 Westinghouse_X1936 0 0 Westinghouse_X1937 0 0 Westinghouse_X1938 0 0 Westinghouse_X1939 0 0 Westinghouse_X1940 0 0 Westinghouse_X1941 0 0 Westinghouse_X1942 0 0 Westinghouse_X1943 0 0 Westinghouse_X1944 0 0 Westinghouse_X1945 0 0 Westinghouse_X1946 0 0 Westinghouse_X1947 0 0 Westinghouse_X1948 0 0 Westinghouse_X1949 0 0 Westinghouse_X1950 0 0 Westinghouse_X1951 0 0 Westinghouse_X1952 0 0 Westinghouse_X1953 0 0 Westinghouse_X1954 0 0 General.Electric_capital Westinghouse_(Intercept) General.Electric_X1935 97.8 0 General.Electric_X1936 104.4 0 General.Electric_X1937 118.0 0 General.Electric_X1938 156.2 0 General.Electric_X1939 172.6 0 General.Electric_X1940 186.6 0 General.Electric_X1941 220.9 0 General.Electric_X1942 287.8 0 General.Electric_X1943 319.9 0 General.Electric_X1944 321.3 0 General.Electric_X1945 319.6 0 General.Electric_X1946 346.0 0 General.Electric_X1947 456.4 0 General.Electric_X1948 543.4 0 General.Electric_X1949 618.3 0 General.Electric_X1950 647.4 0 General.Electric_X1951 671.3 0 General.Electric_X1952 726.1 0 General.Electric_X1953 800.3 0 General.Electric_X1954 888.9 0 Westinghouse_X1935 0.0 1 Westinghouse_X1936 0.0 1 Westinghouse_X1937 0.0 1 Westinghouse_X1938 0.0 1 Westinghouse_X1939 0.0 1 Westinghouse_X1940 0.0 1 Westinghouse_X1941 0.0 1 Westinghouse_X1942 0.0 1 Westinghouse_X1943 0.0 1 Westinghouse_X1944 0.0 1 Westinghouse_X1945 0.0 1 Westinghouse_X1946 0.0 1 Westinghouse_X1947 0.0 1 Westinghouse_X1948 0.0 1 Westinghouse_X1949 0.0 1 Westinghouse_X1950 0.0 1 Westinghouse_X1951 0.0 1 Westinghouse_X1952 0.0 1 Westinghouse_X1953 0.0 1 Westinghouse_X1954 0.0 1 Westinghouse_value Westinghouse_capital General.Electric_X1935 0 0.0 General.Electric_X1936 0 0.0 General.Electric_X1937 0 0.0 General.Electric_X1938 0 0.0 General.Electric_X1939 0 0.0 General.Electric_X1940 0 0.0 General.Electric_X1941 0 0.0 General.Electric_X1942 0 0.0 General.Electric_X1943 0 0.0 General.Electric_X1944 0 0.0 General.Electric_X1945 0 0.0 General.Electric_X1946 0 0.0 General.Electric_X1947 0 0.0 General.Electric_X1948 0 0.0 General.Electric_X1949 0 0.0 General.Electric_X1950 0 0.0 General.Electric_X1951 0 0.0 General.Electric_X1952 0 0.0 General.Electric_X1953 0 0.0 General.Electric_X1954 0 0.0 Westinghouse_X1935 192 1.8 Westinghouse_X1936 516 0.8 Westinghouse_X1937 729 7.4 Westinghouse_X1938 560 18.1 Westinghouse_X1939 520 23.5 Westinghouse_X1940 628 26.5 Westinghouse_X1941 537 36.2 Westinghouse_X1942 561 60.8 Westinghouse_X1943 617 84.4 Westinghouse_X1944 627 91.2 Westinghouse_X1945 737 92.4 Westinghouse_X1946 760 86.0 Westinghouse_X1947 581 111.1 Westinghouse_X1948 662 130.6 Westinghouse_X1949 584 141.8 Westinghouse_X1950 635 136.7 Westinghouse_X1951 724 129.7 Westinghouse_X1952 864 145.5 Westinghouse_X1953 1194 174.8 Westinghouse_X1954 1189 213.5 $General.Electric General.Electric_invest ~ General.Electric_value + General.Electric_capital $Westinghouse Westinghouse_invest ~ Westinghouse_value + Westinghouse_capital General.Electric_invest ~ General.Electric_value + General.Electric_capital $General.Electric General.Electric_invest ~ General.Electric_value + General.Electric_capital attr(,"variables") list(General.Electric_invest, General.Electric_value, General.Electric_capital) attr(,"factors") General.Electric_value General.Electric_capital General.Electric_invest 0 0 General.Electric_value 1 0 General.Electric_capital 0 1 attr(,"term.labels") [1] "General.Electric_value" "General.Electric_capital" attr(,"order") [1] 1 1 attr(,"intercept") [1] 1 attr(,"response") [1] 1 attr(,".Environment") attr(,"predvars") list(General.Electric_invest, General.Electric_value, General.Electric_capital) attr(,"dataClasses") General.Electric_invest General.Electric_value General.Electric_capital "numeric" "numeric" "numeric" $Westinghouse Westinghouse_invest ~ Westinghouse_value + Westinghouse_capital attr(,"variables") list(Westinghouse_invest, Westinghouse_value, Westinghouse_capital) attr(,"factors") Westinghouse_value Westinghouse_capital Westinghouse_invest 0 0 Westinghouse_value 1 0 Westinghouse_capital 0 1 attr(,"term.labels") [1] "Westinghouse_value" "Westinghouse_capital" attr(,"order") [1] 1 1 attr(,"intercept") [1] 1 attr(,"response") [1] 1 attr(,".Environment") attr(,"predvars") list(Westinghouse_invest, Westinghouse_value, Westinghouse_capital) attr(,"dataClasses") Westinghouse_invest Westinghouse_value Westinghouse_capital "numeric" "numeric" "numeric" General.Electric_invest ~ General.Electric_value + General.Electric_capital attr(,"variables") list(General.Electric_invest, General.Electric_value, General.Electric_capital) attr(,"factors") General.Electric_value General.Electric_capital General.Electric_invest 0 0 General.Electric_value 1 0 General.Electric_capital 0 1 attr(,"term.labels") [1] "General.Electric_value" "General.Electric_capital" attr(,"order") [1] 1 1 attr(,"intercept") [1] 1 attr(,"response") [1] 1 attr(,".Environment") attr(,"predvars") list(General.Electric_invest, General.Electric_value, General.Electric_capital) attr(,"dataClasses") General.Electric_invest General.Electric_value General.Electric_capital "numeric" "numeric" "numeric" > > # SUR > if(requireNamespace( 'plm', quietly = TRUE ) ) { + theilSur <- systemfit( formulaGrunfeld, "SUR", + data = GrunfeldTheil, methodResidCov = "noDfCor", useMatrix = useMatrix ) + print( theilSur ) + print( summary( theilSur ) ) + print( summary( theilSur, useDfSys = TRUE, equations = FALSE ) ) + print( summary( theilSur, residCov = FALSE, equations = FALSE ) ) + print( coef( theilSur ) ) + print( coef( summary( theilSur ) ) ) + print( vcov( theilSur ) ) + print( residuals( theilSur ) ) + print( confint( theilSur ) ) + print( fitted( theilSur ) ) + print( logLik( theilSur ) ) + print( logLik( theilSur, residCovDiag = TRUE ) ) + print( nobs( theilSur ) ) + print( model.frame( theilSur ) ) + print( model.matrix( theilSur ) ) + print( formula( theilSur ) ) + print( formula( theilSur$eq[[ 2 ]] ) ) + print( terms( theilSur ) ) + print( terms( theilSur$eq[[ 2 ]] ) ) + } systemfit results method: SUR Coefficients: General.Electric_(Intercept) General.Electric_value -27.7193 0.0383 General.Electric_capital Westinghouse_(Intercept) 0.1390 -1.2520 Westinghouse_value Westinghouse_capital 0.0576 0.0640 systemfit results method: SUR N DF SSR detRCov OLS-R2 McElroy-R2 system 40 34 15590 25750 0.699 0.615 N DF SSR MSE RMSE R2 Adj R2 General.Electric 20 17 13788 811 28.5 0.693 0.656 Westinghouse 20 17 1801 106 10.3 0.740 0.710 The covariance matrix of the residuals used for estimation General.Electric Westinghouse General.Electric 661 176.4 Westinghouse 176 88.7 The covariance matrix of the residuals General.Electric Westinghouse General.Electric 689 190.6 Westinghouse 191 90.1 The correlations of the residuals General.Electric Westinghouse General.Electric 1.000 0.765 Westinghouse 0.765 1.000 SUR estimates for 'General.Electric' (equation 1) Model Formula: General.Electric_invest ~ General.Electric_value + General.Electric_capital Estimate Std. Error t value Pr(>|t|) (Intercept) -27.7193 27.0328 -1.03 0.32 value 0.0383 0.0133 2.88 0.01 * capital 0.1390 0.0230 6.04 1.3e-05 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 28.479 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 13788.376 MSE: 811.081 Root MSE: 28.479 Multiple R-Squared: 0.693 Adjusted R-Squared: 0.656 SUR estimates for 'Westinghouse' (equation 2) Model Formula: Westinghouse_invest ~ Westinghouse_value + Westinghouse_capital Estimate Std. Error t value Pr(>|t|) (Intercept) -1.2520 6.9563 -0.18 0.85930 value 0.0576 0.0134 4.30 0.00049 *** capital 0.0640 0.0489 1.31 0.20818 --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 10.294 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 1801.301 MSE: 105.959 Root MSE: 10.294 Multiple R-Squared: 0.74 Adjusted R-Squared: 0.71 systemfit results method: SUR N DF SSR detRCov OLS-R2 McElroy-R2 system 40 34 15590 25750 0.699 0.615 N DF SSR MSE RMSE R2 Adj R2 General.Electric 20 17 13788 811 28.5 0.693 0.656 Westinghouse 20 17 1801 106 10.3 0.740 0.710 The covariance matrix of the residuals used for estimation General.Electric Westinghouse General.Electric 661 176.4 Westinghouse 176 88.7 The covariance matrix of the residuals General.Electric Westinghouse General.Electric 689 190.6 Westinghouse 191 90.1 The correlations of the residuals General.Electric Westinghouse General.Electric 1.000 0.765 Westinghouse 0.765 1.000 Coefficients: Estimate Std. Error t value Pr(>|t|) General.Electric_(Intercept) -27.7193 27.0328 -1.03 0.31242 General.Electric_value 0.0383 0.0133 2.88 0.00679 ** General.Electric_capital 0.1390 0.0230 6.04 7.7e-07 *** Westinghouse_(Intercept) -1.2520 6.9563 -0.18 0.85824 Westinghouse_value 0.0576 0.0134 4.30 0.00014 *** Westinghouse_capital 0.0640 0.0489 1.31 0.19954 --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 systemfit results method: SUR N DF SSR detRCov OLS-R2 McElroy-R2 system 40 34 15590 25750 0.699 0.615 N DF SSR MSE RMSE R2 Adj R2 General.Electric 20 17 13788 811 28.5 0.693 0.656 Westinghouse 20 17 1801 106 10.3 0.740 0.710 Coefficients: Estimate Std. Error t value Pr(>|t|) General.Electric_(Intercept) -27.7193 27.0328 -1.03 0.31955 General.Electric_value 0.0383 0.0133 2.88 0.01034 * General.Electric_capital 0.1390 0.0230 6.04 1.3e-05 *** Westinghouse_(Intercept) -1.2520 6.9563 -0.18 0.85930 Westinghouse_value 0.0576 0.0134 4.30 0.00049 *** Westinghouse_capital 0.0640 0.0489 1.31 0.20818 --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 General.Electric_(Intercept) General.Electric_value -27.7193 0.0383 General.Electric_capital Westinghouse_(Intercept) 0.1390 -1.2520 Westinghouse_value Westinghouse_capital 0.0576 0.0640 Estimate Std. Error t value Pr(>|t|) General.Electric_(Intercept) -27.7193 27.0328 -1.03 3.20e-01 General.Electric_value 0.0383 0.0133 2.88 1.03e-02 General.Electric_capital 0.1390 0.0230 6.04 1.34e-05 Westinghouse_(Intercept) -1.2520 6.9563 -0.18 8.59e-01 Westinghouse_value 0.0576 0.0134 4.30 4.88e-04 Westinghouse_capital 0.0640 0.0489 1.31 2.08e-01 General.Electric_(Intercept) General.Electric_(Intercept) 730.774 General.Electric_value -0.329 General.Electric_capital -0.146 Westinghouse_(Intercept) 126.963 Westinghouse_value -0.226 Westinghouse_capital 0.393 General.Electric_value General.Electric_capital General.Electric_(Intercept) -0.329266 -1.46e-01 General.Electric_value 0.000177 -3.40e-05 General.Electric_capital -0.000034 5.31e-04 Westinghouse_(Intercept) -0.052688 -3.96e-02 Westinghouse_value 0.000120 -1.69e-05 Westinghouse_capital -0.000325 5.95e-04 Westinghouse_(Intercept) Westinghouse_value General.Electric_(Intercept) 126.9626 -2.26e-01 General.Electric_value -0.0527 1.20e-04 General.Electric_capital -0.0396 -1.69e-05 Westinghouse_(Intercept) 48.3908 -8.00e-02 Westinghouse_value -0.0800 1.80e-04 Westinghouse_capital 0.1136 -4.75e-04 Westinghouse_capital General.Electric_(Intercept) 0.392515 General.Electric_value -0.000325 General.Electric_capital 0.000595 Westinghouse_(Intercept) 0.113618 Westinghouse_value -0.000475 Westinghouse_capital 0.002391 General.Electric Westinghouse X1935 2.3756 3.03 X1936 -19.0218 -2.64 X1937 -18.8820 -6.18 X1938 -27.5395 -9.31 X1939 -34.6138 -11.37 X1940 -5.5099 -8.09 X1941 39.7415 16.49 X1942 18.7681 8.36 X1943 -22.4783 -2.70 X1944 -24.7900 -2.89 X1945 -0.0321 -7.87 X1946 54.9123 5.38 X1947 47.9946 16.20 X1948 37.0021 4.29 X1949 -14.7994 -9.42 X1950 -30.4914 -11.86 X1951 -0.1173 5.62 X1952 4.3913 13.93 X1953 5.0921 11.37 X1954 -12.0024 -12.32 2.5 % 97.5 % General.Electric_(Intercept) -84.754 29.315 General.Electric_value 0.010 0.066 General.Electric_capital 0.090 0.188 Westinghouse_(Intercept) -15.929 13.425 Westinghouse_value 0.029 0.086 Westinghouse_capital -0.039 0.167 General.Electric Westinghouse X1935 30.7 9.9 X1936 64.0 28.5 X1937 96.1 41.2 X1938 72.1 32.2 X1939 82.7 30.2 X1940 79.9 36.7 X1941 73.3 32.0 X1942 73.1 35.0 X1943 83.8 39.7 X1944 81.6 40.7 X1945 93.6 47.1 X1946 105.0 48.1 X1947 99.2 39.4 X1948 109.3 45.3 X1949 113.1 41.5 X1950 124.0 44.1 X1951 135.3 48.8 X1952 152.9 57.9 X1953 174.4 78.7 X1954 201.6 80.9 'log Lik.' -158 (df=9) 'log Lik.' -167 (df=9) [1] 40 General.Electric_invest General.Electric_value General.Electric_capital X1935 33.1 1171 97.8 X1936 45.0 2016 104.4 X1937 77.2 2803 118.0 X1938 44.6 2040 156.2 X1939 48.1 2256 172.6 X1940 74.4 2132 186.6 X1941 113.0 1834 220.9 X1942 91.9 1588 287.8 X1943 61.3 1749 319.9 X1944 56.8 1687 321.3 X1945 93.6 2008 319.6 X1946 159.9 2208 346.0 X1947 147.2 1657 456.4 X1948 146.3 1604 543.4 X1949 98.3 1432 618.3 X1950 93.5 1610 647.4 X1951 135.2 1819 671.3 X1952 157.3 2080 726.1 X1953 179.5 2372 800.3 X1954 189.6 2760 888.9 Westinghouse_invest Westinghouse_value Westinghouse_capital X1935 12.9 192 1.8 X1936 25.9 516 0.8 X1937 35.0 729 7.4 X1938 22.9 560 18.1 X1939 18.8 520 23.5 X1940 28.6 628 26.5 X1941 48.5 537 36.2 X1942 43.3 561 60.8 X1943 37.0 617 84.4 X1944 37.8 627 91.2 X1945 39.3 737 92.4 X1946 53.5 760 86.0 X1947 55.6 581 111.1 X1948 49.6 662 130.6 X1949 32.0 584 141.8 X1950 32.2 635 136.7 X1951 54.4 724 129.7 X1952 71.8 864 145.5 X1953 90.1 1194 174.8 X1954 68.6 1189 213.5 General.Electric_(Intercept) General.Electric_value General.Electric_X1935 1 1171 General.Electric_X1936 1 2016 General.Electric_X1937 1 2803 General.Electric_X1938 1 2040 General.Electric_X1939 1 2256 General.Electric_X1940 1 2132 General.Electric_X1941 1 1834 General.Electric_X1942 1 1588 General.Electric_X1943 1 1749 General.Electric_X1944 1 1687 General.Electric_X1945 1 2008 General.Electric_X1946 1 2208 General.Electric_X1947 1 1657 General.Electric_X1948 1 1604 General.Electric_X1949 1 1432 General.Electric_X1950 1 1610 General.Electric_X1951 1 1819 General.Electric_X1952 1 2080 General.Electric_X1953 1 2372 General.Electric_X1954 1 2760 Westinghouse_X1935 0 0 Westinghouse_X1936 0 0 Westinghouse_X1937 0 0 Westinghouse_X1938 0 0 Westinghouse_X1939 0 0 Westinghouse_X1940 0 0 Westinghouse_X1941 0 0 Westinghouse_X1942 0 0 Westinghouse_X1943 0 0 Westinghouse_X1944 0 0 Westinghouse_X1945 0 0 Westinghouse_X1946 0 0 Westinghouse_X1947 0 0 Westinghouse_X1948 0 0 Westinghouse_X1949 0 0 Westinghouse_X1950 0 0 Westinghouse_X1951 0 0 Westinghouse_X1952 0 0 Westinghouse_X1953 0 0 Westinghouse_X1954 0 0 General.Electric_capital Westinghouse_(Intercept) General.Electric_X1935 97.8 0 General.Electric_X1936 104.4 0 General.Electric_X1937 118.0 0 General.Electric_X1938 156.2 0 General.Electric_X1939 172.6 0 General.Electric_X1940 186.6 0 General.Electric_X1941 220.9 0 General.Electric_X1942 287.8 0 General.Electric_X1943 319.9 0 General.Electric_X1944 321.3 0 General.Electric_X1945 319.6 0 General.Electric_X1946 346.0 0 General.Electric_X1947 456.4 0 General.Electric_X1948 543.4 0 General.Electric_X1949 618.3 0 General.Electric_X1950 647.4 0 General.Electric_X1951 671.3 0 General.Electric_X1952 726.1 0 General.Electric_X1953 800.3 0 General.Electric_X1954 888.9 0 Westinghouse_X1935 0.0 1 Westinghouse_X1936 0.0 1 Westinghouse_X1937 0.0 1 Westinghouse_X1938 0.0 1 Westinghouse_X1939 0.0 1 Westinghouse_X1940 0.0 1 Westinghouse_X1941 0.0 1 Westinghouse_X1942 0.0 1 Westinghouse_X1943 0.0 1 Westinghouse_X1944 0.0 1 Westinghouse_X1945 0.0 1 Westinghouse_X1946 0.0 1 Westinghouse_X1947 0.0 1 Westinghouse_X1948 0.0 1 Westinghouse_X1949 0.0 1 Westinghouse_X1950 0.0 1 Westinghouse_X1951 0.0 1 Westinghouse_X1952 0.0 1 Westinghouse_X1953 0.0 1 Westinghouse_X1954 0.0 1 Westinghouse_value Westinghouse_capital General.Electric_X1935 0 0.0 General.Electric_X1936 0 0.0 General.Electric_X1937 0 0.0 General.Electric_X1938 0 0.0 General.Electric_X1939 0 0.0 General.Electric_X1940 0 0.0 General.Electric_X1941 0 0.0 General.Electric_X1942 0 0.0 General.Electric_X1943 0 0.0 General.Electric_X1944 0 0.0 General.Electric_X1945 0 0.0 General.Electric_X1946 0 0.0 General.Electric_X1947 0 0.0 General.Electric_X1948 0 0.0 General.Electric_X1949 0 0.0 General.Electric_X1950 0 0.0 General.Electric_X1951 0 0.0 General.Electric_X1952 0 0.0 General.Electric_X1953 0 0.0 General.Electric_X1954 0 0.0 Westinghouse_X1935 192 1.8 Westinghouse_X1936 516 0.8 Westinghouse_X1937 729 7.4 Westinghouse_X1938 560 18.1 Westinghouse_X1939 520 23.5 Westinghouse_X1940 628 26.5 Westinghouse_X1941 537 36.2 Westinghouse_X1942 561 60.8 Westinghouse_X1943 617 84.4 Westinghouse_X1944 627 91.2 Westinghouse_X1945 737 92.4 Westinghouse_X1946 760 86.0 Westinghouse_X1947 581 111.1 Westinghouse_X1948 662 130.6 Westinghouse_X1949 584 141.8 Westinghouse_X1950 635 136.7 Westinghouse_X1951 724 129.7 Westinghouse_X1952 864 145.5 Westinghouse_X1953 1194 174.8 Westinghouse_X1954 1189 213.5 $General.Electric General.Electric_invest ~ General.Electric_value + General.Electric_capital $Westinghouse Westinghouse_invest ~ Westinghouse_value + Westinghouse_capital Westinghouse_invest ~ Westinghouse_value + Westinghouse_capital $General.Electric General.Electric_invest ~ General.Electric_value + General.Electric_capital attr(,"variables") list(General.Electric_invest, General.Electric_value, General.Electric_capital) attr(,"factors") General.Electric_value General.Electric_capital General.Electric_invest 0 0 General.Electric_value 1 0 General.Electric_capital 0 1 attr(,"term.labels") [1] "General.Electric_value" "General.Electric_capital" attr(,"order") [1] 1 1 attr(,"intercept") [1] 1 attr(,"response") [1] 1 attr(,".Environment") attr(,"predvars") list(General.Electric_invest, General.Electric_value, General.Electric_capital) attr(,"dataClasses") General.Electric_invest General.Electric_value General.Electric_capital "numeric" "numeric" "numeric" $Westinghouse Westinghouse_invest ~ Westinghouse_value + Westinghouse_capital attr(,"variables") list(Westinghouse_invest, Westinghouse_value, Westinghouse_capital) attr(,"factors") Westinghouse_value Westinghouse_capital Westinghouse_invest 0 0 Westinghouse_value 1 0 Westinghouse_capital 0 1 attr(,"term.labels") [1] "Westinghouse_value" "Westinghouse_capital" attr(,"order") [1] 1 1 attr(,"intercept") [1] 1 attr(,"response") [1] 1 attr(,".Environment") attr(,"predvars") list(Westinghouse_invest, Westinghouse_value, Westinghouse_capital) attr(,"dataClasses") Westinghouse_invest Westinghouse_value Westinghouse_capital "numeric" "numeric" "numeric" Westinghouse_invest ~ Westinghouse_value + Westinghouse_capital attr(,"variables") list(Westinghouse_invest, Westinghouse_value, Westinghouse_capital) attr(,"factors") Westinghouse_value Westinghouse_capital Westinghouse_invest 0 0 Westinghouse_value 1 0 Westinghouse_capital 0 1 attr(,"term.labels") [1] "Westinghouse_value" "Westinghouse_capital" attr(,"order") [1] 1 1 attr(,"intercept") [1] 1 attr(,"response") [1] 1 attr(,".Environment") attr(,"predvars") list(Westinghouse_invest, Westinghouse_value, Westinghouse_capital) attr(,"dataClasses") Westinghouse_invest Westinghouse_value Westinghouse_capital "numeric" "numeric" "numeric" > > ## Repeating the OLS and SUR estimations in Greene (2003, pp. 351) > if(requireNamespace( 'plm', quietly = TRUE ) ) { + GrunfeldGreene <- pdata.frame( GrunfeldGreene, c( "firm", "year" ) ) + formulaGrunfeld <- invest ~ value + capital + } > > # OLS > if(requireNamespace( 'plm', quietly = TRUE ) ) { + greeneOls <- systemfit( formulaGrunfeld, "OLS", + data = GrunfeldGreene, useMatrix = useMatrix ) + print( greeneOls ) + print( summary( greeneOls ) ) + print( summary( greeneOls, useDfSys = TRUE, equations = FALSE ) ) + print( summary( greeneOls, residCov = FALSE ) ) + print( sapply( greeneOls$eq, function(x){return(summary(x)$ssr/20)} ) ) # sigma^2 + print( coef( greeneOls ) ) + print( coef( summary( greeneOls ) ) ) + print( vcov( greeneOls ) ) + print( residuals( greeneOls ) ) + print( confint(greeneOls ) ) + print( fitted( greeneOls ) ) + print( logLik( greeneOls ) ) + print( logLik( greeneOls, residCovDiag = TRUE ) ) + print( nobs( greeneOls ) ) + print( model.frame( greeneOls ) ) + print( model.matrix( greeneOls ) ) + print( formula( greeneOls ) ) + print( formula( greeneOls$eq[[ 2 ]] ) ) + print( terms( greeneOls ) ) + print( terms( greeneOls$eq[[ 2 ]] ) ) + } systemfit results method: OLS Coefficients: Chrysler_(Intercept) Chrysler_value -6.1900 0.0779 Chrysler_capital General.Electric_(Intercept) 0.3157 -9.9563 General.Electric_value General.Electric_capital 0.0266 0.1517 General.Motors_(Intercept) General.Motors_value -149.7825 0.1193 General.Motors_capital US.Steel_(Intercept) 0.3714 -30.3685 US.Steel_value US.Steel_capital 0.1566 0.4239 Westinghouse_(Intercept) Westinghouse_value -0.5094 0.0529 Westinghouse_capital 0.0924 systemfit results method: OLS N DF SSR detRCov OLS-R2 McElroy-R2 system 100 85 339121 2.09e+14 0.848 0.862 N DF SSR MSE RMSE R2 Adj R2 Chrysler 20 17 2997 176 13.3 0.914 0.903 General.Electric 20 17 13217 777 27.9 0.705 0.671 General.Motors 20 17 143206 8424 91.8 0.921 0.912 US.Steel 20 17 177928 10466 102.3 0.440 0.374 Westinghouse 20 17 1773 104 10.2 0.744 0.714 The covariance matrix of the residuals Chrysler General.Electric General.Motors US.Steel Westinghouse Chrysler 176.3 -25.1 -333 492 15.7 General.Electric -25.1 777.4 715 1065 207.6 General.Motors -332.7 714.7 8424 -2614 148.4 US.Steel 491.9 1064.6 -2614 10466 642.6 Westinghouse 15.7 207.6 148 643 104.3 The correlations of the residuals Chrysler General.Electric General.Motors US.Steel Westinghouse Chrysler 1.0000 -0.0679 -0.273 0.362 0.115 General.Electric -0.0679 1.0000 0.279 0.373 0.729 General.Motors -0.2730 0.2793 1.000 -0.278 0.158 US.Steel 0.3621 0.3732 -0.278 1.000 0.615 Westinghouse 0.1154 0.7290 0.158 0.615 1.000 OLS estimates for 'Chrysler' (equation 1) Model Formula: Chrysler_invest ~ Chrysler_value + Chrysler_capital Estimate Std. Error t value Pr(>|t|) (Intercept) -6.1900 13.5065 -0.46 0.6525 value 0.0779 0.0200 3.90 0.0011 ** capital 0.3157 0.0288 10.96 4e-09 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 13.279 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 2997.444 MSE: 176.32 Root MSE: 13.279 Multiple R-Squared: 0.914 Adjusted R-Squared: 0.903 OLS estimates for 'General.Electric' (equation 2) Model Formula: General.Electric_invest ~ General.Electric_value + General.Electric_capital Estimate Std. Error t value Pr(>|t|) (Intercept) -9.9563 31.3742 -0.32 0.75 value 0.0266 0.0156 1.71 0.11 capital 0.1517 0.0257 5.90 1.7e-05 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 27.883 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 13216.588 MSE: 777.446 Root MSE: 27.883 Multiple R-Squared: 0.705 Adjusted R-Squared: 0.671 OLS estimates for 'General.Motors' (equation 3) Model Formula: General.Motors_invest ~ General.Motors_value + General.Motors_capital Estimate Std. Error t value Pr(>|t|) (Intercept) -149.7825 105.8421 -1.42 0.17508 value 0.1193 0.0258 4.62 0.00025 *** capital 0.3714 0.0371 10.02 1.5e-08 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 91.782 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 143205.877 MSE: 8423.875 Root MSE: 91.782 Multiple R-Squared: 0.921 Adjusted R-Squared: 0.912 OLS estimates for 'US.Steel' (equation 4) Model Formula: US.Steel_invest ~ US.Steel_value + US.Steel_capital Estimate Std. Error t value Pr(>|t|) (Intercept) -30.3685 157.0477 -0.19 0.849 value 0.1566 0.0789 1.98 0.064 . capital 0.4239 0.1552 2.73 0.014 * --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 102.305 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 177928.314 MSE: 10466.371 Root MSE: 102.305 Multiple R-Squared: 0.44 Adjusted R-Squared: 0.374 OLS estimates for 'Westinghouse' (equation 5) Model Formula: Westinghouse_invest ~ Westinghouse_value + Westinghouse_capital Estimate Std. Error t value Pr(>|t|) (Intercept) -0.5094 8.0153 -0.06 0.9501 value 0.0529 0.0157 3.37 0.0037 ** capital 0.0924 0.0561 1.65 0.1179 --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 10.213 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 1773.234 MSE: 104.308 Root MSE: 10.213 Multiple R-Squared: 0.744 Adjusted R-Squared: 0.714 systemfit results method: OLS N DF SSR detRCov OLS-R2 McElroy-R2 system 100 85 339121 2.09e+14 0.848 0.862 N DF SSR MSE RMSE R2 Adj R2 Chrysler 20 17 2997 176 13.3 0.914 0.903 General.Electric 20 17 13217 777 27.9 0.705 0.671 General.Motors 20 17 143206 8424 91.8 0.921 0.912 US.Steel 20 17 177928 10466 102.3 0.440 0.374 Westinghouse 20 17 1773 104 10.2 0.744 0.714 The covariance matrix of the residuals Chrysler General.Electric General.Motors US.Steel Westinghouse Chrysler 176.3 -25.1 -333 492 15.7 General.Electric -25.1 777.4 715 1065 207.6 General.Motors -332.7 714.7 8424 -2614 148.4 US.Steel 491.9 1064.6 -2614 10466 642.6 Westinghouse 15.7 207.6 148 643 104.3 The correlations of the residuals Chrysler General.Electric General.Motors US.Steel Westinghouse Chrysler 1.0000 -0.0679 -0.273 0.362 0.115 General.Electric -0.0679 1.0000 0.279 0.373 0.729 General.Motors -0.2730 0.2793 1.000 -0.278 0.158 US.Steel 0.3621 0.3732 -0.278 1.000 0.615 Westinghouse 0.1154 0.7290 0.158 0.615 1.000 Coefficients: Estimate Std. Error t value Pr(>|t|) Chrysler_(Intercept) -6.1900 13.5065 -0.46 0.64791 Chrysler_value 0.0779 0.0200 3.90 0.00019 *** Chrysler_capital 0.3157 0.0288 10.96 < 2e-16 *** General.Electric_(Intercept) -9.9563 31.3742 -0.32 0.75176 General.Electric_value 0.0266 0.0156 1.71 0.09171 . General.Electric_capital 0.1517 0.0257 5.90 7.2e-08 *** General.Motors_(Intercept) -149.7825 105.8421 -1.42 0.16068 General.Motors_value 0.1193 0.0258 4.62 1.4e-05 *** General.Motors_capital 0.3714 0.0371 10.02 4.4e-16 *** US.Steel_(Intercept) -30.3685 157.0477 -0.19 0.84713 US.Steel_value 0.1566 0.0789 1.98 0.05039 . US.Steel_capital 0.4239 0.1552 2.73 0.00768 ** Westinghouse_(Intercept) -0.5094 8.0153 -0.06 0.94948 Westinghouse_value 0.0529 0.0157 3.37 0.00114 ** Westinghouse_capital 0.0924 0.0561 1.65 0.10321 --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 systemfit results method: OLS N DF SSR detRCov OLS-R2 McElroy-R2 system 100 85 339121 2.09e+14 0.848 0.862 N DF SSR MSE RMSE R2 Adj R2 Chrysler 20 17 2997 176 13.3 0.914 0.903 General.Electric 20 17 13217 777 27.9 0.705 0.671 General.Motors 20 17 143206 8424 91.8 0.921 0.912 US.Steel 20 17 177928 10466 102.3 0.440 0.374 Westinghouse 20 17 1773 104 10.2 0.744 0.714 OLS estimates for 'Chrysler' (equation 1) Model Formula: Chrysler_invest ~ Chrysler_value + Chrysler_capital Estimate Std. Error t value Pr(>|t|) (Intercept) -6.1900 13.5065 -0.46 0.6525 value 0.0779 0.0200 3.90 0.0011 ** capital 0.3157 0.0288 10.96 4e-09 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 13.279 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 2997.444 MSE: 176.32 Root MSE: 13.279 Multiple R-Squared: 0.914 Adjusted R-Squared: 0.903 OLS estimates for 'General.Electric' (equation 2) Model Formula: General.Electric_invest ~ General.Electric_value + General.Electric_capital Estimate Std. Error t value Pr(>|t|) (Intercept) -9.9563 31.3742 -0.32 0.75 value 0.0266 0.0156 1.71 0.11 capital 0.1517 0.0257 5.90 1.7e-05 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 27.883 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 13216.588 MSE: 777.446 Root MSE: 27.883 Multiple R-Squared: 0.705 Adjusted R-Squared: 0.671 OLS estimates for 'General.Motors' (equation 3) Model Formula: General.Motors_invest ~ General.Motors_value + General.Motors_capital Estimate Std. Error t value Pr(>|t|) (Intercept) -149.7825 105.8421 -1.42 0.17508 value 0.1193 0.0258 4.62 0.00025 *** capital 0.3714 0.0371 10.02 1.5e-08 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 91.782 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 143205.877 MSE: 8423.875 Root MSE: 91.782 Multiple R-Squared: 0.921 Adjusted R-Squared: 0.912 OLS estimates for 'US.Steel' (equation 4) Model Formula: US.Steel_invest ~ US.Steel_value + US.Steel_capital Estimate Std. Error t value Pr(>|t|) (Intercept) -30.3685 157.0477 -0.19 0.849 value 0.1566 0.0789 1.98 0.064 . capital 0.4239 0.1552 2.73 0.014 * --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 102.305 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 177928.314 MSE: 10466.371 Root MSE: 102.305 Multiple R-Squared: 0.44 Adjusted R-Squared: 0.374 OLS estimates for 'Westinghouse' (equation 5) Model Formula: Westinghouse_invest ~ Westinghouse_value + Westinghouse_capital Estimate Std. Error t value Pr(>|t|) (Intercept) -0.5094 8.0153 -0.06 0.9501 value 0.0529 0.0157 3.37 0.0037 ** capital 0.0924 0.0561 1.65 0.1179 --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 10.213 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 1773.234 MSE: 104.308 Root MSE: 10.213 Multiple R-Squared: 0.744 Adjusted R-Squared: 0.714 [1] 149.9 660.8 7160.3 8896.4 88.7 Chrysler_(Intercept) Chrysler_value -6.1900 0.0779 Chrysler_capital General.Electric_(Intercept) 0.3157 -9.9563 General.Electric_value General.Electric_capital 0.0266 0.1517 General.Motors_(Intercept) General.Motors_value -149.7825 0.1193 General.Motors_capital US.Steel_(Intercept) 0.3714 -30.3685 US.Steel_value US.Steel_capital 0.1566 0.4239 Westinghouse_(Intercept) Westinghouse_value -0.5094 0.0529 Westinghouse_capital 0.0924 Estimate Std. Error t value Pr(>|t|) Chrysler_(Intercept) -6.1900 13.5065 -0.4583 6.53e-01 Chrysler_value 0.0779 0.0200 3.9026 1.15e-03 Chrysler_capital 0.3157 0.0288 10.9574 3.99e-09 General.Electric_(Intercept) -9.9563 31.3742 -0.3173 7.55e-01 General.Electric_value 0.0266 0.0156 1.7057 1.06e-01 General.Electric_capital 0.1517 0.0257 5.9015 1.74e-05 General.Motors_(Intercept) -149.7825 105.8421 -1.4151 1.75e-01 General.Motors_value 0.1193 0.0258 4.6172 2.46e-04 General.Motors_capital 0.3714 0.0371 10.0193 1.51e-08 US.Steel_(Intercept) -30.3685 157.0477 -0.1934 8.49e-01 US.Steel_value 0.1566 0.0789 1.9848 6.35e-02 US.Steel_capital 0.4239 0.1552 2.7308 1.42e-02 Westinghouse_(Intercept) -0.5094 8.0153 -0.0636 9.50e-01 Westinghouse_value 0.0529 0.0157 3.3677 3.65e-03 Westinghouse_capital 0.0924 0.0561 1.6472 1.18e-01 Chrysler_(Intercept) Chrysler_value Chrysler_(Intercept) 182.4250 -0.254690 Chrysler_value -0.2547 0.000399 Chrysler_capital 0.0243 -0.000180 General.Electric_(Intercept) 0.0000 0.000000 General.Electric_value 0.0000 0.000000 General.Electric_capital 0.0000 0.000000 General.Motors_(Intercept) 0.0000 0.000000 General.Motors_value 0.0000 0.000000 General.Motors_capital 0.0000 0.000000 US.Steel_(Intercept) 0.0000 0.000000 US.Steel_value 0.0000 0.000000 US.Steel_capital 0.0000 0.000000 Westinghouse_(Intercept) 0.0000 0.000000 Westinghouse_value 0.0000 0.000000 Westinghouse_capital 0.0000 0.000000 Chrysler_capital General.Electric_(Intercept) Chrysler_(Intercept) 0.02429 0.000 Chrysler_value -0.00018 0.000 Chrysler_capital 0.00083 0.000 General.Electric_(Intercept) 0.00000 984.344 General.Electric_value 0.00000 -0.451 General.Electric_capital 0.00000 -0.173 General.Motors_(Intercept) 0.00000 0.000 General.Motors_value 0.00000 0.000 General.Motors_capital 0.00000 0.000 US.Steel_(Intercept) 0.00000 0.000 US.Steel_value 0.00000 0.000 US.Steel_capital 0.00000 0.000 Westinghouse_(Intercept) 0.00000 0.000 Westinghouse_value 0.00000 0.000 Westinghouse_capital 0.00000 0.000 General.Electric_value General.Electric_capital Chrysler_(Intercept) 0.00e+00 0.00e+00 Chrysler_value 0.00e+00 0.00e+00 Chrysler_capital 0.00e+00 0.00e+00 General.Electric_(Intercept) -4.51e-01 -1.73e-01 General.Electric_value 2.42e-04 -4.73e-05 General.Electric_capital -4.73e-05 6.61e-04 General.Motors_(Intercept) 0.00e+00 0.00e+00 General.Motors_value 0.00e+00 0.00e+00 General.Motors_capital 0.00e+00 0.00e+00 US.Steel_(Intercept) 0.00e+00 0.00e+00 US.Steel_value 0.00e+00 0.00e+00 US.Steel_capital 0.00e+00 0.00e+00 Westinghouse_(Intercept) 0.00e+00 0.00e+00 Westinghouse_value 0.00e+00 0.00e+00 Westinghouse_capital 0.00e+00 0.00e+00 General.Motors_(Intercept) General.Motors_value Chrysler_(Intercept) 0.000 0.000000 Chrysler_value 0.000 0.000000 Chrysler_capital 0.000 0.000000 General.Electric_(Intercept) 0.000 0.000000 General.Electric_value 0.000 0.000000 General.Electric_capital 0.000 0.000000 General.Motors_(Intercept) 11202.555 -2.623398 General.Motors_value -2.623 0.000667 General.Motors_capital 0.907 -0.000415 US.Steel_(Intercept) 0.000 0.000000 US.Steel_value 0.000 0.000000 US.Steel_capital 0.000 0.000000 Westinghouse_(Intercept) 0.000 0.000000 Westinghouse_value 0.000 0.000000 Westinghouse_capital 0.000 0.000000 General.Motors_capital US.Steel_(Intercept) Chrysler_(Intercept) 0.000000 0.00 Chrysler_value 0.000000 0.00 Chrysler_capital 0.000000 0.00 General.Electric_(Intercept) 0.000000 0.00 General.Electric_value 0.000000 0.00 General.Electric_capital 0.000000 0.00 General.Motors_(Intercept) 0.906860 0.00 General.Motors_value -0.000415 0.00 General.Motors_capital 0.001374 0.00 US.Steel_(Intercept) 0.000000 24663.98 US.Steel_value 0.000000 -11.71 US.Steel_capital 0.000000 -3.52 Westinghouse_(Intercept) 0.000000 0.00 Westinghouse_value 0.000000 0.00 Westinghouse_capital 0.000000 0.00 US.Steel_value US.Steel_capital Chrysler_(Intercept) 0.00000 0.00000 Chrysler_value 0.00000 0.00000 Chrysler_capital 0.00000 0.00000 General.Electric_(Intercept) 0.00000 0.00000 General.Electric_value 0.00000 0.00000 General.Electric_capital 0.00000 0.00000 General.Motors_(Intercept) 0.00000 0.00000 General.Motors_value 0.00000 0.00000 General.Motors_capital 0.00000 0.00000 US.Steel_(Intercept) -11.70740 -3.52078 US.Steel_value 0.00622 -0.00188 US.Steel_capital -0.00188 0.02409 Westinghouse_(Intercept) 0.00000 0.00000 Westinghouse_value 0.00000 0.00000 Westinghouse_capital 0.00000 0.00000 Westinghouse_(Intercept) Westinghouse_value Chrysler_(Intercept) 0.000 0.000000 Chrysler_value 0.000 0.000000 Chrysler_capital 0.000 0.000000 General.Electric_(Intercept) 0.000 0.000000 General.Electric_value 0.000 0.000000 General.Electric_capital 0.000 0.000000 General.Motors_(Intercept) 0.000 0.000000 General.Motors_value 0.000 0.000000 General.Motors_capital 0.000 0.000000 US.Steel_(Intercept) 0.000 0.000000 US.Steel_value 0.000 0.000000 US.Steel_capital 0.000 0.000000 Westinghouse_(Intercept) 64.245 -0.109545 Westinghouse_value -0.110 0.000247 Westinghouse_capital 0.169 -0.000653 Westinghouse_capital Chrysler_(Intercept) 0.000000 Chrysler_value 0.000000 Chrysler_capital 0.000000 General.Electric_(Intercept) 0.000000 General.Electric_value 0.000000 General.Electric_capital 0.000000 General.Motors_(Intercept) 0.000000 General.Motors_value 0.000000 General.Motors_capital 0.000000 US.Steel_(Intercept) 0.000000 US.Steel_value 0.000000 US.Steel_capital 0.000000 Westinghouse_(Intercept) 0.168911 Westinghouse_value -0.000653 Westinghouse_capital 0.003147 Chrysler General.Electric General.Motors US.Steel Westinghouse X1935 10.622 -2.860 99.14 4.15 3.144 X1936 10.425 -14.402 -34.01 81.32 -0.958 X1937 -7.404 -5.175 -140.48 31.18 -3.684 X1938 7.302 -23.295 -3.28 -99.75 -7.915 X1939 -14.682 -28.031 -109.45 -178.23 -10.322 X1940 -2.315 -0.562 -19.91 -160.69 -6.613 X1941 0.631 40.750 24.12 19.65 17.265 X1942 -1.581 16.036 98.02 9.82 8.547 X1943 -13.459 -23.719 67.76 -46.76 -2.916 X1944 -7.780 -26.780 100.03 -83.74 -3.257 X1945 11.757 1.768 35.12 -91.24 -7.753 X1946 -16.133 58.737 103.90 28.34 5.796 X1947 -6.823 43.936 15.18 57.32 15.050 X1948 6.615 31.227 -51.86 140.23 2.969 X1949 -7.379 -23.552 -115.39 25.65 -11.433 X1950 1.268 -37.511 -63.51 34.88 -13.481 X1951 39.502 -4.983 -119.40 115.10 4.619 X1952 2.774 1.893 -77.82 149.19 13.138 X1953 -6.215 5.087 49.50 89.00 11.308 X1954 -7.124 -8.563 142.33 -125.42 -13.505 2.5 % 97.5 % Chrysler_(Intercept) -34.686 22.306 Chrysler_value 0.036 0.120 Chrysler_capital 0.255 0.377 General.Electric_(Intercept) -76.150 56.238 General.Electric_value -0.006 0.059 General.Electric_capital 0.097 0.206 General.Motors_(Intercept) -373.090 73.525 General.Motors_value 0.065 0.174 General.Motors_capital 0.293 0.450 US.Steel_(Intercept) -361.710 300.973 US.Steel_value -0.010 0.323 US.Steel_capital 0.096 0.751 Westinghouse_(Intercept) -17.420 16.401 Westinghouse_value 0.020 0.086 Westinghouse_capital -0.026 0.211 Chrysler General.Electric General.Motors US.Steel Westinghouse X1935 29.7 36.0 218 206 9.79 X1936 62.3 59.4 426 274 26.86 X1937 73.7 82.4 551 439 38.73 X1938 44.3 67.9 261 362 30.81 X1939 67.1 76.1 440 409 29.16 X1940 71.7 75.0 481 422 35.18 X1941 67.7 72.3 488 453 31.25 X1942 48.4 75.9 350 436 34.79 X1943 60.9 85.0 432 408 39.94 X1944 67.3 83.6 447 372 41.07 X1945 77.0 91.8 526 350 47.02 X1946 90.3 101.2 584 392 47.66 X1947 69.5 103.3 554 363 40.51 X1948 82.7 115.1 581 354 46.59 X1949 86.4 121.9 670 379 43.47 X1950 99.4 131.0 706 384 45.72 X1951 121.1 140.2 875 473 49.76 X1952 142.2 155.4 969 496 58.64 X1953 181.1 174.4 1255 552 78.77 X1954 179.6 198.2 1344 585 82.11 'log Lik.' -464 (df=16) 'log Lik.' -481 (df=16) [1] 100 Chrysler_invest Chrysler_value Chrysler_capital General.Electric_invest X1935 40.3 418 10.5 33.1 X1936 72.8 838 10.2 45.0 X1937 66.3 884 34.7 77.2 X1938 51.6 438 51.8 44.6 X1939 52.4 680 64.3 48.1 X1940 69.4 728 67.1 74.4 X1941 68.3 644 75.2 113.0 X1942 46.8 411 71.4 91.9 X1943 47.4 588 67.1 61.3 X1944 59.6 698 60.5 56.8 X1945 88.8 846 54.6 93.6 X1946 74.1 894 84.8 159.9 X1947 62.7 579 96.8 147.2 X1948 89.4 695 110.2 146.3 X1949 79.0 590 147.4 98.3 X1950 100.7 694 163.2 93.5 X1951 160.6 809 203.5 135.2 X1952 145.0 727 290.6 157.3 X1953 174.9 1002 346.1 179.5 X1954 172.5 703 414.9 189.6 General.Electric_value General.Electric_capital General.Motors_invest X1935 1171 97.8 318 X1936 2016 104.4 392 X1937 2803 118.0 411 X1938 2040 156.2 258 X1939 2256 172.6 331 X1940 2132 186.6 461 X1941 1834 220.9 512 X1942 1588 287.8 448 X1943 1749 319.9 500 X1944 1687 321.3 548 X1945 2008 319.6 561 X1946 2208 346.0 688 X1947 1657 456.4 569 X1948 1604 543.4 529 X1949 1432 618.3 555 X1950 1610 647.4 643 X1951 1819 671.3 756 X1952 2080 726.1 891 X1953 2372 800.3 1304 X1954 2760 888.9 1487 General.Motors_value General.Motors_capital US.Steel_invest X1935 3078 2.8 210 X1936 4662 52.6 355 X1937 5387 156.9 470 X1938 2792 209.2 262 X1939 4313 203.4 230 X1940 4644 207.2 262 X1941 4551 255.2 473 X1942 3244 303.7 446 X1943 4054 264.1 362 X1944 4379 201.6 288 X1945 4841 265.0 259 X1946 4901 402.2 420 X1947 3526 761.5 420 X1948 3255 922.4 494 X1949 3700 1020.1 405 X1950 3756 1099.0 419 X1951 4833 1207.7 588 X1952 4925 1430.5 645 X1953 6242 1777.3 641 X1954 5594 2226.3 459 US.Steel_value US.Steel_capital Westinghouse_invest Westinghouse_value X1935 1362 53.8 12.9 192 X1936 1807 50.5 25.9 516 X1937 2676 118.1 35.0 729 X1938 1802 260.2 22.9 560 X1939 1957 312.7 18.8 520 X1940 2203 254.2 28.6 628 X1941 2380 261.4 48.5 537 X1942 2169 298.7 43.3 561 X1943 1985 301.8 37.0 617 X1944 1814 279.1 37.8 627 X1945 1850 213.8 39.3 737 X1946 2068 232.6 53.5 760 X1947 1797 264.8 55.6 581 X1948 1626 306.9 49.6 662 X1949 1667 351.1 32.0 584 X1950 1677 357.8 32.2 635 X1951 2290 342.1 54.4 724 X1952 2159 444.2 71.8 864 X1953 2031 623.6 90.1 1194 X1954 2116 669.7 68.6 1189 Westinghouse_capital X1935 1.8 X1936 0.8 X1937 7.4 X1938 18.1 X1939 23.5 X1940 26.5 X1941 36.2 X1942 60.8 X1943 84.4 X1944 91.2 X1945 92.4 X1946 86.0 X1947 111.1 X1948 130.6 X1949 141.8 X1950 136.7 X1951 129.7 X1952 145.5 X1953 174.8 X1954 213.5 Chrysler_(Intercept) Chrysler_value Chrysler_capital Chrysler_X1935 1 418 10.5 Chrysler_X1936 1 838 10.2 Chrysler_X1937 1 884 34.7 Chrysler_X1938 1 438 51.8 Chrysler_X1939 1 680 64.3 Chrysler_X1940 1 728 67.1 Chrysler_X1941 1 644 75.2 Chrysler_X1942 1 411 71.4 Chrysler_X1943 1 588 67.1 Chrysler_X1944 1 698 60.5 Chrysler_X1945 1 846 54.6 Chrysler_X1946 1 894 84.8 Chrysler_X1947 1 579 96.8 Chrysler_X1948 1 695 110.2 Chrysler_X1949 1 590 147.4 Chrysler_X1950 1 694 163.2 Chrysler_X1951 1 809 203.5 Chrysler_X1952 1 727 290.6 Chrysler_X1953 1 1002 346.1 Chrysler_X1954 1 703 414.9 General.Electric_X1935 0 0 0.0 General.Electric_X1936 0 0 0.0 General.Electric_X1937 0 0 0.0 General.Electric_X1938 0 0 0.0 General.Electric_X1939 0 0 0.0 General.Electric_X1940 0 0 0.0 General.Electric_X1941 0 0 0.0 General.Electric_X1942 0 0 0.0 General.Electric_X1943 0 0 0.0 General.Electric_X1944 0 0 0.0 General.Electric_X1945 0 0 0.0 General.Electric_X1946 0 0 0.0 General.Electric_X1947 0 0 0.0 General.Electric_X1948 0 0 0.0 General.Electric_X1949 0 0 0.0 General.Electric_X1950 0 0 0.0 General.Electric_X1951 0 0 0.0 General.Electric_X1952 0 0 0.0 General.Electric_X1953 0 0 0.0 General.Electric_X1954 0 0 0.0 General.Motors_X1935 0 0 0.0 General.Motors_X1936 0 0 0.0 General.Motors_X1937 0 0 0.0 General.Motors_X1938 0 0 0.0 General.Motors_X1939 0 0 0.0 General.Motors_X1940 0 0 0.0 General.Motors_X1941 0 0 0.0 General.Motors_X1942 0 0 0.0 General.Motors_X1943 0 0 0.0 General.Motors_X1944 0 0 0.0 General.Motors_X1945 0 0 0.0 General.Motors_X1946 0 0 0.0 General.Motors_X1947 0 0 0.0 General.Motors_X1948 0 0 0.0 General.Motors_X1949 0 0 0.0 General.Motors_X1950 0 0 0.0 General.Motors_X1951 0 0 0.0 General.Motors_X1952 0 0 0.0 General.Motors_X1953 0 0 0.0 General.Motors_X1954 0 0 0.0 US.Steel_X1935 0 0 0.0 US.Steel_X1936 0 0 0.0 US.Steel_X1937 0 0 0.0 US.Steel_X1938 0 0 0.0 US.Steel_X1939 0 0 0.0 US.Steel_X1940 0 0 0.0 US.Steel_X1941 0 0 0.0 US.Steel_X1942 0 0 0.0 US.Steel_X1943 0 0 0.0 US.Steel_X1944 0 0 0.0 US.Steel_X1945 0 0 0.0 US.Steel_X1946 0 0 0.0 US.Steel_X1947 0 0 0.0 US.Steel_X1948 0 0 0.0 US.Steel_X1949 0 0 0.0 US.Steel_X1950 0 0 0.0 US.Steel_X1951 0 0 0.0 US.Steel_X1952 0 0 0.0 US.Steel_X1953 0 0 0.0 US.Steel_X1954 0 0 0.0 Westinghouse_X1935 0 0 0.0 Westinghouse_X1936 0 0 0.0 Westinghouse_X1937 0 0 0.0 Westinghouse_X1938 0 0 0.0 Westinghouse_X1939 0 0 0.0 Westinghouse_X1940 0 0 0.0 Westinghouse_X1941 0 0 0.0 Westinghouse_X1942 0 0 0.0 Westinghouse_X1943 0 0 0.0 Westinghouse_X1944 0 0 0.0 Westinghouse_X1945 0 0 0.0 Westinghouse_X1946 0 0 0.0 Westinghouse_X1947 0 0 0.0 Westinghouse_X1948 0 0 0.0 Westinghouse_X1949 0 0 0.0 Westinghouse_X1950 0 0 0.0 Westinghouse_X1951 0 0 0.0 Westinghouse_X1952 0 0 0.0 Westinghouse_X1953 0 0 0.0 Westinghouse_X1954 0 0 0.0 General.Electric_(Intercept) General.Electric_value Chrysler_X1935 0 0 Chrysler_X1936 0 0 Chrysler_X1937 0 0 Chrysler_X1938 0 0 Chrysler_X1939 0 0 Chrysler_X1940 0 0 Chrysler_X1941 0 0 Chrysler_X1942 0 0 Chrysler_X1943 0 0 Chrysler_X1944 0 0 Chrysler_X1945 0 0 Chrysler_X1946 0 0 Chrysler_X1947 0 0 Chrysler_X1948 0 0 Chrysler_X1949 0 0 Chrysler_X1950 0 0 Chrysler_X1951 0 0 Chrysler_X1952 0 0 Chrysler_X1953 0 0 Chrysler_X1954 0 0 General.Electric_X1935 1 1171 General.Electric_X1936 1 2016 General.Electric_X1937 1 2803 General.Electric_X1938 1 2040 General.Electric_X1939 1 2256 General.Electric_X1940 1 2132 General.Electric_X1941 1 1834 General.Electric_X1942 1 1588 General.Electric_X1943 1 1749 General.Electric_X1944 1 1687 General.Electric_X1945 1 2008 General.Electric_X1946 1 2208 General.Electric_X1947 1 1657 General.Electric_X1948 1 1604 General.Electric_X1949 1 1432 General.Electric_X1950 1 1610 General.Electric_X1951 1 1819 General.Electric_X1952 1 2080 General.Electric_X1953 1 2372 General.Electric_X1954 1 2760 General.Motors_X1935 0 0 General.Motors_X1936 0 0 General.Motors_X1937 0 0 General.Motors_X1938 0 0 General.Motors_X1939 0 0 General.Motors_X1940 0 0 General.Motors_X1941 0 0 General.Motors_X1942 0 0 General.Motors_X1943 0 0 General.Motors_X1944 0 0 General.Motors_X1945 0 0 General.Motors_X1946 0 0 General.Motors_X1947 0 0 General.Motors_X1948 0 0 General.Motors_X1949 0 0 General.Motors_X1950 0 0 General.Motors_X1951 0 0 General.Motors_X1952 0 0 General.Motors_X1953 0 0 General.Motors_X1954 0 0 US.Steel_X1935 0 0 US.Steel_X1936 0 0 US.Steel_X1937 0 0 US.Steel_X1938 0 0 US.Steel_X1939 0 0 US.Steel_X1940 0 0 US.Steel_X1941 0 0 US.Steel_X1942 0 0 US.Steel_X1943 0 0 US.Steel_X1944 0 0 US.Steel_X1945 0 0 US.Steel_X1946 0 0 US.Steel_X1947 0 0 US.Steel_X1948 0 0 US.Steel_X1949 0 0 US.Steel_X1950 0 0 US.Steel_X1951 0 0 US.Steel_X1952 0 0 US.Steel_X1953 0 0 US.Steel_X1954 0 0 Westinghouse_X1935 0 0 Westinghouse_X1936 0 0 Westinghouse_X1937 0 0 Westinghouse_X1938 0 0 Westinghouse_X1939 0 0 Westinghouse_X1940 0 0 Westinghouse_X1941 0 0 Westinghouse_X1942 0 0 Westinghouse_X1943 0 0 Westinghouse_X1944 0 0 Westinghouse_X1945 0 0 Westinghouse_X1946 0 0 Westinghouse_X1947 0 0 Westinghouse_X1948 0 0 Westinghouse_X1949 0 0 Westinghouse_X1950 0 0 Westinghouse_X1951 0 0 Westinghouse_X1952 0 0 Westinghouse_X1953 0 0 Westinghouse_X1954 0 0 General.Electric_capital General.Motors_(Intercept) Chrysler_X1935 0.0 0 Chrysler_X1936 0.0 0 Chrysler_X1937 0.0 0 Chrysler_X1938 0.0 0 Chrysler_X1939 0.0 0 Chrysler_X1940 0.0 0 Chrysler_X1941 0.0 0 Chrysler_X1942 0.0 0 Chrysler_X1943 0.0 0 Chrysler_X1944 0.0 0 Chrysler_X1945 0.0 0 Chrysler_X1946 0.0 0 Chrysler_X1947 0.0 0 Chrysler_X1948 0.0 0 Chrysler_X1949 0.0 0 Chrysler_X1950 0.0 0 Chrysler_X1951 0.0 0 Chrysler_X1952 0.0 0 Chrysler_X1953 0.0 0 Chrysler_X1954 0.0 0 General.Electric_X1935 97.8 0 General.Electric_X1936 104.4 0 General.Electric_X1937 118.0 0 General.Electric_X1938 156.2 0 General.Electric_X1939 172.6 0 General.Electric_X1940 186.6 0 General.Electric_X1941 220.9 0 General.Electric_X1942 287.8 0 General.Electric_X1943 319.9 0 General.Electric_X1944 321.3 0 General.Electric_X1945 319.6 0 General.Electric_X1946 346.0 0 General.Electric_X1947 456.4 0 General.Electric_X1948 543.4 0 General.Electric_X1949 618.3 0 General.Electric_X1950 647.4 0 General.Electric_X1951 671.3 0 General.Electric_X1952 726.1 0 General.Electric_X1953 800.3 0 General.Electric_X1954 888.9 0 General.Motors_X1935 0.0 1 General.Motors_X1936 0.0 1 General.Motors_X1937 0.0 1 General.Motors_X1938 0.0 1 General.Motors_X1939 0.0 1 General.Motors_X1940 0.0 1 General.Motors_X1941 0.0 1 General.Motors_X1942 0.0 1 General.Motors_X1943 0.0 1 General.Motors_X1944 0.0 1 General.Motors_X1945 0.0 1 General.Motors_X1946 0.0 1 General.Motors_X1947 0.0 1 General.Motors_X1948 0.0 1 General.Motors_X1949 0.0 1 General.Motors_X1950 0.0 1 General.Motors_X1951 0.0 1 General.Motors_X1952 0.0 1 General.Motors_X1953 0.0 1 General.Motors_X1954 0.0 1 US.Steel_X1935 0.0 0 US.Steel_X1936 0.0 0 US.Steel_X1937 0.0 0 US.Steel_X1938 0.0 0 US.Steel_X1939 0.0 0 US.Steel_X1940 0.0 0 US.Steel_X1941 0.0 0 US.Steel_X1942 0.0 0 US.Steel_X1943 0.0 0 US.Steel_X1944 0.0 0 US.Steel_X1945 0.0 0 US.Steel_X1946 0.0 0 US.Steel_X1947 0.0 0 US.Steel_X1948 0.0 0 US.Steel_X1949 0.0 0 US.Steel_X1950 0.0 0 US.Steel_X1951 0.0 0 US.Steel_X1952 0.0 0 US.Steel_X1953 0.0 0 US.Steel_X1954 0.0 0 Westinghouse_X1935 0.0 0 Westinghouse_X1936 0.0 0 Westinghouse_X1937 0.0 0 Westinghouse_X1938 0.0 0 Westinghouse_X1939 0.0 0 Westinghouse_X1940 0.0 0 Westinghouse_X1941 0.0 0 Westinghouse_X1942 0.0 0 Westinghouse_X1943 0.0 0 Westinghouse_X1944 0.0 0 Westinghouse_X1945 0.0 0 Westinghouse_X1946 0.0 0 Westinghouse_X1947 0.0 0 Westinghouse_X1948 0.0 0 Westinghouse_X1949 0.0 0 Westinghouse_X1950 0.0 0 Westinghouse_X1951 0.0 0 Westinghouse_X1952 0.0 0 Westinghouse_X1953 0.0 0 Westinghouse_X1954 0.0 0 General.Motors_value General.Motors_capital Chrysler_X1935 0 0.0 Chrysler_X1936 0 0.0 Chrysler_X1937 0 0.0 Chrysler_X1938 0 0.0 Chrysler_X1939 0 0.0 Chrysler_X1940 0 0.0 Chrysler_X1941 0 0.0 Chrysler_X1942 0 0.0 Chrysler_X1943 0 0.0 Chrysler_X1944 0 0.0 Chrysler_X1945 0 0.0 Chrysler_X1946 0 0.0 Chrysler_X1947 0 0.0 Chrysler_X1948 0 0.0 Chrysler_X1949 0 0.0 Chrysler_X1950 0 0.0 Chrysler_X1951 0 0.0 Chrysler_X1952 0 0.0 Chrysler_X1953 0 0.0 Chrysler_X1954 0 0.0 General.Electric_X1935 0 0.0 General.Electric_X1936 0 0.0 General.Electric_X1937 0 0.0 General.Electric_X1938 0 0.0 General.Electric_X1939 0 0.0 General.Electric_X1940 0 0.0 General.Electric_X1941 0 0.0 General.Electric_X1942 0 0.0 General.Electric_X1943 0 0.0 General.Electric_X1944 0 0.0 General.Electric_X1945 0 0.0 General.Electric_X1946 0 0.0 General.Electric_X1947 0 0.0 General.Electric_X1948 0 0.0 General.Electric_X1949 0 0.0 General.Electric_X1950 0 0.0 General.Electric_X1951 0 0.0 General.Electric_X1952 0 0.0 General.Electric_X1953 0 0.0 General.Electric_X1954 0 0.0 General.Motors_X1935 3078 2.8 General.Motors_X1936 4662 52.6 General.Motors_X1937 5387 156.9 General.Motors_X1938 2792 209.2 General.Motors_X1939 4313 203.4 General.Motors_X1940 4644 207.2 General.Motors_X1941 4551 255.2 General.Motors_X1942 3244 303.7 General.Motors_X1943 4054 264.1 General.Motors_X1944 4379 201.6 General.Motors_X1945 4841 265.0 General.Motors_X1946 4901 402.2 General.Motors_X1947 3526 761.5 General.Motors_X1948 3255 922.4 General.Motors_X1949 3700 1020.1 General.Motors_X1950 3756 1099.0 General.Motors_X1951 4833 1207.7 General.Motors_X1952 4925 1430.5 General.Motors_X1953 6242 1777.3 General.Motors_X1954 5594 2226.3 US.Steel_X1935 0 0.0 US.Steel_X1936 0 0.0 US.Steel_X1937 0 0.0 US.Steel_X1938 0 0.0 US.Steel_X1939 0 0.0 US.Steel_X1940 0 0.0 US.Steel_X1941 0 0.0 US.Steel_X1942 0 0.0 US.Steel_X1943 0 0.0 US.Steel_X1944 0 0.0 US.Steel_X1945 0 0.0 US.Steel_X1946 0 0.0 US.Steel_X1947 0 0.0 US.Steel_X1948 0 0.0 US.Steel_X1949 0 0.0 US.Steel_X1950 0 0.0 US.Steel_X1951 0 0.0 US.Steel_X1952 0 0.0 US.Steel_X1953 0 0.0 US.Steel_X1954 0 0.0 Westinghouse_X1935 0 0.0 Westinghouse_X1936 0 0.0 Westinghouse_X1937 0 0.0 Westinghouse_X1938 0 0.0 Westinghouse_X1939 0 0.0 Westinghouse_X1940 0 0.0 Westinghouse_X1941 0 0.0 Westinghouse_X1942 0 0.0 Westinghouse_X1943 0 0.0 Westinghouse_X1944 0 0.0 Westinghouse_X1945 0 0.0 Westinghouse_X1946 0 0.0 Westinghouse_X1947 0 0.0 Westinghouse_X1948 0 0.0 Westinghouse_X1949 0 0.0 Westinghouse_X1950 0 0.0 Westinghouse_X1951 0 0.0 Westinghouse_X1952 0 0.0 Westinghouse_X1953 0 0.0 Westinghouse_X1954 0 0.0 US.Steel_(Intercept) US.Steel_value US.Steel_capital Chrysler_X1935 0 0 0.0 Chrysler_X1936 0 0 0.0 Chrysler_X1937 0 0 0.0 Chrysler_X1938 0 0 0.0 Chrysler_X1939 0 0 0.0 Chrysler_X1940 0 0 0.0 Chrysler_X1941 0 0 0.0 Chrysler_X1942 0 0 0.0 Chrysler_X1943 0 0 0.0 Chrysler_X1944 0 0 0.0 Chrysler_X1945 0 0 0.0 Chrysler_X1946 0 0 0.0 Chrysler_X1947 0 0 0.0 Chrysler_X1948 0 0 0.0 Chrysler_X1949 0 0 0.0 Chrysler_X1950 0 0 0.0 Chrysler_X1951 0 0 0.0 Chrysler_X1952 0 0 0.0 Chrysler_X1953 0 0 0.0 Chrysler_X1954 0 0 0.0 General.Electric_X1935 0 0 0.0 General.Electric_X1936 0 0 0.0 General.Electric_X1937 0 0 0.0 General.Electric_X1938 0 0 0.0 General.Electric_X1939 0 0 0.0 General.Electric_X1940 0 0 0.0 General.Electric_X1941 0 0 0.0 General.Electric_X1942 0 0 0.0 General.Electric_X1943 0 0 0.0 General.Electric_X1944 0 0 0.0 General.Electric_X1945 0 0 0.0 General.Electric_X1946 0 0 0.0 General.Electric_X1947 0 0 0.0 General.Electric_X1948 0 0 0.0 General.Electric_X1949 0 0 0.0 General.Electric_X1950 0 0 0.0 General.Electric_X1951 0 0 0.0 General.Electric_X1952 0 0 0.0 General.Electric_X1953 0 0 0.0 General.Electric_X1954 0 0 0.0 General.Motors_X1935 0 0 0.0 General.Motors_X1936 0 0 0.0 General.Motors_X1937 0 0 0.0 General.Motors_X1938 0 0 0.0 General.Motors_X1939 0 0 0.0 General.Motors_X1940 0 0 0.0 General.Motors_X1941 0 0 0.0 General.Motors_X1942 0 0 0.0 General.Motors_X1943 0 0 0.0 General.Motors_X1944 0 0 0.0 General.Motors_X1945 0 0 0.0 General.Motors_X1946 0 0 0.0 General.Motors_X1947 0 0 0.0 General.Motors_X1948 0 0 0.0 General.Motors_X1949 0 0 0.0 General.Motors_X1950 0 0 0.0 General.Motors_X1951 0 0 0.0 General.Motors_X1952 0 0 0.0 General.Motors_X1953 0 0 0.0 General.Motors_X1954 0 0 0.0 US.Steel_X1935 1 1362 53.8 US.Steel_X1936 1 1807 50.5 US.Steel_X1937 1 2676 118.1 US.Steel_X1938 1 1802 260.2 US.Steel_X1939 1 1957 312.7 US.Steel_X1940 1 2203 254.2 US.Steel_X1941 1 2380 261.4 US.Steel_X1942 1 2169 298.7 US.Steel_X1943 1 1985 301.8 US.Steel_X1944 1 1814 279.1 US.Steel_X1945 1 1850 213.8 US.Steel_X1946 1 2068 232.6 US.Steel_X1947 1 1797 264.8 US.Steel_X1948 1 1626 306.9 US.Steel_X1949 1 1667 351.1 US.Steel_X1950 1 1677 357.8 US.Steel_X1951 1 2290 342.1 US.Steel_X1952 1 2159 444.2 US.Steel_X1953 1 2031 623.6 US.Steel_X1954 1 2116 669.7 Westinghouse_X1935 0 0 0.0 Westinghouse_X1936 0 0 0.0 Westinghouse_X1937 0 0 0.0 Westinghouse_X1938 0 0 0.0 Westinghouse_X1939 0 0 0.0 Westinghouse_X1940 0 0 0.0 Westinghouse_X1941 0 0 0.0 Westinghouse_X1942 0 0 0.0 Westinghouse_X1943 0 0 0.0 Westinghouse_X1944 0 0 0.0 Westinghouse_X1945 0 0 0.0 Westinghouse_X1946 0 0 0.0 Westinghouse_X1947 0 0 0.0 Westinghouse_X1948 0 0 0.0 Westinghouse_X1949 0 0 0.0 Westinghouse_X1950 0 0 0.0 Westinghouse_X1951 0 0 0.0 Westinghouse_X1952 0 0 0.0 Westinghouse_X1953 0 0 0.0 Westinghouse_X1954 0 0 0.0 Westinghouse_(Intercept) Westinghouse_value Chrysler_X1935 0 0 Chrysler_X1936 0 0 Chrysler_X1937 0 0 Chrysler_X1938 0 0 Chrysler_X1939 0 0 Chrysler_X1940 0 0 Chrysler_X1941 0 0 Chrysler_X1942 0 0 Chrysler_X1943 0 0 Chrysler_X1944 0 0 Chrysler_X1945 0 0 Chrysler_X1946 0 0 Chrysler_X1947 0 0 Chrysler_X1948 0 0 Chrysler_X1949 0 0 Chrysler_X1950 0 0 Chrysler_X1951 0 0 Chrysler_X1952 0 0 Chrysler_X1953 0 0 Chrysler_X1954 0 0 General.Electric_X1935 0 0 General.Electric_X1936 0 0 General.Electric_X1937 0 0 General.Electric_X1938 0 0 General.Electric_X1939 0 0 General.Electric_X1940 0 0 General.Electric_X1941 0 0 General.Electric_X1942 0 0 General.Electric_X1943 0 0 General.Electric_X1944 0 0 General.Electric_X1945 0 0 General.Electric_X1946 0 0 General.Electric_X1947 0 0 General.Electric_X1948 0 0 General.Electric_X1949 0 0 General.Electric_X1950 0 0 General.Electric_X1951 0 0 General.Electric_X1952 0 0 General.Electric_X1953 0 0 General.Electric_X1954 0 0 General.Motors_X1935 0 0 General.Motors_X1936 0 0 General.Motors_X1937 0 0 General.Motors_X1938 0 0 General.Motors_X1939 0 0 General.Motors_X1940 0 0 General.Motors_X1941 0 0 General.Motors_X1942 0 0 General.Motors_X1943 0 0 General.Motors_X1944 0 0 General.Motors_X1945 0 0 General.Motors_X1946 0 0 General.Motors_X1947 0 0 General.Motors_X1948 0 0 General.Motors_X1949 0 0 General.Motors_X1950 0 0 General.Motors_X1951 0 0 General.Motors_X1952 0 0 General.Motors_X1953 0 0 General.Motors_X1954 0 0 US.Steel_X1935 0 0 US.Steel_X1936 0 0 US.Steel_X1937 0 0 US.Steel_X1938 0 0 US.Steel_X1939 0 0 US.Steel_X1940 0 0 US.Steel_X1941 0 0 US.Steel_X1942 0 0 US.Steel_X1943 0 0 US.Steel_X1944 0 0 US.Steel_X1945 0 0 US.Steel_X1946 0 0 US.Steel_X1947 0 0 US.Steel_X1948 0 0 US.Steel_X1949 0 0 US.Steel_X1950 0 0 US.Steel_X1951 0 0 US.Steel_X1952 0 0 US.Steel_X1953 0 0 US.Steel_X1954 0 0 Westinghouse_X1935 1 192 Westinghouse_X1936 1 516 Westinghouse_X1937 1 729 Westinghouse_X1938 1 560 Westinghouse_X1939 1 520 Westinghouse_X1940 1 628 Westinghouse_X1941 1 537 Westinghouse_X1942 1 561 Westinghouse_X1943 1 617 Westinghouse_X1944 1 627 Westinghouse_X1945 1 737 Westinghouse_X1946 1 760 Westinghouse_X1947 1 581 Westinghouse_X1948 1 662 Westinghouse_X1949 1 584 Westinghouse_X1950 1 635 Westinghouse_X1951 1 724 Westinghouse_X1952 1 864 Westinghouse_X1953 1 1194 Westinghouse_X1954 1 1189 Westinghouse_capital Chrysler_X1935 0.0 Chrysler_X1936 0.0 Chrysler_X1937 0.0 Chrysler_X1938 0.0 Chrysler_X1939 0.0 Chrysler_X1940 0.0 Chrysler_X1941 0.0 Chrysler_X1942 0.0 Chrysler_X1943 0.0 Chrysler_X1944 0.0 Chrysler_X1945 0.0 Chrysler_X1946 0.0 Chrysler_X1947 0.0 Chrysler_X1948 0.0 Chrysler_X1949 0.0 Chrysler_X1950 0.0 Chrysler_X1951 0.0 Chrysler_X1952 0.0 Chrysler_X1953 0.0 Chrysler_X1954 0.0 General.Electric_X1935 0.0 General.Electric_X1936 0.0 General.Electric_X1937 0.0 General.Electric_X1938 0.0 General.Electric_X1939 0.0 General.Electric_X1940 0.0 General.Electric_X1941 0.0 General.Electric_X1942 0.0 General.Electric_X1943 0.0 General.Electric_X1944 0.0 General.Electric_X1945 0.0 General.Electric_X1946 0.0 General.Electric_X1947 0.0 General.Electric_X1948 0.0 General.Electric_X1949 0.0 General.Electric_X1950 0.0 General.Electric_X1951 0.0 General.Electric_X1952 0.0 General.Electric_X1953 0.0 General.Electric_X1954 0.0 General.Motors_X1935 0.0 General.Motors_X1936 0.0 General.Motors_X1937 0.0 General.Motors_X1938 0.0 General.Motors_X1939 0.0 General.Motors_X1940 0.0 General.Motors_X1941 0.0 General.Motors_X1942 0.0 General.Motors_X1943 0.0 General.Motors_X1944 0.0 General.Motors_X1945 0.0 General.Motors_X1946 0.0 General.Motors_X1947 0.0 General.Motors_X1948 0.0 General.Motors_X1949 0.0 General.Motors_X1950 0.0 General.Motors_X1951 0.0 General.Motors_X1952 0.0 General.Motors_X1953 0.0 General.Motors_X1954 0.0 US.Steel_X1935 0.0 US.Steel_X1936 0.0 US.Steel_X1937 0.0 US.Steel_X1938 0.0 US.Steel_X1939 0.0 US.Steel_X1940 0.0 US.Steel_X1941 0.0 US.Steel_X1942 0.0 US.Steel_X1943 0.0 US.Steel_X1944 0.0 US.Steel_X1945 0.0 US.Steel_X1946 0.0 US.Steel_X1947 0.0 US.Steel_X1948 0.0 US.Steel_X1949 0.0 US.Steel_X1950 0.0 US.Steel_X1951 0.0 US.Steel_X1952 0.0 US.Steel_X1953 0.0 US.Steel_X1954 0.0 Westinghouse_X1935 1.8 Westinghouse_X1936 0.8 Westinghouse_X1937 7.4 Westinghouse_X1938 18.1 Westinghouse_X1939 23.5 Westinghouse_X1940 26.5 Westinghouse_X1941 36.2 Westinghouse_X1942 60.8 Westinghouse_X1943 84.4 Westinghouse_X1944 91.2 Westinghouse_X1945 92.4 Westinghouse_X1946 86.0 Westinghouse_X1947 111.1 Westinghouse_X1948 130.6 Westinghouse_X1949 141.8 Westinghouse_X1950 136.7 Westinghouse_X1951 129.7 Westinghouse_X1952 145.5 Westinghouse_X1953 174.8 Westinghouse_X1954 213.5 $Chrysler Chrysler_invest ~ Chrysler_value + Chrysler_capital $General.Electric General.Electric_invest ~ General.Electric_value + General.Electric_capital $General.Motors General.Motors_invest ~ General.Motors_value + General.Motors_capital $US.Steel US.Steel_invest ~ US.Steel_value + US.Steel_capital $Westinghouse Westinghouse_invest ~ Westinghouse_value + Westinghouse_capital General.Electric_invest ~ General.Electric_value + General.Electric_capital $Chrysler Chrysler_invest ~ Chrysler_value + Chrysler_capital attr(,"variables") list(Chrysler_invest, Chrysler_value, Chrysler_capital) attr(,"factors") Chrysler_value Chrysler_capital Chrysler_invest 0 0 Chrysler_value 1 0 Chrysler_capital 0 1 attr(,"term.labels") [1] "Chrysler_value" "Chrysler_capital" attr(,"order") [1] 1 1 attr(,"intercept") [1] 1 attr(,"response") [1] 1 attr(,".Environment") attr(,"predvars") list(Chrysler_invest, Chrysler_value, Chrysler_capital) attr(,"dataClasses") Chrysler_invest Chrysler_value Chrysler_capital "numeric" "numeric" "numeric" $General.Electric General.Electric_invest ~ General.Electric_value + General.Electric_capital attr(,"variables") list(General.Electric_invest, General.Electric_value, General.Electric_capital) attr(,"factors") General.Electric_value General.Electric_capital General.Electric_invest 0 0 General.Electric_value 1 0 General.Electric_capital 0 1 attr(,"term.labels") [1] "General.Electric_value" "General.Electric_capital" attr(,"order") [1] 1 1 attr(,"intercept") [1] 1 attr(,"response") [1] 1 attr(,".Environment") attr(,"predvars") list(General.Electric_invest, General.Electric_value, General.Electric_capital) attr(,"dataClasses") General.Electric_invest General.Electric_value General.Electric_capital "numeric" "numeric" "numeric" $General.Motors General.Motors_invest ~ General.Motors_value + General.Motors_capital attr(,"variables") list(General.Motors_invest, General.Motors_value, General.Motors_capital) attr(,"factors") General.Motors_value General.Motors_capital General.Motors_invest 0 0 General.Motors_value 1 0 General.Motors_capital 0 1 attr(,"term.labels") [1] "General.Motors_value" "General.Motors_capital" attr(,"order") [1] 1 1 attr(,"intercept") [1] 1 attr(,"response") [1] 1 attr(,".Environment") attr(,"predvars") list(General.Motors_invest, General.Motors_value, General.Motors_capital) attr(,"dataClasses") General.Motors_invest General.Motors_value General.Motors_capital "numeric" "numeric" "numeric" $US.Steel US.Steel_invest ~ US.Steel_value + US.Steel_capital attr(,"variables") list(US.Steel_invest, US.Steel_value, US.Steel_capital) attr(,"factors") US.Steel_value US.Steel_capital US.Steel_invest 0 0 US.Steel_value 1 0 US.Steel_capital 0 1 attr(,"term.labels") [1] "US.Steel_value" "US.Steel_capital" attr(,"order") [1] 1 1 attr(,"intercept") [1] 1 attr(,"response") [1] 1 attr(,".Environment") attr(,"predvars") list(US.Steel_invest, US.Steel_value, US.Steel_capital) attr(,"dataClasses") US.Steel_invest US.Steel_value US.Steel_capital "numeric" "numeric" "numeric" $Westinghouse Westinghouse_invest ~ Westinghouse_value + Westinghouse_capital attr(,"variables") list(Westinghouse_invest, Westinghouse_value, Westinghouse_capital) attr(,"factors") Westinghouse_value Westinghouse_capital Westinghouse_invest 0 0 Westinghouse_value 1 0 Westinghouse_capital 0 1 attr(,"term.labels") [1] "Westinghouse_value" "Westinghouse_capital" attr(,"order") [1] 1 1 attr(,"intercept") [1] 1 attr(,"response") [1] 1 attr(,".Environment") attr(,"predvars") list(Westinghouse_invest, Westinghouse_value, Westinghouse_capital) attr(,"dataClasses") Westinghouse_invest Westinghouse_value Westinghouse_capital "numeric" "numeric" "numeric" General.Electric_invest ~ General.Electric_value + General.Electric_capital attr(,"variables") list(General.Electric_invest, General.Electric_value, General.Electric_capital) attr(,"factors") General.Electric_value General.Electric_capital General.Electric_invest 0 0 General.Electric_value 1 0 General.Electric_capital 0 1 attr(,"term.labels") [1] "General.Electric_value" "General.Electric_capital" attr(,"order") [1] 1 1 attr(,"intercept") [1] 1 attr(,"response") [1] 1 attr(,".Environment") attr(,"predvars") list(General.Electric_invest, General.Electric_value, General.Electric_capital) attr(,"dataClasses") General.Electric_invest General.Electric_value General.Electric_capital "numeric" "numeric" "numeric" > > # OLS Pooled > if(requireNamespace( 'plm', quietly = TRUE ) ) { + greeneOlsPooled <- systemfit( formulaGrunfeld, "OLS", + data = GrunfeldGreene, pooled = TRUE, useMatrix = useMatrix ) + print( greeneOlsPooled ) + print( summary( greeneOlsPooled ) ) + print( summary( greeneOlsPooled, useDfSys = FALSE, residCov = FALSE ) ) + print( summary( greeneOlsPooled, residCov = FALSE, equations = FALSE ) ) + print( sum( sapply( greeneOlsPooled$eq, function(x){return(summary(x)$ssr)}) )/97 ) # sigma^2 + print( coef( greeneOlsPooled ) ) + print( coef( greeneOlsPooled, modified.regMat = TRUE ) ) + print( coef( summary( greeneOlsPooled ) ) ) + print( coef( summary( greeneOlsPooled ), modified.regMat = TRUE ) ) + print( vcov( greeneOlsPooled ) ) + print( vcov( greeneOlsPooled, modified.regMat = TRUE ) ) + print( residuals( greeneOlsPooled ) ) + print( confint( greeneOlsPooled ) ) + print( fitted( greeneOlsPooled ) ) + print( logLik( greeneOlsPooled ) ) + print( logLik( greeneOlsPooled, residCovDiag = TRUE ) ) + print( nobs( greeneOlsPooled ) ) + print( model.frame( greeneOlsPooled ) ) + print( model.matrix( greeneOlsPooled ) ) + print( formula( greeneOlsPooled ) ) + print( formula( greeneOlsPooled$eq[[ 1 ]] ) ) + print( terms( greeneOlsPooled ) ) + print( terms( greeneOlsPooled$eq[[ 1 ]] ) ) + } systemfit results method: OLS Coefficients: Chrysler_(Intercept) Chrysler_value -48.030 0.105 Chrysler_capital General.Electric_(Intercept) 0.305 -48.030 General.Electric_value General.Electric_capital 0.105 0.305 General.Motors_(Intercept) General.Motors_value -48.030 0.105 General.Motors_capital US.Steel_(Intercept) 0.305 -48.030 US.Steel_value US.Steel_capital 0.105 0.305 Westinghouse_(Intercept) Westinghouse_value -48.030 0.105 Westinghouse_capital 0.305 systemfit results method: OLS N DF SSR detRCov OLS-R2 McElroy-R2 system 100 97 1570884 4.2e+17 0.294 0.812 N DF SSR MSE RMSE R2 Adj R2 Chrysler 20 17 15117 889 29.8 0.564 0.513 General.Electric 20 17 685770 40339 200.8 -14.291 -16.090 General.Motors 20 17 188218 11072 105.2 0.897 0.884 US.Steel 20 17 669110 39359 198.4 -1.105 -1.352 Westinghouse 20 17 12668 745 27.3 -0.826 -1.041 The covariance matrix of the residuals Chrysler General.Electric General.Motors US.Steel Westinghouse Chrysler 889.2 -4898 -198 4748 -94.6 General.Electric -4898.1 40339 -2254 -32821 2658.0 General.Motors -197.7 -2254 11072 304 -1328.6 US.Steel 4748.1 -32821 304 39359 -1377.3 Westinghouse -94.6 2658 -1329 -1377 745.2 The correlations of the residuals Chrysler General.Electric General.Motors US.Steel Westinghouse Chrysler 1.000 0.144 -0.1852 0.2218 0.186 General.Electric 0.144 1.000 -0.2592 -0.1216 0.881 General.Motors -0.185 -0.259 1.0000 -0.0155 -0.469 US.Steel 0.222 -0.122 -0.0155 1.0000 -0.119 Westinghouse 0.186 0.881 -0.4689 -0.1186 1.000 OLS estimates for 'Chrysler' (equation 1) Model Formula: Chrysler_invest ~ Chrysler_value + Chrysler_capital Estimate Std. Error t value Pr(>|t|) (Intercept) -48.0297 21.4802 -2.24 0.028 * value 0.1051 0.0114 9.24 6.0e-15 *** capital 0.3054 0.0435 7.02 3.1e-10 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 29.82 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 15117.016 MSE: 889.236 Root MSE: 29.82 Multiple R-Squared: 0.564 Adjusted R-Squared: 0.513 OLS estimates for 'General.Electric' (equation 2) Model Formula: General.Electric_invest ~ General.Electric_value + General.Electric_capital Estimate Std. Error t value Pr(>|t|) (Intercept) -48.0297 21.4802 -2.24 0.028 * value 0.1051 0.0114 9.24 6.0e-15 *** capital 0.3054 0.0435 7.02 3.1e-10 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 200.847 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 685769.815 MSE: 40339.401 Root MSE: 200.847 Multiple R-Squared: -14.291 Adjusted R-Squared: -16.09 OLS estimates for 'General.Motors' (equation 3) Model Formula: General.Motors_invest ~ General.Motors_value + General.Motors_capital Estimate Std. Error t value Pr(>|t|) (Intercept) -48.0297 21.4802 -2.24 0.028 * value 0.1051 0.0114 9.24 6.0e-15 *** capital 0.3054 0.0435 7.02 3.1e-10 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 105.222 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 188218.158 MSE: 11071.656 Root MSE: 105.222 Multiple R-Squared: 0.897 Adjusted R-Squared: 0.884 OLS estimates for 'US.Steel' (equation 4) Model Formula: US.Steel_invest ~ US.Steel_value + US.Steel_capital Estimate Std. Error t value Pr(>|t|) (Intercept) -48.0297 21.4802 -2.24 0.028 * value 0.1051 0.0114 9.24 6.0e-15 *** capital 0.3054 0.0435 7.02 3.1e-10 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 198.392 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 669110.225 MSE: 39359.425 Root MSE: 198.392 Multiple R-Squared: -1.105 Adjusted R-Squared: -1.352 OLS estimates for 'Westinghouse' (equation 5) Model Formula: Westinghouse_invest ~ Westinghouse_value + Westinghouse_capital Estimate Std. Error t value Pr(>|t|) (Intercept) -48.0297 21.4802 -2.24 0.028 * value 0.1051 0.0114 9.24 6.0e-15 *** capital 0.3054 0.0435 7.02 3.1e-10 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 27.298 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 12668.473 MSE: 745.204 Root MSE: 27.298 Multiple R-Squared: -0.826 Adjusted R-Squared: -1.041 systemfit results method: OLS N DF SSR detRCov OLS-R2 McElroy-R2 system 100 97 1570884 4.2e+17 0.294 0.812 N DF SSR MSE RMSE R2 Adj R2 Chrysler 20 17 15117 889 29.8 0.564 0.513 General.Electric 20 17 685770 40339 200.8 -14.291 -16.090 General.Motors 20 17 188218 11072 105.2 0.897 0.884 US.Steel 20 17 669110 39359 198.4 -1.105 -1.352 Westinghouse 20 17 12668 745 27.3 -0.826 -1.041 OLS estimates for 'Chrysler' (equation 1) Model Formula: Chrysler_invest ~ Chrysler_value + Chrysler_capital Estimate Std. Error t value Pr(>|t|) (Intercept) -48.0297 21.4802 -2.24 0.039 * value 0.1051 0.0114 9.24 4.9e-08 *** capital 0.3054 0.0435 7.02 2.1e-06 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 29.82 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 15117.016 MSE: 889.236 Root MSE: 29.82 Multiple R-Squared: 0.564 Adjusted R-Squared: 0.513 OLS estimates for 'General.Electric' (equation 2) Model Formula: General.Electric_invest ~ General.Electric_value + General.Electric_capital Estimate Std. Error t value Pr(>|t|) (Intercept) -48.0297 21.4802 -2.24 0.039 * value 0.1051 0.0114 9.24 4.9e-08 *** capital 0.3054 0.0435 7.02 2.1e-06 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 200.847 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 685769.815 MSE: 40339.401 Root MSE: 200.847 Multiple R-Squared: -14.291 Adjusted R-Squared: -16.09 OLS estimates for 'General.Motors' (equation 3) Model Formula: General.Motors_invest ~ General.Motors_value + General.Motors_capital Estimate Std. Error t value Pr(>|t|) (Intercept) -48.0297 21.4802 -2.24 0.039 * value 0.1051 0.0114 9.24 4.9e-08 *** capital 0.3054 0.0435 7.02 2.1e-06 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 105.222 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 188218.158 MSE: 11071.656 Root MSE: 105.222 Multiple R-Squared: 0.897 Adjusted R-Squared: 0.884 OLS estimates for 'US.Steel' (equation 4) Model Formula: US.Steel_invest ~ US.Steel_value + US.Steel_capital Estimate Std. Error t value Pr(>|t|) (Intercept) -48.0297 21.4802 -2.24 0.039 * value 0.1051 0.0114 9.24 4.9e-08 *** capital 0.3054 0.0435 7.02 2.1e-06 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 198.392 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 669110.225 MSE: 39359.425 Root MSE: 198.392 Multiple R-Squared: -1.105 Adjusted R-Squared: -1.352 OLS estimates for 'Westinghouse' (equation 5) Model Formula: Westinghouse_invest ~ Westinghouse_value + Westinghouse_capital Estimate Std. Error t value Pr(>|t|) (Intercept) -48.0297 21.4802 -2.24 0.039 * value 0.1051 0.0114 9.24 4.9e-08 *** capital 0.3054 0.0435 7.02 2.1e-06 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 27.298 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 12668.473 MSE: 745.204 Root MSE: 27.298 Multiple R-Squared: -0.826 Adjusted R-Squared: -1.041 systemfit results method: OLS N DF SSR detRCov OLS-R2 McElroy-R2 system 100 97 1570884 4.2e+17 0.294 0.812 N DF SSR MSE RMSE R2 Adj R2 Chrysler 20 17 15117 889 29.8 0.564 0.513 General.Electric 20 17 685770 40339 200.8 -14.291 -16.090 General.Motors 20 17 188218 11072 105.2 0.897 0.884 US.Steel 20 17 669110 39359 198.4 -1.105 -1.352 Westinghouse 20 17 12668 745 27.3 -0.826 -1.041 Coefficients: Estimate Std. Error t value Pr(>|t|) Chrysler_(Intercept) -48.0297 21.4802 -2.24 0.028 * Chrysler_value 0.1051 0.0114 9.24 6.0e-15 *** Chrysler_capital 0.3054 0.0435 7.02 3.1e-10 *** General.Electric_(Intercept) -48.0297 21.4802 -2.24 0.028 * General.Electric_value 0.1051 0.0114 9.24 6.0e-15 *** General.Electric_capital 0.3054 0.0435 7.02 3.1e-10 *** General.Motors_(Intercept) -48.0297 21.4802 -2.24 0.028 * General.Motors_value 0.1051 0.0114 9.24 6.0e-15 *** General.Motors_capital 0.3054 0.0435 7.02 3.1e-10 *** US.Steel_(Intercept) -48.0297 21.4802 -2.24 0.028 * US.Steel_value 0.1051 0.0114 9.24 6.0e-15 *** US.Steel_capital 0.3054 0.0435 7.02 3.1e-10 *** Westinghouse_(Intercept) -48.0297 21.4802 -2.24 0.028 * Westinghouse_value 0.1051 0.0114 9.24 6.0e-15 *** Westinghouse_capital 0.3054 0.0435 7.02 3.1e-10 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 [1] 16195 Chrysler_(Intercept) Chrysler_value -48.030 0.105 Chrysler_capital General.Electric_(Intercept) 0.305 -48.030 General.Electric_value General.Electric_capital 0.105 0.305 General.Motors_(Intercept) General.Motors_value -48.030 0.105 General.Motors_capital US.Steel_(Intercept) 0.305 -48.030 US.Steel_value US.Steel_capital 0.105 0.305 Westinghouse_(Intercept) Westinghouse_value -48.030 0.105 Westinghouse_capital 0.305 C1 C2 C3 -48.030 0.105 0.305 Estimate Std. Error t value Pr(>|t|) Chrysler_(Intercept) -48.030 21.4802 -2.24 2.76e-02 Chrysler_value 0.105 0.0114 9.24 6.00e-15 Chrysler_capital 0.305 0.0435 7.02 3.06e-10 General.Electric_(Intercept) -48.030 21.4802 -2.24 2.76e-02 General.Electric_value 0.105 0.0114 9.24 6.00e-15 General.Electric_capital 0.305 0.0435 7.02 3.06e-10 General.Motors_(Intercept) -48.030 21.4802 -2.24 2.76e-02 General.Motors_value 0.105 0.0114 9.24 6.00e-15 General.Motors_capital 0.305 0.0435 7.02 3.06e-10 US.Steel_(Intercept) -48.030 21.4802 -2.24 2.76e-02 US.Steel_value 0.105 0.0114 9.24 6.00e-15 US.Steel_capital 0.305 0.0435 7.02 3.06e-10 Westinghouse_(Intercept) -48.030 21.4802 -2.24 2.76e-02 Westinghouse_value 0.105 0.0114 9.24 6.00e-15 Westinghouse_capital 0.305 0.0435 7.02 3.06e-10 Estimate Std. Error t value Pr(>|t|) C1 -48.030 21.4802 -2.24 2.76e-02 C2 0.105 0.0114 9.24 6.00e-15 C3 0.305 0.0435 7.02 3.06e-10 Chrysler_(Intercept) Chrysler_value Chrysler_(Intercept) 461.39750 -0.154668 Chrysler_value -0.15467 0.000129 Chrysler_capital -0.00689 -0.000303 General.Electric_(Intercept) 461.39750 -0.154668 General.Electric_value -0.15467 0.000129 General.Electric_capital -0.00689 -0.000303 General.Motors_(Intercept) 461.39750 -0.154668 General.Motors_value -0.15467 0.000129 General.Motors_capital -0.00689 -0.000303 US.Steel_(Intercept) 461.39750 -0.154668 US.Steel_value -0.15467 0.000129 US.Steel_capital -0.00689 -0.000303 Westinghouse_(Intercept) 461.39750 -0.154668 Westinghouse_value -0.15467 0.000129 Westinghouse_capital -0.00689 -0.000303 Chrysler_capital General.Electric_(Intercept) Chrysler_(Intercept) -0.006891 461.39750 Chrysler_value -0.000303 -0.15467 Chrysler_capital 0.001893 -0.00689 General.Electric_(Intercept) -0.006891 461.39750 General.Electric_value -0.000303 -0.15467 General.Electric_capital 0.001893 -0.00689 General.Motors_(Intercept) -0.006891 461.39750 General.Motors_value -0.000303 -0.15467 General.Motors_capital 0.001893 -0.00689 US.Steel_(Intercept) -0.006891 461.39750 US.Steel_value -0.000303 -0.15467 US.Steel_capital 0.001893 -0.00689 Westinghouse_(Intercept) -0.006891 461.39750 Westinghouse_value -0.000303 -0.15467 Westinghouse_capital 0.001893 -0.00689 General.Electric_value General.Electric_capital Chrysler_(Intercept) -0.154668 -0.006891 Chrysler_value 0.000129 -0.000303 Chrysler_capital -0.000303 0.001893 General.Electric_(Intercept) -0.154668 -0.006891 General.Electric_value 0.000129 -0.000303 General.Electric_capital -0.000303 0.001893 General.Motors_(Intercept) -0.154668 -0.006891 General.Motors_value 0.000129 -0.000303 General.Motors_capital -0.000303 0.001893 US.Steel_(Intercept) -0.154668 -0.006891 US.Steel_value 0.000129 -0.000303 US.Steel_capital -0.000303 0.001893 Westinghouse_(Intercept) -0.154668 -0.006891 Westinghouse_value 0.000129 -0.000303 Westinghouse_capital -0.000303 0.001893 General.Motors_(Intercept) General.Motors_value Chrysler_(Intercept) 461.39750 -0.154668 Chrysler_value -0.15467 0.000129 Chrysler_capital -0.00689 -0.000303 General.Electric_(Intercept) 461.39750 -0.154668 General.Electric_value -0.15467 0.000129 General.Electric_capital -0.00689 -0.000303 General.Motors_(Intercept) 461.39750 -0.154668 General.Motors_value -0.15467 0.000129 General.Motors_capital -0.00689 -0.000303 US.Steel_(Intercept) 461.39750 -0.154668 US.Steel_value -0.15467 0.000129 US.Steel_capital -0.00689 -0.000303 Westinghouse_(Intercept) 461.39750 -0.154668 Westinghouse_value -0.15467 0.000129 Westinghouse_capital -0.00689 -0.000303 General.Motors_capital US.Steel_(Intercept) Chrysler_(Intercept) -0.006891 461.39750 Chrysler_value -0.000303 -0.15467 Chrysler_capital 0.001893 -0.00689 General.Electric_(Intercept) -0.006891 461.39750 General.Electric_value -0.000303 -0.15467 General.Electric_capital 0.001893 -0.00689 General.Motors_(Intercept) -0.006891 461.39750 General.Motors_value -0.000303 -0.15467 General.Motors_capital 0.001893 -0.00689 US.Steel_(Intercept) -0.006891 461.39750 US.Steel_value -0.000303 -0.15467 US.Steel_capital 0.001893 -0.00689 Westinghouse_(Intercept) -0.006891 461.39750 Westinghouse_value -0.000303 -0.15467 Westinghouse_capital 0.001893 -0.00689 US.Steel_value US.Steel_capital Chrysler_(Intercept) -0.154668 -0.006891 Chrysler_value 0.000129 -0.000303 Chrysler_capital -0.000303 0.001893 General.Electric_(Intercept) -0.154668 -0.006891 General.Electric_value 0.000129 -0.000303 General.Electric_capital -0.000303 0.001893 General.Motors_(Intercept) -0.154668 -0.006891 General.Motors_value 0.000129 -0.000303 General.Motors_capital -0.000303 0.001893 US.Steel_(Intercept) -0.154668 -0.006891 US.Steel_value 0.000129 -0.000303 US.Steel_capital -0.000303 0.001893 Westinghouse_(Intercept) -0.154668 -0.006891 Westinghouse_value 0.000129 -0.000303 Westinghouse_capital -0.000303 0.001893 Westinghouse_(Intercept) Westinghouse_value Chrysler_(Intercept) 461.39750 -0.154668 Chrysler_value -0.15467 0.000129 Chrysler_capital -0.00689 -0.000303 General.Electric_(Intercept) 461.39750 -0.154668 General.Electric_value -0.15467 0.000129 General.Electric_capital -0.00689 -0.000303 General.Motors_(Intercept) 461.39750 -0.154668 General.Motors_value -0.15467 0.000129 General.Motors_capital -0.00689 -0.000303 US.Steel_(Intercept) 461.39750 -0.154668 US.Steel_value -0.15467 0.000129 US.Steel_capital -0.00689 -0.000303 Westinghouse_(Intercept) 461.39750 -0.154668 Westinghouse_value -0.15467 0.000129 Westinghouse_capital -0.00689 -0.000303 Westinghouse_capital Chrysler_(Intercept) -0.006891 Chrysler_value -0.000303 Chrysler_capital 0.001893 General.Electric_(Intercept) -0.006891 General.Electric_value -0.000303 General.Electric_capital 0.001893 General.Motors_(Intercept) -0.006891 General.Motors_value -0.000303 General.Motors_capital 0.001893 US.Steel_(Intercept) -0.006891 US.Steel_value -0.000303 US.Steel_capital 0.001893 Westinghouse_(Intercept) -0.006891 Westinghouse_value -0.000303 Westinghouse_capital 0.001893 C1 C2 C3 C1 461.39750 -0.154668 -0.006891 C2 -0.15467 0.000129 -0.000303 C3 -0.00689 -0.000303 0.001893 Chrysler General.Electric General.Motors US.Steel Westinghouse X1935 41.24 -71.7 41.27 98.333 40.29 X1936 29.63 -150.7 -66.11 198.009 19.46 X1937 10.81 -205.4 -155.39 200.626 4.21 X1938 37.79 -169.4 -51.57 41.520 6.50 X1939 9.38 -193.7 -136.54 -22.742 5.06 X1940 20.47 -158.6 -42.05 0.513 2.46 X1941 25.78 -99.2 3.84 190.851 29.04 X1942 29.85 -114.8 62.38 174.529 13.83 X1943 13.11 -172.2 41.00 108.865 -5.58 X1944 15.73 -170.6 73.77 60.388 -7.87 X1945 31.19 -166.9 19.60 47.014 -18.39 X1946 2.33 -129.8 98.30 180.017 -4.69 X1947 20.31 -118.2 13.81 198.862 8.57 X1948 30.75 -140.2 -46.46 277.965 -11.89 X1949 19.97 -192.9 -97.21 170.739 -24.58 X1950 25.98 -225.4 -39.33 181.300 -28.22 X1951 61.49 -213.0 -72.74 291.171 -13.26 X1952 27.89 -234.9 -15.13 330.665 -15.43 X1953 12.03 -266.1 153.79 285.144 -40.69 X1954 19.93 -323.8 267.09 80.518 -73.50 2.5 % 97.5 % Chrysler_(Intercept) -90.662 -5.398 Chrysler_value 0.083 0.128 Chrysler_capital 0.219 0.392 General.Electric_(Intercept) -90.662 -5.398 General.Electric_value 0.083 0.128 General.Electric_capital 0.219 0.392 General.Motors_(Intercept) -90.662 -5.398 General.Motors_value 0.083 0.128 General.Motors_capital 0.219 0.392 US.Steel_(Intercept) -90.662 -5.398 US.Steel_value 0.083 0.128 US.Steel_capital 0.219 0.392 Westinghouse_(Intercept) -90.662 -5.398 Westinghouse_value 0.083 0.128 Westinghouse_capital 0.219 0.392 Chrysler General.Electric General.Motors US.Steel Westinghouse X1935 -0.95 105 276 112 -27.36 X1936 43.13 196 458 157 6.44 X1937 55.45 283 566 269 30.84 X1938 13.81 214 309 221 16.39 X1939 43.03 242 467 253 13.78 X1940 48.94 233 503 261 26.11 X1941 42.57 212 508 282 19.47 X1942 16.95 207 386 271 29.51 X1943 34.29 233 459 253 42.60 X1944 43.84 227 474 228 45.68 X1945 57.59 261 542 212 57.66 X1946 71.79 290 590 240 58.15 X1947 42.37 265 555 222 46.99 X1948 58.61 287 576 217 61.45 X1949 59.01 291 652 234 56.62 X1950 74.68 319 682 238 60.46 X1951 99.13 348 829 297 67.64 X1952 117.11 392 906 315 87.21 X1953 162.90 446 1151 356 130.77 X1954 152.56 513 1220 379 142.10 'log Lik.' -540 (df=4) 'log Lik.' -573 (df=4) [1] 100 Chrysler_invest Chrysler_value Chrysler_capital General.Electric_invest X1935 40.3 418 10.5 33.1 X1936 72.8 838 10.2 45.0 X1937 66.3 884 34.7 77.2 X1938 51.6 438 51.8 44.6 X1939 52.4 680 64.3 48.1 X1940 69.4 728 67.1 74.4 X1941 68.3 644 75.2 113.0 X1942 46.8 411 71.4 91.9 X1943 47.4 588 67.1 61.3 X1944 59.6 698 60.5 56.8 X1945 88.8 846 54.6 93.6 X1946 74.1 894 84.8 159.9 X1947 62.7 579 96.8 147.2 X1948 89.4 695 110.2 146.3 X1949 79.0 590 147.4 98.3 X1950 100.7 694 163.2 93.5 X1951 160.6 809 203.5 135.2 X1952 145.0 727 290.6 157.3 X1953 174.9 1002 346.1 179.5 X1954 172.5 703 414.9 189.6 General.Electric_value General.Electric_capital General.Motors_invest X1935 1171 97.8 318 X1936 2016 104.4 392 X1937 2803 118.0 411 X1938 2040 156.2 258 X1939 2256 172.6 331 X1940 2132 186.6 461 X1941 1834 220.9 512 X1942 1588 287.8 448 X1943 1749 319.9 500 X1944 1687 321.3 548 X1945 2008 319.6 561 X1946 2208 346.0 688 X1947 1657 456.4 569 X1948 1604 543.4 529 X1949 1432 618.3 555 X1950 1610 647.4 643 X1951 1819 671.3 756 X1952 2080 726.1 891 X1953 2372 800.3 1304 X1954 2760 888.9 1487 General.Motors_value General.Motors_capital US.Steel_invest X1935 3078 2.8 210 X1936 4662 52.6 355 X1937 5387 156.9 470 X1938 2792 209.2 262 X1939 4313 203.4 230 X1940 4644 207.2 262 X1941 4551 255.2 473 X1942 3244 303.7 446 X1943 4054 264.1 362 X1944 4379 201.6 288 X1945 4841 265.0 259 X1946 4901 402.2 420 X1947 3526 761.5 420 X1948 3255 922.4 494 X1949 3700 1020.1 405 X1950 3756 1099.0 419 X1951 4833 1207.7 588 X1952 4925 1430.5 645 X1953 6242 1777.3 641 X1954 5594 2226.3 459 US.Steel_value US.Steel_capital Westinghouse_invest Westinghouse_value X1935 1362 53.8 12.9 192 X1936 1807 50.5 25.9 516 X1937 2676 118.1 35.0 729 X1938 1802 260.2 22.9 560 X1939 1957 312.7 18.8 520 X1940 2203 254.2 28.6 628 X1941 2380 261.4 48.5 537 X1942 2169 298.7 43.3 561 X1943 1985 301.8 37.0 617 X1944 1814 279.1 37.8 627 X1945 1850 213.8 39.3 737 X1946 2068 232.6 53.5 760 X1947 1797 264.8 55.6 581 X1948 1626 306.9 49.6 662 X1949 1667 351.1 32.0 584 X1950 1677 357.8 32.2 635 X1951 2290 342.1 54.4 724 X1952 2159 444.2 71.8 864 X1953 2031 623.6 90.1 1194 X1954 2116 669.7 68.6 1189 Westinghouse_capital X1935 1.8 X1936 0.8 X1937 7.4 X1938 18.1 X1939 23.5 X1940 26.5 X1941 36.2 X1942 60.8 X1943 84.4 X1944 91.2 X1945 92.4 X1946 86.0 X1947 111.1 X1948 130.6 X1949 141.8 X1950 136.7 X1951 129.7 X1952 145.5 X1953 174.8 X1954 213.5 Chrysler_(Intercept) Chrysler_value Chrysler_capital Chrysler_X1935 1 418 10.5 Chrysler_X1936 1 838 10.2 Chrysler_X1937 1 884 34.7 Chrysler_X1938 1 438 51.8 Chrysler_X1939 1 680 64.3 Chrysler_X1940 1 728 67.1 Chrysler_X1941 1 644 75.2 Chrysler_X1942 1 411 71.4 Chrysler_X1943 1 588 67.1 Chrysler_X1944 1 698 60.5 Chrysler_X1945 1 846 54.6 Chrysler_X1946 1 894 84.8 Chrysler_X1947 1 579 96.8 Chrysler_X1948 1 695 110.2 Chrysler_X1949 1 590 147.4 Chrysler_X1950 1 694 163.2 Chrysler_X1951 1 809 203.5 Chrysler_X1952 1 727 290.6 Chrysler_X1953 1 1002 346.1 Chrysler_X1954 1 703 414.9 General.Electric_X1935 0 0 0.0 General.Electric_X1936 0 0 0.0 General.Electric_X1937 0 0 0.0 General.Electric_X1938 0 0 0.0 General.Electric_X1939 0 0 0.0 General.Electric_X1940 0 0 0.0 General.Electric_X1941 0 0 0.0 General.Electric_X1942 0 0 0.0 General.Electric_X1943 0 0 0.0 General.Electric_X1944 0 0 0.0 General.Electric_X1945 0 0 0.0 General.Electric_X1946 0 0 0.0 General.Electric_X1947 0 0 0.0 General.Electric_X1948 0 0 0.0 General.Electric_X1949 0 0 0.0 General.Electric_X1950 0 0 0.0 General.Electric_X1951 0 0 0.0 General.Electric_X1952 0 0 0.0 General.Electric_X1953 0 0 0.0 General.Electric_X1954 0 0 0.0 General.Motors_X1935 0 0 0.0 General.Motors_X1936 0 0 0.0 General.Motors_X1937 0 0 0.0 General.Motors_X1938 0 0 0.0 General.Motors_X1939 0 0 0.0 General.Motors_X1940 0 0 0.0 General.Motors_X1941 0 0 0.0 General.Motors_X1942 0 0 0.0 General.Motors_X1943 0 0 0.0 General.Motors_X1944 0 0 0.0 General.Motors_X1945 0 0 0.0 General.Motors_X1946 0 0 0.0 General.Motors_X1947 0 0 0.0 General.Motors_X1948 0 0 0.0 General.Motors_X1949 0 0 0.0 General.Motors_X1950 0 0 0.0 General.Motors_X1951 0 0 0.0 General.Motors_X1952 0 0 0.0 General.Motors_X1953 0 0 0.0 General.Motors_X1954 0 0 0.0 US.Steel_X1935 0 0 0.0 US.Steel_X1936 0 0 0.0 US.Steel_X1937 0 0 0.0 US.Steel_X1938 0 0 0.0 US.Steel_X1939 0 0 0.0 US.Steel_X1940 0 0 0.0 US.Steel_X1941 0 0 0.0 US.Steel_X1942 0 0 0.0 US.Steel_X1943 0 0 0.0 US.Steel_X1944 0 0 0.0 US.Steel_X1945 0 0 0.0 US.Steel_X1946 0 0 0.0 US.Steel_X1947 0 0 0.0 US.Steel_X1948 0 0 0.0 US.Steel_X1949 0 0 0.0 US.Steel_X1950 0 0 0.0 US.Steel_X1951 0 0 0.0 US.Steel_X1952 0 0 0.0 US.Steel_X1953 0 0 0.0 US.Steel_X1954 0 0 0.0 Westinghouse_X1935 0 0 0.0 Westinghouse_X1936 0 0 0.0 Westinghouse_X1937 0 0 0.0 Westinghouse_X1938 0 0 0.0 Westinghouse_X1939 0 0 0.0 Westinghouse_X1940 0 0 0.0 Westinghouse_X1941 0 0 0.0 Westinghouse_X1942 0 0 0.0 Westinghouse_X1943 0 0 0.0 Westinghouse_X1944 0 0 0.0 Westinghouse_X1945 0 0 0.0 Westinghouse_X1946 0 0 0.0 Westinghouse_X1947 0 0 0.0 Westinghouse_X1948 0 0 0.0 Westinghouse_X1949 0 0 0.0 Westinghouse_X1950 0 0 0.0 Westinghouse_X1951 0 0 0.0 Westinghouse_X1952 0 0 0.0 Westinghouse_X1953 0 0 0.0 Westinghouse_X1954 0 0 0.0 General.Electric_(Intercept) General.Electric_value Chrysler_X1935 0 0 Chrysler_X1936 0 0 Chrysler_X1937 0 0 Chrysler_X1938 0 0 Chrysler_X1939 0 0 Chrysler_X1940 0 0 Chrysler_X1941 0 0 Chrysler_X1942 0 0 Chrysler_X1943 0 0 Chrysler_X1944 0 0 Chrysler_X1945 0 0 Chrysler_X1946 0 0 Chrysler_X1947 0 0 Chrysler_X1948 0 0 Chrysler_X1949 0 0 Chrysler_X1950 0 0 Chrysler_X1951 0 0 Chrysler_X1952 0 0 Chrysler_X1953 0 0 Chrysler_X1954 0 0 General.Electric_X1935 1 1171 General.Electric_X1936 1 2016 General.Electric_X1937 1 2803 General.Electric_X1938 1 2040 General.Electric_X1939 1 2256 General.Electric_X1940 1 2132 General.Electric_X1941 1 1834 General.Electric_X1942 1 1588 General.Electric_X1943 1 1749 General.Electric_X1944 1 1687 General.Electric_X1945 1 2008 General.Electric_X1946 1 2208 General.Electric_X1947 1 1657 General.Electric_X1948 1 1604 General.Electric_X1949 1 1432 General.Electric_X1950 1 1610 General.Electric_X1951 1 1819 General.Electric_X1952 1 2080 General.Electric_X1953 1 2372 General.Electric_X1954 1 2760 General.Motors_X1935 0 0 General.Motors_X1936 0 0 General.Motors_X1937 0 0 General.Motors_X1938 0 0 General.Motors_X1939 0 0 General.Motors_X1940 0 0 General.Motors_X1941 0 0 General.Motors_X1942 0 0 General.Motors_X1943 0 0 General.Motors_X1944 0 0 General.Motors_X1945 0 0 General.Motors_X1946 0 0 General.Motors_X1947 0 0 General.Motors_X1948 0 0 General.Motors_X1949 0 0 General.Motors_X1950 0 0 General.Motors_X1951 0 0 General.Motors_X1952 0 0 General.Motors_X1953 0 0 General.Motors_X1954 0 0 US.Steel_X1935 0 0 US.Steel_X1936 0 0 US.Steel_X1937 0 0 US.Steel_X1938 0 0 US.Steel_X1939 0 0 US.Steel_X1940 0 0 US.Steel_X1941 0 0 US.Steel_X1942 0 0 US.Steel_X1943 0 0 US.Steel_X1944 0 0 US.Steel_X1945 0 0 US.Steel_X1946 0 0 US.Steel_X1947 0 0 US.Steel_X1948 0 0 US.Steel_X1949 0 0 US.Steel_X1950 0 0 US.Steel_X1951 0 0 US.Steel_X1952 0 0 US.Steel_X1953 0 0 US.Steel_X1954 0 0 Westinghouse_X1935 0 0 Westinghouse_X1936 0 0 Westinghouse_X1937 0 0 Westinghouse_X1938 0 0 Westinghouse_X1939 0 0 Westinghouse_X1940 0 0 Westinghouse_X1941 0 0 Westinghouse_X1942 0 0 Westinghouse_X1943 0 0 Westinghouse_X1944 0 0 Westinghouse_X1945 0 0 Westinghouse_X1946 0 0 Westinghouse_X1947 0 0 Westinghouse_X1948 0 0 Westinghouse_X1949 0 0 Westinghouse_X1950 0 0 Westinghouse_X1951 0 0 Westinghouse_X1952 0 0 Westinghouse_X1953 0 0 Westinghouse_X1954 0 0 General.Electric_capital General.Motors_(Intercept) Chrysler_X1935 0.0 0 Chrysler_X1936 0.0 0 Chrysler_X1937 0.0 0 Chrysler_X1938 0.0 0 Chrysler_X1939 0.0 0 Chrysler_X1940 0.0 0 Chrysler_X1941 0.0 0 Chrysler_X1942 0.0 0 Chrysler_X1943 0.0 0 Chrysler_X1944 0.0 0 Chrysler_X1945 0.0 0 Chrysler_X1946 0.0 0 Chrysler_X1947 0.0 0 Chrysler_X1948 0.0 0 Chrysler_X1949 0.0 0 Chrysler_X1950 0.0 0 Chrysler_X1951 0.0 0 Chrysler_X1952 0.0 0 Chrysler_X1953 0.0 0 Chrysler_X1954 0.0 0 General.Electric_X1935 97.8 0 General.Electric_X1936 104.4 0 General.Electric_X1937 118.0 0 General.Electric_X1938 156.2 0 General.Electric_X1939 172.6 0 General.Electric_X1940 186.6 0 General.Electric_X1941 220.9 0 General.Electric_X1942 287.8 0 General.Electric_X1943 319.9 0 General.Electric_X1944 321.3 0 General.Electric_X1945 319.6 0 General.Electric_X1946 346.0 0 General.Electric_X1947 456.4 0 General.Electric_X1948 543.4 0 General.Electric_X1949 618.3 0 General.Electric_X1950 647.4 0 General.Electric_X1951 671.3 0 General.Electric_X1952 726.1 0 General.Electric_X1953 800.3 0 General.Electric_X1954 888.9 0 General.Motors_X1935 0.0 1 General.Motors_X1936 0.0 1 General.Motors_X1937 0.0 1 General.Motors_X1938 0.0 1 General.Motors_X1939 0.0 1 General.Motors_X1940 0.0 1 General.Motors_X1941 0.0 1 General.Motors_X1942 0.0 1 General.Motors_X1943 0.0 1 General.Motors_X1944 0.0 1 General.Motors_X1945 0.0 1 General.Motors_X1946 0.0 1 General.Motors_X1947 0.0 1 General.Motors_X1948 0.0 1 General.Motors_X1949 0.0 1 General.Motors_X1950 0.0 1 General.Motors_X1951 0.0 1 General.Motors_X1952 0.0 1 General.Motors_X1953 0.0 1 General.Motors_X1954 0.0 1 US.Steel_X1935 0.0 0 US.Steel_X1936 0.0 0 US.Steel_X1937 0.0 0 US.Steel_X1938 0.0 0 US.Steel_X1939 0.0 0 US.Steel_X1940 0.0 0 US.Steel_X1941 0.0 0 US.Steel_X1942 0.0 0 US.Steel_X1943 0.0 0 US.Steel_X1944 0.0 0 US.Steel_X1945 0.0 0 US.Steel_X1946 0.0 0 US.Steel_X1947 0.0 0 US.Steel_X1948 0.0 0 US.Steel_X1949 0.0 0 US.Steel_X1950 0.0 0 US.Steel_X1951 0.0 0 US.Steel_X1952 0.0 0 US.Steel_X1953 0.0 0 US.Steel_X1954 0.0 0 Westinghouse_X1935 0.0 0 Westinghouse_X1936 0.0 0 Westinghouse_X1937 0.0 0 Westinghouse_X1938 0.0 0 Westinghouse_X1939 0.0 0 Westinghouse_X1940 0.0 0 Westinghouse_X1941 0.0 0 Westinghouse_X1942 0.0 0 Westinghouse_X1943 0.0 0 Westinghouse_X1944 0.0 0 Westinghouse_X1945 0.0 0 Westinghouse_X1946 0.0 0 Westinghouse_X1947 0.0 0 Westinghouse_X1948 0.0 0 Westinghouse_X1949 0.0 0 Westinghouse_X1950 0.0 0 Westinghouse_X1951 0.0 0 Westinghouse_X1952 0.0 0 Westinghouse_X1953 0.0 0 Westinghouse_X1954 0.0 0 General.Motors_value General.Motors_capital Chrysler_X1935 0 0.0 Chrysler_X1936 0 0.0 Chrysler_X1937 0 0.0 Chrysler_X1938 0 0.0 Chrysler_X1939 0 0.0 Chrysler_X1940 0 0.0 Chrysler_X1941 0 0.0 Chrysler_X1942 0 0.0 Chrysler_X1943 0 0.0 Chrysler_X1944 0 0.0 Chrysler_X1945 0 0.0 Chrysler_X1946 0 0.0 Chrysler_X1947 0 0.0 Chrysler_X1948 0 0.0 Chrysler_X1949 0 0.0 Chrysler_X1950 0 0.0 Chrysler_X1951 0 0.0 Chrysler_X1952 0 0.0 Chrysler_X1953 0 0.0 Chrysler_X1954 0 0.0 General.Electric_X1935 0 0.0 General.Electric_X1936 0 0.0 General.Electric_X1937 0 0.0 General.Electric_X1938 0 0.0 General.Electric_X1939 0 0.0 General.Electric_X1940 0 0.0 General.Electric_X1941 0 0.0 General.Electric_X1942 0 0.0 General.Electric_X1943 0 0.0 General.Electric_X1944 0 0.0 General.Electric_X1945 0 0.0 General.Electric_X1946 0 0.0 General.Electric_X1947 0 0.0 General.Electric_X1948 0 0.0 General.Electric_X1949 0 0.0 General.Electric_X1950 0 0.0 General.Electric_X1951 0 0.0 General.Electric_X1952 0 0.0 General.Electric_X1953 0 0.0 General.Electric_X1954 0 0.0 General.Motors_X1935 3078 2.8 General.Motors_X1936 4662 52.6 General.Motors_X1937 5387 156.9 General.Motors_X1938 2792 209.2 General.Motors_X1939 4313 203.4 General.Motors_X1940 4644 207.2 General.Motors_X1941 4551 255.2 General.Motors_X1942 3244 303.7 General.Motors_X1943 4054 264.1 General.Motors_X1944 4379 201.6 General.Motors_X1945 4841 265.0 General.Motors_X1946 4901 402.2 General.Motors_X1947 3526 761.5 General.Motors_X1948 3255 922.4 General.Motors_X1949 3700 1020.1 General.Motors_X1950 3756 1099.0 General.Motors_X1951 4833 1207.7 General.Motors_X1952 4925 1430.5 General.Motors_X1953 6242 1777.3 General.Motors_X1954 5594 2226.3 US.Steel_X1935 0 0.0 US.Steel_X1936 0 0.0 US.Steel_X1937 0 0.0 US.Steel_X1938 0 0.0 US.Steel_X1939 0 0.0 US.Steel_X1940 0 0.0 US.Steel_X1941 0 0.0 US.Steel_X1942 0 0.0 US.Steel_X1943 0 0.0 US.Steel_X1944 0 0.0 US.Steel_X1945 0 0.0 US.Steel_X1946 0 0.0 US.Steel_X1947 0 0.0 US.Steel_X1948 0 0.0 US.Steel_X1949 0 0.0 US.Steel_X1950 0 0.0 US.Steel_X1951 0 0.0 US.Steel_X1952 0 0.0 US.Steel_X1953 0 0.0 US.Steel_X1954 0 0.0 Westinghouse_X1935 0 0.0 Westinghouse_X1936 0 0.0 Westinghouse_X1937 0 0.0 Westinghouse_X1938 0 0.0 Westinghouse_X1939 0 0.0 Westinghouse_X1940 0 0.0 Westinghouse_X1941 0 0.0 Westinghouse_X1942 0 0.0 Westinghouse_X1943 0 0.0 Westinghouse_X1944 0 0.0 Westinghouse_X1945 0 0.0 Westinghouse_X1946 0 0.0 Westinghouse_X1947 0 0.0 Westinghouse_X1948 0 0.0 Westinghouse_X1949 0 0.0 Westinghouse_X1950 0 0.0 Westinghouse_X1951 0 0.0 Westinghouse_X1952 0 0.0 Westinghouse_X1953 0 0.0 Westinghouse_X1954 0 0.0 US.Steel_(Intercept) US.Steel_value US.Steel_capital Chrysler_X1935 0 0 0.0 Chrysler_X1936 0 0 0.0 Chrysler_X1937 0 0 0.0 Chrysler_X1938 0 0 0.0 Chrysler_X1939 0 0 0.0 Chrysler_X1940 0 0 0.0 Chrysler_X1941 0 0 0.0 Chrysler_X1942 0 0 0.0 Chrysler_X1943 0 0 0.0 Chrysler_X1944 0 0 0.0 Chrysler_X1945 0 0 0.0 Chrysler_X1946 0 0 0.0 Chrysler_X1947 0 0 0.0 Chrysler_X1948 0 0 0.0 Chrysler_X1949 0 0 0.0 Chrysler_X1950 0 0 0.0 Chrysler_X1951 0 0 0.0 Chrysler_X1952 0 0 0.0 Chrysler_X1953 0 0 0.0 Chrysler_X1954 0 0 0.0 General.Electric_X1935 0 0 0.0 General.Electric_X1936 0 0 0.0 General.Electric_X1937 0 0 0.0 General.Electric_X1938 0 0 0.0 General.Electric_X1939 0 0 0.0 General.Electric_X1940 0 0 0.0 General.Electric_X1941 0 0 0.0 General.Electric_X1942 0 0 0.0 General.Electric_X1943 0 0 0.0 General.Electric_X1944 0 0 0.0 General.Electric_X1945 0 0 0.0 General.Electric_X1946 0 0 0.0 General.Electric_X1947 0 0 0.0 General.Electric_X1948 0 0 0.0 General.Electric_X1949 0 0 0.0 General.Electric_X1950 0 0 0.0 General.Electric_X1951 0 0 0.0 General.Electric_X1952 0 0 0.0 General.Electric_X1953 0 0 0.0 General.Electric_X1954 0 0 0.0 General.Motors_X1935 0 0 0.0 General.Motors_X1936 0 0 0.0 General.Motors_X1937 0 0 0.0 General.Motors_X1938 0 0 0.0 General.Motors_X1939 0 0 0.0 General.Motors_X1940 0 0 0.0 General.Motors_X1941 0 0 0.0 General.Motors_X1942 0 0 0.0 General.Motors_X1943 0 0 0.0 General.Motors_X1944 0 0 0.0 General.Motors_X1945 0 0 0.0 General.Motors_X1946 0 0 0.0 General.Motors_X1947 0 0 0.0 General.Motors_X1948 0 0 0.0 General.Motors_X1949 0 0 0.0 General.Motors_X1950 0 0 0.0 General.Motors_X1951 0 0 0.0 General.Motors_X1952 0 0 0.0 General.Motors_X1953 0 0 0.0 General.Motors_X1954 0 0 0.0 US.Steel_X1935 1 1362 53.8 US.Steel_X1936 1 1807 50.5 US.Steel_X1937 1 2676 118.1 US.Steel_X1938 1 1802 260.2 US.Steel_X1939 1 1957 312.7 US.Steel_X1940 1 2203 254.2 US.Steel_X1941 1 2380 261.4 US.Steel_X1942 1 2169 298.7 US.Steel_X1943 1 1985 301.8 US.Steel_X1944 1 1814 279.1 US.Steel_X1945 1 1850 213.8 US.Steel_X1946 1 2068 232.6 US.Steel_X1947 1 1797 264.8 US.Steel_X1948 1 1626 306.9 US.Steel_X1949 1 1667 351.1 US.Steel_X1950 1 1677 357.8 US.Steel_X1951 1 2290 342.1 US.Steel_X1952 1 2159 444.2 US.Steel_X1953 1 2031 623.6 US.Steel_X1954 1 2116 669.7 Westinghouse_X1935 0 0 0.0 Westinghouse_X1936 0 0 0.0 Westinghouse_X1937 0 0 0.0 Westinghouse_X1938 0 0 0.0 Westinghouse_X1939 0 0 0.0 Westinghouse_X1940 0 0 0.0 Westinghouse_X1941 0 0 0.0 Westinghouse_X1942 0 0 0.0 Westinghouse_X1943 0 0 0.0 Westinghouse_X1944 0 0 0.0 Westinghouse_X1945 0 0 0.0 Westinghouse_X1946 0 0 0.0 Westinghouse_X1947 0 0 0.0 Westinghouse_X1948 0 0 0.0 Westinghouse_X1949 0 0 0.0 Westinghouse_X1950 0 0 0.0 Westinghouse_X1951 0 0 0.0 Westinghouse_X1952 0 0 0.0 Westinghouse_X1953 0 0 0.0 Westinghouse_X1954 0 0 0.0 Westinghouse_(Intercept) Westinghouse_value Chrysler_X1935 0 0 Chrysler_X1936 0 0 Chrysler_X1937 0 0 Chrysler_X1938 0 0 Chrysler_X1939 0 0 Chrysler_X1940 0 0 Chrysler_X1941 0 0 Chrysler_X1942 0 0 Chrysler_X1943 0 0 Chrysler_X1944 0 0 Chrysler_X1945 0 0 Chrysler_X1946 0 0 Chrysler_X1947 0 0 Chrysler_X1948 0 0 Chrysler_X1949 0 0 Chrysler_X1950 0 0 Chrysler_X1951 0 0 Chrysler_X1952 0 0 Chrysler_X1953 0 0 Chrysler_X1954 0 0 General.Electric_X1935 0 0 General.Electric_X1936 0 0 General.Electric_X1937 0 0 General.Electric_X1938 0 0 General.Electric_X1939 0 0 General.Electric_X1940 0 0 General.Electric_X1941 0 0 General.Electric_X1942 0 0 General.Electric_X1943 0 0 General.Electric_X1944 0 0 General.Electric_X1945 0 0 General.Electric_X1946 0 0 General.Electric_X1947 0 0 General.Electric_X1948 0 0 General.Electric_X1949 0 0 General.Electric_X1950 0 0 General.Electric_X1951 0 0 General.Electric_X1952 0 0 General.Electric_X1953 0 0 General.Electric_X1954 0 0 General.Motors_X1935 0 0 General.Motors_X1936 0 0 General.Motors_X1937 0 0 General.Motors_X1938 0 0 General.Motors_X1939 0 0 General.Motors_X1940 0 0 General.Motors_X1941 0 0 General.Motors_X1942 0 0 General.Motors_X1943 0 0 General.Motors_X1944 0 0 General.Motors_X1945 0 0 General.Motors_X1946 0 0 General.Motors_X1947 0 0 General.Motors_X1948 0 0 General.Motors_X1949 0 0 General.Motors_X1950 0 0 General.Motors_X1951 0 0 General.Motors_X1952 0 0 General.Motors_X1953 0 0 General.Motors_X1954 0 0 US.Steel_X1935 0 0 US.Steel_X1936 0 0 US.Steel_X1937 0 0 US.Steel_X1938 0 0 US.Steel_X1939 0 0 US.Steel_X1940 0 0 US.Steel_X1941 0 0 US.Steel_X1942 0 0 US.Steel_X1943 0 0 US.Steel_X1944 0 0 US.Steel_X1945 0 0 US.Steel_X1946 0 0 US.Steel_X1947 0 0 US.Steel_X1948 0 0 US.Steel_X1949 0 0 US.Steel_X1950 0 0 US.Steel_X1951 0 0 US.Steel_X1952 0 0 US.Steel_X1953 0 0 US.Steel_X1954 0 0 Westinghouse_X1935 1 192 Westinghouse_X1936 1 516 Westinghouse_X1937 1 729 Westinghouse_X1938 1 560 Westinghouse_X1939 1 520 Westinghouse_X1940 1 628 Westinghouse_X1941 1 537 Westinghouse_X1942 1 561 Westinghouse_X1943 1 617 Westinghouse_X1944 1 627 Westinghouse_X1945 1 737 Westinghouse_X1946 1 760 Westinghouse_X1947 1 581 Westinghouse_X1948 1 662 Westinghouse_X1949 1 584 Westinghouse_X1950 1 635 Westinghouse_X1951 1 724 Westinghouse_X1952 1 864 Westinghouse_X1953 1 1194 Westinghouse_X1954 1 1189 Westinghouse_capital Chrysler_X1935 0.0 Chrysler_X1936 0.0 Chrysler_X1937 0.0 Chrysler_X1938 0.0 Chrysler_X1939 0.0 Chrysler_X1940 0.0 Chrysler_X1941 0.0 Chrysler_X1942 0.0 Chrysler_X1943 0.0 Chrysler_X1944 0.0 Chrysler_X1945 0.0 Chrysler_X1946 0.0 Chrysler_X1947 0.0 Chrysler_X1948 0.0 Chrysler_X1949 0.0 Chrysler_X1950 0.0 Chrysler_X1951 0.0 Chrysler_X1952 0.0 Chrysler_X1953 0.0 Chrysler_X1954 0.0 General.Electric_X1935 0.0 General.Electric_X1936 0.0 General.Electric_X1937 0.0 General.Electric_X1938 0.0 General.Electric_X1939 0.0 General.Electric_X1940 0.0 General.Electric_X1941 0.0 General.Electric_X1942 0.0 General.Electric_X1943 0.0 General.Electric_X1944 0.0 General.Electric_X1945 0.0 General.Electric_X1946 0.0 General.Electric_X1947 0.0 General.Electric_X1948 0.0 General.Electric_X1949 0.0 General.Electric_X1950 0.0 General.Electric_X1951 0.0 General.Electric_X1952 0.0 General.Electric_X1953 0.0 General.Electric_X1954 0.0 General.Motors_X1935 0.0 General.Motors_X1936 0.0 General.Motors_X1937 0.0 General.Motors_X1938 0.0 General.Motors_X1939 0.0 General.Motors_X1940 0.0 General.Motors_X1941 0.0 General.Motors_X1942 0.0 General.Motors_X1943 0.0 General.Motors_X1944 0.0 General.Motors_X1945 0.0 General.Motors_X1946 0.0 General.Motors_X1947 0.0 General.Motors_X1948 0.0 General.Motors_X1949 0.0 General.Motors_X1950 0.0 General.Motors_X1951 0.0 General.Motors_X1952 0.0 General.Motors_X1953 0.0 General.Motors_X1954 0.0 US.Steel_X1935 0.0 US.Steel_X1936 0.0 US.Steel_X1937 0.0 US.Steel_X1938 0.0 US.Steel_X1939 0.0 US.Steel_X1940 0.0 US.Steel_X1941 0.0 US.Steel_X1942 0.0 US.Steel_X1943 0.0 US.Steel_X1944 0.0 US.Steel_X1945 0.0 US.Steel_X1946 0.0 US.Steel_X1947 0.0 US.Steel_X1948 0.0 US.Steel_X1949 0.0 US.Steel_X1950 0.0 US.Steel_X1951 0.0 US.Steel_X1952 0.0 US.Steel_X1953 0.0 US.Steel_X1954 0.0 Westinghouse_X1935 1.8 Westinghouse_X1936 0.8 Westinghouse_X1937 7.4 Westinghouse_X1938 18.1 Westinghouse_X1939 23.5 Westinghouse_X1940 26.5 Westinghouse_X1941 36.2 Westinghouse_X1942 60.8 Westinghouse_X1943 84.4 Westinghouse_X1944 91.2 Westinghouse_X1945 92.4 Westinghouse_X1946 86.0 Westinghouse_X1947 111.1 Westinghouse_X1948 130.6 Westinghouse_X1949 141.8 Westinghouse_X1950 136.7 Westinghouse_X1951 129.7 Westinghouse_X1952 145.5 Westinghouse_X1953 174.8 Westinghouse_X1954 213.5 $Chrysler Chrysler_invest ~ Chrysler_value + Chrysler_capital $General.Electric General.Electric_invest ~ General.Electric_value + General.Electric_capital $General.Motors General.Motors_invest ~ General.Motors_value + General.Motors_capital $US.Steel US.Steel_invest ~ US.Steel_value + US.Steel_capital $Westinghouse Westinghouse_invest ~ Westinghouse_value + Westinghouse_capital Chrysler_invest ~ Chrysler_value + Chrysler_capital $Chrysler Chrysler_invest ~ Chrysler_value + Chrysler_capital attr(,"variables") list(Chrysler_invest, Chrysler_value, Chrysler_capital) attr(,"factors") Chrysler_value Chrysler_capital Chrysler_invest 0 0 Chrysler_value 1 0 Chrysler_capital 0 1 attr(,"term.labels") [1] "Chrysler_value" "Chrysler_capital" attr(,"order") [1] 1 1 attr(,"intercept") [1] 1 attr(,"response") [1] 1 attr(,".Environment") attr(,"predvars") list(Chrysler_invest, Chrysler_value, Chrysler_capital) attr(,"dataClasses") Chrysler_invest Chrysler_value Chrysler_capital "numeric" "numeric" "numeric" $General.Electric General.Electric_invest ~ General.Electric_value + General.Electric_capital attr(,"variables") list(General.Electric_invest, General.Electric_value, General.Electric_capital) attr(,"factors") General.Electric_value General.Electric_capital General.Electric_invest 0 0 General.Electric_value 1 0 General.Electric_capital 0 1 attr(,"term.labels") [1] "General.Electric_value" "General.Electric_capital" attr(,"order") [1] 1 1 attr(,"intercept") [1] 1 attr(,"response") [1] 1 attr(,".Environment") attr(,"predvars") list(General.Electric_invest, General.Electric_value, General.Electric_capital) attr(,"dataClasses") General.Electric_invest General.Electric_value General.Electric_capital "numeric" "numeric" "numeric" $General.Motors General.Motors_invest ~ General.Motors_value + General.Motors_capital attr(,"variables") list(General.Motors_invest, General.Motors_value, General.Motors_capital) attr(,"factors") General.Motors_value General.Motors_capital General.Motors_invest 0 0 General.Motors_value 1 0 General.Motors_capital 0 1 attr(,"term.labels") [1] "General.Motors_value" "General.Motors_capital" attr(,"order") [1] 1 1 attr(,"intercept") [1] 1 attr(,"response") [1] 1 attr(,".Environment") attr(,"predvars") list(General.Motors_invest, General.Motors_value, General.Motors_capital) attr(,"dataClasses") General.Motors_invest General.Motors_value General.Motors_capital "numeric" "numeric" "numeric" $US.Steel US.Steel_invest ~ US.Steel_value + US.Steel_capital attr(,"variables") list(US.Steel_invest, US.Steel_value, US.Steel_capital) attr(,"factors") US.Steel_value US.Steel_capital US.Steel_invest 0 0 US.Steel_value 1 0 US.Steel_capital 0 1 attr(,"term.labels") [1] "US.Steel_value" "US.Steel_capital" attr(,"order") [1] 1 1 attr(,"intercept") [1] 1 attr(,"response") [1] 1 attr(,".Environment") attr(,"predvars") list(US.Steel_invest, US.Steel_value, US.Steel_capital) attr(,"dataClasses") US.Steel_invest US.Steel_value US.Steel_capital "numeric" "numeric" "numeric" $Westinghouse Westinghouse_invest ~ Westinghouse_value + Westinghouse_capital attr(,"variables") list(Westinghouse_invest, Westinghouse_value, Westinghouse_capital) attr(,"factors") Westinghouse_value Westinghouse_capital Westinghouse_invest 0 0 Westinghouse_value 1 0 Westinghouse_capital 0 1 attr(,"term.labels") [1] "Westinghouse_value" "Westinghouse_capital" attr(,"order") [1] 1 1 attr(,"intercept") [1] 1 attr(,"response") [1] 1 attr(,".Environment") attr(,"predvars") list(Westinghouse_invest, Westinghouse_value, Westinghouse_capital) attr(,"dataClasses") Westinghouse_invest Westinghouse_value Westinghouse_capital "numeric" "numeric" "numeric" Chrysler_invest ~ Chrysler_value + Chrysler_capital attr(,"variables") list(Chrysler_invest, Chrysler_value, Chrysler_capital) attr(,"factors") Chrysler_value Chrysler_capital Chrysler_invest 0 0 Chrysler_value 1 0 Chrysler_capital 0 1 attr(,"term.labels") [1] "Chrysler_value" "Chrysler_capital" attr(,"order") [1] 1 1 attr(,"intercept") [1] 1 attr(,"response") [1] 1 attr(,".Environment") attr(,"predvars") list(Chrysler_invest, Chrysler_value, Chrysler_capital) attr(,"dataClasses") Chrysler_invest Chrysler_value Chrysler_capital "numeric" "numeric" "numeric" > > # SUR > if(requireNamespace( 'plm', quietly = TRUE ) ) { + greeneSur <- systemfit( formulaGrunfeld, "SUR", + data = GrunfeldGreene, methodResidCov = "noDfCor", useMatrix = useMatrix ) + print( greeneSur ) + print( summary( greeneSur ) ) + print( summary( greeneSur, useDfSys = TRUE, residCov = FALSE ) ) + print( summary( greeneSur, equations = FALSE ) ) + print( coef( greeneSur ) ) + print( coef( summary( greeneSur ) ) ) + print( vcov( greeneSur ) ) + print( residuals( greeneSur ) ) + print( confint( greeneSur ) ) + print( fitted( greeneSur ) ) + print( logLik( greeneSur ) ) + print( logLik( greeneSur, residCovDiag = TRUE ) ) + print( nobs( greeneSur ) ) + print( model.frame( greeneSur ) ) + print( model.matrix( greeneSur ) ) + print( formula( greeneSur ) ) + print( formula( greeneSur$eq[[ 1 ]] ) ) + print( terms( greeneSur ) ) + print( terms( greeneSur$eq[[ 1 ]] ) ) + } systemfit results method: SUR Coefficients: Chrysler_(Intercept) Chrysler_value 0.5043 0.0695 Chrysler_capital General.Electric_(Intercept) 0.3085 -22.4389 General.Electric_value General.Electric_capital 0.0373 0.1308 General.Motors_(Intercept) General.Motors_value -162.3641 0.1205 General.Motors_capital US.Steel_(Intercept) 0.3827 85.4233 US.Steel_value US.Steel_capital 0.1015 0.4000 Westinghouse_(Intercept) Westinghouse_value 1.0889 0.0570 Westinghouse_capital 0.0415 systemfit results method: SUR N DF SSR detRCov OLS-R2 McElroy-R2 system 100 85 347048 6.18e+13 0.844 0.869 N DF SSR MSE RMSE R2 Adj R2 Chrysler 20 17 3057 180 13.4 0.912 0.901 General.Electric 20 17 14009 824 28.7 0.688 0.651 General.Motors 20 17 144321 8489 92.1 0.921 0.911 US.Steel 20 17 183763 10810 104.0 0.422 0.354 Westinghouse 20 17 1898 112 10.6 0.726 0.694 The covariance matrix of the residuals used for estimation Chrysler General.Electric General.Motors US.Steel Westinghouse Chrysler 149.9 -21.4 -283 418 13.3 General.Electric -21.4 660.8 608 905 176.4 General.Motors -282.8 607.5 7160 -2222 126.2 US.Steel 418.1 905.0 -2222 8896 546.2 Westinghouse 13.3 176.4 126 546 88.7 The covariance matrix of the residuals Chrysler General.Electric General.Motors US.Steel Westinghouse Chrysler 152.85 2.05 -314 455 16.7 General.Electric 2.05 700.46 605 1224 200.3 General.Motors -313.70 605.34 7216 -2687 129.9 US.Steel 455.09 1224.41 -2687 9188 652.7 Westinghouse 16.66 200.32 130 653 94.9 The correlations of the residuals Chrysler General.Electric General.Motors US.Steel Westinghouse Chrysler 1.00000 0.00626 -0.299 0.384 0.138 General.Electric 0.00626 1.00000 0.269 0.483 0.777 General.Motors -0.29870 0.26925 1.000 -0.330 0.157 US.Steel 0.38402 0.48264 -0.330 1.000 0.699 Westinghouse 0.13832 0.77690 0.157 0.699 1.000 SUR estimates for 'Chrysler' (equation 1) Model Formula: Chrysler_invest ~ Chrysler_value + Chrysler_capital Estimate Std. Error t value Pr(>|t|) (Intercept) 0.5043 11.5128 0.04 0.96557 value 0.0695 0.0169 4.12 0.00072 *** capital 0.3085 0.0259 11.93 1.1e-09 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 13.41 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 3056.985 MSE: 179.823 Root MSE: 13.41 Multiple R-Squared: 0.912 Adjusted R-Squared: 0.901 SUR estimates for 'General.Electric' (equation 2) Model Formula: General.Electric_invest ~ General.Electric_value + General.Electric_capital Estimate Std. Error t value Pr(>|t|) (Intercept) -22.4389 25.5186 -0.88 0.3915 value 0.0373 0.0123 3.04 0.0074 ** capital 0.1308 0.0220 5.93 1.6e-05 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 28.707 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 14009.115 MSE: 824.066 Root MSE: 28.707 Multiple R-Squared: 0.688 Adjusted R-Squared: 0.651 SUR estimates for 'General.Motors' (equation 3) Model Formula: General.Motors_invest ~ General.Motors_value + General.Motors_capital Estimate Std. Error t value Pr(>|t|) (Intercept) -162.3641 89.4592 -1.81 0.087 . value 0.1205 0.0216 5.57 3.4e-05 *** capital 0.3827 0.0328 11.68 1.5e-09 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 92.138 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 144320.876 MSE: 8489.463 Root MSE: 92.138 Multiple R-Squared: 0.921 Adjusted R-Squared: 0.911 SUR estimates for 'US.Steel' (equation 4) Model Formula: US.Steel_invest ~ US.Steel_value + US.Steel_capital Estimate Std. Error t value Pr(>|t|) (Intercept) 85.4233 111.8774 0.76 0.4556 value 0.1015 0.0548 1.85 0.0814 . capital 0.4000 0.1278 3.13 0.0061 ** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 103.969 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 183763.011 MSE: 10809.589 Root MSE: 103.969 Multiple R-Squared: 0.422 Adjusted R-Squared: 0.354 SUR estimates for 'Westinghouse' (equation 5) Model Formula: Westinghouse_invest ~ Westinghouse_value + Westinghouse_capital Estimate Std. Error t value Pr(>|t|) (Intercept) 1.0889 6.2588 0.17 0.86394 value 0.0570 0.0114 5.02 0.00011 *** capital 0.0415 0.0412 1.01 0.32787 --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 10.567 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 1898.249 MSE: 111.662 Root MSE: 10.567 Multiple R-Squared: 0.726 Adjusted R-Squared: 0.694 systemfit results method: SUR N DF SSR detRCov OLS-R2 McElroy-R2 system 100 85 347048 6.18e+13 0.844 0.869 N DF SSR MSE RMSE R2 Adj R2 Chrysler 20 17 3057 180 13.4 0.912 0.901 General.Electric 20 17 14009 824 28.7 0.688 0.651 General.Motors 20 17 144321 8489 92.1 0.921 0.911 US.Steel 20 17 183763 10810 104.0 0.422 0.354 Westinghouse 20 17 1898 112 10.6 0.726 0.694 SUR estimates for 'Chrysler' (equation 1) Model Formula: Chrysler_invest ~ Chrysler_value + Chrysler_capital Estimate Std. Error t value Pr(>|t|) (Intercept) 0.5043 11.5128 0.04 0.97 value 0.0695 0.0169 4.12 8.9e-05 *** capital 0.3085 0.0259 11.93 < 2e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 13.41 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 3056.985 MSE: 179.823 Root MSE: 13.41 Multiple R-Squared: 0.912 Adjusted R-Squared: 0.901 SUR estimates for 'General.Electric' (equation 2) Model Formula: General.Electric_invest ~ General.Electric_value + General.Electric_capital Estimate Std. Error t value Pr(>|t|) (Intercept) -22.4389 25.5186 -0.88 0.3817 value 0.0373 0.0123 3.04 0.0031 ** capital 0.1308 0.0220 5.93 6.3e-08 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 28.707 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 14009.115 MSE: 824.066 Root MSE: 28.707 Multiple R-Squared: 0.688 Adjusted R-Squared: 0.651 SUR estimates for 'General.Motors' (equation 3) Model Formula: General.Motors_invest ~ General.Motors_value + General.Motors_capital Estimate Std. Error t value Pr(>|t|) (Intercept) -162.3641 89.4592 -1.81 0.073 . value 0.1205 0.0216 5.57 2.9e-07 *** capital 0.3827 0.0328 11.68 < 2e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 92.138 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 144320.876 MSE: 8489.463 Root MSE: 92.138 Multiple R-Squared: 0.921 Adjusted R-Squared: 0.911 SUR estimates for 'US.Steel' (equation 4) Model Formula: US.Steel_invest ~ US.Steel_value + US.Steel_capital Estimate Std. Error t value Pr(>|t|) (Intercept) 85.4233 111.8774 0.76 0.4473 value 0.1015 0.0548 1.85 0.0674 . capital 0.4000 0.1278 3.13 0.0024 ** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 103.969 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 183763.011 MSE: 10809.589 Root MSE: 103.969 Multiple R-Squared: 0.422 Adjusted R-Squared: 0.354 SUR estimates for 'Westinghouse' (equation 5) Model Formula: Westinghouse_invest ~ Westinghouse_value + Westinghouse_capital Estimate Std. Error t value Pr(>|t|) (Intercept) 1.0889 6.2588 0.17 0.86 value 0.0570 0.0114 5.02 2.8e-06 *** capital 0.0415 0.0412 1.01 0.32 --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 10.567 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 1898.249 MSE: 111.662 Root MSE: 10.567 Multiple R-Squared: 0.726 Adjusted R-Squared: 0.694 systemfit results method: SUR N DF SSR detRCov OLS-R2 McElroy-R2 system 100 85 347048 6.18e+13 0.844 0.869 N DF SSR MSE RMSE R2 Adj R2 Chrysler 20 17 3057 180 13.4 0.912 0.901 General.Electric 20 17 14009 824 28.7 0.688 0.651 General.Motors 20 17 144321 8489 92.1 0.921 0.911 US.Steel 20 17 183763 10810 104.0 0.422 0.354 Westinghouse 20 17 1898 112 10.6 0.726 0.694 The covariance matrix of the residuals used for estimation Chrysler General.Electric General.Motors US.Steel Westinghouse Chrysler 149.9 -21.4 -283 418 13.3 General.Electric -21.4 660.8 608 905 176.4 General.Motors -282.8 607.5 7160 -2222 126.2 US.Steel 418.1 905.0 -2222 8896 546.2 Westinghouse 13.3 176.4 126 546 88.7 The covariance matrix of the residuals Chrysler General.Electric General.Motors US.Steel Westinghouse Chrysler 152.85 2.05 -314 455 16.7 General.Electric 2.05 700.46 605 1224 200.3 General.Motors -313.70 605.34 7216 -2687 129.9 US.Steel 455.09 1224.41 -2687 9188 652.7 Westinghouse 16.66 200.32 130 653 94.9 The correlations of the residuals Chrysler General.Electric General.Motors US.Steel Westinghouse Chrysler 1.00000 0.00626 -0.299 0.384 0.138 General.Electric 0.00626 1.00000 0.269 0.483 0.777 General.Motors -0.29870 0.26925 1.000 -0.330 0.157 US.Steel 0.38402 0.48264 -0.330 1.000 0.699 Westinghouse 0.13832 0.77690 0.157 0.699 1.000 Coefficients: Estimate Std. Error t value Pr(>|t|) Chrysler_(Intercept) 0.5043 11.5128 0.04 0.96557 Chrysler_value 0.0695 0.0169 4.12 0.00072 *** Chrysler_capital 0.3085 0.0259 11.93 1.1e-09 *** General.Electric_(Intercept) -22.4389 25.5186 -0.88 0.39149 General.Electric_value 0.0373 0.0123 3.04 0.00738 ** General.Electric_capital 0.1308 0.0220 5.93 1.6e-05 *** General.Motors_(Intercept) -162.3641 89.4592 -1.81 0.08722 . General.Motors_value 0.1205 0.0216 5.57 3.4e-05 *** General.Motors_capital 0.3827 0.0328 11.68 1.5e-09 *** US.Steel_(Intercept) 85.4233 111.8774 0.76 0.45561 US.Steel_value 0.1015 0.0548 1.85 0.08142 . US.Steel_capital 0.4000 0.1278 3.13 0.00610 ** Westinghouse_(Intercept) 1.0889 6.2588 0.17 0.86394 Westinghouse_value 0.0570 0.0114 5.02 0.00011 *** Westinghouse_capital 0.0415 0.0412 1.01 0.32787 --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Chrysler_(Intercept) Chrysler_value 0.5043 0.0695 Chrysler_capital General.Electric_(Intercept) 0.3085 -22.4389 General.Electric_value General.Electric_capital 0.0373 0.1308 General.Motors_(Intercept) General.Motors_value -162.3641 0.1205 General.Motors_capital US.Steel_(Intercept) 0.3827 85.4233 US.Steel_value US.Steel_capital 0.1015 0.4000 Westinghouse_(Intercept) Westinghouse_value 1.0889 0.0570 Westinghouse_capital 0.0415 Estimate Std. Error t value Pr(>|t|) Chrysler_(Intercept) 0.5043 11.5128 0.0438 9.66e-01 Chrysler_value 0.0695 0.0169 4.1157 7.22e-04 Chrysler_capital 0.3085 0.0259 11.9297 1.10e-09 General.Electric_(Intercept) -22.4389 25.5186 -0.8793 3.91e-01 General.Electric_value 0.0373 0.0123 3.0409 7.38e-03 General.Electric_capital 0.1308 0.0220 5.9313 1.64e-05 General.Motors_(Intercept) -162.3641 89.4592 -1.8150 8.72e-02 General.Motors_value 0.1205 0.0216 5.5709 3.38e-05 General.Motors_capital 0.3827 0.0328 11.6805 1.52e-09 US.Steel_(Intercept) 85.4233 111.8774 0.7635 4.56e-01 US.Steel_value 0.1015 0.0548 1.8523 8.14e-02 US.Steel_capital 0.4000 0.1278 3.1300 6.10e-03 Westinghouse_(Intercept) 1.0889 6.2588 0.1740 8.64e-01 Westinghouse_value 0.0570 0.0114 5.0174 1.06e-04 Westinghouse_capital 0.0415 0.0412 1.0074 3.28e-01 Chrysler_(Intercept) Chrysler_value Chrysler_(Intercept) 1.33e+02 -1.82e-01 Chrysler_value -1.82e-01 2.86e-04 Chrysler_capital 9.57e-03 -1.31e-04 General.Electric_(Intercept) -2.94e+01 3.74e-02 General.Electric_value 1.28e-02 -1.86e-05 General.Electric_capital 8.80e-03 -2.96e-06 General.Motors_(Intercept) -1.56e+02 1.91e-01 General.Motors_value 3.28e-02 -4.91e-05 General.Motors_capital -8.18e-04 3.42e-05 US.Steel_(Intercept) 1.80e+02 -1.87e-01 US.Steel_value -7.46e-02 1.13e-04 US.Steel_capital -4.03e-02 -1.22e-04 Westinghouse_(Intercept) -3.04e-01 3.03e-03 Westinghouse_value 1.14e-03 -3.70e-06 Westinghouse_capital 2.42e-03 -6.41e-06 Chrysler_capital General.Electric_(Intercept) Chrysler_(Intercept) 9.57e-03 -29.3642 Chrysler_value -1.31e-04 0.0374 Chrysler_capital 6.69e-04 0.0198 General.Electric_(Intercept) 1.98e-02 651.1982 General.Electric_value 1.28e-06 -0.2851 General.Electric_capital -5.56e-05 -0.1615 General.Motors_(Intercept) 7.79e-02 571.3402 General.Motors_value 1.03e-05 -0.1196 General.Motors_capital -1.89e-04 -0.0352 US.Steel_(Intercept) -2.45e-01 644.2920 US.Steel_value -3.26e-05 -0.2201 US.Steel_capital 1.03e-03 -0.5505 Westinghouse_(Intercept) -9.35e-03 102.8679 Westinghouse_value 1.18e-05 -0.1700 Westinghouse_capital 1.67e-05 0.2338 General.Electric_value General.Electric_capital Chrysler_(Intercept) 1.28e-02 8.80e-03 Chrysler_value -1.86e-05 -2.96e-06 Chrysler_capital 1.28e-06 -5.56e-05 General.Electric_(Intercept) -2.85e-01 -1.61e-01 General.Electric_value 1.50e-04 -1.70e-05 General.Electric_capital -1.70e-05 4.86e-04 General.Motors_(Intercept) -2.61e-01 -8.74e-02 General.Motors_value 6.35e-05 -9.49e-06 General.Motors_capital -2.27e-05 1.98e-04 US.Steel_(Intercept) -3.04e-01 -2.30e-02 US.Steel_value 1.35e-04 -1.07e-04 US.Steel_capital 1.23e-04 7.77e-04 Westinghouse_(Intercept) -4.02e-02 -4.02e-02 Westinghouse_value 8.74e-05 1.04e-06 Westinghouse_capital -2.16e-04 4.61e-04 General.Motors_(Intercept) General.Motors_value Chrysler_(Intercept) -1.56e+02 3.28e-02 Chrysler_value 1.91e-01 -4.91e-05 Chrysler_capital 7.79e-02 1.03e-05 General.Electric_(Intercept) 5.71e+02 -1.20e-01 General.Electric_value -2.61e-01 6.35e-05 General.Electric_capital -8.74e-02 -9.49e-06 General.Motors_(Intercept) 8.00e+03 -1.84e+00 General.Motors_value -1.84e+00 4.68e-04 General.Motors_capital 5.32e-01 -2.83e-04 US.Steel_(Intercept) -1.75e+03 3.73e-01 US.Steel_value 8.02e-01 -2.06e-04 US.Steel_capital 2.01e-01 1.09e-04 Westinghouse_(Intercept) 1.10e+02 -2.33e-02 Westinghouse_value -2.06e-01 5.10e-05 Westinghouse_capital 3.98e-01 -1.28e-04 General.Motors_capital US.Steel_(Intercept) Chrysler_(Intercept) -8.18e-04 1.80e+02 Chrysler_value 3.42e-05 -1.87e-01 Chrysler_capital -1.89e-04 -2.45e-01 General.Electric_(Intercept) -3.52e-02 6.44e+02 General.Electric_value -2.27e-05 -3.04e-01 General.Electric_capital 1.98e-04 -2.30e-02 General.Motors_(Intercept) 5.32e-01 -1.75e+03 General.Motors_value -2.83e-04 3.73e-01 General.Motors_capital 1.07e-03 3.74e-02 US.Steel_(Intercept) 3.74e-02 1.25e+04 US.Steel_value 1.39e-04 -5.65e+00 US.Steel_capital -1.04e-03 -3.12e+00 Westinghouse_(Intercept) -4.87e-03 2.74e+02 Westinghouse_value -2.38e-05 -5.09e-01 Westinghouse_capital 2.43e-04 1.10e+00 US.Steel_value US.Steel_capital Chrysler_(Intercept) -7.46e-02 -0.040281 Chrysler_value 1.13e-04 -0.000122 Chrysler_capital -3.26e-05 0.001031 General.Electric_(Intercept) -2.20e-01 -0.550482 General.Electric_value 1.35e-04 0.000123 General.Electric_capital -1.07e-04 0.000777 General.Motors_(Intercept) 8.02e-01 0.200945 General.Motors_value -2.06e-04 0.000109 General.Motors_capital 1.39e-04 -0.001036 US.Steel_(Intercept) -5.65e+00 -3.119830 US.Steel_value 3.00e-03 -0.000901 US.Steel_capital -9.01e-04 0.016331 Westinghouse_(Intercept) -8.35e-02 -0.275101 Westinghouse_value 2.23e-04 0.000229 Westinghouse_capital -7.74e-04 0.001422 Westinghouse_(Intercept) Westinghouse_value Chrysler_(Intercept) -0.30387 1.14e-03 Chrysler_value 0.00303 -3.70e-06 Chrysler_capital -0.00935 1.18e-05 General.Electric_(Intercept) 102.86790 -1.70e-01 General.Electric_value -0.04016 8.74e-05 General.Electric_capital -0.04021 1.04e-06 General.Motors_(Intercept) 110.26166 -2.06e-01 General.Motors_value -0.02326 5.10e-05 General.Motors_capital -0.00487 -2.38e-05 US.Steel_(Intercept) 274.40848 -5.09e-01 US.Steel_value -0.08348 2.23e-04 US.Steel_capital -0.27510 2.29e-04 Westinghouse_(Intercept) 39.17263 -5.99e-02 Westinghouse_value -0.05992 1.29e-04 Westinghouse_capital 0.06376 -3.12e-04 Westinghouse_capital Chrysler_(Intercept) 2.42e-03 Chrysler_value -6.41e-06 Chrysler_capital 1.67e-05 General.Electric_(Intercept) 2.34e-01 General.Electric_value -2.16e-04 General.Electric_capital 4.61e-04 General.Motors_(Intercept) 3.98e-01 General.Motors_value -1.28e-04 General.Motors_capital 2.43e-04 US.Steel_(Intercept) 1.10e+00 US.Steel_value -7.74e-04 US.Steel_capital 1.42e-03 Westinghouse_(Intercept) 6.38e-02 Westinghouse_value -3.12e-04 Westinghouse_capital 1.70e-03 Chrysler General.Electric General.Motors US.Steel Westinghouse X1935 7.511 -0.905 107.95 -35.3 0.849 X1936 10.843 -21.387 -27.67 66.3 -4.639 X1937 -6.422 -20.333 -136.20 65.7 -7.906 X1938 4.659 -29.453 3.55 -110.1 -10.898 X1939 -15.204 -36.171 -104.40 -178.7 -12.863 X1940 -2.413 -7.078 -15.30 -149.0 -9.449 X1941 -0.116 38.153 28.30 41.3 15.299 X1942 -4.311 17.481 103.23 20.6 7.734 X1943 -14.728 -23.336 72.44 -46.0 -2.758 X1944 -8.172 -25.700 105.03 -92.9 -2.792 X1945 12.566 -0.629 38.84 -100.0 -7.681 X1946 -14.709 54.737 106.00 32.0 5.446 X1947 -7.958 48.169 14.88 46.8 16.715 X1948 6.548 37.841 -53.65 121.3 5.293 X1949 -8.057 -13.518 -118.82 10.1 -8.216 X1950 1.571 -28.788 -67.90 20.0 -10.735 X1951 41.064 1.996 -126.32 133.6 6.645 X1952 4.273 7.222 -87.37 163.0 15.390 X1953 -2.011 8.833 34.43 100.0 13.695 X1954 -4.934 -7.135 122.97 -108.7 -9.129 2.5 % 97.5 % Chrysler_(Intercept) -23.786 24.794 Chrysler_value 0.034 0.105 Chrysler_capital 0.254 0.363 General.Electric_(Intercept) -76.278 31.401 General.Electric_value 0.011 0.063 General.Electric_capital 0.084 0.177 General.Motors_(Intercept) -351.107 26.378 General.Motors_value 0.075 0.166 General.Motors_capital 0.314 0.452 US.Steel_(Intercept) -150.617 321.464 US.Steel_value -0.014 0.217 US.Steel_capital 0.130 0.670 Westinghouse_(Intercept) -12.116 14.294 Westinghouse_value 0.033 0.081 Westinghouse_capital -0.045 0.128 Chrysler General.Electric General.Motors US.Steel Westinghouse X1935 32.8 34.0 210 245 12.1 X1936 61.9 66.4 419 289 30.5 X1937 72.7 97.5 547 404 43.0 X1938 46.9 74.1 254 372 33.8 X1939 67.6 84.3 435 409 31.7 X1940 71.8 81.5 476 411 38.0 X1941 68.5 74.8 484 432 33.2 X1942 51.1 74.4 345 425 35.6 X1943 62.1 84.6 427 408 39.8 X1944 67.7 82.5 442 381 40.6 X1945 76.2 94.2 522 359 47.0 X1946 88.8 105.2 582 388 48.0 X1947 70.6 99.0 554 374 38.8 X1948 82.8 108.5 583 373 44.3 X1949 87.0 111.8 674 395 40.3 X1950 99.1 122.3 711 399 43.0 X1951 119.6 133.2 882 455 47.7 X1952 140.7 150.1 979 482 56.4 X1953 176.9 170.7 1270 541 76.4 X1954 177.4 196.7 1364 568 77.7 'log Lik.' -459 (df=30) 'log Lik.' -483 (df=30) [1] 100 Chrysler_invest Chrysler_value Chrysler_capital General.Electric_invest X1935 40.3 418 10.5 33.1 X1936 72.8 838 10.2 45.0 X1937 66.3 884 34.7 77.2 X1938 51.6 438 51.8 44.6 X1939 52.4 680 64.3 48.1 X1940 69.4 728 67.1 74.4 X1941 68.3 644 75.2 113.0 X1942 46.8 411 71.4 91.9 X1943 47.4 588 67.1 61.3 X1944 59.6 698 60.5 56.8 X1945 88.8 846 54.6 93.6 X1946 74.1 894 84.8 159.9 X1947 62.7 579 96.8 147.2 X1948 89.4 695 110.2 146.3 X1949 79.0 590 147.4 98.3 X1950 100.7 694 163.2 93.5 X1951 160.6 809 203.5 135.2 X1952 145.0 727 290.6 157.3 X1953 174.9 1002 346.1 179.5 X1954 172.5 703 414.9 189.6 General.Electric_value General.Electric_capital General.Motors_invest X1935 1171 97.8 318 X1936 2016 104.4 392 X1937 2803 118.0 411 X1938 2040 156.2 258 X1939 2256 172.6 331 X1940 2132 186.6 461 X1941 1834 220.9 512 X1942 1588 287.8 448 X1943 1749 319.9 500 X1944 1687 321.3 548 X1945 2008 319.6 561 X1946 2208 346.0 688 X1947 1657 456.4 569 X1948 1604 543.4 529 X1949 1432 618.3 555 X1950 1610 647.4 643 X1951 1819 671.3 756 X1952 2080 726.1 891 X1953 2372 800.3 1304 X1954 2760 888.9 1487 General.Motors_value General.Motors_capital US.Steel_invest X1935 3078 2.8 210 X1936 4662 52.6 355 X1937 5387 156.9 470 X1938 2792 209.2 262 X1939 4313 203.4 230 X1940 4644 207.2 262 X1941 4551 255.2 473 X1942 3244 303.7 446 X1943 4054 264.1 362 X1944 4379 201.6 288 X1945 4841 265.0 259 X1946 4901 402.2 420 X1947 3526 761.5 420 X1948 3255 922.4 494 X1949 3700 1020.1 405 X1950 3756 1099.0 419 X1951 4833 1207.7 588 X1952 4925 1430.5 645 X1953 6242 1777.3 641 X1954 5594 2226.3 459 US.Steel_value US.Steel_capital Westinghouse_invest Westinghouse_value X1935 1362 53.8 12.9 192 X1936 1807 50.5 25.9 516 X1937 2676 118.1 35.0 729 X1938 1802 260.2 22.9 560 X1939 1957 312.7 18.8 520 X1940 2203 254.2 28.6 628 X1941 2380 261.4 48.5 537 X1942 2169 298.7 43.3 561 X1943 1985 301.8 37.0 617 X1944 1814 279.1 37.8 627 X1945 1850 213.8 39.3 737 X1946 2068 232.6 53.5 760 X1947 1797 264.8 55.6 581 X1948 1626 306.9 49.6 662 X1949 1667 351.1 32.0 584 X1950 1677 357.8 32.2 635 X1951 2290 342.1 54.4 724 X1952 2159 444.2 71.8 864 X1953 2031 623.6 90.1 1194 X1954 2116 669.7 68.6 1189 Westinghouse_capital X1935 1.8 X1936 0.8 X1937 7.4 X1938 18.1 X1939 23.5 X1940 26.5 X1941 36.2 X1942 60.8 X1943 84.4 X1944 91.2 X1945 92.4 X1946 86.0 X1947 111.1 X1948 130.6 X1949 141.8 X1950 136.7 X1951 129.7 X1952 145.5 X1953 174.8 X1954 213.5 Chrysler_(Intercept) Chrysler_value Chrysler_capital Chrysler_X1935 1 418 10.5 Chrysler_X1936 1 838 10.2 Chrysler_X1937 1 884 34.7 Chrysler_X1938 1 438 51.8 Chrysler_X1939 1 680 64.3 Chrysler_X1940 1 728 67.1 Chrysler_X1941 1 644 75.2 Chrysler_X1942 1 411 71.4 Chrysler_X1943 1 588 67.1 Chrysler_X1944 1 698 60.5 Chrysler_X1945 1 846 54.6 Chrysler_X1946 1 894 84.8 Chrysler_X1947 1 579 96.8 Chrysler_X1948 1 695 110.2 Chrysler_X1949 1 590 147.4 Chrysler_X1950 1 694 163.2 Chrysler_X1951 1 809 203.5 Chrysler_X1952 1 727 290.6 Chrysler_X1953 1 1002 346.1 Chrysler_X1954 1 703 414.9 General.Electric_X1935 0 0 0.0 General.Electric_X1936 0 0 0.0 General.Electric_X1937 0 0 0.0 General.Electric_X1938 0 0 0.0 General.Electric_X1939 0 0 0.0 General.Electric_X1940 0 0 0.0 General.Electric_X1941 0 0 0.0 General.Electric_X1942 0 0 0.0 General.Electric_X1943 0 0 0.0 General.Electric_X1944 0 0 0.0 General.Electric_X1945 0 0 0.0 General.Electric_X1946 0 0 0.0 General.Electric_X1947 0 0 0.0 General.Electric_X1948 0 0 0.0 General.Electric_X1949 0 0 0.0 General.Electric_X1950 0 0 0.0 General.Electric_X1951 0 0 0.0 General.Electric_X1952 0 0 0.0 General.Electric_X1953 0 0 0.0 General.Electric_X1954 0 0 0.0 General.Motors_X1935 0 0 0.0 General.Motors_X1936 0 0 0.0 General.Motors_X1937 0 0 0.0 General.Motors_X1938 0 0 0.0 General.Motors_X1939 0 0 0.0 General.Motors_X1940 0 0 0.0 General.Motors_X1941 0 0 0.0 General.Motors_X1942 0 0 0.0 General.Motors_X1943 0 0 0.0 General.Motors_X1944 0 0 0.0 General.Motors_X1945 0 0 0.0 General.Motors_X1946 0 0 0.0 General.Motors_X1947 0 0 0.0 General.Motors_X1948 0 0 0.0 General.Motors_X1949 0 0 0.0 General.Motors_X1950 0 0 0.0 General.Motors_X1951 0 0 0.0 General.Motors_X1952 0 0 0.0 General.Motors_X1953 0 0 0.0 General.Motors_X1954 0 0 0.0 US.Steel_X1935 0 0 0.0 US.Steel_X1936 0 0 0.0 US.Steel_X1937 0 0 0.0 US.Steel_X1938 0 0 0.0 US.Steel_X1939 0 0 0.0 US.Steel_X1940 0 0 0.0 US.Steel_X1941 0 0 0.0 US.Steel_X1942 0 0 0.0 US.Steel_X1943 0 0 0.0 US.Steel_X1944 0 0 0.0 US.Steel_X1945 0 0 0.0 US.Steel_X1946 0 0 0.0 US.Steel_X1947 0 0 0.0 US.Steel_X1948 0 0 0.0 US.Steel_X1949 0 0 0.0 US.Steel_X1950 0 0 0.0 US.Steel_X1951 0 0 0.0 US.Steel_X1952 0 0 0.0 US.Steel_X1953 0 0 0.0 US.Steel_X1954 0 0 0.0 Westinghouse_X1935 0 0 0.0 Westinghouse_X1936 0 0 0.0 Westinghouse_X1937 0 0 0.0 Westinghouse_X1938 0 0 0.0 Westinghouse_X1939 0 0 0.0 Westinghouse_X1940 0 0 0.0 Westinghouse_X1941 0 0 0.0 Westinghouse_X1942 0 0 0.0 Westinghouse_X1943 0 0 0.0 Westinghouse_X1944 0 0 0.0 Westinghouse_X1945 0 0 0.0 Westinghouse_X1946 0 0 0.0 Westinghouse_X1947 0 0 0.0 Westinghouse_X1948 0 0 0.0 Westinghouse_X1949 0 0 0.0 Westinghouse_X1950 0 0 0.0 Westinghouse_X1951 0 0 0.0 Westinghouse_X1952 0 0 0.0 Westinghouse_X1953 0 0 0.0 Westinghouse_X1954 0 0 0.0 General.Electric_(Intercept) General.Electric_value Chrysler_X1935 0 0 Chrysler_X1936 0 0 Chrysler_X1937 0 0 Chrysler_X1938 0 0 Chrysler_X1939 0 0 Chrysler_X1940 0 0 Chrysler_X1941 0 0 Chrysler_X1942 0 0 Chrysler_X1943 0 0 Chrysler_X1944 0 0 Chrysler_X1945 0 0 Chrysler_X1946 0 0 Chrysler_X1947 0 0 Chrysler_X1948 0 0 Chrysler_X1949 0 0 Chrysler_X1950 0 0 Chrysler_X1951 0 0 Chrysler_X1952 0 0 Chrysler_X1953 0 0 Chrysler_X1954 0 0 General.Electric_X1935 1 1171 General.Electric_X1936 1 2016 General.Electric_X1937 1 2803 General.Electric_X1938 1 2040 General.Electric_X1939 1 2256 General.Electric_X1940 1 2132 General.Electric_X1941 1 1834 General.Electric_X1942 1 1588 General.Electric_X1943 1 1749 General.Electric_X1944 1 1687 General.Electric_X1945 1 2008 General.Electric_X1946 1 2208 General.Electric_X1947 1 1657 General.Electric_X1948 1 1604 General.Electric_X1949 1 1432 General.Electric_X1950 1 1610 General.Electric_X1951 1 1819 General.Electric_X1952 1 2080 General.Electric_X1953 1 2372 General.Electric_X1954 1 2760 General.Motors_X1935 0 0 General.Motors_X1936 0 0 General.Motors_X1937 0 0 General.Motors_X1938 0 0 General.Motors_X1939 0 0 General.Motors_X1940 0 0 General.Motors_X1941 0 0 General.Motors_X1942 0 0 General.Motors_X1943 0 0 General.Motors_X1944 0 0 General.Motors_X1945 0 0 General.Motors_X1946 0 0 General.Motors_X1947 0 0 General.Motors_X1948 0 0 General.Motors_X1949 0 0 General.Motors_X1950 0 0 General.Motors_X1951 0 0 General.Motors_X1952 0 0 General.Motors_X1953 0 0 General.Motors_X1954 0 0 US.Steel_X1935 0 0 US.Steel_X1936 0 0 US.Steel_X1937 0 0 US.Steel_X1938 0 0 US.Steel_X1939 0 0 US.Steel_X1940 0 0 US.Steel_X1941 0 0 US.Steel_X1942 0 0 US.Steel_X1943 0 0 US.Steel_X1944 0 0 US.Steel_X1945 0 0 US.Steel_X1946 0 0 US.Steel_X1947 0 0 US.Steel_X1948 0 0 US.Steel_X1949 0 0 US.Steel_X1950 0 0 US.Steel_X1951 0 0 US.Steel_X1952 0 0 US.Steel_X1953 0 0 US.Steel_X1954 0 0 Westinghouse_X1935 0 0 Westinghouse_X1936 0 0 Westinghouse_X1937 0 0 Westinghouse_X1938 0 0 Westinghouse_X1939 0 0 Westinghouse_X1940 0 0 Westinghouse_X1941 0 0 Westinghouse_X1942 0 0 Westinghouse_X1943 0 0 Westinghouse_X1944 0 0 Westinghouse_X1945 0 0 Westinghouse_X1946 0 0 Westinghouse_X1947 0 0 Westinghouse_X1948 0 0 Westinghouse_X1949 0 0 Westinghouse_X1950 0 0 Westinghouse_X1951 0 0 Westinghouse_X1952 0 0 Westinghouse_X1953 0 0 Westinghouse_X1954 0 0 General.Electric_capital General.Motors_(Intercept) Chrysler_X1935 0.0 0 Chrysler_X1936 0.0 0 Chrysler_X1937 0.0 0 Chrysler_X1938 0.0 0 Chrysler_X1939 0.0 0 Chrysler_X1940 0.0 0 Chrysler_X1941 0.0 0 Chrysler_X1942 0.0 0 Chrysler_X1943 0.0 0 Chrysler_X1944 0.0 0 Chrysler_X1945 0.0 0 Chrysler_X1946 0.0 0 Chrysler_X1947 0.0 0 Chrysler_X1948 0.0 0 Chrysler_X1949 0.0 0 Chrysler_X1950 0.0 0 Chrysler_X1951 0.0 0 Chrysler_X1952 0.0 0 Chrysler_X1953 0.0 0 Chrysler_X1954 0.0 0 General.Electric_X1935 97.8 0 General.Electric_X1936 104.4 0 General.Electric_X1937 118.0 0 General.Electric_X1938 156.2 0 General.Electric_X1939 172.6 0 General.Electric_X1940 186.6 0 General.Electric_X1941 220.9 0 General.Electric_X1942 287.8 0 General.Electric_X1943 319.9 0 General.Electric_X1944 321.3 0 General.Electric_X1945 319.6 0 General.Electric_X1946 346.0 0 General.Electric_X1947 456.4 0 General.Electric_X1948 543.4 0 General.Electric_X1949 618.3 0 General.Electric_X1950 647.4 0 General.Electric_X1951 671.3 0 General.Electric_X1952 726.1 0 General.Electric_X1953 800.3 0 General.Electric_X1954 888.9 0 General.Motors_X1935 0.0 1 General.Motors_X1936 0.0 1 General.Motors_X1937 0.0 1 General.Motors_X1938 0.0 1 General.Motors_X1939 0.0 1 General.Motors_X1940 0.0 1 General.Motors_X1941 0.0 1 General.Motors_X1942 0.0 1 General.Motors_X1943 0.0 1 General.Motors_X1944 0.0 1 General.Motors_X1945 0.0 1 General.Motors_X1946 0.0 1 General.Motors_X1947 0.0 1 General.Motors_X1948 0.0 1 General.Motors_X1949 0.0 1 General.Motors_X1950 0.0 1 General.Motors_X1951 0.0 1 General.Motors_X1952 0.0 1 General.Motors_X1953 0.0 1 General.Motors_X1954 0.0 1 US.Steel_X1935 0.0 0 US.Steel_X1936 0.0 0 US.Steel_X1937 0.0 0 US.Steel_X1938 0.0 0 US.Steel_X1939 0.0 0 US.Steel_X1940 0.0 0 US.Steel_X1941 0.0 0 US.Steel_X1942 0.0 0 US.Steel_X1943 0.0 0 US.Steel_X1944 0.0 0 US.Steel_X1945 0.0 0 US.Steel_X1946 0.0 0 US.Steel_X1947 0.0 0 US.Steel_X1948 0.0 0 US.Steel_X1949 0.0 0 US.Steel_X1950 0.0 0 US.Steel_X1951 0.0 0 US.Steel_X1952 0.0 0 US.Steel_X1953 0.0 0 US.Steel_X1954 0.0 0 Westinghouse_X1935 0.0 0 Westinghouse_X1936 0.0 0 Westinghouse_X1937 0.0 0 Westinghouse_X1938 0.0 0 Westinghouse_X1939 0.0 0 Westinghouse_X1940 0.0 0 Westinghouse_X1941 0.0 0 Westinghouse_X1942 0.0 0 Westinghouse_X1943 0.0 0 Westinghouse_X1944 0.0 0 Westinghouse_X1945 0.0 0 Westinghouse_X1946 0.0 0 Westinghouse_X1947 0.0 0 Westinghouse_X1948 0.0 0 Westinghouse_X1949 0.0 0 Westinghouse_X1950 0.0 0 Westinghouse_X1951 0.0 0 Westinghouse_X1952 0.0 0 Westinghouse_X1953 0.0 0 Westinghouse_X1954 0.0 0 General.Motors_value General.Motors_capital Chrysler_X1935 0 0.0 Chrysler_X1936 0 0.0 Chrysler_X1937 0 0.0 Chrysler_X1938 0 0.0 Chrysler_X1939 0 0.0 Chrysler_X1940 0 0.0 Chrysler_X1941 0 0.0 Chrysler_X1942 0 0.0 Chrysler_X1943 0 0.0 Chrysler_X1944 0 0.0 Chrysler_X1945 0 0.0 Chrysler_X1946 0 0.0 Chrysler_X1947 0 0.0 Chrysler_X1948 0 0.0 Chrysler_X1949 0 0.0 Chrysler_X1950 0 0.0 Chrysler_X1951 0 0.0 Chrysler_X1952 0 0.0 Chrysler_X1953 0 0.0 Chrysler_X1954 0 0.0 General.Electric_X1935 0 0.0 General.Electric_X1936 0 0.0 General.Electric_X1937 0 0.0 General.Electric_X1938 0 0.0 General.Electric_X1939 0 0.0 General.Electric_X1940 0 0.0 General.Electric_X1941 0 0.0 General.Electric_X1942 0 0.0 General.Electric_X1943 0 0.0 General.Electric_X1944 0 0.0 General.Electric_X1945 0 0.0 General.Electric_X1946 0 0.0 General.Electric_X1947 0 0.0 General.Electric_X1948 0 0.0 General.Electric_X1949 0 0.0 General.Electric_X1950 0 0.0 General.Electric_X1951 0 0.0 General.Electric_X1952 0 0.0 General.Electric_X1953 0 0.0 General.Electric_X1954 0 0.0 General.Motors_X1935 3078 2.8 General.Motors_X1936 4662 52.6 General.Motors_X1937 5387 156.9 General.Motors_X1938 2792 209.2 General.Motors_X1939 4313 203.4 General.Motors_X1940 4644 207.2 General.Motors_X1941 4551 255.2 General.Motors_X1942 3244 303.7 General.Motors_X1943 4054 264.1 General.Motors_X1944 4379 201.6 General.Motors_X1945 4841 265.0 General.Motors_X1946 4901 402.2 General.Motors_X1947 3526 761.5 General.Motors_X1948 3255 922.4 General.Motors_X1949 3700 1020.1 General.Motors_X1950 3756 1099.0 General.Motors_X1951 4833 1207.7 General.Motors_X1952 4925 1430.5 General.Motors_X1953 6242 1777.3 General.Motors_X1954 5594 2226.3 US.Steel_X1935 0 0.0 US.Steel_X1936 0 0.0 US.Steel_X1937 0 0.0 US.Steel_X1938 0 0.0 US.Steel_X1939 0 0.0 US.Steel_X1940 0 0.0 US.Steel_X1941 0 0.0 US.Steel_X1942 0 0.0 US.Steel_X1943 0 0.0 US.Steel_X1944 0 0.0 US.Steel_X1945 0 0.0 US.Steel_X1946 0 0.0 US.Steel_X1947 0 0.0 US.Steel_X1948 0 0.0 US.Steel_X1949 0 0.0 US.Steel_X1950 0 0.0 US.Steel_X1951 0 0.0 US.Steel_X1952 0 0.0 US.Steel_X1953 0 0.0 US.Steel_X1954 0 0.0 Westinghouse_X1935 0 0.0 Westinghouse_X1936 0 0.0 Westinghouse_X1937 0 0.0 Westinghouse_X1938 0 0.0 Westinghouse_X1939 0 0.0 Westinghouse_X1940 0 0.0 Westinghouse_X1941 0 0.0 Westinghouse_X1942 0 0.0 Westinghouse_X1943 0 0.0 Westinghouse_X1944 0 0.0 Westinghouse_X1945 0 0.0 Westinghouse_X1946 0 0.0 Westinghouse_X1947 0 0.0 Westinghouse_X1948 0 0.0 Westinghouse_X1949 0 0.0 Westinghouse_X1950 0 0.0 Westinghouse_X1951 0 0.0 Westinghouse_X1952 0 0.0 Westinghouse_X1953 0 0.0 Westinghouse_X1954 0 0.0 US.Steel_(Intercept) US.Steel_value US.Steel_capital Chrysler_X1935 0 0 0.0 Chrysler_X1936 0 0 0.0 Chrysler_X1937 0 0 0.0 Chrysler_X1938 0 0 0.0 Chrysler_X1939 0 0 0.0 Chrysler_X1940 0 0 0.0 Chrysler_X1941 0 0 0.0 Chrysler_X1942 0 0 0.0 Chrysler_X1943 0 0 0.0 Chrysler_X1944 0 0 0.0 Chrysler_X1945 0 0 0.0 Chrysler_X1946 0 0 0.0 Chrysler_X1947 0 0 0.0 Chrysler_X1948 0 0 0.0 Chrysler_X1949 0 0 0.0 Chrysler_X1950 0 0 0.0 Chrysler_X1951 0 0 0.0 Chrysler_X1952 0 0 0.0 Chrysler_X1953 0 0 0.0 Chrysler_X1954 0 0 0.0 General.Electric_X1935 0 0 0.0 General.Electric_X1936 0 0 0.0 General.Electric_X1937 0 0 0.0 General.Electric_X1938 0 0 0.0 General.Electric_X1939 0 0 0.0 General.Electric_X1940 0 0 0.0 General.Electric_X1941 0 0 0.0 General.Electric_X1942 0 0 0.0 General.Electric_X1943 0 0 0.0 General.Electric_X1944 0 0 0.0 General.Electric_X1945 0 0 0.0 General.Electric_X1946 0 0 0.0 General.Electric_X1947 0 0 0.0 General.Electric_X1948 0 0 0.0 General.Electric_X1949 0 0 0.0 General.Electric_X1950 0 0 0.0 General.Electric_X1951 0 0 0.0 General.Electric_X1952 0 0 0.0 General.Electric_X1953 0 0 0.0 General.Electric_X1954 0 0 0.0 General.Motors_X1935 0 0 0.0 General.Motors_X1936 0 0 0.0 General.Motors_X1937 0 0 0.0 General.Motors_X1938 0 0 0.0 General.Motors_X1939 0 0 0.0 General.Motors_X1940 0 0 0.0 General.Motors_X1941 0 0 0.0 General.Motors_X1942 0 0 0.0 General.Motors_X1943 0 0 0.0 General.Motors_X1944 0 0 0.0 General.Motors_X1945 0 0 0.0 General.Motors_X1946 0 0 0.0 General.Motors_X1947 0 0 0.0 General.Motors_X1948 0 0 0.0 General.Motors_X1949 0 0 0.0 General.Motors_X1950 0 0 0.0 General.Motors_X1951 0 0 0.0 General.Motors_X1952 0 0 0.0 General.Motors_X1953 0 0 0.0 General.Motors_X1954 0 0 0.0 US.Steel_X1935 1 1362 53.8 US.Steel_X1936 1 1807 50.5 US.Steel_X1937 1 2676 118.1 US.Steel_X1938 1 1802 260.2 US.Steel_X1939 1 1957 312.7 US.Steel_X1940 1 2203 254.2 US.Steel_X1941 1 2380 261.4 US.Steel_X1942 1 2169 298.7 US.Steel_X1943 1 1985 301.8 US.Steel_X1944 1 1814 279.1 US.Steel_X1945 1 1850 213.8 US.Steel_X1946 1 2068 232.6 US.Steel_X1947 1 1797 264.8 US.Steel_X1948 1 1626 306.9 US.Steel_X1949 1 1667 351.1 US.Steel_X1950 1 1677 357.8 US.Steel_X1951 1 2290 342.1 US.Steel_X1952 1 2159 444.2 US.Steel_X1953 1 2031 623.6 US.Steel_X1954 1 2116 669.7 Westinghouse_X1935 0 0 0.0 Westinghouse_X1936 0 0 0.0 Westinghouse_X1937 0 0 0.0 Westinghouse_X1938 0 0 0.0 Westinghouse_X1939 0 0 0.0 Westinghouse_X1940 0 0 0.0 Westinghouse_X1941 0 0 0.0 Westinghouse_X1942 0 0 0.0 Westinghouse_X1943 0 0 0.0 Westinghouse_X1944 0 0 0.0 Westinghouse_X1945 0 0 0.0 Westinghouse_X1946 0 0 0.0 Westinghouse_X1947 0 0 0.0 Westinghouse_X1948 0 0 0.0 Westinghouse_X1949 0 0 0.0 Westinghouse_X1950 0 0 0.0 Westinghouse_X1951 0 0 0.0 Westinghouse_X1952 0 0 0.0 Westinghouse_X1953 0 0 0.0 Westinghouse_X1954 0 0 0.0 Westinghouse_(Intercept) Westinghouse_value Chrysler_X1935 0 0 Chrysler_X1936 0 0 Chrysler_X1937 0 0 Chrysler_X1938 0 0 Chrysler_X1939 0 0 Chrysler_X1940 0 0 Chrysler_X1941 0 0 Chrysler_X1942 0 0 Chrysler_X1943 0 0 Chrysler_X1944 0 0 Chrysler_X1945 0 0 Chrysler_X1946 0 0 Chrysler_X1947 0 0 Chrysler_X1948 0 0 Chrysler_X1949 0 0 Chrysler_X1950 0 0 Chrysler_X1951 0 0 Chrysler_X1952 0 0 Chrysler_X1953 0 0 Chrysler_X1954 0 0 General.Electric_X1935 0 0 General.Electric_X1936 0 0 General.Electric_X1937 0 0 General.Electric_X1938 0 0 General.Electric_X1939 0 0 General.Electric_X1940 0 0 General.Electric_X1941 0 0 General.Electric_X1942 0 0 General.Electric_X1943 0 0 General.Electric_X1944 0 0 General.Electric_X1945 0 0 General.Electric_X1946 0 0 General.Electric_X1947 0 0 General.Electric_X1948 0 0 General.Electric_X1949 0 0 General.Electric_X1950 0 0 General.Electric_X1951 0 0 General.Electric_X1952 0 0 General.Electric_X1953 0 0 General.Electric_X1954 0 0 General.Motors_X1935 0 0 General.Motors_X1936 0 0 General.Motors_X1937 0 0 General.Motors_X1938 0 0 General.Motors_X1939 0 0 General.Motors_X1940 0 0 General.Motors_X1941 0 0 General.Motors_X1942 0 0 General.Motors_X1943 0 0 General.Motors_X1944 0 0 General.Motors_X1945 0 0 General.Motors_X1946 0 0 General.Motors_X1947 0 0 General.Motors_X1948 0 0 General.Motors_X1949 0 0 General.Motors_X1950 0 0 General.Motors_X1951 0 0 General.Motors_X1952 0 0 General.Motors_X1953 0 0 General.Motors_X1954 0 0 US.Steel_X1935 0 0 US.Steel_X1936 0 0 US.Steel_X1937 0 0 US.Steel_X1938 0 0 US.Steel_X1939 0 0 US.Steel_X1940 0 0 US.Steel_X1941 0 0 US.Steel_X1942 0 0 US.Steel_X1943 0 0 US.Steel_X1944 0 0 US.Steel_X1945 0 0 US.Steel_X1946 0 0 US.Steel_X1947 0 0 US.Steel_X1948 0 0 US.Steel_X1949 0 0 US.Steel_X1950 0 0 US.Steel_X1951 0 0 US.Steel_X1952 0 0 US.Steel_X1953 0 0 US.Steel_X1954 0 0 Westinghouse_X1935 1 192 Westinghouse_X1936 1 516 Westinghouse_X1937 1 729 Westinghouse_X1938 1 560 Westinghouse_X1939 1 520 Westinghouse_X1940 1 628 Westinghouse_X1941 1 537 Westinghouse_X1942 1 561 Westinghouse_X1943 1 617 Westinghouse_X1944 1 627 Westinghouse_X1945 1 737 Westinghouse_X1946 1 760 Westinghouse_X1947 1 581 Westinghouse_X1948 1 662 Westinghouse_X1949 1 584 Westinghouse_X1950 1 635 Westinghouse_X1951 1 724 Westinghouse_X1952 1 864 Westinghouse_X1953 1 1194 Westinghouse_X1954 1 1189 Westinghouse_capital Chrysler_X1935 0.0 Chrysler_X1936 0.0 Chrysler_X1937 0.0 Chrysler_X1938 0.0 Chrysler_X1939 0.0 Chrysler_X1940 0.0 Chrysler_X1941 0.0 Chrysler_X1942 0.0 Chrysler_X1943 0.0 Chrysler_X1944 0.0 Chrysler_X1945 0.0 Chrysler_X1946 0.0 Chrysler_X1947 0.0 Chrysler_X1948 0.0 Chrysler_X1949 0.0 Chrysler_X1950 0.0 Chrysler_X1951 0.0 Chrysler_X1952 0.0 Chrysler_X1953 0.0 Chrysler_X1954 0.0 General.Electric_X1935 0.0 General.Electric_X1936 0.0 General.Electric_X1937 0.0 General.Electric_X1938 0.0 General.Electric_X1939 0.0 General.Electric_X1940 0.0 General.Electric_X1941 0.0 General.Electric_X1942 0.0 General.Electric_X1943 0.0 General.Electric_X1944 0.0 General.Electric_X1945 0.0 General.Electric_X1946 0.0 General.Electric_X1947 0.0 General.Electric_X1948 0.0 General.Electric_X1949 0.0 General.Electric_X1950 0.0 General.Electric_X1951 0.0 General.Electric_X1952 0.0 General.Electric_X1953 0.0 General.Electric_X1954 0.0 General.Motors_X1935 0.0 General.Motors_X1936 0.0 General.Motors_X1937 0.0 General.Motors_X1938 0.0 General.Motors_X1939 0.0 General.Motors_X1940 0.0 General.Motors_X1941 0.0 General.Motors_X1942 0.0 General.Motors_X1943 0.0 General.Motors_X1944 0.0 General.Motors_X1945 0.0 General.Motors_X1946 0.0 General.Motors_X1947 0.0 General.Motors_X1948 0.0 General.Motors_X1949 0.0 General.Motors_X1950 0.0 General.Motors_X1951 0.0 General.Motors_X1952 0.0 General.Motors_X1953 0.0 General.Motors_X1954 0.0 US.Steel_X1935 0.0 US.Steel_X1936 0.0 US.Steel_X1937 0.0 US.Steel_X1938 0.0 US.Steel_X1939 0.0 US.Steel_X1940 0.0 US.Steel_X1941 0.0 US.Steel_X1942 0.0 US.Steel_X1943 0.0 US.Steel_X1944 0.0 US.Steel_X1945 0.0 US.Steel_X1946 0.0 US.Steel_X1947 0.0 US.Steel_X1948 0.0 US.Steel_X1949 0.0 US.Steel_X1950 0.0 US.Steel_X1951 0.0 US.Steel_X1952 0.0 US.Steel_X1953 0.0 US.Steel_X1954 0.0 Westinghouse_X1935 1.8 Westinghouse_X1936 0.8 Westinghouse_X1937 7.4 Westinghouse_X1938 18.1 Westinghouse_X1939 23.5 Westinghouse_X1940 26.5 Westinghouse_X1941 36.2 Westinghouse_X1942 60.8 Westinghouse_X1943 84.4 Westinghouse_X1944 91.2 Westinghouse_X1945 92.4 Westinghouse_X1946 86.0 Westinghouse_X1947 111.1 Westinghouse_X1948 130.6 Westinghouse_X1949 141.8 Westinghouse_X1950 136.7 Westinghouse_X1951 129.7 Westinghouse_X1952 145.5 Westinghouse_X1953 174.8 Westinghouse_X1954 213.5 $Chrysler Chrysler_invest ~ Chrysler_value + Chrysler_capital $General.Electric General.Electric_invest ~ General.Electric_value + General.Electric_capital $General.Motors General.Motors_invest ~ General.Motors_value + General.Motors_capital $US.Steel US.Steel_invest ~ US.Steel_value + US.Steel_capital $Westinghouse Westinghouse_invest ~ Westinghouse_value + Westinghouse_capital Chrysler_invest ~ Chrysler_value + Chrysler_capital $Chrysler Chrysler_invest ~ Chrysler_value + Chrysler_capital attr(,"variables") list(Chrysler_invest, Chrysler_value, Chrysler_capital) attr(,"factors") Chrysler_value Chrysler_capital Chrysler_invest 0 0 Chrysler_value 1 0 Chrysler_capital 0 1 attr(,"term.labels") [1] "Chrysler_value" "Chrysler_capital" attr(,"order") [1] 1 1 attr(,"intercept") [1] 1 attr(,"response") [1] 1 attr(,".Environment") attr(,"predvars") list(Chrysler_invest, Chrysler_value, Chrysler_capital) attr(,"dataClasses") Chrysler_invest Chrysler_value Chrysler_capital "numeric" "numeric" "numeric" $General.Electric General.Electric_invest ~ General.Electric_value + General.Electric_capital attr(,"variables") list(General.Electric_invest, General.Electric_value, General.Electric_capital) attr(,"factors") General.Electric_value General.Electric_capital General.Electric_invest 0 0 General.Electric_value 1 0 General.Electric_capital 0 1 attr(,"term.labels") [1] "General.Electric_value" "General.Electric_capital" attr(,"order") [1] 1 1 attr(,"intercept") [1] 1 attr(,"response") [1] 1 attr(,".Environment") attr(,"predvars") list(General.Electric_invest, General.Electric_value, General.Electric_capital) attr(,"dataClasses") General.Electric_invest General.Electric_value General.Electric_capital "numeric" "numeric" "numeric" $General.Motors General.Motors_invest ~ General.Motors_value + General.Motors_capital attr(,"variables") list(General.Motors_invest, General.Motors_value, General.Motors_capital) attr(,"factors") General.Motors_value General.Motors_capital General.Motors_invest 0 0 General.Motors_value 1 0 General.Motors_capital 0 1 attr(,"term.labels") [1] "General.Motors_value" "General.Motors_capital" attr(,"order") [1] 1 1 attr(,"intercept") [1] 1 attr(,"response") [1] 1 attr(,".Environment") attr(,"predvars") list(General.Motors_invest, General.Motors_value, General.Motors_capital) attr(,"dataClasses") General.Motors_invest General.Motors_value General.Motors_capital "numeric" "numeric" "numeric" $US.Steel US.Steel_invest ~ US.Steel_value + US.Steel_capital attr(,"variables") list(US.Steel_invest, US.Steel_value, US.Steel_capital) attr(,"factors") US.Steel_value US.Steel_capital US.Steel_invest 0 0 US.Steel_value 1 0 US.Steel_capital 0 1 attr(,"term.labels") [1] "US.Steel_value" "US.Steel_capital" attr(,"order") [1] 1 1 attr(,"intercept") [1] 1 attr(,"response") [1] 1 attr(,".Environment") attr(,"predvars") list(US.Steel_invest, US.Steel_value, US.Steel_capital) attr(,"dataClasses") US.Steel_invest US.Steel_value US.Steel_capital "numeric" "numeric" "numeric" $Westinghouse Westinghouse_invest ~ Westinghouse_value + Westinghouse_capital attr(,"variables") list(Westinghouse_invest, Westinghouse_value, Westinghouse_capital) attr(,"factors") Westinghouse_value Westinghouse_capital Westinghouse_invest 0 0 Westinghouse_value 1 0 Westinghouse_capital 0 1 attr(,"term.labels") [1] "Westinghouse_value" "Westinghouse_capital" attr(,"order") [1] 1 1 attr(,"intercept") [1] 1 attr(,"response") [1] 1 attr(,".Environment") attr(,"predvars") list(Westinghouse_invest, Westinghouse_value, Westinghouse_capital) attr(,"dataClasses") Westinghouse_invest Westinghouse_value Westinghouse_capital "numeric" "numeric" "numeric" Chrysler_invest ~ Chrysler_value + Chrysler_capital attr(,"variables") list(Chrysler_invest, Chrysler_value, Chrysler_capital) attr(,"factors") Chrysler_value Chrysler_capital Chrysler_invest 0 0 Chrysler_value 1 0 Chrysler_capital 0 1 attr(,"term.labels") [1] "Chrysler_value" "Chrysler_capital" attr(,"order") [1] 1 1 attr(,"intercept") [1] 1 attr(,"response") [1] 1 attr(,".Environment") attr(,"predvars") list(Chrysler_invest, Chrysler_value, Chrysler_capital) attr(,"dataClasses") Chrysler_invest Chrysler_value Chrysler_capital "numeric" "numeric" "numeric" > > # SUR Pooled > if(requireNamespace( 'plm', quietly = TRUE ) ) { + greeneSurPooled <- systemfit( formulaGrunfeld, "SUR", + data = GrunfeldGreene, pooled = TRUE, methodResidCov = "noDfCor", + residCovWeighted = TRUE, useMatrix = useMatrix ) + print( greeneSurPooled ) + print( summary( greeneSurPooled ) ) + print( summary( greeneSurPooled, useDfSys = FALSE, equations = FALSE ) ) + print( summary( greeneSurPooled, residCov = FALSE, equations = FALSE ) ) + print( coef( greeneSurPooled ) ) + print( coef( greeneSurPooled, modified.regMat = TRUE ) ) + print( coef( summary( greeneSurPooled ) ) ) + print( coef( summary( greeneSurPooled ), modified.regMat = TRUE ) ) + print( vcov( greeneSurPooled ) ) + print( vcov( greeneSurPooled, modified.regMat = TRUE ) ) + print( residuals( greeneSurPooled ) ) + print( confint( greeneSurPooled ) ) + print( fitted( greeneSurPooled ) ) + print( logLik( greeneSurPooled ) ) + print( logLik( greeneSurPooled, residCovDiag = TRUE ) ) + print( nobs( greeneSurPooled ) ) + print( model.frame( greeneSurPooled ) ) + print( model.matrix( greeneSurPooled ) ) + print( formula( greeneSurPooled ) ) + print( formula( greeneSurPooled$eq[[ 1 ]] ) ) + print( terms( greeneSurPooled ) ) + print( terms( greeneSurPooled$eq[[ 1 ]] ) ) + } systemfit results method: SUR Coefficients: Chrysler_(Intercept) Chrysler_value -28.2467 0.0891 Chrysler_capital General.Electric_(Intercept) 0.3340 -28.2467 General.Electric_value General.Electric_capital 0.0891 0.3340 General.Motors_(Intercept) General.Motors_value -28.2467 0.0891 General.Motors_capital US.Steel_(Intercept) 0.3340 -28.2467 US.Steel_value US.Steel_capital 0.0891 0.3340 Westinghouse_(Intercept) Westinghouse_value -28.2467 0.0891 Westinghouse_capital 0.3340 systemfit results method: SUR N DF SSR detRCov OLS-R2 McElroy-R2 system 100 97 1604301 9.95e+16 0.279 0.844 N DF SSR MSE RMSE R2 Adj R2 Chrysler 20 17 6112 360 19.0 0.824 0.803 General.Electric 20 17 691132 40655 201.6 -14.410 -16.223 General.Motors 20 17 201010 11824 108.7 0.890 0.877 US.Steel 20 17 689380 40552 201.4 -1.168 -1.424 Westinghouse 20 17 16667 980 31.3 -1.402 -1.685 The covariance matrix of the residuals used for estimation Chrysler General.Electric General.Motors US.Steel Westinghouse Chrysler 409 -2594 -197 2594 -102 General.Electric -2594 36563 -3480 -28623 3797 General.Motors -197 -3480 8612 996 -971 US.Steel 2594 -28623 996 32903 -2272 Westinghouse -102 3797 -971 -2272 778 The covariance matrix of the residuals Chrysler General.Electric General.Motors US.Steel Westinghouse Chrysler 305.61 -1967 -4.81 2159 -124 General.Electric -1966.65 34557 -7160.67 -28722 4274 General.Motors -4.81 -7161 10050.52 4440 -1401 US.Steel 2158.60 -28722 4439.99 34469 -2894 Westinghouse -123.92 4274 -1400.75 -2894 833 The correlations of the residuals Chrysler General.Electric General.Motors US.Steel Westinghouse Chrysler 1.000 0.220 -0.3447 0.2008 0.2907 General.Electric 0.220 1.000 -0.2233 -0.1587 0.8973 General.Motors -0.345 -0.223 1.0000 -0.0924 -0.3760 US.Steel 0.201 -0.159 -0.0924 1.0000 -0.0757 Westinghouse 0.291 0.897 -0.3760 -0.0757 1.0000 SUR estimates for 'Chrysler' (equation 1) Model Formula: Chrysler_invest ~ Chrysler_value + Chrysler_capital Estimate Std. Error t value Pr(>|t|) (Intercept) -28.24669 4.88824 -5.78 9.1e-08 *** value 0.08910 0.00507 17.57 < 2e-16 *** capital 0.33402 0.01671 19.99 < 2e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 18.962 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 6112.2 MSE: 359.541 Root MSE: 18.962 Multiple R-Squared: 0.824 Adjusted R-Squared: 0.803 SUR estimates for 'General.Electric' (equation 2) Model Formula: General.Electric_invest ~ General.Electric_value + General.Electric_capital Estimate Std. Error t value Pr(>|t|) (Intercept) -28.24669 4.88824 -5.78 9.1e-08 *** value 0.08910 0.00507 17.57 < 2e-16 *** capital 0.33402 0.01671 19.99 < 2e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 201.63 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 691132.056 MSE: 40654.827 Root MSE: 201.63 Multiple R-Squared: -14.41 Adjusted R-Squared: -16.223 SUR estimates for 'General.Motors' (equation 3) Model Formula: General.Motors_invest ~ General.Motors_value + General.Motors_capital Estimate Std. Error t value Pr(>|t|) (Intercept) -28.24669 4.88824 -5.78 9.1e-08 *** value 0.08910 0.00507 17.57 < 2e-16 *** capital 0.33402 0.01671 19.99 < 2e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 108.739 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 201010.497 MSE: 11824.147 Root MSE: 108.739 Multiple R-Squared: 0.89 Adjusted R-Squared: 0.877 SUR estimates for 'US.Steel' (equation 4) Model Formula: US.Steel_invest ~ US.Steel_value + US.Steel_capital Estimate Std. Error t value Pr(>|t|) (Intercept) -28.24669 4.88824 -5.78 9.1e-08 *** value 0.08910 0.00507 17.57 < 2e-16 *** capital 0.33402 0.01671 19.99 < 2e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 201.375 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 689379.52 MSE: 40551.736 Root MSE: 201.375 Multiple R-Squared: -1.168 Adjusted R-Squared: -1.424 SUR estimates for 'Westinghouse' (equation 5) Model Formula: Westinghouse_invest ~ Westinghouse_value + Westinghouse_capital Estimate Std. Error t value Pr(>|t|) (Intercept) -28.24669 4.88824 -5.78 9.1e-08 *** value 0.08910 0.00507 17.57 < 2e-16 *** capital 0.33402 0.01671 19.99 < 2e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 31.312 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 16667.149 MSE: 980.421 Root MSE: 31.312 Multiple R-Squared: -1.402 Adjusted R-Squared: -1.685 systemfit results method: SUR N DF SSR detRCov OLS-R2 McElroy-R2 system 100 97 1604301 9.95e+16 0.279 0.844 N DF SSR MSE RMSE R2 Adj R2 Chrysler 20 17 6112 360 19.0 0.824 0.803 General.Electric 20 17 691132 40655 201.6 -14.410 -16.223 General.Motors 20 17 201010 11824 108.7 0.890 0.877 US.Steel 20 17 689380 40552 201.4 -1.168 -1.424 Westinghouse 20 17 16667 980 31.3 -1.402 -1.685 The covariance matrix of the residuals used for estimation Chrysler General.Electric General.Motors US.Steel Westinghouse Chrysler 409 -2594 -197 2594 -102 General.Electric -2594 36563 -3480 -28623 3797 General.Motors -197 -3480 8612 996 -971 US.Steel 2594 -28623 996 32903 -2272 Westinghouse -102 3797 -971 -2272 778 The covariance matrix of the residuals Chrysler General.Electric General.Motors US.Steel Westinghouse Chrysler 305.61 -1967 -4.81 2159 -124 General.Electric -1966.65 34557 -7160.67 -28722 4274 General.Motors -4.81 -7161 10050.52 4440 -1401 US.Steel 2158.60 -28722 4439.99 34469 -2894 Westinghouse -123.92 4274 -1400.75 -2894 833 The correlations of the residuals Chrysler General.Electric General.Motors US.Steel Westinghouse Chrysler 1.000 0.220 -0.3447 0.2008 0.2907 General.Electric 0.220 1.000 -0.2233 -0.1587 0.8973 General.Motors -0.345 -0.223 1.0000 -0.0924 -0.3760 US.Steel 0.201 -0.159 -0.0924 1.0000 -0.0757 Westinghouse 0.291 0.897 -0.3760 -0.0757 1.0000 Coefficients: Estimate Std. Error t value Pr(>|t|) Chrysler_(Intercept) -28.24669 4.88824 -5.78 2.2e-05 *** Chrysler_value 0.08910 0.00507 17.57 2.5e-12 *** Chrysler_capital 0.33402 0.01671 19.99 3.0e-13 *** General.Electric_(Intercept) -28.24669 4.88824 -5.78 2.2e-05 *** General.Electric_value 0.08910 0.00507 17.57 2.5e-12 *** General.Electric_capital 0.33402 0.01671 19.99 3.0e-13 *** General.Motors_(Intercept) -28.24669 4.88824 -5.78 2.2e-05 *** General.Motors_value 0.08910 0.00507 17.57 2.5e-12 *** General.Motors_capital 0.33402 0.01671 19.99 3.0e-13 *** US.Steel_(Intercept) -28.24669 4.88824 -5.78 2.2e-05 *** US.Steel_value 0.08910 0.00507 17.57 2.5e-12 *** US.Steel_capital 0.33402 0.01671 19.99 3.0e-13 *** Westinghouse_(Intercept) -28.24669 4.88824 -5.78 2.2e-05 *** Westinghouse_value 0.08910 0.00507 17.57 2.5e-12 *** Westinghouse_capital 0.33402 0.01671 19.99 3.0e-13 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 systemfit results method: SUR N DF SSR detRCov OLS-R2 McElroy-R2 system 100 97 1604301 9.95e+16 0.279 0.844 N DF SSR MSE RMSE R2 Adj R2 Chrysler 20 17 6112 360 19.0 0.824 0.803 General.Electric 20 17 691132 40655 201.6 -14.410 -16.223 General.Motors 20 17 201010 11824 108.7 0.890 0.877 US.Steel 20 17 689380 40552 201.4 -1.168 -1.424 Westinghouse 20 17 16667 980 31.3 -1.402 -1.685 Coefficients: Estimate Std. Error t value Pr(>|t|) Chrysler_(Intercept) -28.24669 4.88824 -5.78 9.1e-08 *** Chrysler_value 0.08910 0.00507 17.57 < 2e-16 *** Chrysler_capital 0.33402 0.01671 19.99 < 2e-16 *** General.Electric_(Intercept) -28.24669 4.88824 -5.78 9.1e-08 *** General.Electric_value 0.08910 0.00507 17.57 < 2e-16 *** General.Electric_capital 0.33402 0.01671 19.99 < 2e-16 *** General.Motors_(Intercept) -28.24669 4.88824 -5.78 9.1e-08 *** General.Motors_value 0.08910 0.00507 17.57 < 2e-16 *** General.Motors_capital 0.33402 0.01671 19.99 < 2e-16 *** US.Steel_(Intercept) -28.24669 4.88824 -5.78 9.1e-08 *** US.Steel_value 0.08910 0.00507 17.57 < 2e-16 *** US.Steel_capital 0.33402 0.01671 19.99 < 2e-16 *** Westinghouse_(Intercept) -28.24669 4.88824 -5.78 9.1e-08 *** Westinghouse_value 0.08910 0.00507 17.57 < 2e-16 *** Westinghouse_capital 0.33402 0.01671 19.99 < 2e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Chrysler_(Intercept) Chrysler_value -28.2467 0.0891 Chrysler_capital General.Electric_(Intercept) 0.3340 -28.2467 General.Electric_value General.Electric_capital 0.0891 0.3340 General.Motors_(Intercept) General.Motors_value -28.2467 0.0891 General.Motors_capital US.Steel_(Intercept) 0.3340 -28.2467 US.Steel_value US.Steel_capital 0.0891 0.3340 Westinghouse_(Intercept) Westinghouse_value -28.2467 0.0891 Westinghouse_capital 0.3340 C1 C2 C3 -28.2467 0.0891 0.3340 Estimate Std. Error t value Pr(>|t|) Chrysler_(Intercept) -28.2467 4.88824 -5.78 9.12e-08 Chrysler_value 0.0891 0.00507 17.57 0.00e+00 Chrysler_capital 0.3340 0.01671 19.99 0.00e+00 General.Electric_(Intercept) -28.2467 4.88824 -5.78 9.12e-08 General.Electric_value 0.0891 0.00507 17.57 0.00e+00 General.Electric_capital 0.3340 0.01671 19.99 0.00e+00 General.Motors_(Intercept) -28.2467 4.88824 -5.78 9.12e-08 General.Motors_value 0.0891 0.00507 17.57 0.00e+00 General.Motors_capital 0.3340 0.01671 19.99 0.00e+00 US.Steel_(Intercept) -28.2467 4.88824 -5.78 9.12e-08 US.Steel_value 0.0891 0.00507 17.57 0.00e+00 US.Steel_capital 0.3340 0.01671 19.99 0.00e+00 Westinghouse_(Intercept) -28.2467 4.88824 -5.78 9.12e-08 Westinghouse_value 0.0891 0.00507 17.57 0.00e+00 Westinghouse_capital 0.3340 0.01671 19.99 0.00e+00 Estimate Std. Error t value Pr(>|t|) C1 -28.2467 4.88824 -5.78 9.12e-08 C2 0.0891 0.00507 17.57 0.00e+00 C3 0.3340 0.01671 19.99 0.00e+00 Chrysler_(Intercept) Chrysler_value Chrysler_(Intercept) 23.89487 -1.73e-02 Chrysler_value -0.01729 2.57e-05 Chrysler_capital 0.00114 -4.74e-05 General.Electric_(Intercept) 23.89487 -1.73e-02 General.Electric_value -0.01729 2.57e-05 General.Electric_capital 0.00114 -4.74e-05 General.Motors_(Intercept) 23.89487 -1.73e-02 General.Motors_value -0.01729 2.57e-05 General.Motors_capital 0.00114 -4.74e-05 US.Steel_(Intercept) 23.89487 -1.73e-02 US.Steel_value -0.01729 2.57e-05 US.Steel_capital 0.00114 -4.74e-05 Westinghouse_(Intercept) 23.89487 -1.73e-02 Westinghouse_value -0.01729 2.57e-05 Westinghouse_capital 0.00114 -4.74e-05 Chrysler_capital General.Electric_(Intercept) Chrysler_(Intercept) 1.14e-03 23.89487 Chrysler_value -4.74e-05 -0.01729 Chrysler_capital 2.79e-04 0.00114 General.Electric_(Intercept) 1.14e-03 23.89487 General.Electric_value -4.74e-05 -0.01729 General.Electric_capital 2.79e-04 0.00114 General.Motors_(Intercept) 1.14e-03 23.89487 General.Motors_value -4.74e-05 -0.01729 General.Motors_capital 2.79e-04 0.00114 US.Steel_(Intercept) 1.14e-03 23.89487 US.Steel_value -4.74e-05 -0.01729 US.Steel_capital 2.79e-04 0.00114 Westinghouse_(Intercept) 1.14e-03 23.89487 Westinghouse_value -4.74e-05 -0.01729 Westinghouse_capital 2.79e-04 0.00114 General.Electric_value General.Electric_capital Chrysler_(Intercept) -1.73e-02 1.14e-03 Chrysler_value 2.57e-05 -4.74e-05 Chrysler_capital -4.74e-05 2.79e-04 General.Electric_(Intercept) -1.73e-02 1.14e-03 General.Electric_value 2.57e-05 -4.74e-05 General.Electric_capital -4.74e-05 2.79e-04 General.Motors_(Intercept) -1.73e-02 1.14e-03 General.Motors_value 2.57e-05 -4.74e-05 General.Motors_capital -4.74e-05 2.79e-04 US.Steel_(Intercept) -1.73e-02 1.14e-03 US.Steel_value 2.57e-05 -4.74e-05 US.Steel_capital -4.74e-05 2.79e-04 Westinghouse_(Intercept) -1.73e-02 1.14e-03 Westinghouse_value 2.57e-05 -4.74e-05 Westinghouse_capital -4.74e-05 2.79e-04 General.Motors_(Intercept) General.Motors_value Chrysler_(Intercept) 23.89487 -1.73e-02 Chrysler_value -0.01729 2.57e-05 Chrysler_capital 0.00114 -4.74e-05 General.Electric_(Intercept) 23.89487 -1.73e-02 General.Electric_value -0.01729 2.57e-05 General.Electric_capital 0.00114 -4.74e-05 General.Motors_(Intercept) 23.89487 -1.73e-02 General.Motors_value -0.01729 2.57e-05 General.Motors_capital 0.00114 -4.74e-05 US.Steel_(Intercept) 23.89487 -1.73e-02 US.Steel_value -0.01729 2.57e-05 US.Steel_capital 0.00114 -4.74e-05 Westinghouse_(Intercept) 23.89487 -1.73e-02 Westinghouse_value -0.01729 2.57e-05 Westinghouse_capital 0.00114 -4.74e-05 General.Motors_capital US.Steel_(Intercept) Chrysler_(Intercept) 1.14e-03 23.89487 Chrysler_value -4.74e-05 -0.01729 Chrysler_capital 2.79e-04 0.00114 General.Electric_(Intercept) 1.14e-03 23.89487 General.Electric_value -4.74e-05 -0.01729 General.Electric_capital 2.79e-04 0.00114 General.Motors_(Intercept) 1.14e-03 23.89487 General.Motors_value -4.74e-05 -0.01729 General.Motors_capital 2.79e-04 0.00114 US.Steel_(Intercept) 1.14e-03 23.89487 US.Steel_value -4.74e-05 -0.01729 US.Steel_capital 2.79e-04 0.00114 Westinghouse_(Intercept) 1.14e-03 23.89487 Westinghouse_value -4.74e-05 -0.01729 Westinghouse_capital 2.79e-04 0.00114 US.Steel_value US.Steel_capital Chrysler_(Intercept) -1.73e-02 1.14e-03 Chrysler_value 2.57e-05 -4.74e-05 Chrysler_capital -4.74e-05 2.79e-04 General.Electric_(Intercept) -1.73e-02 1.14e-03 General.Electric_value 2.57e-05 -4.74e-05 General.Electric_capital -4.74e-05 2.79e-04 General.Motors_(Intercept) -1.73e-02 1.14e-03 General.Motors_value 2.57e-05 -4.74e-05 General.Motors_capital -4.74e-05 2.79e-04 US.Steel_(Intercept) -1.73e-02 1.14e-03 US.Steel_value 2.57e-05 -4.74e-05 US.Steel_capital -4.74e-05 2.79e-04 Westinghouse_(Intercept) -1.73e-02 1.14e-03 Westinghouse_value 2.57e-05 -4.74e-05 Westinghouse_capital -4.74e-05 2.79e-04 Westinghouse_(Intercept) Westinghouse_value Chrysler_(Intercept) 23.89487 -1.73e-02 Chrysler_value -0.01729 2.57e-05 Chrysler_capital 0.00114 -4.74e-05 General.Electric_(Intercept) 23.89487 -1.73e-02 General.Electric_value -0.01729 2.57e-05 General.Electric_capital 0.00114 -4.74e-05 General.Motors_(Intercept) 23.89487 -1.73e-02 General.Motors_value -0.01729 2.57e-05 General.Motors_capital 0.00114 -4.74e-05 US.Steel_(Intercept) 23.89487 -1.73e-02 US.Steel_value -0.01729 2.57e-05 US.Steel_capital 0.00114 -4.74e-05 Westinghouse_(Intercept) 23.89487 -1.73e-02 Westinghouse_value -0.01729 2.57e-05 Westinghouse_capital 0.00114 -4.74e-05 Westinghouse_capital Chrysler_(Intercept) 1.14e-03 Chrysler_value -4.74e-05 Chrysler_capital 2.79e-04 General.Electric_(Intercept) 1.14e-03 General.Electric_value -4.74e-05 General.Electric_capital 2.79e-04 General.Motors_(Intercept) 1.14e-03 General.Motors_value -4.74e-05 General.Motors_capital 2.79e-04 US.Steel_(Intercept) 1.14e-03 US.Steel_value -4.74e-05 US.Steel_capital 2.79e-04 Westinghouse_(Intercept) 1.14e-03 Westinghouse_value -4.74e-05 Westinghouse_capital 2.79e-04 C1 C2 C3 C1 23.89487 -1.73e-02 1.14e-03 C2 -0.01729 2.57e-05 -4.74e-05 C3 0.00114 -4.74e-05 2.79e-04 Chrysler General.Electric General.Motors US.Steel Westinghouse X1935 27.830 -75.6 70.61 98.79 23.51 X1936 22.951 -141.2 -12.88 205.66 7.90 X1937 4.160 -183.7 -93.56 220.24 -4.13 X1938 23.527 -161.1 -32.72 43.09 -4.84 X1939 -1.382 -182.3 -93.20 -20.20 -7.09 X1940 10.397 -149.7 6.46 8.66 -8.03 X1941 14.133 -96.0 49.49 201.63 16.81 X1942 14.586 -117.5 85.75 180.85 1.28 X1943 0.807 -173.2 78.44 112.17 -17.92 X1944 5.381 -172.6 118.21 61.60 -20.25 X1945 23.374 -163.8 69.60 50.68 -29.03 X1946 -5.596 -124.2 145.33 186.62 -14.78 X1947 7.005 -124.6 28.58 200.21 -5.11 X1948 18.909 -149.9 -40.65 275.38 -24.83 X1949 5.397 -207.5 -87.07 167.54 -39.09 X1950 12.604 -238.0 -30.56 178.08 -41.77 X1951 48.812 -222.9 -49.87 298.18 -25.19 X1952 11.406 -242.3 2.83 332.67 -25.56 X1953 -1.660 -270.9 182.86 279.96 -46.40 X1954 -0.502 -325.0 272.93 75.36 -80.40 2.5 % 97.5 % Chrysler_(Intercept) -37.948 -18.545 Chrysler_value 0.079 0.099 Chrysler_capital 0.301 0.367 General.Electric_(Intercept) -37.948 -18.545 General.Electric_value 0.079 0.099 General.Electric_capital 0.301 0.367 General.Motors_(Intercept) -37.948 -18.545 General.Motors_value 0.079 0.099 General.Motors_capital 0.301 0.367 US.Steel_(Intercept) -37.948 -18.545 US.Steel_value 0.079 0.099 US.Steel_capital 0.301 0.367 Westinghouse_(Intercept) -37.948 -18.545 Westinghouse_value 0.079 0.099 Westinghouse_capital 0.301 0.367 Chrysler General.Electric General.Motors US.Steel Westinghouse X1935 12.5 109 247 111 -10.6 X1936 49.8 186 405 150 18.0 X1937 62.1 261 504 250 39.2 X1938 28.1 206 290 219 27.7 X1939 53.8 230 424 251 25.9 X1940 59.0 224 455 253 36.6 X1941 54.2 209 463 271 31.7 X1942 32.2 209 362 265 42.1 X1943 46.6 234 421 249 54.9 X1944 54.2 229 429 227 58.1 X1945 65.4 257 492 208 68.3 X1946 79.7 284 543 234 68.2 X1947 55.7 272 540 220 60.7 X1948 70.5 296 570 219 74.4 X1949 73.6 306 642 238 71.1 X1950 88.1 331 673 241 74.0 X1951 111.8 358 806 290 79.6 X1952 133.6 400 888 313 97.3 X1953 176.6 450 1122 361 136.5 X1954 173.0 515 1214 384 149.0 'log Lik.' -533 (df=18) 'log Lik.' -568 (df=18) [1] 100 Chrysler_invest Chrysler_value Chrysler_capital General.Electric_invest X1935 40.3 418 10.5 33.1 X1936 72.8 838 10.2 45.0 X1937 66.3 884 34.7 77.2 X1938 51.6 438 51.8 44.6 X1939 52.4 680 64.3 48.1 X1940 69.4 728 67.1 74.4 X1941 68.3 644 75.2 113.0 X1942 46.8 411 71.4 91.9 X1943 47.4 588 67.1 61.3 X1944 59.6 698 60.5 56.8 X1945 88.8 846 54.6 93.6 X1946 74.1 894 84.8 159.9 X1947 62.7 579 96.8 147.2 X1948 89.4 695 110.2 146.3 X1949 79.0 590 147.4 98.3 X1950 100.7 694 163.2 93.5 X1951 160.6 809 203.5 135.2 X1952 145.0 727 290.6 157.3 X1953 174.9 1002 346.1 179.5 X1954 172.5 703 414.9 189.6 General.Electric_value General.Electric_capital General.Motors_invest X1935 1171 97.8 318 X1936 2016 104.4 392 X1937 2803 118.0 411 X1938 2040 156.2 258 X1939 2256 172.6 331 X1940 2132 186.6 461 X1941 1834 220.9 512 X1942 1588 287.8 448 X1943 1749 319.9 500 X1944 1687 321.3 548 X1945 2008 319.6 561 X1946 2208 346.0 688 X1947 1657 456.4 569 X1948 1604 543.4 529 X1949 1432 618.3 555 X1950 1610 647.4 643 X1951 1819 671.3 756 X1952 2080 726.1 891 X1953 2372 800.3 1304 X1954 2760 888.9 1487 General.Motors_value General.Motors_capital US.Steel_invest X1935 3078 2.8 210 X1936 4662 52.6 355 X1937 5387 156.9 470 X1938 2792 209.2 262 X1939 4313 203.4 230 X1940 4644 207.2 262 X1941 4551 255.2 473 X1942 3244 303.7 446 X1943 4054 264.1 362 X1944 4379 201.6 288 X1945 4841 265.0 259 X1946 4901 402.2 420 X1947 3526 761.5 420 X1948 3255 922.4 494 X1949 3700 1020.1 405 X1950 3756 1099.0 419 X1951 4833 1207.7 588 X1952 4925 1430.5 645 X1953 6242 1777.3 641 X1954 5594 2226.3 459 US.Steel_value US.Steel_capital Westinghouse_invest Westinghouse_value X1935 1362 53.8 12.9 192 X1936 1807 50.5 25.9 516 X1937 2676 118.1 35.0 729 X1938 1802 260.2 22.9 560 X1939 1957 312.7 18.8 520 X1940 2203 254.2 28.6 628 X1941 2380 261.4 48.5 537 X1942 2169 298.7 43.3 561 X1943 1985 301.8 37.0 617 X1944 1814 279.1 37.8 627 X1945 1850 213.8 39.3 737 X1946 2068 232.6 53.5 760 X1947 1797 264.8 55.6 581 X1948 1626 306.9 49.6 662 X1949 1667 351.1 32.0 584 X1950 1677 357.8 32.2 635 X1951 2290 342.1 54.4 724 X1952 2159 444.2 71.8 864 X1953 2031 623.6 90.1 1194 X1954 2116 669.7 68.6 1189 Westinghouse_capital X1935 1.8 X1936 0.8 X1937 7.4 X1938 18.1 X1939 23.5 X1940 26.5 X1941 36.2 X1942 60.8 X1943 84.4 X1944 91.2 X1945 92.4 X1946 86.0 X1947 111.1 X1948 130.6 X1949 141.8 X1950 136.7 X1951 129.7 X1952 145.5 X1953 174.8 X1954 213.5 Chrysler_(Intercept) Chrysler_value Chrysler_capital Chrysler_X1935 1 418 10.5 Chrysler_X1936 1 838 10.2 Chrysler_X1937 1 884 34.7 Chrysler_X1938 1 438 51.8 Chrysler_X1939 1 680 64.3 Chrysler_X1940 1 728 67.1 Chrysler_X1941 1 644 75.2 Chrysler_X1942 1 411 71.4 Chrysler_X1943 1 588 67.1 Chrysler_X1944 1 698 60.5 Chrysler_X1945 1 846 54.6 Chrysler_X1946 1 894 84.8 Chrysler_X1947 1 579 96.8 Chrysler_X1948 1 695 110.2 Chrysler_X1949 1 590 147.4 Chrysler_X1950 1 694 163.2 Chrysler_X1951 1 809 203.5 Chrysler_X1952 1 727 290.6 Chrysler_X1953 1 1002 346.1 Chrysler_X1954 1 703 414.9 General.Electric_X1935 0 0 0.0 General.Electric_X1936 0 0 0.0 General.Electric_X1937 0 0 0.0 General.Electric_X1938 0 0 0.0 General.Electric_X1939 0 0 0.0 General.Electric_X1940 0 0 0.0 General.Electric_X1941 0 0 0.0 General.Electric_X1942 0 0 0.0 General.Electric_X1943 0 0 0.0 General.Electric_X1944 0 0 0.0 General.Electric_X1945 0 0 0.0 General.Electric_X1946 0 0 0.0 General.Electric_X1947 0 0 0.0 General.Electric_X1948 0 0 0.0 General.Electric_X1949 0 0 0.0 General.Electric_X1950 0 0 0.0 General.Electric_X1951 0 0 0.0 General.Electric_X1952 0 0 0.0 General.Electric_X1953 0 0 0.0 General.Electric_X1954 0 0 0.0 General.Motors_X1935 0 0 0.0 General.Motors_X1936 0 0 0.0 General.Motors_X1937 0 0 0.0 General.Motors_X1938 0 0 0.0 General.Motors_X1939 0 0 0.0 General.Motors_X1940 0 0 0.0 General.Motors_X1941 0 0 0.0 General.Motors_X1942 0 0 0.0 General.Motors_X1943 0 0 0.0 General.Motors_X1944 0 0 0.0 General.Motors_X1945 0 0 0.0 General.Motors_X1946 0 0 0.0 General.Motors_X1947 0 0 0.0 General.Motors_X1948 0 0 0.0 General.Motors_X1949 0 0 0.0 General.Motors_X1950 0 0 0.0 General.Motors_X1951 0 0 0.0 General.Motors_X1952 0 0 0.0 General.Motors_X1953 0 0 0.0 General.Motors_X1954 0 0 0.0 US.Steel_X1935 0 0 0.0 US.Steel_X1936 0 0 0.0 US.Steel_X1937 0 0 0.0 US.Steel_X1938 0 0 0.0 US.Steel_X1939 0 0 0.0 US.Steel_X1940 0 0 0.0 US.Steel_X1941 0 0 0.0 US.Steel_X1942 0 0 0.0 US.Steel_X1943 0 0 0.0 US.Steel_X1944 0 0 0.0 US.Steel_X1945 0 0 0.0 US.Steel_X1946 0 0 0.0 US.Steel_X1947 0 0 0.0 US.Steel_X1948 0 0 0.0 US.Steel_X1949 0 0 0.0 US.Steel_X1950 0 0 0.0 US.Steel_X1951 0 0 0.0 US.Steel_X1952 0 0 0.0 US.Steel_X1953 0 0 0.0 US.Steel_X1954 0 0 0.0 Westinghouse_X1935 0 0 0.0 Westinghouse_X1936 0 0 0.0 Westinghouse_X1937 0 0 0.0 Westinghouse_X1938 0 0 0.0 Westinghouse_X1939 0 0 0.0 Westinghouse_X1940 0 0 0.0 Westinghouse_X1941 0 0 0.0 Westinghouse_X1942 0 0 0.0 Westinghouse_X1943 0 0 0.0 Westinghouse_X1944 0 0 0.0 Westinghouse_X1945 0 0 0.0 Westinghouse_X1946 0 0 0.0 Westinghouse_X1947 0 0 0.0 Westinghouse_X1948 0 0 0.0 Westinghouse_X1949 0 0 0.0 Westinghouse_X1950 0 0 0.0 Westinghouse_X1951 0 0 0.0 Westinghouse_X1952 0 0 0.0 Westinghouse_X1953 0 0 0.0 Westinghouse_X1954 0 0 0.0 General.Electric_(Intercept) General.Electric_value Chrysler_X1935 0 0 Chrysler_X1936 0 0 Chrysler_X1937 0 0 Chrysler_X1938 0 0 Chrysler_X1939 0 0 Chrysler_X1940 0 0 Chrysler_X1941 0 0 Chrysler_X1942 0 0 Chrysler_X1943 0 0 Chrysler_X1944 0 0 Chrysler_X1945 0 0 Chrysler_X1946 0 0 Chrysler_X1947 0 0 Chrysler_X1948 0 0 Chrysler_X1949 0 0 Chrysler_X1950 0 0 Chrysler_X1951 0 0 Chrysler_X1952 0 0 Chrysler_X1953 0 0 Chrysler_X1954 0 0 General.Electric_X1935 1 1171 General.Electric_X1936 1 2016 General.Electric_X1937 1 2803 General.Electric_X1938 1 2040 General.Electric_X1939 1 2256 General.Electric_X1940 1 2132 General.Electric_X1941 1 1834 General.Electric_X1942 1 1588 General.Electric_X1943 1 1749 General.Electric_X1944 1 1687 General.Electric_X1945 1 2008 General.Electric_X1946 1 2208 General.Electric_X1947 1 1657 General.Electric_X1948 1 1604 General.Electric_X1949 1 1432 General.Electric_X1950 1 1610 General.Electric_X1951 1 1819 General.Electric_X1952 1 2080 General.Electric_X1953 1 2372 General.Electric_X1954 1 2760 General.Motors_X1935 0 0 General.Motors_X1936 0 0 General.Motors_X1937 0 0 General.Motors_X1938 0 0 General.Motors_X1939 0 0 General.Motors_X1940 0 0 General.Motors_X1941 0 0 General.Motors_X1942 0 0 General.Motors_X1943 0 0 General.Motors_X1944 0 0 General.Motors_X1945 0 0 General.Motors_X1946 0 0 General.Motors_X1947 0 0 General.Motors_X1948 0 0 General.Motors_X1949 0 0 General.Motors_X1950 0 0 General.Motors_X1951 0 0 General.Motors_X1952 0 0 General.Motors_X1953 0 0 General.Motors_X1954 0 0 US.Steel_X1935 0 0 US.Steel_X1936 0 0 US.Steel_X1937 0 0 US.Steel_X1938 0 0 US.Steel_X1939 0 0 US.Steel_X1940 0 0 US.Steel_X1941 0 0 US.Steel_X1942 0 0 US.Steel_X1943 0 0 US.Steel_X1944 0 0 US.Steel_X1945 0 0 US.Steel_X1946 0 0 US.Steel_X1947 0 0 US.Steel_X1948 0 0 US.Steel_X1949 0 0 US.Steel_X1950 0 0 US.Steel_X1951 0 0 US.Steel_X1952 0 0 US.Steel_X1953 0 0 US.Steel_X1954 0 0 Westinghouse_X1935 0 0 Westinghouse_X1936 0 0 Westinghouse_X1937 0 0 Westinghouse_X1938 0 0 Westinghouse_X1939 0 0 Westinghouse_X1940 0 0 Westinghouse_X1941 0 0 Westinghouse_X1942 0 0 Westinghouse_X1943 0 0 Westinghouse_X1944 0 0 Westinghouse_X1945 0 0 Westinghouse_X1946 0 0 Westinghouse_X1947 0 0 Westinghouse_X1948 0 0 Westinghouse_X1949 0 0 Westinghouse_X1950 0 0 Westinghouse_X1951 0 0 Westinghouse_X1952 0 0 Westinghouse_X1953 0 0 Westinghouse_X1954 0 0 General.Electric_capital General.Motors_(Intercept) Chrysler_X1935 0.0 0 Chrysler_X1936 0.0 0 Chrysler_X1937 0.0 0 Chrysler_X1938 0.0 0 Chrysler_X1939 0.0 0 Chrysler_X1940 0.0 0 Chrysler_X1941 0.0 0 Chrysler_X1942 0.0 0 Chrysler_X1943 0.0 0 Chrysler_X1944 0.0 0 Chrysler_X1945 0.0 0 Chrysler_X1946 0.0 0 Chrysler_X1947 0.0 0 Chrysler_X1948 0.0 0 Chrysler_X1949 0.0 0 Chrysler_X1950 0.0 0 Chrysler_X1951 0.0 0 Chrysler_X1952 0.0 0 Chrysler_X1953 0.0 0 Chrysler_X1954 0.0 0 General.Electric_X1935 97.8 0 General.Electric_X1936 104.4 0 General.Electric_X1937 118.0 0 General.Electric_X1938 156.2 0 General.Electric_X1939 172.6 0 General.Electric_X1940 186.6 0 General.Electric_X1941 220.9 0 General.Electric_X1942 287.8 0 General.Electric_X1943 319.9 0 General.Electric_X1944 321.3 0 General.Electric_X1945 319.6 0 General.Electric_X1946 346.0 0 General.Electric_X1947 456.4 0 General.Electric_X1948 543.4 0 General.Electric_X1949 618.3 0 General.Electric_X1950 647.4 0 General.Electric_X1951 671.3 0 General.Electric_X1952 726.1 0 General.Electric_X1953 800.3 0 General.Electric_X1954 888.9 0 General.Motors_X1935 0.0 1 General.Motors_X1936 0.0 1 General.Motors_X1937 0.0 1 General.Motors_X1938 0.0 1 General.Motors_X1939 0.0 1 General.Motors_X1940 0.0 1 General.Motors_X1941 0.0 1 General.Motors_X1942 0.0 1 General.Motors_X1943 0.0 1 General.Motors_X1944 0.0 1 General.Motors_X1945 0.0 1 General.Motors_X1946 0.0 1 General.Motors_X1947 0.0 1 General.Motors_X1948 0.0 1 General.Motors_X1949 0.0 1 General.Motors_X1950 0.0 1 General.Motors_X1951 0.0 1 General.Motors_X1952 0.0 1 General.Motors_X1953 0.0 1 General.Motors_X1954 0.0 1 US.Steel_X1935 0.0 0 US.Steel_X1936 0.0 0 US.Steel_X1937 0.0 0 US.Steel_X1938 0.0 0 US.Steel_X1939 0.0 0 US.Steel_X1940 0.0 0 US.Steel_X1941 0.0 0 US.Steel_X1942 0.0 0 US.Steel_X1943 0.0 0 US.Steel_X1944 0.0 0 US.Steel_X1945 0.0 0 US.Steel_X1946 0.0 0 US.Steel_X1947 0.0 0 US.Steel_X1948 0.0 0 US.Steel_X1949 0.0 0 US.Steel_X1950 0.0 0 US.Steel_X1951 0.0 0 US.Steel_X1952 0.0 0 US.Steel_X1953 0.0 0 US.Steel_X1954 0.0 0 Westinghouse_X1935 0.0 0 Westinghouse_X1936 0.0 0 Westinghouse_X1937 0.0 0 Westinghouse_X1938 0.0 0 Westinghouse_X1939 0.0 0 Westinghouse_X1940 0.0 0 Westinghouse_X1941 0.0 0 Westinghouse_X1942 0.0 0 Westinghouse_X1943 0.0 0 Westinghouse_X1944 0.0 0 Westinghouse_X1945 0.0 0 Westinghouse_X1946 0.0 0 Westinghouse_X1947 0.0 0 Westinghouse_X1948 0.0 0 Westinghouse_X1949 0.0 0 Westinghouse_X1950 0.0 0 Westinghouse_X1951 0.0 0 Westinghouse_X1952 0.0 0 Westinghouse_X1953 0.0 0 Westinghouse_X1954 0.0 0 General.Motors_value General.Motors_capital Chrysler_X1935 0 0.0 Chrysler_X1936 0 0.0 Chrysler_X1937 0 0.0 Chrysler_X1938 0 0.0 Chrysler_X1939 0 0.0 Chrysler_X1940 0 0.0 Chrysler_X1941 0 0.0 Chrysler_X1942 0 0.0 Chrysler_X1943 0 0.0 Chrysler_X1944 0 0.0 Chrysler_X1945 0 0.0 Chrysler_X1946 0 0.0 Chrysler_X1947 0 0.0 Chrysler_X1948 0 0.0 Chrysler_X1949 0 0.0 Chrysler_X1950 0 0.0 Chrysler_X1951 0 0.0 Chrysler_X1952 0 0.0 Chrysler_X1953 0 0.0 Chrysler_X1954 0 0.0 General.Electric_X1935 0 0.0 General.Electric_X1936 0 0.0 General.Electric_X1937 0 0.0 General.Electric_X1938 0 0.0 General.Electric_X1939 0 0.0 General.Electric_X1940 0 0.0 General.Electric_X1941 0 0.0 General.Electric_X1942 0 0.0 General.Electric_X1943 0 0.0 General.Electric_X1944 0 0.0 General.Electric_X1945 0 0.0 General.Electric_X1946 0 0.0 General.Electric_X1947 0 0.0 General.Electric_X1948 0 0.0 General.Electric_X1949 0 0.0 General.Electric_X1950 0 0.0 General.Electric_X1951 0 0.0 General.Electric_X1952 0 0.0 General.Electric_X1953 0 0.0 General.Electric_X1954 0 0.0 General.Motors_X1935 3078 2.8 General.Motors_X1936 4662 52.6 General.Motors_X1937 5387 156.9 General.Motors_X1938 2792 209.2 General.Motors_X1939 4313 203.4 General.Motors_X1940 4644 207.2 General.Motors_X1941 4551 255.2 General.Motors_X1942 3244 303.7 General.Motors_X1943 4054 264.1 General.Motors_X1944 4379 201.6 General.Motors_X1945 4841 265.0 General.Motors_X1946 4901 402.2 General.Motors_X1947 3526 761.5 General.Motors_X1948 3255 922.4 General.Motors_X1949 3700 1020.1 General.Motors_X1950 3756 1099.0 General.Motors_X1951 4833 1207.7 General.Motors_X1952 4925 1430.5 General.Motors_X1953 6242 1777.3 General.Motors_X1954 5594 2226.3 US.Steel_X1935 0 0.0 US.Steel_X1936 0 0.0 US.Steel_X1937 0 0.0 US.Steel_X1938 0 0.0 US.Steel_X1939 0 0.0 US.Steel_X1940 0 0.0 US.Steel_X1941 0 0.0 US.Steel_X1942 0 0.0 US.Steel_X1943 0 0.0 US.Steel_X1944 0 0.0 US.Steel_X1945 0 0.0 US.Steel_X1946 0 0.0 US.Steel_X1947 0 0.0 US.Steel_X1948 0 0.0 US.Steel_X1949 0 0.0 US.Steel_X1950 0 0.0 US.Steel_X1951 0 0.0 US.Steel_X1952 0 0.0 US.Steel_X1953 0 0.0 US.Steel_X1954 0 0.0 Westinghouse_X1935 0 0.0 Westinghouse_X1936 0 0.0 Westinghouse_X1937 0 0.0 Westinghouse_X1938 0 0.0 Westinghouse_X1939 0 0.0 Westinghouse_X1940 0 0.0 Westinghouse_X1941 0 0.0 Westinghouse_X1942 0 0.0 Westinghouse_X1943 0 0.0 Westinghouse_X1944 0 0.0 Westinghouse_X1945 0 0.0 Westinghouse_X1946 0 0.0 Westinghouse_X1947 0 0.0 Westinghouse_X1948 0 0.0 Westinghouse_X1949 0 0.0 Westinghouse_X1950 0 0.0 Westinghouse_X1951 0 0.0 Westinghouse_X1952 0 0.0 Westinghouse_X1953 0 0.0 Westinghouse_X1954 0 0.0 US.Steel_(Intercept) US.Steel_value US.Steel_capital Chrysler_X1935 0 0 0.0 Chrysler_X1936 0 0 0.0 Chrysler_X1937 0 0 0.0 Chrysler_X1938 0 0 0.0 Chrysler_X1939 0 0 0.0 Chrysler_X1940 0 0 0.0 Chrysler_X1941 0 0 0.0 Chrysler_X1942 0 0 0.0 Chrysler_X1943 0 0 0.0 Chrysler_X1944 0 0 0.0 Chrysler_X1945 0 0 0.0 Chrysler_X1946 0 0 0.0 Chrysler_X1947 0 0 0.0 Chrysler_X1948 0 0 0.0 Chrysler_X1949 0 0 0.0 Chrysler_X1950 0 0 0.0 Chrysler_X1951 0 0 0.0 Chrysler_X1952 0 0 0.0 Chrysler_X1953 0 0 0.0 Chrysler_X1954 0 0 0.0 General.Electric_X1935 0 0 0.0 General.Electric_X1936 0 0 0.0 General.Electric_X1937 0 0 0.0 General.Electric_X1938 0 0 0.0 General.Electric_X1939 0 0 0.0 General.Electric_X1940 0 0 0.0 General.Electric_X1941 0 0 0.0 General.Electric_X1942 0 0 0.0 General.Electric_X1943 0 0 0.0 General.Electric_X1944 0 0 0.0 General.Electric_X1945 0 0 0.0 General.Electric_X1946 0 0 0.0 General.Electric_X1947 0 0 0.0 General.Electric_X1948 0 0 0.0 General.Electric_X1949 0 0 0.0 General.Electric_X1950 0 0 0.0 General.Electric_X1951 0 0 0.0 General.Electric_X1952 0 0 0.0 General.Electric_X1953 0 0 0.0 General.Electric_X1954 0 0 0.0 General.Motors_X1935 0 0 0.0 General.Motors_X1936 0 0 0.0 General.Motors_X1937 0 0 0.0 General.Motors_X1938 0 0 0.0 General.Motors_X1939 0 0 0.0 General.Motors_X1940 0 0 0.0 General.Motors_X1941 0 0 0.0 General.Motors_X1942 0 0 0.0 General.Motors_X1943 0 0 0.0 General.Motors_X1944 0 0 0.0 General.Motors_X1945 0 0 0.0 General.Motors_X1946 0 0 0.0 General.Motors_X1947 0 0 0.0 General.Motors_X1948 0 0 0.0 General.Motors_X1949 0 0 0.0 General.Motors_X1950 0 0 0.0 General.Motors_X1951 0 0 0.0 General.Motors_X1952 0 0 0.0 General.Motors_X1953 0 0 0.0 General.Motors_X1954 0 0 0.0 US.Steel_X1935 1 1362 53.8 US.Steel_X1936 1 1807 50.5 US.Steel_X1937 1 2676 118.1 US.Steel_X1938 1 1802 260.2 US.Steel_X1939 1 1957 312.7 US.Steel_X1940 1 2203 254.2 US.Steel_X1941 1 2380 261.4 US.Steel_X1942 1 2169 298.7 US.Steel_X1943 1 1985 301.8 US.Steel_X1944 1 1814 279.1 US.Steel_X1945 1 1850 213.8 US.Steel_X1946 1 2068 232.6 US.Steel_X1947 1 1797 264.8 US.Steel_X1948 1 1626 306.9 US.Steel_X1949 1 1667 351.1 US.Steel_X1950 1 1677 357.8 US.Steel_X1951 1 2290 342.1 US.Steel_X1952 1 2159 444.2 US.Steel_X1953 1 2031 623.6 US.Steel_X1954 1 2116 669.7 Westinghouse_X1935 0 0 0.0 Westinghouse_X1936 0 0 0.0 Westinghouse_X1937 0 0 0.0 Westinghouse_X1938 0 0 0.0 Westinghouse_X1939 0 0 0.0 Westinghouse_X1940 0 0 0.0 Westinghouse_X1941 0 0 0.0 Westinghouse_X1942 0 0 0.0 Westinghouse_X1943 0 0 0.0 Westinghouse_X1944 0 0 0.0 Westinghouse_X1945 0 0 0.0 Westinghouse_X1946 0 0 0.0 Westinghouse_X1947 0 0 0.0 Westinghouse_X1948 0 0 0.0 Westinghouse_X1949 0 0 0.0 Westinghouse_X1950 0 0 0.0 Westinghouse_X1951 0 0 0.0 Westinghouse_X1952 0 0 0.0 Westinghouse_X1953 0 0 0.0 Westinghouse_X1954 0 0 0.0 Westinghouse_(Intercept) Westinghouse_value Chrysler_X1935 0 0 Chrysler_X1936 0 0 Chrysler_X1937 0 0 Chrysler_X1938 0 0 Chrysler_X1939 0 0 Chrysler_X1940 0 0 Chrysler_X1941 0 0 Chrysler_X1942 0 0 Chrysler_X1943 0 0 Chrysler_X1944 0 0 Chrysler_X1945 0 0 Chrysler_X1946 0 0 Chrysler_X1947 0 0 Chrysler_X1948 0 0 Chrysler_X1949 0 0 Chrysler_X1950 0 0 Chrysler_X1951 0 0 Chrysler_X1952 0 0 Chrysler_X1953 0 0 Chrysler_X1954 0 0 General.Electric_X1935 0 0 General.Electric_X1936 0 0 General.Electric_X1937 0 0 General.Electric_X1938 0 0 General.Electric_X1939 0 0 General.Electric_X1940 0 0 General.Electric_X1941 0 0 General.Electric_X1942 0 0 General.Electric_X1943 0 0 General.Electric_X1944 0 0 General.Electric_X1945 0 0 General.Electric_X1946 0 0 General.Electric_X1947 0 0 General.Electric_X1948 0 0 General.Electric_X1949 0 0 General.Electric_X1950 0 0 General.Electric_X1951 0 0 General.Electric_X1952 0 0 General.Electric_X1953 0 0 General.Electric_X1954 0 0 General.Motors_X1935 0 0 General.Motors_X1936 0 0 General.Motors_X1937 0 0 General.Motors_X1938 0 0 General.Motors_X1939 0 0 General.Motors_X1940 0 0 General.Motors_X1941 0 0 General.Motors_X1942 0 0 General.Motors_X1943 0 0 General.Motors_X1944 0 0 General.Motors_X1945 0 0 General.Motors_X1946 0 0 General.Motors_X1947 0 0 General.Motors_X1948 0 0 General.Motors_X1949 0 0 General.Motors_X1950 0 0 General.Motors_X1951 0 0 General.Motors_X1952 0 0 General.Motors_X1953 0 0 General.Motors_X1954 0 0 US.Steel_X1935 0 0 US.Steel_X1936 0 0 US.Steel_X1937 0 0 US.Steel_X1938 0 0 US.Steel_X1939 0 0 US.Steel_X1940 0 0 US.Steel_X1941 0 0 US.Steel_X1942 0 0 US.Steel_X1943 0 0 US.Steel_X1944 0 0 US.Steel_X1945 0 0 US.Steel_X1946 0 0 US.Steel_X1947 0 0 US.Steel_X1948 0 0 US.Steel_X1949 0 0 US.Steel_X1950 0 0 US.Steel_X1951 0 0 US.Steel_X1952 0 0 US.Steel_X1953 0 0 US.Steel_X1954 0 0 Westinghouse_X1935 1 192 Westinghouse_X1936 1 516 Westinghouse_X1937 1 729 Westinghouse_X1938 1 560 Westinghouse_X1939 1 520 Westinghouse_X1940 1 628 Westinghouse_X1941 1 537 Westinghouse_X1942 1 561 Westinghouse_X1943 1 617 Westinghouse_X1944 1 627 Westinghouse_X1945 1 737 Westinghouse_X1946 1 760 Westinghouse_X1947 1 581 Westinghouse_X1948 1 662 Westinghouse_X1949 1 584 Westinghouse_X1950 1 635 Westinghouse_X1951 1 724 Westinghouse_X1952 1 864 Westinghouse_X1953 1 1194 Westinghouse_X1954 1 1189 Westinghouse_capital Chrysler_X1935 0.0 Chrysler_X1936 0.0 Chrysler_X1937 0.0 Chrysler_X1938 0.0 Chrysler_X1939 0.0 Chrysler_X1940 0.0 Chrysler_X1941 0.0 Chrysler_X1942 0.0 Chrysler_X1943 0.0 Chrysler_X1944 0.0 Chrysler_X1945 0.0 Chrysler_X1946 0.0 Chrysler_X1947 0.0 Chrysler_X1948 0.0 Chrysler_X1949 0.0 Chrysler_X1950 0.0 Chrysler_X1951 0.0 Chrysler_X1952 0.0 Chrysler_X1953 0.0 Chrysler_X1954 0.0 General.Electric_X1935 0.0 General.Electric_X1936 0.0 General.Electric_X1937 0.0 General.Electric_X1938 0.0 General.Electric_X1939 0.0 General.Electric_X1940 0.0 General.Electric_X1941 0.0 General.Electric_X1942 0.0 General.Electric_X1943 0.0 General.Electric_X1944 0.0 General.Electric_X1945 0.0 General.Electric_X1946 0.0 General.Electric_X1947 0.0 General.Electric_X1948 0.0 General.Electric_X1949 0.0 General.Electric_X1950 0.0 General.Electric_X1951 0.0 General.Electric_X1952 0.0 General.Electric_X1953 0.0 General.Electric_X1954 0.0 General.Motors_X1935 0.0 General.Motors_X1936 0.0 General.Motors_X1937 0.0 General.Motors_X1938 0.0 General.Motors_X1939 0.0 General.Motors_X1940 0.0 General.Motors_X1941 0.0 General.Motors_X1942 0.0 General.Motors_X1943 0.0 General.Motors_X1944 0.0 General.Motors_X1945 0.0 General.Motors_X1946 0.0 General.Motors_X1947 0.0 General.Motors_X1948 0.0 General.Motors_X1949 0.0 General.Motors_X1950 0.0 General.Motors_X1951 0.0 General.Motors_X1952 0.0 General.Motors_X1953 0.0 General.Motors_X1954 0.0 US.Steel_X1935 0.0 US.Steel_X1936 0.0 US.Steel_X1937 0.0 US.Steel_X1938 0.0 US.Steel_X1939 0.0 US.Steel_X1940 0.0 US.Steel_X1941 0.0 US.Steel_X1942 0.0 US.Steel_X1943 0.0 US.Steel_X1944 0.0 US.Steel_X1945 0.0 US.Steel_X1946 0.0 US.Steel_X1947 0.0 US.Steel_X1948 0.0 US.Steel_X1949 0.0 US.Steel_X1950 0.0 US.Steel_X1951 0.0 US.Steel_X1952 0.0 US.Steel_X1953 0.0 US.Steel_X1954 0.0 Westinghouse_X1935 1.8 Westinghouse_X1936 0.8 Westinghouse_X1937 7.4 Westinghouse_X1938 18.1 Westinghouse_X1939 23.5 Westinghouse_X1940 26.5 Westinghouse_X1941 36.2 Westinghouse_X1942 60.8 Westinghouse_X1943 84.4 Westinghouse_X1944 91.2 Westinghouse_X1945 92.4 Westinghouse_X1946 86.0 Westinghouse_X1947 111.1 Westinghouse_X1948 130.6 Westinghouse_X1949 141.8 Westinghouse_X1950 136.7 Westinghouse_X1951 129.7 Westinghouse_X1952 145.5 Westinghouse_X1953 174.8 Westinghouse_X1954 213.5 $Chrysler Chrysler_invest ~ Chrysler_value + Chrysler_capital $General.Electric General.Electric_invest ~ General.Electric_value + General.Electric_capital $General.Motors General.Motors_invest ~ General.Motors_value + General.Motors_capital $US.Steel US.Steel_invest ~ US.Steel_value + US.Steel_capital $Westinghouse Westinghouse_invest ~ Westinghouse_value + Westinghouse_capital Chrysler_invest ~ Chrysler_value + Chrysler_capital $Chrysler Chrysler_invest ~ Chrysler_value + Chrysler_capital attr(,"variables") list(Chrysler_invest, Chrysler_value, Chrysler_capital) attr(,"factors") Chrysler_value Chrysler_capital Chrysler_invest 0 0 Chrysler_value 1 0 Chrysler_capital 0 1 attr(,"term.labels") [1] "Chrysler_value" "Chrysler_capital" attr(,"order") [1] 1 1 attr(,"intercept") [1] 1 attr(,"response") [1] 1 attr(,".Environment") attr(,"predvars") list(Chrysler_invest, Chrysler_value, Chrysler_capital) attr(,"dataClasses") Chrysler_invest Chrysler_value Chrysler_capital "numeric" "numeric" "numeric" $General.Electric General.Electric_invest ~ General.Electric_value + General.Electric_capital attr(,"variables") list(General.Electric_invest, General.Electric_value, General.Electric_capital) attr(,"factors") General.Electric_value General.Electric_capital General.Electric_invest 0 0 General.Electric_value 1 0 General.Electric_capital 0 1 attr(,"term.labels") [1] "General.Electric_value" "General.Electric_capital" attr(,"order") [1] 1 1 attr(,"intercept") [1] 1 attr(,"response") [1] 1 attr(,".Environment") attr(,"predvars") list(General.Electric_invest, General.Electric_value, General.Electric_capital) attr(,"dataClasses") General.Electric_invest General.Electric_value General.Electric_capital "numeric" "numeric" "numeric" $General.Motors General.Motors_invest ~ General.Motors_value + General.Motors_capital attr(,"variables") list(General.Motors_invest, General.Motors_value, General.Motors_capital) attr(,"factors") General.Motors_value General.Motors_capital General.Motors_invest 0 0 General.Motors_value 1 0 General.Motors_capital 0 1 attr(,"term.labels") [1] "General.Motors_value" "General.Motors_capital" attr(,"order") [1] 1 1 attr(,"intercept") [1] 1 attr(,"response") [1] 1 attr(,".Environment") attr(,"predvars") list(General.Motors_invest, General.Motors_value, General.Motors_capital) attr(,"dataClasses") General.Motors_invest General.Motors_value General.Motors_capital "numeric" "numeric" "numeric" $US.Steel US.Steel_invest ~ US.Steel_value + US.Steel_capital attr(,"variables") list(US.Steel_invest, US.Steel_value, US.Steel_capital) attr(,"factors") US.Steel_value US.Steel_capital US.Steel_invest 0 0 US.Steel_value 1 0 US.Steel_capital 0 1 attr(,"term.labels") [1] "US.Steel_value" "US.Steel_capital" attr(,"order") [1] 1 1 attr(,"intercept") [1] 1 attr(,"response") [1] 1 attr(,".Environment") attr(,"predvars") list(US.Steel_invest, US.Steel_value, US.Steel_capital) attr(,"dataClasses") US.Steel_invest US.Steel_value US.Steel_capital "numeric" "numeric" "numeric" $Westinghouse Westinghouse_invest ~ Westinghouse_value + Westinghouse_capital attr(,"variables") list(Westinghouse_invest, Westinghouse_value, Westinghouse_capital) attr(,"factors") Westinghouse_value Westinghouse_capital Westinghouse_invest 0 0 Westinghouse_value 1 0 Westinghouse_capital 0 1 attr(,"term.labels") [1] "Westinghouse_value" "Westinghouse_capital" attr(,"order") [1] 1 1 attr(,"intercept") [1] 1 attr(,"response") [1] 1 attr(,".Environment") attr(,"predvars") list(Westinghouse_invest, Westinghouse_value, Westinghouse_capital) attr(,"dataClasses") Westinghouse_invest Westinghouse_value Westinghouse_capital "numeric" "numeric" "numeric" Chrysler_invest ~ Chrysler_value + Chrysler_capital attr(,"variables") list(Chrysler_invest, Chrysler_value, Chrysler_capital) attr(,"factors") Chrysler_value Chrysler_capital Chrysler_invest 0 0 Chrysler_value 1 0 Chrysler_capital 0 1 attr(,"term.labels") [1] "Chrysler_value" "Chrysler_capital" attr(,"order") [1] 1 1 attr(,"intercept") [1] 1 attr(,"response") [1] 1 attr(,".Environment") attr(,"predvars") list(Chrysler_invest, Chrysler_value, Chrysler_capital) attr(,"dataClasses") Chrysler_invest Chrysler_value Chrysler_capital "numeric" "numeric" "numeric" > > > ######### IV estimation ####################### > ### 2SLS ### > # instruments = explanatory variables -> 2SLS estimates = OLS estimates > if(requireNamespace( 'plm', quietly = TRUE ) ) { + greene2sls <- systemfit( formulaGrunfeld, inst = ~ value + capital, "2SLS", + data = GrunfeldGreene, useMatrix = useMatrix ) + print( greene2sls ) + print( summary( greene2sls ) ) + print( all.equal( coef( summary( greene2sls ) ), coef( summary( greeneOls ) ) ) ) + print( all.equal( greene2sls[ -c(1,2,6) ], greeneOls[ -c(1,2,6) ] ) ) + for( i in 1:length( greene2sls$eq ) ) { + print( all.equal( greene2sls$eq[[i]][ -c(3,15:17) ], + greeneOls$eq[[i]][-3] ) ) + } + } systemfit results method: 2SLS Coefficients: Chrysler_(Intercept) Chrysler_value -6.1900 0.0779 Chrysler_capital General.Electric_(Intercept) 0.3157 -9.9563 General.Electric_value General.Electric_capital 0.0266 0.1517 General.Motors_(Intercept) General.Motors_value -149.7825 0.1193 General.Motors_capital US.Steel_(Intercept) 0.3714 -30.3685 US.Steel_value US.Steel_capital 0.1566 0.4239 Westinghouse_(Intercept) Westinghouse_value -0.5094 0.0529 Westinghouse_capital 0.0924 systemfit results method: 2SLS N DF SSR detRCov OLS-R2 McElroy-R2 system 100 85 339121 2.09e+14 0.848 0.862 N DF SSR MSE RMSE R2 Adj R2 Chrysler 20 17 2997 176 13.3 0.914 0.903 General.Electric 20 17 13217 777 27.9 0.705 0.671 General.Motors 20 17 143206 8424 91.8 0.921 0.912 US.Steel 20 17 177928 10466 102.3 0.440 0.374 Westinghouse 20 17 1773 104 10.2 0.744 0.714 The covariance matrix of the residuals Chrysler General.Electric General.Motors US.Steel Westinghouse Chrysler 176.3 -25.1 -333 492 15.7 General.Electric -25.1 777.4 715 1065 207.6 General.Motors -332.7 714.7 8424 -2614 148.4 US.Steel 491.9 1064.6 -2614 10466 642.6 Westinghouse 15.7 207.6 148 643 104.3 The correlations of the residuals Chrysler General.Electric General.Motors US.Steel Westinghouse Chrysler 1.0000 -0.0679 -0.273 0.362 0.115 General.Electric -0.0679 1.0000 0.279 0.373 0.729 General.Motors -0.2730 0.2793 1.000 -0.278 0.158 US.Steel 0.3621 0.3732 -0.278 1.000 0.615 Westinghouse 0.1154 0.7290 0.158 0.615 1.000 2SLS estimates for 'Chrysler' (equation 1) Model Formula: Chrysler_invest ~ Chrysler_value + Chrysler_capital Instruments: ~Chrysler_value + Chrysler_capital Estimate Std. Error t value Pr(>|t|) (Intercept) -6.1900 13.5065 -0.46 0.6525 value 0.0779 0.0200 3.90 0.0011 ** capital 0.3157 0.0288 10.96 4e-09 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 13.279 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 2997.444 MSE: 176.32 Root MSE: 13.279 Multiple R-Squared: 0.914 Adjusted R-Squared: 0.903 2SLS estimates for 'General.Electric' (equation 2) Model Formula: General.Electric_invest ~ General.Electric_value + General.Electric_capital Instruments: ~General.Electric_value + General.Electric_capital Estimate Std. Error t value Pr(>|t|) (Intercept) -9.9563 31.3742 -0.32 0.75 value 0.0266 0.0156 1.71 0.11 capital 0.1517 0.0257 5.90 1.7e-05 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 27.883 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 13216.588 MSE: 777.446 Root MSE: 27.883 Multiple R-Squared: 0.705 Adjusted R-Squared: 0.671 2SLS estimates for 'General.Motors' (equation 3) Model Formula: General.Motors_invest ~ General.Motors_value + General.Motors_capital Instruments: ~General.Motors_value + General.Motors_capital Estimate Std. Error t value Pr(>|t|) (Intercept) -149.7825 105.8421 -1.42 0.17508 value 0.1193 0.0258 4.62 0.00025 *** capital 0.3714 0.0371 10.02 1.5e-08 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 91.782 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 143205.877 MSE: 8423.875 Root MSE: 91.782 Multiple R-Squared: 0.921 Adjusted R-Squared: 0.912 2SLS estimates for 'US.Steel' (equation 4) Model Formula: US.Steel_invest ~ US.Steel_value + US.Steel_capital Instruments: ~US.Steel_value + US.Steel_capital Estimate Std. Error t value Pr(>|t|) (Intercept) -30.3685 157.0477 -0.19 0.849 value 0.1566 0.0789 1.98 0.064 . capital 0.4239 0.1552 2.73 0.014 * --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 102.305 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 177928.314 MSE: 10466.371 Root MSE: 102.305 Multiple R-Squared: 0.44 Adjusted R-Squared: 0.374 2SLS estimates for 'Westinghouse' (equation 5) Model Formula: Westinghouse_invest ~ Westinghouse_value + Westinghouse_capital Instruments: ~Westinghouse_value + Westinghouse_capital Estimate Std. Error t value Pr(>|t|) (Intercept) -0.5094 8.0153 -0.06 0.9501 value 0.0529 0.0157 3.37 0.0037 ** capital 0.0924 0.0561 1.65 0.1179 --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 10.213 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 1773.234 MSE: 104.308 Root MSE: 10.213 Multiple R-Squared: 0.744 Adjusted R-Squared: 0.714 [1] TRUE [1] TRUE [1] TRUE [1] TRUE [1] TRUE [1] TRUE [1] TRUE > # 'real' IV/2SLS estimation > if(requireNamespace( 'plm', quietly = TRUE ) ) { + greene2slsR <- systemfit( invest ~ capital, inst = ~ value, "2SLS", + data = GrunfeldGreene, useMatrix = useMatrix ) + print( greene2slsR ) + print( summary( greene2slsR ) ) + } systemfit results method: 2SLS Coefficients: Chrysler_(Intercept) Chrysler_capital 4.314 0.675 General.Electric_(Intercept) General.Electric_capital -106.788 0.522 General.Motors_(Intercept) General.Motors_capital 110.940 0.767 US.Steel_(Intercept) US.Steel_capital -323.878 2.432 Westinghouse_(Intercept) Westinghouse_capital 13.163 0.347 systemfit results method: 2SLS N DF SSR detRCov OLS-R2 McElroy-R2 system 100 90 3239824 2.75e+17 -0.456 0.476 N DF SSR MSE RMSE R2 Adj R2 Chrysler 20 18 30374 1687 41.1 0.124 0.076 General.Electric 20 18 174998 9722 98.6 -2.902 -3.119 General.Motors 20 18 1100181 61121 247.2 0.396 0.362 US.Steel 20 18 1930347 107242 327.5 -5.072 -5.409 Westinghouse 20 18 3924 218 14.8 0.434 0.403 The covariance matrix of the residuals Chrysler General.Electric General.Motors US.Steel Westinghouse Chrysler 1687 3089 6820 11741 179 General.Electric 3089 9722 20780 23319 886 General.Motors 6820 20780 61121 44203 1908 US.Steel 11741 23319 44203 107242 1977 Westinghouse 179 886 1908 1977 218 The correlations of the residuals Chrysler General.Electric General.Motors US.Steel Westinghouse Chrysler 1.000 0.763 0.672 0.873 0.295 General.Electric 0.763 1.000 0.852 0.722 0.608 General.Motors 0.672 0.852 1.000 0.546 0.523 US.Steel 0.873 0.722 0.546 1.000 0.409 Westinghouse 0.295 0.608 0.523 0.409 1.000 2SLS estimates for 'Chrysler' (equation 1) Model Formula: Chrysler_invest ~ Chrysler_capital Instruments: ~Chrysler_value Estimate Std. Error t value Pr(>|t|) (Intercept) 4.314 34.033 0.13 0.901 capital 0.675 0.270 2.50 0.022 * --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 41.078 on 18 degrees of freedom Number of observations: 20 Degrees of Freedom: 18 SSR: 30373.531 MSE: 1687.418 Root MSE: 41.078 Multiple R-Squared: 0.124 Adjusted R-Squared: 0.076 2SLS estimates for 'General.Electric' (equation 2) Model Formula: General.Electric_invest ~ General.Electric_capital Instruments: ~General.Electric_value Estimate Std. Error t value Pr(>|t|) (Intercept) -106.788 306.251 -0.35 0.73 capital 0.522 0.763 0.68 0.50 Residual standard error: 98.601 on 18 degrees of freedom Number of observations: 20 Degrees of Freedom: 18 SSR: 174998.166 MSE: 9722.12 Root MSE: 98.601 Multiple R-Squared: -2.902 Adjusted R-Squared: -3.119 2SLS estimates for 'General.Motors' (equation 3) Model Formula: General.Motors_invest ~ General.Motors_capital Instruments: ~General.Motors_value Estimate Std. Error t value Pr(>|t|) (Intercept) 110.940 145.626 0.76 0.4560 capital 0.767 0.208 3.69 0.0017 ** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 247.227 on 18 degrees of freedom Number of observations: 20 Degrees of Freedom: 18 SSR: 1100180.666 MSE: 61121.148 Root MSE: 247.227 Multiple R-Squared: 0.396 Adjusted R-Squared: 0.362 2SLS estimates for 'US.Steel' (equation 4) Model Formula: US.Steel_invest ~ US.Steel_capital Instruments: ~US.Steel_value Estimate Std. Error t value Pr(>|t|) (Intercept) -323.88 962.57 -0.34 0.74 capital 2.43 3.20 0.76 0.46 Residual standard error: 327.478 on 18 degrees of freedom Number of observations: 20 Degrees of Freedom: 18 SSR: 1930347.395 MSE: 107241.522 Root MSE: 327.478 Multiple R-Squared: -5.072 Adjusted R-Squared: -5.409 2SLS estimates for 'Westinghouse' (equation 5) Model Formula: Westinghouse_invest ~ Westinghouse_capital Instruments: ~Westinghouse_value Estimate Std. Error t value Pr(>|t|) (Intercept) 13.1626 7.0965 1.85 0.08008 . capital 0.3471 0.0734 4.73 0.00017 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 14.765 on 18 degrees of freedom Number of observations: 20 Degrees of Freedom: 18 SSR: 3923.899 MSE: 217.994 Root MSE: 14.765 Multiple R-Squared: 0.434 Adjusted R-Squared: 0.403 > > ### 2SLS, pooled ### > # instruments = explanatory variables -> 2SLS estimates = OLS estimates > if(requireNamespace( 'plm', quietly = TRUE ) ) { + greene2slsPooled <- systemfit( formulaGrunfeld, inst = ~ value + capital, "2SLS", + data = GrunfeldGreene, pooled = TRUE, useMatrix = useMatrix ) + print( greene2slsPooled ) + print( summary( greene2slsPooled ) ) + print( all.equal( coef( summary( greene2slsPooled ) ), + coef( summary( greeneOlsPooled ) ) ) ) + print( all.equal( greene2slsPooled[ -c(1,2,6) ], greeneOlsPooled[ -c(1,2,6) ] ) ) + for( i in 1:length( greene2slsPooled$eq ) ) { + print( all.equal( greene2slsPooled$eq[[i]][ -c(3,15:17) ], + greeneOlsPooled$eq[[i]][-3] ) ) + } + } systemfit results method: 2SLS Coefficients: Chrysler_(Intercept) Chrysler_value -48.030 0.105 Chrysler_capital General.Electric_(Intercept) 0.305 -48.030 General.Electric_value General.Electric_capital 0.105 0.305 General.Motors_(Intercept) General.Motors_value -48.030 0.105 General.Motors_capital US.Steel_(Intercept) 0.305 -48.030 US.Steel_value US.Steel_capital 0.105 0.305 Westinghouse_(Intercept) Westinghouse_value -48.030 0.105 Westinghouse_capital 0.305 systemfit results method: 2SLS N DF SSR detRCov OLS-R2 McElroy-R2 system 100 97 1570884 4.2e+17 0.294 0.812 N DF SSR MSE RMSE R2 Adj R2 Chrysler 20 17 15117 889 29.8 0.564 0.513 General.Electric 20 17 685770 40339 200.8 -14.291 -16.090 General.Motors 20 17 188218 11072 105.2 0.897 0.884 US.Steel 20 17 669110 39359 198.4 -1.105 -1.352 Westinghouse 20 17 12668 745 27.3 -0.826 -1.041 The covariance matrix of the residuals Chrysler General.Electric General.Motors US.Steel Westinghouse Chrysler 889.2 -4898 -198 4748 -94.6 General.Electric -4898.1 40339 -2254 -32821 2658.0 General.Motors -197.7 -2254 11072 304 -1328.6 US.Steel 4748.1 -32821 304 39359 -1377.3 Westinghouse -94.6 2658 -1329 -1377 745.2 The correlations of the residuals Chrysler General.Electric General.Motors US.Steel Westinghouse Chrysler 1.000 0.144 -0.1852 0.2218 0.186 General.Electric 0.144 1.000 -0.2592 -0.1216 0.881 General.Motors -0.185 -0.259 1.0000 -0.0155 -0.469 US.Steel 0.222 -0.122 -0.0155 1.0000 -0.119 Westinghouse 0.186 0.881 -0.4689 -0.1186 1.000 2SLS estimates for 'Chrysler' (equation 1) Model Formula: Chrysler_invest ~ Chrysler_value + Chrysler_capital Instruments: ~Chrysler_value + Chrysler_capital Estimate Std. Error t value Pr(>|t|) (Intercept) -48.0297 21.4802 -2.24 0.028 * value 0.1051 0.0114 9.24 6.0e-15 *** capital 0.3054 0.0435 7.02 3.1e-10 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 29.82 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 15117.016 MSE: 889.236 Root MSE: 29.82 Multiple R-Squared: 0.564 Adjusted R-Squared: 0.513 2SLS estimates for 'General.Electric' (equation 2) Model Formula: General.Electric_invest ~ General.Electric_value + General.Electric_capital Instruments: ~General.Electric_value + General.Electric_capital Estimate Std. Error t value Pr(>|t|) (Intercept) -48.0297 21.4802 -2.24 0.028 * value 0.1051 0.0114 9.24 6.0e-15 *** capital 0.3054 0.0435 7.02 3.1e-10 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 200.847 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 685769.815 MSE: 40339.401 Root MSE: 200.847 Multiple R-Squared: -14.291 Adjusted R-Squared: -16.09 2SLS estimates for 'General.Motors' (equation 3) Model Formula: General.Motors_invest ~ General.Motors_value + General.Motors_capital Instruments: ~General.Motors_value + General.Motors_capital Estimate Std. Error t value Pr(>|t|) (Intercept) -48.0297 21.4802 -2.24 0.028 * value 0.1051 0.0114 9.24 6.0e-15 *** capital 0.3054 0.0435 7.02 3.1e-10 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 105.222 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 188218.158 MSE: 11071.656 Root MSE: 105.222 Multiple R-Squared: 0.897 Adjusted R-Squared: 0.884 2SLS estimates for 'US.Steel' (equation 4) Model Formula: US.Steel_invest ~ US.Steel_value + US.Steel_capital Instruments: ~US.Steel_value + US.Steel_capital Estimate Std. Error t value Pr(>|t|) (Intercept) -48.0297 21.4802 -2.24 0.028 * value 0.1051 0.0114 9.24 6.0e-15 *** capital 0.3054 0.0435 7.02 3.1e-10 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 198.392 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 669110.225 MSE: 39359.425 Root MSE: 198.392 Multiple R-Squared: -1.105 Adjusted R-Squared: -1.352 2SLS estimates for 'Westinghouse' (equation 5) Model Formula: Westinghouse_invest ~ Westinghouse_value + Westinghouse_capital Instruments: ~Westinghouse_value + Westinghouse_capital Estimate Std. Error t value Pr(>|t|) (Intercept) -48.0297 21.4802 -2.24 0.028 * value 0.1051 0.0114 9.24 6.0e-15 *** capital 0.3054 0.0435 7.02 3.1e-10 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 27.298 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 12668.473 MSE: 745.204 Root MSE: 27.298 Multiple R-Squared: -0.826 Adjusted R-Squared: -1.041 [1] TRUE [1] TRUE [1] TRUE [1] TRUE [1] TRUE [1] TRUE [1] TRUE > # 'real' IV/2SLS estimation > if(requireNamespace( 'plm', quietly = TRUE ) ) { + greene2slsRPooled <- systemfit( invest ~ capital, inst = ~ value, "2SLS", + data = GrunfeldGreene, pooled = TRUE, useMatrix = useMatrix ) + print( greene2slsRPooled ) + print( summary( greene2slsRPooled ) ) + } systemfit results method: 2SLS Coefficients: Chrysler_(Intercept) Chrysler_capital -15.105 0.849 General.Electric_(Intercept) General.Electric_capital -15.105 0.849 General.Motors_(Intercept) General.Motors_capital -15.105 0.849 US.Steel_(Intercept) US.Steel_capital -15.105 0.849 Westinghouse_(Intercept) Westinghouse_capital -15.105 0.849 systemfit results method: 2SLS N DF SSR detRCov OLS-R2 McElroy-R2 system 100 98 4164182 2.53e+19 -0.871 -0.832 N DF SSR MSE RMSE R2 Adj R2 Chrysler 20 18 64130 3563 59.7 -0.849 -0.952 General.Electric 20 18 1575287 87516 295.8 -34.125 -36.076 General.Motors 20 18 1655592 91977 303.3 0.091 0.040 US.Steel 20 18 833908 46328 215.2 -1.623 -1.769 Westinghouse 20 18 35264 1959 44.3 -4.082 -4.365 The covariance matrix of the residuals Chrysler General.Electric General.Motors US.Steel Westinghouse Chrysler 3563 9506 13222 2659 1862 General.Electric 9506 87516 29381 -35898 10615 General.Motors 13222 29381 91977 17584 8562 US.Steel 2659 -35898 17584 46328 -762 Westinghouse 1862 10615 8562 -762 1959 The correlations of the residuals Chrysler General.Electric General.Motors US.Steel Westinghouse Chrysler 1.000 0.843 0.763 0.397 0.742 General.Electric 0.843 1.000 0.893 0.226 0.933 General.Motors 0.763 0.893 1.000 0.114 0.801 US.Steel 0.397 0.226 0.114 1.000 0.375 Westinghouse 0.742 0.933 0.801 0.375 1.000 2SLS estimates for 'Chrysler' (equation 1) Model Formula: Chrysler_invest ~ Chrysler_capital Instruments: ~Chrysler_value Estimate Std. Error t value Pr(>|t|) (Intercept) -15.1045 33.8915 -0.45 0.66 capital 0.8489 0.0865 9.82 4.4e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 59.689 on 18 degrees of freedom Number of observations: 20 Degrees of Freedom: 18 SSR: 64130.003 MSE: 3562.778 Root MSE: 59.689 Multiple R-Squared: -0.849 Adjusted R-Squared: -0.952 2SLS estimates for 'General.Electric' (equation 2) Model Formula: General.Electric_invest ~ General.Electric_capital Instruments: ~General.Electric_value Estimate Std. Error t value Pr(>|t|) (Intercept) -15.1045 33.8915 -0.45 0.66 capital 0.8489 0.0865 9.82 4.4e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 295.831 on 18 degrees of freedom Number of observations: 20 Degrees of Freedom: 18 SSR: 1575287.29 MSE: 87515.961 Root MSE: 295.831 Multiple R-Squared: -34.125 Adjusted R-Squared: -36.076 2SLS estimates for 'General.Motors' (equation 3) Model Formula: General.Motors_invest ~ General.Motors_capital Instruments: ~General.Motors_value Estimate Std. Error t value Pr(>|t|) (Intercept) -15.1045 33.8915 -0.45 0.66 capital 0.8489 0.0865 9.82 4.4e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 303.278 on 18 degrees of freedom Number of observations: 20 Degrees of Freedom: 18 SSR: 1655591.854 MSE: 91977.325 Root MSE: 303.278 Multiple R-Squared: 0.091 Adjusted R-Squared: 0.04 2SLS estimates for 'US.Steel' (equation 4) Model Formula: US.Steel_invest ~ US.Steel_capital Instruments: ~US.Steel_value Estimate Std. Error t value Pr(>|t|) (Intercept) -15.1045 33.8915 -0.45 0.66 capital 0.8489 0.0865 9.82 4.4e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 215.24 on 18 degrees of freedom Number of observations: 20 Degrees of Freedom: 18 SSR: 833908.389 MSE: 46328.244 Root MSE: 215.24 Multiple R-Squared: -1.623 Adjusted R-Squared: -1.769 2SLS estimates for 'Westinghouse' (equation 5) Model Formula: Westinghouse_invest ~ Westinghouse_capital Instruments: ~Westinghouse_value Estimate Std. Error t value Pr(>|t|) (Intercept) -15.1045 33.8915 -0.45 0.66 capital 0.8489 0.0865 9.82 4.4e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 44.262 on 18 degrees of freedom Number of observations: 20 Degrees of Freedom: 18 SSR: 35264.462 MSE: 1959.137 Root MSE: 44.262 Multiple R-Squared: -4.082 Adjusted R-Squared: -4.365 > > ### 3SLS ### > # instruments = explanatory variables -> 3SLS estimates = SUR estimates > if(requireNamespace( 'plm', quietly = TRUE ) ) { + greene3sls <- systemfit( formulaGrunfeld, inst = ~ value + capital, "3SLS", + data = GrunfeldGreene, useMatrix = useMatrix, methodResidCov = "noDfCor" ) + print( greene3sls ) + print( summary( greene3sls ) ) + print( all.equal( coef( summary( greene3sls ) ), coef( summary( greeneSur ) ) ) ) + print( all.equal( greene3sls[ -c(1,2,7) ], greeneSur[ -c(1,2,7) ] ) ) + for( i in 1:length( greene3sls$eq ) ) { + print( all.equal( greene3sls$eq[[i]][ -c(3,15:17) ], + greeneSur$eq[[i]][-3] ) ) + } + } systemfit results method: 3SLS Coefficients: Chrysler_(Intercept) Chrysler_value 0.5043 0.0695 Chrysler_capital General.Electric_(Intercept) 0.3085 -22.4389 General.Electric_value General.Electric_capital 0.0373 0.1308 General.Motors_(Intercept) General.Motors_value -162.3641 0.1205 General.Motors_capital US.Steel_(Intercept) 0.3827 85.4233 US.Steel_value US.Steel_capital 0.1015 0.4000 Westinghouse_(Intercept) Westinghouse_value 1.0889 0.0570 Westinghouse_capital 0.0415 systemfit results method: 3SLS N DF SSR detRCov OLS-R2 McElroy-R2 system 100 85 347048 6.18e+13 0.844 0.869 N DF SSR MSE RMSE R2 Adj R2 Chrysler 20 17 3057 180 13.4 0.912 0.901 General.Electric 20 17 14009 824 28.7 0.688 0.651 General.Motors 20 17 144321 8489 92.1 0.921 0.911 US.Steel 20 17 183763 10810 104.0 0.422 0.354 Westinghouse 20 17 1898 112 10.6 0.726 0.694 The covariance matrix of the residuals used for estimation Chrysler General.Electric General.Motors US.Steel Westinghouse Chrysler 149.9 -21.4 -283 418 13.3 General.Electric -21.4 660.8 608 905 176.4 General.Motors -282.8 607.5 7160 -2222 126.2 US.Steel 418.1 905.0 -2222 8896 546.2 Westinghouse 13.3 176.4 126 546 88.7 The covariance matrix of the residuals Chrysler General.Electric General.Motors US.Steel Westinghouse Chrysler 152.85 2.05 -314 455 16.7 General.Electric 2.05 700.46 605 1224 200.3 General.Motors -313.70 605.34 7216 -2687 129.9 US.Steel 455.09 1224.41 -2687 9188 652.7 Westinghouse 16.66 200.32 130 653 94.9 The correlations of the residuals Chrysler General.Electric General.Motors US.Steel Westinghouse Chrysler 1.00000 0.00626 -0.299 0.384 0.138 General.Electric 0.00626 1.00000 0.269 0.483 0.777 General.Motors -0.29870 0.26925 1.000 -0.330 0.157 US.Steel 0.38402 0.48264 -0.330 1.000 0.699 Westinghouse 0.13832 0.77690 0.157 0.699 1.000 3SLS estimates for 'Chrysler' (equation 1) Model Formula: Chrysler_invest ~ Chrysler_value + Chrysler_capital Instruments: ~Chrysler_value + Chrysler_capital Estimate Std. Error t value Pr(>|t|) (Intercept) 0.5043 11.5128 0.04 0.96557 value 0.0695 0.0169 4.12 0.00072 *** capital 0.3085 0.0259 11.93 1.1e-09 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 13.41 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 3056.985 MSE: 179.823 Root MSE: 13.41 Multiple R-Squared: 0.912 Adjusted R-Squared: 0.901 3SLS estimates for 'General.Electric' (equation 2) Model Formula: General.Electric_invest ~ General.Electric_value + General.Electric_capital Instruments: ~General.Electric_value + General.Electric_capital Estimate Std. Error t value Pr(>|t|) (Intercept) -22.4389 25.5186 -0.88 0.3915 value 0.0373 0.0123 3.04 0.0074 ** capital 0.1308 0.0220 5.93 1.6e-05 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 28.707 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 14009.115 MSE: 824.066 Root MSE: 28.707 Multiple R-Squared: 0.688 Adjusted R-Squared: 0.651 3SLS estimates for 'General.Motors' (equation 3) Model Formula: General.Motors_invest ~ General.Motors_value + General.Motors_capital Instruments: ~General.Motors_value + General.Motors_capital Estimate Std. Error t value Pr(>|t|) (Intercept) -162.3641 89.4592 -1.81 0.087 . value 0.1205 0.0216 5.57 3.4e-05 *** capital 0.3827 0.0328 11.68 1.5e-09 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 92.138 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 144320.876 MSE: 8489.463 Root MSE: 92.138 Multiple R-Squared: 0.921 Adjusted R-Squared: 0.911 3SLS estimates for 'US.Steel' (equation 4) Model Formula: US.Steel_invest ~ US.Steel_value + US.Steel_capital Instruments: ~US.Steel_value + US.Steel_capital Estimate Std. Error t value Pr(>|t|) (Intercept) 85.4233 111.8774 0.76 0.4556 value 0.1015 0.0548 1.85 0.0814 . capital 0.4000 0.1278 3.13 0.0061 ** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 103.969 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 183763.011 MSE: 10809.589 Root MSE: 103.969 Multiple R-Squared: 0.422 Adjusted R-Squared: 0.354 3SLS estimates for 'Westinghouse' (equation 5) Model Formula: Westinghouse_invest ~ Westinghouse_value + Westinghouse_capital Instruments: ~Westinghouse_value + Westinghouse_capital Estimate Std. Error t value Pr(>|t|) (Intercept) 1.0889 6.2588 0.17 0.86394 value 0.0570 0.0114 5.02 0.00011 *** capital 0.0415 0.0412 1.01 0.32787 --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 10.567 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 1898.249 MSE: 111.662 Root MSE: 10.567 Multiple R-Squared: 0.726 Adjusted R-Squared: 0.694 [1] TRUE [1] TRUE [1] TRUE [1] TRUE [1] TRUE [1] TRUE [1] TRUE > # 'real' IV/3SLS estimation > if(requireNamespace( 'plm', quietly = TRUE ) ) { + greene3slsR <- systemfit( invest ~ capital, inst = ~ value, "3SLS", + data = GrunfeldGreene, useMatrix = useMatrix ) + print( greene3slsR ) + print( summary( greene3slsR ) ) + } systemfit results method: 3SLS Coefficients: Chrysler_(Intercept) Chrysler_capital 23.499 0.517 General.Electric_(Intercept) General.Electric_capital -108.596 0.527 General.Motors_(Intercept) General.Motors_capital 199.856 0.629 US.Steel_(Intercept) US.Steel_capital 181.691 0.746 Westinghouse_(Intercept) Westinghouse_capital 11.668 0.365 systemfit results method: 3SLS N DF SSR detRCov OLS-R2 McElroy-R2 system 100 90 1026043 4.46e+16 0.539 0.539 N DF SSR MSE RMSE R2 Adj R2 Chrysler 20 18 12139 674 26.0 0.650 0.631 General.Electric 20 18 178965 9942 99.7 -2.990 -3.212 General.Motors 20 18 577860 32103 179.2 0.683 0.665 US.Steel 20 18 252838 14047 118.5 0.205 0.160 Westinghouse 20 18 4241 236 15.3 0.389 0.355 The covariance matrix of the residuals used for estimation Chrysler General.Electric General.Motors US.Steel Westinghouse Chrysler 1687 3089 6820 11741 179 General.Electric 3089 9722 20780 23319 886 General.Motors 6820 20780 61121 44203 1908 US.Steel 11741 23319 44203 107242 1977 Westinghouse 179 886 1908 1977 218 The covariance matrix of the residuals Chrysler General.Electric General.Motors US.Steel Westinghouse Chrysler 674 1587 1944 1371 137 General.Electric 1587 9942 13003 2009 996 General.Motors 1944 13003 32103 -908 1571 US.Steel 1371 2009 -908 14047 888 Westinghouse 137 996 1571 888 236 The correlations of the residuals Chrysler General.Electric General.Motors US.Steel Westinghouse Chrysler 1.000 0.613 0.4178 0.4454 0.343 General.Electric 0.613 1.000 0.7278 0.1700 0.651 General.Motors 0.418 0.728 1.0000 -0.0428 0.571 US.Steel 0.445 0.170 -0.0428 1.0000 0.488 Westinghouse 0.343 0.651 0.5713 0.4880 1.000 3SLS estimates for 'Chrysler' (equation 1) Model Formula: Chrysler_invest ~ Chrysler_capital Instruments: ~Chrysler_value Estimate Std. Error t value Pr(>|t|) (Intercept) 23.499 17.165 1.37 0.18784 capital 0.517 0.120 4.32 0.00041 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 25.969 on 18 degrees of freedom Number of observations: 20 Degrees of Freedom: 18 SSR: 12138.974 MSE: 674.387 Root MSE: 25.969 Multiple R-Squared: 0.65 Adjusted R-Squared: 0.631 3SLS estimates for 'General.Electric' (equation 2) Model Formula: General.Electric_invest ~ General.Electric_capital Instruments: ~General.Electric_value Estimate Std. Error t value Pr(>|t|) (Intercept) -108.596 152.939 -0.71 0.49 capital 0.527 0.378 1.39 0.18 Residual standard error: 99.712 on 18 degrees of freedom Number of observations: 20 Degrees of Freedom: 18 SSR: 178964.956 MSE: 9942.498 Root MSE: 99.712 Multiple R-Squared: -2.99 Adjusted R-Squared: -3.212 3SLS estimates for 'General.Motors' (equation 3) Model Formula: General.Motors_invest ~ General.Motors_capital Instruments: ~General.Motors_value Estimate Std. Error t value Pr(>|t|) (Intercept) 199.856 98.953 2.02 0.059 . capital 0.629 0.127 4.97 9.8e-05 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 179.174 on 18 degrees of freedom Number of observations: 20 Degrees of Freedom: 18 SSR: 577859.714 MSE: 32103.317 Root MSE: 179.174 Multiple R-Squared: 0.683 Adjusted R-Squared: 0.665 3SLS estimates for 'US.Steel' (equation 4) Model Formula: US.Steel_invest ~ US.Steel_capital Instruments: ~US.Steel_value Estimate Std. Error t value Pr(>|t|) (Intercept) 181.691 448.797 0.40 0.69 capital 0.746 1.477 0.51 0.62 Residual standard error: 118.518 on 18 degrees of freedom Number of observations: 20 Degrees of Freedom: 18 SSR: 252838.286 MSE: 14046.571 Root MSE: 118.518 Multiple R-Squared: 0.205 Adjusted R-Squared: 0.16 3SLS estimates for 'Westinghouse' (equation 5) Model Formula: Westinghouse_invest ~ Westinghouse_capital Instruments: ~Westinghouse_value Estimate Std. Error t value Pr(>|t|) (Intercept) 11.6685 5.9043 1.98 0.064 . capital 0.3646 0.0572 6.38 5.2e-06 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 15.349 on 18 degrees of freedom Number of observations: 20 Degrees of Freedom: 18 SSR: 4240.92 MSE: 235.607 Root MSE: 15.349 Multiple R-Squared: 0.389 Adjusted R-Squared: 0.355 > > ### 3SLS, Pooled ### > # instruments = explanatory variables -> 3SLS estimates = SUR estimates > if(requireNamespace( 'plm', quietly = TRUE ) ) { + greene3slsPooled <- systemfit( formulaGrunfeld, inst = ~ capital + value, "3SLS", + data = GrunfeldGreene, pooled = TRUE, useMatrix = useMatrix, + residCovWeighted = TRUE, methodResidCov = "noDfCor" ) + print( greene3slsPooled ) + print( summary( greene3slsPooled ) ) + print( all.equal( coef( summary( greene3slsPooled ) ), + coef( summary( greeneSurPooled ) ) ) ) + print( all.equal( greene3slsPooled[ -c(1,2,7) ], greeneSurPooled[ -c(1,2,7) ] ) ) + for( i in 1:length( greene3slsPooled$eq ) ) { + print( all.equal( greene3slsPooled$eq[[i]][ -c(3,15:17) ], + greeneSurPooled$eq[[i]][-3] ) ) + } + } systemfit results method: 3SLS Coefficients: Chrysler_(Intercept) Chrysler_value -28.2467 0.0891 Chrysler_capital General.Electric_(Intercept) 0.3340 -28.2467 General.Electric_value General.Electric_capital 0.0891 0.3340 General.Motors_(Intercept) General.Motors_value -28.2467 0.0891 General.Motors_capital US.Steel_(Intercept) 0.3340 -28.2467 US.Steel_value US.Steel_capital 0.0891 0.3340 Westinghouse_(Intercept) Westinghouse_value -28.2467 0.0891 Westinghouse_capital 0.3340 systemfit results method: 3SLS N DF SSR detRCov OLS-R2 McElroy-R2 system 100 97 1604301 9.95e+16 0.279 0.844 N DF SSR MSE RMSE R2 Adj R2 Chrysler 20 17 6112 360 19.0 0.824 0.803 General.Electric 20 17 691132 40655 201.6 -14.410 -16.223 General.Motors 20 17 201010 11824 108.7 0.890 0.877 US.Steel 20 17 689380 40552 201.4 -1.168 -1.424 Westinghouse 20 17 16667 980 31.3 -1.402 -1.685 The covariance matrix of the residuals used for estimation Chrysler General.Electric General.Motors US.Steel Westinghouse Chrysler 409 -2594 -197 2594 -102 General.Electric -2594 36563 -3480 -28623 3797 General.Motors -197 -3480 8612 996 -971 US.Steel 2594 -28623 996 32903 -2272 Westinghouse -102 3797 -971 -2272 778 The covariance matrix of the residuals Chrysler General.Electric General.Motors US.Steel Westinghouse Chrysler 305.61 -1967 -4.81 2159 -124 General.Electric -1966.65 34557 -7160.67 -28722 4274 General.Motors -4.81 -7161 10050.52 4440 -1401 US.Steel 2158.60 -28722 4439.99 34469 -2894 Westinghouse -123.92 4274 -1400.75 -2894 833 The correlations of the residuals Chrysler General.Electric General.Motors US.Steel Westinghouse Chrysler 1.000 0.220 -0.3447 0.2008 0.2907 General.Electric 0.220 1.000 -0.2233 -0.1587 0.8973 General.Motors -0.345 -0.223 1.0000 -0.0924 -0.3760 US.Steel 0.201 -0.159 -0.0924 1.0000 -0.0757 Westinghouse 0.291 0.897 -0.3760 -0.0757 1.0000 3SLS estimates for 'Chrysler' (equation 1) Model Formula: Chrysler_invest ~ Chrysler_value + Chrysler_capital Instruments: ~Chrysler_capital + Chrysler_value Estimate Std. Error t value Pr(>|t|) (Intercept) -28.24669 4.88824 -5.78 9.1e-08 *** value 0.08910 0.00507 17.57 < 2e-16 *** capital 0.33402 0.01671 19.99 < 2e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 18.962 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 6112.2 MSE: 359.541 Root MSE: 18.962 Multiple R-Squared: 0.824 Adjusted R-Squared: 0.803 3SLS estimates for 'General.Electric' (equation 2) Model Formula: General.Electric_invest ~ General.Electric_value + General.Electric_capital Instruments: ~General.Electric_capital + General.Electric_value Estimate Std. Error t value Pr(>|t|) (Intercept) -28.24669 4.88824 -5.78 9.1e-08 *** value 0.08910 0.00507 17.57 < 2e-16 *** capital 0.33402 0.01671 19.99 < 2e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 201.63 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 691132.056 MSE: 40654.827 Root MSE: 201.63 Multiple R-Squared: -14.41 Adjusted R-Squared: -16.223 3SLS estimates for 'General.Motors' (equation 3) Model Formula: General.Motors_invest ~ General.Motors_value + General.Motors_capital Instruments: ~General.Motors_capital + General.Motors_value Estimate Std. Error t value Pr(>|t|) (Intercept) -28.24669 4.88824 -5.78 9.1e-08 *** value 0.08910 0.00507 17.57 < 2e-16 *** capital 0.33402 0.01671 19.99 < 2e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 108.739 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 201010.497 MSE: 11824.147 Root MSE: 108.739 Multiple R-Squared: 0.89 Adjusted R-Squared: 0.877 3SLS estimates for 'US.Steel' (equation 4) Model Formula: US.Steel_invest ~ US.Steel_value + US.Steel_capital Instruments: ~US.Steel_capital + US.Steel_value Estimate Std. Error t value Pr(>|t|) (Intercept) -28.24669 4.88824 -5.78 9.1e-08 *** value 0.08910 0.00507 17.57 < 2e-16 *** capital 0.33402 0.01671 19.99 < 2e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 201.375 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 689379.52 MSE: 40551.736 Root MSE: 201.375 Multiple R-Squared: -1.168 Adjusted R-Squared: -1.424 3SLS estimates for 'Westinghouse' (equation 5) Model Formula: Westinghouse_invest ~ Westinghouse_value + Westinghouse_capital Instruments: ~Westinghouse_capital + Westinghouse_value Estimate Std. Error t value Pr(>|t|) (Intercept) -28.24669 4.88824 -5.78 9.1e-08 *** value 0.08910 0.00507 17.57 < 2e-16 *** capital 0.33402 0.01671 19.99 < 2e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 31.312 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 16667.149 MSE: 980.421 Root MSE: 31.312 Multiple R-Squared: -1.402 Adjusted R-Squared: -1.685 [1] TRUE [1] TRUE [1] TRUE [1] TRUE [1] TRUE [1] TRUE [1] TRUE > # 'real' IV/3SLS estimation > if(requireNamespace( 'plm', quietly = TRUE ) ) { + greene3slsRPooled <- systemfit( invest ~ capital, inst = ~ value, "3SLS", + data = GrunfeldGreene, useMatrix = useMatrix ) + print( greene3slsRPooled ) + print( summary( greene3slsRPooled ) ) + } systemfit results method: 3SLS Coefficients: Chrysler_(Intercept) Chrysler_capital 23.499 0.517 General.Electric_(Intercept) General.Electric_capital -108.596 0.527 General.Motors_(Intercept) General.Motors_capital 199.856 0.629 US.Steel_(Intercept) US.Steel_capital 181.691 0.746 Westinghouse_(Intercept) Westinghouse_capital 11.668 0.365 systemfit results method: 3SLS N DF SSR detRCov OLS-R2 McElroy-R2 system 100 90 1026043 4.46e+16 0.539 0.539 N DF SSR MSE RMSE R2 Adj R2 Chrysler 20 18 12139 674 26.0 0.650 0.631 General.Electric 20 18 178965 9942 99.7 -2.990 -3.212 General.Motors 20 18 577860 32103 179.2 0.683 0.665 US.Steel 20 18 252838 14047 118.5 0.205 0.160 Westinghouse 20 18 4241 236 15.3 0.389 0.355 The covariance matrix of the residuals used for estimation Chrysler General.Electric General.Motors US.Steel Westinghouse Chrysler 1687 3089 6820 11741 179 General.Electric 3089 9722 20780 23319 886 General.Motors 6820 20780 61121 44203 1908 US.Steel 11741 23319 44203 107242 1977 Westinghouse 179 886 1908 1977 218 The covariance matrix of the residuals Chrysler General.Electric General.Motors US.Steel Westinghouse Chrysler 674 1587 1944 1371 137 General.Electric 1587 9942 13003 2009 996 General.Motors 1944 13003 32103 -908 1571 US.Steel 1371 2009 -908 14047 888 Westinghouse 137 996 1571 888 236 The correlations of the residuals Chrysler General.Electric General.Motors US.Steel Westinghouse Chrysler 1.000 0.613 0.4178 0.4454 0.343 General.Electric 0.613 1.000 0.7278 0.1700 0.651 General.Motors 0.418 0.728 1.0000 -0.0428 0.571 US.Steel 0.445 0.170 -0.0428 1.0000 0.488 Westinghouse 0.343 0.651 0.5713 0.4880 1.000 3SLS estimates for 'Chrysler' (equation 1) Model Formula: Chrysler_invest ~ Chrysler_capital Instruments: ~Chrysler_value Estimate Std. Error t value Pr(>|t|) (Intercept) 23.499 17.165 1.37 0.18784 capital 0.517 0.120 4.32 0.00041 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 25.969 on 18 degrees of freedom Number of observations: 20 Degrees of Freedom: 18 SSR: 12138.974 MSE: 674.387 Root MSE: 25.969 Multiple R-Squared: 0.65 Adjusted R-Squared: 0.631 3SLS estimates for 'General.Electric' (equation 2) Model Formula: General.Electric_invest ~ General.Electric_capital Instruments: ~General.Electric_value Estimate Std. Error t value Pr(>|t|) (Intercept) -108.596 152.939 -0.71 0.49 capital 0.527 0.378 1.39 0.18 Residual standard error: 99.712 on 18 degrees of freedom Number of observations: 20 Degrees of Freedom: 18 SSR: 178964.956 MSE: 9942.498 Root MSE: 99.712 Multiple R-Squared: -2.99 Adjusted R-Squared: -3.212 3SLS estimates for 'General.Motors' (equation 3) Model Formula: General.Motors_invest ~ General.Motors_capital Instruments: ~General.Motors_value Estimate Std. Error t value Pr(>|t|) (Intercept) 199.856 98.953 2.02 0.059 . capital 0.629 0.127 4.97 9.8e-05 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 179.174 on 18 degrees of freedom Number of observations: 20 Degrees of Freedom: 18 SSR: 577859.714 MSE: 32103.317 Root MSE: 179.174 Multiple R-Squared: 0.683 Adjusted R-Squared: 0.665 3SLS estimates for 'US.Steel' (equation 4) Model Formula: US.Steel_invest ~ US.Steel_capital Instruments: ~US.Steel_value Estimate Std. Error t value Pr(>|t|) (Intercept) 181.691 448.797 0.40 0.69 capital 0.746 1.477 0.51 0.62 Residual standard error: 118.518 on 18 degrees of freedom Number of observations: 20 Degrees of Freedom: 18 SSR: 252838.286 MSE: 14046.571 Root MSE: 118.518 Multiple R-Squared: 0.205 Adjusted R-Squared: 0.16 3SLS estimates for 'Westinghouse' (equation 5) Model Formula: Westinghouse_invest ~ Westinghouse_capital Instruments: ~Westinghouse_value Estimate Std. Error t value Pr(>|t|) (Intercept) 11.6685 5.9043 1.98 0.064 . capital 0.3646 0.0572 6.38 5.2e-06 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 15.349 on 18 degrees of freedom Number of observations: 20 Degrees of Freedom: 18 SSR: 4240.92 MSE: 235.607 Root MSE: 15.349 Multiple R-Squared: 0.389 Adjusted R-Squared: 0.355 > > > ## **************** estfun ************************ > library( "sandwich" ) > > if(requireNamespace( 'plm', quietly = TRUE ) ) { + print( estfun( theilOls ) ) + print( round( colSums( estfun( theilOls ) ), digits = 7 ) ) + + print( estfun( theilSur ) ) + print( round( colSums( estfun( theilSur ) ), digits = 7 ) ) + + print( estfun( greeneOls ) ) + print( round( colSums( estfun( greeneOls ) ), digits = 7 ) ) + + print( try( estfun( greeneOlsPooled ) ) ) + + print( estfun( greeneSur ) ) + print( round( colSums( estfun( greeneSur ) ), digits = 7 ) ) + + print( try( estfun( greeneSurPooled ) ) ) + } General.Electric_(Intercept) General.Electric_value General.Electric_X1935 -2.860 -3348 General.Electric_X1936 -14.402 -29032 General.Electric_X1937 -5.175 -14506 General.Electric_X1938 -23.295 -47514 General.Electric_X1939 -28.031 -63243 General.Electric_X1940 -0.562 -1199 General.Electric_X1941 40.750 74739 General.Electric_X1942 16.036 25464 General.Electric_X1943 -23.719 -41494 General.Electric_X1944 -26.780 -45183 General.Electric_X1945 1.768 3550 General.Electric_X1946 58.737 129709 General.Electric_X1947 43.936 72789 General.Electric_X1948 31.227 50101 General.Electric_X1949 -23.552 -33722 General.Electric_X1950 -37.511 -60411 General.Electric_X1951 -4.983 -9066 General.Electric_X1952 1.893 3937 General.Electric_X1953 5.087 12064 General.Electric_X1954 -8.563 -23633 Westinghouse_X1935 0.000 0 Westinghouse_X1936 0.000 0 Westinghouse_X1937 0.000 0 Westinghouse_X1938 0.000 0 Westinghouse_X1939 0.000 0 Westinghouse_X1940 0.000 0 Westinghouse_X1941 0.000 0 Westinghouse_X1942 0.000 0 Westinghouse_X1943 0.000 0 Westinghouse_X1944 0.000 0 Westinghouse_X1945 0.000 0 Westinghouse_X1946 0.000 0 Westinghouse_X1947 0.000 0 Westinghouse_X1948 0.000 0 Westinghouse_X1949 0.000 0 Westinghouse_X1950 0.000 0 Westinghouse_X1951 0.000 0 Westinghouse_X1952 0.000 0 Westinghouse_X1953 0.000 0 Westinghouse_X1954 0.000 0 General.Electric_capital Westinghouse_(Intercept) General.Electric_X1935 -280 0.000 General.Electric_X1936 -1504 0.000 General.Electric_X1937 -611 0.000 General.Electric_X1938 -3639 0.000 General.Electric_X1939 -4838 0.000 General.Electric_X1940 -105 0.000 General.Electric_X1941 9002 0.000 General.Electric_X1942 4615 0.000 General.Electric_X1943 -7588 0.000 General.Electric_X1944 -8604 0.000 General.Electric_X1945 565 0.000 General.Electric_X1946 20323 0.000 General.Electric_X1947 20052 0.000 General.Electric_X1948 16969 0.000 General.Electric_X1949 -14562 0.000 General.Electric_X1950 -24285 0.000 General.Electric_X1951 -3345 0.000 General.Electric_X1952 1374 0.000 General.Electric_X1953 4071 0.000 General.Electric_X1954 -7612 0.000 Westinghouse_X1935 0 3.144 Westinghouse_X1936 0 -0.958 Westinghouse_X1937 0 -3.684 Westinghouse_X1938 0 -7.915 Westinghouse_X1939 0 -10.322 Westinghouse_X1940 0 -6.613 Westinghouse_X1941 0 17.265 Westinghouse_X1942 0 8.547 Westinghouse_X1943 0 -2.916 Westinghouse_X1944 0 -3.257 Westinghouse_X1945 0 -7.753 Westinghouse_X1946 0 5.796 Westinghouse_X1947 0 15.050 Westinghouse_X1948 0 2.969 Westinghouse_X1949 0 -11.433 Westinghouse_X1950 0 -13.481 Westinghouse_X1951 0 4.619 Westinghouse_X1952 0 13.138 Westinghouse_X1953 0 11.308 Westinghouse_X1954 0 -13.505 Westinghouse_value Westinghouse_capital General.Electric_X1935 0 0.000 General.Electric_X1936 0 0.000 General.Electric_X1937 0 0.000 General.Electric_X1938 0 0.000 General.Electric_X1939 0 0.000 General.Electric_X1940 0 0.000 General.Electric_X1941 0 0.000 General.Electric_X1942 0 0.000 General.Electric_X1943 0 0.000 General.Electric_X1944 0 0.000 General.Electric_X1945 0 0.000 General.Electric_X1946 0 0.000 General.Electric_X1947 0 0.000 General.Electric_X1948 0 0.000 General.Electric_X1949 0 0.000 General.Electric_X1950 0 0.000 General.Electric_X1951 0 0.000 General.Electric_X1952 0 0.000 General.Electric_X1953 0 0.000 General.Electric_X1954 0 0.000 Westinghouse_X1935 602 5.659 Westinghouse_X1936 -494 -0.766 Westinghouse_X1937 -2686 -27.263 Westinghouse_X1938 -4436 -143.262 Westinghouse_X1939 -5366 -242.563 Westinghouse_X1940 -4156 -175.254 Westinghouse_X1941 9273 624.987 Westinghouse_X1942 4797 519.651 Westinghouse_X1943 -1800 -246.108 Westinghouse_X1944 -2041 -297.023 Westinghouse_X1945 -5715 -716.333 Westinghouse_X1946 4408 498.495 Westinghouse_X1947 8750 1672.098 Westinghouse_X1948 1967 387.794 Westinghouse_X1949 -6675 -1621.262 Westinghouse_X1950 -8563 -1842.843 Westinghouse_X1951 3344 599.149 Westinghouse_X1952 11353 1911.642 Westinghouse_X1953 13496 1976.568 Westinghouse_X1954 -16056 -2883.365 General.Electric_(Intercept) General.Electric_value 0 0 General.Electric_capital Westinghouse_(Intercept) 0 0 Westinghouse_value Westinghouse_capital 0 0 General.Electric_(Intercept) General.Electric_value General.Electric_X1935 0.007671 8.980 General.Electric_X1936 -0.061426 -123.822 General.Electric_X1937 -0.060974 -170.929 General.Electric_X1938 -0.088931 -181.393 General.Electric_X1939 -0.111776 -252.189 General.Electric_X1940 -0.017793 -37.937 General.Electric_X1941 0.128334 235.378 General.Electric_X1942 0.060606 96.243 General.Electric_X1943 -0.072587 -126.985 General.Electric_X1944 -0.080053 -135.065 General.Electric_X1945 -0.000104 -0.208 General.Electric_X1946 0.177325 391.586 General.Electric_X1947 0.154986 256.765 General.Electric_X1948 0.119488 191.707 General.Electric_X1949 -0.047791 -68.427 General.Electric_X1950 -0.098464 -158.576 General.Electric_X1951 -0.000379 -0.689 General.Electric_X1952 0.014181 29.492 General.Electric_X1953 0.016444 38.998 General.Electric_X1954 -0.038758 -106.969 Westinghouse_X1935 -0.019477 -22.800 Westinghouse_X1936 0.016942 34.151 Westinghouse_X1937 0.039739 111.402 Westinghouse_X1938 0.059843 122.062 Westinghouse_X1939 0.073091 164.909 Westinghouse_X1940 0.052015 110.907 Westinghouse_X1941 -0.105994 -194.404 Westinghouse_X1942 -0.053728 -85.321 Westinghouse_X1943 0.017332 30.320 Westinghouse_X1944 0.018569 31.330 Westinghouse_X1945 0.050605 101.599 Westinghouse_X1946 -0.034591 -76.387 Westinghouse_X1947 -0.104099 -172.460 Westinghouse_X1948 -0.027559 -44.215 Westinghouse_X1949 0.060567 86.720 Westinghouse_X1950 0.076221 122.754 Westinghouse_X1951 -0.036128 -65.731 Westinghouse_X1952 -0.089492 -186.117 Westinghouse_X1953 -0.073054 -173.256 Westinghouse_X1954 0.079198 218.578 General.Electric_capital Westinghouse_(Intercept) General.Electric_X1935 0.7503 -0.015267 General.Electric_X1936 -6.4128 0.122246 General.Electric_X1937 -7.1950 0.121347 General.Electric_X1938 -13.8911 0.176986 General.Electric_X1939 -19.2925 0.222450 General.Electric_X1940 -3.3201 0.035410 General.Electric_X1941 28.3490 -0.255403 General.Electric_X1942 17.4425 -0.120615 General.Electric_X1943 -23.2207 0.144459 General.Electric_X1944 -25.7209 0.159316 General.Electric_X1945 -0.0331 0.000206 General.Electric_X1946 61.3543 -0.352901 General.Electric_X1947 70.7355 -0.308443 General.Electric_X1948 64.9300 -0.237798 General.Electric_X1949 -29.5489 0.095110 General.Electric_X1950 -63.7453 0.195956 General.Electric_X1951 -0.2543 0.000754 General.Electric_X1952 10.2966 -0.028221 General.Electric_X1953 13.1598 -0.032725 General.Electric_X1954 -34.4523 0.077135 Westinghouse_X1935 -1.9049 0.072945 Westinghouse_X1936 1.7687 -0.063449 Westinghouse_X1937 4.6893 -0.148830 Westinghouse_X1938 9.3475 -0.224122 Westinghouse_X1939 12.6156 -0.273739 Westinghouse_X1940 9.7061 -0.194806 Westinghouse_X1941 -23.4141 0.396965 Westinghouse_X1942 -15.4630 0.201221 Westinghouse_X1943 5.5444 -0.064910 Westinghouse_X1944 5.9663 -0.069544 Westinghouse_X1945 16.1733 -0.189523 Westinghouse_X1946 -11.9684 0.129548 Westinghouse_X1947 -47.5107 0.389866 Westinghouse_X1948 -14.9755 0.103212 Westinghouse_X1949 37.4485 -0.226832 Westinghouse_X1950 49.3457 -0.285461 Westinghouse_X1951 -24.2526 0.135304 Westinghouse_X1952 -64.9804 0.335163 Westinghouse_X1953 -58.4654 0.273600 Westinghouse_X1954 70.3989 -0.296608 Westinghouse_value Westinghouse_capital General.Electric_X1935 -2.924 -0.0275 General.Electric_X1936 63.079 0.0978 General.Electric_X1937 88.462 0.8980 General.Electric_X1938 99.183 3.2034 General.Electric_X1939 115.652 5.2276 General.Electric_X1940 22.255 0.9384 General.Electric_X1941 -137.177 -9.2456 General.Electric_X1942 -67.689 -7.3334 General.Electric_X1943 89.160 12.1924 General.Electric_X1944 99.843 14.5296 General.Electric_X1945 0.152 0.0190 General.Electric_X1946 -268.381 -30.3494 General.Electric_X1947 -179.329 -34.2680 General.Electric_X1948 -157.494 -31.0565 General.Electric_X1949 55.525 13.4866 General.Electric_X1950 124.471 26.7872 General.Electric_X1951 0.546 0.0978 General.Electric_X1952 -24.386 -4.1062 General.Electric_X1953 -39.057 -5.7203 General.Electric_X1954 91.705 16.4682 Westinghouse_X1935 13.969 0.1313 Westinghouse_X1936 -32.740 -0.0508 Westinghouse_X1937 -108.497 -1.1013 Westinghouse_X1938 -125.598 -4.0566 Westinghouse_X1939 -142.317 -6.4329 Westinghouse_X1940 -122.436 -5.1624 Westinghouse_X1941 213.210 14.3701 Westinghouse_X1942 112.925 12.2342 Westinghouse_X1943 -40.063 -5.4784 Westinghouse_X1944 -43.583 -6.3424 Westinghouse_X1945 -139.717 -17.5120 Westinghouse_X1946 98.521 11.1411 Westinghouse_X1947 226.668 43.3141 Westinghouse_X1948 68.357 13.4795 Westinghouse_X1949 -132.425 -32.1648 Westinghouse_X1950 -181.325 -39.0225 Westinghouse_X1951 97.933 17.5490 Westinghouse_X1952 289.614 48.7662 Westinghouse_X1953 326.541 47.8252 Westinghouse_X1954 -352.637 -63.3258 General.Electric_(Intercept) General.Electric_value 0 0 General.Electric_capital Westinghouse_(Intercept) 0 0 Westinghouse_value Westinghouse_capital 0 0 Chrysler_(Intercept) Chrysler_value Chrysler_capital Chrysler_X1935 10.622 4435 111.5 Chrysler_X1936 10.425 8734 106.3 Chrysler_X1937 -7.404 -6544 -256.9 Chrysler_X1938 7.302 3198 378.3 Chrysler_X1939 -14.682 -9979 -944.0 Chrysler_X1940 -2.315 -1685 -155.3 Chrysler_X1941 0.631 406 47.4 Chrysler_X1942 -1.581 -650 -112.9 Chrysler_X1943 -13.459 -7919 -903.1 Chrysler_X1944 -7.780 -5433 -470.7 Chrysler_X1945 11.757 9951 641.9 Chrysler_X1946 -16.133 -14419 -1368.1 Chrysler_X1947 -6.823 -3951 -660.5 Chrysler_X1948 6.615 4595 729.0 Chrysler_X1949 -7.379 -4356 -1087.7 Chrysler_X1950 1.268 879 206.9 Chrysler_X1951 39.502 31957 8038.6 Chrysler_X1952 2.774 2017 806.2 Chrysler_X1953 -6.215 -6224 -2151.0 Chrysler_X1954 -7.124 -5010 -2955.9 General.Electric_X1935 0.000 0 0.0 General.Electric_X1936 0.000 0 0.0 General.Electric_X1937 0.000 0 0.0 General.Electric_X1938 0.000 0 0.0 General.Electric_X1939 0.000 0 0.0 General.Electric_X1940 0.000 0 0.0 General.Electric_X1941 0.000 0 0.0 General.Electric_X1942 0.000 0 0.0 General.Electric_X1943 0.000 0 0.0 General.Electric_X1944 0.000 0 0.0 General.Electric_X1945 0.000 0 0.0 General.Electric_X1946 0.000 0 0.0 General.Electric_X1947 0.000 0 0.0 General.Electric_X1948 0.000 0 0.0 General.Electric_X1949 0.000 0 0.0 General.Electric_X1950 0.000 0 0.0 General.Electric_X1951 0.000 0 0.0 General.Electric_X1952 0.000 0 0.0 General.Electric_X1953 0.000 0 0.0 General.Electric_X1954 0.000 0 0.0 General.Motors_X1935 0.000 0 0.0 General.Motors_X1936 0.000 0 0.0 General.Motors_X1937 0.000 0 0.0 General.Motors_X1938 0.000 0 0.0 General.Motors_X1939 0.000 0 0.0 General.Motors_X1940 0.000 0 0.0 General.Motors_X1941 0.000 0 0.0 General.Motors_X1942 0.000 0 0.0 General.Motors_X1943 0.000 0 0.0 General.Motors_X1944 0.000 0 0.0 General.Motors_X1945 0.000 0 0.0 General.Motors_X1946 0.000 0 0.0 General.Motors_X1947 0.000 0 0.0 General.Motors_X1948 0.000 0 0.0 General.Motors_X1949 0.000 0 0.0 General.Motors_X1950 0.000 0 0.0 General.Motors_X1951 0.000 0 0.0 General.Motors_X1952 0.000 0 0.0 General.Motors_X1953 0.000 0 0.0 General.Motors_X1954 0.000 0 0.0 US.Steel_X1935 0.000 0 0.0 US.Steel_X1936 0.000 0 0.0 US.Steel_X1937 0.000 0 0.0 US.Steel_X1938 0.000 0 0.0 US.Steel_X1939 0.000 0 0.0 US.Steel_X1940 0.000 0 0.0 US.Steel_X1941 0.000 0 0.0 US.Steel_X1942 0.000 0 0.0 US.Steel_X1943 0.000 0 0.0 US.Steel_X1944 0.000 0 0.0 US.Steel_X1945 0.000 0 0.0 US.Steel_X1946 0.000 0 0.0 US.Steel_X1947 0.000 0 0.0 US.Steel_X1948 0.000 0 0.0 US.Steel_X1949 0.000 0 0.0 US.Steel_X1950 0.000 0 0.0 US.Steel_X1951 0.000 0 0.0 US.Steel_X1952 0.000 0 0.0 US.Steel_X1953 0.000 0 0.0 US.Steel_X1954 0.000 0 0.0 Westinghouse_X1935 0.000 0 0.0 Westinghouse_X1936 0.000 0 0.0 Westinghouse_X1937 0.000 0 0.0 Westinghouse_X1938 0.000 0 0.0 Westinghouse_X1939 0.000 0 0.0 Westinghouse_X1940 0.000 0 0.0 Westinghouse_X1941 0.000 0 0.0 Westinghouse_X1942 0.000 0 0.0 Westinghouse_X1943 0.000 0 0.0 Westinghouse_X1944 0.000 0 0.0 Westinghouse_X1945 0.000 0 0.0 Westinghouse_X1946 0.000 0 0.0 Westinghouse_X1947 0.000 0 0.0 Westinghouse_X1948 0.000 0 0.0 Westinghouse_X1949 0.000 0 0.0 Westinghouse_X1950 0.000 0 0.0 Westinghouse_X1951 0.000 0 0.0 Westinghouse_X1952 0.000 0 0.0 Westinghouse_X1953 0.000 0 0.0 Westinghouse_X1954 0.000 0 0.0 General.Electric_(Intercept) General.Electric_value Chrysler_X1935 0.000 0 Chrysler_X1936 0.000 0 Chrysler_X1937 0.000 0 Chrysler_X1938 0.000 0 Chrysler_X1939 0.000 0 Chrysler_X1940 0.000 0 Chrysler_X1941 0.000 0 Chrysler_X1942 0.000 0 Chrysler_X1943 0.000 0 Chrysler_X1944 0.000 0 Chrysler_X1945 0.000 0 Chrysler_X1946 0.000 0 Chrysler_X1947 0.000 0 Chrysler_X1948 0.000 0 Chrysler_X1949 0.000 0 Chrysler_X1950 0.000 0 Chrysler_X1951 0.000 0 Chrysler_X1952 0.000 0 Chrysler_X1953 0.000 0 Chrysler_X1954 0.000 0 General.Electric_X1935 -2.860 -3348 General.Electric_X1936 -14.402 -29032 General.Electric_X1937 -5.175 -14506 General.Electric_X1938 -23.295 -47514 General.Electric_X1939 -28.031 -63243 General.Electric_X1940 -0.562 -1199 General.Electric_X1941 40.750 74739 General.Electric_X1942 16.036 25464 General.Electric_X1943 -23.719 -41494 General.Electric_X1944 -26.780 -45183 General.Electric_X1945 1.768 3550 General.Electric_X1946 58.737 129709 General.Electric_X1947 43.936 72789 General.Electric_X1948 31.227 50101 General.Electric_X1949 -23.552 -33722 General.Electric_X1950 -37.511 -60411 General.Electric_X1951 -4.983 -9066 General.Electric_X1952 1.893 3937 General.Electric_X1953 5.087 12064 General.Electric_X1954 -8.563 -23633 General.Motors_X1935 0.000 0 General.Motors_X1936 0.000 0 General.Motors_X1937 0.000 0 General.Motors_X1938 0.000 0 General.Motors_X1939 0.000 0 General.Motors_X1940 0.000 0 General.Motors_X1941 0.000 0 General.Motors_X1942 0.000 0 General.Motors_X1943 0.000 0 General.Motors_X1944 0.000 0 General.Motors_X1945 0.000 0 General.Motors_X1946 0.000 0 General.Motors_X1947 0.000 0 General.Motors_X1948 0.000 0 General.Motors_X1949 0.000 0 General.Motors_X1950 0.000 0 General.Motors_X1951 0.000 0 General.Motors_X1952 0.000 0 General.Motors_X1953 0.000 0 General.Motors_X1954 0.000 0 US.Steel_X1935 0.000 0 US.Steel_X1936 0.000 0 US.Steel_X1937 0.000 0 US.Steel_X1938 0.000 0 US.Steel_X1939 0.000 0 US.Steel_X1940 0.000 0 US.Steel_X1941 0.000 0 US.Steel_X1942 0.000 0 US.Steel_X1943 0.000 0 US.Steel_X1944 0.000 0 US.Steel_X1945 0.000 0 US.Steel_X1946 0.000 0 US.Steel_X1947 0.000 0 US.Steel_X1948 0.000 0 US.Steel_X1949 0.000 0 US.Steel_X1950 0.000 0 US.Steel_X1951 0.000 0 US.Steel_X1952 0.000 0 US.Steel_X1953 0.000 0 US.Steel_X1954 0.000 0 Westinghouse_X1935 0.000 0 Westinghouse_X1936 0.000 0 Westinghouse_X1937 0.000 0 Westinghouse_X1938 0.000 0 Westinghouse_X1939 0.000 0 Westinghouse_X1940 0.000 0 Westinghouse_X1941 0.000 0 Westinghouse_X1942 0.000 0 Westinghouse_X1943 0.000 0 Westinghouse_X1944 0.000 0 Westinghouse_X1945 0.000 0 Westinghouse_X1946 0.000 0 Westinghouse_X1947 0.000 0 Westinghouse_X1948 0.000 0 Westinghouse_X1949 0.000 0 Westinghouse_X1950 0.000 0 Westinghouse_X1951 0.000 0 Westinghouse_X1952 0.000 0 Westinghouse_X1953 0.000 0 Westinghouse_X1954 0.000 0 General.Electric_capital General.Motors_(Intercept) Chrysler_X1935 0 0.00 Chrysler_X1936 0 0.00 Chrysler_X1937 0 0.00 Chrysler_X1938 0 0.00 Chrysler_X1939 0 0.00 Chrysler_X1940 0 0.00 Chrysler_X1941 0 0.00 Chrysler_X1942 0 0.00 Chrysler_X1943 0 0.00 Chrysler_X1944 0 0.00 Chrysler_X1945 0 0.00 Chrysler_X1946 0 0.00 Chrysler_X1947 0 0.00 Chrysler_X1948 0 0.00 Chrysler_X1949 0 0.00 Chrysler_X1950 0 0.00 Chrysler_X1951 0 0.00 Chrysler_X1952 0 0.00 Chrysler_X1953 0 0.00 Chrysler_X1954 0 0.00 General.Electric_X1935 -280 0.00 General.Electric_X1936 -1504 0.00 General.Electric_X1937 -611 0.00 General.Electric_X1938 -3639 0.00 General.Electric_X1939 -4838 0.00 General.Electric_X1940 -105 0.00 General.Electric_X1941 9002 0.00 General.Electric_X1942 4615 0.00 General.Electric_X1943 -7588 0.00 General.Electric_X1944 -8604 0.00 General.Electric_X1945 565 0.00 General.Electric_X1946 20323 0.00 General.Electric_X1947 20052 0.00 General.Electric_X1948 16969 0.00 General.Electric_X1949 -14562 0.00 General.Electric_X1950 -24285 0.00 General.Electric_X1951 -3345 0.00 General.Electric_X1952 1374 0.00 General.Electric_X1953 4071 0.00 General.Electric_X1954 -7612 0.00 General.Motors_X1935 0 99.14 General.Motors_X1936 0 -34.01 General.Motors_X1937 0 -140.48 General.Motors_X1938 0 -3.28 General.Motors_X1939 0 -109.45 General.Motors_X1940 0 -19.91 General.Motors_X1941 0 24.12 General.Motors_X1942 0 98.02 General.Motors_X1943 0 67.76 General.Motors_X1944 0 100.03 General.Motors_X1945 0 35.12 General.Motors_X1946 0 103.90 General.Motors_X1947 0 15.18 General.Motors_X1948 0 -51.86 General.Motors_X1949 0 -115.39 General.Motors_X1950 0 -63.51 General.Motors_X1951 0 -119.40 General.Motors_X1952 0 -77.82 General.Motors_X1953 0 49.50 General.Motors_X1954 0 142.33 US.Steel_X1935 0 0.00 US.Steel_X1936 0 0.00 US.Steel_X1937 0 0.00 US.Steel_X1938 0 0.00 US.Steel_X1939 0 0.00 US.Steel_X1940 0 0.00 US.Steel_X1941 0 0.00 US.Steel_X1942 0 0.00 US.Steel_X1943 0 0.00 US.Steel_X1944 0 0.00 US.Steel_X1945 0 0.00 US.Steel_X1946 0 0.00 US.Steel_X1947 0 0.00 US.Steel_X1948 0 0.00 US.Steel_X1949 0 0.00 US.Steel_X1950 0 0.00 US.Steel_X1951 0 0.00 US.Steel_X1952 0 0.00 US.Steel_X1953 0 0.00 US.Steel_X1954 0 0.00 Westinghouse_X1935 0 0.00 Westinghouse_X1936 0 0.00 Westinghouse_X1937 0 0.00 Westinghouse_X1938 0 0.00 Westinghouse_X1939 0 0.00 Westinghouse_X1940 0 0.00 Westinghouse_X1941 0 0.00 Westinghouse_X1942 0 0.00 Westinghouse_X1943 0 0.00 Westinghouse_X1944 0 0.00 Westinghouse_X1945 0 0.00 Westinghouse_X1946 0 0.00 Westinghouse_X1947 0 0.00 Westinghouse_X1948 0 0.00 Westinghouse_X1949 0 0.00 Westinghouse_X1950 0 0.00 Westinghouse_X1951 0 0.00 Westinghouse_X1952 0 0.00 Westinghouse_X1953 0 0.00 Westinghouse_X1954 0 0.00 General.Motors_value General.Motors_capital Chrysler_X1935 0 0 Chrysler_X1936 0 0 Chrysler_X1937 0 0 Chrysler_X1938 0 0 Chrysler_X1939 0 0 Chrysler_X1940 0 0 Chrysler_X1941 0 0 Chrysler_X1942 0 0 Chrysler_X1943 0 0 Chrysler_X1944 0 0 Chrysler_X1945 0 0 Chrysler_X1946 0 0 Chrysler_X1947 0 0 Chrysler_X1948 0 0 Chrysler_X1949 0 0 Chrysler_X1950 0 0 Chrysler_X1951 0 0 Chrysler_X1952 0 0 Chrysler_X1953 0 0 Chrysler_X1954 0 0 General.Electric_X1935 0 0 General.Electric_X1936 0 0 General.Electric_X1937 0 0 General.Electric_X1938 0 0 General.Electric_X1939 0 0 General.Electric_X1940 0 0 General.Electric_X1941 0 0 General.Electric_X1942 0 0 General.Electric_X1943 0 0 General.Electric_X1944 0 0 General.Electric_X1945 0 0 General.Electric_X1946 0 0 General.Electric_X1947 0 0 General.Electric_X1948 0 0 General.Electric_X1949 0 0 General.Electric_X1950 0 0 General.Electric_X1951 0 0 General.Electric_X1952 0 0 General.Electric_X1953 0 0 General.Electric_X1954 0 0 General.Motors_X1935 305191 278 General.Motors_X1936 -158530 -1789 General.Motors_X1937 -756753 -22041 General.Motors_X1938 -9158 -686 General.Motors_X1939 -472086 -22262 General.Motors_X1940 -92456 -4125 General.Motors_X1941 109770 6155 General.Motors_X1942 317973 29767 General.Motors_X1943 274659 17894 General.Motors_X1944 438073 20167 General.Motors_X1945 170027 9308 General.Motors_X1946 509223 41790 General.Motors_X1947 53544 11562 General.Motors_X1948 -168794 -47837 General.Motors_X1949 -426971 -117711 General.Motors_X1950 -238505 -69794 General.Motors_X1951 -577039 -144194 General.Motors_X1952 -383234 -111315 General.Motors_X1953 308954 87974 General.Motors_X1954 796113 316860 US.Steel_X1935 0 0 US.Steel_X1936 0 0 US.Steel_X1937 0 0 US.Steel_X1938 0 0 US.Steel_X1939 0 0 US.Steel_X1940 0 0 US.Steel_X1941 0 0 US.Steel_X1942 0 0 US.Steel_X1943 0 0 US.Steel_X1944 0 0 US.Steel_X1945 0 0 US.Steel_X1946 0 0 US.Steel_X1947 0 0 US.Steel_X1948 0 0 US.Steel_X1949 0 0 US.Steel_X1950 0 0 US.Steel_X1951 0 0 US.Steel_X1952 0 0 US.Steel_X1953 0 0 US.Steel_X1954 0 0 Westinghouse_X1935 0 0 Westinghouse_X1936 0 0 Westinghouse_X1937 0 0 Westinghouse_X1938 0 0 Westinghouse_X1939 0 0 Westinghouse_X1940 0 0 Westinghouse_X1941 0 0 Westinghouse_X1942 0 0 Westinghouse_X1943 0 0 Westinghouse_X1944 0 0 Westinghouse_X1945 0 0 Westinghouse_X1946 0 0 Westinghouse_X1947 0 0 Westinghouse_X1948 0 0 Westinghouse_X1949 0 0 Westinghouse_X1950 0 0 Westinghouse_X1951 0 0 Westinghouse_X1952 0 0 Westinghouse_X1953 0 0 Westinghouse_X1954 0 0 US.Steel_(Intercept) US.Steel_value US.Steel_capital Chrysler_X1935 0.00 0 0 Chrysler_X1936 0.00 0 0 Chrysler_X1937 0.00 0 0 Chrysler_X1938 0.00 0 0 Chrysler_X1939 0.00 0 0 Chrysler_X1940 0.00 0 0 Chrysler_X1941 0.00 0 0 Chrysler_X1942 0.00 0 0 Chrysler_X1943 0.00 0 0 Chrysler_X1944 0.00 0 0 Chrysler_X1945 0.00 0 0 Chrysler_X1946 0.00 0 0 Chrysler_X1947 0.00 0 0 Chrysler_X1948 0.00 0 0 Chrysler_X1949 0.00 0 0 Chrysler_X1950 0.00 0 0 Chrysler_X1951 0.00 0 0 Chrysler_X1952 0.00 0 0 Chrysler_X1953 0.00 0 0 Chrysler_X1954 0.00 0 0 General.Electric_X1935 0.00 0 0 General.Electric_X1936 0.00 0 0 General.Electric_X1937 0.00 0 0 General.Electric_X1938 0.00 0 0 General.Electric_X1939 0.00 0 0 General.Electric_X1940 0.00 0 0 General.Electric_X1941 0.00 0 0 General.Electric_X1942 0.00 0 0 General.Electric_X1943 0.00 0 0 General.Electric_X1944 0.00 0 0 General.Electric_X1945 0.00 0 0 General.Electric_X1946 0.00 0 0 General.Electric_X1947 0.00 0 0 General.Electric_X1948 0.00 0 0 General.Electric_X1949 0.00 0 0 General.Electric_X1950 0.00 0 0 General.Electric_X1951 0.00 0 0 General.Electric_X1952 0.00 0 0 General.Electric_X1953 0.00 0 0 General.Electric_X1954 0.00 0 0 General.Motors_X1935 0.00 0 0 General.Motors_X1936 0.00 0 0 General.Motors_X1937 0.00 0 0 General.Motors_X1938 0.00 0 0 General.Motors_X1939 0.00 0 0 General.Motors_X1940 0.00 0 0 General.Motors_X1941 0.00 0 0 General.Motors_X1942 0.00 0 0 General.Motors_X1943 0.00 0 0 General.Motors_X1944 0.00 0 0 General.Motors_X1945 0.00 0 0 General.Motors_X1946 0.00 0 0 General.Motors_X1947 0.00 0 0 General.Motors_X1948 0.00 0 0 General.Motors_X1949 0.00 0 0 General.Motors_X1950 0.00 0 0 General.Motors_X1951 0.00 0 0 General.Motors_X1952 0.00 0 0 General.Motors_X1953 0.00 0 0 General.Motors_X1954 0.00 0 0 US.Steel_X1935 4.15 5657 223 US.Steel_X1936 81.32 146961 4107 US.Steel_X1937 31.18 83446 3682 US.Steel_X1938 -99.75 -179733 -25954 US.Steel_X1939 -178.23 -348850 -55733 US.Steel_X1940 -160.69 -353980 -40847 US.Steel_X1941 19.65 46784 5137 US.Steel_X1942 9.82 21296 2933 US.Steel_X1943 -46.76 -92829 -14113 US.Steel_X1944 -83.74 -151889 -23371 US.Steel_X1945 -91.24 -168815 -19507 US.Steel_X1946 28.34 58590 6591 US.Steel_X1947 57.32 102983 15178 US.Steel_X1948 140.23 227988 43037 US.Steel_X1949 25.65 42751 9004 US.Steel_X1950 34.88 58503 12479 US.Steel_X1951 115.10 263510 39374 US.Steel_X1952 149.19 322157 66269 US.Steel_X1953 89.00 180793 55503 US.Steel_X1954 -125.42 -265326 -83994 Westinghouse_X1935 0.00 0 0 Westinghouse_X1936 0.00 0 0 Westinghouse_X1937 0.00 0 0 Westinghouse_X1938 0.00 0 0 Westinghouse_X1939 0.00 0 0 Westinghouse_X1940 0.00 0 0 Westinghouse_X1941 0.00 0 0 Westinghouse_X1942 0.00 0 0 Westinghouse_X1943 0.00 0 0 Westinghouse_X1944 0.00 0 0 Westinghouse_X1945 0.00 0 0 Westinghouse_X1946 0.00 0 0 Westinghouse_X1947 0.00 0 0 Westinghouse_X1948 0.00 0 0 Westinghouse_X1949 0.00 0 0 Westinghouse_X1950 0.00 0 0 Westinghouse_X1951 0.00 0 0 Westinghouse_X1952 0.00 0 0 Westinghouse_X1953 0.00 0 0 Westinghouse_X1954 0.00 0 0 Westinghouse_(Intercept) Westinghouse_value Chrysler_X1935 0.000 0 Chrysler_X1936 0.000 0 Chrysler_X1937 0.000 0 Chrysler_X1938 0.000 0 Chrysler_X1939 0.000 0 Chrysler_X1940 0.000 0 Chrysler_X1941 0.000 0 Chrysler_X1942 0.000 0 Chrysler_X1943 0.000 0 Chrysler_X1944 0.000 0 Chrysler_X1945 0.000 0 Chrysler_X1946 0.000 0 Chrysler_X1947 0.000 0 Chrysler_X1948 0.000 0 Chrysler_X1949 0.000 0 Chrysler_X1950 0.000 0 Chrysler_X1951 0.000 0 Chrysler_X1952 0.000 0 Chrysler_X1953 0.000 0 Chrysler_X1954 0.000 0 General.Electric_X1935 0.000 0 General.Electric_X1936 0.000 0 General.Electric_X1937 0.000 0 General.Electric_X1938 0.000 0 General.Electric_X1939 0.000 0 General.Electric_X1940 0.000 0 General.Electric_X1941 0.000 0 General.Electric_X1942 0.000 0 General.Electric_X1943 0.000 0 General.Electric_X1944 0.000 0 General.Electric_X1945 0.000 0 General.Electric_X1946 0.000 0 General.Electric_X1947 0.000 0 General.Electric_X1948 0.000 0 General.Electric_X1949 0.000 0 General.Electric_X1950 0.000 0 General.Electric_X1951 0.000 0 General.Electric_X1952 0.000 0 General.Electric_X1953 0.000 0 General.Electric_X1954 0.000 0 General.Motors_X1935 0.000 0 General.Motors_X1936 0.000 0 General.Motors_X1937 0.000 0 General.Motors_X1938 0.000 0 General.Motors_X1939 0.000 0 General.Motors_X1940 0.000 0 General.Motors_X1941 0.000 0 General.Motors_X1942 0.000 0 General.Motors_X1943 0.000 0 General.Motors_X1944 0.000 0 General.Motors_X1945 0.000 0 General.Motors_X1946 0.000 0 General.Motors_X1947 0.000 0 General.Motors_X1948 0.000 0 General.Motors_X1949 0.000 0 General.Motors_X1950 0.000 0 General.Motors_X1951 0.000 0 General.Motors_X1952 0.000 0 General.Motors_X1953 0.000 0 General.Motors_X1954 0.000 0 US.Steel_X1935 0.000 0 US.Steel_X1936 0.000 0 US.Steel_X1937 0.000 0 US.Steel_X1938 0.000 0 US.Steel_X1939 0.000 0 US.Steel_X1940 0.000 0 US.Steel_X1941 0.000 0 US.Steel_X1942 0.000 0 US.Steel_X1943 0.000 0 US.Steel_X1944 0.000 0 US.Steel_X1945 0.000 0 US.Steel_X1946 0.000 0 US.Steel_X1947 0.000 0 US.Steel_X1948 0.000 0 US.Steel_X1949 0.000 0 US.Steel_X1950 0.000 0 US.Steel_X1951 0.000 0 US.Steel_X1952 0.000 0 US.Steel_X1953 0.000 0 US.Steel_X1954 0.000 0 Westinghouse_X1935 3.144 602 Westinghouse_X1936 -0.958 -494 Westinghouse_X1937 -3.684 -2686 Westinghouse_X1938 -7.915 -4436 Westinghouse_X1939 -10.322 -5366 Westinghouse_X1940 -6.613 -4156 Westinghouse_X1941 17.265 9273 Westinghouse_X1942 8.547 4797 Westinghouse_X1943 -2.916 -1800 Westinghouse_X1944 -3.257 -2041 Westinghouse_X1945 -7.753 -5715 Westinghouse_X1946 5.796 4408 Westinghouse_X1947 15.050 8750 Westinghouse_X1948 2.969 1967 Westinghouse_X1949 -11.433 -6675 Westinghouse_X1950 -13.481 -8563 Westinghouse_X1951 4.619 3344 Westinghouse_X1952 13.138 11353 Westinghouse_X1953 11.308 13496 Westinghouse_X1954 -13.505 -16056 Westinghouse_capital Chrysler_X1935 0.000 Chrysler_X1936 0.000 Chrysler_X1937 0.000 Chrysler_X1938 0.000 Chrysler_X1939 0.000 Chrysler_X1940 0.000 Chrysler_X1941 0.000 Chrysler_X1942 0.000 Chrysler_X1943 0.000 Chrysler_X1944 0.000 Chrysler_X1945 0.000 Chrysler_X1946 0.000 Chrysler_X1947 0.000 Chrysler_X1948 0.000 Chrysler_X1949 0.000 Chrysler_X1950 0.000 Chrysler_X1951 0.000 Chrysler_X1952 0.000 Chrysler_X1953 0.000 Chrysler_X1954 0.000 General.Electric_X1935 0.000 General.Electric_X1936 0.000 General.Electric_X1937 0.000 General.Electric_X1938 0.000 General.Electric_X1939 0.000 General.Electric_X1940 0.000 General.Electric_X1941 0.000 General.Electric_X1942 0.000 General.Electric_X1943 0.000 General.Electric_X1944 0.000 General.Electric_X1945 0.000 General.Electric_X1946 0.000 General.Electric_X1947 0.000 General.Electric_X1948 0.000 General.Electric_X1949 0.000 General.Electric_X1950 0.000 General.Electric_X1951 0.000 General.Electric_X1952 0.000 General.Electric_X1953 0.000 General.Electric_X1954 0.000 General.Motors_X1935 0.000 General.Motors_X1936 0.000 General.Motors_X1937 0.000 General.Motors_X1938 0.000 General.Motors_X1939 0.000 General.Motors_X1940 0.000 General.Motors_X1941 0.000 General.Motors_X1942 0.000 General.Motors_X1943 0.000 General.Motors_X1944 0.000 General.Motors_X1945 0.000 General.Motors_X1946 0.000 General.Motors_X1947 0.000 General.Motors_X1948 0.000 General.Motors_X1949 0.000 General.Motors_X1950 0.000 General.Motors_X1951 0.000 General.Motors_X1952 0.000 General.Motors_X1953 0.000 General.Motors_X1954 0.000 US.Steel_X1935 0.000 US.Steel_X1936 0.000 US.Steel_X1937 0.000 US.Steel_X1938 0.000 US.Steel_X1939 0.000 US.Steel_X1940 0.000 US.Steel_X1941 0.000 US.Steel_X1942 0.000 US.Steel_X1943 0.000 US.Steel_X1944 0.000 US.Steel_X1945 0.000 US.Steel_X1946 0.000 US.Steel_X1947 0.000 US.Steel_X1948 0.000 US.Steel_X1949 0.000 US.Steel_X1950 0.000 US.Steel_X1951 0.000 US.Steel_X1952 0.000 US.Steel_X1953 0.000 US.Steel_X1954 0.000 Westinghouse_X1935 5.659 Westinghouse_X1936 -0.766 Westinghouse_X1937 -27.263 Westinghouse_X1938 -143.262 Westinghouse_X1939 -242.563 Westinghouse_X1940 -175.254 Westinghouse_X1941 624.987 Westinghouse_X1942 519.651 Westinghouse_X1943 -246.108 Westinghouse_X1944 -297.023 Westinghouse_X1945 -716.333 Westinghouse_X1946 498.495 Westinghouse_X1947 1672.098 Westinghouse_X1948 387.794 Westinghouse_X1949 -1621.262 Westinghouse_X1950 -1842.843 Westinghouse_X1951 599.149 Westinghouse_X1952 1911.642 Westinghouse_X1953 1976.568 Westinghouse_X1954 -2883.365 Chrysler_(Intercept) Chrysler_value 0 0 Chrysler_capital General.Electric_(Intercept) 0 0 General.Electric_value General.Electric_capital 0 0 General.Motors_(Intercept) General.Motors_value 0 0 General.Motors_capital US.Steel_(Intercept) 0 0 US.Steel_value US.Steel_capital 0 0 Westinghouse_(Intercept) Westinghouse_value 0 0 Westinghouse_capital 0 Error in estfun.systemfit(greeneOlsPooled) : returning the estimation function for models with restrictions has not yet been implemented. [1] "Error in estfun.systemfit(greeneOlsPooled) : \n returning the estimation function for models with restrictions has not yet been implemented.\n" attr(,"class") [1] "try-error" attr(,"condition") Chrysler_(Intercept) Chrysler_value Chrysler_capital Chrysler_X1935 0.061827 25.813 0.64918 Chrysler_X1936 0.089260 74.782 0.91045 Chrysler_X1937 -0.052866 -46.729 -1.83447 Chrysler_X1938 0.038353 16.795 1.98668 Chrysler_X1939 -0.125156 -85.069 -8.04755 Chrysler_X1940 -0.019863 -14.456 -1.33281 Chrysler_X1941 -0.000958 -0.617 -0.07206 Chrysler_X1942 -0.035485 -14.581 -2.53362 Chrysler_X1943 -0.121241 -71.338 -8.13529 Chrysler_X1944 -0.067270 -46.981 -4.06984 Chrysler_X1945 0.103440 87.551 5.64781 Chrysler_X1946 -0.121081 -108.222 -10.26763 Chrysler_X1947 -0.065512 -37.931 -6.34155 Chrysler_X1948 0.053900 37.439 5.93977 Chrysler_X1949 -0.066320 -39.149 -9.77563 Chrysler_X1950 0.012935 8.971 2.11101 Chrysler_X1951 0.338038 273.472 68.79064 Chrysler_X1952 0.035175 25.572 10.22178 Chrysler_X1953 -0.016558 -16.583 -5.73086 Chrysler_X1954 -0.040615 -28.561 -16.85128 General.Electric_X1935 -0.000794 -0.332 -0.00834 General.Electric_X1936 -0.018766 -15.722 -0.19142 General.Electric_X1937 -0.017841 -15.770 -0.61909 General.Electric_X1938 -0.025844 -11.317 -1.33872 General.Electric_X1939 -0.031739 -21.573 -2.04083 General.Electric_X1940 -0.006211 -4.520 -0.41674 General.Electric_X1941 0.033478 21.546 2.51754 General.Electric_X1942 0.015339 6.303 1.09520 General.Electric_X1943 -0.020477 -12.049 -1.37400 General.Electric_X1944 -0.022551 -15.749 -1.36432 General.Electric_X1945 -0.000552 -0.467 -0.03015 General.Electric_X1946 0.048030 42.930 4.07298 General.Electric_X1947 0.042267 24.472 4.09142 General.Electric_X1948 0.033204 23.064 3.65913 General.Electric_X1949 -0.011862 -7.002 -1.74842 General.Electric_X1950 -0.025261 -17.518 -4.12252 General.Electric_X1951 0.001752 1.417 0.35646 General.Electric_X1952 0.006337 4.607 1.84166 General.Electric_X1953 0.007751 7.762 2.68249 General.Electric_X1954 -0.006261 -4.402 -2.59748 General.Motors_X1935 0.015266 6.374 0.16030 General.Motors_X1936 -0.003913 -3.278 -0.03991 General.Motors_X1937 -0.019260 -17.024 -0.66833 General.Motors_X1938 0.000502 0.220 0.02603 General.Motors_X1939 -0.014763 -10.035 -0.94928 General.Motors_X1940 -0.002163 -1.575 -0.14517 General.Motors_X1941 0.004002 2.576 0.30095 General.Motors_X1942 0.014599 5.999 1.04234 General.Motors_X1943 0.010244 6.027 0.68736 General.Motors_X1944 0.014852 10.373 0.89857 General.Motors_X1945 0.005493 4.649 0.29991 General.Motors_X1946 0.014990 13.398 1.27114 General.Motors_X1947 0.002105 1.219 0.20375 General.Motors_X1948 -0.007587 -5.270 -0.83607 General.Motors_X1949 -0.016803 -9.919 -2.47682 General.Motors_X1950 -0.009602 -6.659 -1.56700 General.Motors_X1951 -0.017864 -14.452 -3.63526 General.Motors_X1952 -0.012355 -8.982 -3.59050 General.Motors_X1953 0.004869 4.876 1.68503 General.Motors_X1954 0.017389 12.228 7.21481 US.Steel_X1935 0.013928 5.815 0.14625 US.Steel_X1936 -0.026161 -21.918 -0.26684 US.Steel_X1937 -0.025907 -22.899 -0.89897 US.Steel_X1938 0.043429 19.017 2.24961 US.Steel_X1939 0.070526 47.937 4.53484 US.Steel_X1940 0.058816 42.806 3.94653 US.Steel_X1941 -0.016278 -10.476 -1.22408 US.Steel_X1942 -0.008142 -3.346 -0.58136 US.Steel_X1943 0.018146 10.677 1.21761 US.Steel_X1944 0.036672 25.612 2.21866 US.Steel_X1945 0.039460 33.399 2.15450 US.Steel_X1946 -0.012632 -11.291 -1.07122 US.Steel_X1947 -0.018481 -10.700 -1.78894 US.Steel_X1948 -0.047880 -33.258 -5.27643 US.Steel_X1949 -0.003976 -2.347 -0.58605 US.Steel_X1950 -0.007908 -5.484 -1.29060 US.Steel_X1951 -0.052722 -42.652 -10.72894 US.Steel_X1952 -0.064309 -46.753 -18.68822 US.Steel_X1953 -0.039465 -39.524 -13.65875 US.Steel_X1954 0.042884 30.156 17.79265 Westinghouse_X1935 -0.000639 -0.267 -0.00671 Westinghouse_X1936 0.003489 2.923 0.03559 Westinghouse_X1937 0.005946 5.256 0.20632 Westinghouse_X1938 0.008196 3.589 0.42458 Westinghouse_X1939 0.009675 6.576 0.62207 Westinghouse_X1940 0.007107 5.172 0.47686 Westinghouse_X1941 -0.011506 -7.406 -0.86528 Westinghouse_X1942 -0.005817 -2.390 -0.41532 Westinghouse_X1943 0.002074 1.221 0.13919 Westinghouse_X1944 0.002100 1.466 0.12704 Westinghouse_X1945 0.005777 4.890 0.31543 Westinghouse_X1946 -0.004096 -3.661 -0.34734 Westinghouse_X1947 -0.012571 -7.279 -1.21688 Westinghouse_X1948 -0.003981 -2.765 -0.43871 Westinghouse_X1949 0.006180 3.648 0.91087 Westinghouse_X1950 0.008074 5.599 1.31765 Westinghouse_X1951 -0.004997 -4.043 -1.01696 Westinghouse_X1952 -0.011575 -8.415 -3.36372 Westinghouse_X1953 -0.010300 -10.316 -3.56494 Westinghouse_X1954 0.006866 4.828 2.84858 General.Electric_(Intercept) General.Electric_value Chrysler_X1935 0.006590 7.715 Chrysler_X1936 0.009515 19.180 Chrysler_X1937 -0.005635 -15.797 Chrysler_X1938 0.004088 8.339 Chrysler_X1939 -0.013341 -30.100 Chrysler_X1940 -0.002117 -4.514 Chrysler_X1941 -0.000102 -0.187 Chrysler_X1942 -0.003782 -6.007 Chrysler_X1943 -0.012924 -22.609 Chrysler_X1944 -0.007171 -12.098 Chrysler_X1945 0.011026 22.137 Chrysler_X1946 -0.012907 -28.501 Chrysler_X1947 -0.006983 -11.569 Chrysler_X1948 0.005745 9.218 Chrysler_X1949 -0.007069 -10.122 Chrysler_X1950 0.001379 2.221 Chrysler_X1951 0.036033 65.558 Chrysler_X1952 0.003749 7.798 Chrysler_X1953 -0.001765 -4.186 Chrysler_X1954 -0.004329 -11.949 General.Electric_X1935 -0.003192 -3.736 General.Electric_X1936 -0.075425 -152.042 General.Electric_X1937 -0.071707 -201.016 General.Electric_X1938 -0.103871 -211.866 General.Electric_X1939 -0.127565 -287.812 General.Electric_X1940 -0.024962 -53.224 General.Electric_X1941 0.134553 246.784 General.Electric_X1942 0.061649 97.899 General.Electric_X1943 -0.082300 -143.975 General.Electric_X1944 -0.090635 -152.920 General.Electric_X1945 -0.002219 -4.456 General.Electric_X1946 0.193042 426.295 General.Electric_X1947 0.169877 281.435 General.Electric_X1948 0.133454 214.114 General.Electric_X1949 -0.047674 -68.260 General.Electric_X1950 -0.101526 -163.508 General.Electric_X1951 0.007040 12.809 General.Electric_X1952 0.025471 52.972 General.Electric_X1953 0.031151 73.878 General.Electric_X1954 -0.025162 -69.445 General.Motors_X1935 -0.016212 -18.978 General.Motors_X1936 0.004155 8.376 General.Motors_X1937 0.020453 57.337 General.Motors_X1938 -0.000534 -1.088 General.Motors_X1939 0.015678 35.372 General.Motors_X1940 0.002297 4.899 General.Motors_X1941 -0.004250 -7.795 General.Motors_X1942 -0.015503 -24.619 General.Motors_X1943 -0.010878 -19.031 General.Motors_X1944 -0.015772 -26.611 General.Motors_X1945 -0.005833 -11.711 General.Motors_X1946 -0.015918 -35.152 General.Motors_X1947 -0.002235 -3.703 General.Motors_X1948 0.008057 12.926 General.Motors_X1949 0.017844 25.549 General.Motors_X1950 0.010196 16.421 General.Motors_X1951 0.018970 34.514 General.Motors_X1952 0.013121 27.287 General.Motors_X1953 -0.005170 -12.262 General.Motors_X1954 -0.018466 -50.965 US.Steel_X1935 0.000660 0.772 US.Steel_X1936 -0.001239 -2.497 US.Steel_X1937 -0.001227 -3.439 US.Steel_X1938 0.002057 4.195 US.Steel_X1939 0.003340 7.535 US.Steel_X1940 0.002785 5.939 US.Steel_X1941 -0.000771 -1.414 US.Steel_X1942 -0.000386 -0.612 US.Steel_X1943 0.000859 1.503 US.Steel_X1944 0.001737 2.930 US.Steel_X1945 0.001869 3.752 US.Steel_X1946 -0.000598 -1.321 US.Steel_X1947 -0.000875 -1.450 US.Steel_X1948 -0.002267 -3.638 US.Steel_X1949 -0.000188 -0.270 US.Steel_X1950 -0.000374 -0.603 US.Steel_X1951 -0.002497 -4.542 US.Steel_X1952 -0.003045 -6.333 US.Steel_X1953 -0.001869 -4.432 US.Steel_X1954 0.002031 5.605 Westinghouse_X1935 -0.005793 -6.781 Westinghouse_X1936 0.031644 63.787 Westinghouse_X1937 0.053929 151.178 Westinghouse_X1938 0.074341 151.634 Westinghouse_X1939 0.087747 197.975 Westinghouse_X1940 0.064457 137.434 Westinghouse_X1941 -0.104362 -191.410 Westinghouse_X1942 -0.052757 -83.779 Westinghouse_X1943 0.018814 32.913 Westinghouse_X1944 0.019045 32.133 Westinghouse_X1945 0.052397 105.198 Westinghouse_X1946 -0.037151 -82.040 Westinghouse_X1947 -0.114019 -188.895 Westinghouse_X1948 -0.036108 -57.931 Westinghouse_X1949 0.056048 80.250 Westinghouse_X1950 0.073229 117.935 Westinghouse_X1951 -0.045325 -82.465 Westinghouse_X1952 -0.104985 -218.337 Westinghouse_X1953 -0.093423 -221.562 Westinghouse_X1954 0.062271 171.863 General.Electric_capital General.Motors_(Intercept) Chrysler_X1935 0.6445 1.06e-03 Chrysler_X1936 0.9933 1.53e-03 Chrysler_X1937 -0.6650 -9.08e-04 Chrysler_X1938 0.6386 6.59e-04 Chrysler_X1939 -2.3026 -2.15e-03 Chrysler_X1940 -0.3951 -3.41e-04 Chrysler_X1941 -0.0226 -1.65e-05 Chrysler_X1942 -1.0886 -6.10e-04 Chrysler_X1943 -4.1343 -2.08e-03 Chrysler_X1944 -2.3039 -1.16e-03 Chrysler_X1945 3.5239 1.78e-03 Chrysler_X1946 -4.4657 -2.08e-03 Chrysler_X1947 -3.1871 -1.13e-03 Chrysler_X1948 3.1221 9.26e-04 Chrysler_X1949 -4.3710 -1.14e-03 Chrysler_X1950 0.8926 2.22e-04 Chrysler_X1951 24.1889 5.81e-03 Chrysler_X1952 2.7225 6.04e-04 Chrysler_X1953 -1.4126 -2.84e-04 Chrysler_X1954 -3.8484 -6.98e-04 General.Electric_X1935 -0.3121 1.36e-04 General.Electric_X1936 -7.8744 3.21e-03 General.Electric_X1937 -8.4614 3.05e-03 General.Electric_X1938 -16.2246 4.42e-03 General.Electric_X1939 -22.0177 5.43e-03 General.Electric_X1940 -4.6579 1.06e-03 General.Electric_X1941 29.7228 -5.73e-03 General.Electric_X1942 17.7427 -2.63e-03 General.Electric_X1943 -26.3277 3.50e-03 General.Electric_X1944 -29.1212 3.86e-03 General.Electric_X1945 -0.7094 9.45e-05 General.Electric_X1946 66.7926 -8.22e-03 General.Electric_X1947 77.5319 -7.23e-03 General.Electric_X1948 72.5190 -5.68e-03 General.Electric_X1949 -29.4770 2.03e-03 General.Electric_X1950 -65.7280 4.32e-03 General.Electric_X1951 4.7261 -3.00e-04 General.Electric_X1952 18.4946 -1.08e-03 General.Electric_X1953 24.9302 -1.33e-03 General.Electric_X1954 -22.3665 1.07e-03 General.Motors_X1935 -1.5855 2.13e-02 General.Motors_X1936 0.4338 -5.46e-03 General.Motors_X1937 2.4135 -2.69e-02 General.Motors_X1938 -0.0833 7.00e-04 General.Motors_X1939 2.7060 -2.06e-02 General.Motors_X1940 0.4287 -3.02e-03 General.Motors_X1941 -0.9388 5.58e-03 General.Motors_X1942 -4.4617 2.04e-02 General.Motors_X1943 -3.4800 1.43e-02 General.Motors_X1944 -5.0677 2.07e-02 General.Motors_X1945 -1.8642 7.66e-03 General.Motors_X1946 -5.5077 2.09e-02 General.Motors_X1947 -1.0202 2.93e-03 General.Motors_X1948 4.3781 -1.06e-02 General.Motors_X1949 11.0331 -2.34e-02 General.Motors_X1950 6.6012 -1.34e-02 General.Motors_X1951 12.7347 -2.49e-02 General.Motors_X1952 9.5270 -1.72e-02 General.Motors_X1953 -4.1377 6.79e-03 General.Motors_X1954 -16.4148 2.42e-02 US.Steel_X1935 0.0645 -3.30e-03 US.Steel_X1936 -0.1293 6.19e-03 US.Steel_X1937 -0.1448 6.13e-03 US.Steel_X1938 0.3212 -1.03e-02 US.Steel_X1939 0.5764 -1.67e-02 US.Steel_X1940 0.5197 -1.39e-02 US.Steel_X1941 -0.1703 3.85e-03 US.Steel_X1942 -0.1110 1.93e-03 US.Steel_X1943 0.2749 -4.29e-03 US.Steel_X1944 0.5580 -8.68e-03 US.Steel_X1945 0.5972 -9.34e-03 US.Steel_X1946 -0.2070 2.99e-03 US.Steel_X1947 -0.3994 4.37e-03 US.Steel_X1948 -1.2321 1.13e-02 US.Steel_X1949 -0.1164 9.41e-04 US.Steel_X1950 -0.2424 1.87e-03 US.Steel_X1951 -1.6760 1.25e-02 US.Steel_X1952 -2.2112 1.52e-02 US.Steel_X1953 -1.4956 9.34e-03 US.Steel_X1954 1.8051 -1.01e-02 Westinghouse_X1935 -0.5665 -4.91e-04 Westinghouse_X1936 3.3036 2.68e-03 Westinghouse_X1937 6.3636 4.57e-03 Westinghouse_X1938 11.6121 6.30e-03 Westinghouse_X1939 15.1452 7.44e-03 Westinghouse_X1940 12.0276 5.46e-03 Westinghouse_X1941 -23.0535 -8.84e-03 Westinghouse_X1942 -15.1836 -4.47e-03 Westinghouse_X1943 6.0186 1.59e-03 Westinghouse_X1944 6.1191 1.61e-03 Westinghouse_X1945 16.7462 4.44e-03 Westinghouse_X1946 -12.8541 -3.15e-03 Westinghouse_X1947 -52.0382 -9.66e-03 Westinghouse_X1948 -19.6209 -3.06e-03 Westinghouse_X1949 34.6547 4.75e-03 Westinghouse_X1950 47.4084 6.21e-03 Westinghouse_X1951 -30.4270 -3.84e-03 Westinghouse_X1952 -76.2296 -8.90e-03 Westinghouse_X1953 -74.7663 -7.92e-03 Westinghouse_X1954 55.3529 5.28e-03 General.Motors_value General.Motors_capital Chrysler_X1935 3.2697 2.97e-03 Chrysler_X1936 7.1482 8.07e-02 Chrysler_X1937 -4.8925 -1.42e-01 Chrysler_X1938 1.8397 1.38e-01 Chrysler_X1939 -9.2736 -4.37e-01 Chrysler_X1940 -1.5846 -7.07e-02 Chrysler_X1941 -0.0749 -4.20e-03 Chrysler_X1942 -1.9776 -1.85e-01 Chrysler_X1943 -8.4430 -5.50e-01 Chrysler_X1944 -5.0608 -2.33e-01 Chrysler_X1945 8.6022 4.71e-01 Chrysler_X1946 -10.1940 -8.37e-01 Chrysler_X1947 -3.9688 -8.57e-01 Chrysler_X1948 3.0137 8.54e-01 Chrysler_X1949 -4.2157 -1.16e+00 Chrysler_X1950 0.8345 2.44e-01 Chrysler_X1951 28.0658 7.01e+00 Chrysler_X1952 2.9759 8.64e-01 Chrysler_X1953 -1.7755 -5.06e-01 Chrysler_X1954 -3.9028 -1.55e+00 General.Electric_X1935 0.4184 3.81e-04 General.Electric_X1936 14.9723 1.69e-01 General.Electric_X1937 16.4491 4.79e-01 General.Electric_X1938 12.3500 9.25e-01 General.Electric_X1939 23.4292 1.10e+00 General.Electric_X1940 4.9361 2.20e-01 General.Electric_X1941 -26.0763 -1.46e+00 General.Electric_X1942 -8.5163 -7.97e-01 General.Electric_X1943 14.2062 9.26e-01 General.Electric_X1944 16.9016 7.78e-01 General.Electric_X1945 0.4575 2.50e-02 General.Electric_X1946 -40.2860 -3.31e+00 General.Electric_X1947 -25.5097 -5.51e+00 General.Electric_X1948 -18.4956 -5.24e+00 General.Electric_X1949 7.5116 2.07e+00 General.Electric_X1950 16.2362 4.75e+00 General.Electric_X1951 -1.4489 -3.62e-01 General.Electric_X1952 -5.3416 -1.55e+00 General.Electric_X1953 -8.2795 -2.36e+00 General.Electric_X1954 5.9933 2.39e+00 General.Motors_X1935 65.5183 5.96e-02 General.Motors_X1936 -25.4300 -2.87e-01 General.Motors_X1937 -144.6452 -4.21e+00 General.Motors_X1938 1.9558 1.47e-01 General.Motors_X1939 -88.7707 -4.19e+00 General.Motors_X1940 -14.0060 -6.25e-01 General.Motors_X1941 25.3914 1.42e+00 General.Motors_X1942 66.0227 6.18e+00 General.Motors_X1943 57.8898 3.77e+00 General.Motors_X1944 90.6754 4.17e+00 General.Motors_X1945 37.0686 2.03e+00 General.Motors_X1946 102.4144 8.40e+00 General.Motors_X1947 10.3479 2.23e+00 General.Motors_X1948 -34.4239 -9.76e+00 General.Motors_X1949 -86.6782 -2.39e+01 General.Motors_X1950 -50.2708 -1.47e+01 General.Motors_X1951 -120.3581 -3.01e+01 General.Motors_X1952 -84.8289 -2.46e+01 General.Motors_X1953 42.3640 1.21e+01 General.Motors_X1954 135.6002 5.40e+01 US.Steel_X1935 -10.1444 -9.23e-03 US.Steel_X1936 28.8526 3.26e-01 US.Steel_X1937 33.0183 9.62e-01 US.Steel_X1938 -28.6886 -2.15e+00 US.Steel_X1939 -71.9676 -3.39e+00 US.Steel_X1940 -64.6193 -2.88e+00 US.Steel_X1941 17.5269 9.83e-01 US.Steel_X1942 6.2492 5.85e-01 US.Steel_X1943 -17.4030 -1.13e+00 US.Steel_X1944 -37.9949 -1.75e+00 US.Steel_X1945 -45.1924 -2.47e+00 US.Steel_X1946 14.6469 1.20e+00 US.Steel_X1947 15.4188 3.33e+00 US.Steel_X1948 36.8685 1.04e+01 US.Steel_X1949 3.4806 9.60e-01 US.Steel_X1950 7.0265 2.06e+00 US.Steel_X1951 60.2830 1.51e+01 US.Steel_X1952 74.9299 2.18e+01 US.Steel_X1953 58.2771 1.66e+01 US.Steel_X1954 -56.7511 -2.26e+01 Westinghouse_X1935 -1.5111 -1.37e-03 Westinghouse_X1936 12.4999 1.41e-01 Westinghouse_X1937 24.6178 7.17e-01 Westinghouse_X1938 17.5894 1.32e+00 Westinghouse_X1939 32.0707 1.51e+00 Westinghouse_X1940 25.3645 1.13e+00 Westinghouse_X1941 -40.2479 -2.26e+00 Westinghouse_X1942 -14.5028 -1.36e+00 Westinghouse_X1943 6.4627 4.21e-01 Westinghouse_X1944 7.0674 3.25e-01 Westinghouse_X1945 21.4937 1.18e+00 Westinghouse_X1946 -15.4283 -1.27e+00 Westinghouse_X1947 -34.0718 -7.36e+00 Westinghouse_X1948 -9.9583 -2.82e+00 Westinghouse_X1949 17.5737 4.84e+00 Westinghouse_X1950 23.3044 6.82e+00 Westinghouse_X1951 -18.5624 -4.64e+00 Westinghouse_X1952 -43.8127 -1.27e+01 Westinghouse_X1953 -49.4119 -1.41e+01 Westinghouse_X1954 29.5158 1.17e+01 US.Steel_(Intercept) US.Steel_value US.Steel_capital Chrysler_X1935 -2.96e-03 -4.0379 -0.15945 Chrysler_X1936 -4.28e-03 -7.7323 -0.21608 Chrysler_X1937 2.53e-03 6.7824 0.29930 Chrysler_X1938 -1.84e-03 -3.3128 -0.47838 Chrysler_X1939 6.00e-03 11.7430 1.87608 Chrysler_X1940 9.52e-04 2.0975 0.24204 Chrysler_X1941 4.59e-05 0.1094 0.01201 Chrysler_X1942 1.70e-03 3.6889 0.50810 Chrysler_X1943 5.81e-03 11.5373 1.75404 Chrysler_X1944 3.22e-03 5.8493 0.90002 Chrysler_X1945 -4.96e-03 -9.1744 -1.06014 Chrysler_X1946 5.80e-03 12.0014 1.35006 Chrysler_X1947 3.14e-03 5.6424 0.83159 Chrysler_X1948 -2.58e-03 -4.2007 -0.79297 Chrysler_X1949 3.18e-03 5.2997 1.11622 Chrysler_X1950 -6.20e-04 -1.0401 -0.22186 Chrysler_X1951 -1.62e-02 -37.1002 -5.54355 Chrysler_X1952 -1.69e-03 -3.6411 -0.74900 Chrysler_X1953 7.94e-04 1.6124 0.49499 Chrysler_X1954 1.95e-03 4.1188 1.30389 General.Electric_X1935 1.69e-05 0.0230 0.00091 General.Electric_X1936 4.00e-04 0.7222 0.02018 General.Electric_X1937 3.80e-04 1.0168 0.04487 General.Electric_X1938 5.50e-04 0.9917 0.14321 General.Electric_X1939 6.76e-04 1.3230 0.21136 General.Electric_X1940 1.32e-04 0.2914 0.03362 General.Electric_X1941 -7.13e-04 -1.6972 -0.18636 General.Electric_X1942 -3.27e-04 -0.7084 -0.09757 General.Electric_X1943 4.36e-04 0.8656 0.13161 General.Electric_X1944 4.80e-04 0.8711 0.13403 General.Electric_X1945 1.18e-05 0.0218 0.00251 General.Electric_X1946 -1.02e-03 -2.1149 -0.23791 General.Electric_X1947 -9.00e-04 -1.6172 -0.23835 General.Electric_X1948 -7.07e-04 -1.1496 -0.21701 General.Electric_X1949 2.53e-04 0.4211 0.08869 General.Electric_X1950 5.38e-04 0.9023 0.19248 General.Electric_X1951 -3.73e-05 -0.0854 -0.01276 General.Electric_X1952 -1.35e-04 -0.2914 -0.05995 General.Electric_X1953 -1.65e-04 -0.3353 -0.10293 General.Electric_X1954 1.33e-04 0.2820 0.08929 General.Motors_X1935 1.01e-02 13.7309 0.54222 General.Motors_X1936 -2.58e-03 -4.6683 -0.13046 General.Motors_X1937 -1.27e-02 -34.0295 -1.50166 General.Motors_X1938 3.32e-04 0.5977 0.08631 General.Motors_X1939 -9.75e-03 -19.0765 -3.04769 General.Motors_X1940 -1.43e-03 -3.1463 -0.36306 General.Motors_X1941 2.64e-03 6.2893 0.69062 General.Motors_X1942 9.64e-03 20.9002 2.87877 General.Motors_X1943 6.76e-03 13.4247 2.04099 General.Motors_X1944 9.81e-03 17.7857 2.73663 General.Motors_X1945 3.63e-03 6.7092 0.77528 General.Motors_X1946 9.90e-03 20.4619 2.30180 General.Motors_X1947 1.39e-03 2.4966 0.36796 General.Motors_X1948 -5.01e-03 -8.1431 -1.53716 General.Motors_X1949 -1.11e-02 -18.4924 -3.89482 General.Motors_X1950 -6.34e-03 -10.6327 -2.26803 General.Motors_X1951 -1.18e-02 -27.0005 -4.03445 General.Motors_X1952 -8.16e-03 -17.6138 -3.62324 General.Motors_X1953 3.21e-03 6.5289 2.00435 General.Motors_X1954 1.15e-02 24.2859 7.68815 US.Steel_X1935 -8.99e-03 -12.2508 -0.48377 US.Steel_X1936 1.69e-02 30.5206 0.85291 US.Steel_X1937 1.67e-02 44.7615 1.97524 US.Steel_X1938 -2.80e-02 -50.5201 -7.29526 US.Steel_X1939 -4.55e-02 -89.1179 -14.23756 US.Steel_X1940 -3.80e-02 -83.6458 -9.65217 US.Steel_X1941 1.05e-02 25.0160 2.74698 US.Steel_X1942 5.26e-03 11.3993 1.57013 US.Steel_X1943 -1.17e-02 -23.2554 -3.53559 US.Steel_X1944 -2.37e-02 -42.9442 -6.60771 US.Steel_X1945 -2.55e-02 -47.1333 -5.44650 US.Steel_X1946 8.16e-03 16.8627 1.89692 US.Steel_X1947 1.19e-02 21.4365 3.15933 US.Steel_X1948 3.09e-02 50.2553 9.48663 US.Steel_X1949 2.57e-03 4.2789 0.90121 US.Steel_X1950 5.11e-03 8.5638 1.82670 US.Steel_X1951 3.40e-02 77.9272 11.64398 US.Steel_X1952 4.15e-02 89.6523 18.44196 US.Steel_X1953 2.55e-02 51.7535 15.88809 US.Steel_X1954 -2.77e-02 -58.5688 -18.54102 Westinghouse_X1935 -1.36e-03 -1.8578 -0.07336 Westinghouse_X1936 7.45e-03 13.4613 0.37618 Westinghouse_X1937 1.27e-02 33.9762 1.49930 Westinghouse_X1938 1.75e-02 31.5341 4.55362 Westinghouse_X1939 2.07e-02 40.4306 6.45923 Westinghouse_X1940 1.52e-02 33.4258 3.85712 Westinghouse_X1941 -2.46e-02 -58.4830 -6.42196 Westinghouse_X1942 -1.24e-02 -26.9329 -3.70970 Westinghouse_X1943 4.43e-03 8.7920 1.33667 Westinghouse_X1944 4.48e-03 8.1323 1.25129 Westinghouse_X1945 1.23e-02 22.8217 2.63717 Westinghouse_X1946 -8.75e-03 -18.0831 -2.03421 Westinghouse_X1947 -2.68e-02 -48.2250 -7.10746 Westinghouse_X1948 -8.50e-03 -13.8193 -2.60865 Westinghouse_X1949 1.32e-02 21.9947 4.63248 Westinghouse_X1950 1.72e-02 28.9161 6.16798 Westinghouse_X1951 -1.07e-02 -24.4289 -3.65019 Westinghouse_X1952 -2.47e-02 -53.3679 -10.97807 Westinghouse_X1953 -2.20e-02 -44.6732 -13.71448 Westinghouse_X1954 1.47e-02 31.0114 9.81721 Westinghouse_(Intercept) Westinghouse_value Chrysler_X1935 -5.65e-03 -1.082 Chrysler_X1936 -8.16e-03 -4.208 Chrysler_X1937 4.83e-03 3.521 Chrysler_X1938 -3.50e-03 -1.964 Chrysler_X1939 1.14e-02 5.945 Chrysler_X1940 1.81e-03 1.141 Chrysler_X1941 8.76e-05 0.047 Chrysler_X1942 3.24e-03 1.819 Chrysler_X1943 1.11e-02 6.837 Chrysler_X1944 6.15e-03 3.852 Chrysler_X1945 -9.45e-03 -6.967 Chrysler_X1946 1.11e-02 8.413 Chrysler_X1947 5.99e-03 3.480 Chrysler_X1948 -4.92e-03 -3.262 Chrysler_X1949 6.06e-03 3.537 Chrysler_X1950 -1.18e-03 -0.751 Chrysler_X1951 -3.09e-02 -22.354 Chrysler_X1952 -3.21e-03 -2.777 Chrysler_X1953 1.51e-03 1.806 Chrysler_X1954 3.71e-03 4.412 General.Electric_X1935 6.17e-03 1.182 General.Electric_X1936 1.46e-01 75.280 General.Electric_X1937 1.39e-01 101.111 General.Electric_X1938 2.01e-01 112.591 General.Electric_X1939 2.47e-01 128.281 General.Electric_X1940 4.83e-02 30.346 General.Electric_X1941 -2.60e-01 -139.785 General.Electric_X1942 -1.19e-01 -66.920 General.Electric_X1943 1.59e-01 98.251 General.Electric_X1944 1.75e-01 109.867 General.Electric_X1945 4.29e-03 3.165 General.Electric_X1946 -3.73e-01 -283.963 General.Electric_X1947 -3.29e-01 -191.038 General.Electric_X1948 -2.58e-01 -170.961 General.Electric_X1949 9.22e-02 53.834 General.Electric_X1950 1.96e-01 124.738 General.Electric_X1951 -1.36e-02 -9.856 General.Electric_X1952 -4.93e-02 -42.572 General.Electric_X1953 -6.03e-02 -71.913 General.Electric_X1954 4.87e-02 57.863 General.Motors_X1935 -6.24e-02 -11.950 General.Motors_X1936 1.60e-02 8.253 General.Motors_X1937 7.87e-02 57.392 General.Motors_X1938 -2.05e-03 -1.151 General.Motors_X1939 6.03e-02 31.373 General.Motors_X1940 8.84e-03 5.558 General.Motors_X1941 -1.64e-02 -8.786 General.Motors_X1942 -5.97e-02 -33.488 General.Motors_X1943 -4.19e-02 -25.843 General.Motors_X1944 -6.07e-02 -38.047 General.Motors_X1945 -2.25e-02 -16.552 General.Motors_X1946 -6.13e-02 -46.597 General.Motors_X1947 -8.60e-03 -5.002 General.Motors_X1948 3.10e-02 20.539 General.Motors_X1949 6.87e-02 40.098 General.Motors_X1950 3.92e-02 24.930 General.Motors_X1951 7.30e-02 52.851 General.Motors_X1952 5.05e-02 43.640 General.Motors_X1953 -1.99e-02 -23.751 General.Motors_X1954 -7.11e-02 -84.506 US.Steel_X1935 5.67e-02 10.854 US.Steel_X1936 -1.06e-01 -54.933 US.Steel_X1937 -1.05e-01 -76.855 US.Steel_X1938 1.77e-01 99.039 US.Steel_X1939 2.87e-01 149.211 US.Steel_X1940 2.39e-01 150.428 US.Steel_X1941 -6.62e-02 -35.578 US.Steel_X1942 -3.31e-02 -18.595 US.Steel_X1943 7.38e-02 45.577 US.Steel_X1944 1.49e-01 93.525 US.Steel_X1945 1.61e-01 118.378 US.Steel_X1946 -5.14e-02 -39.094 US.Steel_X1947 -7.52e-02 -43.725 US.Steel_X1948 -1.95e-01 -129.046 US.Steel_X1949 -1.62e-02 -9.446 US.Steel_X1950 -3.22e-02 -20.441 US.Steel_X1951 -2.15e-01 -155.289 US.Steel_X1952 -2.62e-01 -226.135 US.Steel_X1953 -1.61e-01 -191.674 US.Steel_X1954 1.75e-01 207.479 Westinghouse_X1935 3.03e-02 5.802 Westinghouse_X1936 -1.66e-01 -85.410 Westinghouse_X1937 -2.82e-01 -205.647 Westinghouse_X1938 -3.89e-01 -217.923 Westinghouse_X1939 -4.59e-01 -238.632 Westinghouse_X1940 -3.37e-01 -211.909 Westinghouse_X1941 5.46e-01 293.206 Westinghouse_X1942 2.76e-01 154.873 Westinghouse_X1943 -9.84e-02 -60.742 Westinghouse_X1944 -9.96e-02 -62.433 Westinghouse_X1945 -2.74e-01 -202.055 Westinghouse_X1946 1.94e-01 147.788 Westinghouse_X1947 5.96e-01 346.758 Westinghouse_X1948 1.89e-01 125.092 Westinghouse_X1949 -2.93e-01 -171.160 Westinghouse_X1950 -3.83e-01 -243.315 Westinghouse_X1951 2.37e-01 171.608 Westinghouse_X1952 5.49e-01 474.533 Westinghouse_X1953 4.89e-01 583.245 Westinghouse_X1954 -3.26e-01 -387.265 Westinghouse_capital Chrysler_X1935 -0.01017 Chrysler_X1936 -0.00652 Chrysler_X1937 0.03574 Chrysler_X1938 -0.06342 Chrysler_X1939 0.26872 Chrysler_X1940 0.04809 Chrysler_X1941 0.00317 Chrysler_X1942 0.19712 Chrysler_X1943 0.93491 Chrysler_X1944 0.56053 Chrysler_X1945 -0.87325 Chrysler_X1946 0.95137 Chrysler_X1947 0.66499 Chrysler_X1948 -0.64315 Chrysler_X1949 0.85922 Chrysler_X1950 -0.16155 Chrysler_X1951 -4.00575 Chrysler_X1952 -0.46760 Chrysler_X1953 0.26445 Chrysler_X1954 0.79226 General.Electric_X1935 0.01111 General.Electric_X1936 0.11671 General.Electric_X1937 1.02637 General.Electric_X1938 3.63650 General.Electric_X1939 5.79842 General.Electric_X1940 1.27948 General.Electric_X1941 -9.42136 General.Electric_X1942 -7.25009 General.Electric_X1943 13.43544 General.Electric_X1944 15.98834 General.Electric_X1945 0.39668 General.Electric_X1946 -32.11157 General.Electric_X1947 -36.50562 General.Electric_X1948 -33.71211 General.Electric_X1949 13.07588 General.Electric_X1950 26.84462 General.Electric_X1951 -1.76618 General.Electric_X1952 -7.16842 General.Electric_X1953 -10.53235 General.Electric_X1954 10.39092 General.Motors_X1935 -0.11232 General.Motors_X1936 0.01280 General.Motors_X1937 0.58258 General.Motors_X1938 -0.03717 General.Motors_X1939 1.41811 General.Motors_X1940 0.23434 General.Motors_X1941 -0.59216 General.Motors_X1942 -3.62807 General.Motors_X1943 -3.53399 General.Motors_X1944 -5.53672 General.Motors_X1945 -2.07456 General.Motors_X1946 -5.26934 General.Motors_X1947 -0.95586 General.Motors_X1948 4.05009 General.Motors_X1949 9.73943 General.Motors_X1950 5.36510 General.Motors_X1951 9.47046 General.Motors_X1952 7.34822 General.Motors_X1953 -3.47863 General.Motors_X1954 -15.17538 US.Steel_X1935 0.10202 US.Steel_X1936 -0.08517 US.Steel_X1937 -0.78015 US.Steel_X1938 3.19880 US.Steel_X1939 6.74450 US.Steel_X1940 6.34264 US.Steel_X1941 -2.39791 US.Steel_X1942 -2.01455 US.Steel_X1943 6.23245 US.Steel_X1944 13.61008 US.Steel_X1945 14.83734 US.Steel_X1946 -4.42093 US.Steel_X1947 -8.35538 US.Steel_X1948 -25.44676 US.Steel_X1949 -2.29427 US.Steel_X1950 -4.39917 US.Steel_X1951 -27.82678 US.Steel_X1952 -38.07729 US.Steel_X1953 -28.07253 US.Steel_X1954 37.25854 Westinghouse_X1935 0.05454 Westinghouse_X1936 -0.13242 Westinghouse_X1937 -2.08750 Westinghouse_X1938 -7.03855 Westinghouse_X1939 -10.78640 Westinghouse_X1940 -8.93489 Westinghouse_X1941 19.76178 Westinghouse_X1942 16.77886 Westinghouse_X1943 -8.30621 Westinghouse_X1944 -9.08553 Westinghouse_X1945 -25.32546 Westinghouse_X1946 16.71244 Westinghouse_X1947 66.26222 Westinghouse_X1948 24.66709 Westinghouse_X1949 -41.57334 Westinghouse_X1950 -52.36326 Westinghouse_X1951 30.75091 Westinghouse_X1952 79.90351 Westinghouse_X1953 85.42211 Westinghouse_X1954 -69.54427 Chrysler_(Intercept) Chrysler_value 0 0 Chrysler_capital General.Electric_(Intercept) 0 0 General.Electric_value General.Electric_capital 0 0 General.Motors_(Intercept) General.Motors_value 0 0 General.Motors_capital US.Steel_(Intercept) 0 0 US.Steel_value US.Steel_capital 0 0 Westinghouse_(Intercept) Westinghouse_value 0 0 Westinghouse_capital 0 Error in estfun.systemfit(greeneSurPooled) : returning the estimation function for models with restrictions has not yet been implemented. [1] "Error in estfun.systemfit(greeneSurPooled) : \n returning the estimation function for models with restrictions has not yet been implemented.\n" attr(,"class") [1] "try-error" attr(,"condition") > > ## **************** bread ************************ > if(requireNamespace( 'plm', quietly = TRUE ) ) { + print( bread( theilOls ) ) + + print( bread( theilSur ) ) + + print( bread( greeneOls ) ) + + print( try( bread( greeneOlsPooled ) ) ) + + print( bread( greeneSur ) ) + + print( try( bread( greeneSurPooled ) ) ) + } General.Electric_(Intercept) General.Electric_(Intercept) 50.64496 General.Electric_value -0.02323 General.Electric_capital -0.00888 Westinghouse_(Intercept) 0.00000 Westinghouse_value 0.00000 Westinghouse_capital 0.00000 General.Electric_value General.Electric_capital General.Electric_(Intercept) -2.32e-02 -8.88e-03 General.Electric_value 1.25e-05 -2.43e-06 General.Electric_capital -2.43e-06 3.40e-05 Westinghouse_(Intercept) 0.00e+00 0.00e+00 Westinghouse_value 0.00e+00 0.00e+00 Westinghouse_capital 0.00e+00 0.00e+00 Westinghouse_(Intercept) Westinghouse_value General.Electric_(Intercept) 0.0000 0.00e+00 General.Electric_value 0.0000 0.00e+00 General.Electric_capital 0.0000 0.00e+00 Westinghouse_(Intercept) 24.6366 -4.20e-02 Westinghouse_value -0.0420 9.46e-05 Westinghouse_capital 0.0648 -2.51e-04 Westinghouse_capital General.Electric_(Intercept) 0.000000 General.Electric_value 0.000000 General.Electric_capital 0.000000 Westinghouse_(Intercept) 0.064774 Westinghouse_value -0.000251 Westinghouse_capital 0.001207 General.Electric_(Intercept) General.Electric_value [1,] 29230.95 -13.17064 [2,] -13.17 0.00707 [3,] -5.85 -0.00136 [4,] 5078.50 -2.10754 [5,] -9.05 0.00480 [6,] 15.70 -0.01299 General.Electric_capital Westinghouse_(Intercept) Westinghouse_value [1,] -5.849668 5078.50 -9.047719 [2,] -0.001362 -2.11 0.004800 [3,] 0.021226 -1.58 -0.000675 [4,] -1.584851 1935.63 -3.200900 [5,] -0.000675 -3.20 0.007194 [6,] 0.023793 4.54 -0.018984 Westinghouse_capital [1,] 15.7006 [2,] -0.0130 [3,] 0.0238 [4,] 4.5447 [5,] -0.0190 [6,] 0.0957 Chrysler_(Intercept) Chrysler_value Chrysler_(Intercept) 103.4623 -0.144448 Chrysler_value -0.1444 0.000226 Chrysler_capital 0.0138 -0.000102 General.Electric_(Intercept) 0.0000 0.000000 General.Electric_value 0.0000 0.000000 General.Electric_capital 0.0000 0.000000 General.Motors_(Intercept) 0.0000 0.000000 General.Motors_value 0.0000 0.000000 General.Motors_capital 0.0000 0.000000 US.Steel_(Intercept) 0.0000 0.000000 US.Steel_value 0.0000 0.000000 US.Steel_capital 0.0000 0.000000 Westinghouse_(Intercept) 0.0000 0.000000 Westinghouse_value 0.0000 0.000000 Westinghouse_capital 0.0000 0.000000 Chrysler_capital General.Electric_(Intercept) Chrysler_(Intercept) 0.013776 0.0000 Chrysler_value -0.000102 0.0000 Chrysler_capital 0.000471 0.0000 General.Electric_(Intercept) 0.000000 126.6124 General.Electric_value 0.000000 -0.0581 General.Electric_capital 0.000000 -0.0222 General.Motors_(Intercept) 0.000000 0.0000 General.Motors_value 0.000000 0.0000 General.Motors_capital 0.000000 0.0000 US.Steel_(Intercept) 0.000000 0.0000 US.Steel_value 0.000000 0.0000 US.Steel_capital 0.000000 0.0000 Westinghouse_(Intercept) 0.000000 0.0000 Westinghouse_value 0.000000 0.0000 Westinghouse_capital 0.000000 0.0000 General.Electric_value General.Electric_capital Chrysler_(Intercept) 0.00e+00 0.00e+00 Chrysler_value 0.00e+00 0.00e+00 Chrysler_capital 0.00e+00 0.00e+00 General.Electric_(Intercept) -5.81e-02 -2.22e-02 General.Electric_value 3.12e-05 -6.09e-06 General.Electric_capital -6.09e-06 8.50e-05 General.Motors_(Intercept) 0.00e+00 0.00e+00 General.Motors_value 0.00e+00 0.00e+00 General.Motors_capital 0.00e+00 0.00e+00 US.Steel_(Intercept) 0.00e+00 0.00e+00 US.Steel_value 0.00e+00 0.00e+00 US.Steel_capital 0.00e+00 0.00e+00 Westinghouse_(Intercept) 0.00e+00 0.00e+00 Westinghouse_value 0.00e+00 0.00e+00 Westinghouse_capital 0.00e+00 0.00e+00 General.Motors_(Intercept) General.Motors_value Chrysler_(Intercept) 0.0000 0.00e+00 Chrysler_value 0.0000 0.00e+00 Chrysler_capital 0.0000 0.00e+00 General.Electric_(Intercept) 0.0000 0.00e+00 General.Electric_value 0.0000 0.00e+00 General.Electric_capital 0.0000 0.00e+00 General.Motors_(Intercept) 132.9858 -3.11e-02 General.Motors_value -0.0311 7.92e-06 General.Motors_capital 0.0108 -4.93e-06 US.Steel_(Intercept) 0.0000 0.00e+00 US.Steel_value 0.0000 0.00e+00 US.Steel_capital 0.0000 0.00e+00 Westinghouse_(Intercept) 0.0000 0.00e+00 Westinghouse_value 0.0000 0.00e+00 Westinghouse_capital 0.0000 0.00e+00 General.Motors_capital US.Steel_(Intercept) Chrysler_(Intercept) 0.00e+00 0.0000 Chrysler_value 0.00e+00 0.0000 Chrysler_capital 0.00e+00 0.0000 General.Electric_(Intercept) 0.00e+00 0.0000 General.Electric_value 0.00e+00 0.0000 General.Electric_capital 0.00e+00 0.0000 General.Motors_(Intercept) 1.08e-02 0.0000 General.Motors_value -4.93e-06 0.0000 General.Motors_capital 1.63e-05 0.0000 US.Steel_(Intercept) 0.00e+00 235.6498 US.Steel_value 0.00e+00 -0.1119 US.Steel_capital 0.00e+00 -0.0336 Westinghouse_(Intercept) 0.00e+00 0.0000 Westinghouse_value 0.00e+00 0.0000 Westinghouse_capital 0.00e+00 0.0000 US.Steel_value US.Steel_capital Chrysler_(Intercept) 0.00e+00 0.00e+00 Chrysler_value 0.00e+00 0.00e+00 Chrysler_capital 0.00e+00 0.00e+00 General.Electric_(Intercept) 0.00e+00 0.00e+00 General.Electric_value 0.00e+00 0.00e+00 General.Electric_capital 0.00e+00 0.00e+00 General.Motors_(Intercept) 0.00e+00 0.00e+00 General.Motors_value 0.00e+00 0.00e+00 General.Motors_capital 0.00e+00 0.00e+00 US.Steel_(Intercept) -1.12e-01 -3.36e-02 US.Steel_value 5.95e-05 -1.79e-05 US.Steel_capital -1.79e-05 2.30e-04 Westinghouse_(Intercept) 0.00e+00 0.00e+00 Westinghouse_value 0.00e+00 0.00e+00 Westinghouse_capital 0.00e+00 0.00e+00 Westinghouse_(Intercept) Westinghouse_value Chrysler_(Intercept) 0.000 0.000000 Chrysler_value 0.000 0.000000 Chrysler_capital 0.000 0.000000 General.Electric_(Intercept) 0.000 0.000000 General.Electric_value 0.000 0.000000 General.Electric_capital 0.000 0.000000 General.Motors_(Intercept) 0.000 0.000000 General.Motors_value 0.000 0.000000 General.Motors_capital 0.000 0.000000 US.Steel_(Intercept) 0.000 0.000000 US.Steel_value 0.000 0.000000 US.Steel_capital 0.000 0.000000 Westinghouse_(Intercept) 61.592 -0.105021 Westinghouse_value -0.105 0.000237 Westinghouse_capital 0.162 -0.000626 Westinghouse_capital Chrysler_(Intercept) 0.000000 Chrysler_value 0.000000 Chrysler_capital 0.000000 General.Electric_(Intercept) 0.000000 General.Electric_value 0.000000 General.Electric_capital 0.000000 General.Motors_(Intercept) 0.000000 General.Motors_value 0.000000 General.Motors_capital 0.000000 US.Steel_(Intercept) 0.000000 US.Steel_value 0.000000 US.Steel_capital 0.000000 Westinghouse_(Intercept) 0.161935 Westinghouse_value -0.000626 Westinghouse_capital 0.003017 Error in bread.systemfit(greeneOlsPooled) : returning the 'bread' for models with restrictions has not yet been implemented. [1] "Error in bread.systemfit(greeneOlsPooled) : \n returning the 'bread' for models with restrictions has not yet been implemented.\n" attr(,"class") [1] "try-error" attr(,"condition") Chrysler_(Intercept) Chrysler_value Chrysler_capital [1,] 1.33e+04 -1.82e+01 9.57e-01 [2,] -1.82e+01 2.86e-02 -1.31e-02 [3,] 9.57e-01 -1.31e-02 6.69e-02 [4,] -2.94e+03 3.74e+00 1.98e+00 [5,] 1.28e+00 -1.86e-03 1.28e-04 [6,] 8.80e-01 -2.96e-04 -5.56e-03 [7,] -1.56e+04 1.91e+01 7.79e+00 [8,] 3.28e+00 -4.91e-03 1.03e-03 [9,] -8.18e-02 3.42e-03 -1.89e-02 [10,] 1.80e+04 -1.87e+01 -2.45e+01 [11,] -7.46e+00 1.13e-02 -3.26e-03 [12,] -4.03e+00 -1.22e-02 1.03e-01 [13,] -3.04e+01 3.03e-01 -9.35e-01 [14,] 1.14e-01 -3.70e-04 1.18e-03 [15,] 2.42e-01 -6.41e-04 1.67e-03 General.Electric_(Intercept) General.Electric_value [1,] -2936.42 1.28e+00 [2,] 3.74 -1.86e-03 [3,] 1.98 1.28e-04 [4,] 65119.82 -2.85e+01 [5,] -28.51 1.50e-02 [6,] -16.15 -1.70e-03 [7,] 57134.02 -2.61e+01 [8,] -11.96 6.35e-03 [9,] -3.52 -2.27e-03 [10,] 64429.20 -3.04e+01 [11,] -22.01 1.35e-02 [12,] -55.05 1.23e-02 [13,] 10286.79 -4.02e+00 [14,] -17.00 8.74e-03 [15,] 23.38 -2.16e-02 General.Electric_capital General.Motors_(Intercept) General.Motors_value [1,] 8.80e-01 -1.56e+04 3.28e+00 [2,] -2.96e-04 1.91e+01 -4.91e-03 [3,] -5.56e-03 7.79e+00 1.03e-03 [4,] -1.61e+01 5.71e+04 -1.20e+01 [5,] -1.70e-03 -2.61e+01 6.35e-03 [6,] 4.86e-02 -8.74e+00 -9.49e-04 [7,] -8.74e+00 8.00e+05 -1.84e+02 [8,] -9.49e-04 -1.84e+02 4.68e-02 [9,] 1.98e-02 5.32e+01 -2.83e-02 [10,] -2.30e+00 -1.75e+05 3.73e+01 [11,] -1.07e-02 8.02e+01 -2.06e-02 [12,] 7.77e-02 2.01e+01 1.09e-02 [13,] -4.02e+00 1.10e+04 -2.33e+00 [14,] 1.04e-04 -2.06e+01 5.10e-03 [15,] 4.61e-02 3.98e+01 -1.28e-02 General.Motors_capital US.Steel_(Intercept) US.Steel_value [1,] -0.08183 1.80e+04 -7.46e+00 [2,] 0.00342 -1.87e+01 1.13e-02 [3,] -0.01889 -2.45e+01 -3.26e-03 [4,] -3.51957 6.44e+04 -2.20e+01 [5,] -0.00227 -3.04e+01 1.35e-02 [6,] 0.01982 -2.30e+00 -1.07e-02 [7,] 53.22544 -1.75e+05 8.02e+01 [8,] -0.02835 3.73e+01 -2.06e-02 [9,] 0.10737 3.74e+00 1.39e-02 [10,] 3.74276 1.25e+06 -5.65e+02 [11,] 0.01386 -5.65e+02 3.00e-01 [12,] -0.10360 -3.12e+02 -9.01e-02 [13,] -0.48733 2.74e+04 -8.35e+00 [14,] -0.00238 -5.09e+01 2.23e-02 [15,] 0.02432 1.10e+02 -7.74e-02 US.Steel_capital Westinghouse_(Intercept) Westinghouse_value [1,] -4.0281 -30.387 1.14e-01 [2,] -0.0122 0.303 -3.70e-04 [3,] 0.1031 -0.935 1.18e-03 [4,] -55.0482 10286.790 -1.70e+01 [5,] 0.0123 -4.016 8.74e-03 [6,] 0.0777 -4.021 1.04e-04 [7,] 20.0945 11026.166 -2.06e+01 [8,] 0.0109 -2.326 5.10e-03 [9,] -0.1036 -0.487 -2.38e-03 [10,] -311.9830 27440.848 -5.09e+01 [11,] -0.0901 -8.348 2.23e-02 [12,] 1.6331 -27.510 2.29e-02 [13,] -27.5101 3917.263 -5.99e+00 [14,] 0.0229 -5.992 1.29e-02 [15,] 0.1422 6.376 -3.12e-02 Westinghouse_capital [1,] 2.42e-01 [2,] -6.41e-04 [3,] 1.67e-03 [4,] 2.34e+01 [5,] -2.16e-02 [6,] 4.61e-02 [7,] 3.98e+01 [8,] -1.28e-02 [9,] 2.43e-02 [10,] 1.10e+02 [11,] -7.74e-02 [12,] 1.42e-01 [13,] 6.38e+00 [14,] -3.12e-02 [15,] 1.70e-01 Error in bread.systemfit(greeneSurPooled) : returning the 'bread' for models with restrictions has not yet been implemented. [1] "Error in bread.systemfit(greeneSurPooled) : \n returning the 'bread' for models with restrictions has not yet been implemented.\n" attr(,"class") [1] "try-error" attr(,"condition") > > proc.time() user system elapsed 1.693 0.093 1.779 systemfit/tests/test_hausman.Rout.save0000644000176200001440000001757313060100647017760 0ustar liggesusers R version 3.3.2 (2016-10-31) -- "Sincere Pumpkin Patch" Copyright (C) 2016 The R Foundation for Statistical Computing Platform: x86_64-pc-linux-gnu (64-bit) R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > library( "systemfit" ) Loading required package: Matrix Loading required package: car Loading required package: lmtest Loading required package: zoo Attaching package: 'zoo' The following objects are masked from 'package:base': as.Date, as.Date.numeric Please cite the 'systemfit' package as: Arne Henningsen and Jeff D. Hamann (2007). systemfit: A Package for Estimating Systems of Simultaneous Equations in R. Journal of Statistical Software 23(4), 1-40. http://www.jstatsoft.org/v23/i04/. If you have questions, suggestions, or comments regarding the 'systemfit' package, please use a forum or 'tracker' at systemfit's R-Forge site: https://r-forge.r-project.org/projects/systemfit/ > options( digits = 5 ) > > data( "Kmenta" ) > useMatrix <- FALSE > > eqDemand <- consump ~ price + income > eqSupply <- consump ~ price + farmPrice + trend > inst <- ~ income + farmPrice + trend > eqSystem <- list( demand = eqDemand, supply = eqSupply ) > restrm <- matrix(0,1,7) # restriction matrix "R" > restrm[1,3] <- 1 > restrm[1,7] <- -1 > restr2m <- matrix(0,2,7) # restriction matrix "R" 2 > restr2m[1,3] <- 1 > restr2m[1,7] <- -1 > restr2m[2,2] <- -1 > restr2m[2,5] <- 1 > restr2q <- c( 0, 0.5 ) # restriction vector "q" 2 > tc <- matrix(0,7,6) > tc[1,1] <- 1 > tc[2,2] <- 1 > tc[3,3] <- 1 > tc[4,4] <- 1 > tc[5,5] <- 1 > tc[6,6] <- 1 > tc[7,3] <- 1 > restr3m <- matrix(0,1,6) # restriction matrix "R" 2 > restr3m[1,2] <- -1 > restr3m[1,5] <- 1 > restr3q <- c( 0.5 ) # restriction vector "q" 2 > > > ## ******************* unrestricted estimation ***************** > ## ******************** default estimation ********************* > fit2sls1 <- systemfit( eqSystem, "2SLS", data = Kmenta, inst = inst, + useMatrix = useMatrix ) > fit3sls1 <- systemfit( eqSystem, "3SLS", data = Kmenta, inst = inst, + useMatrix = useMatrix ) > print( hausman.systemfit( fit2sls1, fit3sls1 ) ) Hausman specification test for consistency of the 3SLS estimation data: Kmenta Hausman = 2.54, df = 7, p-value = 0.92 > > ## ************** 2SLS estimation with singleEqSigma = FALSE ***************** > fit2sls1s <- systemfit( eqSystem, "2SLS", data = Kmenta, inst = inst, + singleEqSigma = FALSE, useMatrix = useMatrix ) > print( hausman.systemfit( fit2sls1s, fit3sls1 ) ) Hausman specification test for consistency of the 3SLS estimation data: Kmenta Hausman = 3.28, df = 7, p-value = 0.86 > > ## ******************* estimations with methodResidCov = 0 ***************** > fit2sls1r <- systemfit( eqSystem, "2SLS", data = Kmenta, inst = inst, + methodResidCov = "noDfCor", useMatrix = useMatrix ) > fit3sls1r <- systemfit( eqSystem, "3SLS", data = Kmenta, inst = inst, + methodResidCov = "noDfCor", useMatrix = useMatrix ) > print( hausman.systemfit( fit2sls1r, fit3sls1r ) ) Hausman specification test for consistency of the 3SLS estimation data: Kmenta Hausman = 2.98, df = 7, p-value = 0.89 > > > ## ********************* estimation with restriction ******************** > ## *********************** default estimation *********************** > fit2sls2 <- systemfit( eqSystem, "2SLS", data = Kmenta, restrict.matrix = restrm, + inst = inst, useMatrix = useMatrix ) > fit3sls2 <- systemfit( eqSystem, "3SLS", data = Kmenta, restrict.matrix = restrm, + inst = inst, useMatrix = useMatrix ) > # print( hausman.systemfit( fit2sls2, fit3sls2 ) ) > > ## ************* 2SLS estimation with singleEqSigma = TRUE ***************** > fit2sls2s <- systemfit( eqSystem, "2SLS", data = Kmenta, restrict.matrix = restrm, + inst = inst, singleEqSigma = TRUE, useMatrix = useMatrix ) > # print( hausman.systemfit( fit2sls2s, fit3sls2 ) ) > > ## ********************* estimations with methodResidCov = 0 ************** > fit2sls2r <- systemfit( eqSystem, "2SLS", data = Kmenta, restrict.matrix = restrm, + inst = inst, methodResidCov = "noDfCor", useMatrix = useMatrix ) > fit3sls2r <- systemfit( eqSystem, "3SLS", data = Kmenta, restrict.matrix = restrm, + inst = inst, methodResidCov = "noDfCor", useMatrix = useMatrix ) > # print( hausman.systemfit( fit2sls2r, fit3sls2r ) ) > > > ## ****************** estimation with restriction via restrict.regMat ****************** > ## ********************** default estimation ******************** > fit2sls3 <- systemfit( eqSystem, "2SLS", data = Kmenta, restrict.regMat = tc, + inst = inst, useMatrix = useMatrix ) > fit3sls3 <- systemfit( eqSystem, "3SLS", data = Kmenta, restrict.regMat = tc, + inst = inst, useMatrix = useMatrix ) > print( hausman.systemfit( fit2sls3, fit3sls3 ) ) Hausman specification test for consistency of the 3SLS estimation data: Kmenta Hausman = -0.281, df = 6, p-value = 1 > > ## ******************* estimations with methodResidCov = 0 ******* > fit2sls3r <- systemfit( eqSystem, "2SLS", data = Kmenta, restrict.regMat = tc, + inst = inst, methodResidCov = "noDfCor", useMatrix = useMatrix ) > fit3sls3r <- systemfit( eqSystem, "3SLS", data = Kmenta, restrict.regMat = tc, + inst = inst, methodResidCov = "noDfCor", useMatrix = useMatrix ) > print( hausman.systemfit( fit2sls3r, fit3sls3r ) ) Hausman specification test for consistency of the 3SLS estimation data: Kmenta Hausman = -0.0132, df = 6, p-value = 1 > > > ## ***************** estimations with 2 restrictions ******************* > ## *********************** default estimations ************** > fit2sls4 <- systemfit( eqSystem, "2SLS", data = Kmenta, restrict.matrix = restr2m, + restrict.rhs = restr2q, inst = inst, useMatrix = useMatrix ) > fit3sls4 <- systemfit( eqSystem, "3SLS", data = Kmenta, restrict.matrix = restr2m, + restrict.rhs = restr2q, inst = inst, useMatrix = useMatrix ) > # print( hausman.systemfit( fit2sls4, fit3sls4 ) ) > > ## ***************** estimations with methodResidCov = 0 ************** > fit2sls4r <- systemfit( eqSystem, "2SLS", data = Kmenta, restrict.matrix = restr2m, + restrict.rhs = restr2q, inst = inst, methodResidCov = "noDfCor", + useMatrix = useMatrix ) > fit3sls4r <- systemfit( eqSystem, "3SLS", data = Kmenta, restrict.matrix = restr2m, + restrict.rhs = restr2q, inst = inst, methodResidCov = "noDfCor", + useMatrix = useMatrix ) > # print( hausman.systemfit( fit2sls4r, fit3sls4r ) ) > > > ## *********** estimations with 2 restrictions via R and restrict.regMat *************** > ## ***************** default estimations ******************* > fit2sls5 <- systemfit( eqSystem, "2SLS", data = Kmenta, restrict.matrix = restr3m, + restrict.rhs = restr3q, restrict.regMat = tc, inst = inst, + useMatrix = useMatrix ) > fit3sls5 <- systemfit( eqSystem, "3SLS", data = Kmenta, restrict.matrix = restr3m, + restrict.rhs = restr3q, restrict.regMat = tc, inst = inst, + useMatrix = useMatrix ) > # print( hausman.systemfit( fit2sls5, fit3sls5 ) ) > > ## ************* estimations with methodResidCov = 0 ********* > fit2sls5r <- systemfit( eqSystem, "2SLS", data = Kmenta, restrict.matrix = restr3m, + restrict.rhs = restr3q, restrict.regMat = tc, inst = inst, + methodResidCov = "noDfCor", useMatrix = useMatrix ) > fit3sls5r <- systemfit( eqSystem, "3SLS", data = Kmenta, restrict.matrix = restr3m, + restrict.rhs = restr3q, restrict.regMat = tc, inst = inst, + methodResidCov = "noDfCor", useMatrix = useMatrix ) > # print( hausman.systemfit( fit2sls5r, fit3sls5r ) ) > > proc.time() user system elapsed 1.640 0.072 1.700 systemfit/tests/test_ols.Rout.save0000644000176200001440000052162713060100647017121 0ustar liggesusers R version 3.3.2 (2016-10-31) -- "Sincere Pumpkin Patch" Copyright (C) 2016 The R Foundation for Statistical Computing Platform: x86_64-pc-linux-gnu (64-bit) R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > library( systemfit ) Loading required package: Matrix Loading required package: car Loading required package: lmtest Loading required package: zoo Attaching package: 'zoo' The following objects are masked from 'package:base': as.Date, as.Date.numeric Please cite the 'systemfit' package as: Arne Henningsen and Jeff D. Hamann (2007). systemfit: A Package for Estimating Systems of Simultaneous Equations in R. Journal of Statistical Software 23(4), 1-40. http://www.jstatsoft.org/v23/i04/. If you have questions, suggestions, or comments regarding the 'systemfit' package, please use a forum or 'tracker' at systemfit's R-Forge site: https://r-forge.r-project.org/projects/systemfit/ > options( digits = 3 ) > > data( "Kmenta" ) > useMatrix <- FALSE > > demand <- consump ~ price + income > supply <- consump ~ price + farmPrice + trend > system <- list( demand = demand, supply = supply ) > restrm <- matrix(0,1,7) # restriction matrix "R" > restrm[1,3] <- 1 > restrm[1,7] <- -1 > restrict <- "demand_income - supply_trend = 0" > restr2m <- matrix(0,2,7) # restriction matrix "R" 2 > restr2m[1,3] <- 1 > restr2m[1,7] <- -1 > restr2m[2,2] <- -1 > restr2m[2,5] <- 1 > restr2q <- c( 0, 0.5 ) # restriction vector "q" 2 > restrict2 <- c( "demand_income - supply_trend = 0", + "- demand_price + supply_price = 0.5" ) > tc <- matrix(0,7,6) > tc[1,1] <- 1 > tc[2,2] <- 1 > tc[3,3] <- 1 > tc[4,4] <- 1 > tc[5,5] <- 1 > tc[6,6] <- 1 > tc[7,3] <- 1 > restr3m <- matrix(0,1,6) # restriction matrix "R" 2 > restr3m[1,2] <- -1 > restr3m[1,5] <- 1 > restr3q <- c( 0.5 ) # restriction vector "q" 2 > restrict3 <- "- C2 + C5 = 0.5" > > # It is not possible to estimate OLS with systemfit > # exactly as EViews does, because EViews uses > # methodResidCov == "geomean" for the coefficient covariance matrix and > # methodResidCov == "noDfCor" for the residual covariance matrix, while > # systemfit uses always the same formulas for both calculations. > > ## ******* single-equation OLS estimations ********************* > lmDemand <- lm( demand, data = Kmenta ) > lmSupply <- lm( supply, data = Kmenta ) > > ## *************** OLS estimation ************************ > ## ********** OLS estimation (default) ******************** > fitols1 <- systemfit( system, "OLS", data = Kmenta, useMatrix = useMatrix ) > print( summary( fitols1 ) ) systemfit results method: OLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 33 156 4.43 0.709 0.558 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 63.3 3.73 1.93 0.764 0.736 supply 20 16 92.6 5.78 2.40 0.655 0.590 The covariance matrix of the residuals demand supply demand 3.73 4.14 supply 4.14 5.78 The correlations of the residuals demand supply demand 1.000 0.891 supply 0.891 1.000 OLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Estimate Std. Error t value Pr(>|t|) (Intercept) 99.8954 7.5194 13.29 2.1e-10 *** price -0.3163 0.0907 -3.49 0.0028 ** income 0.3346 0.0454 7.37 1.1e-06 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.93 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 63.332 MSE: 3.725 Root MSE: 1.93 Multiple R-Squared: 0.764 Adjusted R-Squared: 0.736 OLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 58.2754 11.4629 5.08 0.00011 *** price 0.1604 0.0949 1.69 0.11039 farmPrice 0.2481 0.0462 5.37 6.2e-05 *** trend 0.2483 0.0975 2.55 0.02157 * --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.405 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 92.551 MSE: 5.784 Root MSE: 2.405 Multiple R-Squared: 0.655 Adjusted R-Squared: 0.59 > nobs( fitols1 ) [1] 40 > all.equal( coef( fitols1 ), c( coef( lmDemand ), coef( lmSupply ) ), + check.attributes = FALSE ) [1] TRUE > all.equal( coef( summary( fitols1 ) ), + rbind( coef( summary( lmDemand ) ), coef( summary( lmSupply ) ) ), + check.attributes = FALSE ) [1] TRUE > all.equal( vcov( fitols1 ), + as.matrix( bdiag( vcov( lmDemand ), vcov( lmSupply ) ) ), + check.attributes = FALSE ) [1] TRUE > > ## ********** OLS estimation (no singleEqSigma=F) ****************** > fitols1s <- systemfit( system, "OLS", data = Kmenta, + singleEqSigma = FALSE, useMatrix = useMatrix ) > print( summary( fitols1s ) ) systemfit results method: OLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 33 156 4.43 0.709 0.558 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 63.3 3.73 1.93 0.764 0.736 supply 20 16 92.6 5.78 2.40 0.655 0.590 The covariance matrix of the residuals demand supply demand 3.73 4.14 supply 4.14 5.78 The correlations of the residuals demand supply demand 1.000 0.891 supply 0.891 1.000 OLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Estimate Std. Error t value Pr(>|t|) (Intercept) 99.8954 8.4671 11.80 1.3e-09 *** price -0.3163 0.1021 -3.10 0.0065 ** income 0.3346 0.0511 6.54 5.0e-06 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.93 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 63.332 MSE: 3.725 Root MSE: 1.93 Multiple R-Squared: 0.764 Adjusted R-Squared: 0.736 OLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 58.2754 10.3587 5.63 3.8e-05 *** price 0.1604 0.0857 1.87 0.080 . farmPrice 0.2481 0.0417 5.94 2.1e-05 *** trend 0.2483 0.0881 2.82 0.012 * --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.405 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 92.551 MSE: 5.784 Root MSE: 2.405 Multiple R-Squared: 0.655 Adjusted R-Squared: 0.59 > all.equal( coef( fitols1s ), c( coef( lmDemand ), coef( lmSupply ) ), + check.attributes = FALSE ) [1] TRUE > > ## **************** OLS (useDfSys=T) *********************** > print( summary( fitols1, useDfSys = TRUE ) ) systemfit results method: OLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 33 156 4.43 0.709 0.558 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 63.3 3.73 1.93 0.764 0.736 supply 20 16 92.6 5.78 2.40 0.655 0.590 The covariance matrix of the residuals demand supply demand 3.73 4.14 supply 4.14 5.78 The correlations of the residuals demand supply demand 1.000 0.891 supply 0.891 1.000 OLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Estimate Std. Error t value Pr(>|t|) (Intercept) 99.8954 7.5194 13.29 8.4e-15 *** price -0.3163 0.0907 -3.49 0.0014 ** income 0.3346 0.0454 7.37 1.8e-08 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.93 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 63.332 MSE: 3.725 Root MSE: 1.93 Multiple R-Squared: 0.764 Adjusted R-Squared: 0.736 OLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 58.2754 11.4629 5.08 1.4e-05 *** price 0.1604 0.0949 1.69 0.100 farmPrice 0.2481 0.0462 5.37 6.1e-06 *** trend 0.2483 0.0975 2.55 0.016 * --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.405 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 92.551 MSE: 5.784 Root MSE: 2.405 Multiple R-Squared: 0.655 Adjusted R-Squared: 0.59 > > ## **************** OLS (methodResidCov="noDfCor") *********************** > fitols1r <- systemfit( system, "OLS", data = Kmenta, + methodResidCov = "noDfCor", x = TRUE, + useMatrix = useMatrix ) > print( summary( fitols1r ) ) systemfit results method: OLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 33 156 3.02 0.709 0.537 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 63.3 3.73 1.93 0.764 0.736 supply 20 16 92.6 5.78 2.40 0.655 0.590 The covariance matrix of the residuals demand supply demand 3.17 3.41 supply 3.41 4.63 The correlations of the residuals demand supply demand 1.000 0.891 supply 0.891 1.000 OLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Estimate Std. Error t value Pr(>|t|) (Intercept) 99.8954 6.9325 14.41 5.8e-11 *** price -0.3163 0.0836 -3.78 0.0015 ** income 0.3346 0.0419 7.99 3.7e-07 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.93 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 63.332 MSE: 3.725 Root MSE: 1.93 Multiple R-Squared: 0.764 Adjusted R-Squared: 0.736 OLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 58.2754 10.2527 5.68 3.4e-05 *** price 0.1604 0.0849 1.89 0.077 . farmPrice 0.2481 0.0413 6.01 1.8e-05 *** trend 0.2483 0.0872 2.85 0.012 * --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.405 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 92.551 MSE: 5.784 Root MSE: 2.405 Multiple R-Squared: 0.655 Adjusted R-Squared: 0.59 > all.equal( coef( fitols1r ), c( coef( lmDemand ), coef( lmSupply ) ), + check.attributes = FALSE ) [1] TRUE > > ## ******** OLS (methodResidCov="noDfCor", singleEqSigma=F) *********** > fitols1rs <- systemfit( system, "OLS", data = Kmenta, + methodResidCov = "noDfCor", singleEqSigma = FALSE, + useMatrix = useMatrix ) > print( summary( fitols1rs ) ) systemfit results method: OLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 33 156 3.02 0.709 0.537 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 63.3 3.73 1.93 0.764 0.736 supply 20 16 92.6 5.78 2.40 0.655 0.590 The covariance matrix of the residuals demand supply demand 3.17 3.41 supply 3.41 4.63 The correlations of the residuals demand supply demand 1.000 0.891 supply 0.891 1.000 OLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Estimate Std. Error t value Pr(>|t|) (Intercept) 99.8954 7.6907 12.99 3.0e-10 *** price -0.3163 0.0927 -3.41 0.0033 ** income 0.3346 0.0465 7.20 1.5e-06 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.93 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 63.332 MSE: 3.725 Root MSE: 1.93 Multiple R-Squared: 0.764 Adjusted R-Squared: 0.736 OLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 58.2754 9.4088 6.19 1.3e-05 *** price 0.1604 0.0779 2.06 0.0561 . farmPrice 0.2481 0.0379 6.55 6.7e-06 *** trend 0.2483 0.0800 3.10 0.0068 ** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.405 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 92.551 MSE: 5.784 Root MSE: 2.405 Multiple R-Squared: 0.655 Adjusted R-Squared: 0.59 > all.equal( coef( fitols1rs ), c( coef( lmDemand ), coef( lmSupply ) ), + check.attributes = FALSE ) [1] TRUE > > ## **************** OLS (methodResidCov="Theil" ) *********************** > fitols1r <- systemfit( system, "OLS", data = Kmenta, + methodResidCov = "Theil", x = TRUE, + useMatrix = useMatrix ) > print( summary( fitols1r ) ) systemfit results method: OLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 33 156 3.26 0.709 0.503 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 63.3 3.73 1.93 0.764 0.736 supply 20 16 92.6 5.78 2.40 0.655 0.590 The covariance matrix of the residuals demand supply demand 3.73 4.28 supply 4.28 5.78 The correlations of the residuals demand supply demand 1.000 0.891 supply 0.891 1.000 OLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Estimate Std. Error t value Pr(>|t|) (Intercept) 99.8954 7.5194 13.29 2.1e-10 *** price -0.3163 0.0907 -3.49 0.0028 ** income 0.3346 0.0454 7.37 1.1e-06 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.93 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 63.332 MSE: 3.725 Root MSE: 1.93 Multiple R-Squared: 0.764 Adjusted R-Squared: 0.736 OLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 58.2754 11.4629 5.08 0.00011 *** price 0.1604 0.0949 1.69 0.11039 farmPrice 0.2481 0.0462 5.37 6.2e-05 *** trend 0.2483 0.0975 2.55 0.02157 * --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.405 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 92.551 MSE: 5.784 Root MSE: 2.405 Multiple R-Squared: 0.655 Adjusted R-Squared: 0.59 > all.equal( coef( fitols1r ), c( coef( lmDemand ), coef( lmSupply ) ), + check.attributes = FALSE ) [1] TRUE > > ## **************** OLS (methodResidCov="max") *********************** > fitols1r <- systemfit( system, "OLS", data = Kmenta, + methodResidCov = "max", x = TRUE, + useMatrix = useMatrix ) > print( summary( fitols1r ) ) systemfit results method: OLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 33 156 3.37 0.709 0.509 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 63.3 3.73 1.93 0.764 0.736 supply 20 16 92.6 5.78 2.40 0.655 0.590 The covariance matrix of the residuals demand supply demand 3.73 4.26 supply 4.26 5.78 The correlations of the residuals demand supply demand 1.000 0.891 supply 0.891 1.000 OLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Estimate Std. Error t value Pr(>|t|) (Intercept) 99.8954 7.5194 13.29 2.1e-10 *** price -0.3163 0.0907 -3.49 0.0028 ** income 0.3346 0.0454 7.37 1.1e-06 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.93 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 63.332 MSE: 3.725 Root MSE: 1.93 Multiple R-Squared: 0.764 Adjusted R-Squared: 0.736 OLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 58.2754 11.4629 5.08 0.00011 *** price 0.1604 0.0949 1.69 0.11039 farmPrice 0.2481 0.0462 5.37 6.2e-05 *** trend 0.2483 0.0975 2.55 0.02157 * --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.405 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 92.551 MSE: 5.784 Root MSE: 2.405 Multiple R-Squared: 0.655 Adjusted R-Squared: 0.59 > > ## ******** OLS (methodResidCov="max", singleEqSigma=F) *********** > fitols1rs <- systemfit( system, "OLS", data = Kmenta, + methodResidCov = "max", singleEqSigma = FALSE, + useMatrix = useMatrix ) > print( summary( fitols1rs ) ) systemfit results method: OLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 33 156 3.37 0.709 0.509 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 63.3 3.73 1.93 0.764 0.736 supply 20 16 92.6 5.78 2.40 0.655 0.590 The covariance matrix of the residuals demand supply demand 3.73 4.26 supply 4.26 5.78 The correlations of the residuals demand supply demand 1.000 0.891 supply 0.891 1.000 OLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Estimate Std. Error t value Pr(>|t|) (Intercept) 99.8954 8.4671 11.80 1.3e-09 *** price -0.3163 0.1021 -3.10 0.0065 ** income 0.3346 0.0511 6.54 5.0e-06 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.93 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 63.332 MSE: 3.725 Root MSE: 1.93 Multiple R-Squared: 0.764 Adjusted R-Squared: 0.736 OLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 58.2754 10.3587 5.63 3.8e-05 *** price 0.1604 0.0857 1.87 0.080 . farmPrice 0.2481 0.0417 5.94 2.1e-05 *** trend 0.2483 0.0881 2.82 0.012 * --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.405 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 92.551 MSE: 5.784 Root MSE: 2.405 Multiple R-Squared: 0.655 Adjusted R-Squared: 0.59 > > > ## ********* OLS with cross-equation restriction ************ > ## ****** OLS with cross-equation restriction (default) ********* > fitols2 <- systemfit( system, "OLS", data = Kmenta, + restrict.matrix = restrm, useMatrix = useMatrix ) > print( summary( fitols2 ) ) systemfit results method: OLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 34 159 2.5 0.703 0.608 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 64.2 3.78 1.94 0.761 0.732 supply 20 16 95.1 5.94 2.44 0.645 0.579 The covariance matrix of the residuals demand supply demand 3.78 4.47 supply 4.47 5.94 The correlations of the residuals demand supply demand 1.000 0.943 supply 0.943 1.000 OLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Estimate Std. Error t value Pr(>|t|) (Intercept) 99.5563 8.4225 11.82 1.4e-13 *** price -0.2917 0.0975 -2.99 0.0051 ** income 0.3129 0.0441 7.10 3.3e-08 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.943 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 64.186 MSE: 3.776 Root MSE: 1.943 Multiple R-Squared: 0.761 Adjusted R-Squared: 0.732 OLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 56.3795 10.0721 5.60 2.9e-06 *** price 0.1639 0.0853 1.92 0.063 . farmPrice 0.2571 0.0402 6.39 2.7e-07 *** trend 0.3129 0.0441 7.10 3.3e-08 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.438 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 95.088 MSE: 5.943 Root MSE: 2.438 Multiple R-Squared: 0.645 Adjusted R-Squared: 0.579 > # the same with symbolically specified restrictions > fitols2Sym <- systemfit( system, "OLS", data = Kmenta, + restrict.matrix = restrict, useMatrix = useMatrix ) > all.equal( fitols2, fitols2Sym ) [1] "Component \"call\": target, current do not match when deparsed" > > ## ****** OLS with cross-equation restriction (singleEqSigma=T) ******* > fitols2s <- systemfit( system, "OLS", data = Kmenta, + restrict.matrix = restrm, singleEqSigma = TRUE, + useMatrix = useMatrix ) > print( summary( fitols2s ) ) systemfit results method: OLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 34 159 2.5 0.703 0.608 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 64.2 3.78 1.94 0.761 0.732 supply 20 16 95.1 5.94 2.44 0.645 0.579 The covariance matrix of the residuals demand supply demand 3.78 4.47 supply 4.47 5.94 The correlations of the residuals demand supply demand 1.000 0.943 supply 0.943 1.000 OLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Estimate Std. Error t value Pr(>|t|) (Intercept) 99.5563 7.5640 13.16 6.7e-15 *** price -0.2917 0.0887 -3.29 0.0023 ** income 0.3129 0.0415 7.54 9.4e-09 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.943 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 64.186 MSE: 3.776 Root MSE: 1.943 Multiple R-Squared: 0.761 Adjusted R-Squared: 0.732 OLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 56.3795 11.3165 4.98 1.8e-05 *** price 0.1639 0.0960 1.71 0.097 . farmPrice 0.2571 0.0451 5.69 2.1e-06 *** trend 0.3129 0.0415 7.54 9.4e-09 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.438 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 95.088 MSE: 5.943 Root MSE: 2.438 Multiple R-Squared: 0.645 Adjusted R-Squared: 0.579 > > ## ****** OLS with cross-equation restriction (useDfSys=F) ******* > print( summary( fitols2, useDfSys = FALSE ) ) systemfit results method: OLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 34 159 2.5 0.703 0.608 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 64.2 3.78 1.94 0.761 0.732 supply 20 16 95.1 5.94 2.44 0.645 0.579 The covariance matrix of the residuals demand supply demand 3.78 4.47 supply 4.47 5.94 The correlations of the residuals demand supply demand 1.000 0.943 supply 0.943 1.000 OLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Estimate Std. Error t value Pr(>|t|) (Intercept) 99.5563 8.4225 11.82 1.3e-09 *** price -0.2917 0.0975 -2.99 0.0082 ** income 0.3129 0.0441 7.10 1.8e-06 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.943 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 64.186 MSE: 3.776 Root MSE: 1.943 Multiple R-Squared: 0.761 Adjusted R-Squared: 0.732 OLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 56.3795 10.0721 5.60 4.0e-05 *** price 0.1639 0.0853 1.92 0.073 . farmPrice 0.2571 0.0402 6.39 8.9e-06 *** trend 0.3129 0.0441 7.10 2.5e-06 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.438 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 95.088 MSE: 5.943 Root MSE: 2.438 Multiple R-Squared: 0.645 Adjusted R-Squared: 0.579 > > ## ****** OLS with cross-equation restriction (methodResidCov="noDfCor") ******* > fitols2r <- systemfit( system, "OLS", data = Kmenta, + restrict.matrix = restrm, methodResidCov = "noDfCor", + useMatrix = useMatrix ) > print( summary( fitols2r ) ) systemfit results method: OLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 34 159 1.7 0.703 0.577 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 64.2 3.78 1.94 0.761 0.732 supply 20 16 95.1 5.94 2.44 0.645 0.579 The covariance matrix of the residuals demand supply demand 3.21 3.68 supply 3.68 4.75 The correlations of the residuals demand supply demand 1.000 0.943 supply 0.943 1.000 OLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Estimate Std. Error t value Pr(>|t|) (Intercept) 99.5563 7.7652 12.82 1.4e-14 *** price -0.2917 0.0899 -3.25 0.0026 ** income 0.3129 0.0406 7.70 5.9e-09 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.943 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 64.186 MSE: 3.776 Root MSE: 1.943 Multiple R-Squared: 0.761 Adjusted R-Squared: 0.732 OLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 56.3795 9.2860 6.07 7.0e-07 *** price 0.1639 0.0786 2.08 0.045 * farmPrice 0.2571 0.0371 6.93 5.4e-08 *** trend 0.3129 0.0406 7.70 5.9e-09 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.438 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 95.088 MSE: 5.943 Root MSE: 2.438 Multiple R-Squared: 0.645 Adjusted R-Squared: 0.579 > > ## ** OLS with cross-equation restriction (methodResidCov="noDfCor",singleEqSigma=T) *** > fitols2rs <- systemfit( system, "OLS", data = Kmenta, + restrict.matrix = restrm, methodResidCov = "noDfCor", + x = TRUE, useMatrix = useMatrix ) > print( summary( fitols2rs ) ) systemfit results method: OLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 34 159 1.7 0.703 0.577 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 64.2 3.78 1.94 0.761 0.732 supply 20 16 95.1 5.94 2.44 0.645 0.579 The covariance matrix of the residuals demand supply demand 3.21 3.68 supply 3.68 4.75 The correlations of the residuals demand supply demand 1.000 0.943 supply 0.943 1.000 OLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Estimate Std. Error t value Pr(>|t|) (Intercept) 99.5563 7.7652 12.82 1.4e-14 *** price -0.2917 0.0899 -3.25 0.0026 ** income 0.3129 0.0406 7.70 5.9e-09 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.943 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 64.186 MSE: 3.776 Root MSE: 1.943 Multiple R-Squared: 0.761 Adjusted R-Squared: 0.732 OLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 56.3795 9.2860 6.07 7.0e-07 *** price 0.1639 0.0786 2.08 0.045 * farmPrice 0.2571 0.0371 6.93 5.4e-08 *** trend 0.3129 0.0406 7.70 5.9e-09 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.438 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 95.088 MSE: 5.943 Root MSE: 2.438 Multiple R-Squared: 0.645 Adjusted R-Squared: 0.579 > > ## *** OLS with cross-equation restriction via restrict.regMat *** > ## *** OLS with cross-equation restriction via restrict.regMat (default) *** > fitols3 <- systemfit( system, "OLS", data = Kmenta, restrict.regMat = tc, + x = TRUE, useMatrix = useMatrix ) > print( summary( fitols3 ) ) systemfit results method: OLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 34 159 2.5 0.703 0.608 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 64.2 3.78 1.94 0.761 0.732 supply 20 16 95.1 5.94 2.44 0.645 0.579 The covariance matrix of the residuals demand supply demand 3.78 4.47 supply 4.47 5.94 The correlations of the residuals demand supply demand 1.000 0.943 supply 0.943 1.000 OLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Estimate Std. Error t value Pr(>|t|) (Intercept) 99.5563 8.4225 11.82 1.4e-13 *** price -0.2917 0.0975 -2.99 0.0051 ** income 0.3129 0.0441 7.10 3.3e-08 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.943 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 64.186 MSE: 3.776 Root MSE: 1.943 Multiple R-Squared: 0.761 Adjusted R-Squared: 0.732 OLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 56.3795 10.0721 5.60 2.9e-06 *** price 0.1639 0.0853 1.92 0.063 . farmPrice 0.2571 0.0402 6.39 2.7e-07 *** trend 0.3129 0.0441 7.10 3.3e-08 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.438 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 95.088 MSE: 5.943 Root MSE: 2.438 Multiple R-Squared: 0.645 Adjusted R-Squared: 0.579 > > ## *** OLS with cross-equation restriction via restrict.regMat (singleEqSigma=T) *** > fitols3s <- systemfit( system, "OLS", data = Kmenta, + restrict.regMat = tc, singleEqSigma = TRUE, useMatrix = useMatrix ) > print( summary( fitols3s ) ) systemfit results method: OLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 34 159 2.5 0.703 0.608 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 64.2 3.78 1.94 0.761 0.732 supply 20 16 95.1 5.94 2.44 0.645 0.579 The covariance matrix of the residuals demand supply demand 3.78 4.47 supply 4.47 5.94 The correlations of the residuals demand supply demand 1.000 0.943 supply 0.943 1.000 OLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Estimate Std. Error t value Pr(>|t|) (Intercept) 99.5563 7.5640 13.16 6.7e-15 *** price -0.2917 0.0887 -3.29 0.0023 ** income 0.3129 0.0415 7.54 9.4e-09 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.943 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 64.186 MSE: 3.776 Root MSE: 1.943 Multiple R-Squared: 0.761 Adjusted R-Squared: 0.732 OLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 56.3795 11.3165 4.98 1.8e-05 *** price 0.1639 0.0960 1.71 0.097 . farmPrice 0.2571 0.0451 5.69 2.1e-06 *** trend 0.3129 0.0415 7.54 9.4e-09 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.438 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 95.088 MSE: 5.943 Root MSE: 2.438 Multiple R-Squared: 0.645 Adjusted R-Squared: 0.579 > > ## *** OLS with cross-equation restriction via restrict.regMat (useDfSys=F) *** > print( summary( fitols3, useDfSys = FALSE ) ) systemfit results method: OLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 34 159 2.5 0.703 0.608 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 64.2 3.78 1.94 0.761 0.732 supply 20 16 95.1 5.94 2.44 0.645 0.579 The covariance matrix of the residuals demand supply demand 3.78 4.47 supply 4.47 5.94 The correlations of the residuals demand supply demand 1.000 0.943 supply 0.943 1.000 OLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Estimate Std. Error t value Pr(>|t|) (Intercept) 99.5563 8.4225 11.82 1.3e-09 *** price -0.2917 0.0975 -2.99 0.0082 ** income 0.3129 0.0441 7.10 1.8e-06 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.943 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 64.186 MSE: 3.776 Root MSE: 1.943 Multiple R-Squared: 0.761 Adjusted R-Squared: 0.732 OLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 56.3795 10.0721 5.60 4.0e-05 *** price 0.1639 0.0853 1.92 0.073 . farmPrice 0.2571 0.0402 6.39 8.9e-06 *** trend 0.3129 0.0441 7.10 2.5e-06 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.438 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 95.088 MSE: 5.943 Root MSE: 2.438 Multiple R-Squared: 0.645 Adjusted R-Squared: 0.579 > > ## *** OLS with cross-equation restriction via restrict.regMat (methodResidCov="noDfCor") *** > fitols3r <- systemfit( system, "OLS", data = Kmenta, + restrict.regMat = tc, methodResidCov = "noDfCor", + useMatrix = useMatrix ) > print( summary( fitols3r ) ) systemfit results method: OLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 34 159 1.7 0.703 0.577 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 64.2 3.78 1.94 0.761 0.732 supply 20 16 95.1 5.94 2.44 0.645 0.579 The covariance matrix of the residuals demand supply demand 3.21 3.68 supply 3.68 4.75 The correlations of the residuals demand supply demand 1.000 0.943 supply 0.943 1.000 OLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Estimate Std. Error t value Pr(>|t|) (Intercept) 99.5563 7.7652 12.82 1.4e-14 *** price -0.2917 0.0899 -3.25 0.0026 ** income 0.3129 0.0406 7.70 5.9e-09 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.943 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 64.186 MSE: 3.776 Root MSE: 1.943 Multiple R-Squared: 0.761 Adjusted R-Squared: 0.732 OLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 56.3795 9.2860 6.07 7.0e-07 *** price 0.1639 0.0786 2.08 0.045 * farmPrice 0.2571 0.0371 6.93 5.4e-08 *** trend 0.3129 0.0406 7.70 5.9e-09 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.438 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 95.088 MSE: 5.943 Root MSE: 2.438 Multiple R-Squared: 0.645 Adjusted R-Squared: 0.579 > > ## OLS with cross-equation restriction via restrict.regMat (methodResidCov="noDfCor",singleEqSigma=T) > fitols3rs <- systemfit( system, "OLS", data = Kmenta, + restrict.regMat = tc, methodResidCov = "noDfCor", singleEqSigma = TRUE, + useMatrix = useMatrix ) > print( summary( fitols3rs ) ) systemfit results method: OLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 34 159 1.7 0.703 0.577 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 64.2 3.78 1.94 0.761 0.732 supply 20 16 95.1 5.94 2.44 0.645 0.579 The covariance matrix of the residuals demand supply demand 3.21 3.68 supply 3.68 4.75 The correlations of the residuals demand supply demand 1.000 0.943 supply 0.943 1.000 OLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Estimate Std. Error t value Pr(>|t|) (Intercept) 99.5563 6.9734 14.28 6.7e-16 *** price -0.2917 0.0816 -3.57 0.0011 ** income 0.3129 0.0381 8.22 1.4e-09 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.943 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 64.186 MSE: 3.776 Root MSE: 1.943 Multiple R-Squared: 0.761 Adjusted R-Squared: 0.732 OLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 56.3795 10.1248 5.57 3.1e-06 *** price 0.1639 0.0859 1.91 0.065 . farmPrice 0.2571 0.0404 6.36 2.9e-07 *** trend 0.3129 0.0381 8.22 1.4e-09 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.438 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 95.088 MSE: 5.943 Root MSE: 2.438 Multiple R-Squared: 0.645 Adjusted R-Squared: 0.579 > > ## ********* OLS with 2 cross-equation restrictions *********** > ## ********* OLS with 2 cross-equation restrictions (default) *********** > fitols4 <- systemfit( system, "OLS", data = Kmenta, restrict.matrix = restr2m, + restrict.rhs = restr2q, useMatrix = useMatrix ) > print( summary( fitols4 ) ) systemfit results method: OLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 35 160 2.69 0.702 0.605 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 64.0 3.77 1.94 0.761 0.733 supply 20 16 95.8 5.99 2.45 0.643 0.576 The covariance matrix of the residuals demand supply demand 3.76 4.46 supply 4.46 5.99 The correlations of the residuals demand supply demand 1.000 0.938 supply 0.938 1.000 OLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Estimate Std. Error t value Pr(>|t|) (Intercept) 101.4817 6.1599 16.47 < 2e-16 *** price -0.3168 0.0629 -5.04 1.4e-05 *** income 0.3189 0.0399 8.00 2.0e-09 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.94 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 64.003 MSE: 3.765 Root MSE: 1.94 Multiple R-Squared: 0.761 Adjusted R-Squared: 0.733 OLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 54.1494 7.5515 7.17 2.3e-08 *** price 0.1832 0.0629 2.91 0.0062 ** farmPrice 0.2595 0.0391 6.64 1.1e-07 *** trend 0.3189 0.0399 8.00 2.0e-09 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.447 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 95.813 MSE: 5.988 Root MSE: 2.447 Multiple R-Squared: 0.643 Adjusted R-Squared: 0.576 > # the same with symbolically specified restrictions > fitols4Sym <- systemfit( system, "OLS", data = Kmenta, + restrict.matrix = restrict2, useMatrix = useMatrix ) > all.equal( fitols4, fitols4Sym ) [1] "Component \"call\": target, current do not match when deparsed" > > ## ****** OLS with 2 cross-equation restrictions (singleEqSigma=T) ******* > fitols4s <- systemfit( system, "OLS", data = Kmenta, restrict.matrix = restr2m, + restrict.rhs = restr2q, singleEqSigma = TRUE, x = TRUE, + useMatrix = useMatrix ) > print( summary( fitols4s ) ) systemfit results method: OLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 35 160 2.69 0.702 0.605 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 64.0 3.77 1.94 0.761 0.733 supply 20 16 95.8 5.99 2.45 0.643 0.576 The covariance matrix of the residuals demand supply demand 3.76 4.46 supply 4.46 5.99 The correlations of the residuals demand supply demand 1.000 0.938 supply 0.938 1.000 OLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Estimate Std. Error t value Pr(>|t|) (Intercept) 101.4817 6.0474 16.78 < 2e-16 *** price -0.3168 0.0648 -4.89 2.3e-05 *** income 0.3189 0.0385 8.29 9.1e-10 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.94 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 64.003 MSE: 3.765 Root MSE: 1.94 Multiple R-Squared: 0.761 Adjusted R-Squared: 0.733 OLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 54.1494 7.9687 6.80 7.0e-08 *** price 0.1832 0.0648 2.83 0.0077 ** farmPrice 0.2595 0.0446 5.82 1.3e-06 *** trend 0.3189 0.0385 8.29 9.1e-10 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.447 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 95.813 MSE: 5.988 Root MSE: 2.447 Multiple R-Squared: 0.643 Adjusted R-Squared: 0.576 > > ## ****** OLS with 2 cross-equation restrictions (useDfSys=F) ******* > print( summary( fitols4, useDfSys = FALSE ) ) systemfit results method: OLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 35 160 2.69 0.702 0.605 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 64.0 3.77 1.94 0.761 0.733 supply 20 16 95.8 5.99 2.45 0.643 0.576 The covariance matrix of the residuals demand supply demand 3.76 4.46 supply 4.46 5.99 The correlations of the residuals demand supply demand 1.000 0.938 supply 0.938 1.000 OLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Estimate Std. Error t value Pr(>|t|) (Intercept) 101.4817 6.1599 16.47 6.9e-12 *** price -0.3168 0.0629 -5.04 1e-04 *** income 0.3189 0.0399 8.00 3.6e-07 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.94 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 64.003 MSE: 3.765 Root MSE: 1.94 Multiple R-Squared: 0.761 Adjusted R-Squared: 0.733 OLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 54.1494 7.5515 7.17 2.2e-06 *** price 0.1832 0.0629 2.91 0.01 * farmPrice 0.2595 0.0391 6.64 5.6e-06 *** trend 0.3189 0.0399 8.00 5.5e-07 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.447 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 95.813 MSE: 5.988 Root MSE: 2.447 Multiple R-Squared: 0.643 Adjusted R-Squared: 0.576 > > ## ****** OLS with 2 cross-equation restrictions (methodResidCov="noDfCor") ******* > fitols4r <- systemfit( system, "OLS", data = Kmenta, restrict.matrix = restr2m, + restrict.rhs = restr2q, methodResidCov = "noDfCor", + useMatrix = useMatrix ) > print( summary( fitols4r ) ) systemfit results method: OLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 35 160 1.83 0.702 0.575 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 64.0 3.77 1.94 0.761 0.733 supply 20 16 95.8 5.99 2.45 0.643 0.576 The covariance matrix of the residuals demand supply demand 3.20 3.67 supply 3.67 4.79 The correlations of the residuals demand supply demand 1.000 0.938 supply 0.938 1.000 OLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Estimate Std. Error t value Pr(>|t|) (Intercept) 101.4817 5.7621 17.61 < 2e-16 *** price -0.3168 0.0589 -5.38 5.0e-06 *** income 0.3189 0.0373 8.55 4.3e-10 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.94 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 64.003 MSE: 3.765 Root MSE: 1.94 Multiple R-Squared: 0.761 Adjusted R-Squared: 0.733 OLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 54.1494 7.0638 7.67 5.4e-09 *** price 0.1832 0.0589 3.11 0.0037 ** farmPrice 0.2595 0.0365 7.10 2.8e-08 *** trend 0.3189 0.0373 8.55 4.3e-10 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.447 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 95.813 MSE: 5.988 Root MSE: 2.447 Multiple R-Squared: 0.643 Adjusted R-Squared: 0.576 > > ## OLS with 2 cross-equation restrictions (methodResidCov="noDfCor", singleEqSigma=T) * > fitols4rs <- systemfit( system, "OLS", data = Kmenta, restrict.matrix = restr2m, + restrict.rhs = restr2q, methodResidCov = "noDfCor", + singleEqSigma = TRUE, useMatrix = useMatrix ) > print( summary( fitols4rs ) ) systemfit results method: OLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 35 160 1.83 0.702 0.575 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 64.0 3.77 1.94 0.761 0.733 supply 20 16 95.8 5.99 2.45 0.643 0.576 The covariance matrix of the residuals demand supply demand 3.20 3.67 supply 3.67 4.79 The correlations of the residuals demand supply demand 1.000 0.938 supply 0.938 1.000 OLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Estimate Std. Error t value Pr(>|t|) (Intercept) 101.4817 5.5234 18.37 < 2e-16 *** price -0.3168 0.0589 -5.38 5.0e-06 *** income 0.3189 0.0352 9.05 1.1e-10 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.94 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 64.003 MSE: 3.765 Root MSE: 1.94 Multiple R-Squared: 0.761 Adjusted R-Squared: 0.733 OLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 54.1494 7.2089 7.51 8.5e-09 *** price 0.1832 0.0589 3.11 0.0037 ** farmPrice 0.2595 0.0399 6.51 1.7e-07 *** trend 0.3189 0.0352 9.05 1.1e-10 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.447 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 95.813 MSE: 5.988 Root MSE: 2.447 Multiple R-Squared: 0.643 Adjusted R-Squared: 0.576 > > ## ***** OLS with 2 cross-equation restrictions via R and restrict.regMat **** > ## ***** OLS with 2 cross-equation restrictions via R and restrict.regMat (default) **** > fitols5 <- systemfit( system, "OLS", data = Kmenta, restrict.matrix = restr3m, + restrict.rhs = restr3q, restrict.regMat = tc, methodResidCov = "noDfCor", + useMatrix = useMatrix ) > print( summary( fitols5 ) ) systemfit results method: OLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 35 160 1.83 0.702 0.575 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 64.0 3.77 1.94 0.761 0.733 supply 20 16 95.8 5.99 2.45 0.643 0.576 The covariance matrix of the residuals demand supply demand 3.20 3.67 supply 3.67 4.79 The correlations of the residuals demand supply demand 1.000 0.938 supply 0.938 1.000 OLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Estimate Std. Error t value Pr(>|t|) (Intercept) 101.4817 5.7621 17.61 < 2e-16 *** price -0.3168 0.0589 -5.38 5.0e-06 *** income 0.3189 0.0373 8.55 4.3e-10 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.94 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 64.003 MSE: 3.765 Root MSE: 1.94 Multiple R-Squared: 0.761 Adjusted R-Squared: 0.733 OLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 54.1494 7.0638 7.67 5.4e-09 *** price 0.1832 0.0589 3.11 0.0037 ** farmPrice 0.2595 0.0365 7.10 2.8e-08 *** trend 0.3189 0.0373 8.55 4.3e-10 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.447 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 95.813 MSE: 5.988 Root MSE: 2.447 Multiple R-Squared: 0.643 Adjusted R-Squared: 0.576 > # the same with symbolically specified restrictions > fitols5Sym <- systemfit( system, "OLS", data = Kmenta, + restrict.matrix = restrict3, restrict.regMat = tc, + methodResidCov = "noDfCor", useMatrix = useMatrix ) > all.equal( fitols5, fitols5Sym ) [1] "Component \"call\": target, current do not match when deparsed" > > ## ***** OLS with 2 cross-equation restrictions via R and restrict.regMat (singleEqSigma=T) **** > fitols5s <- systemfit( system, "OLS", data = Kmenta,restrict.matrix = restr3m, + restrict.rhs = restr3q, restrict.regMat = tc, singleEqSigma = T, + x = TRUE, useMatrix = useMatrix ) > print( summary( fitols5s ) ) systemfit results method: OLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 35 160 2.69 0.702 0.605 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 64.0 3.77 1.94 0.761 0.733 supply 20 16 95.8 5.99 2.45 0.643 0.576 The covariance matrix of the residuals demand supply demand 3.76 4.46 supply 4.46 5.99 The correlations of the residuals demand supply demand 1.000 0.938 supply 0.938 1.000 OLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Estimate Std. Error t value Pr(>|t|) (Intercept) 101.4817 6.0474 16.78 < 2e-16 *** price -0.3168 0.0648 -4.89 2.3e-05 *** income 0.3189 0.0385 8.29 9.1e-10 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.94 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 64.003 MSE: 3.765 Root MSE: 1.94 Multiple R-Squared: 0.761 Adjusted R-Squared: 0.733 OLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 54.1494 7.9687 6.80 7.0e-08 *** price 0.1832 0.0648 2.83 0.0077 ** farmPrice 0.2595 0.0446 5.82 1.3e-06 *** trend 0.3189 0.0385 8.29 9.1e-10 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.447 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 95.813 MSE: 5.988 Root MSE: 2.447 Multiple R-Squared: 0.643 Adjusted R-Squared: 0.576 > > ## ***** OLS with 2 cross-equation restrictions via R and restrict.regMat (useDfSys=F) **** > fitols5o <- systemfit( system, "OLS", data = Kmenta,restrict.matrix = restr3m, + restrict.rhs = restr3q, restrict.regMat = tc, useMatrix = useMatrix ) > print( summary( fitols5o, useDfSys = FALSE ) ) systemfit results method: OLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 35 160 2.69 0.702 0.605 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 64.0 3.77 1.94 0.761 0.733 supply 20 16 95.8 5.99 2.45 0.643 0.576 The covariance matrix of the residuals demand supply demand 3.76 4.46 supply 4.46 5.99 The correlations of the residuals demand supply demand 1.000 0.938 supply 0.938 1.000 OLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Estimate Std. Error t value Pr(>|t|) (Intercept) 101.4817 6.1599 16.47 6.9e-12 *** price -0.3168 0.0629 -5.04 1e-04 *** income 0.3189 0.0399 8.00 3.6e-07 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.94 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 64.003 MSE: 3.765 Root MSE: 1.94 Multiple R-Squared: 0.761 Adjusted R-Squared: 0.733 OLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 54.1494 7.5515 7.17 2.2e-06 *** price 0.1832 0.0629 2.91 0.01 * farmPrice 0.2595 0.0391 6.64 5.6e-06 *** trend 0.3189 0.0399 8.00 5.5e-07 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.447 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 95.813 MSE: 5.988 Root MSE: 2.447 Multiple R-Squared: 0.643 Adjusted R-Squared: 0.576 > > ## OLS with 2 cross-equation restr. via R and restrict.regMat (methodResidCov="noDfCor",singleEqSigma=T) > fitols5rs <- systemfit( system, "OLS", data = Kmenta,restrict.matrix = restr3m, + restrict.rhs = restr3q, restrict.regMat = tc, methodResidCov = "noDfCor", + singleEqSigma = TRUE, useMatrix = useMatrix ) > print( summary( fitols5rs ) ) systemfit results method: OLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 35 160 1.83 0.702 0.575 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 64.0 3.77 1.94 0.761 0.733 supply 20 16 95.8 5.99 2.45 0.643 0.576 The covariance matrix of the residuals demand supply demand 3.20 3.67 supply 3.67 4.79 The correlations of the residuals demand supply demand 1.000 0.938 supply 0.938 1.000 OLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Estimate Std. Error t value Pr(>|t|) (Intercept) 101.4817 5.5234 18.37 < 2e-16 *** price -0.3168 0.0589 -5.38 5.0e-06 *** income 0.3189 0.0352 9.05 1.1e-10 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.94 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 64.003 MSE: 3.765 Root MSE: 1.94 Multiple R-Squared: 0.761 Adjusted R-Squared: 0.733 OLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 54.1494 7.2089 7.51 8.5e-09 *** price 0.1832 0.0589 3.11 0.0037 ** farmPrice 0.2595 0.0399 6.51 1.7e-07 *** trend 0.3189 0.0352 9.05 1.1e-10 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.447 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 95.813 MSE: 5.988 Root MSE: 2.447 Multiple R-Squared: 0.643 Adjusted R-Squared: 0.576 > > > ## *********** estimations with a single regressor ************ > fitolsS1 <- systemfit( + list( consump ~ price - 1, consump ~ price + trend ), "OLS", + data = Kmenta, useMatrix = useMatrix ) > print( summary( fitolsS1 ) ) systemfit results method: OLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 36 1121 484 -1.09 -1.05 N DF SSR MSE RMSE R2 Adj R2 eq1 20 19 861 45.3 6.73 -2.213 -2.213 eq2 20 17 259 15.3 3.91 0.032 -0.082 The covariance matrix of the residuals eq1 eq2 eq1 45.3 14.4 eq2 14.4 15.3 The correlations of the residuals eq1 eq2 eq1 1.000 0.549 eq2 0.549 1.000 OLS estimates for 'eq1' (equation 1) Model Formula: consump ~ price - 1 Estimate Std. Error t value Pr(>|t|) price 1.006 0.015 66.9 <2e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 6.733 on 19 degrees of freedom Number of observations: 20 Degrees of Freedom: 19 SSR: 861.449 MSE: 45.339 Root MSE: 6.733 Multiple R-Squared: -2.213 Adjusted R-Squared: -2.213 OLS estimates for 'eq2' (equation 2) Model Formula: consump ~ price + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 93.6767 15.2367 6.15 1.1e-05 *** price 0.0622 0.1513 0.41 0.69 trend 0.0953 0.1515 0.63 0.54 --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 3.907 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 259.497 MSE: 15.265 Root MSE: 3.907 Multiple R-Squared: 0.032 Adjusted R-Squared: -0.082 > fitolsS2 <- systemfit( + list( consump ~ price - 1, consump ~ trend - 1 ), "OLS", + data = Kmenta, useMatrix = useMatrix ) > print( summary( fitolsS2 ) ) systemfit results method: OLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 38 47370 110957 -87.3 -5.28 N DF SSR MSE RMSE R2 Adj R2 eq1 20 19 861 45.3 6.73 -2.21 -2.21 eq2 20 19 46509 2447.8 49.48 -172.47 -172.47 The covariance matrix of the residuals eq1 eq2 eq1 45.34 -5.15 eq2 -5.15 2447.84 The correlations of the residuals eq1 eq2 eq1 1.0000 -0.0439 eq2 -0.0439 1.0000 OLS estimates for 'eq1' (equation 1) Model Formula: consump ~ price - 1 Estimate Std. Error t value Pr(>|t|) price 1.006 0.015 66.9 <2e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 6.733 on 19 degrees of freedom Number of observations: 20 Degrees of Freedom: 19 SSR: 861.449 MSE: 45.339 Root MSE: 6.733 Multiple R-Squared: -2.213 Adjusted R-Squared: -2.213 OLS estimates for 'eq2' (equation 2) Model Formula: consump ~ trend - 1 Estimate Std. Error t value Pr(>|t|) trend 7.405 0.924 8.02 1.6e-07 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 49.476 on 19 degrees of freedom Number of observations: 20 Degrees of Freedom: 19 SSR: 46508.922 MSE: 2447.838 Root MSE: 49.476 Multiple R-Squared: -172.467 Adjusted R-Squared: -172.467 > fitolsS3 <- systemfit( + list( consump ~ trend - 1, price ~ trend - 1 ), "OLS", + data = Kmenta, useMatrix = useMatrix ) > print( summary( fitolsS3 ) ) systemfit results method: OLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 38 93537 108970 -99 -0.977 N DF SSR MSE RMSE R2 Adj R2 eq1 20 19 46509 2448 49.5 -172.5 -172.5 eq2 20 19 47028 2475 49.8 -69.5 -69.5 The covariance matrix of the residuals eq1 eq2 eq1 2448 2439 eq2 2439 2475 The correlations of the residuals eq1 eq2 eq1 1.000 0.988 eq2 0.988 1.000 OLS estimates for 'eq1' (equation 1) Model Formula: consump ~ trend - 1 Estimate Std. Error t value Pr(>|t|) trend 7.405 0.924 8.02 1.6e-07 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 49.476 on 19 degrees of freedom Number of observations: 20 Degrees of Freedom: 19 SSR: 46508.922 MSE: 2447.838 Root MSE: 49.476 Multiple R-Squared: -172.467 Adjusted R-Squared: -172.467 OLS estimates for 'eq2' (equation 2) Model Formula: price ~ trend - 1 Estimate Std. Error t value Pr(>|t|) trend 7.318 0.929 7.88 2.1e-07 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 49.751 on 19 degrees of freedom Number of observations: 20 Degrees of Freedom: 19 SSR: 47028.107 MSE: 2475.164 Root MSE: 49.751 Multiple R-Squared: -69.48 Adjusted R-Squared: -69.48 > fitolsS4 <- systemfit( + list( consump ~ trend - 1, price ~ trend - 1 ), "OLS", + data = Kmenta, restrict.matrix = matrix( c( 1, -1 ), nrow = 1 ), + useMatrix = useMatrix ) > print( summary( fitolsS4 ) ) systemfit results method: OLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 39 93548 111736 -99 -1.03 N DF SSR MSE RMSE R2 Adj R2 eq1 20 19 46514 2448 49.5 -172.5 -172.5 eq2 20 19 47033 2475 49.8 -69.5 -69.5 The covariance matrix of the residuals eq1 eq2 eq1 2448 2439 eq2 2439 2475 The correlations of the residuals eq1 eq2 eq1 1.000 0.988 eq2 0.988 1.000 OLS estimates for 'eq1' (equation 1) Model Formula: consump ~ trend - 1 Estimate Std. Error t value Pr(>|t|) trend 7.362 0.646 11.4 5.7e-14 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 49.478 on 19 degrees of freedom Number of observations: 20 Degrees of Freedom: 19 SSR: 46514.283 MSE: 2448.12 Root MSE: 49.478 Multiple R-Squared: -172.487 Adjusted R-Squared: -172.487 OLS estimates for 'eq2' (equation 2) Model Formula: price ~ trend - 1 Estimate Std. Error t value Pr(>|t|) trend 7.362 0.646 11.4 5.7e-14 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 49.754 on 19 degrees of freedom Number of observations: 20 Degrees of Freedom: 19 SSR: 47033.469 MSE: 2475.446 Root MSE: 49.754 Multiple R-Squared: -69.488 Adjusted R-Squared: -69.488 > fitolsS5 <- systemfit( + list( consump ~ 1, farmPrice ~ 1 ), "OLS", + data = Kmenta, useMatrix = useMatrix ) > print( summary( fitolsS5 ) ) systemfit results method: OLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 38 3337 1224 0 0 N DF SSR MSE RMSE R2 Adj R2 eq1 20 19 268 14.1 3.76 0 0 eq2 20 19 3069 161.5 12.71 0 0 The covariance matrix of the residuals eq1 eq2 eq1 14.1 32.5 eq2 32.5 161.5 The correlations of the residuals eq1 eq2 eq1 1.000 0.681 eq2 0.681 1.000 OLS estimates for 'eq1' (equation 1) Model Formula: consump ~ 1 Estimate Std. Error t value Pr(>|t|) (Intercept) 100.90 0.84 120 <2e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 3.756 on 19 degrees of freedom Number of observations: 20 Degrees of Freedom: 19 SSR: 268.114 MSE: 14.111 Root MSE: 3.756 Multiple R-Squared: 0 Adjusted R-Squared: 0 OLS estimates for 'eq2' (equation 2) Model Formula: farmPrice ~ 1 Estimate Std. Error t value Pr(>|t|) (Intercept) 96.62 2.84 34 <2e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 12.709 on 19 degrees of freedom Number of observations: 20 Degrees of Freedom: 19 SSR: 3068.757 MSE: 161.514 Root MSE: 12.709 Multiple R-Squared: 0 Adjusted R-Squared: 0 > > > ## **************** shorter summaries ********************** > print( summary( fitols1, useDfSys = TRUE, equations = FALSE ) ) systemfit results method: OLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 33 156 4.43 0.709 0.558 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 63.3 3.73 1.93 0.764 0.736 supply 20 16 92.6 5.78 2.40 0.655 0.590 The covariance matrix of the residuals demand supply demand 3.73 4.14 supply 4.14 5.78 The correlations of the residuals demand supply demand 1.000 0.891 supply 0.891 1.000 Coefficients: Estimate Std. Error t value Pr(>|t|) demand_(Intercept) 99.8954 7.5194 13.29 8.4e-15 *** demand_price -0.3163 0.0907 -3.49 0.0014 ** demand_income 0.3346 0.0454 7.37 1.8e-08 *** supply_(Intercept) 58.2754 11.4629 5.08 1.4e-05 *** supply_price 0.1604 0.0949 1.69 0.1004 supply_farmPrice 0.2481 0.0462 5.37 6.1e-06 *** supply_trend 0.2483 0.0975 2.55 0.0157 * --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 > > print( summary( fitols2r ), residCov = FALSE, equations = FALSE ) systemfit results method: OLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 34 159 1.7 0.703 0.577 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 64.2 3.78 1.94 0.761 0.732 supply 20 16 95.1 5.94 2.44 0.645 0.579 Coefficients: Estimate Std. Error t value Pr(>|t|) demand_(Intercept) 99.5563 7.7652 12.82 1.4e-14 *** demand_price -0.2917 0.0899 -3.25 0.0026 ** demand_income 0.3129 0.0406 7.70 5.9e-09 *** supply_(Intercept) 56.3795 9.2860 6.07 7.0e-07 *** supply_price 0.1639 0.0786 2.08 0.0447 * supply_farmPrice 0.2571 0.0371 6.93 5.4e-08 *** supply_trend 0.3129 0.0406 7.70 5.9e-09 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 > > print( summary( fitols3s, useDfSys = FALSE ), residCov = TRUE ) systemfit results method: OLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 34 159 2.5 0.703 0.608 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 64.2 3.78 1.94 0.761 0.732 supply 20 16 95.1 5.94 2.44 0.645 0.579 The covariance matrix of the residuals demand supply demand 3.78 4.47 supply 4.47 5.94 The correlations of the residuals demand supply demand 1.000 0.943 supply 0.943 1.000 OLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Estimate Std. Error t value Pr(>|t|) (Intercept) 99.5563 7.5640 13.16 2.4e-10 *** price -0.2917 0.0887 -3.29 0.0043 ** income 0.3129 0.0415 7.54 8.1e-07 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.943 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 64.186 MSE: 3.776 Root MSE: 1.943 Multiple R-Squared: 0.761 Adjusted R-Squared: 0.732 OLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 56.3795 11.3165 4.98 0.00014 *** price 0.1639 0.0960 1.71 0.10724 farmPrice 0.2571 0.0451 5.69 3.3e-05 *** trend 0.3129 0.0415 7.54 1.2e-06 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.438 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 95.088 MSE: 5.943 Root MSE: 2.438 Multiple R-Squared: 0.645 Adjusted R-Squared: 0.579 > > print( summary( fitols4rs, residCov = FALSE, equations = FALSE ) ) systemfit results method: OLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 35 160 1.83 0.702 0.575 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 64.0 3.77 1.94 0.761 0.733 supply 20 16 95.8 5.99 2.45 0.643 0.576 Coefficients: Estimate Std. Error t value Pr(>|t|) demand_(Intercept) 101.4817 5.5234 18.37 < 2e-16 *** demand_price -0.3168 0.0589 -5.38 5.0e-06 *** demand_income 0.3189 0.0352 9.05 1.1e-10 *** supply_(Intercept) 54.1494 7.2089 7.51 8.5e-09 *** supply_price 0.1832 0.0589 3.11 0.0037 ** supply_farmPrice 0.2595 0.0399 6.51 1.7e-07 *** supply_trend 0.3189 0.0352 9.05 1.1e-10 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 > > print( summary( fitols5, equations = FALSE ), residCov = FALSE ) systemfit results method: OLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 35 160 1.83 0.702 0.575 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 64.0 3.77 1.94 0.761 0.733 supply 20 16 95.8 5.99 2.45 0.643 0.576 Coefficients: Estimate Std. Error t value Pr(>|t|) demand_(Intercept) 101.4817 5.7621 17.61 < 2e-16 *** demand_price -0.3168 0.0589 -5.38 5.0e-06 *** demand_income 0.3189 0.0373 8.55 4.3e-10 *** supply_(Intercept) 54.1494 7.0638 7.67 5.4e-09 *** supply_price 0.1832 0.0589 3.11 0.0037 ** supply_farmPrice 0.2595 0.0365 7.10 2.8e-08 *** supply_trend 0.3189 0.0373 8.55 4.3e-10 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 > > > ## ****************** residuals ************************** > print( residuals( fitols1 ) ) demand supply 1 1.074 -0.444 2 -0.390 -0.896 3 2.625 1.965 4 1.802 1.134 5 1.946 1.514 6 1.175 0.680 7 1.530 1.569 8 -2.933 -4.407 9 -1.365 -2.599 10 2.031 2.469 11 -0.149 -0.598 12 -1.954 -1.697 13 -1.121 -1.064 14 -0.220 0.970 15 1.487 3.159 16 -3.701 -3.866 17 -1.273 -0.265 18 -2.002 -2.449 19 1.738 3.110 20 -0.299 1.714 > print( residuals( fitols1$eq[[ 2 ]] ) ) 1 2 3 4 5 6 7 8 9 10 11 -0.444 -0.896 1.965 1.134 1.514 0.680 1.569 -4.407 -2.599 2.469 -0.598 12 13 14 15 16 17 18 19 20 -1.697 -1.064 0.970 3.159 -3.866 -0.265 -2.449 3.110 1.714 > > print( residuals( fitols2r ) ) demand supply 1 0.8465 0.156 2 -0.4933 -0.384 3 2.5225 2.415 4 1.7066 1.525 5 2.0445 1.750 6 1.2529 0.870 7 1.6277 1.711 8 -2.8261 -4.380 9 -1.2979 -2.597 10 2.0592 2.497 11 -0.4663 -0.466 12 -2.3732 -1.540 13 -1.4734 -1.006 14 -0.3398 0.885 15 1.7283 2.835 16 -3.4975 -4.290 17 -0.9651 -0.760 18 -1.9512 -2.911 19 1.8829 2.606 20 0.0129 1.085 > print( residuals( fitols2r$eq[[ 1 ]] ) ) 1 2 3 4 5 6 7 8 9 10 0.8465 -0.4933 2.5225 1.7066 2.0445 1.2529 1.6277 -2.8261 -1.2979 2.0592 11 12 13 14 15 16 17 18 19 20 -0.4663 -2.3732 -1.4734 -0.3398 1.7283 -3.4975 -0.9651 -1.9512 1.8829 0.0129 > > print( residuals( fitols3s ) ) demand supply 1 0.8465 0.156 2 -0.4933 -0.384 3 2.5225 2.415 4 1.7066 1.525 5 2.0445 1.750 6 1.2529 0.870 7 1.6277 1.711 8 -2.8261 -4.380 9 -1.2979 -2.597 10 2.0592 2.497 11 -0.4663 -0.466 12 -2.3732 -1.540 13 -1.4734 -1.006 14 -0.3398 0.885 15 1.7283 2.835 16 -3.4975 -4.290 17 -0.9651 -0.760 18 -1.9512 -2.911 19 1.8829 2.606 20 0.0129 1.085 > print( residuals( fitols3s$eq[[ 2 ]] ) ) 1 2 3 4 5 6 7 8 9 10 11 0.156 -0.384 2.415 1.525 1.750 0.870 1.711 -4.380 -2.597 2.497 -0.466 12 13 14 15 16 17 18 19 20 -1.540 -1.006 0.885 2.835 -4.290 -0.760 -2.911 2.606 1.085 > > print( residuals( fitols4rs ) ) demand supply 1 0.915 0.204 2 -0.387 -0.421 3 2.613 2.388 4 1.815 1.474 5 1.980 1.787 6 1.221 0.879 7 1.620 1.690 8 -2.769 -4.489 9 -1.382 -2.549 10 1.890 2.660 11 -0.506 -0.297 12 -2.280 -1.456 13 -1.323 -1.013 14 -0.330 0.925 15 1.572 2.889 16 -3.582 -4.313 17 -1.298 -0.573 18 -1.892 -3.023 19 1.948 2.462 20 0.174 0.777 > print( residuals( fitols4rs$eq[[ 1 ]] ) ) 1 2 3 4 5 6 7 8 9 10 11 0.915 -0.387 2.613 1.815 1.980 1.221 1.620 -2.769 -1.382 1.890 -0.506 12 13 14 15 16 17 18 19 20 -2.280 -1.323 -0.330 1.572 -3.582 -1.298 -1.892 1.948 0.174 > > print( residuals( fitols5 ) ) demand supply 1 0.915 0.204 2 -0.387 -0.421 3 2.613 2.388 4 1.815 1.474 5 1.980 1.787 6 1.221 0.879 7 1.620 1.690 8 -2.769 -4.489 9 -1.382 -2.549 10 1.890 2.660 11 -0.506 -0.297 12 -2.280 -1.456 13 -1.323 -1.013 14 -0.330 0.925 15 1.572 2.889 16 -3.582 -4.313 17 -1.298 -0.573 18 -1.892 -3.023 19 1.948 2.462 20 0.174 0.777 > print( residuals( fitols5$eq[[ 2 ]] ) ) 1 2 3 4 5 6 7 8 9 10 11 0.204 -0.421 2.388 1.474 1.787 0.879 1.690 -4.489 -2.549 2.660 -0.297 12 13 14 15 16 17 18 19 20 -1.456 -1.013 0.925 2.889 -4.313 -0.573 -3.023 2.462 0.777 > > > ## *************** coefficients ********************* > print( round( coef( fitols1rs ), digits = 6 ) ) demand_(Intercept) demand_price demand_income supply_(Intercept) 99.895 -0.316 0.335 58.275 supply_price supply_farmPrice supply_trend 0.160 0.248 0.248 > print( round( coef( fitols1rs$eq[[ 2 ]] ), digits = 6 ) ) (Intercept) price farmPrice trend 58.275 0.160 0.248 0.248 > > print( round( coef( fitols2s ), digits = 6 ) ) demand_(Intercept) demand_price demand_income supply_(Intercept) 99.556 -0.292 0.313 56.380 supply_price supply_farmPrice supply_trend 0.164 0.257 0.313 > print( round( coef( fitols2s$eq[[ 1 ]] ), digits = 6 ) ) (Intercept) price income 99.556 -0.292 0.313 > > print( round( coef( fitols3 ), digits = 6 ) ) demand_(Intercept) demand_price demand_income supply_(Intercept) 99.556 -0.292 0.313 56.380 supply_price supply_farmPrice supply_trend 0.164 0.257 0.313 > print( round( coef( fitols3, modified.regMat = TRUE ), digits = 6 ) ) C1 C2 C3 C4 C5 C6 99.556 -0.292 0.313 56.380 0.164 0.257 > print( round( coef( fitols3$eq[[ 2 ]] ), digits = 6 ) ) (Intercept) price farmPrice trend 56.380 0.164 0.257 0.313 > > print( round( coef( fitols4r ), digits = 6 ) ) demand_(Intercept) demand_price demand_income supply_(Intercept) 101.482 -0.317 0.319 54.149 supply_price supply_farmPrice supply_trend 0.183 0.260 0.319 > print( round( coef( fitols4r$eq[[ 1 ]] ), digits = 6 ) ) (Intercept) price income 101.482 -0.317 0.319 > > print( round( coef( fitols5 ), digits = 6 ) ) demand_(Intercept) demand_price demand_income supply_(Intercept) 101.482 -0.317 0.319 54.149 supply_price supply_farmPrice supply_trend 0.183 0.260 0.319 > print( round( coef( fitols5, modified.regMat = TRUE ), digits = 6 ) ) C1 C2 C3 C4 C5 C6 101.482 -0.317 0.319 54.149 0.183 0.260 > print( round( coef( fitols5$eq[[ 2 ]] ), digits = 6 ) ) (Intercept) price farmPrice trend 54.149 0.183 0.260 0.319 > > > ## *************** coefficients with stats ********************* > print( round( coef( summary( fitols1rs, useDfSys = FALSE ) ), digits = 6 ) ) Estimate Std. Error t value Pr(>|t|) demand_(Intercept) 99.895 8.4671 11.80 0.000000 demand_price -0.316 0.1021 -3.10 0.006536 demand_income 0.335 0.0511 6.54 0.000005 supply_(Intercept) 58.275 10.3587 5.63 0.000038 supply_price 0.160 0.0857 1.87 0.079851 supply_farmPrice 0.248 0.0417 5.94 0.000021 supply_trend 0.248 0.0881 2.82 0.012382 > print( round( coef( summary( fitols1rs$eq[[ 2 ]], useDfSys = FALSE ) ), + digits = 6 ) ) Estimate Std. Error t value Pr(>|t|) (Intercept) 58.275 10.3587 5.63 0.000038 price 0.160 0.0857 1.87 0.079851 farmPrice 0.248 0.0417 5.94 0.000021 trend 0.248 0.0881 2.82 0.012382 > > print( round( coef( summary( fitols2s ) ), digits = 6 ) ) Estimate Std. Error t value Pr(>|t|) demand_(Intercept) 99.556 7.5640 13.16 0.000000 demand_price -0.292 0.0887 -3.29 0.002340 demand_income 0.313 0.0415 7.54 0.000000 supply_(Intercept) 56.380 11.3165 4.98 0.000018 supply_price 0.164 0.0960 1.71 0.097028 supply_farmPrice 0.257 0.0451 5.69 0.000002 supply_trend 0.313 0.0415 7.54 0.000000 > print( round( coef( summary( fitols2s$eq[[ 1 ]] ) ), digits = 6 ) ) Estimate Std. Error t value Pr(>|t|) (Intercept) 99.556 7.5640 13.16 0.00000 price -0.292 0.0887 -3.29 0.00234 income 0.313 0.0415 7.54 0.00000 > > print( round( coef( summary( fitols3, useDfSys = FALSE ) ), digits = 6 ) ) Estimate Std. Error t value Pr(>|t|) demand_(Intercept) 99.556 8.4225 11.82 0.000000 demand_price -0.292 0.0975 -2.99 0.008189 demand_income 0.313 0.0441 7.10 0.000002 supply_(Intercept) 56.380 10.0721 5.60 0.000040 supply_price 0.164 0.0853 1.92 0.072611 supply_farmPrice 0.257 0.0402 6.39 0.000009 supply_trend 0.313 0.0441 7.10 0.000003 > print( round( coef( summary( fitols3, useDfSys = FALSE ), modified.regMat = TRUE ), + digits = 6 ) ) Estimate Std. Error t value Pr(>|t|) C1 99.556 8.4225 11.82 NA C2 -0.292 0.0975 -2.99 NA C3 0.313 0.0441 7.10 NA C4 56.380 10.0721 5.60 NA C5 0.164 0.0853 1.92 NA C6 0.257 0.0402 6.39 NA > print( round( coef( summary( fitols3$eq[[ 2 ]], useDfSys = FALSE ) ), + digits = 6 ) ) Estimate Std. Error t value Pr(>|t|) (Intercept) 56.380 10.0721 5.60 0.000040 price 0.164 0.0853 1.92 0.072611 farmPrice 0.257 0.0402 6.39 0.000009 trend 0.313 0.0441 7.10 0.000003 > > print( round( coef( summary( fitols4r, useDfSys = FALSE ) ), digits = 6 ) ) Estimate Std. Error t value Pr(>|t|) demand_(Intercept) 101.482 5.7621 17.61 0.0e+00 demand_price -0.317 0.0589 -5.38 5.0e-05 demand_income 0.319 0.0373 8.55 0.0e+00 supply_(Intercept) 54.149 7.0638 7.67 1.0e-06 supply_price 0.183 0.0589 3.11 6.7e-03 supply_farmPrice 0.260 0.0365 7.10 3.0e-06 supply_trend 0.319 0.0373 8.55 0.0e+00 > print( round( coef( summary( fitols4r$eq[[ 1 ]], useDfSys = FALSE ) ), + digits = 6 ) ) Estimate Std. Error t value Pr(>|t|) (Intercept) 101.482 5.7621 17.61 0e+00 price -0.317 0.0589 -5.38 5e-05 income 0.319 0.0373 8.55 0e+00 > > print( round( coef( summary( fitols5 ) ), digits = 6 ) ) Estimate Std. Error t value Pr(>|t|) demand_(Intercept) 101.482 5.7621 17.61 0.000000 demand_price -0.317 0.0589 -5.38 0.000005 demand_income 0.319 0.0373 8.55 0.000000 supply_(Intercept) 54.149 7.0638 7.67 0.000000 supply_price 0.183 0.0589 3.11 0.003680 supply_farmPrice 0.260 0.0365 7.10 0.000000 supply_trend 0.319 0.0373 8.55 0.000000 > print( round( coef( summary( fitols5 ), modified.regMat = TRUE ), digits = 6 ) ) Estimate Std. Error t value Pr(>|t|) C1 101.482 5.7621 17.61 0.000000 C2 -0.317 0.0589 -5.38 0.000005 C3 0.319 0.0373 8.55 0.000000 C4 54.149 7.0638 7.67 0.000000 C5 0.183 0.0589 3.11 0.003680 C6 0.260 0.0365 7.10 0.000000 > print( round( coef( summary( fitols5$eq[[ 2 ]] ) ), digits = 6 ) ) Estimate Std. Error t value Pr(>|t|) (Intercept) 54.149 7.0638 7.67 0.00000 price 0.183 0.0589 3.11 0.00368 farmPrice 0.260 0.0365 7.10 0.00000 trend 0.319 0.0373 8.55 0.00000 > > > ## *********** variance covariance matrix of the coefficients ******* > print( round( vcov( fitols1rs ), digits = 6 ) ) demand_(Intercept) demand_price demand_income demand_(Intercept) 71.6926 -0.75420 0.04078 demand_price -0.7542 0.01043 -0.00296 demand_income 0.0408 -0.00296 0.00262 supply_(Intercept) 0.0000 0.00000 0.00000 supply_price 0.0000 0.00000 0.00000 supply_farmPrice 0.0000 0.00000 0.00000 supply_trend 0.0000 0.00000 0.00000 supply_(Intercept) supply_price supply_farmPrice demand_(Intercept) 0.000 0.000000 0.000000 demand_price 0.000 0.000000 0.000000 demand_income 0.000 0.000000 0.000000 supply_(Intercept) 107.303 -0.806417 -0.248549 supply_price -0.806 0.007352 0.000689 supply_farmPrice -0.249 0.000689 0.001742 supply_trend -0.228 0.000426 0.001074 supply_trend demand_(Intercept) 0.000000 demand_price 0.000000 demand_income 0.000000 supply_(Intercept) -0.227988 supply_price 0.000426 supply_farmPrice 0.001074 supply_trend 0.007766 > print( round( vcov( fitols1rs$eq[[ 2 ]] ), digits = 6 ) ) (Intercept) price farmPrice trend (Intercept) 107.303 -0.806417 -0.248549 -0.227988 price -0.806 0.007352 0.000689 0.000426 farmPrice -0.249 0.000689 0.001742 0.001074 trend -0.228 0.000426 0.001074 0.007766 > > print( round( vcov( fitols2s ), digits = 6 ) ) demand_(Intercept) demand_price demand_income demand_(Intercept) 57.21413 -0.596328 0.026850 demand_price -0.59633 0.007862 -0.001948 demand_income 0.02685 -0.001948 0.001722 supply_(Intercept) -0.78825 0.057190 -0.050565 supply_price 0.00147 -0.000107 0.000095 supply_farmPrice 0.00371 -0.000269 0.000238 supply_trend 0.02685 -0.001948 0.001722 supply_(Intercept) supply_price supply_farmPrice demand_(Intercept) -0.7883 0.001474 0.003714 demand_price 0.0572 -0.000107 -0.000269 demand_income -0.0506 0.000095 0.000238 supply_(Intercept) 128.0635 -1.001596 -0.280017 supply_price -1.0016 0.009225 0.000806 supply_farmPrice -0.2800 0.000806 0.002038 supply_trend -0.0506 0.000095 0.000238 supply_trend demand_(Intercept) 0.026850 demand_price -0.001948 demand_income 0.001722 supply_(Intercept) -0.050565 supply_price 0.000095 supply_farmPrice 0.000238 supply_trend 0.001722 > print( round( vcov( fitols2s$eq[[ 1 ]] ), digits = 6 ) ) (Intercept) price income (Intercept) 57.2141 -0.59633 0.02685 price -0.5963 0.00786 -0.00195 income 0.0268 -0.00195 0.00172 > > print( round( vcov( fitols3 ), digits = 6 ) ) demand_(Intercept) demand_price demand_income demand_(Intercept) 70.93892 -0.736413 0.030252 demand_price -0.73641 0.009503 -0.002195 demand_income 0.03025 -0.002195 0.001941 supply_(Intercept) -0.88813 0.064436 -0.056972 supply_price 0.00166 -0.000120 0.000107 supply_farmPrice 0.00419 -0.000304 0.000268 supply_trend 0.03025 -0.002195 0.001941 supply_(Intercept) supply_price supply_farmPrice demand_(Intercept) -0.8881 0.001661 0.004185 demand_price 0.0644 -0.000120 -0.000304 demand_income -0.0570 0.000107 0.000268 supply_(Intercept) 101.4478 -0.790443 -0.223090 supply_price -0.7904 0.007274 0.000640 supply_farmPrice -0.2231 0.000640 0.001617 supply_trend -0.0570 0.000107 0.000268 supply_trend demand_(Intercept) 0.030252 demand_price -0.002195 demand_income 0.001941 supply_(Intercept) -0.056972 supply_price 0.000107 supply_farmPrice 0.000268 supply_trend 0.001941 > print( round( vcov( fitols3, modified.regMat = TRUE ), digits = 6 ) ) C1 C2 C3 C4 C5 C6 C1 70.93892 -0.736413 0.030252 -0.8881 0.001661 0.004185 C2 -0.73641 0.009503 -0.002195 0.0644 -0.000120 -0.000304 C3 0.03025 -0.002195 0.001941 -0.0570 0.000107 0.000268 C4 -0.88813 0.064436 -0.056972 101.4478 -0.790443 -0.223090 C5 0.00166 -0.000120 0.000107 -0.7904 0.007274 0.000640 C6 0.00419 -0.000304 0.000268 -0.2231 0.000640 0.001617 > print( round( vcov( fitols3$eq[[ 2 ]] ), digits = 6 ) ) (Intercept) price farmPrice trend (Intercept) 101.448 -0.790443 -0.223090 -0.056972 price -0.790 0.007274 0.000640 0.000107 farmPrice -0.223 0.000640 0.001617 0.000268 trend -0.057 0.000107 0.000268 0.001941 > > print( round( vcov( fitols4r ), digits = 6 ) ) demand_(Intercept) demand_price demand_income demand_(Intercept) 33.2016 -0.272100 -0.059329 demand_price -0.2721 0.003464 -0.000762 demand_income -0.0593 -0.000762 0.001390 supply_(Intercept) 30.8652 -0.357363 0.050012 supply_price -0.2721 0.003464 -0.000762 supply_farmPrice -0.0313 0.000196 0.000120 supply_trend -0.0593 -0.000762 0.001390 supply_(Intercept) supply_price supply_farmPrice demand_(Intercept) 30.865 -0.272100 -0.031328 demand_price -0.357 0.003464 0.000196 demand_income 0.050 -0.000762 0.000120 supply_(Intercept) 49.897 -0.357363 -0.149852 supply_price -0.357 0.003464 0.000196 supply_farmPrice -0.150 0.000196 0.001335 supply_trend 0.050 -0.000762 0.000120 supply_trend demand_(Intercept) -0.059329 demand_price -0.000762 demand_income 0.001390 supply_(Intercept) 0.050012 supply_price -0.000762 supply_farmPrice 0.000120 supply_trend 0.001390 > print( round( vcov( fitols4r$eq[[ 1 ]] ), digits = 6 ) ) (Intercept) price income (Intercept) 33.2016 -0.272100 -0.059329 price -0.2721 0.003464 -0.000762 income -0.0593 -0.000762 0.001390 > > print( round( vcov( fitols5 ), digits = 6 ) ) demand_(Intercept) demand_price demand_income demand_(Intercept) 33.2016 -0.272100 -0.059329 demand_price -0.2721 0.003464 -0.000762 demand_income -0.0593 -0.000762 0.001390 supply_(Intercept) 30.8652 -0.357363 0.050012 supply_price -0.2721 0.003464 -0.000762 supply_farmPrice -0.0313 0.000196 0.000120 supply_trend -0.0593 -0.000762 0.001390 supply_(Intercept) supply_price supply_farmPrice demand_(Intercept) 30.865 -0.272100 -0.031328 demand_price -0.357 0.003464 0.000196 demand_income 0.050 -0.000762 0.000120 supply_(Intercept) 49.897 -0.357363 -0.149852 supply_price -0.357 0.003464 0.000196 supply_farmPrice -0.150 0.000196 0.001335 supply_trend 0.050 -0.000762 0.000120 supply_trend demand_(Intercept) -0.059329 demand_price -0.000762 demand_income 0.001390 supply_(Intercept) 0.050012 supply_price -0.000762 supply_farmPrice 0.000120 supply_trend 0.001390 > print( round( vcov( fitols5, modified.regMat = TRUE ), digits = 6 ) ) C1 C2 C3 C4 C5 C6 C1 33.2016 -0.272100 -0.059329 30.865 -0.272100 -0.031328 C2 -0.2721 0.003464 -0.000762 -0.357 0.003464 0.000196 C3 -0.0593 -0.000762 0.001390 0.050 -0.000762 0.000120 C4 30.8652 -0.357363 0.050012 49.897 -0.357363 -0.149852 C5 -0.2721 0.003464 -0.000762 -0.357 0.003464 0.000196 C6 -0.0313 0.000196 0.000120 -0.150 0.000196 0.001335 > print( round( vcov( fitols5$eq[[ 2 ]] ), digits = 6 ) ) (Intercept) price farmPrice trend (Intercept) 49.897 -0.357363 -0.149852 0.050012 price -0.357 0.003464 0.000196 -0.000762 farmPrice -0.150 0.000196 0.001335 0.000120 trend 0.050 -0.000762 0.000120 0.001390 > > > ## *********** confidence intervals of coefficients ************* > print( confint( fitols1, useDfSys = TRUE ) ) 2.5 % 97.5 % demand_(Intercept) 84.597 115.194 demand_price -0.501 -0.132 demand_income 0.242 0.427 supply_(Intercept) 34.954 81.597 supply_price -0.033 0.353 supply_farmPrice 0.154 0.342 supply_trend 0.050 0.447 > print( confint( fitols1$eq[[ 2 ]], level = 0.9, useDfSys = TRUE ) ) 5 % 95 % (Intercept) 38.876 77.675 price 0.000 0.321 farmPrice 0.170 0.326 trend 0.083 0.413 > > print( confint( fitols2r, level = 0.9 ) ) 5 % 95 % demand_(Intercept) 83.776 115.337 demand_price -0.474 -0.109 demand_income 0.230 0.395 supply_(Intercept) 37.508 75.251 supply_price 0.004 0.324 supply_farmPrice 0.182 0.332 supply_trend 0.230 0.395 > print( confint( fitols2r$eq[[ 1 ]], level = 0.99 ) ) 0.5 % 99.5 % (Intercept) 78.370 120.743 price -0.537 -0.046 income 0.202 0.424 > > print( confint( fitols3s, level = 0.99 ) ) 0.5 % 99.5 % demand_(Intercept) 84.184 114.928 demand_price -0.472 -0.112 demand_income 0.229 0.397 supply_(Intercept) 33.382 79.377 supply_price -0.031 0.359 supply_farmPrice 0.165 0.349 supply_trend 0.229 0.397 > print( confint( fitols3s$eq[[ 2 ]], level = 0.5 ) ) 25 % 75 % (Intercept) 48.664 64.095 price 0.098 0.229 farmPrice 0.226 0.288 trend 0.285 0.341 > > print( confint( fitols4rs, level = 0.5 ) ) 25 % 75 % demand_(Intercept) 90.269 112.695 demand_price -0.436 -0.197 demand_income 0.247 0.390 supply_(Intercept) 39.515 68.784 supply_price 0.064 0.303 supply_farmPrice 0.179 0.340 supply_trend 0.247 0.390 > print( confint( fitols4rs$eq[[ 1 ]], level = 0.25 ) ) 37.5 % 62.5 % (Intercept) 99.708 103.256 price -0.336 -0.298 income 0.308 0.330 > > print( confint( fitols5, level = 0.25 ) ) 37.5 % 62.5 % demand_(Intercept) 89.784 113.179 demand_price -0.436 -0.197 demand_income 0.243 0.395 supply_(Intercept) 39.809 68.490 supply_price 0.064 0.303 supply_farmPrice 0.185 0.334 supply_trend 0.243 0.395 > print( confint( fitols5$eq[[ 2 ]], level = 0.999 ) ) 0.1 % 100 % (Intercept) 28.782 79.517 price -0.028 0.395 farmPrice 0.128 0.391 trend 0.185 0.453 > > print( confint( fitols3, level = 0.999, useDfSys = FALSE ) ) 0.1 % 100 % demand_(Intercept) 81.786 117.326 demand_price -0.497 -0.086 demand_income 0.220 0.406 supply_(Intercept) 35.028 77.731 supply_price -0.017 0.345 supply_farmPrice 0.172 0.342 supply_trend 0.219 0.406 > print( confint( fitols3$eq[[ 1 ]], useDfSys = FALSE ) ) 2.5 % 97.5 % (Intercept) 81.786 117.326 price -0.497 -0.086 income 0.220 0.406 > > > ## *********** fitted values ************* > print( fitted( fitols1 ) ) demand supply 1 97.4 98.9 2 99.6 100.1 3 99.5 100.2 4 99.7 100.4 5 102.3 102.7 6 102.1 102.6 7 102.5 102.4 8 102.8 104.3 9 101.7 102.9 10 100.8 100.4 11 95.6 96.0 12 94.4 94.1 13 95.7 95.6 14 99.0 97.8 15 104.3 102.6 16 103.9 104.1 17 104.8 103.8 18 101.9 102.4 19 103.5 102.1 20 106.5 104.5 > print( fitted( fitols1$eq[[ 2 ]] ) ) 1 2 3 4 5 6 7 8 9 10 11 12 13 98.9 100.1 100.2 100.4 102.7 102.6 102.4 104.3 102.9 100.4 96.0 94.1 95.6 14 15 16 17 18 19 20 97.8 102.6 104.1 103.8 102.4 102.1 104.5 > > print( fitted( fitols2r ) ) demand supply 1 97.6 98.3 2 99.7 99.6 3 99.6 99.7 4 99.8 100.0 5 102.2 102.5 6 102.0 102.4 7 102.4 102.3 8 102.7 104.3 9 101.6 102.9 10 100.8 100.3 11 95.9 95.9 12 94.8 94.0 13 96.0 95.5 14 99.1 97.9 15 104.1 103.0 16 103.7 104.5 17 104.5 104.3 18 101.9 102.8 19 103.3 102.6 20 106.2 105.1 > print( fitted( fitols2r$eq[[ 1 ]] ) ) 1 2 3 4 5 6 7 8 9 10 11 12 13 97.6 99.7 99.6 99.8 102.2 102.0 102.4 102.7 101.6 100.8 95.9 94.8 96.0 14 15 16 17 18 19 20 99.1 104.1 103.7 104.5 101.9 103.3 106.2 > > print( fitted( fitols3s ) ) demand supply 1 97.6 98.3 2 99.7 99.6 3 99.6 99.7 4 99.8 100.0 5 102.2 102.5 6 102.0 102.4 7 102.4 102.3 8 102.7 104.3 9 101.6 102.9 10 100.8 100.3 11 95.9 95.9 12 94.8 94.0 13 96.0 95.5 14 99.1 97.9 15 104.1 103.0 16 103.7 104.5 17 104.5 104.3 18 101.9 102.8 19 103.3 102.6 20 106.2 105.1 > print( fitted( fitols3s$eq[[ 2 ]] ) ) 1 2 3 4 5 6 7 8 9 10 11 12 13 98.3 99.6 99.7 100.0 102.5 102.4 102.3 104.3 102.9 100.3 95.9 94.0 95.5 14 15 16 17 18 19 20 97.9 103.0 104.5 104.3 102.8 102.6 105.1 > > print( fitted( fitols4rs ) ) demand supply 1 97.6 98.3 2 99.6 99.6 3 99.5 99.8 4 99.7 100.0 5 102.3 102.5 6 102.0 102.4 7 102.4 102.3 8 102.7 104.4 9 101.7 102.9 10 100.9 100.2 11 95.9 95.7 12 94.7 93.9 13 95.9 95.5 14 99.1 97.8 15 104.2 102.9 16 103.8 104.5 17 104.8 104.1 18 101.8 103.0 19 103.3 102.8 20 106.1 105.5 > print( fitted( fitols4rs$eq[[ 1 ]] ) ) 1 2 3 4 5 6 7 8 9 10 11 12 13 97.6 99.6 99.5 99.7 102.3 102.0 102.4 102.7 101.7 100.9 95.9 94.7 95.9 14 15 16 17 18 19 20 99.1 104.2 103.8 104.8 101.8 103.3 106.1 > > print( fitted( fitols5 ) ) demand supply 1 97.6 98.3 2 99.6 99.6 3 99.5 99.8 4 99.7 100.0 5 102.3 102.5 6 102.0 102.4 7 102.4 102.3 8 102.7 104.4 9 101.7 102.9 10 100.9 100.2 11 95.9 95.7 12 94.7 93.9 13 95.9 95.5 14 99.1 97.8 15 104.2 102.9 16 103.8 104.5 17 104.8 104.1 18 101.8 103.0 19 103.3 102.8 20 106.1 105.5 > print( fitted( fitols5$eq[[ 2 ]] ) ) 1 2 3 4 5 6 7 8 9 10 11 12 13 98.3 99.6 99.8 100.0 102.5 102.4 102.3 104.4 102.9 100.2 95.7 93.9 95.5 14 15 16 17 18 19 20 97.8 102.9 104.5 104.1 103.0 102.8 105.5 > > > ## *********** predicted values ************* > predictData <- Kmenta > predictData$consump <- NULL > predictData$price <- Kmenta$price * 0.9 > predictData$income <- Kmenta$income * 1.1 > > print( predict( fitols1, se.fit = TRUE, interval = "prediction", + useDfSys = TRUE ) ) demand.pred demand.se.fit demand.lwr demand.upr supply.pred supply.se.fit 1 97.4 0.643 93.3 101.5 98.9 1.056 2 99.6 0.577 95.5 103.7 100.1 1.037 3 99.5 0.545 95.5 103.6 100.2 0.939 4 99.7 0.582 95.6 103.8 100.4 0.912 5 102.3 0.502 98.2 106.4 102.7 0.895 6 102.1 0.463 98.0 106.1 102.6 0.791 7 102.5 0.484 98.4 106.5 102.4 0.719 8 102.8 0.601 98.7 106.9 104.3 0.963 9 101.7 0.527 97.6 105.8 102.9 0.788 10 100.8 0.788 96.5 105.0 100.4 0.981 11 95.6 0.946 91.2 100.0 96.0 1.185 12 94.4 0.980 90.0 98.8 94.1 1.394 13 95.7 0.880 91.3 100.0 95.6 1.244 14 99.0 0.508 94.9 103.0 97.8 0.896 15 104.3 0.758 100.1 108.5 102.6 0.874 16 103.9 0.616 99.8 108.0 104.1 0.916 17 104.8 1.273 100.1 109.5 103.8 1.605 18 101.9 0.536 97.9 106.0 102.4 0.962 19 103.5 0.680 99.3 107.6 102.1 1.098 20 106.5 1.274 101.8 111.2 104.5 1.664 supply.lwr supply.upr 1 93.6 104.3 2 94.8 105.4 3 94.9 105.5 4 95.1 105.6 5 97.5 107.9 6 97.4 107.7 7 97.3 107.5 8 99.0 109.6 9 97.8 108.1 10 95.1 105.6 11 90.6 101.5 12 88.5 99.8 13 90.1 101.1 14 92.6 103.0 15 97.4 107.8 16 98.9 109.3 17 97.9 109.7 18 97.1 107.6 19 96.7 107.5 20 98.6 110.5 > print( predict( fitols1$eq[[ 2 ]], se.fit = TRUE, interval = "prediction", + useDfSys = TRUE ) ) fit se.fit lwr upr 1 98.9 1.056 93.6 104.3 2 100.1 1.037 94.8 105.4 3 100.2 0.939 94.9 105.5 4 100.4 0.912 95.1 105.6 5 102.7 0.895 97.5 107.9 6 102.6 0.791 97.4 107.7 7 102.4 0.719 97.3 107.5 8 104.3 0.963 99.0 109.6 9 102.9 0.788 97.8 108.1 10 100.4 0.981 95.1 105.6 11 96.0 1.185 90.6 101.5 12 94.1 1.394 88.5 99.8 13 95.6 1.244 90.1 101.1 14 97.8 0.896 92.6 103.0 15 102.6 0.874 97.4 107.8 16 104.1 0.916 98.9 109.3 17 103.8 1.605 97.9 109.7 18 102.4 0.962 97.1 107.6 19 102.1 1.098 96.7 107.5 20 104.5 1.664 98.6 110.5 > > print( predict( fitols2r, se.pred = TRUE, interval = "confidence", + level = 0.999, newdata = predictData ) ) demand.pred demand.se.pred demand.lwr demand.upr supply.pred supply.se.pred 1 103 2.17 99.9 107 96.7 2.62 2 106 2.16 102.4 109 97.9 2.55 3 106 2.17 102.2 109 98.1 2.55 4 106 2.16 102.5 109 98.3 2.54 5 108 2.43 102.9 113 100.9 2.67 6 108 2.38 103.1 113 100.7 2.63 7 109 2.37 103.7 113 100.6 2.59 8 109 2.33 104.5 114 102.6 2.55 9 107 2.44 102.2 113 101.4 2.69 10 106 2.57 100.2 112 98.8 2.84 11 101 2.36 96.1 106 94.4 2.89 12 100 2.17 96.6 104 92.3 2.88 13 102 2.08 99.0 104 93.9 2.75 14 105 2.25 100.7 109 96.3 2.72 15 110 2.63 103.7 116 101.4 2.72 16 110 2.52 104.1 116 102.9 2.65 17 110 2.96 102.0 118 102.9 3.03 18 108 2.28 103.9 112 101.1 2.55 19 110 2.36 105.1 115 100.9 2.55 20 114 2.57 107.4 120 103.3 2.51 supply.lwr supply.upr 1 93.2 100.2 2 95.2 100.5 3 95.3 100.8 4 95.8 100.8 5 97.0 104.8 6 97.2 104.3 7 97.5 103.7 8 99.9 105.2 9 97.3 105.5 10 93.6 104.1 11 88.8 100.0 12 86.8 97.9 13 89.3 98.5 14 91.9 100.6 15 97.0 105.8 16 99.2 106.6 17 96.4 109.4 18 98.4 103.9 19 98.2 103.5 20 101.1 105.5 > print( predict( fitols2r$eq[[ 1 ]], se.pred = TRUE, interval = "confidence", + level = 0.999, newdata = predictData ) ) fit se.pred lwr upr 1 103 2.17 99.9 107 2 106 2.16 102.4 109 3 106 2.17 102.2 109 4 106 2.16 102.5 109 5 108 2.43 102.9 113 6 108 2.38 103.1 113 7 109 2.37 103.7 113 8 109 2.33 104.5 114 9 107 2.44 102.2 113 10 106 2.57 100.2 112 11 101 2.36 96.1 106 12 100 2.17 96.6 104 13 102 2.08 99.0 104 14 105 2.25 100.7 109 15 110 2.63 103.7 116 16 110 2.52 104.1 116 17 110 2.96 102.0 118 18 108 2.28 103.9 112 19 110 2.36 105.1 115 20 114 2.57 107.4 120 > > print( predict( fitols3s, se.fit = TRUE, se.pred = TRUE, + interval = "prediction", level = 0.5, newdata = predictData ) ) demand.pred demand.se.fit demand.se.pred demand.lwr demand.upr supply.pred 1 103 0.940 2.16 101.8 105 96.7 2 106 0.944 2.16 104.3 107 97.9 3 106 0.969 2.17 104.2 107 98.1 4 106 0.949 2.16 104.4 107 98.3 5 108 1.452 2.43 106.5 110 100.9 6 108 1.372 2.38 106.4 110 100.7 7 109 1.356 2.37 106.9 110 100.6 8 109 1.296 2.34 107.6 111 102.6 9 107 1.464 2.43 105.8 109 101.4 10 106 1.652 2.55 104.5 108 98.8 11 101 1.305 2.34 99.4 103 94.4 12 100 0.941 2.16 98.6 102 92.3 13 102 0.725 2.07 100.2 103 93.9 14 105 1.124 2.24 103.3 106 96.3 15 110 1.774 2.63 108.3 112 101.4 16 110 1.606 2.52 108.2 112 102.9 17 110 2.216 2.95 108.0 112 102.9 18 108 1.208 2.29 106.6 110 101.1 19 110 1.356 2.37 108.3 112 100.9 20 114 1.718 2.59 111.7 115 103.3 supply.se.fit supply.se.pred supply.lwr supply.upr 1 1.149 2.69 94.8 98.5 2 0.873 2.59 96.1 99.6 3 0.907 2.60 96.3 99.8 4 0.831 2.58 96.5 100.0 5 1.324 2.77 99.0 102.8 6 1.188 2.71 98.9 102.6 7 1.049 2.65 98.8 102.4 8 0.911 2.60 100.8 104.3 9 1.396 2.81 99.5 103.3 10 1.782 3.02 96.8 100.9 11 1.906 3.09 92.3 96.5 12 1.875 3.08 90.2 94.4 13 1.560 2.89 91.9 95.8 14 1.475 2.85 94.3 98.2 15 1.477 2.85 99.5 103.3 16 1.245 2.74 101.0 104.8 17 2.195 3.28 100.6 105.1 18 0.909 2.60 99.4 102.9 19 0.875 2.59 99.1 102.6 20 0.704 2.54 101.6 105.0 > print( predict( fitols3s$eq[[ 2 ]], se.fit = TRUE, se.pred = TRUE, + interval = "prediction", level = 0.5, newdata = predictData ) ) fit se.fit se.pred lwr upr 1 96.7 1.149 2.69 94.8 98.5 2 97.9 0.873 2.59 96.1 99.6 3 98.1 0.907 2.60 96.3 99.8 4 98.3 0.831 2.58 96.5 100.0 5 100.9 1.324 2.77 99.0 102.8 6 100.7 1.188 2.71 98.9 102.6 7 100.6 1.049 2.65 98.8 102.4 8 102.6 0.911 2.60 100.8 104.3 9 101.4 1.396 2.81 99.5 103.3 10 98.8 1.782 3.02 96.8 100.9 11 94.4 1.906 3.09 92.3 96.5 12 92.3 1.875 3.08 90.2 94.4 13 93.9 1.560 2.89 91.9 95.8 14 96.3 1.475 2.85 94.3 98.2 15 101.4 1.477 2.85 99.5 103.3 16 102.9 1.245 2.74 101.0 104.8 17 102.9 2.195 3.28 100.6 105.1 18 101.1 0.909 2.60 99.4 102.9 19 100.9 0.875 2.59 99.1 102.6 20 103.3 0.704 2.54 101.6 105.0 > > print( predict( fitols4rs, se.fit = TRUE, se.pred = TRUE, + interval = "confidence", level = 0.99 ) ) demand.pred demand.se.fit demand.se.pred demand.lwr demand.upr supply.pred 1 97.6 0.541 2.01 96.1 99.0 98.3 2 99.6 0.471 2.00 98.3 100.9 99.6 3 99.5 0.454 1.99 98.3 100.8 99.8 4 99.7 0.475 2.00 98.4 101.0 100.0 5 102.3 0.434 1.99 101.1 103.4 102.5 6 102.0 0.418 1.98 100.9 103.2 102.4 7 102.4 0.440 1.99 101.2 103.6 102.3 8 102.7 0.537 2.01 101.2 104.1 104.4 9 101.7 0.447 1.99 100.5 102.9 102.9 10 100.9 0.628 2.04 99.2 102.6 100.2 11 95.9 0.833 2.11 93.7 98.2 95.7 12 94.7 0.807 2.10 92.5 96.9 93.9 13 95.9 0.677 2.06 94.0 97.7 95.5 14 99.1 0.459 1.99 97.8 100.3 97.8 15 104.2 0.572 2.02 102.7 105.8 102.9 16 103.8 0.509 2.01 102.4 105.2 104.5 17 104.8 0.877 2.13 102.4 107.2 104.1 18 101.8 0.478 2.00 100.5 103.1 103.0 19 103.3 0.604 2.03 101.6 104.9 102.8 20 106.1 1.102 2.23 103.1 109.1 105.5 supply.se.fit supply.se.pred supply.lwr supply.upr 1 0.598 2.52 96.7 99.9 2 0.679 2.54 97.8 101.5 3 0.634 2.53 98.0 101.5 4 0.643 2.53 98.3 101.8 5 0.753 2.56 100.4 104.5 6 0.680 2.54 100.5 104.2 7 0.625 2.53 100.6 104.0 8 0.799 2.57 102.2 106.6 9 0.700 2.55 101.0 104.8 10 0.716 2.55 98.2 102.1 11 0.916 2.61 93.2 98.2 12 1.226 2.74 90.5 97.2 13 1.130 2.70 92.5 98.6 14 0.796 2.57 95.7 100.0 15 0.656 2.53 101.1 104.7 16 0.644 2.53 102.8 106.3 17 1.150 2.70 101.0 107.2 18 0.575 2.51 101.4 104.5 19 0.649 2.53 101.0 104.5 20 0.875 2.60 103.1 107.8 > print( predict( fitols4rs$eq[[ 1 ]], se.fit = TRUE, se.pred = TRUE, + interval = "confidence", level = 0.99 ) ) fit se.fit se.pred lwr upr 1 97.6 0.541 2.01 96.1 99.0 2 99.6 0.471 2.00 98.3 100.9 3 99.5 0.454 1.99 98.3 100.8 4 99.7 0.475 2.00 98.4 101.0 5 102.3 0.434 1.99 101.1 103.4 6 102.0 0.418 1.98 100.9 103.2 7 102.4 0.440 1.99 101.2 103.6 8 102.7 0.537 2.01 101.2 104.1 9 101.7 0.447 1.99 100.5 102.9 10 100.9 0.628 2.04 99.2 102.6 11 95.9 0.833 2.11 93.7 98.2 12 94.7 0.807 2.10 92.5 96.9 13 95.9 0.677 2.06 94.0 97.7 14 99.1 0.459 1.99 97.8 100.3 15 104.2 0.572 2.02 102.7 105.8 16 103.8 0.509 2.01 102.4 105.2 17 104.8 0.877 2.13 102.4 107.2 18 101.8 0.478 2.00 100.5 103.1 19 103.3 0.604 2.03 101.6 104.9 20 106.1 1.102 2.23 103.1 109.1 > > print( predict( fitols5, se.fit = TRUE, interval = "prediction", + level = 0.9, newdata = predictData ) ) demand.pred demand.se.fit demand.lwr demand.upr supply.pred supply.se.fit 1 104 0.714 100.0 107 96.4 0.712 2 106 0.748 102.5 110 97.7 0.591 3 106 0.753 102.4 109 97.9 0.602 4 106 0.756 102.6 110 98.1 0.565 5 109 1.055 104.8 112 100.7 0.900 6 108 1.013 104.7 112 100.5 0.811 7 109 1.029 105.2 113 100.5 0.722 8 109 1.055 105.7 113 102.5 0.703 9 108 1.042 104.1 112 101.1 0.952 10 107 1.148 102.8 110 98.5 1.136 11 101 1.026 97.6 105 94.0 1.245 12 100 0.800 96.7 104 92.1 1.347 13 102 0.606 98.4 105 93.7 1.170 14 105 0.820 101.5 109 96.0 1.034 15 111 1.272 106.6 114 101.2 1.031 16 110 1.191 106.4 114 102.7 0.925 17 111 1.513 106.5 115 102.5 1.529 18 108 0.963 104.8 112 101.0 0.720 19 110 1.129 106.4 114 100.8 0.717 20 114 1.601 109.5 118 103.4 0.562 supply.lwr supply.upr 1 92.1 100.7 2 93.4 102.0 3 93.6 102.1 4 93.9 102.4 5 96.3 105.1 6 96.2 104.9 7 96.1 104.8 8 98.2 106.8 9 96.7 105.6 10 93.9 103.0 11 89.4 98.7 12 87.4 96.8 13 89.1 98.2 14 91.5 100.5 15 96.7 105.7 16 98.3 107.2 17 97.6 107.4 18 96.7 105.4 19 96.5 105.1 20 99.1 107.6 > print( predict( fitols5$eq[[ 2 ]], se.fit = TRUE, interval = "prediction", + level = 0.9, newdata = predictData ) ) fit se.fit lwr upr 1 96.4 0.712 92.1 100.7 2 97.7 0.591 93.4 102.0 3 97.9 0.602 93.6 102.1 4 98.1 0.565 93.9 102.4 5 100.7 0.900 96.3 105.1 6 100.5 0.811 96.2 104.9 7 100.5 0.722 96.1 104.8 8 102.5 0.703 98.2 106.8 9 101.1 0.952 96.7 105.6 10 98.5 1.136 93.9 103.0 11 94.0 1.245 89.4 98.7 12 92.1 1.347 87.4 96.8 13 93.7 1.170 89.1 98.2 14 96.0 1.034 91.5 100.5 15 101.2 1.031 96.7 105.7 16 102.7 0.925 98.3 107.2 17 102.5 1.529 97.6 107.4 18 101.0 0.720 96.7 105.4 19 100.8 0.717 96.5 105.1 20 103.4 0.562 99.1 107.6 > > # predict just one observation > smallData <- data.frame( price = 130, income = 150, farmPrice = 120, + trend = 25 ) > > print( predict( fitols1, newdata = smallData ) ) demand.pred supply.pred 1 109 115 > print( predict( fitols1$eq[[ 1 ]], newdata = smallData ) ) fit 1 109 > > print( predict( fitols2r, se.fit = TRUE, level = 0.9, + newdata = smallData ) ) demand.pred demand.se.fit supply.pred supply.se.fit 1 109 2.48 116 2.8 > print( predict( fitols2r$eq[[ 1 ]], se.pred = TRUE, level = 0.99, + newdata = smallData ) ) fit se.pred 1 109 3.15 > > print( predict( fitols3s, interval = "prediction", level = 0.975, + newdata = smallData ) ) demand.pred demand.lwr demand.upr supply.pred supply.lwr supply.upr 1 109 101 116 116 107 126 > print( predict( fitols3s$eq[[ 1 ]], interval = "confidence", level = 0.8, + newdata = smallData ) ) fit lwr upr 1 109 105 112 > > print( predict( fitols4rs, se.fit = TRUE, interval = "confidence", + level = 0.999, newdata = smallData ) ) demand.pred demand.se.fit demand.lwr demand.upr supply.pred supply.se.fit 1 108 2.02 101 115 117 2.02 supply.lwr supply.upr 1 110 124 > print( predict( fitols4rs$eq[[ 2 ]], se.pred = TRUE, interval = "prediction", + level = 0.75, newdata = smallData ) ) fit se.pred lwr upr 1 117 3.18 113 121 > > print( predict( fitols5, se.fit = TRUE, interval = "prediction", + newdata = smallData ) ) demand.pred demand.se.fit demand.lwr demand.upr supply.pred supply.se.fit 1 108 2.18 102 114 117 2.01 supply.lwr supply.upr 1 111 124 > print( predict( fitols5$eq[[ 1 ]], se.pred = TRUE, interval = "confidence", + newdata = smallData ) ) fit se.pred lwr upr 1 108 2.92 104 113 > > print( predict( fitols5rs, se.fit = TRUE, se.pred = TRUE, + interval = "prediction", level = 0.5, newdata = smallData ) ) demand.pred demand.se.fit demand.se.pred demand.lwr demand.upr supply.pred 1 108 2.02 2.8 106 110 117 supply.se.fit supply.se.pred supply.lwr supply.upr 1 2.02 3.18 115 119 > print( predict( fitols5rs$eq[[ 1 ]], se.fit = TRUE, se.pred = TRUE, + interval = "confidence", level = 0.25, newdata = smallData ) ) fit se.fit se.pred lwr upr 1 108 2.02 2.8 107 109 > > > ## ************ correlation of predicted values *************** > print( correlation.systemfit( fitols1, 1, 2 ) ) [,1] [1,] 0 [2,] 0 [3,] 0 [4,] 0 [5,] 0 [6,] 0 [7,] 0 [8,] 0 [9,] 0 [10,] 0 [11,] 0 [12,] 0 [13,] 0 [14,] 0 [15,] 0 [16,] 0 [17,] 0 [18,] 0 [19,] 0 [20,] 0 > > print( correlation.systemfit( fitols2r, 2, 1 ) ) [,1] [1,] 0.443122 [2,] 0.160426 [3,] 0.161091 [4,] 0.118312 [5,] -0.077411 [6,] -0.059235 [7,] -0.057777 [8,] -0.006908 [9,] -0.000372 [10,] -0.001410 [11,] 0.055233 [12,] 0.074936 [13,] 0.028274 [14,] -0.032082 [15,] 0.196029 [16,] 0.279921 [17,] 0.115570 [18,] 0.080620 [19,] 0.171681 [20,] 0.150544 > > print( correlation.systemfit( fitols3s, 1, 2 ) ) [,1] [1,] 0.405901 [2,] 0.145364 [3,] 0.145375 [4,] 0.105835 [5,] -0.067958 [6,] -0.052026 [7,] -0.050543 [8,] -0.006031 [9,] -0.000326 [10,] -0.001237 [11,] 0.047534 [12,] 0.063493 [13,] 0.024060 [14,] -0.027910 [15,] 0.171580 [16,] 0.248212 [17,] 0.101409 [18,] 0.073084 [19,] 0.153950 [20,] 0.132944 > > print( correlation.systemfit( fitols4rs, 2, 1 ) ) [,1] [1,] 0.38162 [2,] 0.29173 [3,] 0.25421 [4,] 0.28598 [5,] -0.02775 [6,] -0.04974 [7,] -0.05850 [8,] 0.09388 [9,] 0.09469 [10,] 0.43814 [11,] 0.10559 [12,] 0.00876 [13,] 0.04090 [14,] -0.03984 [15,] 0.40767 [16,] 0.24571 [17,] 0.64160 [18,] 0.24037 [19,] 0.34075 [20,] 0.54270 > > print( correlation.systemfit( fitols5, 1, 2 ) ) [,1] [1,] 0.4051 [2,] 0.2729 [3,] 0.2415 [4,] 0.2693 [5,] -0.0301 [6,] -0.0527 [7,] -0.0624 [8,] 0.0971 [9,] 0.0945 [10,] 0.4365 [11,] 0.1258 [12,] 0.0210 [13,] 0.0436 [14,] -0.0405 [15,] 0.4102 [16,] 0.2610 [17,] 0.6400 [18,] 0.2661 [19,] 0.3796 [20,] 0.5742 > > > ## ************ Log-Likelihood values *************** > print( logLik( fitols1 ) ) 'log Lik.' -67.8 (df=8) > print( logLik( fitols1, residCovDiag = TRUE ) ) 'log Lik.' -83.6 (df=8) > all.equal( logLik( fitols1, residCovDiag = TRUE ), + logLik( lmDemand ) + logLik( lmSupply ), + check.attributes = FALSE ) [1] TRUE > > print( logLik( fitols2r ) ) 'log Lik.' -62 (df=7) > print( logLik( fitols2r, residCovDiag = TRUE ) ) 'log Lik.' -84 (df=7) > > print( logLik( fitols3s ) ) 'log Lik.' -62 (df=7) > print( logLik( fitols3s, residCovDiag = TRUE ) ) 'log Lik.' -84 (df=7) > > print( logLik( fitols4rs ) ) 'log Lik.' -62.8 (df=6) > print( logLik( fitols4rs, residCovDiag = TRUE ) ) 'log Lik.' -84.1 (df=6) > > print( logLik( fitols5 ) ) 'log Lik.' -62.8 (df=6) > print( logLik( fitols5, residCovDiag = TRUE ) ) 'log Lik.' -84.1 (df=6) > > > ## ************** F tests **************** > # testing first restriction > print( linearHypothesis( fitols1, restrm ) ) Linear hypothesis test (Theil's F test) Hypothesis: demand_income - supply_trend = 0 Model 1: restricted model Model 2: fitols1 Res.Df Df F Pr(>F) 1 34 2 33 1 0.14 0.71 > linearHypothesis( fitols1, restrict ) Linear hypothesis test (Theil's F test) Hypothesis: demand_income - supply_trend = 0 Model 1: restricted model Model 2: fitols1 Res.Df Df F Pr(>F) 1 34 2 33 1 0.14 0.71 > > print( linearHypothesis( fitols1s, restrm ) ) Linear hypothesis test (Theil's F test) Hypothesis: demand_income - supply_trend = 0 Model 1: restricted model Model 2: fitols1s Res.Df Df F Pr(>F) 1 34 2 33 1 0.15 0.7 > linearHypothesis( fitols1s, restrict ) Linear hypothesis test (Theil's F test) Hypothesis: demand_income - supply_trend = 0 Model 1: restricted model Model 2: fitols1s Res.Df Df F Pr(>F) 1 34 2 33 1 0.15 0.7 > > print( linearHypothesis( fitols1, restrm ) ) Linear hypothesis test (Theil's F test) Hypothesis: demand_income - supply_trend = 0 Model 1: restricted model Model 2: fitols1 Res.Df Df F Pr(>F) 1 34 2 33 1 0.14 0.71 > linearHypothesis( fitols1, restrict ) Linear hypothesis test (Theil's F test) Hypothesis: demand_income - supply_trend = 0 Model 1: restricted model Model 2: fitols1 Res.Df Df F Pr(>F) 1 34 2 33 1 0.14 0.71 > > print( linearHypothesis( fitols1r, restrm ) ) Linear hypothesis test (Theil's F test) Hypothesis: demand_income - supply_trend = 0 Model 1: restricted model Model 2: fitols1r Res.Df Df F Pr(>F) 1 34 2 33 1 0.14 0.71 > linearHypothesis( fitols1r, restrict ) Linear hypothesis test (Theil's F test) Hypothesis: demand_income - supply_trend = 0 Model 1: restricted model Model 2: fitols1r Res.Df Df F Pr(>F) 1 34 2 33 1 0.14 0.71 > > # testing second restriction > restrOnly2m <- matrix(0,1,7) > restrOnly2q <- 0.5 > restrOnly2m[1,2] <- -1 > restrOnly2m[1,5] <- 1 > restrictOnly2 <- "- demand_price + supply_price = 0.5" > # first restriction not imposed > print( linearHypothesis( fitols1, restrOnly2m, restrOnly2q ) ) Linear hypothesis test (Theil's F test) Hypothesis: - demand_price + supply_price = 0.5 Model 1: restricted model Model 2: fitols1 Res.Df Df F Pr(>F) 1 34 2 33 1 0.01 0.94 > linearHypothesis( fitols1, restrictOnly2 ) Linear hypothesis test (Theil's F test) Hypothesis: - demand_price + supply_price = 0.5 Model 1: restricted model Model 2: fitols1 Res.Df Df F Pr(>F) 1 34 2 33 1 0.01 0.94 > > # first restriction imposed > print( linearHypothesis( fitols2, restrOnly2m, restrOnly2q ) ) Linear hypothesis test (Theil's F test) Hypothesis: - demand_price + supply_price = 0.5 Model 1: restricted model Model 2: fitols2 Res.Df Df F Pr(>F) 1 35 2 34 1 0.02 0.88 > linearHypothesis( fitols2, restrictOnly2 ) Linear hypothesis test (Theil's F test) Hypothesis: - demand_price + supply_price = 0.5 Model 1: restricted model Model 2: fitols2 Res.Df Df F Pr(>F) 1 35 2 34 1 0.02 0.88 > > print( linearHypothesis( fitols3, restrOnly2m, restrOnly2q ) ) Linear hypothesis test (Theil's F test) Hypothesis: - demand_price + supply_price = 0.5 Model 1: restricted model Model 2: fitols3 Res.Df Df F Pr(>F) 1 35 2 34 1 0.02 0.88 > linearHypothesis( fitols3, restrictOnly2 ) Linear hypothesis test (Theil's F test) Hypothesis: - demand_price + supply_price = 0.5 Model 1: restricted model Model 2: fitols3 Res.Df Df F Pr(>F) 1 35 2 34 1 0.02 0.88 > > # testing both of the restrictions > print( linearHypothesis( fitols1, restr2m, restr2q ) ) Linear hypothesis test (Theil's F test) Hypothesis: demand_income - supply_trend = 0 - demand_price + supply_price = 0.5 Model 1: restricted model Model 2: fitols1 Res.Df Df F Pr(>F) 1 35 2 33 2 0.08 0.93 > linearHypothesis( fitols1, restrict2 ) Linear hypothesis test (Theil's F test) Hypothesis: demand_income - supply_trend = 0 - demand_price + supply_price = 0.5 Model 1: restricted model Model 2: fitols1 Res.Df Df F Pr(>F) 1 35 2 33 2 0.08 0.93 > > > ## ************** Wald tests **************** > # testing first restriction > print( linearHypothesis( fitols1, restrm, test = "Chisq" ) ) Linear hypothesis test (Chi^2 statistic of a Wald test) Hypothesis: demand_income - supply_trend = 0 Model 1: restricted model Model 2: fitols1 Res.Df Df Chisq Pr(>Chisq) 1 34 2 33 1 0.64 0.42 > linearHypothesis( fitols1, restrict, test = "Chisq" ) Linear hypothesis test (Chi^2 statistic of a Wald test) Hypothesis: demand_income - supply_trend = 0 Model 1: restricted model Model 2: fitols1 Res.Df Df Chisq Pr(>Chisq) 1 34 2 33 1 0.64 0.42 > > print( linearHypothesis( fitols1s, restrm, test = "Chisq" ) ) Linear hypothesis test (Chi^2 statistic of a Wald test) Hypothesis: demand_income - supply_trend = 0 Model 1: restricted model Model 2: fitols1s Res.Df Df Chisq Pr(>Chisq) 1 34 2 33 1 0.72 0.4 > linearHypothesis( fitols1s, restrict, test = "Chisq" ) Linear hypothesis test (Chi^2 statistic of a Wald test) Hypothesis: demand_income - supply_trend = 0 Model 1: restricted model Model 2: fitols1s Res.Df Df Chisq Pr(>Chisq) 1 34 2 33 1 0.72 0.4 > > print( linearHypothesis( fitols1, restrm, test = "Chisq" ) ) Linear hypothesis test (Chi^2 statistic of a Wald test) Hypothesis: demand_income - supply_trend = 0 Model 1: restricted model Model 2: fitols1 Res.Df Df Chisq Pr(>Chisq) 1 34 2 33 1 0.64 0.42 > linearHypothesis( fitols1, restrict, test = "Chisq" ) Linear hypothesis test (Chi^2 statistic of a Wald test) Hypothesis: demand_income - supply_trend = 0 Model 1: restricted model Model 2: fitols1 Res.Df Df Chisq Pr(>Chisq) 1 34 2 33 1 0.64 0.42 > > print( linearHypothesis( fitols1r, restrm, test = "Chisq" ) ) Linear hypothesis test (Chi^2 statistic of a Wald test) Hypothesis: demand_income - supply_trend = 0 Model 1: restricted model Model 2: fitols1r Res.Df Df Chisq Pr(>Chisq) 1 34 2 33 1 0.64 0.42 > linearHypothesis( fitols1r, restrict, test = "Chisq" ) Linear hypothesis test (Chi^2 statistic of a Wald test) Hypothesis: demand_income - supply_trend = 0 Model 1: restricted model Model 2: fitols1r Res.Df Df Chisq Pr(>Chisq) 1 34 2 33 1 0.64 0.42 > > # testing second restriction > # first restriction not imposed > print( linearHypothesis( fitols1, restrOnly2m, restrOnly2q, test = "Chisq" ) ) Linear hypothesis test (Chi^2 statistic of a Wald test) Hypothesis: - demand_price + supply_price = 0.5 Model 1: restricted model Model 2: fitols1 Res.Df Df Chisq Pr(>Chisq) 1 34 2 33 1 0.03 0.86 > linearHypothesis( fitols1, restrictOnly2, test = "Chisq" ) Linear hypothesis test (Chi^2 statistic of a Wald test) Hypothesis: - demand_price + supply_price = 0.5 Model 1: restricted model Model 2: fitols1 Res.Df Df Chisq Pr(>Chisq) 1 34 2 33 1 0.03 0.86 > # first restriction imposed > print( linearHypothesis( fitols2, restrOnly2m, restrOnly2q, test = "Chisq" ) ) Linear hypothesis test (Chi^2 statistic of a Wald test) Hypothesis: - demand_price + supply_price = 0.5 Model 1: restricted model Model 2: fitols2 Res.Df Df Chisq Pr(>Chisq) 1 35 2 34 1 0.12 0.73 > linearHypothesis( fitols2, restrictOnly2, test = "Chisq" ) Linear hypothesis test (Chi^2 statistic of a Wald test) Hypothesis: - demand_price + supply_price = 0.5 Model 1: restricted model Model 2: fitols2 Res.Df Df Chisq Pr(>Chisq) 1 35 2 34 1 0.12 0.73 > > print( linearHypothesis( fitols3, restrOnly2m, restrOnly2q, test = "Chisq" ) ) Linear hypothesis test (Chi^2 statistic of a Wald test) Hypothesis: - demand_price + supply_price = 0.5 Model 1: restricted model Model 2: fitols3 Res.Df Df Chisq Pr(>Chisq) 1 35 2 34 1 0.12 0.73 > linearHypothesis( fitols3, restrictOnly2, test = "Chisq" ) Linear hypothesis test (Chi^2 statistic of a Wald test) Hypothesis: - demand_price + supply_price = 0.5 Model 1: restricted model Model 2: fitols3 Res.Df Df Chisq Pr(>Chisq) 1 35 2 34 1 0.12 0.73 > > # testing both of the restrictions > print( linearHypothesis( fitols1, restr2m, restr2q, test = "Chisq" ) ) Linear hypothesis test (Chi^2 statistic of a Wald test) Hypothesis: demand_income - supply_trend = 0 - demand_price + supply_price = 0.5 Model 1: restricted model Model 2: fitols1 Res.Df Df Chisq Pr(>Chisq) 1 35 2 33 2 0.72 0.7 > linearHypothesis( fitols1, restrict2, test = "Chisq" ) Linear hypothesis test (Chi^2 statistic of a Wald test) Hypothesis: demand_income - supply_trend = 0 - demand_price + supply_price = 0.5 Model 1: restricted model Model 2: fitols1 Res.Df Df Chisq Pr(>Chisq) 1 35 2 33 2 0.72 0.7 > > > ## ****************** model frame ************************** > print( mf <- model.frame( fitols1 ) ) consump price income farmPrice trend 1 98.5 100.3 87.4 98.0 1 2 99.2 104.3 97.6 99.1 2 3 102.2 103.4 96.7 99.1 3 4 101.5 104.5 98.2 98.1 4 5 104.2 98.0 99.8 110.8 5 6 103.2 99.5 100.5 108.2 6 7 104.0 101.1 103.2 105.6 7 8 99.9 104.8 107.8 109.8 8 9 100.3 96.4 96.6 108.7 9 10 102.8 91.2 88.9 100.6 10 11 95.4 93.1 75.1 81.0 11 12 92.4 98.8 76.9 68.6 12 13 94.5 102.9 84.6 70.9 13 14 98.8 98.8 90.6 81.4 14 15 105.8 95.1 103.1 102.3 15 16 100.2 98.5 105.1 105.0 16 17 103.5 86.5 96.4 110.5 17 18 99.9 104.0 104.4 92.5 18 19 105.2 105.8 110.7 89.3 19 20 106.2 113.5 127.1 93.0 20 > print( mf1 <- model.frame( fitols1$eq[[ 1 ]] ) ) consump price income 1 98.5 100.3 87.4 2 99.2 104.3 97.6 3 102.2 103.4 96.7 4 101.5 104.5 98.2 5 104.2 98.0 99.8 6 103.2 99.5 100.5 7 104.0 101.1 103.2 8 99.9 104.8 107.8 9 100.3 96.4 96.6 10 102.8 91.2 88.9 11 95.4 93.1 75.1 12 92.4 98.8 76.9 13 94.5 102.9 84.6 14 98.8 98.8 90.6 15 105.8 95.1 103.1 16 100.2 98.5 105.1 17 103.5 86.5 96.4 18 99.9 104.0 104.4 19 105.2 105.8 110.7 20 106.2 113.5 127.1 > print( attributes( mf1 )$terms ) consump ~ price + income attr(,"variables") list(consump, price, income) attr(,"factors") price income consump 0 0 price 1 0 income 0 1 attr(,"term.labels") [1] "price" "income" attr(,"order") [1] 1 1 attr(,"intercept") [1] 1 attr(,"response") [1] 1 attr(,".Environment") attr(,"predvars") list(consump, price, income) attr(,"dataClasses") consump price income "numeric" "numeric" "numeric" > print( mf2 <- model.frame( fitols1$eq[[ 2 ]] ) ) consump price farmPrice trend 1 98.5 100.3 98.0 1 2 99.2 104.3 99.1 2 3 102.2 103.4 99.1 3 4 101.5 104.5 98.1 4 5 104.2 98.0 110.8 5 6 103.2 99.5 108.2 6 7 104.0 101.1 105.6 7 8 99.9 104.8 109.8 8 9 100.3 96.4 108.7 9 10 102.8 91.2 100.6 10 11 95.4 93.1 81.0 11 12 92.4 98.8 68.6 12 13 94.5 102.9 70.9 13 14 98.8 98.8 81.4 14 15 105.8 95.1 102.3 15 16 100.2 98.5 105.0 16 17 103.5 86.5 110.5 17 18 99.9 104.0 92.5 18 19 105.2 105.8 89.3 19 20 106.2 113.5 93.0 20 > print( attributes( mf2 )$terms ) consump ~ price + farmPrice + trend attr(,"variables") list(consump, price, farmPrice, trend) attr(,"factors") price farmPrice trend consump 0 0 0 price 1 0 0 farmPrice 0 1 0 trend 0 0 1 attr(,"term.labels") [1] "price" "farmPrice" "trend" attr(,"order") [1] 1 1 1 attr(,"intercept") [1] 1 attr(,"response") [1] 1 attr(,".Environment") attr(,"predvars") list(consump, price, farmPrice, trend) attr(,"dataClasses") consump price farmPrice trend "numeric" "numeric" "numeric" "numeric" > > print( all.equal( mf, model.frame( fitols2r ) ) ) [1] TRUE > print( all.equal( mf1, model.frame( fitols2r$eq[[ 1 ]] ) ) ) [1] TRUE > > print( all.equal( mf, model.frame( fitols3s ) ) ) [1] TRUE > print( all.equal( mf2, model.frame( fitols3s$eq[[ 2 ]] ) ) ) [1] TRUE > > print( all.equal( mf, model.frame( fitols4rs ) ) ) [1] TRUE > print( all.equal( mf1, model.frame( fitols4rs$eq[[ 1 ]] ) ) ) [1] TRUE > > print( all.equal( mf, model.frame( fitols5 ) ) ) [1] TRUE > print( all.equal( mf2, model.frame( fitols5$eq[[ 2 ]] ) ) ) [1] TRUE > > > ## **************** model matrix ************************ > # with x (returnModelMatrix) = TRUE > print( !is.null( fitols1r$eq[[ 1 ]]$x ) ) [1] TRUE > print( mm <- model.matrix( fitols1r ) ) demand_(Intercept) demand_price demand_income supply_(Intercept) demand_1 1 100.3 87.4 0 demand_2 1 104.3 97.6 0 demand_3 1 103.4 96.7 0 demand_4 1 104.5 98.2 0 demand_5 1 98.0 99.8 0 demand_6 1 99.5 100.5 0 demand_7 1 101.1 103.2 0 demand_8 1 104.8 107.8 0 demand_9 1 96.4 96.6 0 demand_10 1 91.2 88.9 0 demand_11 1 93.1 75.1 0 demand_12 1 98.8 76.9 0 demand_13 1 102.9 84.6 0 demand_14 1 98.8 90.6 0 demand_15 1 95.1 103.1 0 demand_16 1 98.5 105.1 0 demand_17 1 86.5 96.4 0 demand_18 1 104.0 104.4 0 demand_19 1 105.8 110.7 0 demand_20 1 113.5 127.1 0 supply_1 0 0.0 0.0 1 supply_2 0 0.0 0.0 1 supply_3 0 0.0 0.0 1 supply_4 0 0.0 0.0 1 supply_5 0 0.0 0.0 1 supply_6 0 0.0 0.0 1 supply_7 0 0.0 0.0 1 supply_8 0 0.0 0.0 1 supply_9 0 0.0 0.0 1 supply_10 0 0.0 0.0 1 supply_11 0 0.0 0.0 1 supply_12 0 0.0 0.0 1 supply_13 0 0.0 0.0 1 supply_14 0 0.0 0.0 1 supply_15 0 0.0 0.0 1 supply_16 0 0.0 0.0 1 supply_17 0 0.0 0.0 1 supply_18 0 0.0 0.0 1 supply_19 0 0.0 0.0 1 supply_20 0 0.0 0.0 1 supply_price supply_farmPrice supply_trend demand_1 0.0 0.0 0 demand_2 0.0 0.0 0 demand_3 0.0 0.0 0 demand_4 0.0 0.0 0 demand_5 0.0 0.0 0 demand_6 0.0 0.0 0 demand_7 0.0 0.0 0 demand_8 0.0 0.0 0 demand_9 0.0 0.0 0 demand_10 0.0 0.0 0 demand_11 0.0 0.0 0 demand_12 0.0 0.0 0 demand_13 0.0 0.0 0 demand_14 0.0 0.0 0 demand_15 0.0 0.0 0 demand_16 0.0 0.0 0 demand_17 0.0 0.0 0 demand_18 0.0 0.0 0 demand_19 0.0 0.0 0 demand_20 0.0 0.0 0 supply_1 100.3 98.0 1 supply_2 104.3 99.1 2 supply_3 103.4 99.1 3 supply_4 104.5 98.1 4 supply_5 98.0 110.8 5 supply_6 99.5 108.2 6 supply_7 101.1 105.6 7 supply_8 104.8 109.8 8 supply_9 96.4 108.7 9 supply_10 91.2 100.6 10 supply_11 93.1 81.0 11 supply_12 98.8 68.6 12 supply_13 102.9 70.9 13 supply_14 98.8 81.4 14 supply_15 95.1 102.3 15 supply_16 98.5 105.0 16 supply_17 86.5 110.5 17 supply_18 104.0 92.5 18 supply_19 105.8 89.3 19 supply_20 113.5 93.0 20 > print( mm1 <- model.matrix( fitols1r$eq[[ 1 ]] ) ) (Intercept) price income 1 1 100.3 87.4 2 1 104.3 97.6 3 1 103.4 96.7 4 1 104.5 98.2 5 1 98.0 99.8 6 1 99.5 100.5 7 1 101.1 103.2 8 1 104.8 107.8 9 1 96.4 96.6 10 1 91.2 88.9 11 1 93.1 75.1 12 1 98.8 76.9 13 1 102.9 84.6 14 1 98.8 90.6 15 1 95.1 103.1 16 1 98.5 105.1 17 1 86.5 96.4 18 1 104.0 104.4 19 1 105.8 110.7 20 1 113.5 127.1 attr(,"assign") [1] 0 1 2 > print( mm2 <- model.matrix( fitols1r$eq[[ 2 ]] ) ) (Intercept) price farmPrice trend 1 1 100.3 98.0 1 2 1 104.3 99.1 2 3 1 103.4 99.1 3 4 1 104.5 98.1 4 5 1 98.0 110.8 5 6 1 99.5 108.2 6 7 1 101.1 105.6 7 8 1 104.8 109.8 8 9 1 96.4 108.7 9 10 1 91.2 100.6 10 11 1 93.1 81.0 11 12 1 98.8 68.6 12 13 1 102.9 70.9 13 14 1 98.8 81.4 14 15 1 95.1 102.3 15 16 1 98.5 105.0 16 17 1 86.5 110.5 17 18 1 104.0 92.5 18 19 1 105.8 89.3 19 20 1 113.5 93.0 20 attr(,"assign") [1] 0 1 2 3 > > # with x (returnModelMatrix) = FALSE > print( all.equal( mm, model.matrix( fitols1rs ) ) ) [1] TRUE > print( all.equal( mm1, model.matrix( fitols1rs$eq[[ 1 ]] ) ) ) [1] TRUE > print( all.equal( mm2, model.matrix( fitols1rs$eq[[ 2 ]] ) ) ) [1] TRUE > print( !is.null( fitols1rs$eq[[ 1 ]]$x ) ) [1] FALSE > > # with x (returnModelMatrix) = TRUE > print( !is.null( fitols2rs$eq[[ 1 ]]$x ) ) [1] TRUE > print( all.equal( mm, model.matrix( fitols2rs ) ) ) [1] TRUE > print( all.equal( mm1, model.matrix( fitols2rs$eq[[ 1 ]] ) ) ) [1] TRUE > print( all.equal( mm2, model.matrix( fitols2rs$eq[[ 2 ]] ) ) ) [1] TRUE > > # with x (returnModelMatrix) = FALSE > print( all.equal( mm, model.matrix( fitols2 ) ) ) [1] TRUE > print( all.equal( mm1, model.matrix( fitols2$eq[[ 1 ]] ) ) ) [1] TRUE > print( all.equal( mm2, model.matrix( fitols2$eq[[ 2 ]] ) ) ) [1] TRUE > print( !is.null( fitols2$eq[[ 1 ]]$x ) ) [1] FALSE > > # with x (returnModelMatrix) = TRUE > print( !is.null( fitols3$eq[[ 1 ]]$x ) ) [1] TRUE > print( all.equal( mm, model.matrix( fitols3 ) ) ) [1] TRUE > print( all.equal( mm1, model.matrix( fitols3$eq[[ 1 ]] ) ) ) [1] TRUE > print( all.equal( mm2, model.matrix( fitols3$eq[[ 2 ]] ) ) ) [1] TRUE > > # with x (returnModelMatrix) = FALSE > print( all.equal( mm, model.matrix( fitols3r ) ) ) [1] TRUE > print( all.equal( mm1, model.matrix( fitols3r$eq[[ 1 ]] ) ) ) [1] TRUE > print( all.equal( mm2, model.matrix( fitols3r$eq[[ 2 ]] ) ) ) [1] TRUE > print( !is.null( fitols3r$eq[[ 1 ]]$x ) ) [1] FALSE > > # with x (returnModelMatrix) = TRUE > print( !is.null( fitols4s$eq[[ 1 ]]$x ) ) [1] TRUE > print( all.equal( mm, model.matrix( fitols4s ) ) ) [1] TRUE > print( all.equal( mm1, model.matrix( fitols4s$eq[[ 1 ]] ) ) ) [1] TRUE > print( all.equal( mm2, model.matrix( fitols4s$eq[[ 2 ]] ) ) ) [1] TRUE > > # with x (returnModelMatrix) = FALSE > print( all.equal( mm, model.matrix( fitols4Sym ) ) ) [1] TRUE > print( all.equal( mm1, model.matrix( fitols4Sym$eq[[ 1 ]] ) ) ) [1] TRUE > print( all.equal( mm2, model.matrix( fitols4Sym$eq[[ 2 ]] ) ) ) [1] TRUE > print( !is.null( fitols4Sym$eq[[ 1 ]]$x ) ) [1] FALSE > > # with x (returnModelMatrix) = TRUE > print( !is.null( fitols5s$eq[[ 1 ]]$x ) ) [1] TRUE > print( all.equal( mm, model.matrix( fitols5s ) ) ) [1] TRUE > print( all.equal( mm1, model.matrix( fitols5s$eq[[ 1 ]] ) ) ) [1] TRUE > print( all.equal( mm2, model.matrix( fitols5s$eq[[ 2 ]] ) ) ) [1] TRUE > > # with x (returnModelMatrix) = FALSE > print( all.equal( mm, model.matrix( fitols5 ) ) ) [1] TRUE > print( all.equal( mm1, model.matrix( fitols5$eq[[ 1 ]] ) ) ) [1] TRUE > print( all.equal( mm2, model.matrix( fitols5$eq[[ 2 ]] ) ) ) [1] TRUE > print( !is.null( fitols5$eq[[ 1 ]]$x ) ) [1] FALSE > > try( model.matrix( fitols1, which = "z" ) ) Error in model.matrix.systemfit.equation(object$eq[[i]], which = which) : argument 'which' can only be set to "xHat" or "z" if instruments were used > > > ## **************** formulas ************************ > formula( fitols1 ) $demand consump ~ price + income $supply consump ~ price + farmPrice + trend > formula( fitols1$eq[[ 2 ]] ) consump ~ price + farmPrice + trend > > formula( fitols2r ) $demand consump ~ price + income $supply consump ~ price + farmPrice + trend > formula( fitols2r$eq[[ 1 ]] ) consump ~ price + income > > formula( fitols3s ) $demand consump ~ price + income $supply consump ~ price + farmPrice + trend > formula( fitols3s$eq[[ 2 ]] ) consump ~ price + farmPrice + trend > > formula( fitols4rs ) $demand consump ~ price + income $supply consump ~ price + farmPrice + trend > formula( fitols4rs$eq[[ 1 ]] ) consump ~ price + income > > formula( fitols5 ) $demand consump ~ price + income $supply consump ~ price + farmPrice + trend > formula( fitols5$eq[[ 2 ]] ) consump ~ price + farmPrice + trend > > > ## **************** model terms ******************* > terms( fitols1 ) $demand consump ~ price + income attr(,"variables") list(consump, price, income) attr(,"factors") price income consump 0 0 price 1 0 income 0 1 attr(,"term.labels") [1] "price" "income" attr(,"order") [1] 1 1 attr(,"intercept") [1] 1 attr(,"response") [1] 1 attr(,".Environment") attr(,"predvars") list(consump, price, income) attr(,"dataClasses") consump price income "numeric" "numeric" "numeric" $supply consump ~ price + farmPrice + trend attr(,"variables") list(consump, price, farmPrice, trend) attr(,"factors") price farmPrice trend consump 0 0 0 price 1 0 0 farmPrice 0 1 0 trend 0 0 1 attr(,"term.labels") [1] "price" "farmPrice" "trend" attr(,"order") [1] 1 1 1 attr(,"intercept") [1] 1 attr(,"response") [1] 1 attr(,".Environment") attr(,"predvars") list(consump, price, farmPrice, trend) attr(,"dataClasses") consump price farmPrice trend "numeric" "numeric" "numeric" "numeric" > terms( fitols1$eq[[ 2 ]] ) consump ~ price + farmPrice + trend attr(,"variables") list(consump, price, farmPrice, trend) attr(,"factors") price farmPrice trend consump 0 0 0 price 1 0 0 farmPrice 0 1 0 trend 0 0 1 attr(,"term.labels") [1] "price" "farmPrice" "trend" attr(,"order") [1] 1 1 1 attr(,"intercept") [1] 1 attr(,"response") [1] 1 attr(,".Environment") attr(,"predvars") list(consump, price, farmPrice, trend) attr(,"dataClasses") consump price farmPrice trend "numeric" "numeric" "numeric" "numeric" > > terms( fitols2r ) $demand consump ~ price + income attr(,"variables") list(consump, price, income) attr(,"factors") price income consump 0 0 price 1 0 income 0 1 attr(,"term.labels") [1] "price" "income" attr(,"order") [1] 1 1 attr(,"intercept") [1] 1 attr(,"response") [1] 1 attr(,".Environment") attr(,"predvars") list(consump, price, income) attr(,"dataClasses") consump price income "numeric" "numeric" "numeric" $supply consump ~ price + farmPrice + trend attr(,"variables") list(consump, price, farmPrice, trend) attr(,"factors") price farmPrice trend consump 0 0 0 price 1 0 0 farmPrice 0 1 0 trend 0 0 1 attr(,"term.labels") [1] "price" "farmPrice" "trend" attr(,"order") [1] 1 1 1 attr(,"intercept") [1] 1 attr(,"response") [1] 1 attr(,".Environment") attr(,"predvars") list(consump, price, farmPrice, trend) attr(,"dataClasses") consump price farmPrice trend "numeric" "numeric" "numeric" "numeric" > terms( fitols2r$eq[[ 1 ]] ) consump ~ price + income attr(,"variables") list(consump, price, income) attr(,"factors") price income consump 0 0 price 1 0 income 0 1 attr(,"term.labels") [1] "price" "income" attr(,"order") [1] 1 1 attr(,"intercept") [1] 1 attr(,"response") [1] 1 attr(,".Environment") attr(,"predvars") list(consump, price, income) attr(,"dataClasses") consump price income "numeric" "numeric" "numeric" > > terms( fitols3s ) $demand consump ~ price + income attr(,"variables") list(consump, price, income) attr(,"factors") price income consump 0 0 price 1 0 income 0 1 attr(,"term.labels") [1] "price" "income" attr(,"order") [1] 1 1 attr(,"intercept") [1] 1 attr(,"response") [1] 1 attr(,".Environment") attr(,"predvars") list(consump, price, income) attr(,"dataClasses") consump price income "numeric" "numeric" "numeric" $supply consump ~ price + farmPrice + trend attr(,"variables") list(consump, price, farmPrice, trend) attr(,"factors") price farmPrice trend consump 0 0 0 price 1 0 0 farmPrice 0 1 0 trend 0 0 1 attr(,"term.labels") [1] "price" "farmPrice" "trend" attr(,"order") [1] 1 1 1 attr(,"intercept") [1] 1 attr(,"response") [1] 1 attr(,".Environment") attr(,"predvars") list(consump, price, farmPrice, trend) attr(,"dataClasses") consump price farmPrice trend "numeric" "numeric" "numeric" "numeric" > terms( fitols3s$eq[[ 2 ]] ) consump ~ price + farmPrice + trend attr(,"variables") list(consump, price, farmPrice, trend) attr(,"factors") price farmPrice trend consump 0 0 0 price 1 0 0 farmPrice 0 1 0 trend 0 0 1 attr(,"term.labels") [1] "price" "farmPrice" "trend" attr(,"order") [1] 1 1 1 attr(,"intercept") [1] 1 attr(,"response") [1] 1 attr(,".Environment") attr(,"predvars") list(consump, price, farmPrice, trend) attr(,"dataClasses") consump price farmPrice trend "numeric" "numeric" "numeric" "numeric" > > terms( fitols4rs ) $demand consump ~ price + income attr(,"variables") list(consump, price, income) attr(,"factors") price income consump 0 0 price 1 0 income 0 1 attr(,"term.labels") [1] "price" "income" attr(,"order") [1] 1 1 attr(,"intercept") [1] 1 attr(,"response") [1] 1 attr(,".Environment") attr(,"predvars") list(consump, price, income) attr(,"dataClasses") consump price income "numeric" "numeric" "numeric" $supply consump ~ price + farmPrice + trend attr(,"variables") list(consump, price, farmPrice, trend) attr(,"factors") price farmPrice trend consump 0 0 0 price 1 0 0 farmPrice 0 1 0 trend 0 0 1 attr(,"term.labels") [1] "price" "farmPrice" "trend" attr(,"order") [1] 1 1 1 attr(,"intercept") [1] 1 attr(,"response") [1] 1 attr(,".Environment") attr(,"predvars") list(consump, price, farmPrice, trend) attr(,"dataClasses") consump price farmPrice trend "numeric" "numeric" "numeric" "numeric" > terms( fitols4rs$eq[[ 1 ]] ) consump ~ price + income attr(,"variables") list(consump, price, income) attr(,"factors") price income consump 0 0 price 1 0 income 0 1 attr(,"term.labels") [1] "price" "income" attr(,"order") [1] 1 1 attr(,"intercept") [1] 1 attr(,"response") [1] 1 attr(,".Environment") attr(,"predvars") list(consump, price, income) attr(,"dataClasses") consump price income "numeric" "numeric" "numeric" > > terms( fitols5 ) $demand consump ~ price + income attr(,"variables") list(consump, price, income) attr(,"factors") price income consump 0 0 price 1 0 income 0 1 attr(,"term.labels") [1] "price" "income" attr(,"order") [1] 1 1 attr(,"intercept") [1] 1 attr(,"response") [1] 1 attr(,".Environment") attr(,"predvars") list(consump, price, income) attr(,"dataClasses") consump price income "numeric" "numeric" "numeric" $supply consump ~ price + farmPrice + trend attr(,"variables") list(consump, price, farmPrice, trend) attr(,"factors") price farmPrice trend consump 0 0 0 price 1 0 0 farmPrice 0 1 0 trend 0 0 1 attr(,"term.labels") [1] "price" "farmPrice" "trend" attr(,"order") [1] 1 1 1 attr(,"intercept") [1] 1 attr(,"response") [1] 1 attr(,".Environment") attr(,"predvars") list(consump, price, farmPrice, trend) attr(,"dataClasses") consump price farmPrice trend "numeric" "numeric" "numeric" "numeric" > terms( fitols5$eq[[ 2 ]] ) consump ~ price + farmPrice + trend attr(,"variables") list(consump, price, farmPrice, trend) attr(,"factors") price farmPrice trend consump 0 0 0 price 1 0 0 farmPrice 0 1 0 trend 0 0 1 attr(,"term.labels") [1] "price" "farmPrice" "trend" attr(,"order") [1] 1 1 1 attr(,"intercept") [1] 1 attr(,"response") [1] 1 attr(,".Environment") attr(,"predvars") list(consump, price, farmPrice, trend) attr(,"dataClasses") consump price farmPrice trend "numeric" "numeric" "numeric" "numeric" > > > ## **************** estfun ************************ > library( "sandwich" ) > > estfun( fitols1 ) demand_(Intercept) demand_price demand_income supply_(Intercept) demand_1 1.074 107.8 93.9 0.000 demand_2 -0.390 -40.7 -38.1 0.000 demand_3 2.625 271.5 253.8 0.000 demand_4 1.802 188.4 177.0 0.000 demand_5 1.946 190.7 194.2 0.000 demand_6 1.175 116.8 118.0 0.000 demand_7 1.530 154.7 157.9 0.000 demand_8 -2.933 -307.2 -316.1 0.000 demand_9 -1.365 -131.7 -131.9 0.000 demand_10 2.031 185.3 180.5 0.000 demand_11 -0.149 -13.9 -11.2 0.000 demand_12 -1.954 -193.1 -150.3 0.000 demand_13 -1.121 -115.4 -94.8 0.000 demand_14 -0.220 -21.7 -19.9 0.000 demand_15 1.487 141.4 153.3 0.000 demand_16 -3.701 -364.3 -388.9 0.000 demand_17 -1.273 -110.1 -122.7 0.000 demand_18 -2.002 -208.3 -209.0 0.000 demand_19 1.738 183.8 192.4 0.000 demand_20 -0.299 -33.9 -38.0 0.000 supply_1 0.000 0.0 0.0 -0.444 supply_2 0.000 0.0 0.0 -0.896 supply_3 0.000 0.0 0.0 1.965 supply_4 0.000 0.0 0.0 1.134 supply_5 0.000 0.0 0.0 1.514 supply_6 0.000 0.0 0.0 0.680 supply_7 0.000 0.0 0.0 1.569 supply_8 0.000 0.0 0.0 -4.407 supply_9 0.000 0.0 0.0 -2.599 supply_10 0.000 0.0 0.0 2.469 supply_11 0.000 0.0 0.0 -0.598 supply_12 0.000 0.0 0.0 -1.697 supply_13 0.000 0.0 0.0 -1.064 supply_14 0.000 0.0 0.0 0.970 supply_15 0.000 0.0 0.0 3.159 supply_16 0.000 0.0 0.0 -3.866 supply_17 0.000 0.0 0.0 -0.265 supply_18 0.000 0.0 0.0 -2.449 supply_19 0.000 0.0 0.0 3.110 supply_20 0.000 0.0 0.0 1.714 supply_price supply_farmPrice supply_trend demand_1 0.0 0.0 0.000 demand_2 0.0 0.0 0.000 demand_3 0.0 0.0 0.000 demand_4 0.0 0.0 0.000 demand_5 0.0 0.0 0.000 demand_6 0.0 0.0 0.000 demand_7 0.0 0.0 0.000 demand_8 0.0 0.0 0.000 demand_9 0.0 0.0 0.000 demand_10 0.0 0.0 0.000 demand_11 0.0 0.0 0.000 demand_12 0.0 0.0 0.000 demand_13 0.0 0.0 0.000 demand_14 0.0 0.0 0.000 demand_15 0.0 0.0 0.000 demand_16 0.0 0.0 0.000 demand_17 0.0 0.0 0.000 demand_18 0.0 0.0 0.000 demand_19 0.0 0.0 0.000 demand_20 0.0 0.0 0.000 supply_1 -44.6 -43.5 -0.444 supply_2 -93.4 -88.7 -1.791 supply_3 203.3 194.7 5.895 supply_4 118.5 111.3 4.537 supply_5 148.4 167.7 7.569 supply_6 67.7 73.6 4.082 supply_7 158.6 165.7 10.983 supply_8 -461.7 -483.9 -35.259 supply_9 -250.7 -282.5 -23.391 supply_10 225.3 248.4 24.694 supply_11 -55.7 -48.5 -6.581 supply_12 -167.7 -116.4 -20.369 supply_13 -109.5 -75.4 -13.832 supply_14 95.8 79.0 13.582 supply_15 300.5 323.2 47.386 supply_16 -380.6 -405.9 -61.848 supply_17 -22.9 -29.2 -4.500 supply_18 -254.7 -226.5 -44.080 supply_19 328.9 277.7 59.084 supply_20 194.5 159.4 34.282 > round( colSums( estfun( fitols1 ) ), digits = 7 ) demand_(Intercept) demand_price demand_income supply_(Intercept) 0 0 0 0 supply_price supply_farmPrice supply_trend 0 0 0 > > estfun( fitols1s ) demand_(Intercept) demand_price demand_income supply_(Intercept) demand_1 1.074 107.8 93.9 0.000 demand_2 -0.390 -40.7 -38.1 0.000 demand_3 2.625 271.5 253.8 0.000 demand_4 1.802 188.4 177.0 0.000 demand_5 1.946 190.7 194.2 0.000 demand_6 1.175 116.8 118.0 0.000 demand_7 1.530 154.7 157.9 0.000 demand_8 -2.933 -307.2 -316.1 0.000 demand_9 -1.365 -131.7 -131.9 0.000 demand_10 2.031 185.3 180.5 0.000 demand_11 -0.149 -13.9 -11.2 0.000 demand_12 -1.954 -193.1 -150.3 0.000 demand_13 -1.121 -115.4 -94.8 0.000 demand_14 -0.220 -21.7 -19.9 0.000 demand_15 1.487 141.4 153.3 0.000 demand_16 -3.701 -364.3 -388.9 0.000 demand_17 -1.273 -110.1 -122.7 0.000 demand_18 -2.002 -208.3 -209.0 0.000 demand_19 1.738 183.8 192.4 0.000 demand_20 -0.299 -33.9 -38.0 0.000 supply_1 0.000 0.0 0.0 -0.444 supply_2 0.000 0.0 0.0 -0.896 supply_3 0.000 0.0 0.0 1.965 supply_4 0.000 0.0 0.0 1.134 supply_5 0.000 0.0 0.0 1.514 supply_6 0.000 0.0 0.0 0.680 supply_7 0.000 0.0 0.0 1.569 supply_8 0.000 0.0 0.0 -4.407 supply_9 0.000 0.0 0.0 -2.599 supply_10 0.000 0.0 0.0 2.469 supply_11 0.000 0.0 0.0 -0.598 supply_12 0.000 0.0 0.0 -1.697 supply_13 0.000 0.0 0.0 -1.064 supply_14 0.000 0.0 0.0 0.970 supply_15 0.000 0.0 0.0 3.159 supply_16 0.000 0.0 0.0 -3.866 supply_17 0.000 0.0 0.0 -0.265 supply_18 0.000 0.0 0.0 -2.449 supply_19 0.000 0.0 0.0 3.110 supply_20 0.000 0.0 0.0 1.714 supply_price supply_farmPrice supply_trend demand_1 0.0 0.0 0.000 demand_2 0.0 0.0 0.000 demand_3 0.0 0.0 0.000 demand_4 0.0 0.0 0.000 demand_5 0.0 0.0 0.000 demand_6 0.0 0.0 0.000 demand_7 0.0 0.0 0.000 demand_8 0.0 0.0 0.000 demand_9 0.0 0.0 0.000 demand_10 0.0 0.0 0.000 demand_11 0.0 0.0 0.000 demand_12 0.0 0.0 0.000 demand_13 0.0 0.0 0.000 demand_14 0.0 0.0 0.000 demand_15 0.0 0.0 0.000 demand_16 0.0 0.0 0.000 demand_17 0.0 0.0 0.000 demand_18 0.0 0.0 0.000 demand_19 0.0 0.0 0.000 demand_20 0.0 0.0 0.000 supply_1 -44.6 -43.5 -0.444 supply_2 -93.4 -88.7 -1.791 supply_3 203.3 194.7 5.895 supply_4 118.5 111.3 4.537 supply_5 148.4 167.7 7.569 supply_6 67.7 73.6 4.082 supply_7 158.6 165.7 10.983 supply_8 -461.7 -483.9 -35.259 supply_9 -250.7 -282.5 -23.391 supply_10 225.3 248.4 24.694 supply_11 -55.7 -48.5 -6.581 supply_12 -167.7 -116.4 -20.369 supply_13 -109.5 -75.4 -13.832 supply_14 95.8 79.0 13.582 supply_15 300.5 323.2 47.386 supply_16 -380.6 -405.9 -61.848 supply_17 -22.9 -29.2 -4.500 supply_18 -254.7 -226.5 -44.080 supply_19 328.9 277.7 59.084 supply_20 194.5 159.4 34.282 > round( colSums( estfun( fitols1s ) ), digits = 7 ) demand_(Intercept) demand_price demand_income supply_(Intercept) 0 0 0 0 supply_price supply_farmPrice supply_trend 0 0 0 > > estfun( fitols1r ) demand_(Intercept) demand_price demand_income supply_(Intercept) demand_1 1.074 107.8 93.9 0.000 demand_2 -0.390 -40.7 -38.1 0.000 demand_3 2.625 271.5 253.8 0.000 demand_4 1.802 188.4 177.0 0.000 demand_5 1.946 190.7 194.2 0.000 demand_6 1.175 116.8 118.0 0.000 demand_7 1.530 154.7 157.9 0.000 demand_8 -2.933 -307.2 -316.1 0.000 demand_9 -1.365 -131.7 -131.9 0.000 demand_10 2.031 185.3 180.5 0.000 demand_11 -0.149 -13.9 -11.2 0.000 demand_12 -1.954 -193.1 -150.3 0.000 demand_13 -1.121 -115.4 -94.8 0.000 demand_14 -0.220 -21.7 -19.9 0.000 demand_15 1.487 141.4 153.3 0.000 demand_16 -3.701 -364.3 -388.9 0.000 demand_17 -1.273 -110.1 -122.7 0.000 demand_18 -2.002 -208.3 -209.0 0.000 demand_19 1.738 183.8 192.4 0.000 demand_20 -0.299 -33.9 -38.0 0.000 supply_1 0.000 0.0 0.0 -0.444 supply_2 0.000 0.0 0.0 -0.896 supply_3 0.000 0.0 0.0 1.965 supply_4 0.000 0.0 0.0 1.134 supply_5 0.000 0.0 0.0 1.514 supply_6 0.000 0.0 0.0 0.680 supply_7 0.000 0.0 0.0 1.569 supply_8 0.000 0.0 0.0 -4.407 supply_9 0.000 0.0 0.0 -2.599 supply_10 0.000 0.0 0.0 2.469 supply_11 0.000 0.0 0.0 -0.598 supply_12 0.000 0.0 0.0 -1.697 supply_13 0.000 0.0 0.0 -1.064 supply_14 0.000 0.0 0.0 0.970 supply_15 0.000 0.0 0.0 3.159 supply_16 0.000 0.0 0.0 -3.866 supply_17 0.000 0.0 0.0 -0.265 supply_18 0.000 0.0 0.0 -2.449 supply_19 0.000 0.0 0.0 3.110 supply_20 0.000 0.0 0.0 1.714 supply_price supply_farmPrice supply_trend demand_1 0.0 0.0 0.000 demand_2 0.0 0.0 0.000 demand_3 0.0 0.0 0.000 demand_4 0.0 0.0 0.000 demand_5 0.0 0.0 0.000 demand_6 0.0 0.0 0.000 demand_7 0.0 0.0 0.000 demand_8 0.0 0.0 0.000 demand_9 0.0 0.0 0.000 demand_10 0.0 0.0 0.000 demand_11 0.0 0.0 0.000 demand_12 0.0 0.0 0.000 demand_13 0.0 0.0 0.000 demand_14 0.0 0.0 0.000 demand_15 0.0 0.0 0.000 demand_16 0.0 0.0 0.000 demand_17 0.0 0.0 0.000 demand_18 0.0 0.0 0.000 demand_19 0.0 0.0 0.000 demand_20 0.0 0.0 0.000 supply_1 -44.6 -43.5 -0.444 supply_2 -93.4 -88.7 -1.791 supply_3 203.3 194.7 5.895 supply_4 118.5 111.3 4.537 supply_5 148.4 167.7 7.569 supply_6 67.7 73.6 4.082 supply_7 158.6 165.7 10.983 supply_8 -461.7 -483.9 -35.259 supply_9 -250.7 -282.5 -23.391 supply_10 225.3 248.4 24.694 supply_11 -55.7 -48.5 -6.581 supply_12 -167.7 -116.4 -20.369 supply_13 -109.5 -75.4 -13.832 supply_14 95.8 79.0 13.582 supply_15 300.5 323.2 47.386 supply_16 -380.6 -405.9 -61.848 supply_17 -22.9 -29.2 -4.500 supply_18 -254.7 -226.5 -44.080 supply_19 328.9 277.7 59.084 supply_20 194.5 159.4 34.282 > round( colSums( estfun( fitols1r ) ), digits = 7 ) demand_(Intercept) demand_price demand_income supply_(Intercept) 0 0 0 0 supply_price supply_farmPrice supply_trend 0 0 0 > > try( estfun( fitols2 ) ) Error in estfun.systemfit(fitols2) : returning the estimation function for models with restrictions has not yet been implemented. > > try( estfun( fitols2Sym ) ) Error in estfun.systemfit(fitols2Sym) : returning the estimation function for models with restrictions has not yet been implemented. > > try( estfun( fitols3s ) ) Error in estfun.systemfit(fitols3s) : returning the estimation function for models with restrictions has not yet been implemented. > > try( estfun( fitols4r ) ) Error in estfun.systemfit(fitols4r) : returning the estimation function for models with restrictions has not yet been implemented. > > try( estfun( fitols4Sym ) ) Error in estfun.systemfit(fitols4Sym) : returning the estimation function for models with restrictions has not yet been implemented. > > try( estfun( fitols5 ) ) Error in estfun.systemfit(fitols5) : returning the estimation function for models with restrictions has not yet been implemented. > > try( estfun( fitols5Sym ) ) Error in estfun.systemfit(fitols5Sym) : returning the estimation function for models with restrictions has not yet been implemented. > > > ## **************** bread ************************ > bread( fitols1 ) demand_(Intercept) demand_price demand_income demand_(Intercept) 607.086 -6.3865 0.3453 demand_price -6.386 0.0883 -0.0251 demand_income 0.345 -0.0251 0.0222 supply_(Intercept) 0.000 0.0000 0.0000 supply_price 0.000 0.0000 0.0000 supply_farmPrice 0.000 0.0000 0.0000 supply_trend 0.000 0.0000 0.0000 supply_(Intercept) supply_price supply_farmPrice demand_(Intercept) 0.00 0.00000 0.00000 demand_price 0.00 0.00000 0.00000 demand_income 0.00 0.00000 0.00000 supply_(Intercept) 908.63 -6.82866 -2.10469 supply_price -6.83 0.06226 0.00584 supply_farmPrice -2.10 0.00584 0.01475 supply_trend -1.93 0.00361 0.00910 supply_trend demand_(Intercept) 0.00000 demand_price 0.00000 demand_income 0.00000 supply_(Intercept) -1.93058 supply_price 0.00361 supply_farmPrice 0.00910 supply_trend 0.06576 > > bread( fitols1s ) demand_(Intercept) demand_price demand_income demand_(Intercept) 607.086 -6.3865 0.3453 demand_price -6.386 0.0883 -0.0251 demand_income 0.345 -0.0251 0.0222 supply_(Intercept) 0.000 0.0000 0.0000 supply_price 0.000 0.0000 0.0000 supply_farmPrice 0.000 0.0000 0.0000 supply_trend 0.000 0.0000 0.0000 supply_(Intercept) supply_price supply_farmPrice demand_(Intercept) 0.00 0.00000 0.00000 demand_price 0.00 0.00000 0.00000 demand_income 0.00 0.00000 0.00000 supply_(Intercept) 908.63 -6.82866 -2.10469 supply_price -6.83 0.06226 0.00584 supply_farmPrice -2.10 0.00584 0.01475 supply_trend -1.93 0.00361 0.00910 supply_trend demand_(Intercept) 0.00000 demand_price 0.00000 demand_income 0.00000 supply_(Intercept) -1.93058 supply_price 0.00361 supply_farmPrice 0.00910 supply_trend 0.06576 > > bread( fitols1r ) demand_(Intercept) demand_price demand_income demand_(Intercept) 607.086 -6.3865 0.3453 demand_price -6.386 0.0883 -0.0251 demand_income 0.345 -0.0251 0.0222 supply_(Intercept) 0.000 0.0000 0.0000 supply_price 0.000 0.0000 0.0000 supply_farmPrice 0.000 0.0000 0.0000 supply_trend 0.000 0.0000 0.0000 supply_(Intercept) supply_price supply_farmPrice demand_(Intercept) 0.00 0.00000 0.00000 demand_price 0.00 0.00000 0.00000 demand_income 0.00 0.00000 0.00000 supply_(Intercept) 908.63 -6.82866 -2.10469 supply_price -6.83 0.06226 0.00584 supply_farmPrice -2.10 0.00584 0.01475 supply_trend -1.93 0.00361 0.00910 supply_trend demand_(Intercept) 0.00000 demand_price 0.00000 demand_income 0.00000 supply_(Intercept) -1.93058 supply_price 0.00361 supply_farmPrice 0.00910 supply_trend 0.06576 > > try( bread( fitols2 ) ) Error in bread.systemfit(fitols2) : returning the 'bread' for models with restrictions has not yet been implemented. > > proc.time() user system elapsed 2.128 0.076 2.200 systemfit/tests/test_3sls.Rout.save0000644000176200001440000277753214305200077017223 0ustar liggesusers R version 4.2.1 (2022-06-23) -- "Funny-Looking Kid" Copyright (C) 2022 The R Foundation for Statistical Computing Platform: x86_64-pc-linux-gnu (64-bit) R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > library( systemfit ) Loading required package: Matrix Loading required package: car Loading required package: carData Loading required package: lmtest Loading required package: zoo Attaching package: 'zoo' The following objects are masked from 'package:base': as.Date, as.Date.numeric Please cite the 'systemfit' package as: Arne Henningsen and Jeff D. Hamann (2007). systemfit: A Package for Estimating Systems of Simultaneous Equations in R. Journal of Statistical Software 23(4), 1-40. http://www.jstatsoft.org/v23/i04/. If you have questions, suggestions, or comments regarding the 'systemfit' package, please use a forum or 'tracker' at systemfit's R-Forge site: https://r-forge.r-project.org/projects/systemfit/ > options( digits = 3 ) > > data( "Kmenta" ) > useMatrix <- FALSE > > demand <- consump ~ price + income > supply <- consump ~ price + farmPrice + trend > inst <- ~ income + farmPrice + trend > inst1 <- ~ income + farmPrice > instlist <- list( inst1, inst ) > system <- list( demand = demand, supply = supply ) > restrm <- matrix(0,1,7) # restriction matrix "R" > restrm[1,3] <- 1 > restrm[1,7] <- -1 > restrict <- "demand_income - supply_trend = 0" > restr2m <- matrix(0,2,7) # restriction matrix "R" 2 > restr2m[1,3] <- 1 > restr2m[1,7] <- -1 > restr2m[2,2] <- -1 > restr2m[2,5] <- 1 > restr2q <- c( 0, 0.5 ) # restriction vector "q" 2 > restrict2 <- c( "demand_income - supply_trend = 0", + "- demand_price + supply_price = 0.5" ) > tc <- matrix(0,7,6) > tc[1,1] <- 1 > tc[2,2] <- 1 > tc[3,3] <- 1 > tc[4,4] <- 1 > tc[5,5] <- 1 > tc[6,6] <- 1 > tc[7,3] <- 1 > restr3m <- matrix(0,1,6) # restriction matrix "R" 2 > restr3m[1,2] <- -1 > restr3m[1,5] <- 1 > restr3q <- c( 0.5 ) # restriction vector "q" 2 > restrict3 <- "- C2 + C5 = 0.5" > > > ## *************** 3SLS estimation ************************ > fit3sls <- list() > formulas <- c( "GLS", "IV", "Schmidt", "GMM", "EViews" ) > for( i in seq( along = formulas ) ) { + fit3sls[[ i ]] <- list() + + print( "***************************************************" ) + print( paste( "3SLS formula:", formulas[ i ] ) ) + print( "************* 3SLS *********************************" ) + fit3sls[[ i ]]$e1 <- systemfit( system, "3SLS", data = Kmenta, + inst = inst, method3sls = formulas[ i ], useMatrix = useMatrix ) + print( summary( fit3sls[[ i ]]$e1 ) ) + + print( "********************* 3SLS EViews-like *****************" ) + fit3sls[[ i ]]$e1e <- systemfit( system, "3SLS", data = Kmenta, + inst = inst, methodResidCov = "noDfCor", method3sls = formulas[ i ], + useMatrix = useMatrix ) + print( summary( fit3sls[[ i ]]$e1e, useDfSys = TRUE ) ) + + print( "********************* 3SLS with methodResidCov = Theil *****************" ) + fit3sls[[ i ]]$e1c <- systemfit( system, "3SLS", data = Kmenta, + inst = inst, methodResidCov = "Theil", method3sls = formulas[ i ], + x = TRUE, useMatrix = useMatrix ) + print( summary( fit3sls[[ i ]]$e1c, useDfSys = TRUE ) ) + + print( "*************** W3SLS with methodResidCov = Theil *****************" ) + fit3sls[[ i ]]$e1wc <- systemfit( system, "3SLS", data = Kmenta, + inst = inst, methodResidCov = "Theil", method3sls = formulas[ i ], + residCovWeighted = TRUE, useMatrix = useMatrix ) + print( summary( fit3sls[[ i ]]$e1wc, useDfSys = TRUE ) ) + + + print( "*************** 3SLS with restriction *****************" ) + fit3sls[[ i ]]$e2 <- systemfit( system, "3SLS", data = Kmenta, + inst = inst, restrict.matrix = restrm, method3sls = formulas[ i ], + x = TRUE, useMatrix = useMatrix ) + print( summary( fit3sls[[ i ]]$e2 ) ) + # the same with symbolically specified restrictions + fit3sls[[ i ]]$e2Sym <- systemfit( system, "3SLS", data = Kmenta, + inst = inst, restrict.matrix = restrict, method3sls = formulas[ i ], + x = TRUE, useMatrix = useMatrix ) + print( all.equal( fit3sls[[ i ]]$e2, fit3sls[[ i ]]$e2Sym ) ) + + print( "************** 3SLS with restriction (EViews-like) *****************" ) + fit3sls[[ i ]]$e2e <- systemfit( system, "3SLS", data = Kmenta, + inst = inst, methodResidCov = "noDfCor", restrict.matrix = restrm, + method3sls = formulas[ i ], useMatrix = useMatrix ) + print( summary( fit3sls[[ i ]]$e2e, useDfSys = TRUE ) ) + print( nobs( fit3sls[[i]]$e2e )) + + print( "*************** W3SLS with restriction *****************" ) + fit3sls[[ i ]]$e2w <- systemfit( system, "3SLS", data = Kmenta, + inst = inst, restrict.matrix = restrm, method3sls = formulas[ i ], + residCovWeighted = TRUE, useMatrix = useMatrix ) + print( summary( fit3sls[[ i ]]$e2w ) ) + + + print( "*************** 3SLS with restriction via restrict.regMat ********************" ) + fit3sls[[ i ]]$e3 <- systemfit( system, "3SLS", data = Kmenta, + inst = inst, restrict.regMat = tc, method3sls = formulas[ i ], + useMatrix = useMatrix ) + print( summary( fit3sls[[ i ]]$e3 ) ) + + print( "*************** 3SLS with restriction via restrict.regMat (EViews-like) *******" ) + fit3sls[[ i ]]$e3e <- systemfit( system, "3SLS", data = Kmenta, + inst = inst, methodResidCov = "noDfCor", restrict.regMat = tc, + method3sls = formulas[ i ], x = TRUE, + useMatrix = useMatrix ) + print( summary( fit3sls[[ i ]]$e3e, useDfSys = TRUE ) ) + + print( "**** W3SLS with restriction via restrict.regMat (EViews-like) ****" ) + fit3sls[[ i ]]$e3we <- systemfit( system, "3SLS", data = Kmenta, + inst = inst, methodResidCov = "noDfCor", restrict.regMat = tc, + method3sls = formulas[ i ], residCovWeighted = TRUE, + useMatrix = useMatrix ) + print( summary( fit3sls[[ i ]]$e3we, useDfSys = TRUE ) ) + + + print( "*************** 3SLS with 2 restrictions **********************" ) + fit3sls[[ i ]]$e4 <- systemfit( system, "3SLS", data = Kmenta, + inst = inst, restrict.matrix = restr2m, restrict.rhs = restr2q, + method3sls = formulas[ i ], x = TRUE, + useMatrix = useMatrix ) + print( summary( fit3sls[[ i ]]$e4 ) ) + # the same with symbolically specified restrictions + fit3sls[[ i ]]$e4Sym <- systemfit( system, "3SLS", data = Kmenta, + inst = inst, restrict.matrix = restrict2, method3sls = formulas[ i ], + x = TRUE, useMatrix = useMatrix ) + print( all.equal( fit3sls[[ i ]]$e4, fit3sls[[ i ]]$e4Sym ) ) + + print( "*************** 3SLS with 2 restrictions (EViews-like) ************" ) + fit3sls[[ i ]]$e4e <- systemfit( system, "3SLS", data = Kmenta, + inst = inst, methodResidCov = "noDfCor", restrict.matrix = restr2m, + restrict.rhs = restr2q, method3sls = formulas[ i ], + useMatrix = useMatrix ) + print( summary( fit3sls[[ i ]]$e4e, useDfSys = TRUE ) ) + + print( "********** W3SLS with 2 (symbolic) restrictions ***************" ) + fit3sls[[ i ]]$e4wSym <- systemfit( system, "3SLS", data = Kmenta, + inst = inst, restrict.matrix = restrict2, method3sls = formulas[ i ], + residCovWeighted = TRUE, useMatrix = useMatrix ) + print( summary( fit3sls[[ i ]]$e4wSym ) ) + + + print( "*************** 3SLS with 2 restrictions via R and restrict.regMat **********" ) + fit3sls[[ i ]]$e5 <- systemfit( system, "3SLS", data = Kmenta, + inst = inst, restrict.regMat = tc, restrict.matrix = restr3m, + restrict.rhs = restr3q, method3sls = formulas[ i ], + useMatrix = useMatrix ) + print( summary( fit3sls[[ i ]]$e5 ) ) + # the same with symbolically specified restrictions + fit3sls[[ i ]]$e5Sym <- systemfit( system, "3SLS", data = Kmenta, + inst = inst, restrict.regMat = tc, restrict.matrix = restrict3, + method3sls = formulas[ i ], useMatrix = useMatrix ) + print( all.equal( fit3sls[[ i ]]$e5, fit3sls[[ i ]]$e5Sym ) ) + + print( "******** 3SLS with 2 restrictions via R and restrict.regMat (EViews-like)*****" ) + fit3sls[[ i ]]$e5e <- systemfit( system, "3SLS", data = Kmenta, + inst = inst, restrict.regMat = tc, methodResidCov = "noDfCor", + restrict.matrix = restr3m, restrict.rhs = restr3q, + method3sls = formulas[ i ], x = TRUE, + useMatrix = useMatrix ) + print( summary( fit3sls[[ i ]]$e5e, useDfSys = TRUE ) ) + + print( "*** W3SLS with 2 restrictions via R and restrict.regMat (EViews-like) ***" ) + fit3sls[[ i ]]$e5we <- systemfit( system, "3SLS", data = Kmenta, + inst = inst, restrict.regMat = tc, methodResidCov = "noDfCor", + restrict.matrix = restr3m, restrict.rhs = restr3q, method3sls = formulas[ i ], + residCovWeighted = TRUE, useMatrix = useMatrix ) + print( summary( fit3sls[[ i ]]$e5we, useDfSys = TRUE ) ) + + ## *********** estimations with a single regressor ************ + fit3sls[[ i ]]$S1 <- systemfit( + list( farmPrice ~ consump - 1, price ~ consump + trend ), "3SLS", + data = Kmenta, inst = ~ trend + income, useMatrix = useMatrix ) + print( summary( fit3sls[[ i ]]$S1 ) ) + fit3sls[[ i ]]$S2 <- systemfit( + list( consump ~ farmPrice - 1, consump ~ trend - 1 ), "3SLS", + data = Kmenta, inst = ~ price + income, useMatrix = useMatrix ) + print( summary( fit3sls[[ i ]]$S2 ) ) + fit3sls[[ i ]]$S3 <- systemfit( + list( consump ~ trend - 1, farmPrice ~ trend - 1 ), "3SLS", + data = Kmenta, inst = instlist, useMatrix = useMatrix ) + print( summary( fit3sls[[ i ]]$S3 ) ) + fit3sls[[ i ]]$S4 <- systemfit( + list( consump ~ farmPrice - 1, price ~ trend - 1 ), "3SLS", + data = Kmenta, inst = ~ farmPrice + trend + income, + restrict.matrix = matrix( c( 1, -1 ), nrow = 1 ), useMatrix = useMatrix ) + print( summary( fit3sls[[ i ]]$S4 ) ) + fit3sls[[ i ]]$S5 <- systemfit( + list( consump ~ 1, price ~ 1 ), "3SLS", + data = Kmenta, inst = ~ income, useMatrix = useMatrix ) + print( summary( fit3sls[[ i ]]$S5 ) ) + } [1] "***************************************************" [1] "3SLS formula: GLS" [1] "************* 3SLS *********************************" systemfit results method: 3SLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 33 174 1.03 0.676 0.786 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 65.7 3.87 1.97 0.755 0.726 supply 20 16 107.9 6.75 2.60 0.598 0.522 The covariance matrix of the residuals used for estimation demand supply demand 3.87 4.36 supply 4.36 6.04 The covariance matrix of the residuals demand supply demand 3.87 5.00 supply 5.00 6.74 The correlations of the residuals demand supply demand 1.00 0.98 supply 0.98 1.00 3SLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 94.6333 7.9208 11.95 1.1e-09 *** price -0.2436 0.0965 -2.52 0.022 * income 0.3140 0.0469 6.69 3.8e-06 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.966 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 65.729 MSE: 3.866 Root MSE: 1.966 Multiple R-Squared: 0.755 Adjusted R-Squared: 0.726 3SLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 52.1972 11.8934 4.39 0.00046 *** price 0.2286 0.0997 2.29 0.03571 * farmPrice 0.2282 0.0440 5.19 9e-05 *** trend 0.3611 0.0729 4.95 0.00014 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.597 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 107.914 MSE: 6.745 Root MSE: 2.597 Multiple R-Squared: 0.598 Adjusted R-Squared: 0.522 [1] "********************* 3SLS EViews-like *****************" systemfit results method: 3SLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 33 173 0.719 0.677 0.748 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 65.7 3.87 1.97 0.755 0.726 supply 20 16 107.2 6.70 2.59 0.600 0.525 The covariance matrix of the residuals used for estimation demand supply demand 3.29 3.59 supply 3.59 4.83 The covariance matrix of the residuals demand supply demand 3.29 4.11 supply 4.11 5.36 The correlations of the residuals demand supply demand 1.000 0.979 supply 0.979 1.000 3SLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 94.6333 7.3027 12.96 1.7e-14 *** price -0.2436 0.0890 -2.74 0.0099 ** income 0.3140 0.0433 7.25 2.5e-08 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.966 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 65.729 MSE: 3.866 Root MSE: 1.966 Multiple R-Squared: 0.755 Adjusted R-Squared: 0.726 3SLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 52.1176 10.6378 4.90 2.5e-05 *** price 0.2289 0.0892 2.57 0.015 * farmPrice 0.2290 0.0393 5.82 1.6e-06 *** trend 0.3579 0.0652 5.49 4.3e-06 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.589 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 107.216 MSE: 6.701 Root MSE: 2.589 Multiple R-Squared: 0.6 Adjusted R-Squared: 0.525 [1] "********************* 3SLS with methodResidCov = Theil *****************" systemfit results method: 3SLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 33 174 -0.718 0.675 0.922 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 65.7 3.87 1.97 0.755 0.726 supply 20 16 108.7 6.79 2.61 0.594 0.518 The covariance matrix of the residuals used for estimation demand supply demand 3.87 4.50 supply 4.50 6.04 warning: this covariance matrix is NOT positive semidefinit! The covariance matrix of the residuals demand supply demand 3.87 5.2 supply 5.20 6.8 The correlations of the residuals demand supply demand 1.000 0.981 supply 0.981 1.000 3SLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 94.6333 7.9208 11.95 1.6e-13 *** price -0.2436 0.0965 -2.52 0.017 * income 0.3140 0.0469 6.69 1.3e-07 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.966 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 65.729 MSE: 3.866 Root MSE: 1.966 Multiple R-Squared: 0.755 Adjusted R-Squared: 0.726 3SLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 52.2869 11.8853 4.40 0.00011 *** price 0.2282 0.0997 2.29 0.02855 * farmPrice 0.2272 0.0438 5.19 1.0e-05 *** trend 0.3648 0.0707 5.16 1.1e-05 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.607 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 108.727 MSE: 6.795 Root MSE: 2.607 Multiple R-Squared: 0.594 Adjusted R-Squared: 0.518 [1] "*************** W3SLS with methodResidCov = Theil *****************" systemfit results method: 3SLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 33 174 -0.718 0.675 0.922 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 65.7 3.87 1.97 0.755 0.726 supply 20 16 108.7 6.79 2.61 0.594 0.518 The covariance matrix of the residuals used for estimation demand supply demand 3.87 4.50 supply 4.50 6.04 warning: this covariance matrix is NOT positive semidefinit! The covariance matrix of the residuals demand supply demand 3.87 5.2 supply 5.20 6.8 The correlations of the residuals demand supply demand 1.000 0.981 supply 0.981 1.000 3SLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 94.6333 7.9208 11.95 1.6e-13 *** price -0.2436 0.0965 -2.52 0.017 * income 0.3140 0.0469 6.69 1.3e-07 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.966 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 65.729 MSE: 3.866 Root MSE: 1.966 Multiple R-Squared: 0.755 Adjusted R-Squared: 0.726 3SLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 52.2869 11.8853 4.40 0.00011 *** price 0.2282 0.0997 2.29 0.02855 * farmPrice 0.2272 0.0438 5.19 1.0e-05 *** trend 0.3648 0.0707 5.16 1.1e-05 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.607 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 108.727 MSE: 6.795 Root MSE: 2.607 Multiple R-Squared: 0.594 Adjusted R-Squared: 0.518 [1] "*************** 3SLS with restriction *****************" systemfit results method: 3SLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 34 173 1.27 0.678 0.722 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 67.8 3.99 2.00 0.747 0.717 supply 20 16 104.8 6.55 2.56 0.609 0.536 The covariance matrix of the residuals used for estimation demand supply demand 3.97 4.55 supply 4.55 6.13 The covariance matrix of the residuals demand supply demand 3.99 4.98 supply 4.98 6.55 The correlations of the residuals demand supply demand 1.000 0.975 supply 0.975 1.000 3SLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 94.222 8.015 11.76 1.6e-13 *** price -0.222 0.096 -2.31 0.027 * income 0.296 0.045 6.57 1.6e-07 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.997 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 67.796 MSE: 3.988 Root MSE: 1.997 Multiple R-Squared: 0.747 Adjusted R-Squared: 0.717 3SLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 55.9604 11.5777 4.83 2.8e-05 *** price 0.2193 0.1002 2.19 0.036 * farmPrice 0.2060 0.0403 5.11 1.3e-05 *** trend 0.2956 0.0450 6.57 1.6e-07 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.559 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 104.753 MSE: 6.547 Root MSE: 2.559 Multiple R-Squared: 0.609 Adjusted R-Squared: 0.536 [1] "Component \"call\": target, current do not match when deparsed" [1] "************** 3SLS with restriction (EViews-like) *****************" systemfit results method: 3SLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 34 171 0.887 0.68 0.678 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 67.5 3.97 1.99 0.748 0.719 supply 20 16 104.0 6.50 2.55 0.612 0.539 The covariance matrix of the residuals used for estimation demand supply demand 3.37 3.75 supply 3.75 4.91 The covariance matrix of the residuals demand supply demand 3.37 4.08 supply 4.08 5.20 The correlations of the residuals demand supply demand 1.000 0.974 supply 0.974 1.000 3SLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 94.2737 7.3905 12.76 1.6e-14 *** price -0.2243 0.0888 -2.53 0.016 * income 0.2979 0.0420 7.10 3.4e-08 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.992 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 67.467 MSE: 3.969 Root MSE: 1.992 Multiple R-Squared: 0.748 Adjusted R-Squared: 0.719 3SLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 55.4521 10.3994 5.33 6.4e-06 *** price 0.2207 0.0896 2.46 0.019 * farmPrice 0.2095 0.0366 5.73 1.9e-06 *** trend 0.2979 0.0420 7.10 3.4e-08 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.55 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 104.013 MSE: 6.501 Root MSE: 2.55 Multiple R-Squared: 0.612 Adjusted R-Squared: 0.539 [1] 40 [1] "*************** W3SLS with restriction *****************" systemfit results method: 3SLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 34 173 1.24 0.677 0.725 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 68.1 4.00 2.00 0.746 0.716 supply 20 16 105.2 6.57 2.56 0.608 0.534 The covariance matrix of the residuals used for estimation demand supply demand 3.93 4.56 supply 4.56 6.15 The covariance matrix of the residuals demand supply demand 4.00 5.01 supply 5.01 6.57 The correlations of the residuals demand supply demand 1.000 0.976 supply 0.976 1.000 3SLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 94.1823 7.9793 11.8 1.4e-13 *** price -0.2194 0.0954 -2.3 0.028 * income 0.2938 0.0445 6.6 1.4e-07 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.001 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 68.057 MSE: 4.003 Root MSE: 2.001 Multiple R-Squared: 0.746 Adjusted R-Squared: 0.716 3SLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 56.2541 11.5687 4.86 2.6e-05 *** price 0.2184 0.1003 2.18 0.036 * farmPrice 0.2040 0.0401 5.09 1.3e-05 *** trend 0.2938 0.0445 6.60 1.4e-07 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.564 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 105.161 MSE: 6.573 Root MSE: 2.564 Multiple R-Squared: 0.608 Adjusted R-Squared: 0.534 [1] "*************** 3SLS with restriction via restrict.regMat ********************" systemfit results method: 3SLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 34 173 1.27 0.678 0.722 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 67.8 3.99 2.00 0.747 0.717 supply 20 16 104.8 6.55 2.56 0.609 0.536 The covariance matrix of the residuals used for estimation demand supply demand 3.97 4.55 supply 4.55 6.13 The covariance matrix of the residuals demand supply demand 3.99 4.98 supply 4.98 6.55 The correlations of the residuals demand supply demand 1.000 0.975 supply 0.975 1.000 3SLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 94.222 8.015 11.76 1.6e-13 *** price -0.222 0.096 -2.31 0.027 * income 0.296 0.045 6.57 1.6e-07 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.997 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 67.796 MSE: 3.988 Root MSE: 1.997 Multiple R-Squared: 0.747 Adjusted R-Squared: 0.717 3SLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 55.9604 11.5777 4.83 2.8e-05 *** price 0.2193 0.1002 2.19 0.036 * farmPrice 0.2060 0.0403 5.11 1.3e-05 *** trend 0.2956 0.0450 6.57 1.6e-07 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.559 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 104.753 MSE: 6.547 Root MSE: 2.559 Multiple R-Squared: 0.609 Adjusted R-Squared: 0.536 [1] "*************** 3SLS with restriction via restrict.regMat (EViews-like) *******" systemfit results method: 3SLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 34 171 0.887 0.68 0.678 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 67.5 3.97 1.99 0.748 0.719 supply 20 16 104.0 6.50 2.55 0.612 0.539 The covariance matrix of the residuals used for estimation demand supply demand 3.37 3.75 supply 3.75 4.91 The covariance matrix of the residuals demand supply demand 3.37 4.08 supply 4.08 5.20 The correlations of the residuals demand supply demand 1.000 0.974 supply 0.974 1.000 3SLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 94.2737 7.3905 12.76 1.6e-14 *** price -0.2243 0.0888 -2.53 0.016 * income 0.2979 0.0420 7.10 3.4e-08 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.992 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 67.467 MSE: 3.969 Root MSE: 1.992 Multiple R-Squared: 0.748 Adjusted R-Squared: 0.719 3SLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 55.4521 10.3994 5.33 6.4e-06 *** price 0.2207 0.0896 2.46 0.019 * farmPrice 0.2095 0.0366 5.73 1.9e-06 *** trend 0.2979 0.0420 7.10 3.4e-08 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.55 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 104.013 MSE: 6.501 Root MSE: 2.55 Multiple R-Squared: 0.612 Adjusted R-Squared: 0.539 [1] "**** W3SLS with restriction via restrict.regMat (EViews-like) ****" systemfit results method: 3SLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 34 172 0.873 0.679 0.681 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 67.7 3.98 2.00 0.748 0.718 supply 20 16 104.3 6.52 2.55 0.611 0.538 The covariance matrix of the residuals used for estimation demand supply demand 3.35 3.76 supply 3.76 4.92 The covariance matrix of the residuals demand supply demand 3.38 4.10 supply 4.10 5.22 The correlations of the residuals demand supply demand 1.000 0.975 supply 0.975 1.000 3SLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 94.2409 7.3617 12.80 1.5e-14 *** price -0.2225 0.0883 -2.52 0.017 * income 0.2964 0.0416 7.13 3.1e-08 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.995 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 67.672 MSE: 3.981 Root MSE: 1.995 Multiple R-Squared: 0.748 Adjusted R-Squared: 0.718 3SLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 55.6925 10.3937 5.36 5.9e-06 *** price 0.2201 0.0897 2.45 0.019 * farmPrice 0.2078 0.0364 5.71 2.0e-06 *** trend 0.2964 0.0416 7.13 3.1e-08 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.553 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 104.312 MSE: 6.519 Root MSE: 2.553 Multiple R-Squared: 0.611 Adjusted R-Squared: 0.538 [1] "*************** 3SLS with 2 restrictions **********************" systemfit results method: 3SLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 35 171 1.74 0.681 0.696 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 65.8 3.87 1.97 0.755 0.726 supply 20 16 105.4 6.59 2.57 0.607 0.533 The covariance matrix of the residuals used for estimation demand supply demand 3.89 4.53 supply 4.53 6.25 The covariance matrix of the residuals demand supply demand 3.87 4.87 supply 4.87 6.59 The correlations of the residuals demand supply demand 1.000 0.965 supply 0.965 1.000 3SLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 93.9070 7.9234 11.85 8.3e-14 *** price -0.2457 0.0891 -2.76 0.0092 ** income 0.3236 0.0233 13.91 8.9e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.967 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 65.807 MSE: 3.871 Root MSE: 1.967 Multiple R-Squared: 0.755 Adjusted R-Squared: 0.726 3SLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 49.9049 8.1797 6.10 5.7e-07 *** price 0.2543 0.0891 2.85 0.0072 ** farmPrice 0.2293 0.0241 9.52 3.1e-11 *** trend 0.3236 0.0233 13.91 8.9e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.566 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 105.389 MSE: 6.587 Root MSE: 2.566 Multiple R-Squared: 0.607 Adjusted R-Squared: 0.533 [1] "Component \"call\": target, current do not match when deparsed" [1] "*************** 3SLS with 2 restrictions (EViews-like) ************" systemfit results method: 3SLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 35 170 1.19 0.683 0.658 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 65.6 3.86 1.96 0.755 0.727 supply 20 16 104.6 6.54 2.56 0.610 0.537 The covariance matrix of the residuals used for estimation demand supply demand 3.30 3.73 supply 3.73 5.00 The covariance matrix of the residuals demand supply demand 3.28 4.00 supply 4.00 5.23 The correlations of the residuals demand supply demand 1.000 0.965 supply 0.965 1.000 3SLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 94.1703 7.3154 12.87 7.8e-15 *** price -0.2494 0.0812 -3.07 0.0041 ** income 0.3248 0.0209 15.57 < 2e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.964 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 65.577 MSE: 3.857 Root MSE: 1.964 Multiple R-Squared: 0.755 Adjusted R-Squared: 0.727 3SLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 50.0853 7.5503 6.63 1.1e-07 *** price 0.2506 0.0812 3.09 0.0039 ** farmPrice 0.2312 0.0212 10.88 8.9e-13 *** trend 0.3248 0.0209 15.57 < 2e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.557 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 104.607 MSE: 6.538 Root MSE: 2.557 Multiple R-Squared: 0.61 Adjusted R-Squared: 0.537 [1] "********** W3SLS with 2 (symbolic) restrictions ***************" systemfit results method: 3SLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 35 172 1.74 0.68 0.697 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 65.9 3.88 1.97 0.754 0.725 supply 20 16 105.7 6.60 2.57 0.606 0.532 The covariance matrix of the residuals used for estimation demand supply demand 3.88 4.55 supply 4.55 6.27 The covariance matrix of the residuals demand supply demand 3.88 4.88 supply 4.88 6.60 The correlations of the residuals demand supply demand 1.000 0.965 supply 0.965 1.000 3SLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 93.7870 7.9088 11.86 8.2e-14 *** price -0.2443 0.0892 -2.74 0.0096 ** income 0.3234 0.0229 14.14 4.4e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.969 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 65.907 MSE: 3.877 Root MSE: 1.969 Multiple R-Squared: 0.754 Adjusted R-Squared: 0.725 3SLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 49.8093 8.1522 6.11 5.5e-07 *** price 0.2557 0.0892 2.87 0.0069 ** farmPrice 0.2289 0.0237 9.67 2.0e-11 *** trend 0.3234 0.0229 14.14 4.4e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.57 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 105.659 MSE: 6.604 Root MSE: 2.57 Multiple R-Squared: 0.606 Adjusted R-Squared: 0.532 [1] "*************** 3SLS with 2 restrictions via R and restrict.regMat **********" systemfit results method: 3SLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 35 171 1.74 0.681 0.696 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 65.8 3.87 1.97 0.755 0.726 supply 20 16 105.4 6.59 2.57 0.607 0.533 The covariance matrix of the residuals used for estimation demand supply demand 3.89 4.53 supply 4.53 6.25 The covariance matrix of the residuals demand supply demand 3.87 4.87 supply 4.87 6.59 The correlations of the residuals demand supply demand 1.000 0.965 supply 0.965 1.000 3SLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 93.9070 7.9234 11.85 8.3e-14 *** price -0.2457 0.0891 -2.76 0.0092 ** income 0.3236 0.0233 13.91 8.9e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.967 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 65.807 MSE: 3.871 Root MSE: 1.967 Multiple R-Squared: 0.755 Adjusted R-Squared: 0.726 3SLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 49.9049 8.1797 6.10 5.7e-07 *** price 0.2543 0.0891 2.85 0.0072 ** farmPrice 0.2293 0.0241 9.52 3.1e-11 *** trend 0.3236 0.0233 13.91 8.9e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.566 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 105.389 MSE: 6.587 Root MSE: 2.566 Multiple R-Squared: 0.607 Adjusted R-Squared: 0.533 [1] "Component \"call\": target, current do not match when deparsed" [1] "******** 3SLS with 2 restrictions via R and restrict.regMat (EViews-like)*****" systemfit results method: 3SLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 35 170 1.19 0.683 0.658 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 65.6 3.86 1.96 0.755 0.727 supply 20 16 104.6 6.54 2.56 0.610 0.537 The covariance matrix of the residuals used for estimation demand supply demand 3.30 3.73 supply 3.73 5.00 The covariance matrix of the residuals demand supply demand 3.28 4.00 supply 4.00 5.23 The correlations of the residuals demand supply demand 1.000 0.965 supply 0.965 1.000 3SLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 94.1703 7.3154 12.87 7.8e-15 *** price -0.2494 0.0812 -3.07 0.0041 ** income 0.3248 0.0209 15.57 < 2e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.964 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 65.577 MSE: 3.857 Root MSE: 1.964 Multiple R-Squared: 0.755 Adjusted R-Squared: 0.727 3SLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 50.0853 7.5503 6.63 1.1e-07 *** price 0.2506 0.0812 3.09 0.0039 ** farmPrice 0.2312 0.0212 10.88 8.9e-13 *** trend 0.3248 0.0209 15.57 < 2e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.557 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 104.607 MSE: 6.538 Root MSE: 2.557 Multiple R-Squared: 0.61 Adjusted R-Squared: 0.537 [1] "*** W3SLS with 2 restrictions via R and restrict.regMat (EViews-like) ***" systemfit results method: 3SLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 35 170 1.19 0.682 0.659 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 65.6 3.86 1.97 0.755 0.726 supply 20 16 104.8 6.55 2.56 0.609 0.536 The covariance matrix of the residuals used for estimation demand supply demand 3.30 3.75 supply 3.75 5.01 The covariance matrix of the residuals demand supply demand 3.28 4.00 supply 4.00 5.24 The correlations of the residuals demand supply demand 1.000 0.965 supply 0.965 1.000 3SLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 94.0830 7.3058 12.88 7.5e-15 *** price -0.2484 0.0812 -3.06 0.0042 ** income 0.3246 0.0205 15.81 < 2e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.965 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 65.646 MSE: 3.862 Root MSE: 1.965 Multiple R-Squared: 0.755 Adjusted R-Squared: 0.726 3SLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 50.0190 7.5314 6.64 1.1e-07 *** price 0.2516 0.0812 3.10 0.0038 ** farmPrice 0.2309 0.0209 11.05 5.9e-13 *** trend 0.3246 0.0205 15.81 < 2e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.559 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 104.795 MSE: 6.55 Root MSE: 2.559 Multiple R-Squared: 0.609 Adjusted R-Squared: 0.536 systemfit results method: 3SLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 36 3690 5613 0.012 0.368 N DF SSR MSE RMSE R2 Adj R2 eq1 20 19 2132 112.2 10.59 0.305 0.305 eq2 20 17 1558 91.7 9.57 -1.335 -1.610 The covariance matrix of the residuals used for estimation eq1 eq2 eq1 112.2 -44.8 eq2 -44.8 56.8 The covariance matrix of the residuals eq1 eq2 eq1 112.2 -68.3 eq2 -68.3 91.7 The correlations of the residuals eq1 eq2 eq1 1.000 -0.674 eq2 -0.674 1.000 3SLS estimates for 'eq1' (equation 1) Model Formula: farmPrice ~ consump - 1 Instruments: ~trend + income Estimate Std. Error t value Pr(>|t|) consump 0.9588 0.0235 40.9 <2e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 10.592 on 19 degrees of freedom Number of observations: 20 Degrees of Freedom: 19 SSR: 2131.725 MSE: 112.196 Root MSE: 10.592 Multiple R-Squared: 0.305 Adjusted R-Squared: 0.305 3SLS estimates for 'eq2' (equation 2) Model Formula: price ~ consump + trend Instruments: ~trend + income Estimate Std. Error t value Pr(>|t|) (Intercept) -92.192 49.896 -1.85 0.0821 . consump 1.953 0.499 3.92 0.0011 ** trend -0.469 0.247 -1.90 0.0743 . --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 9.574 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 1558.311 MSE: 91.665 Root MSE: 9.574 Multiple R-Squared: -1.335 Adjusted R-Squared: -1.61 systemfit results method: 3SLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 38 56326 283068 -104 -10.6 N DF SSR MSE RMSE R2 Adj R2 eq1 20 19 2313 122 11.0 -7.63 -7.63 eq2 20 19 54013 2843 53.3 -200.46 -200.46 The covariance matrix of the residuals used for estimation eq1 eq2 eq1 121 -255 eq2 -255 2953 The covariance matrix of the residuals eq1 eq2 eq1 122 -251 eq2 -251 2843 The correlations of the residuals eq1 eq2 eq1 1.000 -0.433 eq2 -0.433 1.000 3SLS estimates for 'eq1' (equation 1) Model Formula: consump ~ farmPrice - 1 Instruments: ~price + income Estimate Std. Error t value Pr(>|t|) farmPrice 1.0417 0.0253 41.2 <2e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 11.034 on 19 degrees of freedom Number of observations: 20 Degrees of Freedom: 19 SSR: 2313.073 MSE: 121.741 Root MSE: 11.034 Multiple R-Squared: -7.627 Adjusted R-Squared: -7.627 3SLS estimates for 'eq2' (equation 2) Model Formula: consump ~ trend - 1 Instruments: ~price + income Estimate Std. Error t value Pr(>|t|) trend 9.02 1.13 8 1.7e-07 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 53.318 on 19 degrees of freedom Number of observations: 20 Degrees of Freedom: 19 SSR: 54013.367 MSE: 2842.809 Root MSE: 53.318 Multiple R-Squared: -200.456 Adjusted R-Squared: -200.456 systemfit results method: 3SLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 38 167069 397886 -49.1 -0.82 N DF SSR MSE RMSE R2 Adj R2 eq1 20 19 76692 4036 63.5 -285.0 -285.0 eq2 20 19 90377 4757 69.0 -28.5 -28.5 The covariance matrix of the residuals used for estimation eq1 eq2 eq1 2682 2547 eq2 2547 2741 The covariance matrix of the residuals eq1 eq2 eq1 4036 4336 eq2 4336 4757 The correlations of the residuals eq1 eq2 eq1 1.000 0.928 eq2 0.928 1.000 3SLS estimates for 'eq1' (equation 1) Model Formula: consump ~ trend - 1 Instruments: ~income + farmPrice Estimate Std. Error t value Pr(>|t|) trend 4.162 0.723 5.75 1.5e-05 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 63.533 on 19 degrees of freedom Number of observations: 20 Degrees of Freedom: 19 SSR: 76691.636 MSE: 4036.402 Root MSE: 63.533 Multiple R-Squared: -285.041 Adjusted R-Squared: -285.041 3SLS estimates for 'eq2' (equation 2) Model Formula: farmPrice ~ trend - 1 Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) trend 3.274 0.676 4.84 0.00011 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 68.969 on 19 degrees of freedom Number of observations: 20 Degrees of Freedom: 19 SSR: 90377.499 MSE: 4756.71 Root MSE: 68.969 Multiple R-Squared: -28.451 Adjusted R-Squared: -28.451 systemfit results method: 3SLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 39 161126 1162329 -171 -17.4 N DF SSR MSE RMSE R2 Adj R2 eq1 20 19 3553 187 13.7 -12.3 -12.3 eq2 20 19 157573 8293 91.1 -235.2 -235.2 The covariance matrix of the residuals used for estimation eq1 eq2 eq1 208 -731 eq2 -731 8271 The covariance matrix of the residuals eq1 eq2 eq1 187 -623 eq2 -623 8293 The correlations of the residuals eq1 eq2 eq1 1.000 -0.121 eq2 -0.121 1.000 3SLS estimates for 'eq1' (equation 1) Model Formula: consump ~ farmPrice - 1 Instruments: ~farmPrice + trend + income Estimate Std. Error t value Pr(>|t|) farmPrice 1.1122 0.0272 40.8 <2e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 13.675 on 19 degrees of freedom Number of observations: 20 Degrees of Freedom: 19 SSR: 3553.118 MSE: 187.006 Root MSE: 13.675 Multiple R-Squared: -12.252 Adjusted R-Squared: -12.252 3SLS estimates for 'eq2' (equation 2) Model Formula: price ~ trend - 1 Instruments: ~farmPrice + trend + income Estimate Std. Error t value Pr(>|t|) trend 1.1122 0.0272 40.8 <2e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 91.068 on 19 degrees of freedom Number of observations: 20 Degrees of Freedom: 19 SSR: 157573.328 MSE: 8293.333 Root MSE: 91.068 Multiple R-Squared: -235.153 Adjusted R-Squared: -235.153 systemfit results method: 3SLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 38 935 491 0 0 N DF SSR MSE RMSE R2 Adj R2 eq1 20 19 268 14.1 3.76 0 0 eq2 20 19 667 35.1 5.93 0 0 The covariance matrix of the residuals used for estimation eq1 eq2 eq1 14.11 2.18 eq2 2.18 35.12 The covariance matrix of the residuals eq1 eq2 eq1 14.11 2.18 eq2 2.18 35.12 The correlations of the residuals eq1 eq2 eq1 1.0000 0.0981 eq2 0.0981 1.0000 3SLS estimates for 'eq1' (equation 1) Model Formula: consump ~ 1 Instruments: ~income Estimate Std. Error t value Pr(>|t|) (Intercept) 100.90 0.84 120 <2e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 3.756 on 19 degrees of freedom Number of observations: 20 Degrees of Freedom: 19 SSR: 268.114 MSE: 14.111 Root MSE: 3.756 Multiple R-Squared: 0 Adjusted R-Squared: 0 3SLS estimates for 'eq2' (equation 2) Model Formula: price ~ 1 Instruments: ~income Estimate Std. Error t value Pr(>|t|) (Intercept) 100.02 1.33 75.5 <2e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 5.926 on 19 degrees of freedom Number of observations: 20 Degrees of Freedom: 19 SSR: 667.251 MSE: 35.118 Root MSE: 5.926 Multiple R-Squared: 0 Adjusted R-Squared: 0 [1] "***************************************************" [1] "3SLS formula: IV" [1] "************* 3SLS *********************************" systemfit results method: 3SLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 33 174 1.03 0.676 0.786 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 65.7 3.87 1.97 0.755 0.726 supply 20 16 107.9 6.75 2.60 0.598 0.522 The covariance matrix of the residuals used for estimation demand supply demand 3.87 4.36 supply 4.36 6.04 The covariance matrix of the residuals demand supply demand 3.87 5.00 supply 5.00 6.74 The correlations of the residuals demand supply demand 1.00 0.98 supply 0.98 1.00 3SLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 94.6333 7.9208 11.95 1.1e-09 *** price -0.2436 0.0965 -2.52 0.022 * income 0.3140 0.0469 6.69 3.8e-06 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.966 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 65.729 MSE: 3.866 Root MSE: 1.966 Multiple R-Squared: 0.755 Adjusted R-Squared: 0.726 3SLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 52.1972 11.8934 4.39 0.00046 *** price 0.2286 0.0997 2.29 0.03571 * farmPrice 0.2282 0.0440 5.19 9e-05 *** trend 0.3611 0.0729 4.95 0.00014 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.597 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 107.914 MSE: 6.745 Root MSE: 2.597 Multiple R-Squared: 0.598 Adjusted R-Squared: 0.522 [1] "********************* 3SLS EViews-like *****************" systemfit results method: 3SLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 33 173 0.719 0.677 0.748 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 65.7 3.87 1.97 0.755 0.726 supply 20 16 107.2 6.70 2.59 0.600 0.525 The covariance matrix of the residuals used for estimation demand supply demand 3.29 3.59 supply 3.59 4.83 The covariance matrix of the residuals demand supply demand 3.29 4.11 supply 4.11 5.36 The correlations of the residuals demand supply demand 1.000 0.979 supply 0.979 1.000 3SLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 94.6333 7.3027 12.96 1.7e-14 *** price -0.2436 0.0890 -2.74 0.0099 ** income 0.3140 0.0433 7.25 2.5e-08 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.966 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 65.729 MSE: 3.866 Root MSE: 1.966 Multiple R-Squared: 0.755 Adjusted R-Squared: 0.726 3SLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 52.1176 10.6378 4.90 2.5e-05 *** price 0.2289 0.0892 2.57 0.015 * farmPrice 0.2290 0.0393 5.82 1.6e-06 *** trend 0.3579 0.0652 5.49 4.3e-06 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.589 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 107.216 MSE: 6.701 Root MSE: 2.589 Multiple R-Squared: 0.6 Adjusted R-Squared: 0.525 [1] "********************* 3SLS with methodResidCov = Theil *****************" systemfit results method: 3SLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 33 174 -0.718 0.675 0.922 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 65.7 3.87 1.97 0.755 0.726 supply 20 16 108.7 6.79 2.61 0.594 0.518 The covariance matrix of the residuals used for estimation demand supply demand 3.87 4.50 supply 4.50 6.04 warning: this covariance matrix is NOT positive semidefinit! The covariance matrix of the residuals demand supply demand 3.87 5.2 supply 5.20 6.8 The correlations of the residuals demand supply demand 1.000 0.981 supply 0.981 1.000 3SLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 94.6333 7.9208 11.95 1.6e-13 *** price -0.2436 0.0965 -2.52 0.017 * income 0.3140 0.0469 6.69 1.3e-07 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.966 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 65.729 MSE: 3.866 Root MSE: 1.966 Multiple R-Squared: 0.755 Adjusted R-Squared: 0.726 3SLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 52.2869 11.8853 4.40 0.00011 *** price 0.2282 0.0997 2.29 0.02855 * farmPrice 0.2272 0.0438 5.19 1.0e-05 *** trend 0.3648 0.0707 5.16 1.1e-05 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.607 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 108.727 MSE: 6.795 Root MSE: 2.607 Multiple R-Squared: 0.594 Adjusted R-Squared: 0.518 [1] "*************** W3SLS with methodResidCov = Theil *****************" systemfit results method: 3SLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 33 174 -0.718 0.675 0.922 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 65.7 3.87 1.97 0.755 0.726 supply 20 16 108.7 6.79 2.61 0.594 0.518 The covariance matrix of the residuals used for estimation demand supply demand 3.87 4.50 supply 4.50 6.04 warning: this covariance matrix is NOT positive semidefinit! The covariance matrix of the residuals demand supply demand 3.87 5.2 supply 5.20 6.8 The correlations of the residuals demand supply demand 1.000 0.981 supply 0.981 1.000 3SLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 94.6333 7.9208 11.95 1.6e-13 *** price -0.2436 0.0965 -2.52 0.017 * income 0.3140 0.0469 6.69 1.3e-07 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.966 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 65.729 MSE: 3.866 Root MSE: 1.966 Multiple R-Squared: 0.755 Adjusted R-Squared: 0.726 3SLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 52.2869 11.8853 4.40 0.00011 *** price 0.2282 0.0997 2.29 0.02855 * farmPrice 0.2272 0.0438 5.19 1.0e-05 *** trend 0.3648 0.0707 5.16 1.1e-05 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.607 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 108.727 MSE: 6.795 Root MSE: 2.607 Multiple R-Squared: 0.594 Adjusted R-Squared: 0.518 [1] "*************** 3SLS with restriction *****************" systemfit results method: 3SLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 34 173 1.27 0.678 0.722 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 67.8 3.99 2.00 0.747 0.717 supply 20 16 104.8 6.55 2.56 0.609 0.536 The covariance matrix of the residuals used for estimation demand supply demand 3.97 4.55 supply 4.55 6.13 The covariance matrix of the residuals demand supply demand 3.99 4.98 supply 4.98 6.55 The correlations of the residuals demand supply demand 1.000 0.975 supply 0.975 1.000 3SLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 94.222 8.015 11.76 1.6e-13 *** price -0.222 0.096 -2.31 0.027 * income 0.296 0.045 6.57 1.6e-07 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.997 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 67.796 MSE: 3.988 Root MSE: 1.997 Multiple R-Squared: 0.747 Adjusted R-Squared: 0.717 3SLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 55.9604 11.5777 4.83 2.8e-05 *** price 0.2193 0.1002 2.19 0.036 * farmPrice 0.2060 0.0403 5.11 1.3e-05 *** trend 0.2956 0.0450 6.57 1.6e-07 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.559 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 104.753 MSE: 6.547 Root MSE: 2.559 Multiple R-Squared: 0.609 Adjusted R-Squared: 0.536 [1] "Component \"call\": target, current do not match when deparsed" [1] "************** 3SLS with restriction (EViews-like) *****************" systemfit results method: 3SLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 34 171 0.887 0.68 0.678 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 67.5 3.97 1.99 0.748 0.719 supply 20 16 104.0 6.50 2.55 0.612 0.539 The covariance matrix of the residuals used for estimation demand supply demand 3.37 3.75 supply 3.75 4.91 The covariance matrix of the residuals demand supply demand 3.37 4.08 supply 4.08 5.20 The correlations of the residuals demand supply demand 1.000 0.974 supply 0.974 1.000 3SLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 94.2737 7.3905 12.76 1.6e-14 *** price -0.2243 0.0888 -2.53 0.016 * income 0.2979 0.0420 7.10 3.4e-08 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.992 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 67.467 MSE: 3.969 Root MSE: 1.992 Multiple R-Squared: 0.748 Adjusted R-Squared: 0.719 3SLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 55.4521 10.3994 5.33 6.4e-06 *** price 0.2207 0.0896 2.46 0.019 * farmPrice 0.2095 0.0366 5.73 1.9e-06 *** trend 0.2979 0.0420 7.10 3.4e-08 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.55 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 104.013 MSE: 6.501 Root MSE: 2.55 Multiple R-Squared: 0.612 Adjusted R-Squared: 0.539 [1] 40 [1] "*************** W3SLS with restriction *****************" systemfit results method: 3SLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 34 173 1.24 0.677 0.725 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 68.1 4.00 2.00 0.746 0.716 supply 20 16 105.2 6.57 2.56 0.608 0.534 The covariance matrix of the residuals used for estimation demand supply demand 3.93 4.56 supply 4.56 6.15 The covariance matrix of the residuals demand supply demand 4.00 5.01 supply 5.01 6.57 The correlations of the residuals demand supply demand 1.000 0.976 supply 0.976 1.000 3SLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 94.1823 7.9793 11.8 1.4e-13 *** price -0.2194 0.0954 -2.3 0.028 * income 0.2938 0.0445 6.6 1.4e-07 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.001 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 68.057 MSE: 4.003 Root MSE: 2.001 Multiple R-Squared: 0.746 Adjusted R-Squared: 0.716 3SLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 56.2541 11.5687 4.86 2.6e-05 *** price 0.2184 0.1003 2.18 0.036 * farmPrice 0.2040 0.0401 5.09 1.3e-05 *** trend 0.2938 0.0445 6.60 1.4e-07 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.564 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 105.161 MSE: 6.573 Root MSE: 2.564 Multiple R-Squared: 0.608 Adjusted R-Squared: 0.534 [1] "*************** 3SLS with restriction via restrict.regMat ********************" systemfit results method: 3SLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 34 173 1.27 0.678 0.722 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 67.8 3.99 2.00 0.747 0.717 supply 20 16 104.8 6.55 2.56 0.609 0.536 The covariance matrix of the residuals used for estimation demand supply demand 3.97 4.55 supply 4.55 6.13 The covariance matrix of the residuals demand supply demand 3.99 4.98 supply 4.98 6.55 The correlations of the residuals demand supply demand 1.000 0.975 supply 0.975 1.000 3SLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 94.222 8.015 11.76 1.6e-13 *** price -0.222 0.096 -2.31 0.027 * income 0.296 0.045 6.57 1.6e-07 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.997 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 67.796 MSE: 3.988 Root MSE: 1.997 Multiple R-Squared: 0.747 Adjusted R-Squared: 0.717 3SLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 55.9604 11.5777 4.83 2.8e-05 *** price 0.2193 0.1002 2.19 0.036 * farmPrice 0.2060 0.0403 5.11 1.3e-05 *** trend 0.2956 0.0450 6.57 1.6e-07 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.559 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 104.753 MSE: 6.547 Root MSE: 2.559 Multiple R-Squared: 0.609 Adjusted R-Squared: 0.536 [1] "*************** 3SLS with restriction via restrict.regMat (EViews-like) *******" systemfit results method: 3SLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 34 171 0.887 0.68 0.678 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 67.5 3.97 1.99 0.748 0.719 supply 20 16 104.0 6.50 2.55 0.612 0.539 The covariance matrix of the residuals used for estimation demand supply demand 3.37 3.75 supply 3.75 4.91 The covariance matrix of the residuals demand supply demand 3.37 4.08 supply 4.08 5.20 The correlations of the residuals demand supply demand 1.000 0.974 supply 0.974 1.000 3SLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 94.2737 7.3905 12.76 1.6e-14 *** price -0.2243 0.0888 -2.53 0.016 * income 0.2979 0.0420 7.10 3.4e-08 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.992 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 67.467 MSE: 3.969 Root MSE: 1.992 Multiple R-Squared: 0.748 Adjusted R-Squared: 0.719 3SLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 55.4521 10.3994 5.33 6.4e-06 *** price 0.2207 0.0896 2.46 0.019 * farmPrice 0.2095 0.0366 5.73 1.9e-06 *** trend 0.2979 0.0420 7.10 3.4e-08 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.55 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 104.013 MSE: 6.501 Root MSE: 2.55 Multiple R-Squared: 0.612 Adjusted R-Squared: 0.539 [1] "**** W3SLS with restriction via restrict.regMat (EViews-like) ****" systemfit results method: 3SLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 34 172 0.873 0.679 0.681 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 67.7 3.98 2.00 0.748 0.718 supply 20 16 104.3 6.52 2.55 0.611 0.538 The covariance matrix of the residuals used for estimation demand supply demand 3.35 3.76 supply 3.76 4.92 The covariance matrix of the residuals demand supply demand 3.38 4.10 supply 4.10 5.22 The correlations of the residuals demand supply demand 1.000 0.975 supply 0.975 1.000 3SLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 94.2409 7.3617 12.80 1.5e-14 *** price -0.2225 0.0883 -2.52 0.017 * income 0.2964 0.0416 7.13 3.1e-08 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.995 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 67.672 MSE: 3.981 Root MSE: 1.995 Multiple R-Squared: 0.748 Adjusted R-Squared: 0.718 3SLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 55.6925 10.3937 5.36 5.9e-06 *** price 0.2201 0.0897 2.45 0.019 * farmPrice 0.2078 0.0364 5.71 2.0e-06 *** trend 0.2964 0.0416 7.13 3.1e-08 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.553 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 104.312 MSE: 6.519 Root MSE: 2.553 Multiple R-Squared: 0.611 Adjusted R-Squared: 0.538 [1] "*************** 3SLS with 2 restrictions **********************" systemfit results method: 3SLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 35 171 1.74 0.681 0.696 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 65.8 3.87 1.97 0.755 0.726 supply 20 16 105.4 6.59 2.57 0.607 0.533 The covariance matrix of the residuals used for estimation demand supply demand 3.89 4.53 supply 4.53 6.25 The covariance matrix of the residuals demand supply demand 3.87 4.87 supply 4.87 6.59 The correlations of the residuals demand supply demand 1.000 0.965 supply 0.965 1.000 3SLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 93.9070 7.9234 11.85 8.3e-14 *** price -0.2457 0.0891 -2.76 0.0092 ** income 0.3236 0.0233 13.91 8.9e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.967 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 65.807 MSE: 3.871 Root MSE: 1.967 Multiple R-Squared: 0.755 Adjusted R-Squared: 0.726 3SLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 49.9049 8.1797 6.10 5.7e-07 *** price 0.2543 0.0891 2.85 0.0072 ** farmPrice 0.2293 0.0241 9.52 3.1e-11 *** trend 0.3236 0.0233 13.91 8.9e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.566 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 105.389 MSE: 6.587 Root MSE: 2.566 Multiple R-Squared: 0.607 Adjusted R-Squared: 0.533 [1] "Component \"call\": target, current do not match when deparsed" [1] "*************** 3SLS with 2 restrictions (EViews-like) ************" systemfit results method: 3SLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 35 170 1.19 0.683 0.658 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 65.6 3.86 1.96 0.755 0.727 supply 20 16 104.6 6.54 2.56 0.610 0.537 The covariance matrix of the residuals used for estimation demand supply demand 3.30 3.73 supply 3.73 5.00 The covariance matrix of the residuals demand supply demand 3.28 4.00 supply 4.00 5.23 The correlations of the residuals demand supply demand 1.000 0.965 supply 0.965 1.000 3SLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 94.1703 7.3154 12.87 7.8e-15 *** price -0.2494 0.0812 -3.07 0.0041 ** income 0.3248 0.0209 15.57 < 2e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.964 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 65.577 MSE: 3.857 Root MSE: 1.964 Multiple R-Squared: 0.755 Adjusted R-Squared: 0.727 3SLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 50.0853 7.5503 6.63 1.1e-07 *** price 0.2506 0.0812 3.09 0.0039 ** farmPrice 0.2312 0.0212 10.88 8.9e-13 *** trend 0.3248 0.0209 15.57 < 2e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.557 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 104.607 MSE: 6.538 Root MSE: 2.557 Multiple R-Squared: 0.61 Adjusted R-Squared: 0.537 [1] "********** W3SLS with 2 (symbolic) restrictions ***************" systemfit results method: 3SLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 35 172 1.74 0.68 0.697 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 65.9 3.88 1.97 0.754 0.725 supply 20 16 105.7 6.60 2.57 0.606 0.532 The covariance matrix of the residuals used for estimation demand supply demand 3.88 4.55 supply 4.55 6.27 The covariance matrix of the residuals demand supply demand 3.88 4.88 supply 4.88 6.60 The correlations of the residuals demand supply demand 1.000 0.965 supply 0.965 1.000 3SLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 93.7870 7.9088 11.86 8.2e-14 *** price -0.2443 0.0892 -2.74 0.0096 ** income 0.3234 0.0229 14.14 4.4e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.969 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 65.907 MSE: 3.877 Root MSE: 1.969 Multiple R-Squared: 0.754 Adjusted R-Squared: 0.725 3SLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 49.8093 8.1522 6.11 5.5e-07 *** price 0.2557 0.0892 2.87 0.0069 ** farmPrice 0.2289 0.0237 9.67 2.0e-11 *** trend 0.3234 0.0229 14.14 4.4e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.57 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 105.659 MSE: 6.604 Root MSE: 2.57 Multiple R-Squared: 0.606 Adjusted R-Squared: 0.532 [1] "*************** 3SLS with 2 restrictions via R and restrict.regMat **********" systemfit results method: 3SLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 35 171 1.74 0.681 0.696 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 65.8 3.87 1.97 0.755 0.726 supply 20 16 105.4 6.59 2.57 0.607 0.533 The covariance matrix of the residuals used for estimation demand supply demand 3.89 4.53 supply 4.53 6.25 The covariance matrix of the residuals demand supply demand 3.87 4.87 supply 4.87 6.59 The correlations of the residuals demand supply demand 1.000 0.965 supply 0.965 1.000 3SLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 93.9070 7.9234 11.85 8.3e-14 *** price -0.2457 0.0891 -2.76 0.0092 ** income 0.3236 0.0233 13.91 8.9e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.967 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 65.807 MSE: 3.871 Root MSE: 1.967 Multiple R-Squared: 0.755 Adjusted R-Squared: 0.726 3SLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 49.9049 8.1797 6.10 5.7e-07 *** price 0.2543 0.0891 2.85 0.0072 ** farmPrice 0.2293 0.0241 9.52 3.1e-11 *** trend 0.3236 0.0233 13.91 8.9e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.566 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 105.389 MSE: 6.587 Root MSE: 2.566 Multiple R-Squared: 0.607 Adjusted R-Squared: 0.533 [1] "Component \"call\": target, current do not match when deparsed" [1] "******** 3SLS with 2 restrictions via R and restrict.regMat (EViews-like)*****" systemfit results method: 3SLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 35 170 1.19 0.683 0.658 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 65.6 3.86 1.96 0.755 0.727 supply 20 16 104.6 6.54 2.56 0.610 0.537 The covariance matrix of the residuals used for estimation demand supply demand 3.30 3.73 supply 3.73 5.00 The covariance matrix of the residuals demand supply demand 3.28 4.00 supply 4.00 5.23 The correlations of the residuals demand supply demand 1.000 0.965 supply 0.965 1.000 3SLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 94.1703 7.3154 12.87 7.8e-15 *** price -0.2494 0.0812 -3.07 0.0041 ** income 0.3248 0.0209 15.57 < 2e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.964 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 65.577 MSE: 3.857 Root MSE: 1.964 Multiple R-Squared: 0.755 Adjusted R-Squared: 0.727 3SLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 50.0853 7.5503 6.63 1.1e-07 *** price 0.2506 0.0812 3.09 0.0039 ** farmPrice 0.2312 0.0212 10.88 8.9e-13 *** trend 0.3248 0.0209 15.57 < 2e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.557 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 104.607 MSE: 6.538 Root MSE: 2.557 Multiple R-Squared: 0.61 Adjusted R-Squared: 0.537 [1] "*** W3SLS with 2 restrictions via R and restrict.regMat (EViews-like) ***" systemfit results method: 3SLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 35 170 1.19 0.682 0.659 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 65.6 3.86 1.97 0.755 0.726 supply 20 16 104.8 6.55 2.56 0.609 0.536 The covariance matrix of the residuals used for estimation demand supply demand 3.30 3.75 supply 3.75 5.01 The covariance matrix of the residuals demand supply demand 3.28 4.00 supply 4.00 5.24 The correlations of the residuals demand supply demand 1.000 0.965 supply 0.965 1.000 3SLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 94.0830 7.3058 12.88 7.5e-15 *** price -0.2484 0.0812 -3.06 0.0042 ** income 0.3246 0.0205 15.81 < 2e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.965 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 65.646 MSE: 3.862 Root MSE: 1.965 Multiple R-Squared: 0.755 Adjusted R-Squared: 0.726 3SLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 50.0190 7.5314 6.64 1.1e-07 *** price 0.2516 0.0812 3.10 0.0038 ** farmPrice 0.2309 0.0209 11.05 5.9e-13 *** trend 0.3246 0.0205 15.81 < 2e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.559 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 104.795 MSE: 6.55 Root MSE: 2.559 Multiple R-Squared: 0.609 Adjusted R-Squared: 0.536 systemfit results method: 3SLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 36 3690 5613 0.012 0.368 N DF SSR MSE RMSE R2 Adj R2 eq1 20 19 2132 112.2 10.59 0.305 0.305 eq2 20 17 1558 91.7 9.57 -1.335 -1.610 The covariance matrix of the residuals used for estimation eq1 eq2 eq1 112.2 -44.8 eq2 -44.8 56.8 The covariance matrix of the residuals eq1 eq2 eq1 112.2 -68.3 eq2 -68.3 91.7 The correlations of the residuals eq1 eq2 eq1 1.000 -0.674 eq2 -0.674 1.000 3SLS estimates for 'eq1' (equation 1) Model Formula: farmPrice ~ consump - 1 Instruments: ~trend + income Estimate Std. Error t value Pr(>|t|) consump 0.9588 0.0235 40.9 <2e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 10.592 on 19 degrees of freedom Number of observations: 20 Degrees of Freedom: 19 SSR: 2131.725 MSE: 112.196 Root MSE: 10.592 Multiple R-Squared: 0.305 Adjusted R-Squared: 0.305 3SLS estimates for 'eq2' (equation 2) Model Formula: price ~ consump + trend Instruments: ~trend + income Estimate Std. Error t value Pr(>|t|) (Intercept) -92.192 49.896 -1.85 0.0821 . consump 1.953 0.499 3.92 0.0011 ** trend -0.469 0.247 -1.90 0.0743 . --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 9.574 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 1558.311 MSE: 91.665 Root MSE: 9.574 Multiple R-Squared: -1.335 Adjusted R-Squared: -1.61 systemfit results method: 3SLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 38 56326 283068 -104 -10.6 N DF SSR MSE RMSE R2 Adj R2 eq1 20 19 2313 122 11.0 -7.63 -7.63 eq2 20 19 54013 2843 53.3 -200.46 -200.46 The covariance matrix of the residuals used for estimation eq1 eq2 eq1 121 -255 eq2 -255 2953 The covariance matrix of the residuals eq1 eq2 eq1 122 -251 eq2 -251 2843 The correlations of the residuals eq1 eq2 eq1 1.000 -0.433 eq2 -0.433 1.000 3SLS estimates for 'eq1' (equation 1) Model Formula: consump ~ farmPrice - 1 Instruments: ~price + income Estimate Std. Error t value Pr(>|t|) farmPrice 1.0417 0.0253 41.2 <2e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 11.034 on 19 degrees of freedom Number of observations: 20 Degrees of Freedom: 19 SSR: 2313.073 MSE: 121.741 Root MSE: 11.034 Multiple R-Squared: -7.627 Adjusted R-Squared: -7.627 3SLS estimates for 'eq2' (equation 2) Model Formula: consump ~ trend - 1 Instruments: ~price + income Estimate Std. Error t value Pr(>|t|) trend 9.02 1.13 8 1.7e-07 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 53.318 on 19 degrees of freedom Number of observations: 20 Degrees of Freedom: 19 SSR: 54013.367 MSE: 2842.809 Root MSE: 53.318 Multiple R-Squared: -200.456 Adjusted R-Squared: -200.456 systemfit results method: 3SLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 38 167069 397886 -49.1 -0.82 N DF SSR MSE RMSE R2 Adj R2 eq1 20 19 76692 4036 63.5 -285.0 -285.0 eq2 20 19 90377 4757 69.0 -28.5 -28.5 The covariance matrix of the residuals used for estimation eq1 eq2 eq1 2682 2547 eq2 2547 2741 The covariance matrix of the residuals eq1 eq2 eq1 4036 4336 eq2 4336 4757 The correlations of the residuals eq1 eq2 eq1 1.000 0.928 eq2 0.928 1.000 3SLS estimates for 'eq1' (equation 1) Model Formula: consump ~ trend - 1 Instruments: ~income + farmPrice Estimate Std. Error t value Pr(>|t|) trend 4.162 0.723 5.75 1.5e-05 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 63.533 on 19 degrees of freedom Number of observations: 20 Degrees of Freedom: 19 SSR: 76691.636 MSE: 4036.402 Root MSE: 63.533 Multiple R-Squared: -285.041 Adjusted R-Squared: -285.041 3SLS estimates for 'eq2' (equation 2) Model Formula: farmPrice ~ trend - 1 Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) trend 3.274 0.676 4.84 0.00011 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 68.969 on 19 degrees of freedom Number of observations: 20 Degrees of Freedom: 19 SSR: 90377.499 MSE: 4756.71 Root MSE: 68.969 Multiple R-Squared: -28.451 Adjusted R-Squared: -28.451 systemfit results method: 3SLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 39 161126 1162329 -171 -17.4 N DF SSR MSE RMSE R2 Adj R2 eq1 20 19 3553 187 13.7 -12.3 -12.3 eq2 20 19 157573 8293 91.1 -235.2 -235.2 The covariance matrix of the residuals used for estimation eq1 eq2 eq1 208 -731 eq2 -731 8271 The covariance matrix of the residuals eq1 eq2 eq1 187 -623 eq2 -623 8293 The correlations of the residuals eq1 eq2 eq1 1.000 -0.121 eq2 -0.121 1.000 3SLS estimates for 'eq1' (equation 1) Model Formula: consump ~ farmPrice - 1 Instruments: ~farmPrice + trend + income Estimate Std. Error t value Pr(>|t|) farmPrice 1.1122 0.0272 40.8 <2e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 13.675 on 19 degrees of freedom Number of observations: 20 Degrees of Freedom: 19 SSR: 3553.118 MSE: 187.006 Root MSE: 13.675 Multiple R-Squared: -12.252 Adjusted R-Squared: -12.252 3SLS estimates for 'eq2' (equation 2) Model Formula: price ~ trend - 1 Instruments: ~farmPrice + trend + income Estimate Std. Error t value Pr(>|t|) trend 1.1122 0.0272 40.8 <2e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 91.068 on 19 degrees of freedom Number of observations: 20 Degrees of Freedom: 19 SSR: 157573.328 MSE: 8293.333 Root MSE: 91.068 Multiple R-Squared: -235.153 Adjusted R-Squared: -235.153 systemfit results method: 3SLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 38 935 491 0 0 N DF SSR MSE RMSE R2 Adj R2 eq1 20 19 268 14.1 3.76 0 0 eq2 20 19 667 35.1 5.93 0 0 The covariance matrix of the residuals used for estimation eq1 eq2 eq1 14.11 2.18 eq2 2.18 35.12 The covariance matrix of the residuals eq1 eq2 eq1 14.11 2.18 eq2 2.18 35.12 The correlations of the residuals eq1 eq2 eq1 1.0000 0.0981 eq2 0.0981 1.0000 3SLS estimates for 'eq1' (equation 1) Model Formula: consump ~ 1 Instruments: ~income Estimate Std. Error t value Pr(>|t|) (Intercept) 100.90 0.84 120 <2e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 3.756 on 19 degrees of freedom Number of observations: 20 Degrees of Freedom: 19 SSR: 268.114 MSE: 14.111 Root MSE: 3.756 Multiple R-Squared: 0 Adjusted R-Squared: 0 3SLS estimates for 'eq2' (equation 2) Model Formula: price ~ 1 Instruments: ~income Estimate Std. Error t value Pr(>|t|) (Intercept) 100.02 1.33 75.5 <2e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 5.926 on 19 degrees of freedom Number of observations: 20 Degrees of Freedom: 19 SSR: 667.251 MSE: 35.118 Root MSE: 5.926 Multiple R-Squared: 0 Adjusted R-Squared: 0 [1] "***************************************************" [1] "3SLS formula: Schmidt" [1] "************* 3SLS *********************************" systemfit results method: 3SLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 33 174 1.03 0.676 0.786 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 65.7 3.87 1.97 0.755 0.726 supply 20 16 107.9 6.75 2.60 0.598 0.522 The covariance matrix of the residuals used for estimation demand supply demand 3.87 4.36 supply 4.36 6.04 The covariance matrix of the residuals demand supply demand 3.87 5.00 supply 5.00 6.74 The correlations of the residuals demand supply demand 1.00 0.98 supply 0.98 1.00 3SLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 94.6333 7.9208 11.95 1.1e-09 *** price -0.2436 0.0965 -2.52 0.022 * income 0.3140 0.0469 6.69 3.8e-06 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.966 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 65.729 MSE: 3.866 Root MSE: 1.966 Multiple R-Squared: 0.755 Adjusted R-Squared: 0.726 3SLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 52.1972 11.8934 4.39 0.00046 *** price 0.2286 0.0997 2.29 0.03571 * farmPrice 0.2282 0.0440 5.19 9e-05 *** trend 0.3611 0.0729 4.95 0.00014 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.597 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 107.914 MSE: 6.745 Root MSE: 2.597 Multiple R-Squared: 0.598 Adjusted R-Squared: 0.522 [1] "********************* 3SLS EViews-like *****************" systemfit results method: 3SLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 33 173 0.719 0.677 0.748 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 65.7 3.87 1.97 0.755 0.726 supply 20 16 107.2 6.70 2.59 0.600 0.525 The covariance matrix of the residuals used for estimation demand supply demand 3.29 3.59 supply 3.59 4.83 The covariance matrix of the residuals demand supply demand 3.29 4.11 supply 4.11 5.36 The correlations of the residuals demand supply demand 1.000 0.979 supply 0.979 1.000 3SLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 94.6333 7.3027 12.96 1.7e-14 *** price -0.2436 0.0890 -2.74 0.0099 ** income 0.3140 0.0433 7.25 2.5e-08 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.966 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 65.729 MSE: 3.866 Root MSE: 1.966 Multiple R-Squared: 0.755 Adjusted R-Squared: 0.726 3SLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 52.1176 10.6378 4.90 2.5e-05 *** price 0.2289 0.0892 2.57 0.015 * farmPrice 0.2290 0.0393 5.82 1.6e-06 *** trend 0.3579 0.0652 5.49 4.3e-06 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.589 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 107.216 MSE: 6.701 Root MSE: 2.589 Multiple R-Squared: 0.6 Adjusted R-Squared: 0.525 [1] "********************* 3SLS with methodResidCov = Theil *****************" systemfit results method: 3SLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 33 174 -0.718 0.675 0.922 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 65.7 3.87 1.97 0.755 0.726 supply 20 16 108.7 6.79 2.61 0.594 0.518 The covariance matrix of the residuals used for estimation demand supply demand 3.87 4.50 supply 4.50 6.04 warning: this covariance matrix is NOT positive semidefinit! The covariance matrix of the residuals demand supply demand 3.87 5.2 supply 5.20 6.8 The correlations of the residuals demand supply demand 1.000 0.981 supply 0.981 1.000 3SLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 94.6333 7.9208 11.95 1.6e-13 *** price -0.2436 0.0965 -2.52 0.017 * income 0.3140 0.0469 6.69 1.3e-07 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.966 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 65.729 MSE: 3.866 Root MSE: 1.966 Multiple R-Squared: 0.755 Adjusted R-Squared: 0.726 3SLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 52.2869 11.8853 4.40 0.00011 *** price 0.2282 0.0997 2.29 0.02855 * farmPrice 0.2272 0.0438 5.19 1.0e-05 *** trend 0.3648 0.0707 5.16 1.1e-05 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.607 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 108.727 MSE: 6.795 Root MSE: 2.607 Multiple R-Squared: 0.594 Adjusted R-Squared: 0.518 [1] "*************** W3SLS with methodResidCov = Theil *****************" systemfit results method: 3SLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 33 174 -0.718 0.675 0.922 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 65.7 3.87 1.97 0.755 0.726 supply 20 16 108.7 6.79 2.61 0.594 0.518 The covariance matrix of the residuals used for estimation demand supply demand 3.87 4.50 supply 4.50 6.04 warning: this covariance matrix is NOT positive semidefinit! The covariance matrix of the residuals demand supply demand 3.87 5.2 supply 5.20 6.8 The correlations of the residuals demand supply demand 1.000 0.981 supply 0.981 1.000 3SLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 94.6333 7.9208 11.95 1.6e-13 *** price -0.2436 0.0965 -2.52 0.017 * income 0.3140 0.0469 6.69 1.3e-07 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.966 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 65.729 MSE: 3.866 Root MSE: 1.966 Multiple R-Squared: 0.755 Adjusted R-Squared: 0.726 3SLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 52.2869 11.8853 4.40 0.00011 *** price 0.2282 0.0997 2.29 0.02855 * farmPrice 0.2272 0.0438 5.19 1.0e-05 *** trend 0.3648 0.0707 5.16 1.1e-05 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.607 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 108.727 MSE: 6.795 Root MSE: 2.607 Multiple R-Squared: 0.594 Adjusted R-Squared: 0.518 [1] "*************** 3SLS with restriction *****************" systemfit results method: 3SLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 34 173 1.27 0.678 0.722 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 67.8 3.99 2.00 0.747 0.717 supply 20 16 104.8 6.55 2.56 0.609 0.536 The covariance matrix of the residuals used for estimation demand supply demand 3.97 4.55 supply 4.55 6.13 The covariance matrix of the residuals demand supply demand 3.99 4.98 supply 4.98 6.55 The correlations of the residuals demand supply demand 1.000 0.975 supply 0.975 1.000 3SLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 94.222 8.015 11.76 1.6e-13 *** price -0.222 0.096 -2.31 0.027 * income 0.296 0.045 6.57 1.6e-07 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.997 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 67.796 MSE: 3.988 Root MSE: 1.997 Multiple R-Squared: 0.747 Adjusted R-Squared: 0.717 3SLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 55.9604 11.5777 4.83 2.8e-05 *** price 0.2193 0.1002 2.19 0.036 * farmPrice 0.2060 0.0403 5.11 1.3e-05 *** trend 0.2956 0.0450 6.57 1.6e-07 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.559 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 104.753 MSE: 6.547 Root MSE: 2.559 Multiple R-Squared: 0.609 Adjusted R-Squared: 0.536 [1] "Component \"call\": target, current do not match when deparsed" [1] "************** 3SLS with restriction (EViews-like) *****************" systemfit results method: 3SLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 34 171 0.887 0.68 0.678 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 67.5 3.97 1.99 0.748 0.719 supply 20 16 104.0 6.50 2.55 0.612 0.539 The covariance matrix of the residuals used for estimation demand supply demand 3.37 3.75 supply 3.75 4.91 The covariance matrix of the residuals demand supply demand 3.37 4.08 supply 4.08 5.20 The correlations of the residuals demand supply demand 1.000 0.974 supply 0.974 1.000 3SLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 94.2737 7.3905 12.76 1.6e-14 *** price -0.2243 0.0888 -2.53 0.016 * income 0.2979 0.0420 7.10 3.4e-08 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.992 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 67.467 MSE: 3.969 Root MSE: 1.992 Multiple R-Squared: 0.748 Adjusted R-Squared: 0.719 3SLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 55.4521 10.3994 5.33 6.4e-06 *** price 0.2207 0.0896 2.46 0.019 * farmPrice 0.2095 0.0366 5.73 1.9e-06 *** trend 0.2979 0.0420 7.10 3.4e-08 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.55 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 104.013 MSE: 6.501 Root MSE: 2.55 Multiple R-Squared: 0.612 Adjusted R-Squared: 0.539 [1] 40 [1] "*************** W3SLS with restriction *****************" systemfit results method: 3SLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 34 173 1.24 0.677 0.725 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 68.1 4.00 2.00 0.746 0.716 supply 20 16 105.2 6.57 2.56 0.608 0.534 The covariance matrix of the residuals used for estimation demand supply demand 3.93 4.56 supply 4.56 6.15 The covariance matrix of the residuals demand supply demand 4.00 5.01 supply 5.01 6.57 The correlations of the residuals demand supply demand 1.000 0.976 supply 0.976 1.000 3SLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 94.1823 7.9793 11.8 1.4e-13 *** price -0.2194 0.0954 -2.3 0.028 * income 0.2938 0.0445 6.6 1.4e-07 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.001 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 68.057 MSE: 4.003 Root MSE: 2.001 Multiple R-Squared: 0.746 Adjusted R-Squared: 0.716 3SLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 56.2541 11.5687 4.86 2.6e-05 *** price 0.2184 0.1003 2.18 0.036 * farmPrice 0.2040 0.0401 5.09 1.3e-05 *** trend 0.2938 0.0445 6.60 1.4e-07 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.564 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 105.161 MSE: 6.573 Root MSE: 2.564 Multiple R-Squared: 0.608 Adjusted R-Squared: 0.534 [1] "*************** 3SLS with restriction via restrict.regMat ********************" systemfit results method: 3SLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 34 173 1.27 0.678 0.722 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 67.8 3.99 2.00 0.747 0.717 supply 20 16 104.8 6.55 2.56 0.609 0.536 The covariance matrix of the residuals used for estimation demand supply demand 3.97 4.55 supply 4.55 6.13 The covariance matrix of the residuals demand supply demand 3.99 4.98 supply 4.98 6.55 The correlations of the residuals demand supply demand 1.000 0.975 supply 0.975 1.000 3SLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 94.222 8.015 11.76 1.6e-13 *** price -0.222 0.096 -2.31 0.027 * income 0.296 0.045 6.57 1.6e-07 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.997 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 67.796 MSE: 3.988 Root MSE: 1.997 Multiple R-Squared: 0.747 Adjusted R-Squared: 0.717 3SLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 55.9604 11.5777 4.83 2.8e-05 *** price 0.2193 0.1002 2.19 0.036 * farmPrice 0.2060 0.0403 5.11 1.3e-05 *** trend 0.2956 0.0450 6.57 1.6e-07 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.559 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 104.753 MSE: 6.547 Root MSE: 2.559 Multiple R-Squared: 0.609 Adjusted R-Squared: 0.536 [1] "*************** 3SLS with restriction via restrict.regMat (EViews-like) *******" systemfit results method: 3SLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 34 171 0.887 0.68 0.678 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 67.5 3.97 1.99 0.748 0.719 supply 20 16 104.0 6.50 2.55 0.612 0.539 The covariance matrix of the residuals used for estimation demand supply demand 3.37 3.75 supply 3.75 4.91 The covariance matrix of the residuals demand supply demand 3.37 4.08 supply 4.08 5.20 The correlations of the residuals demand supply demand 1.000 0.974 supply 0.974 1.000 3SLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 94.2737 7.3905 12.76 1.6e-14 *** price -0.2243 0.0888 -2.53 0.016 * income 0.2979 0.0420 7.10 3.4e-08 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.992 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 67.467 MSE: 3.969 Root MSE: 1.992 Multiple R-Squared: 0.748 Adjusted R-Squared: 0.719 3SLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 55.4521 10.3994 5.33 6.4e-06 *** price 0.2207 0.0896 2.46 0.019 * farmPrice 0.2095 0.0366 5.73 1.9e-06 *** trend 0.2979 0.0420 7.10 3.4e-08 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.55 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 104.013 MSE: 6.501 Root MSE: 2.55 Multiple R-Squared: 0.612 Adjusted R-Squared: 0.539 [1] "**** W3SLS with restriction via restrict.regMat (EViews-like) ****" systemfit results method: 3SLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 34 172 0.873 0.679 0.681 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 67.7 3.98 2.00 0.748 0.718 supply 20 16 104.3 6.52 2.55 0.611 0.538 The covariance matrix of the residuals used for estimation demand supply demand 3.35 3.76 supply 3.76 4.92 The covariance matrix of the residuals demand supply demand 3.38 4.10 supply 4.10 5.22 The correlations of the residuals demand supply demand 1.000 0.975 supply 0.975 1.000 3SLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 94.2409 7.3617 12.80 1.5e-14 *** price -0.2225 0.0883 -2.52 0.017 * income 0.2964 0.0416 7.13 3.1e-08 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.995 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 67.672 MSE: 3.981 Root MSE: 1.995 Multiple R-Squared: 0.748 Adjusted R-Squared: 0.718 3SLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 55.6925 10.3937 5.36 5.9e-06 *** price 0.2201 0.0897 2.45 0.019 * farmPrice 0.2078 0.0364 5.71 2.0e-06 *** trend 0.2964 0.0416 7.13 3.1e-08 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.553 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 104.312 MSE: 6.519 Root MSE: 2.553 Multiple R-Squared: 0.611 Adjusted R-Squared: 0.538 [1] "*************** 3SLS with 2 restrictions **********************" systemfit results method: 3SLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 35 171 1.74 0.681 0.696 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 65.8 3.87 1.97 0.755 0.726 supply 20 16 105.4 6.59 2.57 0.607 0.533 The covariance matrix of the residuals used for estimation demand supply demand 3.89 4.53 supply 4.53 6.25 The covariance matrix of the residuals demand supply demand 3.87 4.87 supply 4.87 6.59 The correlations of the residuals demand supply demand 1.000 0.965 supply 0.965 1.000 3SLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 93.9070 7.9234 11.85 8.3e-14 *** price -0.2457 0.0891 -2.76 0.0092 ** income 0.3236 0.0233 13.91 8.9e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.967 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 65.807 MSE: 3.871 Root MSE: 1.967 Multiple R-Squared: 0.755 Adjusted R-Squared: 0.726 3SLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 49.9049 8.1797 6.10 5.7e-07 *** price 0.2543 0.0891 2.85 0.0072 ** farmPrice 0.2293 0.0241 9.52 3.1e-11 *** trend 0.3236 0.0233 13.91 8.9e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.566 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 105.389 MSE: 6.587 Root MSE: 2.566 Multiple R-Squared: 0.607 Adjusted R-Squared: 0.533 [1] "Component \"call\": target, current do not match when deparsed" [1] "*************** 3SLS with 2 restrictions (EViews-like) ************" systemfit results method: 3SLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 35 170 1.19 0.683 0.658 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 65.6 3.86 1.96 0.755 0.727 supply 20 16 104.6 6.54 2.56 0.610 0.537 The covariance matrix of the residuals used for estimation demand supply demand 3.30 3.73 supply 3.73 5.00 The covariance matrix of the residuals demand supply demand 3.28 4.00 supply 4.00 5.23 The correlations of the residuals demand supply demand 1.000 0.965 supply 0.965 1.000 3SLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 94.1703 7.3154 12.87 7.8e-15 *** price -0.2494 0.0812 -3.07 0.0041 ** income 0.3248 0.0209 15.57 < 2e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.964 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 65.577 MSE: 3.857 Root MSE: 1.964 Multiple R-Squared: 0.755 Adjusted R-Squared: 0.727 3SLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 50.0853 7.5503 6.63 1.1e-07 *** price 0.2506 0.0812 3.09 0.0039 ** farmPrice 0.2312 0.0212 10.88 8.9e-13 *** trend 0.3248 0.0209 15.57 < 2e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.557 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 104.607 MSE: 6.538 Root MSE: 2.557 Multiple R-Squared: 0.61 Adjusted R-Squared: 0.537 [1] "********** W3SLS with 2 (symbolic) restrictions ***************" systemfit results method: 3SLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 35 172 1.74 0.68 0.697 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 65.9 3.88 1.97 0.754 0.725 supply 20 16 105.7 6.60 2.57 0.606 0.532 The covariance matrix of the residuals used for estimation demand supply demand 3.88 4.55 supply 4.55 6.27 The covariance matrix of the residuals demand supply demand 3.88 4.88 supply 4.88 6.60 The correlations of the residuals demand supply demand 1.000 0.965 supply 0.965 1.000 3SLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 93.7870 7.9088 11.86 8.2e-14 *** price -0.2443 0.0892 -2.74 0.0096 ** income 0.3234 0.0229 14.14 4.4e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.969 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 65.907 MSE: 3.877 Root MSE: 1.969 Multiple R-Squared: 0.754 Adjusted R-Squared: 0.725 3SLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 49.8093 8.1522 6.11 5.5e-07 *** price 0.2557 0.0892 2.87 0.0069 ** farmPrice 0.2289 0.0237 9.67 2.0e-11 *** trend 0.3234 0.0229 14.14 4.4e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.57 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 105.659 MSE: 6.604 Root MSE: 2.57 Multiple R-Squared: 0.606 Adjusted R-Squared: 0.532 [1] "*************** 3SLS with 2 restrictions via R and restrict.regMat **********" systemfit results method: 3SLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 35 171 1.74 0.681 0.696 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 65.8 3.87 1.97 0.755 0.726 supply 20 16 105.4 6.59 2.57 0.607 0.533 The covariance matrix of the residuals used for estimation demand supply demand 3.89 4.53 supply 4.53 6.25 The covariance matrix of the residuals demand supply demand 3.87 4.87 supply 4.87 6.59 The correlations of the residuals demand supply demand 1.000 0.965 supply 0.965 1.000 3SLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 93.9070 7.9234 11.85 8.3e-14 *** price -0.2457 0.0891 -2.76 0.0092 ** income 0.3236 0.0233 13.91 8.9e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.967 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 65.807 MSE: 3.871 Root MSE: 1.967 Multiple R-Squared: 0.755 Adjusted R-Squared: 0.726 3SLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 49.9049 8.1797 6.10 5.7e-07 *** price 0.2543 0.0891 2.85 0.0072 ** farmPrice 0.2293 0.0241 9.52 3.1e-11 *** trend 0.3236 0.0233 13.91 8.9e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.566 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 105.389 MSE: 6.587 Root MSE: 2.566 Multiple R-Squared: 0.607 Adjusted R-Squared: 0.533 [1] "Component \"call\": target, current do not match when deparsed" [1] "******** 3SLS with 2 restrictions via R and restrict.regMat (EViews-like)*****" systemfit results method: 3SLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 35 170 1.19 0.683 0.658 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 65.6 3.86 1.96 0.755 0.727 supply 20 16 104.6 6.54 2.56 0.610 0.537 The covariance matrix of the residuals used for estimation demand supply demand 3.30 3.73 supply 3.73 5.00 The covariance matrix of the residuals demand supply demand 3.28 4.00 supply 4.00 5.23 The correlations of the residuals demand supply demand 1.000 0.965 supply 0.965 1.000 3SLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 94.1703 7.3154 12.87 7.8e-15 *** price -0.2494 0.0812 -3.07 0.0041 ** income 0.3248 0.0209 15.57 < 2e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.964 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 65.577 MSE: 3.857 Root MSE: 1.964 Multiple R-Squared: 0.755 Adjusted R-Squared: 0.727 3SLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 50.0853 7.5503 6.63 1.1e-07 *** price 0.2506 0.0812 3.09 0.0039 ** farmPrice 0.2312 0.0212 10.88 8.9e-13 *** trend 0.3248 0.0209 15.57 < 2e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.557 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 104.607 MSE: 6.538 Root MSE: 2.557 Multiple R-Squared: 0.61 Adjusted R-Squared: 0.537 [1] "*** W3SLS with 2 restrictions via R and restrict.regMat (EViews-like) ***" systemfit results method: 3SLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 35 170 1.19 0.682 0.659 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 65.6 3.86 1.97 0.755 0.726 supply 20 16 104.8 6.55 2.56 0.609 0.536 The covariance matrix of the residuals used for estimation demand supply demand 3.30 3.75 supply 3.75 5.01 The covariance matrix of the residuals demand supply demand 3.28 4.00 supply 4.00 5.24 The correlations of the residuals demand supply demand 1.000 0.965 supply 0.965 1.000 3SLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 94.0830 7.3058 12.88 7.5e-15 *** price -0.2484 0.0812 -3.06 0.0042 ** income 0.3246 0.0205 15.81 < 2e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.965 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 65.646 MSE: 3.862 Root MSE: 1.965 Multiple R-Squared: 0.755 Adjusted R-Squared: 0.726 3SLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 50.0190 7.5314 6.64 1.1e-07 *** price 0.2516 0.0812 3.10 0.0038 ** farmPrice 0.2309 0.0209 11.05 5.9e-13 *** trend 0.3246 0.0205 15.81 < 2e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.559 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 104.795 MSE: 6.55 Root MSE: 2.559 Multiple R-Squared: 0.609 Adjusted R-Squared: 0.536 systemfit results method: 3SLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 36 3690 5613 0.012 0.368 N DF SSR MSE RMSE R2 Adj R2 eq1 20 19 2132 112.2 10.59 0.305 0.305 eq2 20 17 1558 91.7 9.57 -1.335 -1.610 The covariance matrix of the residuals used for estimation eq1 eq2 eq1 112.2 -44.8 eq2 -44.8 56.8 The covariance matrix of the residuals eq1 eq2 eq1 112.2 -68.3 eq2 -68.3 91.7 The correlations of the residuals eq1 eq2 eq1 1.000 -0.674 eq2 -0.674 1.000 3SLS estimates for 'eq1' (equation 1) Model Formula: farmPrice ~ consump - 1 Instruments: ~trend + income Estimate Std. Error t value Pr(>|t|) consump 0.9588 0.0235 40.9 <2e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 10.592 on 19 degrees of freedom Number of observations: 20 Degrees of Freedom: 19 SSR: 2131.725 MSE: 112.196 Root MSE: 10.592 Multiple R-Squared: 0.305 Adjusted R-Squared: 0.305 3SLS estimates for 'eq2' (equation 2) Model Formula: price ~ consump + trend Instruments: ~trend + income Estimate Std. Error t value Pr(>|t|) (Intercept) -92.192 49.896 -1.85 0.0821 . consump 1.953 0.499 3.92 0.0011 ** trend -0.469 0.247 -1.90 0.0743 . --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 9.574 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 1558.311 MSE: 91.665 Root MSE: 9.574 Multiple R-Squared: -1.335 Adjusted R-Squared: -1.61 systemfit results method: 3SLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 38 56326 283068 -104 -10.6 N DF SSR MSE RMSE R2 Adj R2 eq1 20 19 2313 122 11.0 -7.63 -7.63 eq2 20 19 54013 2843 53.3 -200.46 -200.46 The covariance matrix of the residuals used for estimation eq1 eq2 eq1 121 -255 eq2 -255 2953 The covariance matrix of the residuals eq1 eq2 eq1 122 -251 eq2 -251 2843 The correlations of the residuals eq1 eq2 eq1 1.000 -0.433 eq2 -0.433 1.000 3SLS estimates for 'eq1' (equation 1) Model Formula: consump ~ farmPrice - 1 Instruments: ~price + income Estimate Std. Error t value Pr(>|t|) farmPrice 1.0417 0.0253 41.2 <2e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 11.034 on 19 degrees of freedom Number of observations: 20 Degrees of Freedom: 19 SSR: 2313.073 MSE: 121.741 Root MSE: 11.034 Multiple R-Squared: -7.627 Adjusted R-Squared: -7.627 3SLS estimates for 'eq2' (equation 2) Model Formula: consump ~ trend - 1 Instruments: ~price + income Estimate Std. Error t value Pr(>|t|) trend 9.02 1.13 8 1.7e-07 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 53.318 on 19 degrees of freedom Number of observations: 20 Degrees of Freedom: 19 SSR: 54013.367 MSE: 2842.809 Root MSE: 53.318 Multiple R-Squared: -200.456 Adjusted R-Squared: -200.456 systemfit results method: 3SLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 38 167069 397886 -49.1 -0.82 N DF SSR MSE RMSE R2 Adj R2 eq1 20 19 76692 4036 63.5 -285.0 -285.0 eq2 20 19 90377 4757 69.0 -28.5 -28.5 The covariance matrix of the residuals used for estimation eq1 eq2 eq1 2682 2547 eq2 2547 2741 The covariance matrix of the residuals eq1 eq2 eq1 4036 4336 eq2 4336 4757 The correlations of the residuals eq1 eq2 eq1 1.000 0.928 eq2 0.928 1.000 3SLS estimates for 'eq1' (equation 1) Model Formula: consump ~ trend - 1 Instruments: ~income + farmPrice Estimate Std. Error t value Pr(>|t|) trend 4.162 0.723 5.75 1.5e-05 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 63.533 on 19 degrees of freedom Number of observations: 20 Degrees of Freedom: 19 SSR: 76691.636 MSE: 4036.402 Root MSE: 63.533 Multiple R-Squared: -285.041 Adjusted R-Squared: -285.041 3SLS estimates for 'eq2' (equation 2) Model Formula: farmPrice ~ trend - 1 Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) trend 3.274 0.676 4.84 0.00011 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 68.969 on 19 degrees of freedom Number of observations: 20 Degrees of Freedom: 19 SSR: 90377.499 MSE: 4756.71 Root MSE: 68.969 Multiple R-Squared: -28.451 Adjusted R-Squared: -28.451 systemfit results method: 3SLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 39 161126 1162329 -171 -17.4 N DF SSR MSE RMSE R2 Adj R2 eq1 20 19 3553 187 13.7 -12.3 -12.3 eq2 20 19 157573 8293 91.1 -235.2 -235.2 The covariance matrix of the residuals used for estimation eq1 eq2 eq1 208 -731 eq2 -731 8271 The covariance matrix of the residuals eq1 eq2 eq1 187 -623 eq2 -623 8293 The correlations of the residuals eq1 eq2 eq1 1.000 -0.121 eq2 -0.121 1.000 3SLS estimates for 'eq1' (equation 1) Model Formula: consump ~ farmPrice - 1 Instruments: ~farmPrice + trend + income Estimate Std. Error t value Pr(>|t|) farmPrice 1.1122 0.0272 40.8 <2e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 13.675 on 19 degrees of freedom Number of observations: 20 Degrees of Freedom: 19 SSR: 3553.118 MSE: 187.006 Root MSE: 13.675 Multiple R-Squared: -12.252 Adjusted R-Squared: -12.252 3SLS estimates for 'eq2' (equation 2) Model Formula: price ~ trend - 1 Instruments: ~farmPrice + trend + income Estimate Std. Error t value Pr(>|t|) trend 1.1122 0.0272 40.8 <2e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 91.068 on 19 degrees of freedom Number of observations: 20 Degrees of Freedom: 19 SSR: 157573.328 MSE: 8293.333 Root MSE: 91.068 Multiple R-Squared: -235.153 Adjusted R-Squared: -235.153 systemfit results method: 3SLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 38 935 491 0 0 N DF SSR MSE RMSE R2 Adj R2 eq1 20 19 268 14.1 3.76 0 0 eq2 20 19 667 35.1 5.93 0 0 The covariance matrix of the residuals used for estimation eq1 eq2 eq1 14.11 2.18 eq2 2.18 35.12 The covariance matrix of the residuals eq1 eq2 eq1 14.11 2.18 eq2 2.18 35.12 The correlations of the residuals eq1 eq2 eq1 1.0000 0.0981 eq2 0.0981 1.0000 3SLS estimates for 'eq1' (equation 1) Model Formula: consump ~ 1 Instruments: ~income Estimate Std. Error t value Pr(>|t|) (Intercept) 100.90 0.84 120 <2e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 3.756 on 19 degrees of freedom Number of observations: 20 Degrees of Freedom: 19 SSR: 268.114 MSE: 14.111 Root MSE: 3.756 Multiple R-Squared: 0 Adjusted R-Squared: 0 3SLS estimates for 'eq2' (equation 2) Model Formula: price ~ 1 Instruments: ~income Estimate Std. Error t value Pr(>|t|) (Intercept) 100.02 1.33 75.5 <2e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 5.926 on 19 degrees of freedom Number of observations: 20 Degrees of Freedom: 19 SSR: 667.251 MSE: 35.118 Root MSE: 5.926 Multiple R-Squared: 0 Adjusted R-Squared: 0 [1] "***************************************************" [1] "3SLS formula: GMM" [1] "************* 3SLS *********************************" systemfit results method: 3SLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 33 174 1.03 0.676 0.786 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 65.7 3.87 1.97 0.755 0.726 supply 20 16 107.9 6.75 2.60 0.598 0.522 The covariance matrix of the residuals used for estimation demand supply demand 3.87 4.36 supply 4.36 6.04 The covariance matrix of the residuals demand supply demand 3.87 5.00 supply 5.00 6.74 The correlations of the residuals demand supply demand 1.00 0.98 supply 0.98 1.00 3SLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 94.6333 7.9208 11.95 1.1e-09 *** price -0.2436 0.0965 -2.52 0.022 * income 0.3140 0.0469 6.69 3.8e-06 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.966 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 65.729 MSE: 3.866 Root MSE: 1.966 Multiple R-Squared: 0.755 Adjusted R-Squared: 0.726 3SLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 52.1972 11.8934 4.39 0.00046 *** price 0.2286 0.0997 2.29 0.03571 * farmPrice 0.2282 0.0440 5.19 9e-05 *** trend 0.3611 0.0729 4.95 0.00014 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.597 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 107.914 MSE: 6.745 Root MSE: 2.597 Multiple R-Squared: 0.598 Adjusted R-Squared: 0.522 [1] "********************* 3SLS EViews-like *****************" systemfit results method: 3SLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 33 173 0.719 0.677 0.748 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 65.7 3.87 1.97 0.755 0.726 supply 20 16 107.2 6.70 2.59 0.600 0.525 The covariance matrix of the residuals used for estimation demand supply demand 3.29 3.59 supply 3.59 4.83 The covariance matrix of the residuals demand supply demand 3.29 4.11 supply 4.11 5.36 The correlations of the residuals demand supply demand 1.000 0.979 supply 0.979 1.000 3SLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 94.6333 7.3027 12.96 1.7e-14 *** price -0.2436 0.0890 -2.74 0.0099 ** income 0.3140 0.0433 7.25 2.5e-08 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.966 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 65.729 MSE: 3.866 Root MSE: 1.966 Multiple R-Squared: 0.755 Adjusted R-Squared: 0.726 3SLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 52.1176 10.6378 4.90 2.5e-05 *** price 0.2289 0.0892 2.57 0.015 * farmPrice 0.2290 0.0393 5.82 1.6e-06 *** trend 0.3579 0.0652 5.49 4.3e-06 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.589 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 107.216 MSE: 6.701 Root MSE: 2.589 Multiple R-Squared: 0.6 Adjusted R-Squared: 0.525 [1] "********************* 3SLS with methodResidCov = Theil *****************" systemfit results method: 3SLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 33 174 -0.718 0.675 0.922 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 65.7 3.87 1.97 0.755 0.726 supply 20 16 108.7 6.79 2.61 0.594 0.518 The covariance matrix of the residuals used for estimation demand supply demand 3.87 4.50 supply 4.50 6.04 warning: this covariance matrix is NOT positive semidefinit! The covariance matrix of the residuals demand supply demand 3.87 5.2 supply 5.20 6.8 The correlations of the residuals demand supply demand 1.000 0.981 supply 0.981 1.000 3SLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 94.6333 7.9208 11.95 1.6e-13 *** price -0.2436 0.0965 -2.52 0.017 * income 0.3140 0.0469 6.69 1.3e-07 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.966 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 65.729 MSE: 3.866 Root MSE: 1.966 Multiple R-Squared: 0.755 Adjusted R-Squared: 0.726 3SLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 52.2869 11.8853 4.40 0.00011 *** price 0.2282 0.0997 2.29 0.02855 * farmPrice 0.2272 0.0438 5.19 1.0e-05 *** trend 0.3648 0.0707 5.16 1.1e-05 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.607 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 108.727 MSE: 6.795 Root MSE: 2.607 Multiple R-Squared: 0.594 Adjusted R-Squared: 0.518 [1] "*************** W3SLS with methodResidCov = Theil *****************" systemfit results method: 3SLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 33 174 -0.718 0.675 0.922 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 65.7 3.87 1.97 0.755 0.726 supply 20 16 108.7 6.79 2.61 0.594 0.518 The covariance matrix of the residuals used for estimation demand supply demand 3.87 4.50 supply 4.50 6.04 warning: this covariance matrix is NOT positive semidefinit! The covariance matrix of the residuals demand supply demand 3.87 5.2 supply 5.20 6.8 The correlations of the residuals demand supply demand 1.000 0.981 supply 0.981 1.000 3SLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 94.6333 7.9208 11.95 1.6e-13 *** price -0.2436 0.0965 -2.52 0.017 * income 0.3140 0.0469 6.69 1.3e-07 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.966 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 65.729 MSE: 3.866 Root MSE: 1.966 Multiple R-Squared: 0.755 Adjusted R-Squared: 0.726 3SLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 52.2869 11.8853 4.40 0.00011 *** price 0.2282 0.0997 2.29 0.02855 * farmPrice 0.2272 0.0438 5.19 1.0e-05 *** trend 0.3648 0.0707 5.16 1.1e-05 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.607 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 108.727 MSE: 6.795 Root MSE: 2.607 Multiple R-Squared: 0.594 Adjusted R-Squared: 0.518 [1] "*************** 3SLS with restriction *****************" systemfit results method: 3SLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 34 173 1.27 0.678 0.722 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 67.8 3.99 2.00 0.747 0.717 supply 20 16 104.8 6.55 2.56 0.609 0.536 The covariance matrix of the residuals used for estimation demand supply demand 3.97 4.55 supply 4.55 6.13 The covariance matrix of the residuals demand supply demand 3.99 4.98 supply 4.98 6.55 The correlations of the residuals demand supply demand 1.000 0.975 supply 0.975 1.000 3SLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 94.222 8.015 11.76 1.6e-13 *** price -0.222 0.096 -2.31 0.027 * income 0.296 0.045 6.57 1.6e-07 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.997 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 67.796 MSE: 3.988 Root MSE: 1.997 Multiple R-Squared: 0.747 Adjusted R-Squared: 0.717 3SLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 55.9604 11.5777 4.83 2.8e-05 *** price 0.2193 0.1002 2.19 0.036 * farmPrice 0.2060 0.0403 5.11 1.3e-05 *** trend 0.2956 0.0450 6.57 1.6e-07 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.559 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 104.753 MSE: 6.547 Root MSE: 2.559 Multiple R-Squared: 0.609 Adjusted R-Squared: 0.536 [1] "Component \"call\": target, current do not match when deparsed" [1] "************** 3SLS with restriction (EViews-like) *****************" systemfit results method: 3SLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 34 171 0.887 0.68 0.678 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 67.5 3.97 1.99 0.748 0.719 supply 20 16 104.0 6.50 2.55 0.612 0.539 The covariance matrix of the residuals used for estimation demand supply demand 3.37 3.75 supply 3.75 4.91 The covariance matrix of the residuals demand supply demand 3.37 4.08 supply 4.08 5.20 The correlations of the residuals demand supply demand 1.000 0.974 supply 0.974 1.000 3SLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 94.2737 7.3905 12.76 1.6e-14 *** price -0.2243 0.0888 -2.53 0.016 * income 0.2979 0.0420 7.10 3.4e-08 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.992 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 67.467 MSE: 3.969 Root MSE: 1.992 Multiple R-Squared: 0.748 Adjusted R-Squared: 0.719 3SLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 55.4521 10.3994 5.33 6.4e-06 *** price 0.2207 0.0896 2.46 0.019 * farmPrice 0.2095 0.0366 5.73 1.9e-06 *** trend 0.2979 0.0420 7.10 3.4e-08 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.55 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 104.013 MSE: 6.501 Root MSE: 2.55 Multiple R-Squared: 0.612 Adjusted R-Squared: 0.539 [1] 40 [1] "*************** W3SLS with restriction *****************" systemfit results method: 3SLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 34 173 1.24 0.677 0.725 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 68.1 4.00 2.00 0.746 0.716 supply 20 16 105.2 6.57 2.56 0.608 0.534 The covariance matrix of the residuals used for estimation demand supply demand 3.93 4.56 supply 4.56 6.15 The covariance matrix of the residuals demand supply demand 4.00 5.01 supply 5.01 6.57 The correlations of the residuals demand supply demand 1.000 0.976 supply 0.976 1.000 3SLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 94.1823 7.9793 11.8 1.4e-13 *** price -0.2194 0.0954 -2.3 0.028 * income 0.2938 0.0445 6.6 1.4e-07 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.001 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 68.057 MSE: 4.003 Root MSE: 2.001 Multiple R-Squared: 0.746 Adjusted R-Squared: 0.716 3SLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 56.2541 11.5687 4.86 2.6e-05 *** price 0.2184 0.1003 2.18 0.036 * farmPrice 0.2040 0.0401 5.09 1.3e-05 *** trend 0.2938 0.0445 6.60 1.4e-07 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.564 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 105.161 MSE: 6.573 Root MSE: 2.564 Multiple R-Squared: 0.608 Adjusted R-Squared: 0.534 [1] "*************** 3SLS with restriction via restrict.regMat ********************" systemfit results method: 3SLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 34 173 1.27 0.678 0.722 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 67.8 3.99 2.00 0.747 0.717 supply 20 16 104.8 6.55 2.56 0.609 0.536 The covariance matrix of the residuals used for estimation demand supply demand 3.97 4.55 supply 4.55 6.13 The covariance matrix of the residuals demand supply demand 3.99 4.98 supply 4.98 6.55 The correlations of the residuals demand supply demand 1.000 0.975 supply 0.975 1.000 3SLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 94.222 8.015 11.76 1.6e-13 *** price -0.222 0.096 -2.31 0.027 * income 0.296 0.045 6.57 1.6e-07 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.997 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 67.796 MSE: 3.988 Root MSE: 1.997 Multiple R-Squared: 0.747 Adjusted R-Squared: 0.717 3SLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 55.9604 11.5777 4.83 2.8e-05 *** price 0.2193 0.1002 2.19 0.036 * farmPrice 0.2060 0.0403 5.11 1.3e-05 *** trend 0.2956 0.0450 6.57 1.6e-07 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.559 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 104.753 MSE: 6.547 Root MSE: 2.559 Multiple R-Squared: 0.609 Adjusted R-Squared: 0.536 [1] "*************** 3SLS with restriction via restrict.regMat (EViews-like) *******" systemfit results method: 3SLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 34 171 0.887 0.68 0.678 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 67.5 3.97 1.99 0.748 0.719 supply 20 16 104.0 6.50 2.55 0.612 0.539 The covariance matrix of the residuals used for estimation demand supply demand 3.37 3.75 supply 3.75 4.91 The covariance matrix of the residuals demand supply demand 3.37 4.08 supply 4.08 5.20 The correlations of the residuals demand supply demand 1.000 0.974 supply 0.974 1.000 3SLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 94.2737 7.3905 12.76 1.6e-14 *** price -0.2243 0.0888 -2.53 0.016 * income 0.2979 0.0420 7.10 3.4e-08 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.992 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 67.467 MSE: 3.969 Root MSE: 1.992 Multiple R-Squared: 0.748 Adjusted R-Squared: 0.719 3SLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 55.4521 10.3994 5.33 6.4e-06 *** price 0.2207 0.0896 2.46 0.019 * farmPrice 0.2095 0.0366 5.73 1.9e-06 *** trend 0.2979 0.0420 7.10 3.4e-08 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.55 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 104.013 MSE: 6.501 Root MSE: 2.55 Multiple R-Squared: 0.612 Adjusted R-Squared: 0.539 [1] "**** W3SLS with restriction via restrict.regMat (EViews-like) ****" systemfit results method: 3SLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 34 172 0.873 0.679 0.681 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 67.7 3.98 2.00 0.748 0.718 supply 20 16 104.3 6.52 2.55 0.611 0.538 The covariance matrix of the residuals used for estimation demand supply demand 3.35 3.76 supply 3.76 4.92 The covariance matrix of the residuals demand supply demand 3.38 4.10 supply 4.10 5.22 The correlations of the residuals demand supply demand 1.000 0.975 supply 0.975 1.000 3SLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 94.2409 7.3617 12.80 1.5e-14 *** price -0.2225 0.0883 -2.52 0.017 * income 0.2964 0.0416 7.13 3.1e-08 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.995 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 67.672 MSE: 3.981 Root MSE: 1.995 Multiple R-Squared: 0.748 Adjusted R-Squared: 0.718 3SLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 55.6925 10.3937 5.36 5.9e-06 *** price 0.2201 0.0897 2.45 0.019 * farmPrice 0.2078 0.0364 5.71 2.0e-06 *** trend 0.2964 0.0416 7.13 3.1e-08 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.553 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 104.312 MSE: 6.519 Root MSE: 2.553 Multiple R-Squared: 0.611 Adjusted R-Squared: 0.538 [1] "*************** 3SLS with 2 restrictions **********************" systemfit results method: 3SLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 35 171 1.74 0.681 0.696 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 65.8 3.87 1.97 0.755 0.726 supply 20 16 105.4 6.59 2.57 0.607 0.533 The covariance matrix of the residuals used for estimation demand supply demand 3.89 4.53 supply 4.53 6.25 The covariance matrix of the residuals demand supply demand 3.87 4.87 supply 4.87 6.59 The correlations of the residuals demand supply demand 1.000 0.965 supply 0.965 1.000 3SLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 93.9070 7.9234 11.85 8.3e-14 *** price -0.2457 0.0891 -2.76 0.0092 ** income 0.3236 0.0233 13.91 8.9e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.967 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 65.807 MSE: 3.871 Root MSE: 1.967 Multiple R-Squared: 0.755 Adjusted R-Squared: 0.726 3SLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 49.9049 8.1797 6.10 5.7e-07 *** price 0.2543 0.0891 2.85 0.0072 ** farmPrice 0.2293 0.0241 9.52 3.1e-11 *** trend 0.3236 0.0233 13.91 8.9e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.566 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 105.389 MSE: 6.587 Root MSE: 2.566 Multiple R-Squared: 0.607 Adjusted R-Squared: 0.533 [1] "Component \"call\": target, current do not match when deparsed" [1] "*************** 3SLS with 2 restrictions (EViews-like) ************" systemfit results method: 3SLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 35 170 1.19 0.683 0.658 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 65.6 3.86 1.96 0.755 0.727 supply 20 16 104.6 6.54 2.56 0.610 0.537 The covariance matrix of the residuals used for estimation demand supply demand 3.30 3.73 supply 3.73 5.00 The covariance matrix of the residuals demand supply demand 3.28 4.00 supply 4.00 5.23 The correlations of the residuals demand supply demand 1.000 0.965 supply 0.965 1.000 3SLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 94.1703 7.3154 12.87 7.8e-15 *** price -0.2494 0.0812 -3.07 0.0041 ** income 0.3248 0.0209 15.57 < 2e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.964 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 65.577 MSE: 3.857 Root MSE: 1.964 Multiple R-Squared: 0.755 Adjusted R-Squared: 0.727 3SLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 50.0853 7.5503 6.63 1.1e-07 *** price 0.2506 0.0812 3.09 0.0039 ** farmPrice 0.2312 0.0212 10.88 8.9e-13 *** trend 0.3248 0.0209 15.57 < 2e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.557 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 104.607 MSE: 6.538 Root MSE: 2.557 Multiple R-Squared: 0.61 Adjusted R-Squared: 0.537 [1] "********** W3SLS with 2 (symbolic) restrictions ***************" systemfit results method: 3SLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 35 172 1.74 0.68 0.697 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 65.9 3.88 1.97 0.754 0.725 supply 20 16 105.7 6.60 2.57 0.606 0.532 The covariance matrix of the residuals used for estimation demand supply demand 3.88 4.55 supply 4.55 6.27 The covariance matrix of the residuals demand supply demand 3.88 4.88 supply 4.88 6.60 The correlations of the residuals demand supply demand 1.000 0.965 supply 0.965 1.000 3SLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 93.7870 7.9088 11.86 8.2e-14 *** price -0.2443 0.0892 -2.74 0.0096 ** income 0.3234 0.0229 14.14 4.4e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.969 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 65.907 MSE: 3.877 Root MSE: 1.969 Multiple R-Squared: 0.754 Adjusted R-Squared: 0.725 3SLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 49.8093 8.1522 6.11 5.5e-07 *** price 0.2557 0.0892 2.87 0.0069 ** farmPrice 0.2289 0.0237 9.67 2.0e-11 *** trend 0.3234 0.0229 14.14 4.4e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.57 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 105.659 MSE: 6.604 Root MSE: 2.57 Multiple R-Squared: 0.606 Adjusted R-Squared: 0.532 [1] "*************** 3SLS with 2 restrictions via R and restrict.regMat **********" systemfit results method: 3SLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 35 171 1.74 0.681 0.696 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 65.8 3.87 1.97 0.755 0.726 supply 20 16 105.4 6.59 2.57 0.607 0.533 The covariance matrix of the residuals used for estimation demand supply demand 3.89 4.53 supply 4.53 6.25 The covariance matrix of the residuals demand supply demand 3.87 4.87 supply 4.87 6.59 The correlations of the residuals demand supply demand 1.000 0.965 supply 0.965 1.000 3SLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 93.9070 7.9234 11.85 8.3e-14 *** price -0.2457 0.0891 -2.76 0.0092 ** income 0.3236 0.0233 13.91 8.9e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.967 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 65.807 MSE: 3.871 Root MSE: 1.967 Multiple R-Squared: 0.755 Adjusted R-Squared: 0.726 3SLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 49.9049 8.1797 6.10 5.7e-07 *** price 0.2543 0.0891 2.85 0.0072 ** farmPrice 0.2293 0.0241 9.52 3.1e-11 *** trend 0.3236 0.0233 13.91 8.9e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.566 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 105.389 MSE: 6.587 Root MSE: 2.566 Multiple R-Squared: 0.607 Adjusted R-Squared: 0.533 [1] "Component \"call\": target, current do not match when deparsed" [1] "******** 3SLS with 2 restrictions via R and restrict.regMat (EViews-like)*****" systemfit results method: 3SLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 35 170 1.19 0.683 0.658 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 65.6 3.86 1.96 0.755 0.727 supply 20 16 104.6 6.54 2.56 0.610 0.537 The covariance matrix of the residuals used for estimation demand supply demand 3.30 3.73 supply 3.73 5.00 The covariance matrix of the residuals demand supply demand 3.28 4.00 supply 4.00 5.23 The correlations of the residuals demand supply demand 1.000 0.965 supply 0.965 1.000 3SLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 94.1703 7.3154 12.87 7.8e-15 *** price -0.2494 0.0812 -3.07 0.0041 ** income 0.3248 0.0209 15.57 < 2e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.964 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 65.577 MSE: 3.857 Root MSE: 1.964 Multiple R-Squared: 0.755 Adjusted R-Squared: 0.727 3SLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 50.0853 7.5503 6.63 1.1e-07 *** price 0.2506 0.0812 3.09 0.0039 ** farmPrice 0.2312 0.0212 10.88 8.9e-13 *** trend 0.3248 0.0209 15.57 < 2e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.557 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 104.607 MSE: 6.538 Root MSE: 2.557 Multiple R-Squared: 0.61 Adjusted R-Squared: 0.537 [1] "*** W3SLS with 2 restrictions via R and restrict.regMat (EViews-like) ***" systemfit results method: 3SLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 35 170 1.19 0.682 0.659 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 65.6 3.86 1.97 0.755 0.726 supply 20 16 104.8 6.55 2.56 0.609 0.536 The covariance matrix of the residuals used for estimation demand supply demand 3.30 3.75 supply 3.75 5.01 The covariance matrix of the residuals demand supply demand 3.28 4.00 supply 4.00 5.24 The correlations of the residuals demand supply demand 1.000 0.965 supply 0.965 1.000 3SLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 94.0830 7.3058 12.88 7.5e-15 *** price -0.2484 0.0812 -3.06 0.0042 ** income 0.3246 0.0205 15.81 < 2e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.965 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 65.646 MSE: 3.862 Root MSE: 1.965 Multiple R-Squared: 0.755 Adjusted R-Squared: 0.726 3SLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 50.0190 7.5314 6.64 1.1e-07 *** price 0.2516 0.0812 3.10 0.0038 ** farmPrice 0.2309 0.0209 11.05 5.9e-13 *** trend 0.3246 0.0205 15.81 < 2e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.559 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 104.795 MSE: 6.55 Root MSE: 2.559 Multiple R-Squared: 0.609 Adjusted R-Squared: 0.536 systemfit results method: 3SLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 36 3690 5613 0.012 0.368 N DF SSR MSE RMSE R2 Adj R2 eq1 20 19 2132 112.2 10.59 0.305 0.305 eq2 20 17 1558 91.7 9.57 -1.335 -1.610 The covariance matrix of the residuals used for estimation eq1 eq2 eq1 112.2 -44.8 eq2 -44.8 56.8 The covariance matrix of the residuals eq1 eq2 eq1 112.2 -68.3 eq2 -68.3 91.7 The correlations of the residuals eq1 eq2 eq1 1.000 -0.674 eq2 -0.674 1.000 3SLS estimates for 'eq1' (equation 1) Model Formula: farmPrice ~ consump - 1 Instruments: ~trend + income Estimate Std. Error t value Pr(>|t|) consump 0.9588 0.0235 40.9 <2e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 10.592 on 19 degrees of freedom Number of observations: 20 Degrees of Freedom: 19 SSR: 2131.725 MSE: 112.196 Root MSE: 10.592 Multiple R-Squared: 0.305 Adjusted R-Squared: 0.305 3SLS estimates for 'eq2' (equation 2) Model Formula: price ~ consump + trend Instruments: ~trend + income Estimate Std. Error t value Pr(>|t|) (Intercept) -92.192 49.896 -1.85 0.0821 . consump 1.953 0.499 3.92 0.0011 ** trend -0.469 0.247 -1.90 0.0743 . --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 9.574 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 1558.311 MSE: 91.665 Root MSE: 9.574 Multiple R-Squared: -1.335 Adjusted R-Squared: -1.61 systemfit results method: 3SLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 38 56326 283068 -104 -10.6 N DF SSR MSE RMSE R2 Adj R2 eq1 20 19 2313 122 11.0 -7.63 -7.63 eq2 20 19 54013 2843 53.3 -200.46 -200.46 The covariance matrix of the residuals used for estimation eq1 eq2 eq1 121 -255 eq2 -255 2953 The covariance matrix of the residuals eq1 eq2 eq1 122 -251 eq2 -251 2843 The correlations of the residuals eq1 eq2 eq1 1.000 -0.433 eq2 -0.433 1.000 3SLS estimates for 'eq1' (equation 1) Model Formula: consump ~ farmPrice - 1 Instruments: ~price + income Estimate Std. Error t value Pr(>|t|) farmPrice 1.0417 0.0253 41.2 <2e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 11.034 on 19 degrees of freedom Number of observations: 20 Degrees of Freedom: 19 SSR: 2313.073 MSE: 121.741 Root MSE: 11.034 Multiple R-Squared: -7.627 Adjusted R-Squared: -7.627 3SLS estimates for 'eq2' (equation 2) Model Formula: consump ~ trend - 1 Instruments: ~price + income Estimate Std. Error t value Pr(>|t|) trend 9.02 1.13 8 1.7e-07 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 53.318 on 19 degrees of freedom Number of observations: 20 Degrees of Freedom: 19 SSR: 54013.367 MSE: 2842.809 Root MSE: 53.318 Multiple R-Squared: -200.456 Adjusted R-Squared: -200.456 systemfit results method: 3SLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 38 167069 397886 -49.1 -0.82 N DF SSR MSE RMSE R2 Adj R2 eq1 20 19 76692 4036 63.5 -285.0 -285.0 eq2 20 19 90377 4757 69.0 -28.5 -28.5 The covariance matrix of the residuals used for estimation eq1 eq2 eq1 2682 2547 eq2 2547 2741 The covariance matrix of the residuals eq1 eq2 eq1 4036 4336 eq2 4336 4757 The correlations of the residuals eq1 eq2 eq1 1.000 0.928 eq2 0.928 1.000 3SLS estimates for 'eq1' (equation 1) Model Formula: consump ~ trend - 1 Instruments: ~income + farmPrice Estimate Std. Error t value Pr(>|t|) trend 4.162 0.723 5.75 1.5e-05 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 63.533 on 19 degrees of freedom Number of observations: 20 Degrees of Freedom: 19 SSR: 76691.636 MSE: 4036.402 Root MSE: 63.533 Multiple R-Squared: -285.041 Adjusted R-Squared: -285.041 3SLS estimates for 'eq2' (equation 2) Model Formula: farmPrice ~ trend - 1 Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) trend 3.274 0.676 4.84 0.00011 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 68.969 on 19 degrees of freedom Number of observations: 20 Degrees of Freedom: 19 SSR: 90377.499 MSE: 4756.71 Root MSE: 68.969 Multiple R-Squared: -28.451 Adjusted R-Squared: -28.451 systemfit results method: 3SLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 39 161126 1162329 -171 -17.4 N DF SSR MSE RMSE R2 Adj R2 eq1 20 19 3553 187 13.7 -12.3 -12.3 eq2 20 19 157573 8293 91.1 -235.2 -235.2 The covariance matrix of the residuals used for estimation eq1 eq2 eq1 208 -731 eq2 -731 8271 The covariance matrix of the residuals eq1 eq2 eq1 187 -623 eq2 -623 8293 The correlations of the residuals eq1 eq2 eq1 1.000 -0.121 eq2 -0.121 1.000 3SLS estimates for 'eq1' (equation 1) Model Formula: consump ~ farmPrice - 1 Instruments: ~farmPrice + trend + income Estimate Std. Error t value Pr(>|t|) farmPrice 1.1122 0.0272 40.8 <2e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 13.675 on 19 degrees of freedom Number of observations: 20 Degrees of Freedom: 19 SSR: 3553.118 MSE: 187.006 Root MSE: 13.675 Multiple R-Squared: -12.252 Adjusted R-Squared: -12.252 3SLS estimates for 'eq2' (equation 2) Model Formula: price ~ trend - 1 Instruments: ~farmPrice + trend + income Estimate Std. Error t value Pr(>|t|) trend 1.1122 0.0272 40.8 <2e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 91.068 on 19 degrees of freedom Number of observations: 20 Degrees of Freedom: 19 SSR: 157573.328 MSE: 8293.333 Root MSE: 91.068 Multiple R-Squared: -235.153 Adjusted R-Squared: -235.153 systemfit results method: 3SLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 38 935 491 0 0 N DF SSR MSE RMSE R2 Adj R2 eq1 20 19 268 14.1 3.76 0 0 eq2 20 19 667 35.1 5.93 0 0 The covariance matrix of the residuals used for estimation eq1 eq2 eq1 14.11 2.18 eq2 2.18 35.12 The covariance matrix of the residuals eq1 eq2 eq1 14.11 2.18 eq2 2.18 35.12 The correlations of the residuals eq1 eq2 eq1 1.0000 0.0981 eq2 0.0981 1.0000 3SLS estimates for 'eq1' (equation 1) Model Formula: consump ~ 1 Instruments: ~income Estimate Std. Error t value Pr(>|t|) (Intercept) 100.90 0.84 120 <2e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 3.756 on 19 degrees of freedom Number of observations: 20 Degrees of Freedom: 19 SSR: 268.114 MSE: 14.111 Root MSE: 3.756 Multiple R-Squared: 0 Adjusted R-Squared: 0 3SLS estimates for 'eq2' (equation 2) Model Formula: price ~ 1 Instruments: ~income Estimate Std. Error t value Pr(>|t|) (Intercept) 100.02 1.33 75.5 <2e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 5.926 on 19 degrees of freedom Number of observations: 20 Degrees of Freedom: 19 SSR: 667.251 MSE: 35.118 Root MSE: 5.926 Multiple R-Squared: 0 Adjusted R-Squared: 0 [1] "***************************************************" [1] "3SLS formula: EViews" [1] "************* 3SLS *********************************" systemfit results method: 3SLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 33 174 1.03 0.676 0.786 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 65.7 3.87 1.97 0.755 0.726 supply 20 16 107.9 6.75 2.60 0.598 0.522 The covariance matrix of the residuals used for estimation demand supply demand 3.87 4.36 supply 4.36 6.04 The covariance matrix of the residuals demand supply demand 3.87 5.00 supply 5.00 6.74 The correlations of the residuals demand supply demand 1.00 0.98 supply 0.98 1.00 3SLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 94.6333 7.9208 11.95 1.1e-09 *** price -0.2436 0.0965 -2.52 0.022 * income 0.3140 0.0469 6.69 3.8e-06 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.966 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 65.729 MSE: 3.866 Root MSE: 1.966 Multiple R-Squared: 0.755 Adjusted R-Squared: 0.726 3SLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 52.1972 11.8934 4.39 0.00046 *** price 0.2286 0.0997 2.29 0.03571 * farmPrice 0.2282 0.0440 5.19 9e-05 *** trend 0.3611 0.0729 4.95 0.00014 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.597 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 107.914 MSE: 6.745 Root MSE: 2.597 Multiple R-Squared: 0.598 Adjusted R-Squared: 0.522 [1] "********************* 3SLS EViews-like *****************" systemfit results method: 3SLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 33 173 0.719 0.677 0.748 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 65.7 3.87 1.97 0.755 0.726 supply 20 16 107.2 6.70 2.59 0.600 0.525 The covariance matrix of the residuals used for estimation demand supply demand 3.29 3.59 supply 3.59 4.83 The covariance matrix of the residuals demand supply demand 3.29 4.11 supply 4.11 5.36 The correlations of the residuals demand supply demand 1.000 0.979 supply 0.979 1.000 3SLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 94.6333 7.3027 12.96 1.7e-14 *** price -0.2436 0.0890 -2.74 0.0099 ** income 0.3140 0.0433 7.25 2.5e-08 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.966 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 65.729 MSE: 3.866 Root MSE: 1.966 Multiple R-Squared: 0.755 Adjusted R-Squared: 0.726 3SLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 52.1176 10.6378 4.90 2.5e-05 *** price 0.2289 0.0892 2.57 0.015 * farmPrice 0.2290 0.0393 5.82 1.6e-06 *** trend 0.3579 0.0652 5.49 4.3e-06 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.589 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 107.216 MSE: 6.701 Root MSE: 2.589 Multiple R-Squared: 0.6 Adjusted R-Squared: 0.525 [1] "********************* 3SLS with methodResidCov = Theil *****************" systemfit results method: 3SLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 33 174 -0.718 0.675 0.922 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 65.7 3.87 1.97 0.755 0.726 supply 20 16 108.7 6.79 2.61 0.594 0.518 The covariance matrix of the residuals used for estimation demand supply demand 3.87 4.50 supply 4.50 6.04 warning: this covariance matrix is NOT positive semidefinit! The covariance matrix of the residuals demand supply demand 3.87 5.2 supply 5.20 6.8 The correlations of the residuals demand supply demand 1.000 0.981 supply 0.981 1.000 3SLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 94.6333 7.9208 11.95 1.6e-13 *** price -0.2436 0.0965 -2.52 0.017 * income 0.3140 0.0469 6.69 1.3e-07 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.966 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 65.729 MSE: 3.866 Root MSE: 1.966 Multiple R-Squared: 0.755 Adjusted R-Squared: 0.726 3SLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 52.2869 11.8853 4.40 0.00011 *** price 0.2282 0.0997 2.29 0.02855 * farmPrice 0.2272 0.0438 5.19 1.0e-05 *** trend 0.3648 0.0707 5.16 1.1e-05 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.607 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 108.727 MSE: 6.795 Root MSE: 2.607 Multiple R-Squared: 0.594 Adjusted R-Squared: 0.518 [1] "*************** W3SLS with methodResidCov = Theil *****************" systemfit results method: 3SLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 33 174 -0.718 0.675 0.922 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 65.7 3.87 1.97 0.755 0.726 supply 20 16 108.7 6.79 2.61 0.594 0.518 The covariance matrix of the residuals used for estimation demand supply demand 3.87 4.50 supply 4.50 6.04 warning: this covariance matrix is NOT positive semidefinit! The covariance matrix of the residuals demand supply demand 3.87 5.2 supply 5.20 6.8 The correlations of the residuals demand supply demand 1.000 0.981 supply 0.981 1.000 3SLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 94.6333 7.9208 11.95 1.6e-13 *** price -0.2436 0.0965 -2.52 0.017 * income 0.3140 0.0469 6.69 1.3e-07 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.966 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 65.729 MSE: 3.866 Root MSE: 1.966 Multiple R-Squared: 0.755 Adjusted R-Squared: 0.726 3SLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 52.2869 11.8853 4.40 0.00011 *** price 0.2282 0.0997 2.29 0.02855 * farmPrice 0.2272 0.0438 5.19 1.0e-05 *** trend 0.3648 0.0707 5.16 1.1e-05 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.607 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 108.727 MSE: 6.795 Root MSE: 2.607 Multiple R-Squared: 0.594 Adjusted R-Squared: 0.518 [1] "*************** 3SLS with restriction *****************" systemfit results method: 3SLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 34 173 1.27 0.678 0.722 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 67.8 3.99 2.00 0.747 0.717 supply 20 16 104.8 6.55 2.56 0.609 0.536 The covariance matrix of the residuals used for estimation demand supply demand 3.97 4.55 supply 4.55 6.13 The covariance matrix of the residuals demand supply demand 3.99 4.98 supply 4.98 6.55 The correlations of the residuals demand supply demand 1.000 0.975 supply 0.975 1.000 3SLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 94.222 8.015 11.76 1.6e-13 *** price -0.222 0.096 -2.31 0.027 * income 0.296 0.045 6.57 1.6e-07 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.997 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 67.796 MSE: 3.988 Root MSE: 1.997 Multiple R-Squared: 0.747 Adjusted R-Squared: 0.717 3SLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 55.9604 11.5777 4.83 2.8e-05 *** price 0.2193 0.1002 2.19 0.036 * farmPrice 0.2060 0.0403 5.11 1.3e-05 *** trend 0.2956 0.0450 6.57 1.6e-07 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.559 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 104.753 MSE: 6.547 Root MSE: 2.559 Multiple R-Squared: 0.609 Adjusted R-Squared: 0.536 [1] "Component \"call\": target, current do not match when deparsed" [1] "************** 3SLS with restriction (EViews-like) *****************" systemfit results method: 3SLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 34 171 0.887 0.68 0.678 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 67.5 3.97 1.99 0.748 0.719 supply 20 16 104.0 6.50 2.55 0.612 0.539 The covariance matrix of the residuals used for estimation demand supply demand 3.37 3.75 supply 3.75 4.91 The covariance matrix of the residuals demand supply demand 3.37 4.08 supply 4.08 5.20 The correlations of the residuals demand supply demand 1.000 0.974 supply 0.974 1.000 3SLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 94.2737 7.3905 12.76 1.6e-14 *** price -0.2243 0.0888 -2.53 0.016 * income 0.2979 0.0420 7.10 3.4e-08 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.992 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 67.467 MSE: 3.969 Root MSE: 1.992 Multiple R-Squared: 0.748 Adjusted R-Squared: 0.719 3SLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 55.4521 10.3994 5.33 6.4e-06 *** price 0.2207 0.0896 2.46 0.019 * farmPrice 0.2095 0.0366 5.73 1.9e-06 *** trend 0.2979 0.0420 7.10 3.4e-08 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.55 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 104.013 MSE: 6.501 Root MSE: 2.55 Multiple R-Squared: 0.612 Adjusted R-Squared: 0.539 [1] 40 [1] "*************** W3SLS with restriction *****************" systemfit results method: 3SLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 34 173 1.24 0.677 0.725 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 68.1 4.00 2.00 0.746 0.716 supply 20 16 105.2 6.57 2.56 0.608 0.534 The covariance matrix of the residuals used for estimation demand supply demand 3.93 4.56 supply 4.56 6.15 The covariance matrix of the residuals demand supply demand 4.00 5.01 supply 5.01 6.57 The correlations of the residuals demand supply demand 1.000 0.976 supply 0.976 1.000 3SLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 94.1823 7.9793 11.8 1.4e-13 *** price -0.2194 0.0954 -2.3 0.028 * income 0.2938 0.0445 6.6 1.4e-07 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.001 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 68.057 MSE: 4.003 Root MSE: 2.001 Multiple R-Squared: 0.746 Adjusted R-Squared: 0.716 3SLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 56.2541 11.5687 4.86 2.6e-05 *** price 0.2184 0.1003 2.18 0.036 * farmPrice 0.2040 0.0401 5.09 1.3e-05 *** trend 0.2938 0.0445 6.60 1.4e-07 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.564 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 105.161 MSE: 6.573 Root MSE: 2.564 Multiple R-Squared: 0.608 Adjusted R-Squared: 0.534 [1] "*************** 3SLS with restriction via restrict.regMat ********************" systemfit results method: 3SLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 34 173 1.27 0.678 0.722 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 67.8 3.99 2.00 0.747 0.717 supply 20 16 104.8 6.55 2.56 0.609 0.536 The covariance matrix of the residuals used for estimation demand supply demand 3.97 4.55 supply 4.55 6.13 The covariance matrix of the residuals demand supply demand 3.99 4.98 supply 4.98 6.55 The correlations of the residuals demand supply demand 1.000 0.975 supply 0.975 1.000 3SLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 94.222 8.015 11.76 1.6e-13 *** price -0.222 0.096 -2.31 0.027 * income 0.296 0.045 6.57 1.6e-07 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.997 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 67.796 MSE: 3.988 Root MSE: 1.997 Multiple R-Squared: 0.747 Adjusted R-Squared: 0.717 3SLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 55.9604 11.5777 4.83 2.8e-05 *** price 0.2193 0.1002 2.19 0.036 * farmPrice 0.2060 0.0403 5.11 1.3e-05 *** trend 0.2956 0.0450 6.57 1.6e-07 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.559 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 104.753 MSE: 6.547 Root MSE: 2.559 Multiple R-Squared: 0.609 Adjusted R-Squared: 0.536 [1] "*************** 3SLS with restriction via restrict.regMat (EViews-like) *******" systemfit results method: 3SLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 34 171 0.887 0.68 0.678 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 67.5 3.97 1.99 0.748 0.719 supply 20 16 104.0 6.50 2.55 0.612 0.539 The covariance matrix of the residuals used for estimation demand supply demand 3.37 3.75 supply 3.75 4.91 The covariance matrix of the residuals demand supply demand 3.37 4.08 supply 4.08 5.20 The correlations of the residuals demand supply demand 1.000 0.974 supply 0.974 1.000 3SLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 94.2737 7.3905 12.76 1.6e-14 *** price -0.2243 0.0888 -2.53 0.016 * income 0.2979 0.0420 7.10 3.4e-08 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.992 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 67.467 MSE: 3.969 Root MSE: 1.992 Multiple R-Squared: 0.748 Adjusted R-Squared: 0.719 3SLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 55.4521 10.3994 5.33 6.4e-06 *** price 0.2207 0.0896 2.46 0.019 * farmPrice 0.2095 0.0366 5.73 1.9e-06 *** trend 0.2979 0.0420 7.10 3.4e-08 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.55 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 104.013 MSE: 6.501 Root MSE: 2.55 Multiple R-Squared: 0.612 Adjusted R-Squared: 0.539 [1] "**** W3SLS with restriction via restrict.regMat (EViews-like) ****" systemfit results method: 3SLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 34 172 0.873 0.679 0.681 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 67.7 3.98 2.00 0.748 0.718 supply 20 16 104.3 6.52 2.55 0.611 0.538 The covariance matrix of the residuals used for estimation demand supply demand 3.35 3.76 supply 3.76 4.92 The covariance matrix of the residuals demand supply demand 3.38 4.10 supply 4.10 5.22 The correlations of the residuals demand supply demand 1.000 0.975 supply 0.975 1.000 3SLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 94.2409 7.3617 12.80 1.5e-14 *** price -0.2225 0.0883 -2.52 0.017 * income 0.2964 0.0416 7.13 3.1e-08 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.995 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 67.672 MSE: 3.981 Root MSE: 1.995 Multiple R-Squared: 0.748 Adjusted R-Squared: 0.718 3SLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 55.6925 10.3937 5.36 5.9e-06 *** price 0.2201 0.0897 2.45 0.019 * farmPrice 0.2078 0.0364 5.71 2.0e-06 *** trend 0.2964 0.0416 7.13 3.1e-08 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.553 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 104.312 MSE: 6.519 Root MSE: 2.553 Multiple R-Squared: 0.611 Adjusted R-Squared: 0.538 [1] "*************** 3SLS with 2 restrictions **********************" systemfit results method: 3SLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 35 442 31.1 0.176 -0.052 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 164 9.66 3.11 0.388 0.316 supply 20 16 278 17.36 4.17 -0.036 -0.230 The covariance matrix of the residuals used for estimation demand supply demand 3.89 4.53 supply 4.53 6.25 The covariance matrix of the residuals demand supply demand 9.66 11.7 supply 11.69 17.4 The correlations of the residuals demand supply demand 1.000 0.903 supply 0.903 1.000 3SLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 91.2986 7.9234 11.52 1.8e-13 *** price -0.4494 0.0891 -5.04 1.4e-05 *** income 0.5592 0.0233 24.04 < 2e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 3.108 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 164.177 MSE: 9.657 Root MSE: 3.108 Multiple R-Squared: 0.388 Adjusted R-Squared: 0.316 3SLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) -1.8394 8.1797 -0.22 0.82 price 0.5506 0.0891 6.18 4.5e-07 *** farmPrice 0.4325 0.0241 17.95 < 2e-16 *** trend 0.5592 0.0233 24.04 < 2e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 4.167 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 277.77 MSE: 17.361 Root MSE: 4.167 Multiple R-Squared: -0.036 Adjusted R-Squared: -0.23 [1] "Component \"call\": target, current do not match when deparsed" [1] "*************** 3SLS with 2 restrictions (EViews-like) ************" systemfit results method: 3SLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 35 439 21.3 0.18 -0.18 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 169 9.93 3.15 0.370 0.296 supply 20 16 271 16.91 4.11 -0.009 -0.198 The covariance matrix of the residuals used for estimation demand supply demand 3.30 3.73 supply 3.73 5.00 The covariance matrix of the residuals demand supply demand 8.44 9.64 supply 9.64 13.53 The correlations of the residuals demand supply demand 1.000 0.902 supply 0.902 1.000 3SLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 93.2926 7.3154 12.75 1.0e-14 *** price -0.4781 0.0812 -5.89 1.1e-06 *** income 0.5683 0.0209 27.24 < 2e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 3.152 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 168.882 MSE: 9.934 Root MSE: 3.152 Multiple R-Squared: 0.37 Adjusted R-Squared: 0.296 3SLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 0.6559 7.5503 0.09 0.93 price 0.5219 0.0812 6.43 2.1e-07 *** farmPrice 0.4355 0.0212 20.49 < 2e-16 *** trend 0.5683 0.0209 27.24 < 2e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 4.112 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 270.595 MSE: 16.912 Root MSE: 4.112 Multiple R-Squared: -0.009 Adjusted R-Squared: -0.198 [1] "********** W3SLS with 2 (symbolic) restrictions ***************" systemfit results method: 3SLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 35 448 31.2 0.165 -0.057 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 166 9.77 3.13 0.38 0.307 supply 20 16 281 17.59 4.19 -0.05 -0.246 The covariance matrix of the residuals used for estimation demand supply demand 3.88 4.55 supply 4.55 6.27 The covariance matrix of the residuals demand supply demand 9.77 11.9 supply 11.86 17.6 The correlations of the residuals demand supply demand 1.000 0.905 supply 0.905 1.000 3SLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 90.6391 7.9088 11.46 2.1e-13 *** price -0.4438 0.0892 -4.98 1.7e-05 *** income 0.5603 0.0229 24.50 < 2e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 3.126 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 166.148 MSE: 9.773 Root MSE: 3.126 Multiple R-Squared: 0.38 Adjusted R-Squared: 0.307 3SLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) -2.5480 8.1522 -0.31 0.76 price 0.5562 0.0892 6.24 3.7e-07 *** farmPrice 0.4340 0.0237 18.33 < 2e-16 *** trend 0.5603 0.0229 24.50 < 2e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 4.194 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 281.4 MSE: 17.587 Root MSE: 4.194 Multiple R-Squared: -0.05 Adjusted R-Squared: -0.246 [1] "*************** 3SLS with 2 restrictions via R and restrict.regMat **********" systemfit results method: 3SLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 35 442 31.1 0.176 -0.052 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 164 9.66 3.11 0.388 0.316 supply 20 16 278 17.36 4.17 -0.036 -0.230 The covariance matrix of the residuals used for estimation demand supply demand 3.89 4.53 supply 4.53 6.25 The covariance matrix of the residuals demand supply demand 9.66 11.7 supply 11.69 17.4 The correlations of the residuals demand supply demand 1.000 0.903 supply 0.903 1.000 3SLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 91.2986 7.9234 11.52 1.8e-13 *** price -0.4494 0.0891 -5.04 1.4e-05 *** income 0.5592 0.0233 24.04 < 2e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 3.108 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 164.177 MSE: 9.657 Root MSE: 3.108 Multiple R-Squared: 0.388 Adjusted R-Squared: 0.316 3SLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) -1.8394 8.1797 -0.22 0.82 price 0.5506 0.0891 6.18 4.5e-07 *** farmPrice 0.4325 0.0241 17.95 < 2e-16 *** trend 0.5592 0.0233 24.04 < 2e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 4.167 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 277.77 MSE: 17.361 Root MSE: 4.167 Multiple R-Squared: -0.036 Adjusted R-Squared: -0.23 [1] "Component \"call\": target, current do not match when deparsed" [1] "******** 3SLS with 2 restrictions via R and restrict.regMat (EViews-like)*****" systemfit results method: 3SLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 35 439 21.3 0.18 -0.18 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 169 9.93 3.15 0.370 0.296 supply 20 16 271 16.91 4.11 -0.009 -0.198 The covariance matrix of the residuals used for estimation demand supply demand 3.30 3.73 supply 3.73 5.00 The covariance matrix of the residuals demand supply demand 8.44 9.64 supply 9.64 13.53 The correlations of the residuals demand supply demand 1.000 0.902 supply 0.902 1.000 3SLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 93.2926 7.3154 12.75 1.0e-14 *** price -0.4781 0.0812 -5.89 1.1e-06 *** income 0.5683 0.0209 27.24 < 2e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 3.152 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 168.882 MSE: 9.934 Root MSE: 3.152 Multiple R-Squared: 0.37 Adjusted R-Squared: 0.296 3SLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 0.6559 7.5503 0.09 0.93 price 0.5219 0.0812 6.43 2.1e-07 *** farmPrice 0.4355 0.0212 20.49 < 2e-16 *** trend 0.5683 0.0209 27.24 < 2e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 4.112 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 270.595 MSE: 16.912 Root MSE: 4.112 Multiple R-Squared: -0.009 Adjusted R-Squared: -0.198 [1] "*** W3SLS with 2 restrictions via R and restrict.regMat (EViews-like) ***" systemfit results method: 3SLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 35 444 21.3 0.172 -0.188 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 171 10.0 3.17 0.363 0.289 supply 20 16 274 17.1 4.13 -0.020 -0.212 The covariance matrix of the residuals used for estimation demand supply demand 3.30 3.75 supply 3.75 5.01 The covariance matrix of the residuals demand supply demand 8.53 9.77 supply 9.77 13.68 The correlations of the residuals demand supply demand 1.000 0.904 supply 0.904 1.000 3SLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 92.7628 7.3058 12.70 1.2e-14 *** price -0.4740 0.0812 -5.84 1.3e-06 *** income 0.5694 0.0205 27.74 < 2e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 3.168 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 170.659 MSE: 10.039 Root MSE: 3.168 Multiple R-Squared: 0.363 Adjusted R-Squared: 0.289 3SLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 0.0845 7.5314 0.01 0.99 price 0.5260 0.0812 6.48 1.8e-07 *** farmPrice 0.4370 0.0209 20.91 < 2e-16 *** trend 0.5694 0.0205 27.74 < 2e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 4.135 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 273.568 MSE: 17.098 Root MSE: 4.135 Multiple R-Squared: -0.02 Adjusted R-Squared: -0.212 systemfit results method: 3SLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 36 3690 5613 0.012 0.368 N DF SSR MSE RMSE R2 Adj R2 eq1 20 19 2132 112.2 10.59 0.305 0.305 eq2 20 17 1558 91.7 9.57 -1.335 -1.610 The covariance matrix of the residuals used for estimation eq1 eq2 eq1 112.2 -44.8 eq2 -44.8 56.8 The covariance matrix of the residuals eq1 eq2 eq1 112.2 -68.3 eq2 -68.3 91.7 The correlations of the residuals eq1 eq2 eq1 1.000 -0.674 eq2 -0.674 1.000 3SLS estimates for 'eq1' (equation 1) Model Formula: farmPrice ~ consump - 1 Instruments: ~trend + income Estimate Std. Error t value Pr(>|t|) consump 0.9588 0.0235 40.9 <2e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 10.592 on 19 degrees of freedom Number of observations: 20 Degrees of Freedom: 19 SSR: 2131.725 MSE: 112.196 Root MSE: 10.592 Multiple R-Squared: 0.305 Adjusted R-Squared: 0.305 3SLS estimates for 'eq2' (equation 2) Model Formula: price ~ consump + trend Instruments: ~trend + income Estimate Std. Error t value Pr(>|t|) (Intercept) -92.192 49.896 -1.85 0.0821 . consump 1.953 0.499 3.92 0.0011 ** trend -0.469 0.247 -1.90 0.0743 . --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 9.574 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 1558.311 MSE: 91.665 Root MSE: 9.574 Multiple R-Squared: -1.335 Adjusted R-Squared: -1.61 systemfit results method: 3SLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 38 56326 283068 -104 -10.6 N DF SSR MSE RMSE R2 Adj R2 eq1 20 19 2313 122 11.0 -7.63 -7.63 eq2 20 19 54013 2843 53.3 -200.46 -200.46 The covariance matrix of the residuals used for estimation eq1 eq2 eq1 121 -255 eq2 -255 2953 The covariance matrix of the residuals eq1 eq2 eq1 122 -251 eq2 -251 2843 The correlations of the residuals eq1 eq2 eq1 1.000 -0.433 eq2 -0.433 1.000 3SLS estimates for 'eq1' (equation 1) Model Formula: consump ~ farmPrice - 1 Instruments: ~price + income Estimate Std. Error t value Pr(>|t|) farmPrice 1.0417 0.0253 41.2 <2e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 11.034 on 19 degrees of freedom Number of observations: 20 Degrees of Freedom: 19 SSR: 2313.073 MSE: 121.741 Root MSE: 11.034 Multiple R-Squared: -7.627 Adjusted R-Squared: -7.627 3SLS estimates for 'eq2' (equation 2) Model Formula: consump ~ trend - 1 Instruments: ~price + income Estimate Std. Error t value Pr(>|t|) trend 9.02 1.13 8 1.7e-07 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 53.318 on 19 degrees of freedom Number of observations: 20 Degrees of Freedom: 19 SSR: 54013.367 MSE: 2842.809 Root MSE: 53.318 Multiple R-Squared: -200.456 Adjusted R-Squared: -200.456 systemfit results method: 3SLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 38 167069 397886 -49.1 -0.82 N DF SSR MSE RMSE R2 Adj R2 eq1 20 19 76692 4036 63.5 -285.0 -285.0 eq2 20 19 90377 4757 69.0 -28.5 -28.5 The covariance matrix of the residuals used for estimation eq1 eq2 eq1 2682 2547 eq2 2547 2741 The covariance matrix of the residuals eq1 eq2 eq1 4036 4336 eq2 4336 4757 The correlations of the residuals eq1 eq2 eq1 1.000 0.928 eq2 0.928 1.000 3SLS estimates for 'eq1' (equation 1) Model Formula: consump ~ trend - 1 Instruments: ~income + farmPrice Estimate Std. Error t value Pr(>|t|) trend 4.162 0.723 5.75 1.5e-05 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 63.533 on 19 degrees of freedom Number of observations: 20 Degrees of Freedom: 19 SSR: 76691.636 MSE: 4036.402 Root MSE: 63.533 Multiple R-Squared: -285.041 Adjusted R-Squared: -285.041 3SLS estimates for 'eq2' (equation 2) Model Formula: farmPrice ~ trend - 1 Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) trend 3.274 0.676 4.84 0.00011 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 68.969 on 19 degrees of freedom Number of observations: 20 Degrees of Freedom: 19 SSR: 90377.499 MSE: 4756.71 Root MSE: 68.969 Multiple R-Squared: -28.451 Adjusted R-Squared: -28.451 systemfit results method: 3SLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 39 161126 1162329 -171 -17.4 N DF SSR MSE RMSE R2 Adj R2 eq1 20 19 3553 187 13.7 -12.3 -12.3 eq2 20 19 157573 8293 91.1 -235.2 -235.2 The covariance matrix of the residuals used for estimation eq1 eq2 eq1 208 -731 eq2 -731 8271 The covariance matrix of the residuals eq1 eq2 eq1 187 -623 eq2 -623 8293 The correlations of the residuals eq1 eq2 eq1 1.000 -0.121 eq2 -0.121 1.000 3SLS estimates for 'eq1' (equation 1) Model Formula: consump ~ farmPrice - 1 Instruments: ~farmPrice + trend + income Estimate Std. Error t value Pr(>|t|) farmPrice 1.1122 0.0272 40.8 <2e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 13.675 on 19 degrees of freedom Number of observations: 20 Degrees of Freedom: 19 SSR: 3553.118 MSE: 187.006 Root MSE: 13.675 Multiple R-Squared: -12.252 Adjusted R-Squared: -12.252 3SLS estimates for 'eq2' (equation 2) Model Formula: price ~ trend - 1 Instruments: ~farmPrice + trend + income Estimate Std. Error t value Pr(>|t|) trend 1.1122 0.0272 40.8 <2e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 91.068 on 19 degrees of freedom Number of observations: 20 Degrees of Freedom: 19 SSR: 157573.328 MSE: 8293.333 Root MSE: 91.068 Multiple R-Squared: -235.153 Adjusted R-Squared: -235.153 systemfit results method: 3SLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 38 935 491 0 0 N DF SSR MSE RMSE R2 Adj R2 eq1 20 19 268 14.1 3.76 0 0 eq2 20 19 667 35.1 5.93 0 0 The covariance matrix of the residuals used for estimation eq1 eq2 eq1 14.11 2.18 eq2 2.18 35.12 The covariance matrix of the residuals eq1 eq2 eq1 14.11 2.18 eq2 2.18 35.12 The correlations of the residuals eq1 eq2 eq1 1.0000 0.0981 eq2 0.0981 1.0000 3SLS estimates for 'eq1' (equation 1) Model Formula: consump ~ 1 Instruments: ~income Estimate Std. Error t value Pr(>|t|) (Intercept) 100.90 0.84 120 <2e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 3.756 on 19 degrees of freedom Number of observations: 20 Degrees of Freedom: 19 SSR: 268.114 MSE: 14.111 Root MSE: 3.756 Multiple R-Squared: 0 Adjusted R-Squared: 0 3SLS estimates for 'eq2' (equation 2) Model Formula: price ~ 1 Instruments: ~income Estimate Std. Error t value Pr(>|t|) (Intercept) 100.02 1.33 75.5 <2e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 5.926 on 19 degrees of freedom Number of observations: 20 Degrees of Freedom: 19 SSR: 667.251 MSE: 35.118 Root MSE: 5.926 Multiple R-Squared: 0 Adjusted R-Squared: 0 > > ## ******************** iterated 3SLS ********************** > fit3slsi <- list() > formulas <- c( "GLS", "IV", "Schmidt", "GMM", "EViews" ) > for( i in seq( along = formulas ) ) { + fit3slsi[[ i ]] <- list() + + print( "***************************************************" ) + print( paste( "3SLS formula:", formulas[ i ] ) ) + print( "************* 3SLS *********************************" ) + fit3slsi[[ i ]]$e1 <- systemfit( system, "3SLS", data = Kmenta, + inst = inst, method3sls = formulas[ i ], maxiter = 100, + useMatrix = useMatrix ) + print( summary( fit3slsi[[ i ]]$e1 ) ) + + print( "********************* iterated 3SLS EViews-like ****************" ) + fit3slsi[[ i ]]$e1e <- systemfit( system, "3SLS", data = Kmenta, + inst = inst, methodResidCov = "noDfCor", method3sls = formulas[ i ], + maxiter = 100, useMatrix = useMatrix ) + print( summary( fit3slsi[[ i ]]$e1e, useDfSys = TRUE ) ) + + print( "************** iterated 3SLS with methodResidCov = Theil **************" ) + fit3slsi[[ i ]]$e1c <- systemfit( system, "3SLS", data = Kmenta, + inst = inst, methodResidCov = "Theil", method3sls = formulas[ i ], + maxiter = 100, x = TRUE, useMatrix = useMatrix ) + print( summary( fit3slsi[[ i ]]$e1c, useDfSys = TRUE ) ) + + print( "**************** iterated W3SLS EViews-like ****************" ) + fit3slsi[[ i ]]$e1we <- systemfit( system, "3SLS", data = Kmenta, + inst = inst, methodResidCov = "noDfCor", method3sls = formulas[ i ], + maxiter = 100, residCovWeighted = TRUE, useMatrix = useMatrix ) + print( summary( fit3slsi[[ i ]]$e1we, useDfSys = TRUE ) ) + + + print( "******* iterated 3SLS with restriction *****************" ) + fit3slsi[[ i ]]$e2 <- systemfit( system, "3SLS", data = Kmenta, + inst = inst, restrict.matrix = restrm, method3sls = formulas[ i ], + maxiter = 100, x = TRUE, useMatrix = useMatrix ) + print( summary( fit3slsi[[ i ]]$e2 ) ) + + print( "********* iterated 3SLS with restriction (EViews-like) *********" ) + fit3slsi[[ i ]]$e2e <- systemfit( system, "3SLS", data = Kmenta, + inst = inst, methodResidCov = "noDfCor", restrict.matrix = restrm, + method3sls = formulas[ i ], maxiter = 100, useMatrix = useMatrix ) + print( summary( fit3slsi[[ i ]]$e2e, useDfSys = TRUE ) ) + + print( "******** iterated W3SLS with restriction (EViews-like) *********" ) + fit3slsi[[ i ]]$e2we <- systemfit( system, "3SLS", data = Kmenta, + inst = inst, methodResidCov = "noDfCor", restrict.matrix = restrm, + method3sls = formulas[ i ], maxiter = 100, residCovWeighted = TRUE, + useMatrix = useMatrix ) + print( summary( fit3slsi[[ i ]]$e2we, useDfSys = TRUE ) ) + + + print( "********* iterated 3SLS with restriction via restrict.regMat *****************" ) + fit3slsi[[ i ]]$e3 <- systemfit( system, "3SLS", data = Kmenta, + inst = inst, restrict.regMat = tc, method3sls = formulas[ i ], + maxiter = 100, useMatrix = useMatrix ) + print( summary( fit3slsi[[ i ]]$e3 ) ) + + print( "********* iterated 3SLS with restriction via restrict.regMat (EViews-like) ***" ) + fit3slsi[[ i ]]$e3e <- systemfit( system, "3SLS", data = Kmenta, + inst = inst, methodResidCov = "noDfCor", restrict.regMat = tc, + method3sls = formulas[ i ], maxiter = 100, x = TRUE, + useMatrix = useMatrix ) + print( summary( fit3slsi[[ i ]]$e3e, useDfSys = TRUE ) ) + + print( "***** iterated W3SLS with restriction via restrict.regMat ********" ) + fit3slsi[[ i ]]$e3w <- systemfit( system, "3SLS", data = Kmenta, + inst = inst, restrict.regMat = tc, method3sls = formulas[ i ], maxiter = 100, + residCovWeighted = TRUE, x = TRUE, useMatrix = useMatrix ) + print( summary( fit3slsi[[ i ]]$e3w ) ) + + + print( "******** iterated 3SLS with 2 restrictions *********************" ) + fit3slsi[[ i ]]$e4 <- systemfit( system, "3SLS", data = Kmenta, + inst = inst, restrict.matrix = restr2m, restrict.rhs = restr2q, + method3sls = formulas[ i ], maxiter = 100, x = TRUE, + useMatrix = useMatrix ) + print( summary( fit3slsi[[ i ]]$e4 ) ) + + print( "********* iterated 3SLS with 2 restrictions (EViews-like) *******" ) + fit3slsi[[ i ]]$e4e <- systemfit( system, "3SLS", data = Kmenta, + inst = inst, methodResidCov = "noDfCor", restrict.matrix = restr2m, + restrict.rhs = restr2q, method3sls = formulas[ i ], maxiter = 100, + useMatrix = useMatrix ) + print( summary( fit3slsi[[ i ]]$e4e, useDfSys = TRUE ) ) + + print( "******** iterated W3SLS with 2 restrictions (EViews-like) *******" ) + fit3slsi[[ i ]]$e4we <- systemfit( system, "3SLS", data = Kmenta, + inst = inst, methodResidCov = "noDfCor", restrict.matrix = restr2m, + restrict.rhs = restr2q, method3sls = formulas[ i ], maxiter = 100, + residCovWeighted = TRUE, useMatrix = useMatrix ) + print( summary( fit3slsi[[ i ]]$e4we, useDfSys = TRUE ) ) + + + print( "******** iterated 3SLS with 2 restrictions via R and restrict.regMat *********" ) + fit3slsi[[ i ]]$e5 <- systemfit( system, "3SLS", data = Kmenta, + inst = inst, restrict.regMat = tc, restrict.matrix = restr3m, + restrict.rhs = restr3q, method3sls = formulas[ i ], maxiter = 100, + useMatrix = useMatrix ) + print( summary( fit3slsi[[ i ]]$e5 ) ) + + print( "*** iterated 3SLS with 2 restrictions via R and restrict.regMat (EViews-like)**" ) + fit3slsi[[ i ]]$e5e <- systemfit( system, "3SLS", data = Kmenta, + inst = inst, restrict.regMat = tc, methodResidCov = "noDfCor", + restrict.matrix = restr3m, restrict.rhs = restr3q, + method3sls = formulas[ i ], maxiter = 100, useMatrix = useMatrix ) + print( summary( fit3slsi[[ i ]]$e5e, useDfSys = TRUE ) ) + + print( "** iterated W3SLS with 2 restrictions via R and restrict.regMat ***" ) + fit3slsi[[ i ]]$e5w <- systemfit( system, "3SLS", data = Kmenta, + inst = inst, restrict.regMat = tc, restrict.matrix = restr3m, + restrict.rhs = restr3q, method3sls = formulas[ i ], maxiter = 100, + residCovWeighted = TRUE, x = TRUE, + useMatrix = useMatrix ) + print( summary( fit3slsi[[ i ]]$e5w ) ) + } [1] "***************************************************" [1] "3SLS formula: GLS" [1] "************* 3SLS *********************************" systemfit results method: iterated 3SLS convergence achieved after 6 iterations N DF SSR detRCov OLS-R2 McElroy-R2 system 40 33 178 0.983 0.668 0.814 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 65.7 3.87 1.97 0.755 0.726 supply 20 16 112.4 7.03 2.65 0.581 0.502 The covariance matrix of the residuals used for estimation demand supply demand 3.87 5.12 supply 5.12 7.03 The covariance matrix of the residuals demand supply demand 3.87 5.12 supply 5.12 7.03 The correlations of the residuals demand supply demand 1.000 0.982 supply 0.982 1.000 3SLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 94.6333 7.9208 11.95 1.1e-09 *** price -0.2436 0.0965 -2.52 0.022 * income 0.3140 0.0469 6.69 3.8e-06 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.966 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 65.729 MSE: 3.866 Root MSE: 1.966 Multiple R-Squared: 0.755 Adjusted R-Squared: 0.726 3SLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 52.6618 12.8051 4.11 0.00081 *** price 0.2266 0.1075 2.11 0.05110 . farmPrice 0.2234 0.0468 4.78 0.00021 *** trend 0.3800 0.0720 5.28 7.5e-05 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.651 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 112.431 MSE: 7.027 Root MSE: 2.651 Multiple R-Squared: 0.581 Adjusted R-Squared: 0.502 [1] "********************* iterated 3SLS EViews-like ****************" systemfit results method: iterated 3SLS convergence achieved after 6 iterations N DF SSR detRCov OLS-R2 McElroy-R2 system 40 33 177 0.667 0.67 0.782 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 65.7 3.87 1.97 0.755 0.726 supply 20 16 111.3 6.96 2.64 0.585 0.507 The covariance matrix of the residuals used for estimation demand supply demand 3.29 4.20 supply 4.20 5.57 The covariance matrix of the residuals demand supply demand 3.29 4.20 supply 4.20 5.57 The correlations of the residuals demand supply demand 1.000 0.982 supply 0.982 1.000 3SLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 94.6333 7.3027 12.96 1.7e-14 *** price -0.2436 0.0890 -2.74 0.0099 ** income 0.3140 0.0433 7.25 2.5e-08 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.966 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 65.729 MSE: 3.866 Root MSE: 1.966 Multiple R-Squared: 0.755 Adjusted R-Squared: 0.726 3SLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 52.5527 11.3956 4.61 5.8e-05 *** price 0.2271 0.0956 2.37 0.024 * farmPrice 0.2245 0.0416 5.39 5.8e-06 *** trend 0.3756 0.0641 5.86 1.5e-06 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.637 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 111.302 MSE: 6.956 Root MSE: 2.637 Multiple R-Squared: 0.585 Adjusted R-Squared: 0.507 [1] "************** iterated 3SLS with methodResidCov = Theil **************" systemfit results method: iterated 3SLS convergence achieved after 6 iterations N DF SSR detRCov OLS-R2 McElroy-R2 system 40 33 179 -0.818 0.665 0.957 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 65.7 3.87 1.97 0.755 0.726 supply 20 16 113.8 7.11 2.67 0.576 0.496 The covariance matrix of the residuals used for estimation demand supply demand 3.87 5.32 supply 5.32 7.11 warning: this covariance matrix is NOT positive semidefinit! The covariance matrix of the residuals demand supply demand 3.87 5.32 supply 5.32 7.11 The correlations of the residuals demand supply demand 1.000 0.982 supply 0.982 1.000 3SLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 94.6333 7.9208 11.95 1.6e-13 *** price -0.2436 0.0965 -2.52 0.017 * income 0.3140 0.0469 6.69 1.3e-07 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.966 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 65.729 MSE: 3.866 Root MSE: 1.966 Multiple R-Squared: 0.755 Adjusted R-Squared: 0.726 3SLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 52.7863 12.8707 4.10 0.00025 *** price 0.2261 0.1081 2.09 0.04425 * farmPrice 0.2221 0.0467 4.75 3.8e-05 *** trend 0.3851 0.0693 5.55 3.6e-06 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.667 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 113.77 MSE: 7.111 Root MSE: 2.667 Multiple R-Squared: 0.576 Adjusted R-Squared: 0.496 [1] "**************** iterated W3SLS EViews-like ****************" systemfit results method: iterated 3SLS convergence achieved after 6 iterations N DF SSR detRCov OLS-R2 McElroy-R2 system 40 33 177 0.667 0.67 0.782 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 65.7 3.87 1.97 0.755 0.726 supply 20 16 111.3 6.96 2.64 0.585 0.507 The covariance matrix of the residuals used for estimation demand supply demand 3.29 4.20 supply 4.20 5.57 The covariance matrix of the residuals demand supply demand 3.29 4.20 supply 4.20 5.57 The correlations of the residuals demand supply demand 1.000 0.982 supply 0.982 1.000 3SLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 94.6333 7.3027 12.96 1.7e-14 *** price -0.2436 0.0890 -2.74 0.0099 ** income 0.3140 0.0433 7.25 2.5e-08 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.966 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 65.729 MSE: 3.866 Root MSE: 1.966 Multiple R-Squared: 0.755 Adjusted R-Squared: 0.726 3SLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 52.5527 11.3956 4.61 5.8e-05 *** price 0.2271 0.0956 2.37 0.024 * farmPrice 0.2245 0.0416 5.39 5.8e-06 *** trend 0.3756 0.0641 5.86 1.5e-06 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.637 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 111.302 MSE: 6.956 Root MSE: 2.637 Multiple R-Squared: 0.585 Adjusted R-Squared: 0.507 [1] "******* iterated 3SLS with restriction *****************" systemfit results method: iterated 3SLS convergence achieved after 17 iterations N DF SSR detRCov OLS-R2 McElroy-R2 system 40 34 240 0.56 0.553 0.819 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 98.4 5.79 2.41 0.633 0.590 supply 20 16 141.1 8.82 2.97 0.474 0.375 The covariance matrix of the residuals used for estimation demand supply demand 5.79 7.11 supply 7.11 8.82 The covariance matrix of the residuals demand supply demand 5.79 7.11 supply 7.11 8.82 The correlations of the residuals demand supply demand 1.000 0.995 supply 0.995 1.000 3SLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 92.0742 9.6303 9.56 3.6e-11 *** price -0.1064 0.1023 -1.04 0.31 income 0.1996 0.0297 6.73 9.9e-08 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.406 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 98.435 MSE: 5.79 Root MSE: 2.406 Multiple R-Squared: 0.633 Adjusted R-Squared: 0.59 3SLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 68.8551 12.4839 5.52 3.7e-06 *** price 0.1833 0.1189 1.54 0.13 farmPrice 0.1202 0.0260 4.63 5.1e-05 *** trend 0.1996 0.0297 6.73 9.9e-08 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.97 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 141.147 MSE: 8.822 Root MSE: 2.97 Multiple R-Squared: 0.474 Adjusted R-Squared: 0.375 [1] "********* iterated 3SLS with restriction (EViews-like) *********" systemfit results method: iterated 3SLS convergence achieved after 20 iterations N DF SSR detRCov OLS-R2 McElroy-R2 system 40 34 237 0.364 0.557 0.755 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 99.3 5.84 2.42 0.630 0.586 supply 20 16 138.1 8.63 2.94 0.485 0.388 The covariance matrix of the residuals used for estimation demand supply demand 4.96 5.82 supply 5.82 6.90 The covariance matrix of the residuals demand supply demand 4.96 5.82 supply 5.82 6.90 The correlations of the residuals demand supply demand 1.000 0.995 supply 0.995 1.000 3SLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 92.0353 8.9214 10.32 5.2e-12 *** price -0.1043 0.0958 -1.09 0.28 income 0.1979 0.0299 6.61 1.4e-07 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.417 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 99.297 MSE: 5.841 Root MSE: 2.417 Multiple R-Squared: 0.63 Adjusted R-Squared: 0.586 3SLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 68.2830 11.1530 6.12 6.0e-07 *** price 0.1851 0.1053 1.76 0.088 . farmPrice 0.1245 0.0251 4.96 1.9e-05 *** trend 0.1979 0.0299 6.61 1.4e-07 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.938 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 138.088 MSE: 8.63 Root MSE: 2.938 Multiple R-Squared: 0.485 Adjusted R-Squared: 0.388 [1] "******** iterated W3SLS with restriction (EViews-like) *********" systemfit results method: iterated 3SLS convergence achieved after 20 iterations N DF SSR detRCov OLS-R2 McElroy-R2 system 40 34 237 0.364 0.557 0.755 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 99.3 5.84 2.42 0.630 0.586 supply 20 16 138.1 8.63 2.94 0.485 0.388 The covariance matrix of the residuals used for estimation demand supply demand 4.96 5.82 supply 5.82 6.90 The covariance matrix of the residuals demand supply demand 4.96 5.82 supply 5.82 6.90 The correlations of the residuals demand supply demand 1.000 0.995 supply 0.995 1.000 3SLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 92.0353 8.9214 10.32 5.2e-12 *** price -0.1043 0.0958 -1.09 0.28 income 0.1979 0.0299 6.61 1.4e-07 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.417 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 99.297 MSE: 5.841 Root MSE: 2.417 Multiple R-Squared: 0.63 Adjusted R-Squared: 0.586 3SLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 68.2830 11.1530 6.12 6.0e-07 *** price 0.1851 0.1053 1.76 0.088 . farmPrice 0.1245 0.0251 4.96 1.9e-05 *** trend 0.1979 0.0299 6.61 1.4e-07 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.938 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 138.088 MSE: 8.63 Root MSE: 2.938 Multiple R-Squared: 0.485 Adjusted R-Squared: 0.388 [1] "********* iterated 3SLS with restriction via restrict.regMat *****************" systemfit results method: iterated 3SLS convergence achieved after 17 iterations N DF SSR detRCov OLS-R2 McElroy-R2 system 40 34 240 0.56 0.553 0.819 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 98.4 5.79 2.41 0.633 0.590 supply 20 16 141.1 8.82 2.97 0.474 0.375 The covariance matrix of the residuals used for estimation demand supply demand 5.79 7.11 supply 7.11 8.82 The covariance matrix of the residuals demand supply demand 5.79 7.11 supply 7.11 8.82 The correlations of the residuals demand supply demand 1.000 0.995 supply 0.995 1.000 3SLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 92.0742 9.6303 9.56 3.6e-11 *** price -0.1064 0.1023 -1.04 0.31 income 0.1996 0.0297 6.73 9.9e-08 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.406 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 98.435 MSE: 5.79 Root MSE: 2.406 Multiple R-Squared: 0.633 Adjusted R-Squared: 0.59 3SLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 68.8551 12.4839 5.52 3.7e-06 *** price 0.1833 0.1189 1.54 0.13 farmPrice 0.1202 0.0260 4.63 5.1e-05 *** trend 0.1996 0.0297 6.73 9.9e-08 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.97 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 141.147 MSE: 8.822 Root MSE: 2.97 Multiple R-Squared: 0.474 Adjusted R-Squared: 0.375 [1] "********* iterated 3SLS with restriction via restrict.regMat (EViews-like) ***" systemfit results method: iterated 3SLS convergence achieved after 20 iterations N DF SSR detRCov OLS-R2 McElroy-R2 system 40 34 237 0.364 0.557 0.755 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 99.3 5.84 2.42 0.630 0.586 supply 20 16 138.1 8.63 2.94 0.485 0.388 The covariance matrix of the residuals used for estimation demand supply demand 4.96 5.82 supply 5.82 6.90 The covariance matrix of the residuals demand supply demand 4.96 5.82 supply 5.82 6.90 The correlations of the residuals demand supply demand 1.000 0.995 supply 0.995 1.000 3SLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 92.0353 8.9214 10.32 5.2e-12 *** price -0.1043 0.0958 -1.09 0.28 income 0.1979 0.0299 6.61 1.4e-07 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.417 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 99.297 MSE: 5.841 Root MSE: 2.417 Multiple R-Squared: 0.63 Adjusted R-Squared: 0.586 3SLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 68.2830 11.1530 6.12 6.0e-07 *** price 0.1851 0.1053 1.76 0.088 . farmPrice 0.1245 0.0251 4.96 1.9e-05 *** trend 0.1979 0.0299 6.61 1.4e-07 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.938 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 138.088 MSE: 8.63 Root MSE: 2.938 Multiple R-Squared: 0.485 Adjusted R-Squared: 0.388 [1] "***** iterated W3SLS with restriction via restrict.regMat ********" systemfit results method: iterated 3SLS convergence achieved after 17 iterations N DF SSR detRCov OLS-R2 McElroy-R2 system 40 34 240 0.56 0.553 0.819 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 98.4 5.79 2.41 0.633 0.590 supply 20 16 141.1 8.82 2.97 0.474 0.375 The covariance matrix of the residuals used for estimation demand supply demand 5.79 7.11 supply 7.11 8.82 The covariance matrix of the residuals demand supply demand 5.79 7.11 supply 7.11 8.82 The correlations of the residuals demand supply demand 1.000 0.995 supply 0.995 1.000 3SLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 92.0742 9.6303 9.56 3.6e-11 *** price -0.1064 0.1023 -1.04 0.31 income 0.1996 0.0297 6.73 9.9e-08 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.406 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 98.435 MSE: 5.79 Root MSE: 2.406 Multiple R-Squared: 0.633 Adjusted R-Squared: 0.59 3SLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 68.8551 12.4839 5.52 3.7e-06 *** price 0.1833 0.1189 1.54 0.13 farmPrice 0.1202 0.0260 4.63 5.1e-05 *** trend 0.1996 0.0297 6.73 9.9e-08 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.97 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 141.147 MSE: 8.822 Root MSE: 2.97 Multiple R-Squared: 0.474 Adjusted R-Squared: 0.375 [1] "******** iterated 3SLS with 2 restrictions *********************" systemfit results method: iterated 3SLS convergence achieved after 9 iterations N DF SSR detRCov OLS-R2 McElroy-R2 system 40 35 185 1.76 0.655 0.71 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 69.9 4.11 2.03 0.739 0.709 supply 20 16 114.8 7.18 2.68 0.572 0.491 The covariance matrix of the residuals used for estimation demand supply demand 4.11 5.27 supply 5.27 7.18 The covariance matrix of the residuals demand supply demand 4.11 5.27 supply 5.27 7.18 The correlations of the residuals demand supply demand 1.00 0.97 supply 0.97 1.00 3SLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 90.1569 7.9174 11.39 2.5e-13 *** price -0.2007 0.0920 -2.18 0.036 * income 0.3159 0.0192 16.42 < 2e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.028 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 69.917 MSE: 4.113 Root MSE: 2.028 Multiple R-Squared: 0.739 Adjusted R-Squared: 0.709 3SLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 46.4810 8.0104 5.80 1.4e-06 *** price 0.2993 0.0920 3.25 0.0025 ** farmPrice 0.2190 0.0196 11.20 4.0e-13 *** trend 0.3159 0.0192 16.42 < 2e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.679 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 114.83 MSE: 7.177 Root MSE: 2.679 Multiple R-Squared: 0.572 Adjusted R-Squared: 0.491 [1] "********* iterated 3SLS with 2 restrictions (EViews-like) *******" systemfit results method: iterated 3SLS convergence achieved after 8 iterations N DF SSR detRCov OLS-R2 McElroy-R2 system 40 35 179 1.19 0.666 0.668 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 68.3 4.02 2.00 0.745 0.715 supply 20 16 110.8 6.92 2.63 0.587 0.509 The covariance matrix of the residuals used for estimation demand supply demand 3.41 4.21 supply 4.21 5.54 The covariance matrix of the residuals demand supply demand 3.41 4.21 supply 4.21 5.54 The correlations of the residuals demand supply demand 1.000 0.968 supply 0.968 1.000 3SLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 91.3901 7.3161 12.5 1.9e-14 *** price -0.2168 0.0835 -2.6 0.014 * income 0.3199 0.0168 19.1 < 2e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.004 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 68.293 MSE: 4.017 Root MSE: 2.004 Multiple R-Squared: 0.745 Adjusted R-Squared: 0.715 3SLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 47.5787 7.4268 6.41 2.3e-07 *** price 0.2832 0.0835 3.39 0.0017 ** farmPrice 0.2240 0.0168 13.36 2.7e-15 *** trend 0.3199 0.0168 19.07 < 2e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.631 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 110.791 MSE: 6.924 Root MSE: 2.631 Multiple R-Squared: 0.587 Adjusted R-Squared: 0.509 [1] "******** iterated W3SLS with 2 restrictions (EViews-like) *******" systemfit results method: iterated 3SLS convergence achieved after 8 iterations N DF SSR detRCov OLS-R2 McElroy-R2 system 40 35 179 1.19 0.666 0.668 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 68.3 4.02 2.00 0.745 0.715 supply 20 16 110.8 6.92 2.63 0.587 0.509 The covariance matrix of the residuals used for estimation demand supply demand 3.41 4.21 supply 4.21 5.54 The covariance matrix of the residuals demand supply demand 3.41 4.21 supply 4.21 5.54 The correlations of the residuals demand supply demand 1.000 0.968 supply 0.968 1.000 3SLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 91.3901 7.3161 12.5 1.9e-14 *** price -0.2168 0.0835 -2.6 0.014 * income 0.3199 0.0168 19.1 < 2e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.004 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 68.293 MSE: 4.017 Root MSE: 2.004 Multiple R-Squared: 0.745 Adjusted R-Squared: 0.715 3SLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 47.5787 7.4268 6.41 2.3e-07 *** price 0.2832 0.0835 3.39 0.0017 ** farmPrice 0.2240 0.0168 13.36 2.7e-15 *** trend 0.3199 0.0168 19.07 < 2e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.631 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 110.791 MSE: 6.924 Root MSE: 2.631 Multiple R-Squared: 0.587 Adjusted R-Squared: 0.509 [1] "******** iterated 3SLS with 2 restrictions via R and restrict.regMat *********" systemfit results method: iterated 3SLS convergence achieved after 9 iterations N DF SSR detRCov OLS-R2 McElroy-R2 system 40 35 185 1.76 0.655 0.71 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 69.9 4.11 2.03 0.739 0.709 supply 20 16 114.8 7.18 2.68 0.572 0.491 The covariance matrix of the residuals used for estimation demand supply demand 4.11 5.27 supply 5.27 7.18 The covariance matrix of the residuals demand supply demand 4.11 5.27 supply 5.27 7.18 The correlations of the residuals demand supply demand 1.00 0.97 supply 0.97 1.00 3SLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 90.1569 7.9174 11.39 2.5e-13 *** price -0.2007 0.0920 -2.18 0.036 * income 0.3159 0.0192 16.42 < 2e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.028 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 69.917 MSE: 4.113 Root MSE: 2.028 Multiple R-Squared: 0.739 Adjusted R-Squared: 0.709 3SLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 46.4810 8.0104 5.80 1.4e-06 *** price 0.2993 0.0920 3.25 0.0025 ** farmPrice 0.2190 0.0196 11.20 4.0e-13 *** trend 0.3159 0.0192 16.42 < 2e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.679 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 114.83 MSE: 7.177 Root MSE: 2.679 Multiple R-Squared: 0.572 Adjusted R-Squared: 0.491 [1] "*** iterated 3SLS with 2 restrictions via R and restrict.regMat (EViews-like)**" systemfit results method: iterated 3SLS convergence achieved after 8 iterations N DF SSR detRCov OLS-R2 McElroy-R2 system 40 35 179 1.19 0.666 0.668 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 68.3 4.02 2.00 0.745 0.715 supply 20 16 110.8 6.92 2.63 0.587 0.509 The covariance matrix of the residuals used for estimation demand supply demand 3.41 4.21 supply 4.21 5.54 The covariance matrix of the residuals demand supply demand 3.41 4.21 supply 4.21 5.54 The correlations of the residuals demand supply demand 1.000 0.968 supply 0.968 1.000 3SLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 91.3901 7.3161 12.5 1.9e-14 *** price -0.2168 0.0835 -2.6 0.014 * income 0.3199 0.0168 19.1 < 2e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.004 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 68.293 MSE: 4.017 Root MSE: 2.004 Multiple R-Squared: 0.745 Adjusted R-Squared: 0.715 3SLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 47.5787 7.4268 6.41 2.3e-07 *** price 0.2832 0.0835 3.39 0.0017 ** farmPrice 0.2240 0.0168 13.36 2.7e-15 *** trend 0.3199 0.0168 19.07 < 2e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.631 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 110.791 MSE: 6.924 Root MSE: 2.631 Multiple R-Squared: 0.587 Adjusted R-Squared: 0.509 [1] "** iterated W3SLS with 2 restrictions via R and restrict.regMat ***" systemfit results method: iterated 3SLS convergence achieved after 9 iterations N DF SSR detRCov OLS-R2 McElroy-R2 system 40 35 185 1.76 0.655 0.71 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 69.9 4.11 2.03 0.739 0.709 supply 20 16 114.8 7.18 2.68 0.572 0.491 The covariance matrix of the residuals used for estimation demand supply demand 4.11 5.27 supply 5.27 7.18 The covariance matrix of the residuals demand supply demand 4.11 5.27 supply 5.27 7.18 The correlations of the residuals demand supply demand 1.00 0.97 supply 0.97 1.00 3SLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 90.1569 7.9174 11.39 2.5e-13 *** price -0.2007 0.0920 -2.18 0.036 * income 0.3159 0.0192 16.42 < 2e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.028 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 69.917 MSE: 4.113 Root MSE: 2.028 Multiple R-Squared: 0.739 Adjusted R-Squared: 0.709 3SLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 46.4810 8.0104 5.80 1.4e-06 *** price 0.2993 0.0920 3.25 0.0025 ** farmPrice 0.2190 0.0196 11.20 4.0e-13 *** trend 0.3159 0.0192 16.42 < 2e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.679 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 114.83 MSE: 7.177 Root MSE: 2.679 Multiple R-Squared: 0.572 Adjusted R-Squared: 0.491 [1] "***************************************************" [1] "3SLS formula: IV" [1] "************* 3SLS *********************************" systemfit results method: iterated 3SLS convergence achieved after 6 iterations N DF SSR detRCov OLS-R2 McElroy-R2 system 40 33 178 0.983 0.668 0.814 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 65.7 3.87 1.97 0.755 0.726 supply 20 16 112.4 7.03 2.65 0.581 0.502 The covariance matrix of the residuals used for estimation demand supply demand 3.87 5.12 supply 5.12 7.03 The covariance matrix of the residuals demand supply demand 3.87 5.12 supply 5.12 7.03 The correlations of the residuals demand supply demand 1.000 0.982 supply 0.982 1.000 3SLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 94.6333 7.9208 11.95 1.1e-09 *** price -0.2436 0.0965 -2.52 0.022 * income 0.3140 0.0469 6.69 3.8e-06 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.966 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 65.729 MSE: 3.866 Root MSE: 1.966 Multiple R-Squared: 0.755 Adjusted R-Squared: 0.726 3SLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 52.6618 12.8051 4.11 0.00081 *** price 0.2266 0.1075 2.11 0.05110 . farmPrice 0.2234 0.0468 4.78 0.00021 *** trend 0.3800 0.0720 5.28 7.5e-05 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.651 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 112.431 MSE: 7.027 Root MSE: 2.651 Multiple R-Squared: 0.581 Adjusted R-Squared: 0.502 [1] "********************* iterated 3SLS EViews-like ****************" systemfit results method: iterated 3SLS convergence achieved after 6 iterations N DF SSR detRCov OLS-R2 McElroy-R2 system 40 33 177 0.667 0.67 0.782 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 65.7 3.87 1.97 0.755 0.726 supply 20 16 111.3 6.96 2.64 0.585 0.507 The covariance matrix of the residuals used for estimation demand supply demand 3.29 4.20 supply 4.20 5.57 The covariance matrix of the residuals demand supply demand 3.29 4.20 supply 4.20 5.57 The correlations of the residuals demand supply demand 1.000 0.982 supply 0.982 1.000 3SLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 94.6333 7.3027 12.96 1.7e-14 *** price -0.2436 0.0890 -2.74 0.0099 ** income 0.3140 0.0433 7.25 2.5e-08 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.966 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 65.729 MSE: 3.866 Root MSE: 1.966 Multiple R-Squared: 0.755 Adjusted R-Squared: 0.726 3SLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 52.5527 11.3956 4.61 5.8e-05 *** price 0.2271 0.0956 2.37 0.024 * farmPrice 0.2245 0.0416 5.39 5.8e-06 *** trend 0.3756 0.0641 5.86 1.5e-06 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.637 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 111.302 MSE: 6.956 Root MSE: 2.637 Multiple R-Squared: 0.585 Adjusted R-Squared: 0.507 [1] "************** iterated 3SLS with methodResidCov = Theil **************" systemfit results method: iterated 3SLS convergence achieved after 6 iterations N DF SSR detRCov OLS-R2 McElroy-R2 system 40 33 179 -0.818 0.665 0.957 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 65.7 3.87 1.97 0.755 0.726 supply 20 16 113.8 7.11 2.67 0.576 0.496 The covariance matrix of the residuals used for estimation demand supply demand 3.87 5.32 supply 5.32 7.11 warning: this covariance matrix is NOT positive semidefinit! The covariance matrix of the residuals demand supply demand 3.87 5.32 supply 5.32 7.11 The correlations of the residuals demand supply demand 1.000 0.982 supply 0.982 1.000 3SLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 94.6333 7.9208 11.95 1.6e-13 *** price -0.2436 0.0965 -2.52 0.017 * income 0.3140 0.0469 6.69 1.3e-07 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.966 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 65.729 MSE: 3.866 Root MSE: 1.966 Multiple R-Squared: 0.755 Adjusted R-Squared: 0.726 3SLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 52.7863 12.8707 4.10 0.00025 *** price 0.2261 0.1081 2.09 0.04425 * farmPrice 0.2221 0.0467 4.75 3.8e-05 *** trend 0.3851 0.0693 5.55 3.6e-06 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.667 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 113.77 MSE: 7.111 Root MSE: 2.667 Multiple R-Squared: 0.576 Adjusted R-Squared: 0.496 [1] "**************** iterated W3SLS EViews-like ****************" systemfit results method: iterated 3SLS convergence achieved after 6 iterations N DF SSR detRCov OLS-R2 McElroy-R2 system 40 33 177 0.667 0.67 0.782 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 65.7 3.87 1.97 0.755 0.726 supply 20 16 111.3 6.96 2.64 0.585 0.507 The covariance matrix of the residuals used for estimation demand supply demand 3.29 4.20 supply 4.20 5.57 The covariance matrix of the residuals demand supply demand 3.29 4.20 supply 4.20 5.57 The correlations of the residuals demand supply demand 1.000 0.982 supply 0.982 1.000 3SLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 94.6333 7.3027 12.96 1.7e-14 *** price -0.2436 0.0890 -2.74 0.0099 ** income 0.3140 0.0433 7.25 2.5e-08 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.966 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 65.729 MSE: 3.866 Root MSE: 1.966 Multiple R-Squared: 0.755 Adjusted R-Squared: 0.726 3SLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 52.5527 11.3956 4.61 5.8e-05 *** price 0.2271 0.0956 2.37 0.024 * farmPrice 0.2245 0.0416 5.39 5.8e-06 *** trend 0.3756 0.0641 5.86 1.5e-06 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.637 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 111.302 MSE: 6.956 Root MSE: 2.637 Multiple R-Squared: 0.585 Adjusted R-Squared: 0.507 [1] "******* iterated 3SLS with restriction *****************" systemfit results method: iterated 3SLS convergence achieved after 17 iterations N DF SSR detRCov OLS-R2 McElroy-R2 system 40 34 240 0.56 0.553 0.819 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 98.4 5.79 2.41 0.633 0.590 supply 20 16 141.1 8.82 2.97 0.474 0.375 The covariance matrix of the residuals used for estimation demand supply demand 5.79 7.11 supply 7.11 8.82 The covariance matrix of the residuals demand supply demand 5.79 7.11 supply 7.11 8.82 The correlations of the residuals demand supply demand 1.000 0.995 supply 0.995 1.000 3SLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 92.0742 9.6303 9.56 3.6e-11 *** price -0.1064 0.1023 -1.04 0.31 income 0.1996 0.0297 6.73 9.9e-08 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.406 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 98.435 MSE: 5.79 Root MSE: 2.406 Multiple R-Squared: 0.633 Adjusted R-Squared: 0.59 3SLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 68.8551 12.4839 5.52 3.7e-06 *** price 0.1833 0.1189 1.54 0.13 farmPrice 0.1202 0.0260 4.63 5.1e-05 *** trend 0.1996 0.0297 6.73 9.9e-08 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.97 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 141.147 MSE: 8.822 Root MSE: 2.97 Multiple R-Squared: 0.474 Adjusted R-Squared: 0.375 [1] "********* iterated 3SLS with restriction (EViews-like) *********" systemfit results method: iterated 3SLS convergence achieved after 20 iterations N DF SSR detRCov OLS-R2 McElroy-R2 system 40 34 237 0.364 0.557 0.755 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 99.3 5.84 2.42 0.630 0.586 supply 20 16 138.1 8.63 2.94 0.485 0.388 The covariance matrix of the residuals used for estimation demand supply demand 4.96 5.82 supply 5.82 6.90 The covariance matrix of the residuals demand supply demand 4.96 5.82 supply 5.82 6.90 The correlations of the residuals demand supply demand 1.000 0.995 supply 0.995 1.000 3SLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 92.0353 8.9214 10.32 5.2e-12 *** price -0.1043 0.0958 -1.09 0.28 income 0.1979 0.0299 6.61 1.4e-07 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.417 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 99.297 MSE: 5.841 Root MSE: 2.417 Multiple R-Squared: 0.63 Adjusted R-Squared: 0.586 3SLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 68.2830 11.1530 6.12 6.0e-07 *** price 0.1851 0.1053 1.76 0.088 . farmPrice 0.1245 0.0251 4.96 1.9e-05 *** trend 0.1979 0.0299 6.61 1.4e-07 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.938 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 138.088 MSE: 8.63 Root MSE: 2.938 Multiple R-Squared: 0.485 Adjusted R-Squared: 0.388 [1] "******** iterated W3SLS with restriction (EViews-like) *********" systemfit results method: iterated 3SLS convergence achieved after 20 iterations N DF SSR detRCov OLS-R2 McElroy-R2 system 40 34 237 0.364 0.557 0.755 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 99.3 5.84 2.42 0.630 0.586 supply 20 16 138.1 8.63 2.94 0.485 0.388 The covariance matrix of the residuals used for estimation demand supply demand 4.96 5.82 supply 5.82 6.90 The covariance matrix of the residuals demand supply demand 4.96 5.82 supply 5.82 6.90 The correlations of the residuals demand supply demand 1.000 0.995 supply 0.995 1.000 3SLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 92.0353 8.9214 10.32 5.2e-12 *** price -0.1043 0.0958 -1.09 0.28 income 0.1979 0.0299 6.61 1.4e-07 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.417 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 99.297 MSE: 5.841 Root MSE: 2.417 Multiple R-Squared: 0.63 Adjusted R-Squared: 0.586 3SLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 68.2830 11.1530 6.12 6.0e-07 *** price 0.1851 0.1053 1.76 0.088 . farmPrice 0.1245 0.0251 4.96 1.9e-05 *** trend 0.1979 0.0299 6.61 1.4e-07 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.938 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 138.088 MSE: 8.63 Root MSE: 2.938 Multiple R-Squared: 0.485 Adjusted R-Squared: 0.388 [1] "********* iterated 3SLS with restriction via restrict.regMat *****************" systemfit results method: iterated 3SLS convergence achieved after 17 iterations N DF SSR detRCov OLS-R2 McElroy-R2 system 40 34 240 0.56 0.553 0.819 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 98.4 5.79 2.41 0.633 0.590 supply 20 16 141.1 8.82 2.97 0.474 0.375 The covariance matrix of the residuals used for estimation demand supply demand 5.79 7.11 supply 7.11 8.82 The covariance matrix of the residuals demand supply demand 5.79 7.11 supply 7.11 8.82 The correlations of the residuals demand supply demand 1.000 0.995 supply 0.995 1.000 3SLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 92.0742 9.6303 9.56 3.6e-11 *** price -0.1064 0.1023 -1.04 0.31 income 0.1996 0.0297 6.73 9.9e-08 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.406 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 98.435 MSE: 5.79 Root MSE: 2.406 Multiple R-Squared: 0.633 Adjusted R-Squared: 0.59 3SLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 68.8551 12.4839 5.52 3.7e-06 *** price 0.1833 0.1189 1.54 0.13 farmPrice 0.1202 0.0260 4.63 5.1e-05 *** trend 0.1996 0.0297 6.73 9.9e-08 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.97 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 141.147 MSE: 8.822 Root MSE: 2.97 Multiple R-Squared: 0.474 Adjusted R-Squared: 0.375 [1] "********* iterated 3SLS with restriction via restrict.regMat (EViews-like) ***" systemfit results method: iterated 3SLS convergence achieved after 20 iterations N DF SSR detRCov OLS-R2 McElroy-R2 system 40 34 237 0.364 0.557 0.755 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 99.3 5.84 2.42 0.630 0.586 supply 20 16 138.1 8.63 2.94 0.485 0.388 The covariance matrix of the residuals used for estimation demand supply demand 4.96 5.82 supply 5.82 6.90 The covariance matrix of the residuals demand supply demand 4.96 5.82 supply 5.82 6.90 The correlations of the residuals demand supply demand 1.000 0.995 supply 0.995 1.000 3SLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 92.0353 8.9214 10.32 5.2e-12 *** price -0.1043 0.0958 -1.09 0.28 income 0.1979 0.0299 6.61 1.4e-07 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.417 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 99.297 MSE: 5.841 Root MSE: 2.417 Multiple R-Squared: 0.63 Adjusted R-Squared: 0.586 3SLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 68.2830 11.1530 6.12 6.0e-07 *** price 0.1851 0.1053 1.76 0.088 . farmPrice 0.1245 0.0251 4.96 1.9e-05 *** trend 0.1979 0.0299 6.61 1.4e-07 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.938 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 138.088 MSE: 8.63 Root MSE: 2.938 Multiple R-Squared: 0.485 Adjusted R-Squared: 0.388 [1] "***** iterated W3SLS with restriction via restrict.regMat ********" systemfit results method: iterated 3SLS convergence achieved after 17 iterations N DF SSR detRCov OLS-R2 McElroy-R2 system 40 34 240 0.56 0.553 0.819 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 98.4 5.79 2.41 0.633 0.590 supply 20 16 141.1 8.82 2.97 0.474 0.375 The covariance matrix of the residuals used for estimation demand supply demand 5.79 7.11 supply 7.11 8.82 The covariance matrix of the residuals demand supply demand 5.79 7.11 supply 7.11 8.82 The correlations of the residuals demand supply demand 1.000 0.995 supply 0.995 1.000 3SLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 92.0742 9.6303 9.56 3.6e-11 *** price -0.1064 0.1023 -1.04 0.31 income 0.1996 0.0297 6.73 9.9e-08 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.406 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 98.435 MSE: 5.79 Root MSE: 2.406 Multiple R-Squared: 0.633 Adjusted R-Squared: 0.59 3SLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 68.8551 12.4839 5.52 3.7e-06 *** price 0.1833 0.1189 1.54 0.13 farmPrice 0.1202 0.0260 4.63 5.1e-05 *** trend 0.1996 0.0297 6.73 9.9e-08 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.97 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 141.147 MSE: 8.822 Root MSE: 2.97 Multiple R-Squared: 0.474 Adjusted R-Squared: 0.375 [1] "******** iterated 3SLS with 2 restrictions *********************" systemfit results method: iterated 3SLS convergence achieved after 9 iterations N DF SSR detRCov OLS-R2 McElroy-R2 system 40 35 185 1.76 0.655 0.71 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 69.9 4.11 2.03 0.739 0.709 supply 20 16 114.8 7.18 2.68 0.572 0.491 The covariance matrix of the residuals used for estimation demand supply demand 4.11 5.27 supply 5.27 7.18 The covariance matrix of the residuals demand supply demand 4.11 5.27 supply 5.27 7.18 The correlations of the residuals demand supply demand 1.00 0.97 supply 0.97 1.00 3SLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 90.1569 7.9174 11.39 2.5e-13 *** price -0.2007 0.0920 -2.18 0.036 * income 0.3159 0.0192 16.42 < 2e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.028 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 69.917 MSE: 4.113 Root MSE: 2.028 Multiple R-Squared: 0.739 Adjusted R-Squared: 0.709 3SLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 46.4810 8.0104 5.80 1.4e-06 *** price 0.2993 0.0920 3.25 0.0025 ** farmPrice 0.2190 0.0196 11.20 4.0e-13 *** trend 0.3159 0.0192 16.42 < 2e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.679 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 114.83 MSE: 7.177 Root MSE: 2.679 Multiple R-Squared: 0.572 Adjusted R-Squared: 0.491 [1] "********* iterated 3SLS with 2 restrictions (EViews-like) *******" systemfit results method: iterated 3SLS convergence achieved after 8 iterations N DF SSR detRCov OLS-R2 McElroy-R2 system 40 35 179 1.19 0.666 0.668 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 68.3 4.02 2.00 0.745 0.715 supply 20 16 110.8 6.92 2.63 0.587 0.509 The covariance matrix of the residuals used for estimation demand supply demand 3.41 4.21 supply 4.21 5.54 The covariance matrix of the residuals demand supply demand 3.41 4.21 supply 4.21 5.54 The correlations of the residuals demand supply demand 1.000 0.968 supply 0.968 1.000 3SLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 91.3901 7.3161 12.5 1.9e-14 *** price -0.2168 0.0835 -2.6 0.014 * income 0.3199 0.0168 19.1 < 2e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.004 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 68.293 MSE: 4.017 Root MSE: 2.004 Multiple R-Squared: 0.745 Adjusted R-Squared: 0.715 3SLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 47.5787 7.4268 6.41 2.3e-07 *** price 0.2832 0.0835 3.39 0.0017 ** farmPrice 0.2240 0.0168 13.36 2.7e-15 *** trend 0.3199 0.0168 19.07 < 2e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.631 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 110.791 MSE: 6.924 Root MSE: 2.631 Multiple R-Squared: 0.587 Adjusted R-Squared: 0.509 [1] "******** iterated W3SLS with 2 restrictions (EViews-like) *******" systemfit results method: iterated 3SLS convergence achieved after 8 iterations N DF SSR detRCov OLS-R2 McElroy-R2 system 40 35 179 1.19 0.666 0.668 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 68.3 4.02 2.00 0.745 0.715 supply 20 16 110.8 6.92 2.63 0.587 0.509 The covariance matrix of the residuals used for estimation demand supply demand 3.41 4.21 supply 4.21 5.54 The covariance matrix of the residuals demand supply demand 3.41 4.21 supply 4.21 5.54 The correlations of the residuals demand supply demand 1.000 0.968 supply 0.968 1.000 3SLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 91.3901 7.3161 12.5 1.9e-14 *** price -0.2168 0.0835 -2.6 0.014 * income 0.3199 0.0168 19.1 < 2e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.004 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 68.293 MSE: 4.017 Root MSE: 2.004 Multiple R-Squared: 0.745 Adjusted R-Squared: 0.715 3SLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 47.5787 7.4268 6.41 2.3e-07 *** price 0.2832 0.0835 3.39 0.0017 ** farmPrice 0.2240 0.0168 13.36 2.7e-15 *** trend 0.3199 0.0168 19.07 < 2e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.631 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 110.791 MSE: 6.924 Root MSE: 2.631 Multiple R-Squared: 0.587 Adjusted R-Squared: 0.509 [1] "******** iterated 3SLS with 2 restrictions via R and restrict.regMat *********" systemfit results method: iterated 3SLS convergence achieved after 9 iterations N DF SSR detRCov OLS-R2 McElroy-R2 system 40 35 185 1.76 0.655 0.71 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 69.9 4.11 2.03 0.739 0.709 supply 20 16 114.8 7.18 2.68 0.572 0.491 The covariance matrix of the residuals used for estimation demand supply demand 4.11 5.27 supply 5.27 7.18 The covariance matrix of the residuals demand supply demand 4.11 5.27 supply 5.27 7.18 The correlations of the residuals demand supply demand 1.00 0.97 supply 0.97 1.00 3SLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 90.1569 7.9174 11.39 2.5e-13 *** price -0.2007 0.0920 -2.18 0.036 * income 0.3159 0.0192 16.42 < 2e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.028 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 69.917 MSE: 4.113 Root MSE: 2.028 Multiple R-Squared: 0.739 Adjusted R-Squared: 0.709 3SLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 46.4810 8.0104 5.80 1.4e-06 *** price 0.2993 0.0920 3.25 0.0025 ** farmPrice 0.2190 0.0196 11.20 4.0e-13 *** trend 0.3159 0.0192 16.42 < 2e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.679 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 114.83 MSE: 7.177 Root MSE: 2.679 Multiple R-Squared: 0.572 Adjusted R-Squared: 0.491 [1] "*** iterated 3SLS with 2 restrictions via R and restrict.regMat (EViews-like)**" systemfit results method: iterated 3SLS convergence achieved after 8 iterations N DF SSR detRCov OLS-R2 McElroy-R2 system 40 35 179 1.19 0.666 0.668 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 68.3 4.02 2.00 0.745 0.715 supply 20 16 110.8 6.92 2.63 0.587 0.509 The covariance matrix of the residuals used for estimation demand supply demand 3.41 4.21 supply 4.21 5.54 The covariance matrix of the residuals demand supply demand 3.41 4.21 supply 4.21 5.54 The correlations of the residuals demand supply demand 1.000 0.968 supply 0.968 1.000 3SLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 91.3901 7.3161 12.5 1.9e-14 *** price -0.2168 0.0835 -2.6 0.014 * income 0.3199 0.0168 19.1 < 2e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.004 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 68.293 MSE: 4.017 Root MSE: 2.004 Multiple R-Squared: 0.745 Adjusted R-Squared: 0.715 3SLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 47.5787 7.4268 6.41 2.3e-07 *** price 0.2832 0.0835 3.39 0.0017 ** farmPrice 0.2240 0.0168 13.36 2.7e-15 *** trend 0.3199 0.0168 19.07 < 2e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.631 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 110.791 MSE: 6.924 Root MSE: 2.631 Multiple R-Squared: 0.587 Adjusted R-Squared: 0.509 [1] "** iterated W3SLS with 2 restrictions via R and restrict.regMat ***" systemfit results method: iterated 3SLS convergence achieved after 9 iterations N DF SSR detRCov OLS-R2 McElroy-R2 system 40 35 185 1.76 0.655 0.71 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 69.9 4.11 2.03 0.739 0.709 supply 20 16 114.8 7.18 2.68 0.572 0.491 The covariance matrix of the residuals used for estimation demand supply demand 4.11 5.27 supply 5.27 7.18 The covariance matrix of the residuals demand supply demand 4.11 5.27 supply 5.27 7.18 The correlations of the residuals demand supply demand 1.00 0.97 supply 0.97 1.00 3SLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 90.1569 7.9174 11.39 2.5e-13 *** price -0.2007 0.0920 -2.18 0.036 * income 0.3159 0.0192 16.42 < 2e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.028 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 69.917 MSE: 4.113 Root MSE: 2.028 Multiple R-Squared: 0.739 Adjusted R-Squared: 0.709 3SLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 46.4810 8.0104 5.80 1.4e-06 *** price 0.2993 0.0920 3.25 0.0025 ** farmPrice 0.2190 0.0196 11.20 4.0e-13 *** trend 0.3159 0.0192 16.42 < 2e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.679 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 114.83 MSE: 7.177 Root MSE: 2.679 Multiple R-Squared: 0.572 Adjusted R-Squared: 0.491 [1] "***************************************************" [1] "3SLS formula: Schmidt" [1] "************* 3SLS *********************************" systemfit results method: iterated 3SLS convergence achieved after 6 iterations N DF SSR detRCov OLS-R2 McElroy-R2 system 40 33 178 0.983 0.668 0.814 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 65.7 3.87 1.97 0.755 0.726 supply 20 16 112.4 7.03 2.65 0.581 0.502 The covariance matrix of the residuals used for estimation demand supply demand 3.87 5.12 supply 5.12 7.03 The covariance matrix of the residuals demand supply demand 3.87 5.12 supply 5.12 7.03 The correlations of the residuals demand supply demand 1.000 0.982 supply 0.982 1.000 3SLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 94.6333 7.9208 11.95 1.1e-09 *** price -0.2436 0.0965 -2.52 0.022 * income 0.3140 0.0469 6.69 3.8e-06 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.966 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 65.729 MSE: 3.866 Root MSE: 1.966 Multiple R-Squared: 0.755 Adjusted R-Squared: 0.726 3SLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 52.6618 12.8051 4.11 0.00081 *** price 0.2266 0.1075 2.11 0.05110 . farmPrice 0.2234 0.0468 4.78 0.00021 *** trend 0.3800 0.0720 5.28 7.5e-05 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.651 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 112.431 MSE: 7.027 Root MSE: 2.651 Multiple R-Squared: 0.581 Adjusted R-Squared: 0.502 [1] "********************* iterated 3SLS EViews-like ****************" systemfit results method: iterated 3SLS convergence achieved after 6 iterations N DF SSR detRCov OLS-R2 McElroy-R2 system 40 33 177 0.667 0.67 0.782 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 65.7 3.87 1.97 0.755 0.726 supply 20 16 111.3 6.96 2.64 0.585 0.507 The covariance matrix of the residuals used for estimation demand supply demand 3.29 4.20 supply 4.20 5.57 The covariance matrix of the residuals demand supply demand 3.29 4.20 supply 4.20 5.57 The correlations of the residuals demand supply demand 1.000 0.982 supply 0.982 1.000 3SLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 94.6333 7.3027 12.96 1.7e-14 *** price -0.2436 0.0890 -2.74 0.0099 ** income 0.3140 0.0433 7.25 2.5e-08 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.966 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 65.729 MSE: 3.866 Root MSE: 1.966 Multiple R-Squared: 0.755 Adjusted R-Squared: 0.726 3SLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 52.5527 11.3956 4.61 5.8e-05 *** price 0.2271 0.0956 2.37 0.024 * farmPrice 0.2245 0.0416 5.39 5.8e-06 *** trend 0.3756 0.0641 5.86 1.5e-06 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.637 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 111.302 MSE: 6.956 Root MSE: 2.637 Multiple R-Squared: 0.585 Adjusted R-Squared: 0.507 [1] "************** iterated 3SLS with methodResidCov = Theil **************" systemfit results method: iterated 3SLS convergence achieved after 6 iterations N DF SSR detRCov OLS-R2 McElroy-R2 system 40 33 179 -0.818 0.665 0.957 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 65.7 3.87 1.97 0.755 0.726 supply 20 16 113.8 7.11 2.67 0.576 0.496 The covariance matrix of the residuals used for estimation demand supply demand 3.87 5.32 supply 5.32 7.11 warning: this covariance matrix is NOT positive semidefinit! The covariance matrix of the residuals demand supply demand 3.87 5.32 supply 5.32 7.11 The correlations of the residuals demand supply demand 1.000 0.982 supply 0.982 1.000 3SLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 94.6333 7.9208 11.95 1.6e-13 *** price -0.2436 0.0965 -2.52 0.017 * income 0.3140 0.0469 6.69 1.3e-07 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.966 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 65.729 MSE: 3.866 Root MSE: 1.966 Multiple R-Squared: 0.755 Adjusted R-Squared: 0.726 3SLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 52.7863 12.8707 4.10 0.00025 *** price 0.2261 0.1081 2.09 0.04425 * farmPrice 0.2221 0.0467 4.75 3.8e-05 *** trend 0.3851 0.0693 5.55 3.6e-06 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.667 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 113.77 MSE: 7.111 Root MSE: 2.667 Multiple R-Squared: 0.576 Adjusted R-Squared: 0.496 [1] "**************** iterated W3SLS EViews-like ****************" systemfit results method: iterated 3SLS convergence achieved after 6 iterations N DF SSR detRCov OLS-R2 McElroy-R2 system 40 33 177 0.667 0.67 0.782 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 65.7 3.87 1.97 0.755 0.726 supply 20 16 111.3 6.96 2.64 0.585 0.507 The covariance matrix of the residuals used for estimation demand supply demand 3.29 4.20 supply 4.20 5.57 The covariance matrix of the residuals demand supply demand 3.29 4.20 supply 4.20 5.57 The correlations of the residuals demand supply demand 1.000 0.982 supply 0.982 1.000 3SLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 94.6333 7.3027 12.96 1.7e-14 *** price -0.2436 0.0890 -2.74 0.0099 ** income 0.3140 0.0433 7.25 2.5e-08 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.966 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 65.729 MSE: 3.866 Root MSE: 1.966 Multiple R-Squared: 0.755 Adjusted R-Squared: 0.726 3SLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 52.5527 11.3956 4.61 5.8e-05 *** price 0.2271 0.0956 2.37 0.024 * farmPrice 0.2245 0.0416 5.39 5.8e-06 *** trend 0.3756 0.0641 5.86 1.5e-06 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.637 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 111.302 MSE: 6.956 Root MSE: 2.637 Multiple R-Squared: 0.585 Adjusted R-Squared: 0.507 [1] "******* iterated 3SLS with restriction *****************" systemfit results method: iterated 3SLS convergence achieved after 17 iterations N DF SSR detRCov OLS-R2 McElroy-R2 system 40 34 240 0.56 0.553 0.819 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 98.4 5.79 2.41 0.633 0.590 supply 20 16 141.1 8.82 2.97 0.474 0.375 The covariance matrix of the residuals used for estimation demand supply demand 5.79 7.11 supply 7.11 8.82 The covariance matrix of the residuals demand supply demand 5.79 7.11 supply 7.11 8.82 The correlations of the residuals demand supply demand 1.000 0.995 supply 0.995 1.000 3SLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 92.0742 9.6303 9.56 3.6e-11 *** price -0.1064 0.1023 -1.04 0.31 income 0.1996 0.0297 6.73 9.9e-08 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.406 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 98.435 MSE: 5.79 Root MSE: 2.406 Multiple R-Squared: 0.633 Adjusted R-Squared: 0.59 3SLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 68.8551 12.4839 5.52 3.7e-06 *** price 0.1833 0.1189 1.54 0.13 farmPrice 0.1202 0.0260 4.63 5.1e-05 *** trend 0.1996 0.0297 6.73 9.9e-08 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.97 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 141.147 MSE: 8.822 Root MSE: 2.97 Multiple R-Squared: 0.474 Adjusted R-Squared: 0.375 [1] "********* iterated 3SLS with restriction (EViews-like) *********" systemfit results method: iterated 3SLS convergence achieved after 20 iterations N DF SSR detRCov OLS-R2 McElroy-R2 system 40 34 237 0.364 0.557 0.755 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 99.3 5.84 2.42 0.630 0.586 supply 20 16 138.1 8.63 2.94 0.485 0.388 The covariance matrix of the residuals used for estimation demand supply demand 4.96 5.82 supply 5.82 6.90 The covariance matrix of the residuals demand supply demand 4.96 5.82 supply 5.82 6.90 The correlations of the residuals demand supply demand 1.000 0.995 supply 0.995 1.000 3SLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 92.0353 8.9214 10.32 5.2e-12 *** price -0.1043 0.0958 -1.09 0.28 income 0.1979 0.0299 6.61 1.4e-07 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.417 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 99.297 MSE: 5.841 Root MSE: 2.417 Multiple R-Squared: 0.63 Adjusted R-Squared: 0.586 3SLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 68.2830 11.1530 6.12 6.0e-07 *** price 0.1851 0.1053 1.76 0.088 . farmPrice 0.1245 0.0251 4.96 1.9e-05 *** trend 0.1979 0.0299 6.61 1.4e-07 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.938 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 138.088 MSE: 8.63 Root MSE: 2.938 Multiple R-Squared: 0.485 Adjusted R-Squared: 0.388 [1] "******** iterated W3SLS with restriction (EViews-like) *********" systemfit results method: iterated 3SLS convergence achieved after 20 iterations N DF SSR detRCov OLS-R2 McElroy-R2 system 40 34 237 0.364 0.557 0.755 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 99.3 5.84 2.42 0.630 0.586 supply 20 16 138.1 8.63 2.94 0.485 0.388 The covariance matrix of the residuals used for estimation demand supply demand 4.96 5.82 supply 5.82 6.90 The covariance matrix of the residuals demand supply demand 4.96 5.82 supply 5.82 6.90 The correlations of the residuals demand supply demand 1.000 0.995 supply 0.995 1.000 3SLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 92.0353 8.9214 10.32 5.2e-12 *** price -0.1043 0.0958 -1.09 0.28 income 0.1979 0.0299 6.61 1.4e-07 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.417 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 99.297 MSE: 5.841 Root MSE: 2.417 Multiple R-Squared: 0.63 Adjusted R-Squared: 0.586 3SLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 68.2830 11.1530 6.12 6.0e-07 *** price 0.1851 0.1053 1.76 0.088 . farmPrice 0.1245 0.0251 4.96 1.9e-05 *** trend 0.1979 0.0299 6.61 1.4e-07 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.938 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 138.088 MSE: 8.63 Root MSE: 2.938 Multiple R-Squared: 0.485 Adjusted R-Squared: 0.388 [1] "********* iterated 3SLS with restriction via restrict.regMat *****************" systemfit results method: iterated 3SLS convergence achieved after 17 iterations N DF SSR detRCov OLS-R2 McElroy-R2 system 40 34 240 0.56 0.553 0.819 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 98.4 5.79 2.41 0.633 0.590 supply 20 16 141.1 8.82 2.97 0.474 0.375 The covariance matrix of the residuals used for estimation demand supply demand 5.79 7.11 supply 7.11 8.82 The covariance matrix of the residuals demand supply demand 5.79 7.11 supply 7.11 8.82 The correlations of the residuals demand supply demand 1.000 0.995 supply 0.995 1.000 3SLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 92.0742 9.6303 9.56 3.6e-11 *** price -0.1064 0.1023 -1.04 0.31 income 0.1996 0.0297 6.73 9.9e-08 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.406 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 98.435 MSE: 5.79 Root MSE: 2.406 Multiple R-Squared: 0.633 Adjusted R-Squared: 0.59 3SLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 68.8551 12.4839 5.52 3.7e-06 *** price 0.1833 0.1189 1.54 0.13 farmPrice 0.1202 0.0260 4.63 5.1e-05 *** trend 0.1996 0.0297 6.73 9.9e-08 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.97 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 141.147 MSE: 8.822 Root MSE: 2.97 Multiple R-Squared: 0.474 Adjusted R-Squared: 0.375 [1] "********* iterated 3SLS with restriction via restrict.regMat (EViews-like) ***" systemfit results method: iterated 3SLS convergence achieved after 20 iterations N DF SSR detRCov OLS-R2 McElroy-R2 system 40 34 237 0.364 0.557 0.755 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 99.3 5.84 2.42 0.630 0.586 supply 20 16 138.1 8.63 2.94 0.485 0.388 The covariance matrix of the residuals used for estimation demand supply demand 4.96 5.82 supply 5.82 6.90 The covariance matrix of the residuals demand supply demand 4.96 5.82 supply 5.82 6.90 The correlations of the residuals demand supply demand 1.000 0.995 supply 0.995 1.000 3SLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 92.0353 8.9214 10.32 5.2e-12 *** price -0.1043 0.0958 -1.09 0.28 income 0.1979 0.0299 6.61 1.4e-07 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.417 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 99.297 MSE: 5.841 Root MSE: 2.417 Multiple R-Squared: 0.63 Adjusted R-Squared: 0.586 3SLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 68.2830 11.1530 6.12 6.0e-07 *** price 0.1851 0.1053 1.76 0.088 . farmPrice 0.1245 0.0251 4.96 1.9e-05 *** trend 0.1979 0.0299 6.61 1.4e-07 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.938 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 138.088 MSE: 8.63 Root MSE: 2.938 Multiple R-Squared: 0.485 Adjusted R-Squared: 0.388 [1] "***** iterated W3SLS with restriction via restrict.regMat ********" systemfit results method: iterated 3SLS convergence achieved after 17 iterations N DF SSR detRCov OLS-R2 McElroy-R2 system 40 34 240 0.56 0.553 0.819 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 98.4 5.79 2.41 0.633 0.590 supply 20 16 141.1 8.82 2.97 0.474 0.375 The covariance matrix of the residuals used for estimation demand supply demand 5.79 7.11 supply 7.11 8.82 The covariance matrix of the residuals demand supply demand 5.79 7.11 supply 7.11 8.82 The correlations of the residuals demand supply demand 1.000 0.995 supply 0.995 1.000 3SLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 92.0742 9.6303 9.56 3.6e-11 *** price -0.1064 0.1023 -1.04 0.31 income 0.1996 0.0297 6.73 9.9e-08 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.406 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 98.435 MSE: 5.79 Root MSE: 2.406 Multiple R-Squared: 0.633 Adjusted R-Squared: 0.59 3SLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 68.8551 12.4839 5.52 3.7e-06 *** price 0.1833 0.1189 1.54 0.13 farmPrice 0.1202 0.0260 4.63 5.1e-05 *** trend 0.1996 0.0297 6.73 9.9e-08 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.97 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 141.147 MSE: 8.822 Root MSE: 2.97 Multiple R-Squared: 0.474 Adjusted R-Squared: 0.375 [1] "******** iterated 3SLS with 2 restrictions *********************" systemfit results method: iterated 3SLS convergence achieved after 9 iterations N DF SSR detRCov OLS-R2 McElroy-R2 system 40 35 185 1.76 0.655 0.71 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 69.9 4.11 2.03 0.739 0.709 supply 20 16 114.8 7.18 2.68 0.572 0.491 The covariance matrix of the residuals used for estimation demand supply demand 4.11 5.27 supply 5.27 7.18 The covariance matrix of the residuals demand supply demand 4.11 5.27 supply 5.27 7.18 The correlations of the residuals demand supply demand 1.00 0.97 supply 0.97 1.00 3SLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 90.1569 7.9174 11.39 2.5e-13 *** price -0.2007 0.0920 -2.18 0.036 * income 0.3159 0.0192 16.42 < 2e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.028 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 69.917 MSE: 4.113 Root MSE: 2.028 Multiple R-Squared: 0.739 Adjusted R-Squared: 0.709 3SLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 46.4810 8.0104 5.80 1.4e-06 *** price 0.2993 0.0920 3.25 0.0025 ** farmPrice 0.2190 0.0196 11.20 4.0e-13 *** trend 0.3159 0.0192 16.42 < 2e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.679 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 114.83 MSE: 7.177 Root MSE: 2.679 Multiple R-Squared: 0.572 Adjusted R-Squared: 0.491 [1] "********* iterated 3SLS with 2 restrictions (EViews-like) *******" systemfit results method: iterated 3SLS convergence achieved after 8 iterations N DF SSR detRCov OLS-R2 McElroy-R2 system 40 35 179 1.19 0.666 0.668 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 68.3 4.02 2.00 0.745 0.715 supply 20 16 110.8 6.92 2.63 0.587 0.509 The covariance matrix of the residuals used for estimation demand supply demand 3.41 4.21 supply 4.21 5.54 The covariance matrix of the residuals demand supply demand 3.41 4.21 supply 4.21 5.54 The correlations of the residuals demand supply demand 1.000 0.968 supply 0.968 1.000 3SLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 91.3901 7.3161 12.5 1.9e-14 *** price -0.2168 0.0835 -2.6 0.014 * income 0.3199 0.0168 19.1 < 2e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.004 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 68.293 MSE: 4.017 Root MSE: 2.004 Multiple R-Squared: 0.745 Adjusted R-Squared: 0.715 3SLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 47.5787 7.4268 6.41 2.3e-07 *** price 0.2832 0.0835 3.39 0.0017 ** farmPrice 0.2240 0.0168 13.36 2.7e-15 *** trend 0.3199 0.0168 19.07 < 2e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.631 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 110.791 MSE: 6.924 Root MSE: 2.631 Multiple R-Squared: 0.587 Adjusted R-Squared: 0.509 [1] "******** iterated W3SLS with 2 restrictions (EViews-like) *******" systemfit results method: iterated 3SLS convergence achieved after 8 iterations N DF SSR detRCov OLS-R2 McElroy-R2 system 40 35 179 1.19 0.666 0.668 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 68.3 4.02 2.00 0.745 0.715 supply 20 16 110.8 6.92 2.63 0.587 0.509 The covariance matrix of the residuals used for estimation demand supply demand 3.41 4.21 supply 4.21 5.54 The covariance matrix of the residuals demand supply demand 3.41 4.21 supply 4.21 5.54 The correlations of the residuals demand supply demand 1.000 0.968 supply 0.968 1.000 3SLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 91.3901 7.3161 12.5 1.9e-14 *** price -0.2168 0.0835 -2.6 0.014 * income 0.3199 0.0168 19.1 < 2e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.004 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 68.293 MSE: 4.017 Root MSE: 2.004 Multiple R-Squared: 0.745 Adjusted R-Squared: 0.715 3SLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 47.5787 7.4268 6.41 2.3e-07 *** price 0.2832 0.0835 3.39 0.0017 ** farmPrice 0.2240 0.0168 13.36 2.7e-15 *** trend 0.3199 0.0168 19.07 < 2e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.631 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 110.791 MSE: 6.924 Root MSE: 2.631 Multiple R-Squared: 0.587 Adjusted R-Squared: 0.509 [1] "******** iterated 3SLS with 2 restrictions via R and restrict.regMat *********" systemfit results method: iterated 3SLS convergence achieved after 9 iterations N DF SSR detRCov OLS-R2 McElroy-R2 system 40 35 185 1.76 0.655 0.71 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 69.9 4.11 2.03 0.739 0.709 supply 20 16 114.8 7.18 2.68 0.572 0.491 The covariance matrix of the residuals used for estimation demand supply demand 4.11 5.27 supply 5.27 7.18 The covariance matrix of the residuals demand supply demand 4.11 5.27 supply 5.27 7.18 The correlations of the residuals demand supply demand 1.00 0.97 supply 0.97 1.00 3SLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 90.1569 7.9174 11.39 2.5e-13 *** price -0.2007 0.0920 -2.18 0.036 * income 0.3159 0.0192 16.42 < 2e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.028 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 69.917 MSE: 4.113 Root MSE: 2.028 Multiple R-Squared: 0.739 Adjusted R-Squared: 0.709 3SLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 46.4810 8.0104 5.80 1.4e-06 *** price 0.2993 0.0920 3.25 0.0025 ** farmPrice 0.2190 0.0196 11.20 4.0e-13 *** trend 0.3159 0.0192 16.42 < 2e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.679 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 114.83 MSE: 7.177 Root MSE: 2.679 Multiple R-Squared: 0.572 Adjusted R-Squared: 0.491 [1] "*** iterated 3SLS with 2 restrictions via R and restrict.regMat (EViews-like)**" systemfit results method: iterated 3SLS convergence achieved after 8 iterations N DF SSR detRCov OLS-R2 McElroy-R2 system 40 35 179 1.19 0.666 0.668 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 68.3 4.02 2.00 0.745 0.715 supply 20 16 110.8 6.92 2.63 0.587 0.509 The covariance matrix of the residuals used for estimation demand supply demand 3.41 4.21 supply 4.21 5.54 The covariance matrix of the residuals demand supply demand 3.41 4.21 supply 4.21 5.54 The correlations of the residuals demand supply demand 1.000 0.968 supply 0.968 1.000 3SLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 91.3901 7.3161 12.5 1.9e-14 *** price -0.2168 0.0835 -2.6 0.014 * income 0.3199 0.0168 19.1 < 2e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.004 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 68.293 MSE: 4.017 Root MSE: 2.004 Multiple R-Squared: 0.745 Adjusted R-Squared: 0.715 3SLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 47.5787 7.4268 6.41 2.3e-07 *** price 0.2832 0.0835 3.39 0.0017 ** farmPrice 0.2240 0.0168 13.36 2.7e-15 *** trend 0.3199 0.0168 19.07 < 2e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.631 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 110.791 MSE: 6.924 Root MSE: 2.631 Multiple R-Squared: 0.587 Adjusted R-Squared: 0.509 [1] "** iterated W3SLS with 2 restrictions via R and restrict.regMat ***" systemfit results method: iterated 3SLS convergence achieved after 9 iterations N DF SSR detRCov OLS-R2 McElroy-R2 system 40 35 185 1.76 0.655 0.71 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 69.9 4.11 2.03 0.739 0.709 supply 20 16 114.8 7.18 2.68 0.572 0.491 The covariance matrix of the residuals used for estimation demand supply demand 4.11 5.27 supply 5.27 7.18 The covariance matrix of the residuals demand supply demand 4.11 5.27 supply 5.27 7.18 The correlations of the residuals demand supply demand 1.00 0.97 supply 0.97 1.00 3SLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 90.1569 7.9174 11.39 2.5e-13 *** price -0.2007 0.0920 -2.18 0.036 * income 0.3159 0.0192 16.42 < 2e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.028 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 69.917 MSE: 4.113 Root MSE: 2.028 Multiple R-Squared: 0.739 Adjusted R-Squared: 0.709 3SLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 46.4810 8.0104 5.80 1.4e-06 *** price 0.2993 0.0920 3.25 0.0025 ** farmPrice 0.2190 0.0196 11.20 4.0e-13 *** trend 0.3159 0.0192 16.42 < 2e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.679 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 114.83 MSE: 7.177 Root MSE: 2.679 Multiple R-Squared: 0.572 Adjusted R-Squared: 0.491 [1] "***************************************************" [1] "3SLS formula: GMM" [1] "************* 3SLS *********************************" systemfit results method: iterated 3SLS convergence achieved after 6 iterations N DF SSR detRCov OLS-R2 McElroy-R2 system 40 33 178 0.983 0.668 0.814 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 65.7 3.87 1.97 0.755 0.726 supply 20 16 112.4 7.03 2.65 0.581 0.502 The covariance matrix of the residuals used for estimation demand supply demand 3.87 5.12 supply 5.12 7.03 The covariance matrix of the residuals demand supply demand 3.87 5.12 supply 5.12 7.03 The correlations of the residuals demand supply demand 1.000 0.982 supply 0.982 1.000 3SLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 94.6333 7.9208 11.95 1.1e-09 *** price -0.2436 0.0965 -2.52 0.022 * income 0.3140 0.0469 6.69 3.8e-06 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.966 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 65.729 MSE: 3.866 Root MSE: 1.966 Multiple R-Squared: 0.755 Adjusted R-Squared: 0.726 3SLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 52.6618 12.8051 4.11 0.00081 *** price 0.2266 0.1075 2.11 0.05110 . farmPrice 0.2234 0.0468 4.78 0.00021 *** trend 0.3800 0.0720 5.28 7.5e-05 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.651 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 112.431 MSE: 7.027 Root MSE: 2.651 Multiple R-Squared: 0.581 Adjusted R-Squared: 0.502 [1] "********************* iterated 3SLS EViews-like ****************" systemfit results method: iterated 3SLS convergence achieved after 6 iterations N DF SSR detRCov OLS-R2 McElroy-R2 system 40 33 177 0.667 0.67 0.782 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 65.7 3.87 1.97 0.755 0.726 supply 20 16 111.3 6.96 2.64 0.585 0.507 The covariance matrix of the residuals used for estimation demand supply demand 3.29 4.20 supply 4.20 5.57 The covariance matrix of the residuals demand supply demand 3.29 4.20 supply 4.20 5.57 The correlations of the residuals demand supply demand 1.000 0.982 supply 0.982 1.000 3SLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 94.6333 7.3027 12.96 1.7e-14 *** price -0.2436 0.0890 -2.74 0.0099 ** income 0.3140 0.0433 7.25 2.5e-08 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.966 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 65.729 MSE: 3.866 Root MSE: 1.966 Multiple R-Squared: 0.755 Adjusted R-Squared: 0.726 3SLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 52.5527 11.3956 4.61 5.8e-05 *** price 0.2271 0.0956 2.37 0.024 * farmPrice 0.2245 0.0416 5.39 5.8e-06 *** trend 0.3756 0.0641 5.86 1.5e-06 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.637 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 111.302 MSE: 6.956 Root MSE: 2.637 Multiple R-Squared: 0.585 Adjusted R-Squared: 0.507 [1] "************** iterated 3SLS with methodResidCov = Theil **************" systemfit results method: iterated 3SLS convergence achieved after 6 iterations N DF SSR detRCov OLS-R2 McElroy-R2 system 40 33 179 -0.818 0.665 0.957 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 65.7 3.87 1.97 0.755 0.726 supply 20 16 113.8 7.11 2.67 0.576 0.496 The covariance matrix of the residuals used for estimation demand supply demand 3.87 5.32 supply 5.32 7.11 warning: this covariance matrix is NOT positive semidefinit! The covariance matrix of the residuals demand supply demand 3.87 5.32 supply 5.32 7.11 The correlations of the residuals demand supply demand 1.000 0.982 supply 0.982 1.000 3SLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 94.6333 7.9208 11.95 1.6e-13 *** price -0.2436 0.0965 -2.52 0.017 * income 0.3140 0.0469 6.69 1.3e-07 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.966 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 65.729 MSE: 3.866 Root MSE: 1.966 Multiple R-Squared: 0.755 Adjusted R-Squared: 0.726 3SLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 52.7863 12.8707 4.10 0.00025 *** price 0.2261 0.1081 2.09 0.04425 * farmPrice 0.2221 0.0467 4.75 3.8e-05 *** trend 0.3851 0.0693 5.55 3.6e-06 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.667 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 113.77 MSE: 7.111 Root MSE: 2.667 Multiple R-Squared: 0.576 Adjusted R-Squared: 0.496 [1] "**************** iterated W3SLS EViews-like ****************" systemfit results method: iterated 3SLS convergence achieved after 6 iterations N DF SSR detRCov OLS-R2 McElroy-R2 system 40 33 177 0.667 0.67 0.782 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 65.7 3.87 1.97 0.755 0.726 supply 20 16 111.3 6.96 2.64 0.585 0.507 The covariance matrix of the residuals used for estimation demand supply demand 3.29 4.20 supply 4.20 5.57 The covariance matrix of the residuals demand supply demand 3.29 4.20 supply 4.20 5.57 The correlations of the residuals demand supply demand 1.000 0.982 supply 0.982 1.000 3SLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 94.6333 7.3027 12.96 1.7e-14 *** price -0.2436 0.0890 -2.74 0.0099 ** income 0.3140 0.0433 7.25 2.5e-08 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.966 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 65.729 MSE: 3.866 Root MSE: 1.966 Multiple R-Squared: 0.755 Adjusted R-Squared: 0.726 3SLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 52.5527 11.3956 4.61 5.8e-05 *** price 0.2271 0.0956 2.37 0.024 * farmPrice 0.2245 0.0416 5.39 5.8e-06 *** trend 0.3756 0.0641 5.86 1.5e-06 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.637 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 111.302 MSE: 6.956 Root MSE: 2.637 Multiple R-Squared: 0.585 Adjusted R-Squared: 0.507 [1] "******* iterated 3SLS with restriction *****************" systemfit results method: iterated 3SLS convergence achieved after 17 iterations N DF SSR detRCov OLS-R2 McElroy-R2 system 40 34 240 0.56 0.553 0.819 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 98.4 5.79 2.41 0.633 0.590 supply 20 16 141.1 8.82 2.97 0.474 0.375 The covariance matrix of the residuals used for estimation demand supply demand 5.79 7.11 supply 7.11 8.82 The covariance matrix of the residuals demand supply demand 5.79 7.11 supply 7.11 8.82 The correlations of the residuals demand supply demand 1.000 0.995 supply 0.995 1.000 3SLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 92.0742 9.6303 9.56 3.6e-11 *** price -0.1064 0.1023 -1.04 0.31 income 0.1996 0.0297 6.73 9.9e-08 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.406 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 98.435 MSE: 5.79 Root MSE: 2.406 Multiple R-Squared: 0.633 Adjusted R-Squared: 0.59 3SLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 68.8551 12.4839 5.52 3.7e-06 *** price 0.1833 0.1189 1.54 0.13 farmPrice 0.1202 0.0260 4.63 5.1e-05 *** trend 0.1996 0.0297 6.73 9.9e-08 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.97 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 141.147 MSE: 8.822 Root MSE: 2.97 Multiple R-Squared: 0.474 Adjusted R-Squared: 0.375 [1] "********* iterated 3SLS with restriction (EViews-like) *********" systemfit results method: iterated 3SLS convergence achieved after 20 iterations N DF SSR detRCov OLS-R2 McElroy-R2 system 40 34 237 0.364 0.557 0.755 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 99.3 5.84 2.42 0.630 0.586 supply 20 16 138.1 8.63 2.94 0.485 0.388 The covariance matrix of the residuals used for estimation demand supply demand 4.96 5.82 supply 5.82 6.90 The covariance matrix of the residuals demand supply demand 4.96 5.82 supply 5.82 6.90 The correlations of the residuals demand supply demand 1.000 0.995 supply 0.995 1.000 3SLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 92.0353 8.9214 10.32 5.2e-12 *** price -0.1043 0.0958 -1.09 0.28 income 0.1979 0.0299 6.61 1.4e-07 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.417 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 99.297 MSE: 5.841 Root MSE: 2.417 Multiple R-Squared: 0.63 Adjusted R-Squared: 0.586 3SLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 68.2830 11.1530 6.12 6.0e-07 *** price 0.1851 0.1053 1.76 0.088 . farmPrice 0.1245 0.0251 4.96 1.9e-05 *** trend 0.1979 0.0299 6.61 1.4e-07 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.938 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 138.088 MSE: 8.63 Root MSE: 2.938 Multiple R-Squared: 0.485 Adjusted R-Squared: 0.388 [1] "******** iterated W3SLS with restriction (EViews-like) *********" systemfit results method: iterated 3SLS convergence achieved after 20 iterations N DF SSR detRCov OLS-R2 McElroy-R2 system 40 34 237 0.364 0.557 0.755 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 99.3 5.84 2.42 0.630 0.586 supply 20 16 138.1 8.63 2.94 0.485 0.388 The covariance matrix of the residuals used for estimation demand supply demand 4.96 5.82 supply 5.82 6.90 The covariance matrix of the residuals demand supply demand 4.96 5.82 supply 5.82 6.90 The correlations of the residuals demand supply demand 1.000 0.995 supply 0.995 1.000 3SLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 92.0353 8.9214 10.32 5.2e-12 *** price -0.1043 0.0958 -1.09 0.28 income 0.1979 0.0299 6.61 1.4e-07 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.417 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 99.297 MSE: 5.841 Root MSE: 2.417 Multiple R-Squared: 0.63 Adjusted R-Squared: 0.586 3SLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 68.2830 11.1530 6.12 6.0e-07 *** price 0.1851 0.1053 1.76 0.088 . farmPrice 0.1245 0.0251 4.96 1.9e-05 *** trend 0.1979 0.0299 6.61 1.4e-07 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.938 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 138.088 MSE: 8.63 Root MSE: 2.938 Multiple R-Squared: 0.485 Adjusted R-Squared: 0.388 [1] "********* iterated 3SLS with restriction via restrict.regMat *****************" systemfit results method: iterated 3SLS convergence achieved after 17 iterations N DF SSR detRCov OLS-R2 McElroy-R2 system 40 34 240 0.56 0.553 0.819 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 98.4 5.79 2.41 0.633 0.590 supply 20 16 141.1 8.82 2.97 0.474 0.375 The covariance matrix of the residuals used for estimation demand supply demand 5.79 7.11 supply 7.11 8.82 The covariance matrix of the residuals demand supply demand 5.79 7.11 supply 7.11 8.82 The correlations of the residuals demand supply demand 1.000 0.995 supply 0.995 1.000 3SLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 92.0742 9.6303 9.56 3.6e-11 *** price -0.1064 0.1023 -1.04 0.31 income 0.1996 0.0297 6.73 9.9e-08 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.406 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 98.435 MSE: 5.79 Root MSE: 2.406 Multiple R-Squared: 0.633 Adjusted R-Squared: 0.59 3SLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 68.8551 12.4839 5.52 3.7e-06 *** price 0.1833 0.1189 1.54 0.13 farmPrice 0.1202 0.0260 4.63 5.1e-05 *** trend 0.1996 0.0297 6.73 9.9e-08 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.97 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 141.147 MSE: 8.822 Root MSE: 2.97 Multiple R-Squared: 0.474 Adjusted R-Squared: 0.375 [1] "********* iterated 3SLS with restriction via restrict.regMat (EViews-like) ***" systemfit results method: iterated 3SLS convergence achieved after 20 iterations N DF SSR detRCov OLS-R2 McElroy-R2 system 40 34 237 0.364 0.557 0.755 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 99.3 5.84 2.42 0.630 0.586 supply 20 16 138.1 8.63 2.94 0.485 0.388 The covariance matrix of the residuals used for estimation demand supply demand 4.96 5.82 supply 5.82 6.90 The covariance matrix of the residuals demand supply demand 4.96 5.82 supply 5.82 6.90 The correlations of the residuals demand supply demand 1.000 0.995 supply 0.995 1.000 3SLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 92.0353 8.9214 10.32 5.2e-12 *** price -0.1043 0.0958 -1.09 0.28 income 0.1979 0.0299 6.61 1.4e-07 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.417 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 99.297 MSE: 5.841 Root MSE: 2.417 Multiple R-Squared: 0.63 Adjusted R-Squared: 0.586 3SLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 68.2830 11.1530 6.12 6.0e-07 *** price 0.1851 0.1053 1.76 0.088 . farmPrice 0.1245 0.0251 4.96 1.9e-05 *** trend 0.1979 0.0299 6.61 1.4e-07 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.938 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 138.088 MSE: 8.63 Root MSE: 2.938 Multiple R-Squared: 0.485 Adjusted R-Squared: 0.388 [1] "***** iterated W3SLS with restriction via restrict.regMat ********" systemfit results method: iterated 3SLS convergence achieved after 17 iterations N DF SSR detRCov OLS-R2 McElroy-R2 system 40 34 240 0.56 0.553 0.819 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 98.4 5.79 2.41 0.633 0.590 supply 20 16 141.1 8.82 2.97 0.474 0.375 The covariance matrix of the residuals used for estimation demand supply demand 5.79 7.11 supply 7.11 8.82 The covariance matrix of the residuals demand supply demand 5.79 7.11 supply 7.11 8.82 The correlations of the residuals demand supply demand 1.000 0.995 supply 0.995 1.000 3SLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 92.0742 9.6303 9.56 3.6e-11 *** price -0.1064 0.1023 -1.04 0.31 income 0.1996 0.0297 6.73 9.9e-08 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.406 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 98.435 MSE: 5.79 Root MSE: 2.406 Multiple R-Squared: 0.633 Adjusted R-Squared: 0.59 3SLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 68.8551 12.4839 5.52 3.7e-06 *** price 0.1833 0.1189 1.54 0.13 farmPrice 0.1202 0.0260 4.63 5.1e-05 *** trend 0.1996 0.0297 6.73 9.9e-08 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.97 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 141.147 MSE: 8.822 Root MSE: 2.97 Multiple R-Squared: 0.474 Adjusted R-Squared: 0.375 [1] "******** iterated 3SLS with 2 restrictions *********************" systemfit results method: iterated 3SLS convergence achieved after 9 iterations N DF SSR detRCov OLS-R2 McElroy-R2 system 40 35 185 1.76 0.655 0.71 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 69.9 4.11 2.03 0.739 0.709 supply 20 16 114.8 7.18 2.68 0.572 0.491 The covariance matrix of the residuals used for estimation demand supply demand 4.11 5.27 supply 5.27 7.18 The covariance matrix of the residuals demand supply demand 4.11 5.27 supply 5.27 7.18 The correlations of the residuals demand supply demand 1.00 0.97 supply 0.97 1.00 3SLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 90.1569 7.9174 11.39 2.5e-13 *** price -0.2007 0.0920 -2.18 0.036 * income 0.3159 0.0192 16.42 < 2e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.028 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 69.917 MSE: 4.113 Root MSE: 2.028 Multiple R-Squared: 0.739 Adjusted R-Squared: 0.709 3SLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 46.4810 8.0104 5.80 1.4e-06 *** price 0.2993 0.0920 3.25 0.0025 ** farmPrice 0.2190 0.0196 11.20 4.0e-13 *** trend 0.3159 0.0192 16.42 < 2e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.679 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 114.83 MSE: 7.177 Root MSE: 2.679 Multiple R-Squared: 0.572 Adjusted R-Squared: 0.491 [1] "********* iterated 3SLS with 2 restrictions (EViews-like) *******" systemfit results method: iterated 3SLS convergence achieved after 8 iterations N DF SSR detRCov OLS-R2 McElroy-R2 system 40 35 179 1.19 0.666 0.668 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 68.3 4.02 2.00 0.745 0.715 supply 20 16 110.8 6.92 2.63 0.587 0.509 The covariance matrix of the residuals used for estimation demand supply demand 3.41 4.21 supply 4.21 5.54 The covariance matrix of the residuals demand supply demand 3.41 4.21 supply 4.21 5.54 The correlations of the residuals demand supply demand 1.000 0.968 supply 0.968 1.000 3SLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 91.3901 7.3161 12.5 1.9e-14 *** price -0.2168 0.0835 -2.6 0.014 * income 0.3199 0.0168 19.1 < 2e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.004 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 68.293 MSE: 4.017 Root MSE: 2.004 Multiple R-Squared: 0.745 Adjusted R-Squared: 0.715 3SLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 47.5787 7.4268 6.41 2.3e-07 *** price 0.2832 0.0835 3.39 0.0017 ** farmPrice 0.2240 0.0168 13.36 2.7e-15 *** trend 0.3199 0.0168 19.07 < 2e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.631 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 110.791 MSE: 6.924 Root MSE: 2.631 Multiple R-Squared: 0.587 Adjusted R-Squared: 0.509 [1] "******** iterated W3SLS with 2 restrictions (EViews-like) *******" systemfit results method: iterated 3SLS convergence achieved after 8 iterations N DF SSR detRCov OLS-R2 McElroy-R2 system 40 35 179 1.19 0.666 0.668 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 68.3 4.02 2.00 0.745 0.715 supply 20 16 110.8 6.92 2.63 0.587 0.509 The covariance matrix of the residuals used for estimation demand supply demand 3.41 4.21 supply 4.21 5.54 The covariance matrix of the residuals demand supply demand 3.41 4.21 supply 4.21 5.54 The correlations of the residuals demand supply demand 1.000 0.968 supply 0.968 1.000 3SLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 91.3901 7.3161 12.5 1.9e-14 *** price -0.2168 0.0835 -2.6 0.014 * income 0.3199 0.0168 19.1 < 2e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.004 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 68.293 MSE: 4.017 Root MSE: 2.004 Multiple R-Squared: 0.745 Adjusted R-Squared: 0.715 3SLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 47.5787 7.4268 6.41 2.3e-07 *** price 0.2832 0.0835 3.39 0.0017 ** farmPrice 0.2240 0.0168 13.36 2.7e-15 *** trend 0.3199 0.0168 19.07 < 2e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.631 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 110.791 MSE: 6.924 Root MSE: 2.631 Multiple R-Squared: 0.587 Adjusted R-Squared: 0.509 [1] "******** iterated 3SLS with 2 restrictions via R and restrict.regMat *********" systemfit results method: iterated 3SLS convergence achieved after 9 iterations N DF SSR detRCov OLS-R2 McElroy-R2 system 40 35 185 1.76 0.655 0.71 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 69.9 4.11 2.03 0.739 0.709 supply 20 16 114.8 7.18 2.68 0.572 0.491 The covariance matrix of the residuals used for estimation demand supply demand 4.11 5.27 supply 5.27 7.18 The covariance matrix of the residuals demand supply demand 4.11 5.27 supply 5.27 7.18 The correlations of the residuals demand supply demand 1.00 0.97 supply 0.97 1.00 3SLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 90.1569 7.9174 11.39 2.5e-13 *** price -0.2007 0.0920 -2.18 0.036 * income 0.3159 0.0192 16.42 < 2e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.028 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 69.917 MSE: 4.113 Root MSE: 2.028 Multiple R-Squared: 0.739 Adjusted R-Squared: 0.709 3SLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 46.4810 8.0104 5.80 1.4e-06 *** price 0.2993 0.0920 3.25 0.0025 ** farmPrice 0.2190 0.0196 11.20 4.0e-13 *** trend 0.3159 0.0192 16.42 < 2e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.679 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 114.83 MSE: 7.177 Root MSE: 2.679 Multiple R-Squared: 0.572 Adjusted R-Squared: 0.491 [1] "*** iterated 3SLS with 2 restrictions via R and restrict.regMat (EViews-like)**" systemfit results method: iterated 3SLS convergence achieved after 8 iterations N DF SSR detRCov OLS-R2 McElroy-R2 system 40 35 179 1.19 0.666 0.668 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 68.3 4.02 2.00 0.745 0.715 supply 20 16 110.8 6.92 2.63 0.587 0.509 The covariance matrix of the residuals used for estimation demand supply demand 3.41 4.21 supply 4.21 5.54 The covariance matrix of the residuals demand supply demand 3.41 4.21 supply 4.21 5.54 The correlations of the residuals demand supply demand 1.000 0.968 supply 0.968 1.000 3SLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 91.3901 7.3161 12.5 1.9e-14 *** price -0.2168 0.0835 -2.6 0.014 * income 0.3199 0.0168 19.1 < 2e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.004 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 68.293 MSE: 4.017 Root MSE: 2.004 Multiple R-Squared: 0.745 Adjusted R-Squared: 0.715 3SLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 47.5787 7.4268 6.41 2.3e-07 *** price 0.2832 0.0835 3.39 0.0017 ** farmPrice 0.2240 0.0168 13.36 2.7e-15 *** trend 0.3199 0.0168 19.07 < 2e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.631 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 110.791 MSE: 6.924 Root MSE: 2.631 Multiple R-Squared: 0.587 Adjusted R-Squared: 0.509 [1] "** iterated W3SLS with 2 restrictions via R and restrict.regMat ***" systemfit results method: iterated 3SLS convergence achieved after 9 iterations N DF SSR detRCov OLS-R2 McElroy-R2 system 40 35 185 1.76 0.655 0.71 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 69.9 4.11 2.03 0.739 0.709 supply 20 16 114.8 7.18 2.68 0.572 0.491 The covariance matrix of the residuals used for estimation demand supply demand 4.11 5.27 supply 5.27 7.18 The covariance matrix of the residuals demand supply demand 4.11 5.27 supply 5.27 7.18 The correlations of the residuals demand supply demand 1.00 0.97 supply 0.97 1.00 3SLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 90.1569 7.9174 11.39 2.5e-13 *** price -0.2007 0.0920 -2.18 0.036 * income 0.3159 0.0192 16.42 < 2e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.028 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 69.917 MSE: 4.113 Root MSE: 2.028 Multiple R-Squared: 0.739 Adjusted R-Squared: 0.709 3SLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 46.4810 8.0104 5.80 1.4e-06 *** price 0.2993 0.0920 3.25 0.0025 ** farmPrice 0.2190 0.0196 11.20 4.0e-13 *** trend 0.3159 0.0192 16.42 < 2e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.679 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 114.83 MSE: 7.177 Root MSE: 2.679 Multiple R-Squared: 0.572 Adjusted R-Squared: 0.491 [1] "***************************************************" [1] "3SLS formula: EViews" [1] "************* 3SLS *********************************" systemfit results method: iterated 3SLS convergence achieved after 6 iterations N DF SSR detRCov OLS-R2 McElroy-R2 system 40 33 178 0.983 0.668 0.814 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 65.7 3.87 1.97 0.755 0.726 supply 20 16 112.4 7.03 2.65 0.581 0.502 The covariance matrix of the residuals used for estimation demand supply demand 3.87 5.12 supply 5.12 7.03 The covariance matrix of the residuals demand supply demand 3.87 5.12 supply 5.12 7.03 The correlations of the residuals demand supply demand 1.000 0.982 supply 0.982 1.000 3SLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 94.6333 7.9208 11.95 1.1e-09 *** price -0.2436 0.0965 -2.52 0.022 * income 0.3140 0.0469 6.69 3.8e-06 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.966 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 65.729 MSE: 3.866 Root MSE: 1.966 Multiple R-Squared: 0.755 Adjusted R-Squared: 0.726 3SLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 52.6618 12.8051 4.11 0.00081 *** price 0.2266 0.1075 2.11 0.05110 . farmPrice 0.2234 0.0468 4.78 0.00021 *** trend 0.3800 0.0720 5.28 7.5e-05 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.651 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 112.431 MSE: 7.027 Root MSE: 2.651 Multiple R-Squared: 0.581 Adjusted R-Squared: 0.502 [1] "********************* iterated 3SLS EViews-like ****************" systemfit results method: iterated 3SLS convergence achieved after 6 iterations N DF SSR detRCov OLS-R2 McElroy-R2 system 40 33 177 0.667 0.67 0.782 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 65.7 3.87 1.97 0.755 0.726 supply 20 16 111.3 6.96 2.64 0.585 0.507 The covariance matrix of the residuals used for estimation demand supply demand 3.29 4.20 supply 4.20 5.57 The covariance matrix of the residuals demand supply demand 3.29 4.20 supply 4.20 5.57 The correlations of the residuals demand supply demand 1.000 0.982 supply 0.982 1.000 3SLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 94.6333 7.3027 12.96 1.7e-14 *** price -0.2436 0.0890 -2.74 0.0099 ** income 0.3140 0.0433 7.25 2.5e-08 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.966 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 65.729 MSE: 3.866 Root MSE: 1.966 Multiple R-Squared: 0.755 Adjusted R-Squared: 0.726 3SLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 52.5527 11.3956 4.61 5.8e-05 *** price 0.2271 0.0956 2.37 0.024 * farmPrice 0.2245 0.0416 5.39 5.8e-06 *** trend 0.3756 0.0641 5.86 1.5e-06 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.637 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 111.302 MSE: 6.956 Root MSE: 2.637 Multiple R-Squared: 0.585 Adjusted R-Squared: 0.507 [1] "************** iterated 3SLS with methodResidCov = Theil **************" systemfit results method: iterated 3SLS convergence achieved after 6 iterations N DF SSR detRCov OLS-R2 McElroy-R2 system 40 33 179 -0.818 0.665 0.957 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 65.7 3.87 1.97 0.755 0.726 supply 20 16 113.8 7.11 2.67 0.576 0.496 The covariance matrix of the residuals used for estimation demand supply demand 3.87 5.32 supply 5.32 7.11 warning: this covariance matrix is NOT positive semidefinit! The covariance matrix of the residuals demand supply demand 3.87 5.32 supply 5.32 7.11 The correlations of the residuals demand supply demand 1.000 0.982 supply 0.982 1.000 3SLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 94.6333 7.9208 11.95 1.6e-13 *** price -0.2436 0.0965 -2.52 0.017 * income 0.3140 0.0469 6.69 1.3e-07 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.966 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 65.729 MSE: 3.866 Root MSE: 1.966 Multiple R-Squared: 0.755 Adjusted R-Squared: 0.726 3SLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 52.7863 12.8707 4.10 0.00025 *** price 0.2261 0.1081 2.09 0.04425 * farmPrice 0.2221 0.0467 4.75 3.8e-05 *** trend 0.3851 0.0693 5.55 3.6e-06 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.667 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 113.77 MSE: 7.111 Root MSE: 2.667 Multiple R-Squared: 0.576 Adjusted R-Squared: 0.496 [1] "**************** iterated W3SLS EViews-like ****************" systemfit results method: iterated 3SLS convergence achieved after 6 iterations N DF SSR detRCov OLS-R2 McElroy-R2 system 40 33 177 0.667 0.67 0.782 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 65.7 3.87 1.97 0.755 0.726 supply 20 16 111.3 6.96 2.64 0.585 0.507 The covariance matrix of the residuals used for estimation demand supply demand 3.29 4.20 supply 4.20 5.57 The covariance matrix of the residuals demand supply demand 3.29 4.20 supply 4.20 5.57 The correlations of the residuals demand supply demand 1.000 0.982 supply 0.982 1.000 3SLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 94.6333 7.3027 12.96 1.7e-14 *** price -0.2436 0.0890 -2.74 0.0099 ** income 0.3140 0.0433 7.25 2.5e-08 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.966 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 65.729 MSE: 3.866 Root MSE: 1.966 Multiple R-Squared: 0.755 Adjusted R-Squared: 0.726 3SLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 52.5527 11.3956 4.61 5.8e-05 *** price 0.2271 0.0956 2.37 0.024 * farmPrice 0.2245 0.0416 5.39 5.8e-06 *** trend 0.3756 0.0641 5.86 1.5e-06 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.637 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 111.302 MSE: 6.956 Root MSE: 2.637 Multiple R-Squared: 0.585 Adjusted R-Squared: 0.507 [1] "******* iterated 3SLS with restriction *****************" systemfit results method: iterated 3SLS convergence achieved after 17 iterations N DF SSR detRCov OLS-R2 McElroy-R2 system 40 34 240 0.56 0.553 0.819 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 98.4 5.79 2.41 0.633 0.590 supply 20 16 141.1 8.82 2.97 0.474 0.375 The covariance matrix of the residuals used for estimation demand supply demand 5.79 7.11 supply 7.11 8.82 The covariance matrix of the residuals demand supply demand 5.79 7.11 supply 7.11 8.82 The correlations of the residuals demand supply demand 1.000 0.995 supply 0.995 1.000 3SLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 92.0742 9.6303 9.56 3.6e-11 *** price -0.1064 0.1023 -1.04 0.31 income 0.1996 0.0297 6.73 9.9e-08 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.406 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 98.435 MSE: 5.79 Root MSE: 2.406 Multiple R-Squared: 0.633 Adjusted R-Squared: 0.59 3SLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 68.8551 12.4839 5.52 3.7e-06 *** price 0.1833 0.1189 1.54 0.13 farmPrice 0.1202 0.0260 4.63 5.1e-05 *** trend 0.1996 0.0297 6.73 9.9e-08 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.97 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 141.147 MSE: 8.822 Root MSE: 2.97 Multiple R-Squared: 0.474 Adjusted R-Squared: 0.375 [1] "********* iterated 3SLS with restriction (EViews-like) *********" systemfit results method: iterated 3SLS convergence achieved after 20 iterations N DF SSR detRCov OLS-R2 McElroy-R2 system 40 34 237 0.364 0.557 0.755 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 99.3 5.84 2.42 0.630 0.586 supply 20 16 138.1 8.63 2.94 0.485 0.388 The covariance matrix of the residuals used for estimation demand supply demand 4.96 5.82 supply 5.82 6.90 The covariance matrix of the residuals demand supply demand 4.96 5.82 supply 5.82 6.90 The correlations of the residuals demand supply demand 1.000 0.995 supply 0.995 1.000 3SLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 92.0353 8.9214 10.32 5.2e-12 *** price -0.1043 0.0958 -1.09 0.28 income 0.1979 0.0299 6.61 1.4e-07 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.417 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 99.297 MSE: 5.841 Root MSE: 2.417 Multiple R-Squared: 0.63 Adjusted R-Squared: 0.586 3SLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 68.2830 11.1530 6.12 6.0e-07 *** price 0.1851 0.1053 1.76 0.088 . farmPrice 0.1245 0.0251 4.96 1.9e-05 *** trend 0.1979 0.0299 6.61 1.4e-07 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.938 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 138.088 MSE: 8.63 Root MSE: 2.938 Multiple R-Squared: 0.485 Adjusted R-Squared: 0.388 [1] "******** iterated W3SLS with restriction (EViews-like) *********" systemfit results method: iterated 3SLS convergence achieved after 20 iterations N DF SSR detRCov OLS-R2 McElroy-R2 system 40 34 237 0.364 0.557 0.755 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 99.3 5.84 2.42 0.630 0.586 supply 20 16 138.1 8.63 2.94 0.485 0.388 The covariance matrix of the residuals used for estimation demand supply demand 4.96 5.82 supply 5.82 6.90 The covariance matrix of the residuals demand supply demand 4.96 5.82 supply 5.82 6.90 The correlations of the residuals demand supply demand 1.000 0.995 supply 0.995 1.000 3SLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 92.0353 8.9214 10.32 5.2e-12 *** price -0.1043 0.0958 -1.09 0.28 income 0.1979 0.0299 6.61 1.4e-07 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.417 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 99.297 MSE: 5.841 Root MSE: 2.417 Multiple R-Squared: 0.63 Adjusted R-Squared: 0.586 3SLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 68.2830 11.1530 6.12 6.0e-07 *** price 0.1851 0.1053 1.76 0.088 . farmPrice 0.1245 0.0251 4.96 1.9e-05 *** trend 0.1979 0.0299 6.61 1.4e-07 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.938 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 138.088 MSE: 8.63 Root MSE: 2.938 Multiple R-Squared: 0.485 Adjusted R-Squared: 0.388 [1] "********* iterated 3SLS with restriction via restrict.regMat *****************" systemfit results method: iterated 3SLS convergence achieved after 17 iterations N DF SSR detRCov OLS-R2 McElroy-R2 system 40 34 240 0.56 0.553 0.819 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 98.4 5.79 2.41 0.633 0.590 supply 20 16 141.1 8.82 2.97 0.474 0.375 The covariance matrix of the residuals used for estimation demand supply demand 5.79 7.11 supply 7.11 8.82 The covariance matrix of the residuals demand supply demand 5.79 7.11 supply 7.11 8.82 The correlations of the residuals demand supply demand 1.000 0.995 supply 0.995 1.000 3SLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 92.0742 9.6303 9.56 3.6e-11 *** price -0.1064 0.1023 -1.04 0.31 income 0.1996 0.0297 6.73 9.9e-08 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.406 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 98.435 MSE: 5.79 Root MSE: 2.406 Multiple R-Squared: 0.633 Adjusted R-Squared: 0.59 3SLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 68.8551 12.4839 5.52 3.7e-06 *** price 0.1833 0.1189 1.54 0.13 farmPrice 0.1202 0.0260 4.63 5.1e-05 *** trend 0.1996 0.0297 6.73 9.9e-08 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.97 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 141.147 MSE: 8.822 Root MSE: 2.97 Multiple R-Squared: 0.474 Adjusted R-Squared: 0.375 [1] "********* iterated 3SLS with restriction via restrict.regMat (EViews-like) ***" systemfit results method: iterated 3SLS convergence achieved after 20 iterations N DF SSR detRCov OLS-R2 McElroy-R2 system 40 34 237 0.364 0.557 0.755 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 99.3 5.84 2.42 0.630 0.586 supply 20 16 138.1 8.63 2.94 0.485 0.388 The covariance matrix of the residuals used for estimation demand supply demand 4.96 5.82 supply 5.82 6.90 The covariance matrix of the residuals demand supply demand 4.96 5.82 supply 5.82 6.90 The correlations of the residuals demand supply demand 1.000 0.995 supply 0.995 1.000 3SLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 92.0353 8.9214 10.32 5.2e-12 *** price -0.1043 0.0958 -1.09 0.28 income 0.1979 0.0299 6.61 1.4e-07 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.417 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 99.297 MSE: 5.841 Root MSE: 2.417 Multiple R-Squared: 0.63 Adjusted R-Squared: 0.586 3SLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 68.2830 11.1530 6.12 6.0e-07 *** price 0.1851 0.1053 1.76 0.088 . farmPrice 0.1245 0.0251 4.96 1.9e-05 *** trend 0.1979 0.0299 6.61 1.4e-07 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.938 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 138.088 MSE: 8.63 Root MSE: 2.938 Multiple R-Squared: 0.485 Adjusted R-Squared: 0.388 [1] "***** iterated W3SLS with restriction via restrict.regMat ********" systemfit results method: iterated 3SLS convergence achieved after 17 iterations N DF SSR detRCov OLS-R2 McElroy-R2 system 40 34 240 0.56 0.553 0.819 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 98.4 5.79 2.41 0.633 0.590 supply 20 16 141.1 8.82 2.97 0.474 0.375 The covariance matrix of the residuals used for estimation demand supply demand 5.79 7.11 supply 7.11 8.82 The covariance matrix of the residuals demand supply demand 5.79 7.11 supply 7.11 8.82 The correlations of the residuals demand supply demand 1.000 0.995 supply 0.995 1.000 3SLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 92.0742 9.6303 9.56 3.6e-11 *** price -0.1064 0.1023 -1.04 0.31 income 0.1996 0.0297 6.73 9.9e-08 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.406 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 98.435 MSE: 5.79 Root MSE: 2.406 Multiple R-Squared: 0.633 Adjusted R-Squared: 0.59 3SLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 68.8551 12.4839 5.52 3.7e-06 *** price 0.1833 0.1189 1.54 0.13 farmPrice 0.1202 0.0260 4.63 5.1e-05 *** trend 0.1996 0.0297 6.73 9.9e-08 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.97 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 141.147 MSE: 8.822 Root MSE: 2.97 Multiple R-Squared: 0.474 Adjusted R-Squared: 0.375 [1] "******** iterated 3SLS with 2 restrictions *********************" systemfit results method: iterated 3SLS warning: convergence not achieved after 100 iterations N DF SSR detRCov OLS-R2 McElroy-R2 system 40 35 1194 34.7 -1.23 0.688 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 274 16.1 4.02 -0.024 -0.144 supply 20 16 920 57.5 7.58 -2.431 -3.074 The covariance matrix of the residuals used for estimation demand supply demand 16.1 29.9 supply 29.9 57.5 The covariance matrix of the residuals demand supply demand 16.1 29.9 supply 29.9 57.5 The correlations of the residuals demand supply demand 1.000 0.981 supply 0.981 1.000 3SLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 43.5261 10.3602 4.20 0.00017 *** price 0.2553 0.1380 1.85 0.07275 . income 0.3264 0.0424 7.71 4.8e-09 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 4.018 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 274.43 MSE: 16.143 Root MSE: 4.018 Multiple R-Squared: -0.024 Adjusted R-Squared: -0.144 3SLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) -49.0143 9.6115 -5.10 1.2e-05 *** price 1.2553 0.1380 9.10 9.5e-11 *** farmPrice 0.2166 0.0573 3.78 0.00058 *** trend 0.3264 0.0424 7.71 4.8e-09 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 7.582 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 919.812 MSE: 57.488 Root MSE: 7.582 Multiple R-Squared: -2.431 Adjusted R-Squared: -3.074 [1] "********* iterated 3SLS with 2 restrictions (EViews-like) *******" systemfit results method: iterated 3SLS convergence achieved after 66 iterations N DF SSR detRCov OLS-R2 McElroy-R2 system 40 35 615 20.5 -0.147 0.48 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 151 8.87 2.98 0.437 0.371 supply 20 16 464 29.00 5.38 -0.731 -1.055 The covariance matrix of the residuals used for estimation demand supply demand 7.54 12.4 supply 12.43 23.2 The covariance matrix of the residuals demand supply demand 7.54 12.4 supply 12.43 23.2 The correlations of the residuals demand supply demand 1.000 0.939 supply 0.939 1.000 3SLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 68.3925 9.6792 7.07 3.1e-08 *** price -0.0907 0.1236 -0.73 0.47 income 0.4263 0.0385 11.08 5.4e-13 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.979 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 150.821 MSE: 8.872 Root MSE: 2.979 Multiple R-Squared: 0.437 Adjusted R-Squared: 0.371 3SLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) -27.3424 9.5498 -2.86 0.007 ** price 0.9093 0.1236 7.36 1.3e-08 *** farmPrice 0.3396 0.0498 6.82 6.5e-08 *** trend 0.4263 0.0385 11.08 5.4e-13 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 5.385 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 464.036 MSE: 29.002 Root MSE: 5.385 Multiple R-Squared: -0.731 Adjusted R-Squared: -1.055 [1] "******** iterated W3SLS with 2 restrictions (EViews-like) *******" systemfit results method: iterated 3SLS convergence achieved after 66 iterations N DF SSR detRCov OLS-R2 McElroy-R2 system 40 35 615 20.5 -0.147 0.48 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 151 8.87 2.98 0.437 0.371 supply 20 16 464 29.00 5.38 -0.731 -1.055 The covariance matrix of the residuals used for estimation demand supply demand 7.54 12.4 supply 12.43 23.2 The covariance matrix of the residuals demand supply demand 7.54 12.4 supply 12.43 23.2 The correlations of the residuals demand supply demand 1.000 0.939 supply 0.939 1.000 3SLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 68.3925 9.6792 7.07 3.1e-08 *** price -0.0907 0.1236 -0.73 0.47 income 0.4263 0.0385 11.08 5.4e-13 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.979 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 150.821 MSE: 8.872 Root MSE: 2.979 Multiple R-Squared: 0.437 Adjusted R-Squared: 0.371 3SLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) -27.3423 9.5498 -2.86 0.007 ** price 0.9093 0.1236 7.36 1.3e-08 *** farmPrice 0.3396 0.0498 6.82 6.5e-08 *** trend 0.4263 0.0385 11.08 5.4e-13 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 5.385 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 464.036 MSE: 29.002 Root MSE: 5.385 Multiple R-Squared: -0.731 Adjusted R-Squared: -1.055 [1] "******** iterated 3SLS with 2 restrictions via R and restrict.regMat *********" systemfit results method: iterated 3SLS warning: convergence not achieved after 100 iterations N DF SSR detRCov OLS-R2 McElroy-R2 system 40 35 1194 34.7 -1.23 0.688 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 274 16.1 4.02 -0.024 -0.144 supply 20 16 920 57.5 7.58 -2.431 -3.074 The covariance matrix of the residuals used for estimation demand supply demand 16.1 29.9 supply 29.9 57.5 The covariance matrix of the residuals demand supply demand 16.1 29.9 supply 29.9 57.5 The correlations of the residuals demand supply demand 1.000 0.981 supply 0.981 1.000 3SLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 43.5261 10.3602 4.20 0.00017 *** price 0.2553 0.1380 1.85 0.07275 . income 0.3264 0.0424 7.71 4.8e-09 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 4.018 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 274.43 MSE: 16.143 Root MSE: 4.018 Multiple R-Squared: -0.024 Adjusted R-Squared: -0.144 3SLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) -49.0143 9.6115 -5.10 1.2e-05 *** price 1.2553 0.1380 9.10 9.5e-11 *** farmPrice 0.2166 0.0573 3.78 0.00058 *** trend 0.3264 0.0424 7.71 4.8e-09 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 7.582 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 919.812 MSE: 57.488 Root MSE: 7.582 Multiple R-Squared: -2.431 Adjusted R-Squared: -3.074 [1] "*** iterated 3SLS with 2 restrictions via R and restrict.regMat (EViews-like)**" systemfit results method: iterated 3SLS convergence achieved after 66 iterations N DF SSR detRCov OLS-R2 McElroy-R2 system 40 35 615 20.5 -0.147 0.48 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 151 8.87 2.98 0.437 0.371 supply 20 16 464 29.00 5.38 -0.731 -1.055 The covariance matrix of the residuals used for estimation demand supply demand 7.54 12.4 supply 12.43 23.2 The covariance matrix of the residuals demand supply demand 7.54 12.4 supply 12.43 23.2 The correlations of the residuals demand supply demand 1.000 0.939 supply 0.939 1.000 3SLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 68.3925 9.6792 7.07 3.1e-08 *** price -0.0907 0.1236 -0.73 0.47 income 0.4263 0.0385 11.08 5.4e-13 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.979 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 150.821 MSE: 8.872 Root MSE: 2.979 Multiple R-Squared: 0.437 Adjusted R-Squared: 0.371 3SLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) -27.3424 9.5498 -2.86 0.007 ** price 0.9093 0.1236 7.36 1.3e-08 *** farmPrice 0.3396 0.0498 6.82 6.5e-08 *** trend 0.4263 0.0385 11.08 5.4e-13 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 5.385 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 464.036 MSE: 29.002 Root MSE: 5.385 Multiple R-Squared: -0.731 Adjusted R-Squared: -1.055 [1] "** iterated W3SLS with 2 restrictions via R and restrict.regMat ***" systemfit results method: iterated 3SLS warning: convergence not achieved after 100 iterations N DF SSR detRCov OLS-R2 McElroy-R2 system 40 35 1194 34.7 -1.23 0.688 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 274 16.1 4.02 -0.024 -0.144 supply 20 16 920 57.5 7.58 -2.431 -3.074 The covariance matrix of the residuals used for estimation demand supply demand 16.1 29.9 supply 29.9 57.5 The covariance matrix of the residuals demand supply demand 16.1 29.9 supply 29.9 57.5 The correlations of the residuals demand supply demand 1.000 0.981 supply 0.981 1.000 3SLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 43.5261 10.3602 4.20 0.00017 *** price 0.2553 0.1380 1.85 0.07275 . income 0.3264 0.0424 7.71 4.8e-09 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 4.018 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 274.43 MSE: 16.143 Root MSE: 4.018 Multiple R-Squared: -0.024 Adjusted R-Squared: -0.144 3SLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) -49.0142 9.6115 -5.10 1.2e-05 *** price 1.2553 0.1380 9.10 9.5e-11 *** farmPrice 0.2166 0.0573 3.78 0.00058 *** trend 0.3264 0.0424 7.71 4.8e-09 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 7.582 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 919.811 MSE: 57.488 Root MSE: 7.582 Multiple R-Squared: -2.431 Adjusted R-Squared: -3.074 > > ## **************** 3SLS with different instruments ************* > fit3slsd <- list() > formulas <- c( "GLS", "IV", "Schmidt", "GMM", "EViews" ) > for( i in seq( along = formulas ) ) { + fit3slsd[[ i ]] <- list() + + print( "***************************************************" ) + print( paste( "3SLS formula:", formulas[ i ] ) ) + print( "************* 3SLS with different instruments **************" ) + fit3slsd[[ i ]]$e1 <- systemfit( system, "3SLS", data = Kmenta, + inst = instlist, method3sls = formulas[ i ], useMatrix = useMatrix ) + print( summary( fit3slsd[[ i ]]$e1 ) ) + + print( "******* 3SLS with different instruments (EViews-like) **********" ) + fit3slsd[[ i ]]$e1e <- systemfit( system, "3SLS", data = Kmenta, + inst = instlist, methodResidCov = "noDfCor", method3sls = formulas[ i ], + useMatrix = useMatrix ) + print( summary( fit3slsd[[ i ]]$e1e, useDfSys = TRUE ) ) + + print( "**** 3SLS with different instruments and methodResidCov = Theil ***" ) + fit3slsd[[ i ]]$e1c <- systemfit( system, "3SLS", data = Kmenta, + inst = instlist, methodResidCov = "Theil", method3sls = formulas[ i ], + x = TRUE, useMatrix = useMatrix ) + print( summary( fit3slsd[[ i ]]$e1c, useDfSys = TRUE ) ) + + print( "************* W3SLS with different instruments **************" ) + fit3slsd[[ i ]]$e1w <- systemfit( system, "3SLS", data = Kmenta, + inst = instlist, method3sls = formulas[ i ], residCovWeighted = TRUE, + useMatrix = useMatrix ) + print( summary( fit3slsd[[ i ]]$e1w ) ) + + + print( "******* 3SLS with different instruments and restriction ********" ) + fit3slsd[[ i ]]$e2 <- systemfit( system, "3SLS", data = Kmenta, + inst = instlist, restrict.matrix = restrm, method3sls = formulas[ i ], + x = TRUE, useMatrix = useMatrix ) + print( summary( fit3slsd[[ i ]]$e2 ) ) + + print( "** 3SLS with different instruments and restriction (EViews-like) *" ) + fit3slsd[[ i ]]$e2e <- systemfit( system, "3SLS", data = Kmenta, + inst = instlist, methodResidCov = "noDfCor", restrict.matrix = restrm, + method3sls = formulas[ i ], useMatrix = useMatrix ) + print( summary( fit3slsd[[ i ]]$e2e, useDfSys = TRUE ) ) + + print( "** W3SLS with different instruments and restriction (EViews-like) *" ) + fit3slsd[[ i ]]$e2we <- systemfit( system, "3SLS", data = Kmenta, + inst = instlist, methodResidCov = "noDfCor", restrict.matrix = restrm, + method3sls = formulas[ i ], residCovWeighted = TRUE, + useMatrix = useMatrix ) + print( summary( fit3slsd[[ i ]]$e2we, useDfSys = TRUE ) ) + + + print( "** 3SLS with different instruments and restriction via restrict.regMat *******" ) + fit3slsd[[ i ]]$e3 <- systemfit( system, "3SLS", data = Kmenta, + inst = instlist, restrict.regMat = tc, method3sls = formulas[ i ], + useMatrix = useMatrix ) + print( summary( fit3slsd[[ i ]]$e3 ) ) + + print( "3SLS with different instruments with restriction via restrict.regMat (EViews-like)" ) + fit3slsd[[ i ]]$e3e <- systemfit( system, "3SLS", data = Kmenta, + inst = instlist, methodResidCov = "noDfCor", restrict.regMat = tc, + method3sls = formulas[ i ], x = TRUE, + useMatrix = useMatrix ) + print( summary( fit3slsd[[ i ]]$e3e, useDfSys = TRUE ) ) + + print( "** W3SLS with different instr. and restr. via restrict.regMat ****" ) + fit3slsd[[ i ]]$e3w <- systemfit( system, "3SLS", data = Kmenta, + inst = instlist, restrict.regMat = tc, method3sls = formulas[ i ], + residCovWeighted = TRUE, x = TRUE, + useMatrix = useMatrix ) + print( summary( fit3slsd[[ i ]]$e3w ) ) + + + print( "****** 3SLS with different instruments and 2 restrictions *********" ) + fit3slsd[[ i ]]$e4 <- systemfit( system, "3SLS", data = Kmenta, + inst = instlist, restrict.matrix = restr2m, restrict.rhs = restr2q, + method3sls = formulas[ i ], x = TRUE, + useMatrix = useMatrix ) + print( summary( fit3slsd[[ i ]]$e4 ) ) + + print( "** 3SLS with different instruments and 2 restrictions (EViews-like) *" ) + fit3slsd[[ i ]]$e4e <- systemfit( system, "3SLS", data = Kmenta, + inst = instlist, methodResidCov = "noDfCor", restrict.matrix = restr2m, + restrict.rhs = restr2q, method3sls = formulas[ i ], + useMatrix = useMatrix ) + print( summary( fit3slsd[[ i ]]$e4e, useDfSys = TRUE ) ) + + print( "**** W3SLS with different instruments and 2 restrictions *********" ) + fit3slsd[[ i ]]$e4w <- systemfit( system, "3SLS", data = Kmenta, + inst = instlist, restrict.matrix = restr2m, restrict.rhs = restr2q, + method3sls = formulas[ i ], residCovWeighted = TRUE, + useMatrix = useMatrix ) + print( summary( fit3slsd[[ i ]]$e4w ) ) + + + print( " 3SLS with different instruments with 2 restrictions via R and restrict.regMat" ) + fit3slsd[[ i ]]$e5 <- systemfit( system, "3SLS", data = Kmenta, + inst = instlist, restrict.regMat = tc, restrict.matrix = restr3m, + restrict.rhs = restr3q, method3sls = formulas[ i ], + useMatrix = useMatrix ) + print( summary( fit3slsd[[ i ]]$e5 ) ) + + print( "3SLS with diff. instruments and 2 restr. via R and restrict.regMat (EViews-like)" ) + fit3slsd[[ i ]]$e5e <- systemfit( system, "3SLS", data = Kmenta, + inst = instlist, restrict.regMat = tc, methodResidCov = "noDfCor", + restrict.matrix = restr3m, restrict.rhs = restr3q, + method3sls = formulas[ i ], x = TRUE, + useMatrix = useMatrix ) + print( summary( fit3slsd[[ i ]]$e5e, useDfSys = TRUE ) ) + + print( "W3SLS with diff. instr. and 2 restr. via R and restrict.regMat (EViews-like)" ) + fit3slsd[[ i ]]$e5we <- systemfit( system, "3SLS", data = Kmenta, + inst = instlist, restrict.regMat = tc, methodResidCov = "noDfCor", + restrict.matrix = restr3m, restrict.rhs = restr3q, method3sls = formulas[ i ], + residCovWeighted = TRUE, useMatrix = useMatrix ) + print( summary( fit3slsd[[ i ]]$e5we, useDfSys = TRUE ) ) + } [1] "***************************************************" [1] "3SLS formula: GLS" [1] "************* 3SLS with different instruments **************" systemfit results method: 3SLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 33 170 13.4 0.683 0.52 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 67.4 3.97 1.99 0.748 0.719 supply 20 16 102.4 6.40 2.53 0.618 0.546 The covariance matrix of the residuals used for estimation demand supply demand 3.97 3.84 supply 3.84 6.04 The covariance matrix of the residuals demand supply demand 3.97 3.47 supply 3.47 6.40 The correlations of the residuals demand supply demand 1.000 0.688 supply 0.688 1.000 3SLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Instruments: ~income + farmPrice Estimate Std. Error t value Pr(>|t|) (Intercept) 106.7894 11.1435 9.58 2.9e-08 *** price -0.4116 0.1448 -2.84 0.011 * income 0.3617 0.0564 6.41 6.4e-06 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.992 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 67.447 MSE: 3.967 Root MSE: 1.992 Multiple R-Squared: 0.748 Adjusted R-Squared: 0.719 3SLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 46.9385 11.5390 4.07 0.0009 *** price 0.2744 0.0897 3.06 0.0075 ** farmPrice 0.2521 0.0470 5.36 6.4e-05 *** trend 0.2048 0.0781 2.62 0.0185 * --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.53 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 102.443 MSE: 6.403 Root MSE: 2.53 Multiple R-Squared: 0.618 Adjusted R-Squared: 0.546 [1] "******* 3SLS with different instruments (EViews-like) **********" systemfit results method: 3SLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 33 170 9 0.684 0.511 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 67.4 3.97 1.99 0.748 0.719 supply 20 16 102.2 6.39 2.53 0.619 0.547 The covariance matrix of the residuals used for estimation demand supply demand 3.37 3.16 supply 3.16 4.83 The covariance matrix of the residuals demand supply demand 3.37 2.87 supply 2.87 5.11 The correlations of the residuals demand supply demand 1.000 0.691 supply 0.691 1.000 3SLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Instruments: ~income + farmPrice Estimate Std. Error t value Pr(>|t|) (Intercept) 106.789 10.274 10.39 6.1e-12 *** price -0.412 0.134 -3.08 0.0041 ** income 0.362 0.052 6.95 6.0e-08 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.992 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 67.447 MSE: 3.967 Root MSE: 1.992 Multiple R-Squared: 0.748 Adjusted R-Squared: 0.719 3SLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 47.0160 10.3208 4.56 6.8e-05 *** price 0.2734 0.0802 3.41 0.0017 ** farmPrice 0.2522 0.0421 6.00 9.8e-07 *** trend 0.2062 0.0699 2.95 0.0058 ** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.527 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 102.203 MSE: 6.388 Root MSE: 2.527 Multiple R-Squared: 0.619 Adjusted R-Squared: 0.547 [1] "**** 3SLS with different instruments and methodResidCov = Theil ***" systemfit results method: 3SLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 33 170 12.7 0.683 0.502 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 67.4 3.97 1.99 0.748 0.719 supply 20 16 102.7 6.42 2.53 0.617 0.545 The covariance matrix of the residuals used for estimation demand supply demand 3.97 3.96 supply 3.96 6.04 The covariance matrix of the residuals demand supply demand 3.97 3.57 supply 3.57 6.42 The correlations of the residuals demand supply demand 1.000 0.685 supply 0.685 1.000 3SLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Instruments: ~income + farmPrice Estimate Std. Error t value Pr(>|t|) (Intercept) 106.7894 11.1435 9.58 4.7e-11 *** price -0.4116 0.1448 -2.84 0.0076 ** income 0.3617 0.0564 6.41 2.9e-07 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.992 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 67.447 MSE: 3.967 Root MSE: 1.992 Multiple R-Squared: 0.748 Adjusted R-Squared: 0.719 3SLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 46.8512 11.5060 4.07 0.00027 *** price 0.2756 0.0889 3.10 0.00395 ** farmPrice 0.2520 0.0470 5.36 6.4e-06 *** trend 0.2032 0.0765 2.66 0.01204 * --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.534 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 102.718 MSE: 6.42 Root MSE: 2.534 Multiple R-Squared: 0.617 Adjusted R-Squared: 0.545 [1] "************* W3SLS with different instruments **************" systemfit results method: 3SLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 33 170 13.4 0.683 0.52 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 67.4 3.97 1.99 0.748 0.719 supply 20 16 102.4 6.40 2.53 0.618 0.546 The covariance matrix of the residuals used for estimation demand supply demand 3.97 3.84 supply 3.84 6.04 The covariance matrix of the residuals demand supply demand 3.97 3.47 supply 3.47 6.40 The correlations of the residuals demand supply demand 1.000 0.688 supply 0.688 1.000 3SLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Instruments: ~income + farmPrice Estimate Std. Error t value Pr(>|t|) (Intercept) 106.7894 11.1435 9.58 2.9e-08 *** price -0.4116 0.1448 -2.84 0.011 * income 0.3617 0.0564 6.41 6.4e-06 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.992 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 67.447 MSE: 3.967 Root MSE: 1.992 Multiple R-Squared: 0.748 Adjusted R-Squared: 0.719 3SLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 46.9385 11.5390 4.07 0.0009 *** price 0.2744 0.0897 3.06 0.0075 ** farmPrice 0.2521 0.0470 5.36 6.4e-05 *** trend 0.2048 0.0781 2.62 0.0185 * --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.53 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 102.443 MSE: 6.403 Root MSE: 2.53 Multiple R-Squared: 0.618 Adjusted R-Squared: 0.546 [1] "******* 3SLS with different instruments and restriction ********" systemfit results method: 3SLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 34 201 2.72 0.626 0.685 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 72.3 4.25 2.06 0.730 0.699 supply 20 16 128.3 8.02 2.83 0.521 0.432 The covariance matrix of the residuals used for estimation demand supply demand 3.79 4.35 supply 4.35 6.27 The covariance matrix of the residuals demand supply demand 4.25 5.60 supply 5.60 8.02 The correlations of the residuals demand supply demand 1.000 0.959 supply 0.959 1.000 3SLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Instruments: ~income + farmPrice Estimate Std. Error t value Pr(>|t|) (Intercept) 88.9456 6.3475 14.01 1.1e-15 *** price -0.1778 0.0812 -2.19 0.036 * income 0.3049 0.0474 6.43 2.4e-07 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.062 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 72.262 MSE: 4.251 Root MSE: 2.062 Multiple R-Squared: 0.73 Adjusted R-Squared: 0.699 3SLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 40.2918 11.2022 3.60 0.001 ** price 0.3613 0.0785 4.60 5.6e-05 *** farmPrice 0.2201 0.0453 4.86 2.6e-05 *** trend 0.3049 0.0474 6.43 2.4e-07 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.832 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 128.304 MSE: 8.019 Root MSE: 2.832 Multiple R-Squared: 0.521 Adjusted R-Squared: 0.432 [1] "** 3SLS with different instruments and restriction (EViews-like) *" systemfit results method: 3SLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 34 200 1.75 0.627 0.651 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 72.7 4.28 2.07 0.729 0.697 supply 20 16 127.0 7.94 2.82 0.526 0.437 The covariance matrix of the residuals used for estimation demand supply demand 3.22 3.58 supply 3.58 5.02 The covariance matrix of the residuals demand supply demand 3.64 4.62 supply 4.62 6.35 The correlations of the residuals demand supply demand 1.000 0.961 supply 0.961 1.000 3SLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Instruments: ~income + farmPrice Estimate Std. Error t value Pr(>|t|) (Intercept) 88.7634 5.8428 15.19 < 2e-16 *** price -0.1738 0.0737 -2.36 0.024 * income 0.3027 0.0432 7.00 4.5e-08 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.068 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 72.717 MSE: 4.277 Root MSE: 2.068 Multiple R-Squared: 0.729 Adjusted R-Squared: 0.697 3SLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 40.8177 10.0564 4.06 0.00027 *** price 0.3569 0.0705 5.06 1.4e-05 *** farmPrice 0.2195 0.0403 5.45 4.4e-06 *** trend 0.3027 0.0432 7.00 4.5e-08 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.818 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 127.044 MSE: 7.94 Root MSE: 2.818 Multiple R-Squared: 0.526 Adjusted R-Squared: 0.437 [1] "** W3SLS with different instruments and restriction (EViews-like) *" systemfit results method: 3SLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 34 199 1.77 0.629 0.65 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 72.4 4.26 2.06 0.730 0.698 supply 20 16 126.7 7.92 2.81 0.527 0.439 The covariance matrix of the residuals used for estimation demand supply demand 3.24 3.60 supply 3.60 5.06 The covariance matrix of the residuals demand supply demand 3.62 4.60 supply 4.60 6.34 The correlations of the residuals demand supply demand 1.000 0.961 supply 0.961 1.000 3SLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Instruments: ~income + farmPrice Estimate Std. Error t value Pr(>|t|) (Intercept) 88.9298 5.9083 15.05 < 2e-16 *** price -0.1760 0.0746 -2.36 0.024 * income 0.3032 0.0434 6.99 4.6e-08 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.064 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 72.435 MSE: 4.261 Root MSE: 2.064 Multiple R-Squared: 0.73 Adjusted R-Squared: 0.698 3SLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 40.8325 10.1094 4.04 0.00029 *** price 0.3562 0.0711 5.01 1.7e-05 *** farmPrice 0.2200 0.0405 5.43 4.8e-06 *** trend 0.3032 0.0434 6.99 4.6e-08 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.814 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 126.74 MSE: 7.921 Root MSE: 2.814 Multiple R-Squared: 0.527 Adjusted R-Squared: 0.439 [1] "** 3SLS with different instruments and restriction via restrict.regMat *******" systemfit results method: 3SLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 34 201 2.72 0.626 0.685 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 72.3 4.25 2.06 0.730 0.699 supply 20 16 128.3 8.02 2.83 0.521 0.432 The covariance matrix of the residuals used for estimation demand supply demand 3.79 4.35 supply 4.35 6.27 The covariance matrix of the residuals demand supply demand 4.25 5.60 supply 5.60 8.02 The correlations of the residuals demand supply demand 1.000 0.959 supply 0.959 1.000 3SLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Instruments: ~income + farmPrice Estimate Std. Error t value Pr(>|t|) (Intercept) 88.9456 6.3475 14.01 1.1e-15 *** price -0.1778 0.0812 -2.19 0.036 * income 0.3049 0.0474 6.43 2.4e-07 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.062 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 72.262 MSE: 4.251 Root MSE: 2.062 Multiple R-Squared: 0.73 Adjusted R-Squared: 0.699 3SLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 40.2918 11.2022 3.60 0.001 ** price 0.3613 0.0785 4.60 5.6e-05 *** farmPrice 0.2201 0.0453 4.86 2.6e-05 *** trend 0.3049 0.0474 6.43 2.4e-07 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.832 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 128.304 MSE: 8.019 Root MSE: 2.832 Multiple R-Squared: 0.521 Adjusted R-Squared: 0.432 [1] "3SLS with different instruments with restriction via restrict.regMat (EViews-like)" systemfit results method: 3SLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 34 200 1.75 0.627 0.651 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 72.7 4.28 2.07 0.729 0.697 supply 20 16 127.0 7.94 2.82 0.526 0.437 The covariance matrix of the residuals used for estimation demand supply demand 3.22 3.58 supply 3.58 5.02 The covariance matrix of the residuals demand supply demand 3.64 4.62 supply 4.62 6.35 The correlations of the residuals demand supply demand 1.000 0.961 supply 0.961 1.000 3SLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Instruments: ~income + farmPrice Estimate Std. Error t value Pr(>|t|) (Intercept) 88.7634 5.8428 15.19 < 2e-16 *** price -0.1738 0.0737 -2.36 0.024 * income 0.3027 0.0432 7.00 4.5e-08 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.068 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 72.717 MSE: 4.277 Root MSE: 2.068 Multiple R-Squared: 0.729 Adjusted R-Squared: 0.697 3SLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 40.8177 10.0564 4.06 0.00027 *** price 0.3569 0.0705 5.06 1.4e-05 *** farmPrice 0.2195 0.0403 5.45 4.4e-06 *** trend 0.3027 0.0432 7.00 4.5e-08 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.818 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 127.044 MSE: 7.94 Root MSE: 2.818 Multiple R-Squared: 0.526 Adjusted R-Squared: 0.437 [1] "** W3SLS with different instr. and restr. via restrict.regMat ****" systemfit results method: 3SLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 34 200 2.75 0.627 0.684 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 71.9 4.23 2.06 0.732 0.700 supply 20 16 127.9 8.00 2.83 0.523 0.433 The covariance matrix of the residuals used for estimation demand supply demand 3.81 4.36 supply 4.36 6.34 The covariance matrix of the residuals demand supply demand 4.23 5.58 supply 5.58 7.99 The correlations of the residuals demand supply demand 1.000 0.958 supply 0.958 1.000 3SLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Instruments: ~income + farmPrice Estimate Std. Error t value Pr(>|t|) (Intercept) 89.1391 6.4318 13.86 1.6e-15 *** price -0.1803 0.0823 -2.19 0.035 * income 0.3055 0.0476 6.42 2.5e-07 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.057 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 71.945 MSE: 4.232 Root MSE: 2.057 Multiple R-Squared: 0.732 Adjusted R-Squared: 0.7 3SLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 40.3187 11.2699 3.58 0.0011 ** price 0.3604 0.0792 4.55 6.5e-05 *** farmPrice 0.2207 0.0456 4.84 2.8e-05 *** trend 0.3055 0.0476 6.42 2.5e-07 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.828 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 127.918 MSE: 7.995 Root MSE: 2.828 Multiple R-Squared: 0.523 Adjusted R-Squared: 0.433 [1] "****** 3SLS with different instruments and 2 restrictions *********" systemfit results method: 3SLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 35 211 2.1 0.606 0.71 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 77.9 4.58 2.14 0.709 0.675 supply 20 16 133.2 8.32 2.88 0.503 0.410 The covariance matrix of the residuals used for estimation demand supply demand 3.79 4.45 supply 4.45 6.06 The covariance matrix of the residuals demand supply demand 4.58 6.01 supply 6.01 8.32 The correlations of the residuals demand supply demand 1.000 0.972 supply 0.972 1.000 3SLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Instruments: ~income + farmPrice Estimate Std. Error t value Pr(>|t|) (Intercept) 86.4443 5.3770 16.08 <2e-16 *** price -0.1371 0.0504 -2.72 0.01 * income 0.2888 0.0182 15.89 <2e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.141 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 77.945 MSE: 4.585 Root MSE: 2.141 Multiple R-Squared: 0.709 Adjusted R-Squared: 0.675 3SLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 41.8618 5.4316 7.71 4.8e-09 *** price 0.3629 0.0504 7.20 2.1e-08 *** farmPrice 0.2040 0.0205 9.96 9.4e-12 *** trend 0.2888 0.0182 15.89 < 2e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.885 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 133.177 MSE: 8.324 Root MSE: 2.885 Multiple R-Squared: 0.503 Adjusted R-Squared: 0.41 [1] "** 3SLS with different instruments and 2 restrictions (EViews-like) *" systemfit results method: 3SLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 35 210 1.42 0.609 0.668 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 77.9 4.58 2.14 0.709 0.675 supply 20 16 132.0 8.25 2.87 0.508 0.415 The covariance matrix of the residuals used for estimation demand supply demand 3.22 3.67 supply 3.67 4.85 The covariance matrix of the residuals demand supply demand 3.90 4.93 supply 4.93 6.60 The correlations of the residuals demand supply demand 1.000 0.972 supply 0.972 1.000 3SLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Instruments: ~income + farmPrice Estimate Std. Error t value Pr(>|t|) (Intercept) 86.3521 4.9704 17.4 <2e-16 *** price -0.1376 0.0458 -3.0 0.0049 ** income 0.2902 0.0168 17.3 <2e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.141 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 77.912 MSE: 4.583 Root MSE: 2.141 Multiple R-Squared: 0.709 Adjusted R-Squared: 0.675 3SLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 41.6089 4.9950 8.33 8.0e-10 *** price 0.3624 0.0458 7.91 2.6e-09 *** farmPrice 0.2069 0.0184 11.27 3.4e-13 *** trend 0.2902 0.0168 17.27 < 2e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.872 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 131.997 MSE: 8.25 Root MSE: 2.872 Multiple R-Squared: 0.508 Adjusted R-Squared: 0.415 [1] "**** W3SLS with different instruments and 2 restrictions *********" systemfit results method: 3SLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 35 214 2.1 0.601 0.713 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 78.9 4.64 2.15 0.706 0.671 supply 20 16 135.2 8.45 2.91 0.496 0.401 The covariance matrix of the residuals used for estimation demand supply demand 3.75 4.46 supply 4.46 6.04 The covariance matrix of the residuals demand supply demand 4.64 6.09 supply 6.09 8.45 The correlations of the residuals demand supply demand 1.000 0.973 supply 0.973 1.000 3SLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Instruments: ~income + farmPrice Estimate Std. Error t value Pr(>|t|) (Intercept) 85.9516 5.1136 16.81 <2e-16 *** price -0.1318 0.0479 -2.75 0.0093 ** income 0.2884 0.0171 16.86 <2e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.154 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 78.853 MSE: 4.638 Root MSE: 2.154 Multiple R-Squared: 0.706 Adjusted R-Squared: 0.671 3SLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 41.4498 5.1591 8.03 1.9e-09 *** price 0.3682 0.0479 7.69 5.0e-09 *** farmPrice 0.2028 0.0193 10.50 2.3e-12 *** trend 0.2884 0.0171 16.86 < 2e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.907 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 135.215 MSE: 8.451 Root MSE: 2.907 Multiple R-Squared: 0.496 Adjusted R-Squared: 0.401 [1] " 3SLS with different instruments with 2 restrictions via R and restrict.regMat" systemfit results method: 3SLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 35 211 2.1 0.606 0.71 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 77.9 4.58 2.14 0.709 0.675 supply 20 16 133.2 8.32 2.88 0.503 0.410 The covariance matrix of the residuals used for estimation demand supply demand 3.79 4.45 supply 4.45 6.06 The covariance matrix of the residuals demand supply demand 4.58 6.01 supply 6.01 8.32 The correlations of the residuals demand supply demand 1.000 0.972 supply 0.972 1.000 3SLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Instruments: ~income + farmPrice Estimate Std. Error t value Pr(>|t|) (Intercept) 86.4443 5.3770 16.08 <2e-16 *** price -0.1371 0.0504 -2.72 0.01 * income 0.2888 0.0182 15.89 <2e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.141 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 77.945 MSE: 4.585 Root MSE: 2.141 Multiple R-Squared: 0.709 Adjusted R-Squared: 0.675 3SLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 41.8618 5.4316 7.71 4.8e-09 *** price 0.3629 0.0504 7.20 2.1e-08 *** farmPrice 0.2040 0.0205 9.96 9.4e-12 *** trend 0.2888 0.0182 15.89 < 2e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.885 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 133.177 MSE: 8.324 Root MSE: 2.885 Multiple R-Squared: 0.503 Adjusted R-Squared: 0.41 [1] "3SLS with diff. instruments and 2 restr. via R and restrict.regMat (EViews-like)" systemfit results method: 3SLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 35 210 1.42 0.609 0.668 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 77.9 4.58 2.14 0.709 0.675 supply 20 16 132.0 8.25 2.87 0.508 0.415 The covariance matrix of the residuals used for estimation demand supply demand 3.22 3.67 supply 3.67 4.85 The covariance matrix of the residuals demand supply demand 3.90 4.93 supply 4.93 6.60 The correlations of the residuals demand supply demand 1.000 0.972 supply 0.972 1.000 3SLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Instruments: ~income + farmPrice Estimate Std. Error t value Pr(>|t|) (Intercept) 86.3521 4.9704 17.4 <2e-16 *** price -0.1376 0.0458 -3.0 0.0049 ** income 0.2902 0.0168 17.3 <2e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.141 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 77.912 MSE: 4.583 Root MSE: 2.141 Multiple R-Squared: 0.709 Adjusted R-Squared: 0.675 3SLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 41.6089 4.9950 8.33 8.0e-10 *** price 0.3624 0.0458 7.91 2.6e-09 *** farmPrice 0.2069 0.0184 11.27 3.4e-13 *** trend 0.2902 0.0168 17.27 < 2e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.872 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 131.997 MSE: 8.25 Root MSE: 2.872 Multiple R-Squared: 0.508 Adjusted R-Squared: 0.415 [1] "W3SLS with diff. instr. and 2 restr. via R and restrict.regMat (EViews-like)" systemfit results method: 3SLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 35 212 1.42 0.604 0.671 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 78.7 4.63 2.15 0.706 0.672 supply 20 16 133.7 8.36 2.89 0.501 0.408 The covariance matrix of the residuals used for estimation demand supply demand 3.19 3.68 supply 3.68 4.83 The covariance matrix of the residuals demand supply demand 3.94 4.99 supply 4.99 6.69 The correlations of the residuals demand supply demand 1.000 0.973 supply 0.973 1.000 3SLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Instruments: ~income + farmPrice Estimate Std. Error t value Pr(>|t|) (Intercept) 85.9108 4.7598 18.05 <2e-16 *** price -0.1329 0.0438 -3.03 0.0045 ** income 0.2900 0.0159 18.18 <2e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.152 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 78.713 MSE: 4.63 Root MSE: 2.152 Multiple R-Squared: 0.706 Adjusted R-Squared: 0.672 3SLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 41.2362 4.7784 8.63 3.5e-10 *** price 0.3671 0.0438 8.38 7.0e-10 *** farmPrice 0.2060 0.0174 11.81 9.1e-14 *** trend 0.2900 0.0159 18.18 < 2e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.891 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 133.715 MSE: 8.357 Root MSE: 2.891 Multiple R-Squared: 0.501 Adjusted R-Squared: 0.408 [1] "***************************************************" [1] "3SLS formula: IV" [1] "************* 3SLS with different instruments **************" systemfit results method: 3SLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 33 174 2.12 0.675 0.659 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 67.4 3.97 1.99 0.748 0.719 supply 20 16 106.6 6.66 2.58 0.602 0.528 The covariance matrix of the residuals used for estimation demand supply demand 3.97 3.84 supply 3.84 6.04 The covariance matrix of the residuals demand supply demand 3.97 4.93 supply 4.93 6.66 The correlations of the residuals demand supply demand 1.000 0.959 supply 0.959 1.000 3SLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Instruments: ~income + farmPrice Estimate Std. Error t value Pr(>|t|) (Intercept) 106.7894 11.1435 9.58 2.9e-08 *** price -0.4116 0.1448 -2.84 0.011 * income 0.3617 0.0564 6.41 6.4e-06 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.992 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 67.447 MSE: 3.967 Root MSE: 1.992 Multiple R-Squared: 0.748 Adjusted R-Squared: 0.719 3SLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 57.2953 11.7078 4.89 0.00016 *** price 0.1373 0.0979 1.40 0.17978 farmPrice 0.2660 0.0483 5.51 4.8e-05 *** trend 0.3970 0.0672 5.91 2.2e-05 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.582 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 106.628 MSE: 6.664 Root MSE: 2.582 Multiple R-Squared: 0.602 Adjusted R-Squared: 0.528 [1] "******* 3SLS with different instruments (EViews-like) **********" systemfit results method: 3SLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 33 173 1.51 0.677 0.612 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 67.4 3.97 1.99 0.748 0.719 supply 20 16 105.7 6.61 2.57 0.606 0.532 The covariance matrix of the residuals used for estimation demand supply demand 3.37 3.16 supply 3.16 4.83 The covariance matrix of the residuals demand supply demand 3.37 4.04 supply 4.04 5.29 The correlations of the residuals demand supply demand 1.000 0.957 supply 0.957 1.000 3SLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Instruments: ~income + farmPrice Estimate Std. Error t value Pr(>|t|) (Intercept) 106.789 10.274 10.39 6.1e-12 *** price -0.412 0.134 -3.08 0.0041 ** income 0.362 0.052 6.95 6.0e-08 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.992 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 67.447 MSE: 3.967 Root MSE: 1.992 Multiple R-Squared: 0.748 Adjusted R-Squared: 0.719 3SLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 57.0636 10.4717 5.45 4.9e-06 *** price 0.1403 0.0875 1.60 0.12 farmPrice 0.2657 0.0432 6.15 6.2e-07 *** trend 0.3927 0.0601 6.53 2.0e-07 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.571 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 105.735 MSE: 6.608 Root MSE: 2.571 Multiple R-Squared: 0.606 Adjusted R-Squared: 0.532 [1] "**** 3SLS with different instruments and methodResidCov = Theil ***" systemfit results method: 3SLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 33 175 0.321 0.673 0.655 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 67.4 3.97 1.99 0.748 0.719 supply 20 16 107.7 6.73 2.59 0.598 0.523 The covariance matrix of the residuals used for estimation demand supply demand 3.97 3.96 supply 3.96 6.04 The covariance matrix of the residuals demand supply demand 3.97 5.14 supply 5.14 6.73 The correlations of the residuals demand supply demand 1.000 0.962 supply 0.962 1.000 3SLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Instruments: ~income + farmPrice Estimate Std. Error t value Pr(>|t|) (Intercept) 106.7894 11.1435 9.58 4.7e-11 *** price -0.4116 0.1448 -2.84 0.0076 ** income 0.3617 0.0564 6.41 2.9e-07 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.992 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 67.447 MSE: 3.967 Root MSE: 1.992 Multiple R-Squared: 0.748 Adjusted R-Squared: 0.719 3SLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 57.5567 11.6867 4.92 2.3e-05 *** price 0.1338 0.0977 1.37 0.18 farmPrice 0.2664 0.0484 5.51 4.1e-06 *** trend 0.4018 0.0644 6.24 4.8e-07 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.594 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 107.679 MSE: 6.73 Root MSE: 2.594 Multiple R-Squared: 0.598 Adjusted R-Squared: 0.523 [1] "************* W3SLS with different instruments **************" systemfit results method: 3SLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 33 174 2.12 0.675 0.659 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 67.4 3.97 1.99 0.748 0.719 supply 20 16 106.6 6.66 2.58 0.602 0.528 The covariance matrix of the residuals used for estimation demand supply demand 3.97 3.84 supply 3.84 6.04 The covariance matrix of the residuals demand supply demand 3.97 4.93 supply 4.93 6.66 The correlations of the residuals demand supply demand 1.000 0.959 supply 0.959 1.000 3SLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Instruments: ~income + farmPrice Estimate Std. Error t value Pr(>|t|) (Intercept) 106.7894 11.1435 9.58 2.9e-08 *** price -0.4116 0.1448 -2.84 0.011 * income 0.3617 0.0564 6.41 6.4e-06 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.992 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 67.447 MSE: 3.967 Root MSE: 1.992 Multiple R-Squared: 0.748 Adjusted R-Squared: 0.719 3SLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 57.2953 11.7078 4.89 0.00016 *** price 0.1373 0.0979 1.40 0.17978 farmPrice 0.2660 0.0483 5.51 4.8e-05 *** trend 0.3970 0.0672 5.91 2.2e-05 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.582 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 106.628 MSE: 6.664 Root MSE: 2.582 Multiple R-Squared: 0.602 Adjusted R-Squared: 0.528 [1] "******* 3SLS with different instruments and restriction ********" systemfit results method: 3SLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 34 397 11.4 0.26 -0.128 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 175 10.3 3.20 0.349 0.273 supply 20 16 223 13.9 3.73 0.170 0.014 The covariance matrix of the residuals used for estimation demand supply demand 3.79 4.35 supply 4.35 6.27 The covariance matrix of the residuals demand supply demand 10.3 11.5 supply 11.5 13.9 The correlations of the residuals demand supply demand 1.000 0.959 supply 0.959 1.000 3SLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Instruments: ~income + farmPrice Estimate Std. Error t value Pr(>|t|) (Intercept) 137.2061 12.4591 11.01 9.3e-13 *** price -0.8101 0.1734 -4.67 4.5e-05 *** income 0.4585 0.0659 6.96 5.0e-08 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 3.204 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 174.513 MSE: 10.265 Root MSE: 3.204 Multiple R-Squared: 0.349 Adjusted R-Squared: 0.273 3SLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 81.1339 9.1968 8.82 2.6e-10 *** price -0.1765 0.0892 -1.98 0.056 . farmPrice 0.3374 0.0591 5.71 2.1e-06 *** trend 0.4585 0.0659 6.96 5.0e-08 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 3.73 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 222.562 MSE: 13.91 Root MSE: 3.73 Multiple R-Squared: 0.17 Adjusted R-Squared: 0.014 [1] "** 3SLS with different instruments and restriction (EViews-like) *" systemfit results method: 3SLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 34 365 7.14 0.319 -0.166 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 163 9.57 3.09 0.393 0.322 supply 20 16 202 12.65 3.56 0.245 0.104 The covariance matrix of the residuals used for estimation demand supply demand 3.22 3.58 supply 3.58 5.02 The covariance matrix of the residuals demand supply demand 8.13 8.67 supply 8.67 10.12 The correlations of the residuals demand supply demand 1.000 0.956 supply 0.956 1.000 3SLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Instruments: ~income + farmPrice Estimate Std. Error t value Pr(>|t|) (Intercept) 134.9751 11.3086 11.94 1.0e-13 *** price -0.7834 0.1565 -5.01 1.7e-05 *** income 0.4539 0.0598 7.60 8.0e-09 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 3.093 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 162.635 MSE: 9.567 Root MSE: 3.093 Multiple R-Squared: 0.393 Adjusted R-Squared: 0.322 3SLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 78.1824 8.5029 9.19 9.6e-11 *** price -0.1415 0.0807 -1.75 0.089 . farmPrice 0.3322 0.0524 6.34 3.1e-07 *** trend 0.4539 0.0598 7.60 8.0e-09 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 3.557 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 202.39 MSE: 12.649 Root MSE: 3.557 Multiple R-Squared: 0.245 Adjusted R-Squared: 0.104 [1] "** W3SLS with different instruments and restriction (EViews-like) *" systemfit results method: 3SLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 34 351 6.72 0.345 -0.118 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 156 9.18 3.03 0.418 0.349 supply 20 16 195 12.20 3.49 0.272 0.135 The covariance matrix of the residuals used for estimation demand supply demand 3.24 3.60 supply 3.60 5.06 The covariance matrix of the residuals demand supply demand 7.81 8.34 supply 8.34 9.76 The correlations of the residuals demand supply demand 1.000 0.955 supply 0.955 1.000 3SLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Instruments: ~income + farmPrice Estimate Std. Error t value Pr(>|t|) (Intercept) 133.7954 11.2810 11.86 1.2e-13 *** price -0.7678 0.1558 -4.93 2.1e-05 *** income 0.4501 0.0595 7.56 8.8e-09 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 3.031 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 156.133 MSE: 9.184 Root MSE: 3.031 Multiple R-Squared: 0.418 Adjusted R-Squared: 0.349 3SLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 77.4097 8.6219 8.98 1.7e-10 *** price -0.1304 0.0814 -1.60 0.12 farmPrice 0.3292 0.0523 6.29 3.6e-07 *** trend 0.4501 0.0595 7.56 8.8e-09 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 3.493 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 195.256 MSE: 12.204 Root MSE: 3.493 Multiple R-Squared: 0.272 Adjusted R-Squared: 0.135 [1] "** 3SLS with different instruments and restriction via restrict.regMat *******" systemfit results method: 3SLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 34 397 11.4 0.26 -0.128 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 175 10.3 3.20 0.349 0.273 supply 20 16 223 13.9 3.73 0.170 0.014 The covariance matrix of the residuals used for estimation demand supply demand 3.79 4.35 supply 4.35 6.27 The covariance matrix of the residuals demand supply demand 10.3 11.5 supply 11.5 13.9 The correlations of the residuals demand supply demand 1.000 0.959 supply 0.959 1.000 3SLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Instruments: ~income + farmPrice Estimate Std. Error t value Pr(>|t|) (Intercept) 137.2061 12.4591 11.01 9.3e-13 *** price -0.8101 0.1734 -4.67 4.5e-05 *** income 0.4585 0.0659 6.96 5.0e-08 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 3.204 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 174.513 MSE: 10.265 Root MSE: 3.204 Multiple R-Squared: 0.349 Adjusted R-Squared: 0.273 3SLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 81.1339 9.1968 8.82 2.6e-10 *** price -0.1765 0.0892 -1.98 0.056 . farmPrice 0.3374 0.0591 5.71 2.1e-06 *** trend 0.4585 0.0659 6.96 5.0e-08 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 3.73 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 222.562 MSE: 13.91 Root MSE: 3.73 Multiple R-Squared: 0.17 Adjusted R-Squared: 0.014 [1] "3SLS with different instruments with restriction via restrict.regMat (EViews-like)" systemfit results method: 3SLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 34 365 7.14 0.319 -0.166 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 163 9.57 3.09 0.393 0.322 supply 20 16 202 12.65 3.56 0.245 0.104 The covariance matrix of the residuals used for estimation demand supply demand 3.22 3.58 supply 3.58 5.02 The covariance matrix of the residuals demand supply demand 8.13 8.67 supply 8.67 10.12 The correlations of the residuals demand supply demand 1.000 0.956 supply 0.956 1.000 3SLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Instruments: ~income + farmPrice Estimate Std. Error t value Pr(>|t|) (Intercept) 134.9751 11.3086 11.94 1.0e-13 *** price -0.7834 0.1565 -5.01 1.7e-05 *** income 0.4539 0.0598 7.60 8.0e-09 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 3.093 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 162.635 MSE: 9.567 Root MSE: 3.093 Multiple R-Squared: 0.393 Adjusted R-Squared: 0.322 3SLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 78.1824 8.5029 9.19 9.6e-11 *** price -0.1415 0.0807 -1.75 0.089 . farmPrice 0.3322 0.0524 6.34 3.1e-07 *** trend 0.4539 0.0598 7.60 8.0e-09 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 3.557 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 202.39 MSE: 12.649 Root MSE: 3.557 Multiple R-Squared: 0.245 Adjusted R-Squared: 0.104 [1] "** W3SLS with different instr. and restr. via restrict.regMat ****" systemfit results method: 3SLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 34 378 10.5 0.295 -0.071 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 166 9.74 3.12 0.382 0.309 supply 20 16 212 13.26 3.64 0.209 0.060 The covariance matrix of the residuals used for estimation demand supply demand 3.81 4.36 supply 4.36 6.34 The covariance matrix of the residuals demand supply demand 9.75 10.9 supply 10.89 13.3 The correlations of the residuals demand supply demand 1.000 0.958 supply 0.958 1.000 3SLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Instruments: ~income + farmPrice Estimate Std. Error t value Pr(>|t|) (Intercept) 135.6740 12.4146 10.93 1.1e-12 *** price -0.7901 0.1723 -4.59 5.9e-05 *** income 0.4537 0.0655 6.92 5.6e-08 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 3.122 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 165.668 MSE: 9.745 Root MSE: 3.122 Multiple R-Squared: 0.382 Adjusted R-Squared: 0.309 3SLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 80.0613 9.3724 8.54 5.6e-10 *** price -0.1614 0.0902 -1.79 0.082 . farmPrice 0.3335 0.0590 5.65 2.4e-06 *** trend 0.4537 0.0655 6.92 5.6e-08 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 3.642 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 212.177 MSE: 13.261 Root MSE: 3.642 Multiple R-Squared: 0.209 Adjusted R-Squared: 0.06 [1] "****** 3SLS with different instruments and 2 restrictions *********" systemfit results method: 3SLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 35 362 6.33 0.325 0.259 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 149 8.79 2.96 0.443 0.377 supply 20 16 213 13.30 3.65 0.206 0.058 The covariance matrix of the residuals used for estimation demand supply demand 3.79 4.45 supply 4.45 6.06 The covariance matrix of the residuals demand supply demand 8.79 10.5 supply 10.51 13.3 The correlations of the residuals demand supply demand 1.000 0.973 supply 0.973 1.000 3SLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Instruments: ~income + farmPrice Estimate Std. Error t value Pr(>|t|) (Intercept) 135.467 10.955 12.37 2.5e-14 *** price -0.727 0.116 -6.27 3.4e-07 *** income 0.391 0.018 21.77 < 2e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.964 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 149.387 MSE: 8.787 Root MSE: 2.964 Multiple R-Squared: 0.443 Adjusted R-Squared: 0.377 3SLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 92.2897 11.0352 8.36 7.3e-10 *** price -0.2272 0.1160 -1.96 0.058 . farmPrice 0.2817 0.0209 13.47 2.0e-15 *** trend 0.3913 0.0180 21.77 < 2e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 3.647 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 212.786 MSE: 13.299 Root MSE: 3.647 Multiple R-Squared: 0.206 Adjusted R-Squared: 0.058 [1] "** 3SLS with different instruments and 2 restrictions (EViews-like) *" systemfit results method: 3SLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 35 306 3.37 0.43 0.248 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 127 7.5 2.74 0.525 0.469 supply 20 16 178 11.2 3.34 0.334 0.210 The covariance matrix of the residuals used for estimation demand supply demand 3.22 3.67 supply 3.67 4.85 The covariance matrix of the residuals demand supply demand 6.37 7.31 supply 7.31 8.92 The correlations of the residuals demand supply demand 1.00 0.97 supply 0.97 1.00 3SLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Instruments: ~income + farmPrice Estimate Std. Error t value Pr(>|t|) (Intercept) 130.7296 9.6847 13.50 2.0e-15 *** price -0.6671 0.1009 -6.61 1.2e-07 *** income 0.3782 0.0159 23.74 < 2e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.738 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 127.413 MSE: 7.495 Root MSE: 2.738 Multiple R-Squared: 0.525 Adjusted R-Squared: 0.469 3SLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 87.4510 9.7547 8.96 1.4e-10 *** price -0.1671 0.1009 -1.66 0.11 farmPrice 0.2710 0.0183 14.81 < 2e-16 *** trend 0.3782 0.0159 23.74 < 2e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 3.34 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 178.456 MSE: 11.154 Root MSE: 3.34 Multiple R-Squared: 0.334 Adjusted R-Squared: 0.21 [1] "**** W3SLS with different instruments and 2 restrictions *********" systemfit results method: 3SLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 35 467 8.98 0.128 0.113 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 193 11.3 3.37 0.282 0.197 supply 20 16 275 17.2 4.14 -0.025 -0.217 The covariance matrix of the residuals used for estimation demand supply demand 3.75 4.46 supply 4.46 6.04 The covariance matrix of the residuals demand supply demand 11.3 13.6 supply 13.6 17.2 The correlations of the residuals demand supply demand 1.000 0.977 supply 0.977 1.000 3SLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Instruments: ~income + farmPrice Estimate Std. Error t value Pr(>|t|) (Intercept) 143.4678 11.2566 12.75 1.0e-14 *** price -0.8203 0.1194 -6.87 5.6e-08 *** income 0.4047 0.0168 24.13 < 2e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 3.366 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 192.561 MSE: 11.327 Root MSE: 3.366 Multiple R-Squared: 0.282 Adjusted R-Squared: 0.197 3SLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 100.3734 11.3093 8.88 1.7e-10 *** price -0.3203 0.1194 -2.68 0.011 * farmPrice 0.2930 0.0198 14.79 < 2e-16 *** trend 0.4047 0.0168 24.13 < 2e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 4.144 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 274.775 MSE: 17.173 Root MSE: 4.144 Multiple R-Squared: -0.025 Adjusted R-Squared: -0.217 [1] " 3SLS with different instruments with 2 restrictions via R and restrict.regMat" systemfit results method: 3SLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 35 362 6.33 0.325 0.259 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 149 8.79 2.96 0.443 0.377 supply 20 16 213 13.30 3.65 0.206 0.058 The covariance matrix of the residuals used for estimation demand supply demand 3.79 4.45 supply 4.45 6.06 The covariance matrix of the residuals demand supply demand 8.79 10.5 supply 10.51 13.3 The correlations of the residuals demand supply demand 1.000 0.973 supply 0.973 1.000 3SLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Instruments: ~income + farmPrice Estimate Std. Error t value Pr(>|t|) (Intercept) 135.467 10.955 12.37 2.5e-14 *** price -0.727 0.116 -6.27 3.4e-07 *** income 0.391 0.018 21.77 < 2e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.964 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 149.387 MSE: 8.787 Root MSE: 2.964 Multiple R-Squared: 0.443 Adjusted R-Squared: 0.377 3SLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 92.2897 11.0352 8.36 7.3e-10 *** price -0.2272 0.1160 -1.96 0.058 . farmPrice 0.2817 0.0209 13.47 2.0e-15 *** trend 0.3913 0.0180 21.77 < 2e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 3.647 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 212.786 MSE: 13.299 Root MSE: 3.647 Multiple R-Squared: 0.206 Adjusted R-Squared: 0.058 [1] "3SLS with diff. instruments and 2 restr. via R and restrict.regMat (EViews-like)" systemfit results method: 3SLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 35 306 3.37 0.43 0.248 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 127 7.5 2.74 0.525 0.469 supply 20 16 178 11.2 3.34 0.334 0.210 The covariance matrix of the residuals used for estimation demand supply demand 3.22 3.67 supply 3.67 4.85 The covariance matrix of the residuals demand supply demand 6.37 7.31 supply 7.31 8.92 The correlations of the residuals demand supply demand 1.00 0.97 supply 0.97 1.00 3SLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Instruments: ~income + farmPrice Estimate Std. Error t value Pr(>|t|) (Intercept) 130.7296 9.6847 13.50 2.0e-15 *** price -0.6671 0.1009 -6.61 1.2e-07 *** income 0.3782 0.0159 23.74 < 2e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.738 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 127.413 MSE: 7.495 Root MSE: 2.738 Multiple R-Squared: 0.525 Adjusted R-Squared: 0.469 3SLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 87.4510 9.7547 8.96 1.4e-10 *** price -0.1671 0.1009 -1.66 0.11 farmPrice 0.2710 0.0183 14.81 < 2e-16 *** trend 0.3782 0.0159 23.74 < 2e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 3.34 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 178.456 MSE: 11.154 Root MSE: 3.34 Multiple R-Squared: 0.334 Adjusted R-Squared: 0.21 [1] "W3SLS with diff. instr. and 2 restr. via R and restrict.regMat (EViews-like)" systemfit results method: 3SLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 35 365 4.27 0.319 0.127 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 153 8.97 3.00 0.431 0.364 supply 20 16 213 13.29 3.65 0.207 0.058 The covariance matrix of the residuals used for estimation demand supply demand 3.19 3.68 supply 3.68 4.83 The covariance matrix of the residuals demand supply demand 7.63 8.77 supply 8.77 10.64 The correlations of the residuals demand supply demand 1.000 0.973 supply 0.973 1.000 3SLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Instruments: ~income + farmPrice Estimate Std. Error t value Pr(>|t|) (Intercept) 136.2729 9.8523 13.83 8.9e-16 *** price -0.7306 0.1027 -7.11 2.7e-08 *** income 0.3865 0.0149 25.95 < 2e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.996 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 152.579 MSE: 8.975 Root MSE: 2.996 Multiple R-Squared: 0.431 Adjusted R-Squared: 0.364 3SLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 93.0701 9.9030 9.40 4.2e-11 *** price -0.2306 0.1027 -2.24 0.031 * farmPrice 0.2777 0.0174 15.99 < 2e-16 *** trend 0.3865 0.0149 25.95 < 2e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 3.646 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 212.723 MSE: 13.295 Root MSE: 3.646 Multiple R-Squared: 0.207 Adjusted R-Squared: 0.058 [1] "***************************************************" [1] "3SLS formula: Schmidt" [1] "************* 3SLS with different instruments **************" systemfit results method: 3SLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 33 164 9.25 0.694 0.512 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 67.4 3.97 1.99 0.748 0.719 supply 20 16 96.6 6.04 2.46 0.640 0.572 The covariance matrix of the residuals used for estimation demand supply demand 3.97 3.84 supply 3.84 6.04 The covariance matrix of the residuals demand supply demand 3.97 3.84 supply 3.84 6.04 The correlations of the residuals demand supply demand 1.000 0.784 supply 0.784 1.000 3SLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Instruments: ~income + farmPrice Estimate Std. Error t value Pr(>|t|) (Intercept) 106.7894 11.1435 9.58 2.9e-08 *** price -0.4116 0.1448 -2.84 0.011 * income 0.3617 0.0564 6.41 6.4e-06 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.992 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 67.447 MSE: 3.967 Root MSE: 1.992 Multiple R-Squared: 0.748 Adjusted R-Squared: 0.719 3SLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 49.5324 12.0105 4.12 0.0008 *** price 0.2401 0.0999 2.40 0.0288 * farmPrice 0.2556 0.0473 5.41 5.8e-05 *** trend 0.2529 0.0997 2.54 0.0219 * --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.458 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 96.633 MSE: 6.04 Root MSE: 2.458 Multiple R-Squared: 0.64 Adjusted R-Squared: 0.572 [1] "******* 3SLS with different instruments (EViews-like) **********" systemfit results method: 3SLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 33 164 6.29 0.694 0.5 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 67.4 3.97 1.99 0.748 0.719 supply 20 16 96.6 6.04 2.46 0.640 0.572 The covariance matrix of the residuals used for estimation demand supply demand 3.37 3.16 supply 3.16 4.83 The covariance matrix of the residuals demand supply demand 3.37 3.16 supply 3.16 4.83 The correlations of the residuals demand supply demand 1.000 0.784 supply 0.784 1.000 3SLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Instruments: ~income + farmPrice Estimate Std. Error t value Pr(>|t|) (Intercept) 106.789 10.274 10.39 6.1e-12 *** price -0.412 0.134 -3.08 0.0041 ** income 0.362 0.052 6.95 6.0e-08 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.992 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 67.447 MSE: 3.967 Root MSE: 1.992 Multiple R-Squared: 0.748 Adjusted R-Squared: 0.719 3SLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 49.5324 10.7425 4.61 5.8e-05 *** price 0.2401 0.0894 2.69 0.0112 * farmPrice 0.2556 0.0423 6.05 8.4e-07 *** trend 0.2529 0.0891 2.84 0.0077 ** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.458 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 96.633 MSE: 6.04 Root MSE: 2.458 Multiple R-Squared: 0.64 Adjusted R-Squared: 0.572 [1] "**** 3SLS with different instruments and methodResidCov = Theil ***" systemfit results method: 3SLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 33 164 8.24 0.694 0.481 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 67.4 3.97 1.99 0.748 0.719 supply 20 16 96.6 6.04 2.46 0.640 0.572 The covariance matrix of the residuals used for estimation demand supply demand 3.97 3.96 supply 3.96 6.04 The covariance matrix of the residuals demand supply demand 3.97 3.96 supply 3.96 6.04 The correlations of the residuals demand supply demand 1.000 0.784 supply 0.784 1.000 3SLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Instruments: ~income + farmPrice Estimate Std. Error t value Pr(>|t|) (Intercept) 106.7894 11.1435 9.58 4.7e-11 *** price -0.4116 0.1448 -2.84 0.0076 ** income 0.3617 0.0564 6.41 2.9e-07 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.992 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 67.447 MSE: 3.967 Root MSE: 1.992 Multiple R-Squared: 0.748 Adjusted R-Squared: 0.719 3SLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 49.5324 12.0105 4.12 0.00024 *** price 0.2401 0.0999 2.40 0.02208 * farmPrice 0.2556 0.0473 5.41 5.5e-06 *** trend 0.2529 0.0997 2.54 0.01605 * --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.458 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 96.633 MSE: 6.04 Root MSE: 2.458 Multiple R-Squared: 0.64 Adjusted R-Squared: 0.572 [1] "************* W3SLS with different instruments **************" systemfit results method: 3SLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 33 164 9.25 0.694 0.512 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 67.4 3.97 1.99 0.748 0.719 supply 20 16 96.6 6.04 2.46 0.640 0.572 The covariance matrix of the residuals used for estimation demand supply demand 3.97 3.84 supply 3.84 6.04 The covariance matrix of the residuals demand supply demand 3.97 3.84 supply 3.84 6.04 The correlations of the residuals demand supply demand 1.000 0.784 supply 0.784 1.000 3SLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Instruments: ~income + farmPrice Estimate Std. Error t value Pr(>|t|) (Intercept) 106.7894 11.1435 9.58 2.9e-08 *** price -0.4116 0.1448 -2.84 0.011 * income 0.3617 0.0564 6.41 6.4e-06 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.992 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 67.447 MSE: 3.967 Root MSE: 1.992 Multiple R-Squared: 0.748 Adjusted R-Squared: 0.719 3SLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 49.5324 12.0105 4.12 0.0008 *** price 0.2401 0.0999 2.40 0.0288 * farmPrice 0.2556 0.0473 5.41 5.8e-05 *** trend 0.2529 0.0997 2.54 0.0219 * --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.458 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 96.633 MSE: 6.04 Root MSE: 2.458 Multiple R-Squared: 0.64 Adjusted R-Squared: 0.572 [1] "******* 3SLS with different instruments and restriction ********" systemfit results method: 3SLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 34 175 2.68 0.673 0.665 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 65 3.82 1.96 0.758 0.729 supply 20 16 110 6.90 2.63 0.588 0.511 The covariance matrix of the residuals used for estimation demand supply demand 3.79 4.35 supply 4.35 6.27 The covariance matrix of the residuals demand supply demand 3.82 4.87 supply 4.87 6.90 The correlations of the residuals demand supply demand 1.000 0.948 supply 0.948 1.000 3SLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Instruments: ~income + farmPrice Estimate Std. Error t value Pr(>|t|) (Intercept) 95.0869 9.9882 9.52 4.0e-11 *** price -0.2583 0.1296 -1.99 0.054 . income 0.3244 0.0534 6.08 6.8e-07 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.955 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 64.961 MSE: 3.821 Root MSE: 1.955 Multiple R-Squared: 0.758 Adjusted R-Squared: 0.729 3SLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 45.4891 12.9647 3.51 0.0013 ** price 0.2929 0.1164 2.52 0.0167 * farmPrice 0.2350 0.0490 4.80 3.1e-05 *** trend 0.3244 0.0534 6.08 6.8e-07 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.627 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 110.382 MSE: 6.899 Root MSE: 2.627 Multiple R-Squared: 0.588 Adjusted R-Squared: 0.511 [1] "** 3SLS with different instruments and restriction (EViews-like) *" systemfit results method: 3SLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 34 175 1.75 0.673 0.636 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 65.2 3.83 1.96 0.757 0.728 supply 20 16 110.0 6.88 2.62 0.590 0.513 The covariance matrix of the residuals used for estimation demand supply demand 3.22 3.58 supply 3.58 5.02 The covariance matrix of the residuals demand supply demand 3.26 4.02 supply 4.02 5.50 The correlations of the residuals demand supply demand 1.00 0.95 supply 0.95 1.00 3SLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Instruments: ~income + farmPrice Estimate Std. Error t value Pr(>|t|) (Intercept) 94.845 9.149 10.37 4.6e-12 *** price -0.254 0.119 -2.14 0.039 * income 0.323 0.049 6.58 1.5e-07 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.958 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 65.171 MSE: 3.834 Root MSE: 1.958 Multiple R-Squared: 0.757 Adjusted R-Squared: 0.728 3SLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 45.7348 11.5558 3.96 0.00037 *** price 0.2913 0.1036 2.81 0.00814 ** farmPrice 0.2343 0.0438 5.35 6.0e-06 *** trend 0.3226 0.0490 6.58 1.5e-07 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.622 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 110.035 MSE: 6.877 Root MSE: 2.622 Multiple R-Squared: 0.59 Adjusted R-Squared: 0.513 [1] "** W3SLS with different instruments and restriction (EViews-like) *" systemfit results method: 3SLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 34 175 1.76 0.674 0.635 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 65.1 3.83 1.96 0.757 0.729 supply 20 16 109.9 6.87 2.62 0.590 0.513 The covariance matrix of the residuals used for estimation demand supply demand 3.24 3.60 supply 3.60 5.06 The covariance matrix of the residuals demand supply demand 3.25 4.02 supply 4.02 5.50 The correlations of the residuals demand supply demand 1.000 0.949 supply 0.949 1.000 3SLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Instruments: ~income + farmPrice Estimate Std. Error t value Pr(>|t|) (Intercept) 94.9533 9.1511 10.38 4.5e-12 *** price -0.2555 0.1186 -2.15 0.038 * income 0.3229 0.0491 6.58 1.5e-07 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.957 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 65.09 MSE: 3.829 Root MSE: 1.957 Multiple R-Squared: 0.757 Adjusted R-Squared: 0.729 3SLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 45.7433 11.6043 3.94 0.00038 *** price 0.2908 0.1039 2.80 0.00839 ** farmPrice 0.2347 0.0440 5.34 6.2e-06 *** trend 0.3229 0.0491 6.58 1.5e-07 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.621 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 109.922 MSE: 6.87 Root MSE: 2.621 Multiple R-Squared: 0.59 Adjusted R-Squared: 0.513 [1] "** 3SLS with different instruments and restriction via restrict.regMat *******" systemfit results method: 3SLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 34 175 2.68 0.673 0.665 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 65 3.82 1.96 0.758 0.729 supply 20 16 110 6.90 2.63 0.588 0.511 The covariance matrix of the residuals used for estimation demand supply demand 3.79 4.35 supply 4.35 6.27 The covariance matrix of the residuals demand supply demand 3.82 4.87 supply 4.87 6.90 The correlations of the residuals demand supply demand 1.000 0.948 supply 0.948 1.000 3SLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Instruments: ~income + farmPrice Estimate Std. Error t value Pr(>|t|) (Intercept) 95.0869 9.9882 9.52 4.0e-11 *** price -0.2583 0.1296 -1.99 0.054 . income 0.3244 0.0534 6.08 6.8e-07 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.955 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 64.961 MSE: 3.821 Root MSE: 1.955 Multiple R-Squared: 0.758 Adjusted R-Squared: 0.729 3SLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 45.4891 12.9647 3.51 0.0013 ** price 0.2929 0.1164 2.52 0.0167 * farmPrice 0.2350 0.0490 4.80 3.1e-05 *** trend 0.3244 0.0534 6.08 6.8e-07 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.627 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 110.382 MSE: 6.899 Root MSE: 2.627 Multiple R-Squared: 0.588 Adjusted R-Squared: 0.511 [1] "3SLS with different instruments with restriction via restrict.regMat (EViews-like)" systemfit results method: 3SLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 34 175 1.75 0.673 0.636 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 65.2 3.83 1.96 0.757 0.728 supply 20 16 110.0 6.88 2.62 0.590 0.513 The covariance matrix of the residuals used for estimation demand supply demand 3.22 3.58 supply 3.58 5.02 The covariance matrix of the residuals demand supply demand 3.26 4.02 supply 4.02 5.50 The correlations of the residuals demand supply demand 1.00 0.95 supply 0.95 1.00 3SLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Instruments: ~income + farmPrice Estimate Std. Error t value Pr(>|t|) (Intercept) 94.845 9.149 10.37 4.6e-12 *** price -0.254 0.119 -2.14 0.039 * income 0.323 0.049 6.58 1.5e-07 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.958 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 65.171 MSE: 3.834 Root MSE: 1.958 Multiple R-Squared: 0.757 Adjusted R-Squared: 0.728 3SLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 45.7348 11.5558 3.96 0.00037 *** price 0.2913 0.1036 2.81 0.00814 ** farmPrice 0.2343 0.0438 5.35 6.0e-06 *** trend 0.3226 0.0490 6.58 1.5e-07 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.622 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 110.035 MSE: 6.877 Root MSE: 2.622 Multiple R-Squared: 0.59 Adjusted R-Squared: 0.513 [1] "** W3SLS with different instr. and restr. via restrict.regMat ****" systemfit results method: 3SLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 34 175 2.7 0.673 0.664 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 64.9 3.82 1.95 0.758 0.730 supply 20 16 110.2 6.89 2.62 0.589 0.512 The covariance matrix of the residuals used for estimation demand supply demand 3.81 4.36 supply 4.36 6.34 The covariance matrix of the residuals demand supply demand 3.82 4.86 supply 4.86 6.89 The correlations of the residuals demand supply demand 1.000 0.947 supply 0.947 1.000 3SLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Instruments: ~income + farmPrice Estimate Std. Error t value Pr(>|t|) (Intercept) 95.2108 9.9899 9.53 3.9e-11 *** price -0.2599 0.1296 -2.00 0.053 . income 0.3248 0.0535 6.08 6.9e-07 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.954 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 64.876 MSE: 3.816 Root MSE: 1.954 Multiple R-Squared: 0.758 Adjusted R-Squared: 0.73 3SLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 45.5042 13.0242 3.49 0.0013 ** price 0.2923 0.1167 2.50 0.0172 * farmPrice 0.2354 0.0492 4.78 3.3e-05 *** trend 0.3248 0.0535 6.08 6.9e-07 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.625 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 110.241 MSE: 6.89 Root MSE: 2.625 Multiple R-Squared: 0.589 Adjusted R-Squared: 0.512 [1] "****** 3SLS with different instruments and 2 restrictions *********" systemfit results method: 3SLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 35 178 1.92 0.667 0.696 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 67.5 3.97 1.99 0.748 0.719 supply 20 16 110.9 6.93 2.63 0.586 0.509 The covariance matrix of the residuals used for estimation demand supply demand 3.79 4.45 supply 4.45 6.06 The covariance matrix of the residuals demand supply demand 3.97 5.06 supply 5.06 6.93 The correlations of the residuals demand supply demand 1.000 0.964 supply 0.964 1.000 3SLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Instruments: ~income + farmPrice Estimate Std. Error t value Pr(>|t|) (Intercept) 93.3937 10.2477 9.11 9.1e-11 *** price -0.2208 0.1165 -1.90 0.066 . income 0.3033 0.0257 11.78 9.9e-14 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.993 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 67.513 MSE: 3.971 Root MSE: 1.993 Multiple R-Squared: 0.748 Adjusted R-Squared: 0.719 3SLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 49.0104 10.4895 4.67 4.3e-05 *** price 0.2792 0.1165 2.40 0.022 * farmPrice 0.2150 0.0247 8.70 2.8e-10 *** trend 0.3033 0.0257 11.78 9.9e-14 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.633 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 110.934 MSE: 6.933 Root MSE: 2.633 Multiple R-Squared: 0.586 Adjusted R-Squared: 0.509 [1] "** 3SLS with different instruments and 2 restrictions (EViews-like) *" systemfit results method: 3SLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 35 178 1.3 0.668 0.659 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 67.6 3.98 1.99 0.748 0.718 supply 20 16 110.7 6.92 2.63 0.587 0.510 The covariance matrix of the residuals used for estimation demand supply demand 3.22 3.67 supply 3.67 4.85 The covariance matrix of the residuals demand supply demand 3.38 4.17 supply 4.17 5.53 The correlations of the residuals demand supply demand 1.000 0.965 supply 0.965 1.000 3SLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Instruments: ~income + farmPrice Estimate Std. Error t value Pr(>|t|) (Intercept) 93.210 9.365 9.95 9.6e-12 *** price -0.219 0.105 -2.09 0.044 * income 0.304 0.023 13.19 3.8e-15 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.994 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 67.616 MSE: 3.977 Root MSE: 1.994 Multiple R-Squared: 0.748 Adjusted R-Squared: 0.718 3SLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 48.6930 9.6005 5.07 1.3e-05 *** price 0.2806 0.1052 2.67 0.011 * farmPrice 0.2168 0.0216 10.02 8.1e-12 *** trend 0.3038 0.0230 13.19 3.8e-15 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.63 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 110.672 MSE: 6.917 Root MSE: 2.63 Multiple R-Squared: 0.587 Adjusted R-Squared: 0.51 [1] "**** W3SLS with different instruments and 2 restrictions *********" systemfit results method: 3SLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 35 179 1.92 0.666 0.698 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 67.7 3.98 2.00 0.747 0.718 supply 20 16 111.6 6.98 2.64 0.584 0.506 The covariance matrix of the residuals used for estimation demand supply demand 3.75 4.46 supply 4.46 6.04 The covariance matrix of the residuals demand supply demand 3.98 5.09 supply 5.09 6.98 The correlations of the residuals demand supply demand 1.000 0.965 supply 0.965 1.000 3SLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Instruments: ~income + farmPrice Estimate Std. Error t value Pr(>|t|) (Intercept) 93.180 10.378 8.98 1.3e-10 *** price -0.218 0.118 -1.85 0.073 . income 0.303 0.025 12.11 4.5e-14 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.996 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 67.719 MSE: 3.983 Root MSE: 1.996 Multiple R-Squared: 0.747 Adjusted R-Squared: 0.718 3SLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 48.8549 10.5929 4.61 5.1e-05 *** price 0.2817 0.1182 2.38 0.023 * farmPrice 0.2141 0.0239 8.94 1.5e-10 *** trend 0.3030 0.0250 12.11 4.5e-14 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.641 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 111.614 MSE: 6.976 Root MSE: 2.641 Multiple R-Squared: 0.584 Adjusted R-Squared: 0.506 [1] " 3SLS with different instruments with 2 restrictions via R and restrict.regMat" systemfit results method: 3SLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 35 178 1.92 0.667 0.696 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 67.5 3.97 1.99 0.748 0.719 supply 20 16 110.9 6.93 2.63 0.586 0.509 The covariance matrix of the residuals used for estimation demand supply demand 3.79 4.45 supply 4.45 6.06 The covariance matrix of the residuals demand supply demand 3.97 5.06 supply 5.06 6.93 The correlations of the residuals demand supply demand 1.000 0.964 supply 0.964 1.000 3SLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Instruments: ~income + farmPrice Estimate Std. Error t value Pr(>|t|) (Intercept) 93.3937 10.2477 9.11 9.1e-11 *** price -0.2208 0.1165 -1.90 0.066 . income 0.3033 0.0257 11.78 9.9e-14 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.993 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 67.513 MSE: 3.971 Root MSE: 1.993 Multiple R-Squared: 0.748 Adjusted R-Squared: 0.719 3SLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 49.0104 10.4895 4.67 4.3e-05 *** price 0.2792 0.1165 2.40 0.022 * farmPrice 0.2150 0.0247 8.70 2.8e-10 *** trend 0.3033 0.0257 11.78 9.9e-14 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.633 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 110.934 MSE: 6.933 Root MSE: 2.633 Multiple R-Squared: 0.586 Adjusted R-Squared: 0.509 [1] "3SLS with diff. instruments and 2 restr. via R and restrict.regMat (EViews-like)" systemfit results method: 3SLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 35 178 1.3 0.668 0.659 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 67.6 3.98 1.99 0.748 0.718 supply 20 16 110.7 6.92 2.63 0.587 0.510 The covariance matrix of the residuals used for estimation demand supply demand 3.22 3.67 supply 3.67 4.85 The covariance matrix of the residuals demand supply demand 3.38 4.17 supply 4.17 5.53 The correlations of the residuals demand supply demand 1.000 0.965 supply 0.965 1.000 3SLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Instruments: ~income + farmPrice Estimate Std. Error t value Pr(>|t|) (Intercept) 93.210 9.365 9.95 9.6e-12 *** price -0.219 0.105 -2.09 0.044 * income 0.304 0.023 13.19 3.8e-15 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.994 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 67.616 MSE: 3.977 Root MSE: 1.994 Multiple R-Squared: 0.748 Adjusted R-Squared: 0.718 3SLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 48.6930 9.6005 5.07 1.3e-05 *** price 0.2806 0.1052 2.67 0.011 * farmPrice 0.2168 0.0216 10.02 8.1e-12 *** trend 0.3038 0.0230 13.19 3.8e-15 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.63 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 110.672 MSE: 6.917 Root MSE: 2.63 Multiple R-Squared: 0.587 Adjusted R-Squared: 0.51 [1] "W3SLS with diff. instr. and 2 restr. via R and restrict.regMat (EViews-like)" systemfit results method: 3SLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 35 179 1.3 0.666 0.661 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 67.8 3.99 2.00 0.747 0.717 supply 20 16 111.2 6.95 2.64 0.585 0.507 The covariance matrix of the residuals used for estimation demand supply demand 3.19 3.68 supply 3.68 4.83 The covariance matrix of the residuals demand supply demand 3.39 4.19 supply 4.19 5.56 The correlations of the residuals demand supply demand 1.000 0.965 supply 0.965 1.000 3SLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Instruments: ~income + farmPrice Estimate Std. Error t value Pr(>|t|) (Intercept) 93.0165 9.4718 9.82 1.4e-11 *** price -0.2172 0.1066 -2.04 0.049 * income 0.3036 0.0224 13.56 1.8e-15 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.997 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 67.8 MSE: 3.988 Root MSE: 1.997 Multiple R-Squared: 0.747 Adjusted R-Squared: 0.717 3SLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 48.5496 9.6886 5.01 1.6e-05 *** price 0.2828 0.1066 2.65 0.012 * farmPrice 0.2161 0.0210 10.30 3.9e-12 *** trend 0.3036 0.0224 13.56 1.8e-15 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.637 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 111.249 MSE: 6.953 Root MSE: 2.637 Multiple R-Squared: 0.585 Adjusted R-Squared: 0.507 [1] "***************************************************" [1] "3SLS formula: GMM" [1] "************* 3SLS with different instruments **************" systemfit results method: 3SLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 33 164 9.25 0.694 0.512 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 67.4 3.97 1.99 0.748 0.719 supply 20 16 96.6 6.04 2.46 0.640 0.572 The covariance matrix of the residuals used for estimation demand supply demand 3.97 3.84 supply 3.84 6.04 The covariance matrix of the residuals demand supply demand 3.97 3.84 supply 3.84 6.04 The correlations of the residuals demand supply demand 1.000 0.784 supply 0.784 1.000 3SLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Instruments: ~income + farmPrice Estimate Std. Error t value Pr(>|t|) (Intercept) 106.7894 11.1435 9.58 2.9e-08 *** price -0.4116 0.1448 -2.84 0.011 * income 0.3617 0.0564 6.41 6.4e-06 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.992 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 67.447 MSE: 3.967 Root MSE: 1.992 Multiple R-Squared: 0.748 Adjusted R-Squared: 0.719 3SLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 49.5324 12.0105 4.12 0.0008 *** price 0.2401 0.0999 2.40 0.0288 * farmPrice 0.2556 0.0473 5.41 5.8e-05 *** trend 0.2529 0.0997 2.54 0.0219 * --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.458 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 96.633 MSE: 6.04 Root MSE: 2.458 Multiple R-Squared: 0.64 Adjusted R-Squared: 0.572 [1] "******* 3SLS with different instruments (EViews-like) **********" systemfit results method: 3SLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 33 164 6.29 0.694 0.5 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 67.4 3.97 1.99 0.748 0.719 supply 20 16 96.6 6.04 2.46 0.640 0.572 The covariance matrix of the residuals used for estimation demand supply demand 3.37 3.16 supply 3.16 4.83 The covariance matrix of the residuals demand supply demand 3.37 3.16 supply 3.16 4.83 The correlations of the residuals demand supply demand 1.000 0.784 supply 0.784 1.000 3SLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Instruments: ~income + farmPrice Estimate Std. Error t value Pr(>|t|) (Intercept) 106.789 10.274 10.39 6.1e-12 *** price -0.412 0.134 -3.08 0.0041 ** income 0.362 0.052 6.95 6.0e-08 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.992 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 67.447 MSE: 3.967 Root MSE: 1.992 Multiple R-Squared: 0.748 Adjusted R-Squared: 0.719 3SLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 49.5324 10.7425 4.61 5.8e-05 *** price 0.2401 0.0894 2.69 0.0112 * farmPrice 0.2556 0.0423 6.05 8.4e-07 *** trend 0.2529 0.0891 2.84 0.0077 ** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.458 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 96.633 MSE: 6.04 Root MSE: 2.458 Multiple R-Squared: 0.64 Adjusted R-Squared: 0.572 [1] "**** 3SLS with different instruments and methodResidCov = Theil ***" systemfit results method: 3SLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 33 164 8.24 0.694 0.481 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 67.4 3.97 1.99 0.748 0.719 supply 20 16 96.6 6.04 2.46 0.640 0.572 The covariance matrix of the residuals used for estimation demand supply demand 3.97 3.96 supply 3.96 6.04 The covariance matrix of the residuals demand supply demand 3.97 3.96 supply 3.96 6.04 The correlations of the residuals demand supply demand 1.000 0.784 supply 0.784 1.000 3SLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Instruments: ~income + farmPrice Estimate Std. Error t value Pr(>|t|) (Intercept) 106.7894 11.1435 9.58 4.7e-11 *** price -0.4116 0.1448 -2.84 0.0076 ** income 0.3617 0.0564 6.41 2.9e-07 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.992 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 67.447 MSE: 3.967 Root MSE: 1.992 Multiple R-Squared: 0.748 Adjusted R-Squared: 0.719 3SLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 49.5324 12.0105 4.12 0.00024 *** price 0.2401 0.0999 2.40 0.02208 * farmPrice 0.2556 0.0473 5.41 5.5e-06 *** trend 0.2529 0.0997 2.54 0.01605 * --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.458 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 96.633 MSE: 6.04 Root MSE: 2.458 Multiple R-Squared: 0.64 Adjusted R-Squared: 0.572 [1] "************* W3SLS with different instruments **************" systemfit results method: 3SLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 33 164 9.25 0.694 0.512 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 67.4 3.97 1.99 0.748 0.719 supply 20 16 96.6 6.04 2.46 0.640 0.572 The covariance matrix of the residuals used for estimation demand supply demand 3.97 3.84 supply 3.84 6.04 The covariance matrix of the residuals demand supply demand 3.97 3.84 supply 3.84 6.04 The correlations of the residuals demand supply demand 1.000 0.784 supply 0.784 1.000 3SLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Instruments: ~income + farmPrice Estimate Std. Error t value Pr(>|t|) (Intercept) 106.7894 11.1435 9.58 2.9e-08 *** price -0.4116 0.1448 -2.84 0.011 * income 0.3617 0.0564 6.41 6.4e-06 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.992 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 67.447 MSE: 3.967 Root MSE: 1.992 Multiple R-Squared: 0.748 Adjusted R-Squared: 0.719 3SLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 49.5324 12.0105 4.12 0.0008 *** price 0.2401 0.0999 2.40 0.0288 * farmPrice 0.2556 0.0473 5.41 5.8e-05 *** trend 0.2529 0.0997 2.54 0.0219 * --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.458 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 96.633 MSE: 6.04 Root MSE: 2.458 Multiple R-Squared: 0.64 Adjusted R-Squared: 0.572 [1] "******* 3SLS with different instruments and restriction ********" systemfit results method: 3SLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 34 166 2.78 0.691 0.636 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 63.4 3.73 1.93 0.764 0.736 supply 20 16 102.2 6.39 2.53 0.619 0.547 The covariance matrix of the residuals used for estimation demand supply demand 3.79 4.35 supply 4.35 6.27 The covariance matrix of the residuals demand supply demand 3.73 4.59 supply 4.59 6.39 The correlations of the residuals demand supply demand 1.00 0.94 supply 0.94 1.00 3SLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Instruments: ~income + farmPrice Estimate Std. Error t value Pr(>|t|) (Intercept) 100.1363 8.6083 11.63 2.1e-13 *** price -0.3244 0.1114 -2.91 0.0063 ** income 0.3405 0.0509 6.69 1.1e-07 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.931 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 63.395 MSE: 3.729 Root MSE: 1.931 Multiple R-Squared: 0.764 Adjusted R-Squared: 0.736 3SLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 49.7623 12.2354 4.07 0.00027 *** price 0.2366 0.1018 2.33 0.02617 * farmPrice 0.2473 0.0474 5.22 9.0e-06 *** trend 0.3405 0.0509 6.69 1.1e-07 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.527 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 102.181 MSE: 6.386 Root MSE: 2.527 Multiple R-Squared: 0.619 Adjusted R-Squared: 0.547 [1] "** 3SLS with different instruments and restriction (EViews-like) *" systemfit results method: 3SLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 34 165 1.84 0.691 0.608 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 63.4 3.73 1.93 0.764 0.736 supply 20 16 102.1 6.38 2.53 0.619 0.548 The covariance matrix of the residuals used for estimation demand supply demand 3.22 3.58 supply 3.58 5.02 The covariance matrix of the residuals demand supply demand 3.17 3.79 supply 3.79 5.10 The correlations of the residuals demand supply demand 1.000 0.941 supply 0.941 1.000 3SLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Instruments: ~income + farmPrice Estimate Std. Error t value Pr(>|t|) (Intercept) 99.9363 7.9106 12.63 2.1e-14 *** price -0.3212 0.1019 -3.15 0.0034 ** income 0.3393 0.0466 7.28 2.0e-08 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.931 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 63.37 MSE: 3.728 Root MSE: 1.931 Multiple R-Squared: 0.764 Adjusted R-Squared: 0.736 3SLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 49.8516 10.9418 4.56 6.4e-05 *** price 0.2364 0.0910 2.60 0.014 * farmPrice 0.2467 0.0423 5.83 1.4e-06 *** trend 0.3393 0.0466 7.28 2.0e-08 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.526 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 102.07 MSE: 6.379 Root MSE: 2.526 Multiple R-Squared: 0.619 Adjusted R-Squared: 0.548 [1] "** W3SLS with different instruments and restriction (EViews-like) *" systemfit results method: 3SLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 34 165 1.85 0.691 0.608 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 63.4 3.73 1.93 0.764 0.736 supply 20 16 102.1 6.38 2.53 0.619 0.548 The covariance matrix of the residuals used for estimation demand supply demand 3.24 3.60 supply 3.60 5.06 The covariance matrix of the residuals demand supply demand 3.17 3.78 supply 3.78 5.10 The correlations of the residuals demand supply demand 1.000 0.941 supply 0.941 1.000 3SLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Instruments: ~income + farmPrice Estimate Std. Error t value Pr(>|t|) (Intercept) 99.9706 7.9399 12.59 2.4e-14 *** price -0.3217 0.1023 -3.15 0.0034 ** income 0.3394 0.0467 7.26 2.1e-08 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.931 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 63.372 MSE: 3.728 Root MSE: 1.931 Multiple R-Squared: 0.764 Adjusted R-Squared: 0.736 3SLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 49.8336 10.9955 4.53 6.9e-05 *** price 0.2364 0.0915 2.59 0.014 * farmPrice 0.2469 0.0425 5.80 1.6e-06 *** trend 0.3394 0.0467 7.26 2.1e-08 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.526 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 102.073 MSE: 6.38 Root MSE: 2.526 Multiple R-Squared: 0.619 Adjusted R-Squared: 0.548 [1] "** 3SLS with different instruments and restriction via restrict.regMat *******" systemfit results method: 3SLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 34 166 2.78 0.691 0.636 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 63.4 3.73 1.93 0.764 0.736 supply 20 16 102.2 6.39 2.53 0.619 0.547 The covariance matrix of the residuals used for estimation demand supply demand 3.79 4.35 supply 4.35 6.27 The covariance matrix of the residuals demand supply demand 3.73 4.59 supply 4.59 6.39 The correlations of the residuals demand supply demand 1.00 0.94 supply 0.94 1.00 3SLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Instruments: ~income + farmPrice Estimate Std. Error t value Pr(>|t|) (Intercept) 100.1363 8.6083 11.63 2.1e-13 *** price -0.3244 0.1114 -2.91 0.0063 ** income 0.3405 0.0509 6.69 1.1e-07 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.931 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 63.395 MSE: 3.729 Root MSE: 1.931 Multiple R-Squared: 0.764 Adjusted R-Squared: 0.736 3SLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 49.7623 12.2354 4.07 0.00027 *** price 0.2366 0.1018 2.33 0.02617 * farmPrice 0.2473 0.0474 5.22 9.0e-06 *** trend 0.3405 0.0509 6.69 1.1e-07 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.527 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 102.181 MSE: 6.386 Root MSE: 2.527 Multiple R-Squared: 0.619 Adjusted R-Squared: 0.547 [1] "3SLS with different instruments with restriction via restrict.regMat (EViews-like)" systemfit results method: 3SLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 34 165 1.84 0.691 0.608 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 63.4 3.73 1.93 0.764 0.736 supply 20 16 102.1 6.38 2.53 0.619 0.548 The covariance matrix of the residuals used for estimation demand supply demand 3.22 3.58 supply 3.58 5.02 The covariance matrix of the residuals demand supply demand 3.17 3.79 supply 3.79 5.10 The correlations of the residuals demand supply demand 1.000 0.941 supply 0.941 1.000 3SLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Instruments: ~income + farmPrice Estimate Std. Error t value Pr(>|t|) (Intercept) 99.9363 7.9106 12.63 2.1e-14 *** price -0.3212 0.1019 -3.15 0.0034 ** income 0.3393 0.0466 7.28 2.0e-08 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.931 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 63.37 MSE: 3.728 Root MSE: 1.931 Multiple R-Squared: 0.764 Adjusted R-Squared: 0.736 3SLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 49.8516 10.9418 4.56 6.4e-05 *** price 0.2364 0.0910 2.60 0.014 * farmPrice 0.2467 0.0423 5.83 1.4e-06 *** trend 0.3393 0.0466 7.28 2.0e-08 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.526 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 102.07 MSE: 6.379 Root MSE: 2.526 Multiple R-Squared: 0.619 Adjusted R-Squared: 0.548 [1] "** W3SLS with different instr. and restr. via restrict.regMat ****" systemfit results method: 3SLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 34 166 2.79 0.691 0.635 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 63.4 3.73 1.93 0.764 0.736 supply 20 16 102.2 6.39 2.53 0.619 0.547 The covariance matrix of the residuals used for estimation demand supply demand 3.81 4.36 supply 4.36 6.34 The covariance matrix of the residuals demand supply demand 3.73 4.59 supply 4.59 6.39 The correlations of the residuals demand supply demand 1.00 0.94 supply 0.94 1.00 3SLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Instruments: ~income + farmPrice Estimate Std. Error t value Pr(>|t|) (Intercept) 100.174 8.646 11.59 2.4e-13 *** price -0.325 0.112 -2.91 0.0064 ** income 0.341 0.051 6.67 1.2e-07 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.931 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 63.398 MSE: 3.729 Root MSE: 1.931 Multiple R-Squared: 0.764 Adjusted R-Squared: 0.736 3SLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 49.7425 12.3029 4.04 0.00029 *** price 0.2367 0.1023 2.31 0.02691 * farmPrice 0.2474 0.0477 5.19 9.8e-06 *** trend 0.3406 0.0510 6.67 1.2e-07 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.527 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 102.183 MSE: 6.386 Root MSE: 2.527 Multiple R-Squared: 0.619 Adjusted R-Squared: 0.547 [1] "****** 3SLS with different instruments and 2 restrictions *********" systemfit results method: 3SLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 35 165 1.89 0.692 0.677 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 64.1 3.77 1.94 0.761 0.733 supply 20 16 101.2 6.32 2.52 0.623 0.552 The covariance matrix of the residuals used for estimation demand supply demand 3.79 4.45 supply 4.45 6.06 The covariance matrix of the residuals demand supply demand 3.77 4.68 supply 4.68 6.32 The correlations of the residuals demand supply demand 1.00 0.96 supply 0.96 1.00 3SLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Instruments: ~income + farmPrice Estimate Std. Error t value Pr(>|t|) (Intercept) 98.8949 8.2696 11.96 6.4e-14 *** price -0.2870 0.0909 -3.16 0.0033 ** income 0.3148 0.0224 14.04 4.4e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.941 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 64.072 MSE: 3.769 Root MSE: 1.941 Multiple R-Squared: 0.761 Adjusted R-Squared: 0.733 3SLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 54.6693 8.4422 6.48 1.8e-07 *** price 0.2130 0.0909 2.34 0.025 * farmPrice 0.2237 0.0228 9.82 1.3e-11 *** trend 0.3148 0.0224 14.04 4.4e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.515 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 101.181 MSE: 6.324 Root MSE: 2.515 Multiple R-Squared: 0.623 Adjusted R-Squared: 0.552 [1] "** 3SLS with different instruments and 2 restrictions (EViews-like) *" systemfit results method: 3SLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 35 165 1.28 0.692 0.642 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 64.1 3.77 1.94 0.761 0.733 supply 20 16 101.1 6.32 2.51 0.623 0.552 The covariance matrix of the residuals used for estimation demand supply demand 3.22 3.67 supply 3.67 4.85 The covariance matrix of the residuals demand supply demand 3.21 3.86 supply 3.86 5.06 The correlations of the residuals demand supply demand 1.00 0.96 supply 0.96 1.00 3SLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Instruments: ~income + farmPrice Estimate Std. Error t value Pr(>|t|) (Intercept) 98.6650 7.5755 13.02 5.6e-15 *** price -0.2845 0.0822 -3.46 0.0014 ** income 0.3146 0.0203 15.52 < 2e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.942 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 64.111 MSE: 3.771 Root MSE: 1.942 Multiple R-Squared: 0.761 Adjusted R-Squared: 0.733 3SLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 54.3281 7.7347 7.02 3.6e-08 *** price 0.2155 0.0822 2.62 0.013 * farmPrice 0.2247 0.0201 11.16 4.4e-13 *** trend 0.3146 0.0203 15.52 < 2e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.514 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 101.149 MSE: 6.322 Root MSE: 2.514 Multiple R-Squared: 0.623 Adjusted R-Squared: 0.552 [1] "**** W3SLS with different instruments and 2 restrictions *********" systemfit results method: 3SLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 35 165 1.89 0.692 0.677 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 64.1 3.77 1.94 0.761 0.733 supply 20 16 101.3 6.33 2.52 0.622 0.551 The covariance matrix of the residuals used for estimation demand supply demand 3.75 4.46 supply 4.46 6.04 The covariance matrix of the residuals demand supply demand 3.77 4.69 supply 4.69 6.33 The correlations of the residuals demand supply demand 1.00 0.96 supply 0.96 1.00 3SLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Instruments: ~income + farmPrice Estimate Std. Error t value Pr(>|t|) (Intercept) 98.9360 8.2215 12.03 5.4e-14 *** price -0.2872 0.0907 -3.17 0.0032 ** income 0.3147 0.0215 14.64 2.2e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.941 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 64.08 MSE: 3.769 Root MSE: 1.941 Multiple R-Squared: 0.761 Adjusted R-Squared: 0.733 3SLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 54.7520 8.3733 6.54 1.5e-07 *** price 0.2128 0.0907 2.35 0.025 * farmPrice 0.2231 0.0218 10.24 4.5e-12 *** trend 0.3147 0.0215 14.64 2.2e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.516 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 101.278 MSE: 6.33 Root MSE: 2.516 Multiple R-Squared: 0.622 Adjusted R-Squared: 0.551 [1] " 3SLS with different instruments with 2 restrictions via R and restrict.regMat" systemfit results method: 3SLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 35 165 1.89 0.692 0.677 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 64.1 3.77 1.94 0.761 0.733 supply 20 16 101.2 6.32 2.52 0.623 0.552 The covariance matrix of the residuals used for estimation demand supply demand 3.79 4.45 supply 4.45 6.06 The covariance matrix of the residuals demand supply demand 3.77 4.68 supply 4.68 6.32 The correlations of the residuals demand supply demand 1.00 0.96 supply 0.96 1.00 3SLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Instruments: ~income + farmPrice Estimate Std. Error t value Pr(>|t|) (Intercept) 98.8949 8.2696 11.96 6.4e-14 *** price -0.2870 0.0909 -3.16 0.0033 ** income 0.3148 0.0224 14.04 4.4e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.941 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 64.072 MSE: 3.769 Root MSE: 1.941 Multiple R-Squared: 0.761 Adjusted R-Squared: 0.733 3SLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 54.6693 8.4422 6.48 1.8e-07 *** price 0.2130 0.0909 2.34 0.025 * farmPrice 0.2237 0.0228 9.82 1.3e-11 *** trend 0.3148 0.0224 14.04 4.4e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.515 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 101.181 MSE: 6.324 Root MSE: 2.515 Multiple R-Squared: 0.623 Adjusted R-Squared: 0.552 [1] "3SLS with diff. instruments and 2 restr. via R and restrict.regMat (EViews-like)" systemfit results method: 3SLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 35 165 1.28 0.692 0.642 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 64.1 3.77 1.94 0.761 0.733 supply 20 16 101.1 6.32 2.51 0.623 0.552 The covariance matrix of the residuals used for estimation demand supply demand 3.22 3.67 supply 3.67 4.85 The covariance matrix of the residuals demand supply demand 3.21 3.86 supply 3.86 5.06 The correlations of the residuals demand supply demand 1.00 0.96 supply 0.96 1.00 3SLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Instruments: ~income + farmPrice Estimate Std. Error t value Pr(>|t|) (Intercept) 98.6650 7.5755 13.02 5.6e-15 *** price -0.2845 0.0822 -3.46 0.0014 ** income 0.3146 0.0203 15.52 < 2e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.942 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 64.111 MSE: 3.771 Root MSE: 1.942 Multiple R-Squared: 0.761 Adjusted R-Squared: 0.733 3SLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 54.3281 7.7347 7.02 3.6e-08 *** price 0.2155 0.0822 2.62 0.013 * farmPrice 0.2247 0.0201 11.16 4.4e-13 *** trend 0.3146 0.0203 15.52 < 2e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.514 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 101.149 MSE: 6.322 Root MSE: 2.514 Multiple R-Squared: 0.623 Adjusted R-Squared: 0.552 [1] "W3SLS with diff. instr. and 2 restr. via R and restrict.regMat (EViews-like)" systemfit results method: 3SLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 35 165 1.28 0.692 0.643 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 64.1 3.77 1.94 0.761 0.733 supply 20 16 101.2 6.33 2.52 0.622 0.552 The covariance matrix of the residuals used for estimation demand supply demand 3.19 3.68 supply 3.68 4.83 The covariance matrix of the residuals demand supply demand 3.21 3.87 supply 3.87 5.06 The correlations of the residuals demand supply demand 1.00 0.96 supply 0.96 1.00 3SLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Instruments: ~income + farmPrice Estimate Std. Error t value Pr(>|t|) (Intercept) 98.6980 7.5376 13.09 4.9e-15 *** price -0.2847 0.0820 -3.47 0.0014 ** income 0.3145 0.0195 16.13 < 2e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.942 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 64.117 MSE: 3.772 Root MSE: 1.942 Multiple R-Squared: 0.761 Adjusted R-Squared: 0.733 3SLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 54.3972 7.6824 7.08 3.0e-08 *** price 0.2153 0.0820 2.62 0.013 * farmPrice 0.2242 0.0193 11.60 1.5e-13 *** trend 0.3145 0.0195 16.13 < 2e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.515 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 101.231 MSE: 6.327 Root MSE: 2.515 Multiple R-Squared: 0.622 Adjusted R-Squared: 0.552 [1] "***************************************************" [1] "3SLS formula: EViews" [1] "************* 3SLS with different instruments **************" systemfit results method: 3SLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 33 174 2.12 0.675 0.659 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 67.4 3.97 1.99 0.748 0.719 supply 20 16 106.6 6.66 2.58 0.602 0.528 The covariance matrix of the residuals used for estimation demand supply demand 3.97 3.84 supply 3.84 6.04 The covariance matrix of the residuals demand supply demand 3.97 4.93 supply 4.93 6.66 The correlations of the residuals demand supply demand 1.000 0.959 supply 0.959 1.000 3SLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Instruments: ~income + farmPrice Estimate Std. Error t value Pr(>|t|) (Intercept) 106.7894 11.1435 9.58 2.9e-08 *** price -0.4116 0.1448 -2.84 0.011 * income 0.3617 0.0564 6.41 6.4e-06 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.992 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 67.447 MSE: 3.967 Root MSE: 1.992 Multiple R-Squared: 0.748 Adjusted R-Squared: 0.719 3SLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 57.2953 11.5390 4.97 0.00014 *** price 0.1373 0.0897 1.53 0.14529 farmPrice 0.2660 0.0470 5.66 3.6e-05 *** trend 0.3970 0.0781 5.08 0.00011 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.582 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 106.628 MSE: 6.664 Root MSE: 2.582 Multiple R-Squared: 0.602 Adjusted R-Squared: 0.528 [1] "******* 3SLS with different instruments (EViews-like) **********" systemfit results method: 3SLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 33 173 1.51 0.677 0.612 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 67.4 3.97 1.99 0.748 0.719 supply 20 16 105.7 6.61 2.57 0.606 0.532 The covariance matrix of the residuals used for estimation demand supply demand 3.37 3.16 supply 3.16 4.83 The covariance matrix of the residuals demand supply demand 3.37 4.04 supply 4.04 5.29 The correlations of the residuals demand supply demand 1.000 0.957 supply 0.957 1.000 3SLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Instruments: ~income + farmPrice Estimate Std. Error t value Pr(>|t|) (Intercept) 106.789 10.274 10.39 6.1e-12 *** price -0.412 0.134 -3.08 0.0041 ** income 0.362 0.052 6.95 6.0e-08 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.992 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 67.447 MSE: 3.967 Root MSE: 1.992 Multiple R-Squared: 0.748 Adjusted R-Squared: 0.719 3SLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 57.0636 10.3208 5.53 3.9e-06 *** price 0.1403 0.0802 1.75 0.089 . farmPrice 0.2657 0.0421 6.32 3.8e-07 *** trend 0.3927 0.0699 5.62 3.0e-06 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.571 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 105.735 MSE: 6.608 Root MSE: 2.571 Multiple R-Squared: 0.606 Adjusted R-Squared: 0.532 [1] "**** 3SLS with different instruments and methodResidCov = Theil ***" systemfit results method: 3SLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 33 175 0.321 0.673 0.655 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 67.4 3.97 1.99 0.748 0.719 supply 20 16 107.7 6.73 2.59 0.598 0.523 The covariance matrix of the residuals used for estimation demand supply demand 3.97 3.96 supply 3.96 6.04 The covariance matrix of the residuals demand supply demand 3.97 5.14 supply 5.14 6.73 The correlations of the residuals demand supply demand 1.000 0.962 supply 0.962 1.000 3SLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Instruments: ~income + farmPrice Estimate Std. Error t value Pr(>|t|) (Intercept) 106.7894 11.1435 9.58 4.7e-11 *** price -0.4116 0.1448 -2.84 0.0076 ** income 0.3617 0.0564 6.41 2.9e-07 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.992 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 67.447 MSE: 3.967 Root MSE: 1.992 Multiple R-Squared: 0.748 Adjusted R-Squared: 0.719 3SLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 57.5567 11.5060 5.00 1.8e-05 *** price 0.1338 0.0889 1.50 0.14 farmPrice 0.2664 0.0470 5.66 2.6e-06 *** trend 0.4018 0.0765 5.26 8.7e-06 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.594 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 107.679 MSE: 6.73 Root MSE: 2.594 Multiple R-Squared: 0.598 Adjusted R-Squared: 0.523 [1] "************* W3SLS with different instruments **************" systemfit results method: 3SLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 33 174 2.12 0.675 0.659 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 67.4 3.97 1.99 0.748 0.719 supply 20 16 106.6 6.66 2.58 0.602 0.528 The covariance matrix of the residuals used for estimation demand supply demand 3.97 3.84 supply 3.84 6.04 The covariance matrix of the residuals demand supply demand 3.97 4.93 supply 4.93 6.66 The correlations of the residuals demand supply demand 1.000 0.959 supply 0.959 1.000 3SLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Instruments: ~income + farmPrice Estimate Std. Error t value Pr(>|t|) (Intercept) 106.7894 11.1435 9.58 2.9e-08 *** price -0.4116 0.1448 -2.84 0.011 * income 0.3617 0.0564 6.41 6.4e-06 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.992 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 67.447 MSE: 3.967 Root MSE: 1.992 Multiple R-Squared: 0.748 Adjusted R-Squared: 0.719 3SLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 57.2953 11.5390 4.97 0.00014 *** price 0.1373 0.0897 1.53 0.14529 farmPrice 0.2660 0.0470 5.66 3.6e-05 *** trend 0.3970 0.0781 5.08 0.00011 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.582 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 106.628 MSE: 6.664 Root MSE: 2.582 Multiple R-Squared: 0.602 Adjusted R-Squared: 0.528 [1] "******* 3SLS with different instruments and restriction ********" systemfit results method: 3SLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 34 174 3.39 0.676 0.542 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 71.1 4.18 2.04 0.735 0.704 supply 20 16 102.6 6.41 2.53 0.617 0.546 The covariance matrix of the residuals used for estimation demand supply demand 3.79 4.35 supply 4.35 6.27 The covariance matrix of the residuals demand supply demand 4.18 4.84 supply 4.84 6.41 The correlations of the residuals demand supply demand 1.000 0.935 supply 0.935 1.000 3SLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Instruments: ~income + farmPrice Estimate Std. Error t value Pr(>|t|) (Intercept) 109.4916 6.3475 17.25 < 2e-16 *** price -0.4470 0.0812 -5.50 3.8e-06 *** income 0.3703 0.0474 7.81 4.3e-09 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.045 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 71.077 MSE: 4.181 Root MSE: 2.045 Multiple R-Squared: 0.735 Adjusted R-Squared: 0.704 3SLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 57.6795 11.2022 5.15 1.1e-05 *** price 0.1324 0.0785 1.69 0.1 farmPrice 0.2700 0.0453 5.97 9.5e-07 *** trend 0.3703 0.0474 7.81 4.3e-09 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.532 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 102.574 MSE: 6.411 Root MSE: 2.532 Multiple R-Squared: 0.617 Adjusted R-Squared: 0.546 [1] "** 3SLS with different instruments and restriction (EViews-like) *" systemfit results method: 3SLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 34 173 2.29 0.678 0.515 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 70.5 4.15 2.04 0.737 0.706 supply 20 16 102.2 6.38 2.53 0.619 0.548 The covariance matrix of the residuals used for estimation demand supply demand 3.22 3.58 supply 3.58 5.02 The covariance matrix of the residuals demand supply demand 3.53 3.96 supply 3.96 5.11 The correlations of the residuals demand supply demand 1.000 0.934 supply 0.934 1.000 3SLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Instruments: ~income + farmPrice Estimate Std. Error t value Pr(>|t|) (Intercept) 109.1085 5.8428 18.67 < 2e-16 *** price -0.4422 0.0737 -6.00 8.6e-07 *** income 0.3693 0.0432 8.54 5.6e-10 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.037 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 70.515 MSE: 4.148 Root MSE: 2.037 Multiple R-Squared: 0.737 Adjusted R-Squared: 0.706 3SLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 57.2679 10.0564 5.69 2.1e-06 *** price 0.1375 0.0705 1.95 0.06 . farmPrice 0.2691 0.0403 6.68 1.1e-07 *** trend 0.3693 0.0432 8.54 5.6e-10 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.527 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 102.156 MSE: 6.385 Root MSE: 2.527 Multiple R-Squared: 0.619 Adjusted R-Squared: 0.548 [1] "** W3SLS with different instruments and restriction (EViews-like) *" systemfit results method: 3SLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 34 173 2.29 0.678 0.515 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 70.5 4.15 2.04 0.737 0.706 supply 20 16 102.1 6.38 2.53 0.619 0.548 The covariance matrix of the residuals used for estimation demand supply demand 3.24 3.60 supply 3.60 5.06 The covariance matrix of the residuals demand supply demand 3.52 3.96 supply 3.96 5.11 The correlations of the residuals demand supply demand 1.000 0.934 supply 0.934 1.000 3SLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Instruments: ~income + farmPrice Estimate Std. Error t value Pr(>|t|) (Intercept) 109.0818 5.9083 18.46 < 2e-16 *** price -0.4418 0.0746 -5.92 1.1e-06 *** income 0.3692 0.0434 8.51 6.2e-10 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.036 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 70.475 MSE: 4.146 Root MSE: 2.036 Multiple R-Squared: 0.737 Adjusted R-Squared: 0.706 3SLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 57.2616 10.1094 5.66 2.4e-06 *** price 0.1376 0.0711 1.94 0.061 . farmPrice 0.2690 0.0405 6.64 1.3e-07 *** trend 0.3692 0.0434 8.51 6.2e-10 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.527 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 102.135 MSE: 6.383 Root MSE: 2.527 Multiple R-Squared: 0.619 Adjusted R-Squared: 0.548 [1] "** 3SLS with different instruments and restriction via restrict.regMat *******" systemfit results method: 3SLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 34 174 3.39 0.676 0.542 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 71.1 4.18 2.04 0.735 0.704 supply 20 16 102.6 6.41 2.53 0.617 0.546 The covariance matrix of the residuals used for estimation demand supply demand 3.79 4.35 supply 4.35 6.27 The covariance matrix of the residuals demand supply demand 4.18 4.84 supply 4.84 6.41 The correlations of the residuals demand supply demand 1.000 0.935 supply 0.935 1.000 3SLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Instruments: ~income + farmPrice Estimate Std. Error t value Pr(>|t|) (Intercept) 109.4916 6.3475 17.25 < 2e-16 *** price -0.4470 0.0812 -5.50 3.8e-06 *** income 0.3703 0.0474 7.81 4.3e-09 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.045 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 71.077 MSE: 4.181 Root MSE: 2.045 Multiple R-Squared: 0.735 Adjusted R-Squared: 0.704 3SLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 57.6795 11.2022 5.15 1.1e-05 *** price 0.1324 0.0785 1.69 0.1 farmPrice 0.2700 0.0453 5.97 9.5e-07 *** trend 0.3703 0.0474 7.81 4.3e-09 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.532 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 102.574 MSE: 6.411 Root MSE: 2.532 Multiple R-Squared: 0.617 Adjusted R-Squared: 0.546 [1] "3SLS with different instruments with restriction via restrict.regMat (EViews-like)" systemfit results method: 3SLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 34 173 2.29 0.678 0.515 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 70.5 4.15 2.04 0.737 0.706 supply 20 16 102.2 6.38 2.53 0.619 0.548 The covariance matrix of the residuals used for estimation demand supply demand 3.22 3.58 supply 3.58 5.02 The covariance matrix of the residuals demand supply demand 3.53 3.96 supply 3.96 5.11 The correlations of the residuals demand supply demand 1.000 0.934 supply 0.934 1.000 3SLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Instruments: ~income + farmPrice Estimate Std. Error t value Pr(>|t|) (Intercept) 109.1085 5.8428 18.67 < 2e-16 *** price -0.4422 0.0737 -6.00 8.6e-07 *** income 0.3693 0.0432 8.54 5.6e-10 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.037 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 70.515 MSE: 4.148 Root MSE: 2.037 Multiple R-Squared: 0.737 Adjusted R-Squared: 0.706 3SLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 57.2679 10.0564 5.69 2.1e-06 *** price 0.1375 0.0705 1.95 0.06 . farmPrice 0.2691 0.0403 6.68 1.1e-07 *** trend 0.3693 0.0432 8.54 5.6e-10 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.527 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 102.156 MSE: 6.385 Root MSE: 2.527 Multiple R-Squared: 0.619 Adjusted R-Squared: 0.548 [1] "** W3SLS with different instr. and restr. via restrict.regMat ****" systemfit results method: 3SLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 34 174 3.38 0.676 0.543 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 71 4.18 2.04 0.735 0.704 supply 20 16 103 6.41 2.53 0.618 0.546 The covariance matrix of the residuals used for estimation demand supply demand 3.81 4.36 supply 4.36 6.34 The covariance matrix of the residuals demand supply demand 4.18 4.84 supply 4.84 6.41 The correlations of the residuals demand supply demand 1.000 0.935 supply 0.935 1.000 3SLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Instruments: ~income + farmPrice Estimate Std. Error t value Pr(>|t|) (Intercept) 109.4522 6.4318 17.02 < 2e-16 *** price -0.4465 0.0823 -5.42 4.8e-06 *** income 0.3702 0.0476 7.78 4.8e-09 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.044 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 71.017 MSE: 4.177 Root MSE: 2.044 Multiple R-Squared: 0.735 Adjusted R-Squared: 0.704 3SLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 57.6669 11.2699 5.12 1.2e-05 *** price 0.1326 0.0792 1.67 0.1 farmPrice 0.2699 0.0456 5.92 1.1e-06 *** trend 0.3702 0.0476 7.78 4.8e-09 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.532 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 102.539 MSE: 6.409 Root MSE: 2.532 Multiple R-Squared: 0.618 Adjusted R-Squared: 0.546 [1] "****** 3SLS with different instruments and 2 restrictions *********" systemfit results method: 3SLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 35 358 32.4 0.333 -0.013 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 141 8.32 2.88 0.472 0.410 supply 20 16 216 13.53 3.68 0.193 0.042 The covariance matrix of the residuals used for estimation demand supply demand 3.79 4.45 supply 4.45 6.06 The covariance matrix of the residuals demand supply demand 8.32 8.95 supply 8.95 13.53 The correlations of the residuals demand supply demand 1.000 0.844 supply 0.844 1.000 3SLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Instruments: ~income + farmPrice Estimate Std. Error t value Pr(>|t|) (Intercept) 108.5837 5.3770 20.2 < 2e-16 *** price -0.6034 0.0504 -12.0 6.2e-14 *** income 0.5399 0.0182 29.7 < 2e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.884 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 141.436 MSE: 8.32 Root MSE: 2.884 Multiple R-Squared: 0.472 Adjusted R-Squared: 0.41 3SLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 14.7043 5.4316 2.71 0.01 * price 0.3966 0.0504 7.87 3e-09 *** farmPrice 0.4228 0.0205 20.65 <2e-16 *** trend 0.5399 0.0182 29.71 <2e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 3.678 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 216.4 MSE: 13.525 Root MSE: 3.678 Multiple R-Squared: 0.193 Adjusted R-Squared: 0.042 [1] "** 3SLS with different instruments and 2 restrictions (EViews-like) *" systemfit results method: 3SLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 35 359 21.9 0.331 -0.059 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 143 8.38 2.90 0.468 0.406 supply 20 16 216 13.52 3.68 0.193 0.042 The covariance matrix of the residuals used for estimation demand supply demand 3.22 3.67 supply 3.67 4.85 The covariance matrix of the residuals demand supply demand 7.13 7.43 supply 7.43 10.82 The correlations of the residuals demand supply demand 1.000 0.846 supply 0.846 1.000 3SLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Instruments: ~income + farmPrice Estimate Std. Error t value Pr(>|t|) (Intercept) 107.9852 4.9704 21.7 < 2e-16 *** price -0.5994 0.0458 -13.1 4.9e-15 *** income 0.5420 0.0168 32.2 < 2e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.896 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 142.542 MSE: 8.385 Root MSE: 2.896 Multiple R-Squared: 0.468 Adjusted R-Squared: 0.406 3SLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 14.4922 4.9950 2.90 0.0064 ** price 0.4006 0.0458 8.75 2.5e-10 *** farmPrice 0.4207 0.0184 22.92 < 2e-16 *** trend 0.5420 0.0168 32.25 < 2e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 3.677 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 216.315 MSE: 13.52 Root MSE: 3.677 Multiple R-Squared: 0.193 Adjusted R-Squared: 0.042 [1] "**** W3SLS with different instruments and 2 restrictions *********" systemfit results method: 3SLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 35 364 32.3 0.322 -0.022 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 143 8.43 2.90 0.466 0.403 supply 20 16 220 13.78 3.71 0.178 0.024 The covariance matrix of the residuals used for estimation demand supply demand 3.75 4.46 supply 4.46 6.04 The covariance matrix of the residuals demand supply demand 8.43 9.15 supply 9.15 13.78 The correlations of the residuals demand supply demand 1.00 0.85 supply 0.85 1.00 3SLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Instruments: ~income + farmPrice Estimate Std. Error t value Pr(>|t|) (Intercept) 107.9125 5.1136 21.1 < 2e-16 *** price -0.5996 0.0479 -12.5 1.7e-14 *** income 0.5430 0.0171 31.7 < 2e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.903 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 143.236 MSE: 8.426 Root MSE: 2.903 Multiple R-Squared: 0.466 Adjusted R-Squared: 0.403 3SLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 13.9658 5.1591 2.71 0.01 * price 0.4004 0.0479 8.36 7.3e-10 *** farmPrice 0.4263 0.0193 22.08 < 2e-16 *** trend 0.5430 0.0171 31.74 < 2e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 3.712 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 220.468 MSE: 13.779 Root MSE: 3.712 Multiple R-Squared: 0.178 Adjusted R-Squared: 0.024 [1] " 3SLS with different instruments with 2 restrictions via R and restrict.regMat" systemfit results method: 3SLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 35 358 32.4 0.333 -0.013 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 141 8.32 2.88 0.472 0.410 supply 20 16 216 13.53 3.68 0.193 0.042 The covariance matrix of the residuals used for estimation demand supply demand 3.79 4.45 supply 4.45 6.06 The covariance matrix of the residuals demand supply demand 8.32 8.95 supply 8.95 13.53 The correlations of the residuals demand supply demand 1.000 0.844 supply 0.844 1.000 3SLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Instruments: ~income + farmPrice Estimate Std. Error t value Pr(>|t|) (Intercept) 108.5837 5.3770 20.2 < 2e-16 *** price -0.6034 0.0504 -12.0 6.2e-14 *** income 0.5399 0.0182 29.7 < 2e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.884 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 141.436 MSE: 8.32 Root MSE: 2.884 Multiple R-Squared: 0.472 Adjusted R-Squared: 0.41 3SLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 14.7043 5.4316 2.71 0.01 * price 0.3966 0.0504 7.87 3e-09 *** farmPrice 0.4228 0.0205 20.65 <2e-16 *** trend 0.5399 0.0182 29.71 <2e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 3.678 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 216.4 MSE: 13.525 Root MSE: 3.678 Multiple R-Squared: 0.193 Adjusted R-Squared: 0.042 [1] "3SLS with diff. instruments and 2 restr. via R and restrict.regMat (EViews-like)" systemfit results method: 3SLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 35 359 21.9 0.331 -0.059 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 143 8.38 2.90 0.468 0.406 supply 20 16 216 13.52 3.68 0.193 0.042 The covariance matrix of the residuals used for estimation demand supply demand 3.22 3.67 supply 3.67 4.85 The covariance matrix of the residuals demand supply demand 7.13 7.43 supply 7.43 10.82 The correlations of the residuals demand supply demand 1.000 0.846 supply 0.846 1.000 3SLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Instruments: ~income + farmPrice Estimate Std. Error t value Pr(>|t|) (Intercept) 107.9852 4.9704 21.7 < 2e-16 *** price -0.5994 0.0458 -13.1 4.9e-15 *** income 0.5420 0.0168 32.2 < 2e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.896 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 142.542 MSE: 8.385 Root MSE: 2.896 Multiple R-Squared: 0.468 Adjusted R-Squared: 0.406 3SLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 14.4922 4.9950 2.90 0.0064 ** price 0.4006 0.0458 8.75 2.5e-10 *** farmPrice 0.4207 0.0184 22.92 < 2e-16 *** trend 0.5420 0.0168 32.25 < 2e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 3.677 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 216.315 MSE: 13.52 Root MSE: 3.677 Multiple R-Squared: 0.193 Adjusted R-Squared: 0.042 [1] "W3SLS with diff. instr. and 2 restr. via R and restrict.regMat (EViews-like)" systemfit results method: 3SLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 35 364 21.8 0.321 -0.069 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 144 8.49 2.91 0.462 0.399 supply 20 16 220 13.76 3.71 0.179 0.025 The covariance matrix of the residuals used for estimation demand supply demand 3.19 3.68 supply 3.68 4.83 The covariance matrix of the residuals demand supply demand 7.21 7.59 supply 7.59 11.00 The correlations of the residuals demand supply demand 1.000 0.852 supply 0.852 1.000 3SLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Instruments: ~income + farmPrice Estimate Std. Error t value Pr(>|t|) (Intercept) 107.3179 4.7598 22.6 < 2e-16 *** price -0.5955 0.0438 -13.6 1.6e-15 *** income 0.5449 0.0159 34.2 < 2e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.913 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 144.274 MSE: 8.487 Root MSE: 2.913 Multiple R-Squared: 0.462 Adjusted R-Squared: 0.399 3SLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 13.7761 4.7784 2.88 0.0067 ** price 0.4045 0.0438 9.23 6.6e-11 *** farmPrice 0.4237 0.0174 24.30 < 2e-16 *** trend 0.5449 0.0159 34.17 < 2e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 3.709 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 220.081 MSE: 13.755 Root MSE: 3.709 Multiple R-Squared: 0.179 Adjusted R-Squared: 0.025 > > > ## **************** shorter summaries ********************** > print( summary( fit3sls[[ 2 ]]$e1c, equations = FALSE ) ) systemfit results method: 3SLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 33 174 -0.718 0.675 0.922 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 65.7 3.87 1.97 0.755 0.726 supply 20 16 108.7 6.79 2.61 0.594 0.518 The covariance matrix of the residuals used for estimation demand supply demand 3.87 4.50 supply 4.50 6.04 warning: this covariance matrix is NOT positive semidefinit! The covariance matrix of the residuals demand supply demand 3.87 5.2 supply 5.20 6.8 The correlations of the residuals demand supply demand 1.000 0.981 supply 0.981 1.000 Coefficients: Estimate Std. Error t value Pr(>|t|) demand_(Intercept) 94.6333 7.9208 11.95 1.1e-09 *** demand_price -0.2436 0.0965 -2.52 0.02183 * demand_income 0.3140 0.0469 6.69 3.8e-06 *** supply_(Intercept) 52.2869 11.8853 4.40 0.00045 *** supply_price 0.2282 0.0997 2.29 0.03595 * supply_farmPrice 0.2272 0.0438 5.19 8.9e-05 *** supply_trend 0.3648 0.0707 5.16 9.5e-05 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 > > print( summary( fit3sls[[ 3 ]]$e2e ), residCov = FALSE ) systemfit results method: 3SLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 34 171 0.887 0.68 0.678 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 67.5 3.97 1.99 0.748 0.719 supply 20 16 104.0 6.50 2.55 0.612 0.539 3SLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 94.2737 7.3905 12.76 1.6e-14 *** price -0.2243 0.0888 -2.53 0.016 * income 0.2979 0.0420 7.10 3.4e-08 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.992 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 67.467 MSE: 3.969 Root MSE: 1.992 Multiple R-Squared: 0.748 Adjusted R-Squared: 0.719 3SLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 55.4521 10.3994 5.33 6.4e-06 *** price 0.2207 0.0896 2.46 0.019 * farmPrice 0.2095 0.0366 5.73 1.9e-06 *** trend 0.2979 0.0420 7.10 3.4e-08 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.55 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 104.013 MSE: 6.501 Root MSE: 2.55 Multiple R-Squared: 0.612 Adjusted R-Squared: 0.539 > > print( summary( fit3sls[[ 4 ]]$e3, useDfSys = FALSE ), residCov = FALSE ) systemfit results method: 3SLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 34 173 1.27 0.678 0.722 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 67.8 3.99 2.00 0.747 0.717 supply 20 16 104.8 6.55 2.56 0.609 0.536 3SLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 94.222 8.015 11.76 1.4e-09 *** price -0.222 0.096 -2.31 0.034 * income 0.296 0.045 6.57 4.8e-06 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.997 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 67.796 MSE: 3.988 Root MSE: 1.997 Multiple R-Squared: 0.747 Adjusted R-Squared: 0.717 3SLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 55.9604 11.5777 4.83 0.00018 *** price 0.2193 0.1002 2.19 0.04374 * farmPrice 0.2060 0.0403 5.11 0.00011 *** trend 0.2956 0.0450 6.57 6.5e-06 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.559 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 104.753 MSE: 6.547 Root MSE: 2.559 Multiple R-Squared: 0.609 Adjusted R-Squared: 0.536 > > print( summary( fit3sls[[ 5 ]]$e4e, equations = FALSE ), + equations = FALSE ) systemfit results method: 3SLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 35 439 21.3 0.18 -0.18 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 169 9.93 3.15 0.370 0.296 supply 20 16 271 16.91 4.11 -0.009 -0.198 The covariance matrix of the residuals used for estimation demand supply demand 3.30 3.73 supply 3.73 5.00 The covariance matrix of the residuals demand supply demand 8.44 9.64 supply 9.64 13.53 The correlations of the residuals demand supply demand 1.000 0.902 supply 0.902 1.000 Coefficients: Estimate Std. Error t value Pr(>|t|) demand_(Intercept) 93.2926 7.3154 12.75 1.0e-14 *** demand_price -0.4781 0.0812 -5.89 1.1e-06 *** demand_income 0.5683 0.0209 27.24 < 2e-16 *** supply_(Intercept) 0.6559 7.5503 0.09 0.93 supply_price 0.5219 0.0812 6.43 2.1e-07 *** supply_farmPrice 0.4355 0.0212 20.49 < 2e-16 *** supply_trend 0.5683 0.0209 27.24 < 2e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 > > print( summary( fit3sls[[ 1 ]]$e4wSym, residCov = FALSE ), + equations = FALSE ) systemfit results method: 3SLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 35 172 1.74 0.68 0.697 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 65.9 3.88 1.97 0.754 0.725 supply 20 16 105.7 6.60 2.57 0.606 0.532 Coefficients: Estimate Std. Error t value Pr(>|t|) demand_(Intercept) 93.7870 7.9088 11.86 8.2e-14 *** demand_price -0.2443 0.0892 -2.74 0.0096 ** demand_income 0.3234 0.0229 14.14 4.4e-16 *** supply_(Intercept) 49.8093 8.1522 6.11 5.5e-07 *** supply_price 0.2557 0.0892 2.87 0.0069 ** supply_farmPrice 0.2289 0.0237 9.67 2.0e-11 *** supply_trend 0.3234 0.0229 14.14 4.4e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 > > print( summary( fit3sls[[ 2 ]]$e5, residCov = FALSE ), residCov = TRUE ) systemfit results method: 3SLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 35 171 1.74 0.681 0.696 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 65.8 3.87 1.97 0.755 0.726 supply 20 16 105.4 6.59 2.57 0.607 0.533 The covariance matrix of the residuals used for estimation demand supply demand 3.89 4.53 supply 4.53 6.25 The covariance matrix of the residuals demand supply demand 3.87 4.87 supply 4.87 6.59 The correlations of the residuals demand supply demand 1.000 0.965 supply 0.965 1.000 3SLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 93.9070 7.9234 11.85 8.3e-14 *** price -0.2457 0.0891 -2.76 0.0092 ** income 0.3236 0.0233 13.91 8.9e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.967 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 65.807 MSE: 3.871 Root MSE: 1.967 Multiple R-Squared: 0.755 Adjusted R-Squared: 0.726 3SLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 49.9049 8.1797 6.10 5.7e-07 *** price 0.2543 0.0891 2.85 0.0072 ** farmPrice 0.2293 0.0241 9.52 3.1e-11 *** trend 0.3236 0.0233 13.91 8.9e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.566 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 105.389 MSE: 6.587 Root MSE: 2.566 Multiple R-Squared: 0.607 Adjusted R-Squared: 0.533 > > print( summary( fit3slsi[[ 3 ]]$e3e, residCov = FALSE, + equations = FALSE ) ) systemfit results method: iterated 3SLS convergence achieved after 20 iterations N DF SSR detRCov OLS-R2 McElroy-R2 system 40 34 237 0.364 0.557 0.755 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 99.3 5.84 2.42 0.630 0.586 supply 20 16 138.1 8.63 2.94 0.485 0.388 Coefficients: Estimate Std. Error t value Pr(>|t|) demand_(Intercept) 92.0353 8.9214 10.32 5.2e-12 *** demand_price -0.1043 0.0958 -1.09 0.284 demand_income 0.1979 0.0299 6.61 1.4e-07 *** supply_(Intercept) 68.2830 11.1530 6.12 6.0e-07 *** supply_price 0.1851 0.1053 1.76 0.088 . supply_farmPrice 0.1245 0.0251 4.96 1.9e-05 *** supply_trend 0.1979 0.0299 6.61 1.4e-07 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 > > print( summary( fit3slsi[[ 4 ]]$e1we ), equations = FALSE, residCov = FALSE ) systemfit results method: iterated 3SLS convergence achieved after 6 iterations N DF SSR detRCov OLS-R2 McElroy-R2 system 40 33 177 0.667 0.67 0.782 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 65.7 3.87 1.97 0.755 0.726 supply 20 16 111.3 6.96 2.64 0.585 0.507 Coefficients: Estimate Std. Error t value Pr(>|t|) demand_(Intercept) 94.6333 7.3027 12.96 3.1e-10 *** demand_price -0.2436 0.0890 -2.74 0.01402 * demand_income 0.3140 0.0433 7.25 1.3e-06 *** supply_(Intercept) 52.5527 11.3956 4.61 0.00029 *** supply_price 0.2271 0.0956 2.37 0.03043 * supply_farmPrice 0.2245 0.0416 5.39 6.0e-05 *** supply_trend 0.3756 0.0641 5.86 2.4e-05 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 > > print( summary( fit3slsd[[ 5 ]]$e4, residCov = FALSE ) ) systemfit results method: 3SLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 35 358 32.4 0.333 -0.013 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 141 8.32 2.88 0.472 0.410 supply 20 16 216 13.53 3.68 0.193 0.042 3SLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Instruments: ~income + farmPrice Estimate Std. Error t value Pr(>|t|) (Intercept) 108.5837 5.3770 20.2 < 2e-16 *** price -0.6034 0.0504 -12.0 6.2e-14 *** income 0.5399 0.0182 29.7 < 2e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.884 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 141.436 MSE: 8.32 Root MSE: 2.884 Multiple R-Squared: 0.472 Adjusted R-Squared: 0.41 3SLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Instruments: ~income + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 14.7043 5.4316 2.71 0.01 * price 0.3966 0.0504 7.87 3e-09 *** farmPrice 0.4228 0.0205 20.65 <2e-16 *** trend 0.5399 0.0182 29.71 <2e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 3.678 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 216.4 MSE: 13.525 Root MSE: 3.678 Multiple R-Squared: 0.193 Adjusted R-Squared: 0.042 > > print( summary( fit3slsd[[ 1 ]]$e2we, equations = FALSE ) ) systemfit results method: 3SLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 34 199 1.77 0.629 0.65 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 72.4 4.26 2.06 0.730 0.698 supply 20 16 126.7 7.92 2.81 0.527 0.439 The covariance matrix of the residuals used for estimation demand supply demand 3.24 3.60 supply 3.60 5.06 The covariance matrix of the residuals demand supply demand 3.62 4.60 supply 4.60 6.34 The correlations of the residuals demand supply demand 1.000 0.961 supply 0.961 1.000 Coefficients: Estimate Std. Error t value Pr(>|t|) demand_(Intercept) 88.9298 5.9083 15.05 < 2e-16 *** demand_price -0.1760 0.0746 -2.36 0.02415 * demand_income 0.3032 0.0434 6.99 4.6e-08 *** supply_(Intercept) 40.8325 10.1094 4.04 0.00029 *** supply_price 0.3562 0.0711 5.01 1.7e-05 *** supply_farmPrice 0.2200 0.0405 5.43 4.8e-06 *** supply_trend 0.3032 0.0434 6.99 4.6e-08 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 > > > ## ****************** residuals ************************** > print( residuals( fit3sls[[ 1 ]]$e1c ) ) demand supply 1 0.843 0.670 2 -0.698 -0.142 3 2.359 2.659 4 1.490 1.618 5 2.139 2.588 6 1.277 1.485 7 1.571 2.093 8 -3.066 -4.163 9 -1.125 -1.929 10 2.492 3.207 11 -0.108 -0.513 12 -2.292 -2.375 13 -1.598 -2.089 14 -0.271 0.330 15 1.958 3.086 16 -3.430 -4.225 17 -0.313 0.185 18 -2.151 -3.680 19 1.592 1.576 20 -0.668 -0.382 > print( residuals( fit3sls[[ 1 ]]$e1c$eq[[ 1 ]] ) ) 1 2 3 4 5 6 7 8 9 10 11 0.843 -0.698 2.359 1.490 2.139 1.277 1.571 -3.066 -1.125 2.492 -0.108 12 13 14 15 16 17 18 19 20 -2.292 -1.598 -0.271 1.958 -3.430 -0.313 -2.151 1.592 -0.668 > > print( residuals( fit3sls[[ 4 ]]$e1wc ) ) demand supply 1 0.843 0.670 2 -0.698 -0.142 3 2.359 2.659 4 1.490 1.618 5 2.139 2.588 6 1.277 1.485 7 1.571 2.093 8 -3.066 -4.163 9 -1.125 -1.929 10 2.492 3.207 11 -0.108 -0.513 12 -2.292 -2.375 13 -1.598 -2.089 14 -0.271 0.330 15 1.958 3.086 16 -3.430 -4.225 17 -0.313 0.185 18 -2.151 -3.680 19 1.592 1.576 20 -0.668 -0.382 > print( residuals( fit3sls[[ 4 ]]$e1wc$eq[[ 1 ]] ) ) 1 2 3 4 5 6 7 8 9 10 11 0.843 -0.698 2.359 1.490 2.139 1.277 1.571 -3.066 -1.125 2.492 -0.108 12 13 14 15 16 17 18 19 20 -2.292 -1.598 -0.271 1.958 -3.430 -0.313 -2.151 1.592 -0.668 > > print( residuals( fit3sls[[ 2 ]]$e2e ) ) demand supply 1 0.6744 0.0619 2 -0.7785 -0.6344 3 2.2797 2.2267 4 1.4140 1.2428 5 2.2144 2.4566 6 1.3352 1.3851 7 1.6419 2.0264 8 -2.9923 -4.0603 9 -1.0710 -1.8419 10 2.5226 3.1787 11 -0.3346 -0.8086 12 -2.5999 -2.7819 13 -1.8617 -2.3572 14 -0.3584 0.2840 15 2.1419 3.4511 16 -3.2786 -3.7199 17 -0.0706 0.7656 18 -2.1179 -3.2218 19 1.6924 2.0576 20 -0.4528 0.2893 > print( residuals( fit3sls[[ 2 ]]$e2e$eq[[ 2 ]] ) ) 1 2 3 4 5 6 7 8 9 10 0.0619 -0.6344 2.2267 1.2428 2.4566 1.3851 2.0264 -4.0603 -1.8419 3.1787 11 12 13 14 15 16 17 18 19 20 -0.8086 -2.7819 -2.3572 0.2840 3.4511 -3.7199 0.7656 -3.2218 2.0576 0.2893 > > print( residuals( fit3sls[[ 3 ]]$e3 ) ) demand supply 1 0.6499 0.045 2 -0.7902 -0.639 3 2.2682 2.223 4 1.4031 1.239 5 2.2253 2.490 6 1.3437 1.414 7 1.6522 2.051 8 -2.9817 -4.013 9 -1.0632 -1.808 10 2.5270 3.179 11 -0.3675 -0.872 12 -2.6445 -2.878 13 -1.8999 -2.437 14 -0.3711 0.237 15 2.1685 3.474 16 -3.2566 -3.680 17 -0.0355 0.809 18 -2.1131 -3.213 19 1.7070 2.060 20 -0.4215 0.319 > print( residuals( fit3sls[[ 3 ]]$e3$eq[[ 1 ]] ) ) 1 2 3 4 5 6 7 8 9 10 0.6499 -0.7902 2.2682 1.4031 2.2253 1.3437 1.6522 -2.9817 -1.0632 2.5270 11 12 13 14 15 16 17 18 19 20 -0.3675 -2.6445 -1.8999 -0.3711 2.1685 -3.2566 -0.0355 -2.1131 1.7070 -0.4215 > > print( residuals( fit3sls[[ 4 ]]$e4e ) ) demand supply 1 0.9543 0.278 2 -0.6734 -0.586 3 2.3881 2.272 4 1.5091 1.252 5 2.1028 2.356 6 1.2414 1.271 7 1.5161 1.894 8 -3.1487 -4.421 9 -1.1358 -1.958 10 2.5334 3.368 11 0.0936 -0.275 12 -2.0762 -2.176 13 -1.4415 -1.951 14 -0.2039 0.559 15 1.8691 3.353 16 -3.5213 -4.003 17 -0.3804 0.692 18 -2.2018 -3.453 19 1.4834 1.817 20 -0.9080 -0.289 > print( residuals( fit3sls[[ 4 ]]$e4e$eq[[ 2 ]] ) ) 1 2 3 4 5 6 7 8 9 10 11 0.278 -0.586 2.272 1.252 2.356 1.271 1.894 -4.421 -1.958 3.368 -0.275 12 13 14 15 16 17 18 19 20 -2.176 -1.951 0.559 3.353 -4.003 0.692 -3.453 1.817 -0.289 > > print( residuals( fit3sls[[ 5 ]]$e5 ) ) demand supply 1 3.391 2.137 2 0.160 -0.366 3 3.267 2.508 4 2.250 1.132 5 1.168 1.398 6 0.434 0.165 7 0.397 0.594 8 -4.607 -7.911 9 -1.631 -2.964 10 2.800 5.323 11 3.967 4.833 12 2.518 3.479 13 2.169 1.774 14 1.169 3.182 15 -0.415 2.626 16 -5.608 -6.508 17 -2.817 0.433 18 -3.012 -5.580 19 -0.454 -0.427 20 -5.146 -5.829 > print( residuals( fit3sls[[ 5 ]]$e5$eq[[ 1 ]] ) ) 1 2 3 4 5 6 7 8 9 10 11 3.391 0.160 3.267 2.250 1.168 0.434 0.397 -4.607 -1.631 2.800 3.967 12 13 14 15 16 17 18 19 20 2.518 2.169 1.169 -0.415 -5.608 -2.817 -3.012 -0.454 -5.146 > > print( residuals( fit3slsi[[ 2 ]]$e3e ) ) demand supply 1 -0.376 -0.761 2 -1.281 -1.123 3 1.786 1.809 4 0.942 0.878 5 2.683 3.039 6 1.699 1.899 7 2.083 2.477 8 -2.534 -3.021 9 -0.736 -1.093 10 2.713 3.153 11 -1.748 -2.334 12 -4.518 -5.058 13 -3.502 -4.191 14 -0.901 -0.705 15 3.286 4.209 16 -2.334 -2.514 17 1.438 2.113 18 -1.911 -2.680 19 2.320 2.490 20 0.889 1.412 > print( residuals( fit3slsi[[ 2 ]]$e3e$eq[[ 1 ]] ) ) 1 2 3 4 5 6 7 8 9 10 11 -0.376 -1.281 1.786 0.942 2.683 1.699 2.083 -2.534 -0.736 2.713 -1.748 12 13 14 15 16 17 18 19 20 -4.518 -3.502 -0.901 3.286 -2.334 1.438 -1.911 2.320 0.889 > > print( residuals( fit3slsi[[ 1 ]]$e2we ) ) demand supply 1 -0.376 -0.761 2 -1.281 -1.123 3 1.786 1.809 4 0.942 0.878 5 2.683 3.039 6 1.699 1.899 7 2.083 2.477 8 -2.534 -3.021 9 -0.736 -1.093 10 2.713 3.153 11 -1.748 -2.334 12 -4.518 -5.058 13 -3.502 -4.191 14 -0.901 -0.705 15 3.286 4.209 16 -2.334 -2.514 17 1.438 2.113 18 -1.911 -2.680 19 2.320 2.490 20 0.889 1.412 > print( residuals( fit3slsi[[ 1 ]]$e2we$eq[[ 1 ]] ) ) 1 2 3 4 5 6 7 8 9 10 11 -0.376 -1.281 1.786 0.942 2.683 1.699 2.083 -2.534 -0.736 2.713 -1.748 12 13 14 15 16 17 18 19 20 -4.518 -3.502 -0.901 3.286 -2.334 1.438 -1.911 2.320 0.889 > > print( residuals( fit3slsd[[ 3 ]]$e4 ) ) demand supply 1 0.7282 0.088 2 -0.7938 -0.850 3 2.2722 2.054 4 1.3947 1.007 5 2.2092 2.526 6 1.3211 1.378 7 1.6076 1.935 8 -3.0646 -4.397 9 -1.0534 -1.692 10 2.6003 3.674 11 -0.1888 -0.319 12 -2.4839 -2.564 13 -1.8018 -2.397 14 -0.3164 0.423 15 2.1290 3.682 16 -3.3141 -3.704 17 -0.0169 1.445 18 -2.1692 -3.473 19 1.6008 1.716 20 -0.6603 -0.530 > print( residuals( fit3slsd[[ 3 ]]$e4$eq[[ 2 ]] ) ) 1 2 3 4 5 6 7 8 9 10 11 0.088 -0.850 2.054 1.007 2.526 1.378 1.935 -4.397 -1.692 3.674 -0.319 12 13 14 15 16 17 18 19 20 -2.564 -2.397 0.423 3.682 -3.704 1.445 -3.473 1.716 -0.530 > > print( residuals( fit3slsd[[ 5 ]]$e5we ) ) demand supply 1 3.290 2.057 2 0.781 0.154 3 3.754 2.921 4 2.915 1.707 5 0.906 1.148 6 0.394 0.120 7 0.632 0.775 8 -3.766 -7.138 9 -2.167 -3.402 10 1.391 4.066 11 2.631 3.690 12 2.043 3.077 13 2.405 2.007 14 0.885 2.914 15 -1.051 2.024 16 -5.729 -6.584 17 -4.810 -1.328 18 -2.329 -4.924 19 0.576 0.472 20 -2.753 -3.755 > print( residuals( fit3slsd[[ 5 ]]$e5we$eq[[ 2 ]] ) ) 1 2 3 4 5 6 7 8 9 10 11 2.057 0.154 2.921 1.707 1.148 0.120 0.775 -7.138 -3.402 4.066 3.690 12 13 14 15 16 17 18 19 20 3.077 2.007 2.914 2.024 -6.584 -1.328 -4.924 0.472 -3.755 > > > ## *************** coefficients ********************* > print( round( coef( fit3sls[[ 3 ]]$e1c ), digits = 6 ) ) demand_(Intercept) demand_price demand_income supply_(Intercept) 94.633 -0.244 0.314 52.287 supply_price supply_farmPrice supply_trend 0.228 0.227 0.365 > print( round( coef( fit3sls[[ 4 ]]$e1c$eq[[ 2 ]] ), digits = 6 ) ) (Intercept) price farmPrice trend 52.287 0.228 0.227 0.365 > > print( round( coef( fit3slsi[[ 4 ]]$e2 ), digits = 6 ) ) demand_(Intercept) demand_price demand_income supply_(Intercept) 92.074 -0.106 0.200 68.855 supply_price supply_farmPrice supply_trend 0.183 0.120 0.200 > print( round( coef( fit3slsi[[ 5 ]]$e2$eq[[ 1 ]] ), digits = 6 ) ) (Intercept) price income 92.074 -0.106 0.200 > > print( round( coef( fit3sls[[ 2 ]]$e2w ), digits = 6 ) ) demand_(Intercept) demand_price demand_income supply_(Intercept) 94.182 -0.219 0.294 56.254 supply_price supply_farmPrice supply_trend 0.218 0.204 0.294 > print( round( coef( fit3sls[[ 3 ]]$e2w$eq[[ 1 ]] ), digits = 6 ) ) (Intercept) price income 94.182 -0.219 0.294 > > print( round( coef( fit3slsd[[ 5 ]]$e3e ), digits = 6 ) ) demand_(Intercept) demand_price demand_income supply_(Intercept) 109.109 -0.442 0.369 57.268 supply_price supply_farmPrice supply_trend 0.137 0.269 0.369 > print( round( coef( fit3slsd[[ 5 ]]$e3e, modified.regMat = TRUE ), digits = 6 ) ) C1 C2 C3 C4 C5 C6 109.109 -0.442 0.369 57.268 0.137 0.269 > print( round( coef( fit3slsd[[ 1 ]]$e3e$eq[[ 2 ]] ), digits = 6 ) ) (Intercept) price farmPrice trend 40.818 0.357 0.219 0.303 > > print( round( coef( fit3slsd[[ 4 ]]$e3w ), digits = 6 ) ) demand_(Intercept) demand_price demand_income supply_(Intercept) 100.174 -0.325 0.341 49.743 supply_price supply_farmPrice supply_trend 0.237 0.247 0.341 > print( round( coef( fit3slsd[[ 4 ]]$e3w, modified.regMat = TRUE ), digits = 6 ) ) C1 C2 C3 C4 C5 C6 100.174 -0.325 0.341 49.743 0.237 0.247 > print( round( coef( fit3slsd[[ 5 ]]$e3w$eq[[ 2 ]] ), digits = 6 ) ) (Intercept) price farmPrice trend 57.667 0.133 0.270 0.370 > > print( round( coef( fit3sls[[ 1 ]]$e4 ), digits = 6 ) ) demand_(Intercept) demand_price demand_income supply_(Intercept) 93.907 -0.246 0.324 49.905 supply_price supply_farmPrice supply_trend 0.254 0.229 0.324 > print( round( coef( fit3sls[[ 2 ]]$e4$eq[[ 1 ]] ), digits = 6 ) ) (Intercept) price income 93.907 -0.246 0.324 > > print( round( coef( fit3slsi[[ 2 ]]$e4we ), digits = 6 ) ) demand_(Intercept) demand_price demand_income supply_(Intercept) 91.390 -0.217 0.320 47.579 supply_price supply_farmPrice supply_trend 0.283 0.224 0.320 > print( round( coef( fit3slsi[[ 1 ]]$e4we$eq[[ 1 ]] ), digits = 6 ) ) (Intercept) price income 91.390 -0.217 0.320 > > print( round( coef( fit3slsi[[ 2 ]]$e5e ), digits = 6 ) ) demand_(Intercept) demand_price demand_income supply_(Intercept) 91.390 -0.217 0.320 47.579 supply_price supply_farmPrice supply_trend 0.283 0.224 0.320 > print( round( coef( fit3slsi[[ 2 ]]$e5e, modified.regMat = TRUE ), digits = 6 ) ) C1 C2 C3 C4 C5 C6 91.390 -0.217 0.320 47.579 0.283 0.224 > print( round( coef( fit3slsi[[ 3 ]]$e5e$eq[[ 2 ]] ), digits = 6 ) ) (Intercept) price farmPrice trend 47.579 0.283 0.224 0.320 > > > ## *************** coefficients with stats ********************* > print( round( coef( summary( fit3sls[[ 3 ]]$e1c, useDfSys = FALSE ) ), + digits = 6 ) ) Estimate Std. Error t value Pr(>|t|) demand_(Intercept) 94.633 7.9208 11.95 0.000000 demand_price -0.244 0.0965 -2.52 0.021832 demand_income 0.314 0.0469 6.69 0.000004 supply_(Intercept) 52.287 11.8853 4.40 0.000448 supply_price 0.228 0.0997 2.29 0.035951 supply_farmPrice 0.227 0.0438 5.19 0.000089 supply_trend 0.365 0.0707 5.16 0.000095 > print( round( coef( summary( fit3sls[[ 4 ]]$e1c$eq[[ 2 ]], useDfSys = FALSE ) ), + digits = 6 ) ) Estimate Std. Error t value Pr(>|t|) (Intercept) 52.287 11.8853 4.40 0.000448 price 0.228 0.0997 2.29 0.035951 farmPrice 0.227 0.0438 5.19 0.000089 trend 0.365 0.0707 5.16 0.000095 > > print( round( coef( summary( fit3slsd[[ 2 ]]$e1w, useDfSys = FALSE ) ), + digits = 6 ) ) Estimate Std. Error t value Pr(>|t|) demand_(Intercept) 106.789 11.1435 9.58 0.000000 demand_price -0.412 0.1448 -2.84 0.011271 demand_income 0.362 0.0564 6.41 0.000006 supply_(Intercept) 57.295 11.7078 4.89 0.000162 supply_price 0.137 0.0979 1.40 0.179781 supply_farmPrice 0.266 0.0483 5.51 0.000048 supply_trend 0.397 0.0672 5.91 0.000022 > print( round( coef( summary( fit3slsd[[ 3 ]]$e1w$eq[[ 2 ]], useDfSys = FALSE ) ), + digits = 3 ) ) Estimate Std. Error t value Pr(>|t|) (Intercept) 49.532 12.011 4.12 0.001 price 0.240 0.100 2.40 0.029 farmPrice 0.256 0.047 5.41 0.000 trend 0.253 0.100 2.54 0.022 > > print( round( coef( summary( fit3slsi[[ 4 ]]$e2 ) ), digits = 6 ) ) Estimate Std. Error t value Pr(>|t|) demand_(Intercept) 92.074 9.6303 9.56 0.000000 demand_price -0.106 0.1023 -1.04 0.305469 demand_income 0.200 0.0297 6.73 0.000000 supply_(Intercept) 68.855 12.4839 5.52 0.000004 supply_price 0.183 0.1189 1.54 0.132354 supply_farmPrice 0.120 0.0260 4.63 0.000051 supply_trend 0.200 0.0297 6.73 0.000000 > print( round( coef( summary( fit3slsi[[ 5 ]]$e2$eq[[ 1 ]] ) ), digits = 6 ) ) Estimate Std. Error t value Pr(>|t|) (Intercept) 92.074 9.6303 9.56 0.000 price -0.106 0.1023 -1.04 0.305 income 0.200 0.0297 6.73 0.000 > > print( round( coef( summary( fit3slsd[[ 5 ]]$e3e, useDfSys = FALSE ) ), + digits = 6 ) ) Estimate Std. Error t value Pr(>|t|) demand_(Intercept) 109.109 5.8428 18.67 0.000000 demand_price -0.442 0.0737 -6.00 0.000014 demand_income 0.369 0.0432 8.54 0.000000 supply_(Intercept) 57.268 10.0564 5.69 0.000033 supply_price 0.137 0.0705 1.95 0.069081 supply_farmPrice 0.269 0.0403 6.68 0.000005 supply_trend 0.369 0.0432 8.54 0.000000 > print( round( coef( summary( fit3slsd[[ 5 ]]$e3e, useDfSys = FALSE ), + modified.regMat = TRUE ), digits = 6 ) ) Estimate Std. Error t value Pr(>|t|) C1 109.109 5.8428 18.67 NA C2 -0.442 0.0737 -6.00 NA C3 0.369 0.0432 8.54 NA C4 57.268 10.0564 5.69 NA C5 0.137 0.0705 1.95 NA C6 0.269 0.0403 6.68 NA > print( round( coef( summary( fit3slsd[[ 1 ]]$e3e$eq[[ 2 ]], useDfSys = FALSE ) ), + digits = 6 ) ) Estimate Std. Error t value Pr(>|t|) (Intercept) 40.818 10.0564 4.06 0.000912 price 0.357 0.0705 5.06 0.000116 farmPrice 0.219 0.0403 5.45 0.000053 trend 0.303 0.0432 7.00 0.000003 > > print( round( coef( summary( fit3slsi[[ 4 ]]$e3w, useDfSys = FALSE ) ), + digits = 6 ) ) Estimate Std. Error t value Pr(>|t|) demand_(Intercept) 92.074 9.6303 9.56 0.000000 demand_price -0.106 0.1023 -1.04 0.312700 demand_income 0.200 0.0297 6.73 0.000004 supply_(Intercept) 68.855 12.4839 5.52 0.000047 supply_price 0.183 0.1189 1.54 0.142642 supply_farmPrice 0.120 0.0260 4.63 0.000278 supply_trend 0.200 0.0297 6.73 0.000005 > print( round( coef( summary( fit3slsi[[ 4 ]]$e3w, useDfSys = FALSE ), + modified.regMat = TRUE ), digits = 6 ) ) Estimate Std. Error t value Pr(>|t|) C1 92.074 9.6303 9.56 NA C2 -0.106 0.1023 -1.04 NA C3 0.200 0.0297 6.73 NA C4 68.855 12.4839 5.52 NA C5 0.183 0.1189 1.54 NA C6 0.120 0.0260 4.63 NA > print( round( coef( summary( fit3slsi[[ 5 ]]$e3w$eq[[ 2 ]], useDfSys = FALSE ) ), + digits = 6 ) ) Estimate Std. Error t value Pr(>|t|) (Intercept) 68.855 12.4839 5.52 0.000047 price 0.183 0.1189 1.54 0.142642 farmPrice 0.120 0.0260 4.63 0.000278 trend 0.200 0.0297 6.73 0.000005 > > print( round( coef( summary( fit3sls[[ 1 ]]$e4 ) ), digits = 6 ) ) Estimate Std. Error t value Pr(>|t|) demand_(Intercept) 93.907 7.9234 11.85 0.000000 demand_price -0.246 0.0891 -2.76 0.009212 demand_income 0.324 0.0233 13.91 0.000000 supply_(Intercept) 49.905 8.1797 6.10 0.000001 supply_price 0.254 0.0891 2.85 0.007217 supply_farmPrice 0.229 0.0241 9.52 0.000000 supply_trend 0.324 0.0233 13.91 0.000000 > print( round( coef( summary( fit3sls[[ 2 ]]$e4$eq[[ 1 ]] ) ), digits = 6 ) ) Estimate Std. Error t value Pr(>|t|) (Intercept) 93.907 7.9234 11.85 0.00000 price -0.246 0.0891 -2.76 0.00921 income 0.324 0.0233 13.91 0.00000 > > print( round( coef( summary( fit3slsi[[ 2 ]]$e5e ) ), digits = 6 ) ) Estimate Std. Error t value Pr(>|t|) demand_(Intercept) 91.390 7.3161 12.49 0.00000 demand_price -0.217 0.0835 -2.60 0.01365 demand_income 0.320 0.0168 19.07 0.00000 supply_(Intercept) 47.579 7.4268 6.41 0.00000 supply_price 0.283 0.0835 3.39 0.00174 supply_farmPrice 0.224 0.0168 13.36 0.00000 supply_trend 0.320 0.0168 19.07 0.00000 > print( round( coef( summary( fit3slsi[[ 2 ]]$e5e ), modified.regMat = TRUE ), + digits = 6 ) ) Estimate Std. Error t value Pr(>|t|) C1 91.390 7.3161 12.49 0.00000 C2 -0.217 0.0835 -2.60 0.01365 C3 0.320 0.0168 19.07 0.00000 C4 47.579 7.4268 6.41 0.00000 C5 0.283 0.0835 3.39 0.00174 C6 0.224 0.0168 13.36 0.00000 > print( round( coef( summary( fit3slsi[[ 3 ]]$e5e$eq[[ 2 ]] ) ), digits = 6 ) ) Estimate Std. Error t value Pr(>|t|) (Intercept) 47.579 7.4268 6.41 0.00000 price 0.283 0.0835 3.39 0.00174 farmPrice 0.224 0.0168 13.36 0.00000 trend 0.320 0.0168 19.07 0.00000 > > print( round( coef( summary( fit3sls[[ 2 ]]$e5we ) ), digits = 6 ) ) Estimate Std. Error t value Pr(>|t|) demand_(Intercept) 94.083 7.3058 12.88 0.00000 demand_price -0.248 0.0812 -3.06 0.00424 demand_income 0.325 0.0205 15.81 0.00000 supply_(Intercept) 50.019 7.5314 6.64 0.00000 supply_price 0.252 0.0812 3.10 0.00383 supply_farmPrice 0.231 0.0209 11.05 0.00000 supply_trend 0.325 0.0205 15.81 0.00000 > print( round( coef( summary( fit3sls[[ 2 ]]$e5we ), modified.regMat = TRUE ), + digits = 6 ) ) Estimate Std. Error t value Pr(>|t|) C1 94.083 7.3058 12.88 0.00000 C2 -0.248 0.0812 -3.06 0.00424 C3 0.325 0.0205 15.81 0.00000 C4 50.019 7.5314 6.64 0.00000 C5 0.252 0.0812 3.10 0.00383 C6 0.231 0.0209 11.05 0.00000 > print( round( coef( summary( fit3sls[[ 3 ]]$e5we$eq[[ 2 ]] ) ), digits = 6 ) ) Estimate Std. Error t value Pr(>|t|) (Intercept) 50.019 7.5314 6.64 0.00000 price 0.252 0.0812 3.10 0.00383 farmPrice 0.231 0.0209 11.05 0.00000 trend 0.325 0.0205 15.81 0.00000 > > > ## *********** variance covariance matrix of the coefficients ******* > print( round( vcov( fit3sls[[ 3 ]]$e1c ), digits = 5 ) ) demand_(Intercept) demand_price demand_income demand_(Intercept) 62.7397 -0.67342 0.04930 demand_price -0.6734 0.00931 -0.00264 demand_income 0.0493 -0.00264 0.00220 supply_(Intercept) 65.2708 -0.36561 -0.29198 supply_price -0.6979 0.00620 0.00079 supply_farmPrice 0.0423 -0.00227 0.00189 supply_trend 0.0638 -0.00342 0.00285 supply_(Intercept) supply_price supply_farmPrice demand_(Intercept) 65.271 -0.69790 0.04230 demand_price -0.366 0.00620 -0.00227 demand_income -0.292 0.00079 0.00189 supply_(Intercept) 141.261 -1.08251 -0.29300 supply_price -1.083 0.00993 0.00080 supply_farmPrice -0.293 0.00080 0.00192 supply_trend -0.417 0.00110 0.00263 supply_trend demand_(Intercept) 0.06383 demand_price -0.00342 demand_income 0.00285 supply_(Intercept) -0.41674 supply_price 0.00110 supply_farmPrice 0.00263 supply_trend 0.00500 > print( round( vcov( fit3sls[[ 4 ]]$e1c$eq[[ 2 ]] ), digits = 5 ) ) (Intercept) price farmPrice trend (Intercept) 141.261 -1.08251 -0.29300 -0.41674 price -1.083 0.00993 0.00080 0.00110 farmPrice -0.293 0.00080 0.00192 0.00263 trend -0.417 0.00110 0.00263 0.00500 > > print( round( vcov( fit3sls[[ 4 ]]$e2 ), digits = 5 ) ) demand_(Intercept) demand_price demand_income demand_(Intercept) 64.2351 -0.68447 0.04535 demand_price -0.6845 0.00921 -0.00243 demand_income 0.0454 -0.00243 0.00203 supply_(Intercept) 67.0281 -0.42600 -0.24804 supply_price -0.7080 0.00641 0.00069 supply_farmPrice 0.0366 -0.00196 0.00164 supply_trend 0.0454 -0.00243 0.00203 supply_(Intercept) supply_price supply_farmPrice demand_(Intercept) 67.028 -0.70800 0.03661 demand_price -0.426 0.00641 -0.00196 demand_income -0.248 0.00069 0.00164 supply_(Intercept) 134.043 -1.07653 -0.24277 supply_price -1.077 0.01003 0.00068 supply_farmPrice -0.243 0.00068 0.00163 supply_trend -0.248 0.00069 0.00164 supply_trend demand_(Intercept) 0.04535 demand_price -0.00243 demand_income 0.00203 supply_(Intercept) -0.24804 supply_price 0.00069 supply_farmPrice 0.00164 supply_trend 0.00203 > print( round( vcov( fit3sls[[ 5 ]]$e2$eq[[ 1 ]] ), digits = 5 ) ) (Intercept) price income (Intercept) 64.2351 -0.68447 0.04535 price -0.6845 0.00921 -0.00243 income 0.0454 -0.00243 0.00203 > > print( round( vcov( fit3sls[[ 5 ]]$e3e ), digits = 5 ) ) demand_(Intercept) demand_price demand_income demand_(Intercept) 54.6190 -0.58283 0.03940 demand_price -0.5828 0.00789 -0.00211 demand_income 0.0394 -0.00211 0.00176 supply_(Intercept) 55.1360 -0.34396 -0.21065 supply_price -0.5835 0.00527 0.00058 supply_farmPrice 0.0310 -0.00166 0.00139 supply_trend 0.0394 -0.00211 0.00176 supply_(Intercept) supply_price supply_farmPrice demand_(Intercept) 55.136 -0.58348 0.03102 demand_price -0.344 0.00527 -0.00166 demand_income -0.211 0.00058 0.00139 supply_(Intercept) 108.147 -0.86360 -0.19987 supply_price -0.864 0.00803 0.00056 supply_farmPrice -0.200 0.00056 0.00134 supply_trend -0.211 0.00058 0.00139 supply_trend demand_(Intercept) 0.03940 demand_price -0.00211 demand_income 0.00176 supply_(Intercept) -0.21065 supply_price 0.00058 supply_farmPrice 0.00139 supply_trend 0.00176 > print( round( vcov( fit3sls[[ 5 ]]$e3e, modified.regMat = TRUE ), digits = 5 ) ) C1 C2 C3 C4 C5 C6 C1 54.6190 -0.58283 0.03940 55.136 -0.58348 0.03102 C2 -0.5828 0.00789 -0.00211 -0.344 0.00527 -0.00166 C3 0.0394 -0.00211 0.00176 -0.211 0.00058 0.00139 C4 55.1360 -0.34396 -0.21065 108.147 -0.86360 -0.19987 C5 -0.5835 0.00527 0.00058 -0.864 0.00803 0.00056 C6 0.0310 -0.00166 0.00139 -0.200 0.00056 0.00134 > print( round( vcov( fit3sls[[ 1 ]]$e3e$eq[[ 2 ]] ), digits = 5 ) ) (Intercept) price farmPrice trend (Intercept) 108.147 -0.86360 -0.19987 -0.21065 price -0.864 0.00803 0.00056 0.00058 farmPrice -0.200 0.00056 0.00134 0.00139 trend -0.211 0.00058 0.00139 0.00176 > > print( round( vcov( fit3sls[[ 1 ]]$e4 ), digits = 5 ) ) demand_(Intercept) demand_price demand_income demand_(Intercept) 62.7805 -0.68439 0.06014 demand_price -0.6844 0.00794 -0.00113 demand_income 0.0601 -0.00113 0.00054 supply_(Intercept) 63.2287 -0.69892 0.07078 supply_price -0.6844 0.00794 -0.00113 supply_farmPrice 0.0499 -0.00087 0.00038 supply_trend 0.0601 -0.00113 0.00054 supply_(Intercept) supply_price supply_farmPrice demand_(Intercept) 63.2287 -0.68439 0.04986 demand_price -0.6989 0.00794 -0.00087 demand_income 0.0708 -0.00113 0.00038 supply_(Intercept) 66.9073 -0.69892 0.02657 supply_price -0.6989 0.00794 -0.00087 supply_farmPrice 0.0266 -0.00087 0.00058 supply_trend 0.0708 -0.00113 0.00038 supply_trend demand_(Intercept) 0.06014 demand_price -0.00113 demand_income 0.00054 supply_(Intercept) 0.07078 supply_price -0.00113 supply_farmPrice 0.00038 supply_trend 0.00054 > print( round( vcov( fit3sls[[ 2 ]]$e4$eq[[ 1 ]] ), digits = 5 ) ) (Intercept) price income (Intercept) 62.7805 -0.68439 0.06014 price -0.6844 0.00794 -0.00113 income 0.0601 -0.00113 0.00054 > > print( round( vcov( fit3sls[[ 3 ]]$e4wSym ), digits = 5 ) ) demand_(Intercept) demand_price demand_income demand_(Intercept) 62.5490 -0.68436 0.06248 demand_price -0.6844 0.00795 -0.00113 demand_income 0.0625 -0.00113 0.00052 supply_(Intercept) 62.9766 -0.69799 0.07241 supply_price -0.6844 0.00795 -0.00113 supply_farmPrice 0.0522 -0.00088 0.00037 supply_trend 0.0625 -0.00113 0.00052 supply_(Intercept) supply_price supply_farmPrice demand_(Intercept) 62.9766 -0.68436 0.05220 demand_price -0.6980 0.00795 -0.00088 demand_income 0.0724 -0.00113 0.00037 supply_(Intercept) 66.4588 -0.69799 0.03007 supply_price -0.6980 0.00795 -0.00088 supply_farmPrice 0.0301 -0.00088 0.00056 supply_trend 0.0724 -0.00113 0.00037 supply_trend demand_(Intercept) 0.06248 demand_price -0.00113 demand_income 0.00052 supply_(Intercept) 0.07241 supply_price -0.00113 supply_farmPrice 0.00037 supply_trend 0.00052 > print( round( vcov( fit3sls[[ 4 ]]$e4wSym$eq[[ 1 ]] ), digits = 5 ) ) (Intercept) price income (Intercept) 62.5490 -0.68436 0.06248 price -0.6844 0.00795 -0.00113 income 0.0625 -0.00113 0.00052 > > print( round( vcov( fit3sls[[ 2 ]]$e5e ), digits = 5 ) ) demand_(Intercept) demand_price demand_income demand_(Intercept) 53.5147 -0.57537 0.04304 demand_price -0.5754 0.00659 -0.00085 demand_income 0.0430 -0.00085 0.00044 supply_(Intercept) 53.9493 -0.58881 0.05259 supply_price -0.5754 0.00659 -0.00085 supply_farmPrice 0.0345 -0.00063 0.00029 supply_trend 0.0430 -0.00085 0.00044 supply_(Intercept) supply_price supply_farmPrice demand_(Intercept) 53.9493 -0.57537 0.03449 demand_price -0.5888 0.00659 -0.00063 demand_income 0.0526 -0.00085 0.00029 supply_(Intercept) 57.0063 -0.58881 0.01639 supply_price -0.5888 0.00659 -0.00063 supply_farmPrice 0.0164 -0.00063 0.00045 supply_trend 0.0526 -0.00085 0.00029 supply_trend demand_(Intercept) 0.04304 demand_price -0.00085 demand_income 0.00044 supply_(Intercept) 0.05259 supply_price -0.00085 supply_farmPrice 0.00029 supply_trend 0.00044 > print( round( vcov( fit3sls[[ 2 ]]$e5e, modified.regMat = TRUE ), digits = 5 ) ) C1 C2 C3 C4 C5 C6 C1 53.5147 -0.57537 0.04304 53.9493 -0.57537 0.03449 C2 -0.5754 0.00659 -0.00085 -0.5888 0.00659 -0.00063 C3 0.0430 -0.00085 0.00044 0.0526 -0.00085 0.00029 C4 53.9493 -0.58881 0.05259 57.0063 -0.58881 0.01639 C5 -0.5754 0.00659 -0.00085 -0.5888 0.00659 -0.00063 C6 0.0345 -0.00063 0.00029 0.0164 -0.00063 0.00045 > print( round( vcov( fit3sls[[ 3 ]]$e5e$eq[[ 2 ]] ), digits = 5 ) ) (Intercept) price farmPrice trend (Intercept) 57.0063 -0.58881 0.01639 0.05259 price -0.5888 0.00659 -0.00063 -0.00085 farmPrice 0.0164 -0.00063 0.00045 0.00029 trend 0.0526 -0.00085 0.00029 0.00044 > > print( round( vcov( fit3slsi[[ 4 ]]$e1e ), digits = 5 ) ) demand_(Intercept) demand_price demand_income demand_(Intercept) 53.3287 -0.57241 0.04191 demand_price -0.5724 0.00791 -0.00225 demand_income 0.0419 -0.00225 0.00187 supply_(Intercept) 60.8329 -0.34075 -0.27213 supply_price -0.6504 0.00578 0.00074 supply_farmPrice 0.0394 -0.00211 0.00176 supply_trend 0.0595 -0.00319 0.00266 supply_(Intercept) supply_price supply_farmPrice demand_(Intercept) 60.833 -0.65044 0.03942 demand_price -0.341 0.00578 -0.00211 demand_income -0.272 0.00074 0.00176 supply_(Intercept) 129.860 -0.99616 -0.26688 supply_price -0.996 0.00915 0.00073 supply_farmPrice -0.267 0.00073 0.00173 supply_trend -0.396 0.00107 0.00255 supply_trend demand_(Intercept) 0.05949 demand_price -0.00319 demand_income 0.00266 supply_(Intercept) -0.39621 supply_price 0.00107 supply_farmPrice 0.00255 supply_trend 0.00411 > print( round( vcov( fit3slsi[[ 3 ]]$e1e$eq[[ 1 ]] ), digits = 5 ) ) (Intercept) price income (Intercept) 53.3287 -0.57241 0.04191 price -0.5724 0.00791 -0.00225 income 0.0419 -0.00225 0.00187 > > print( round( vcov( fit3slsi[[ 5 ]]$e1we ), digits = 5 ) ) demand_(Intercept) demand_price demand_income demand_(Intercept) 53.3287 -0.57241 0.04191 demand_price -0.5724 0.00791 -0.00225 demand_income 0.0419 -0.00225 0.00187 supply_(Intercept) 60.8329 -0.34075 -0.27213 supply_price -0.6504 0.00578 0.00074 supply_farmPrice 0.0394 -0.00211 0.00176 supply_trend 0.0595 -0.00319 0.00266 supply_(Intercept) supply_price supply_farmPrice demand_(Intercept) 60.833 -0.65044 0.03942 demand_price -0.341 0.00578 -0.00211 demand_income -0.272 0.00074 0.00176 supply_(Intercept) 129.860 -0.99616 -0.26688 supply_price -0.996 0.00915 0.00073 supply_farmPrice -0.267 0.00073 0.00173 supply_trend -0.396 0.00107 0.00255 supply_trend demand_(Intercept) 0.05949 demand_price -0.00319 demand_income 0.00266 supply_(Intercept) -0.39621 supply_price 0.00107 supply_farmPrice 0.00255 supply_trend 0.00411 > print( round( vcov( fit3slsi[[ 1 ]]$e1we$eq[[ 2 ]] ), digits = 5 ) ) (Intercept) price farmPrice trend (Intercept) 129.860 -0.99616 -0.26688 -0.39621 price -0.996 0.00915 0.00073 0.00107 farmPrice -0.267 0.00073 0.00173 0.00255 trend -0.396 0.00107 0.00255 0.00411 > > print( round( vcov( fit3slsi[[ 5 ]]$e2e ), digits = 5 ) ) demand_(Intercept) demand_price demand_income demand_(Intercept) 79.5917 -0.81281 0.02003 demand_price -0.8128 0.00917 -0.00107 demand_income 0.0200 -0.00107 0.00090 supply_(Intercept) 90.3437 -0.79178 -0.11134 supply_price -0.9184 0.00888 0.00031 supply_farmPrice 0.0165 -0.00088 0.00074 supply_trend 0.0200 -0.00107 0.00090 supply_(Intercept) supply_price supply_farmPrice demand_(Intercept) 90.3437 -0.91836 0.01646 demand_price -0.7918 0.00888 -0.00088 demand_income -0.1113 0.00031 0.00074 supply_(Intercept) 124.3894 -1.13680 -0.09494 supply_price -1.1368 0.01108 0.00026 supply_farmPrice -0.0949 0.00026 0.00063 supply_trend -0.1113 0.00031 0.00074 supply_trend demand_(Intercept) 0.02003 demand_price -0.00107 demand_income 0.00090 supply_(Intercept) -0.11134 supply_price 0.00031 supply_farmPrice 0.00074 supply_trend 0.00090 > print( round( vcov( fit3slsi[[ 4 ]]$e2e$eq[[ 2 ]] ), digits = 5 ) ) (Intercept) price farmPrice trend (Intercept) 124.3894 -1.13680 -0.09494 -0.11134 price -1.1368 0.01108 0.00026 0.00031 farmPrice -0.0949 0.00026 0.00063 0.00074 trend -0.1113 0.00031 0.00074 0.00090 > > print( round( vcov( fit3slsi[[ 1 ]]$e3 ), digits = 5 ) ) demand_(Intercept) demand_price demand_income demand_(Intercept) 92.7431 -0.94355 0.01968 demand_price -0.9435 0.01046 -0.00105 demand_income 0.0197 -0.00105 0.00088 supply_(Intercept) 110.7701 -0.99345 -0.11331 supply_price -1.1222 0.01091 0.00031 supply_farmPrice 0.0168 -0.00090 0.00075 supply_trend 0.0197 -0.00105 0.00088 supply_(Intercept) supply_price supply_farmPrice demand_(Intercept) 110.770 -1.12223 0.01680 demand_price -0.993 0.01091 -0.00090 demand_income -0.113 0.00031 0.00075 supply_(Intercept) 155.849 -1.44407 -0.10125 supply_price -1.444 0.01413 0.00028 supply_farmPrice -0.101 0.00028 0.00067 supply_trend -0.113 0.00031 0.00075 supply_trend demand_(Intercept) 0.01968 demand_price -0.00105 demand_income 0.00088 supply_(Intercept) -0.11331 supply_price 0.00031 supply_farmPrice 0.00075 supply_trend 0.00088 > print( round( vcov( fit3slsi[[ 1 ]]$e3, modified.regMat = TRUE ), digits = 5 ) ) C1 C2 C3 C4 C5 C6 C1 92.7431 -0.94355 0.01968 110.770 -1.12223 0.01680 C2 -0.9435 0.01046 -0.00105 -0.993 0.01091 -0.00090 C3 0.0197 -0.00105 0.00088 -0.113 0.00031 0.00075 C4 110.7701 -0.99345 -0.11331 155.849 -1.44407 -0.10125 C5 -1.1222 0.01091 0.00031 -1.444 0.01413 0.00028 C6 0.0168 -0.00090 0.00075 -0.101 0.00028 0.00067 > print( round( vcov( fit3slsi[[ 5 ]]$e3$eq[[ 1 ]] ), digits = 5 ) ) (Intercept) price income (Intercept) 92.7431 -0.94355 0.01968 price -0.9435 0.01046 -0.00105 income 0.0197 -0.00105 0.00088 > > print( round( vcov( fit3slsi[[ 2 ]]$e4e ), digits = 5 ) ) demand_(Intercept) demand_price demand_income demand_(Intercept) 53.5249 -0.60193 0.07023 demand_price -0.6019 0.00697 -0.00098 demand_income 0.0702 -0.00098 0.00028 supply_(Intercept) 53.7695 -0.60749 0.07383 supply_price -0.6019 0.00697 -0.00098 supply_farmPrice 0.0611 -0.00082 0.00022 supply_trend 0.0702 -0.00098 0.00028 supply_(Intercept) supply_price supply_farmPrice demand_(Intercept) 53.7695 -0.60193 0.06114 demand_price -0.6075 0.00697 -0.00082 demand_income 0.0738 -0.00098 0.00022 supply_(Intercept) 55.1575 -0.60749 0.05283 supply_price -0.6075 0.00697 -0.00082 supply_farmPrice 0.0528 -0.00082 0.00028 supply_trend 0.0738 -0.00098 0.00022 supply_trend demand_(Intercept) 0.07023 demand_price -0.00098 demand_income 0.00028 supply_(Intercept) 0.07383 supply_price -0.00098 supply_farmPrice 0.00022 supply_trend 0.00028 > print( round( vcov( fit3slsi[[ 1 ]]$e4e$eq[[ 2 ]] ), digits = 5 ) ) (Intercept) price farmPrice trend (Intercept) 55.1575 -0.60749 0.05283 0.07383 price -0.6075 0.00697 -0.00082 -0.00098 farmPrice 0.0528 -0.00082 0.00028 0.00022 trend 0.0738 -0.00098 0.00022 0.00028 > > print( round( vcov( fit3slsi[[ 3 ]]$e5 ), digits = 5 ) ) demand_(Intercept) demand_price demand_income demand_(Intercept) 62.6857 -0.71803 0.09573 demand_price -0.7180 0.00846 -0.00132 demand_income 0.0957 -0.00132 0.00037 supply_(Intercept) 62.7317 -0.72119 0.09909 supply_price -0.7180 0.00846 -0.00132 supply_farmPrice 0.0863 -0.00115 0.00030 supply_trend 0.0957 -0.00132 0.00037 supply_(Intercept) supply_price supply_farmPrice demand_(Intercept) 62.7317 -0.71803 0.08635 demand_price -0.7212 0.00846 -0.00115 demand_income 0.0991 -0.00132 0.00030 supply_(Intercept) 64.1668 -0.72119 0.07539 supply_price -0.7212 0.00846 -0.00115 supply_farmPrice 0.0754 -0.00115 0.00038 supply_trend 0.0991 -0.00132 0.00030 supply_trend demand_(Intercept) 0.09573 demand_price -0.00132 demand_income 0.00037 supply_(Intercept) 0.09909 supply_price -0.00132 supply_farmPrice 0.00030 supply_trend 0.00037 > print( round( vcov( fit3slsi[[ 3 ]]$e5, modified.regMat = TRUE ), digits = 5 ) ) C1 C2 C3 C4 C5 C6 C1 62.6857 -0.71803 0.09573 62.7317 -0.71803 0.08635 C2 -0.7180 0.00846 -0.00132 -0.7212 0.00846 -0.00115 C3 0.0957 -0.00132 0.00037 0.0991 -0.00132 0.00030 C4 62.7317 -0.72119 0.09909 64.1668 -0.72119 0.07539 C5 -0.7180 0.00846 -0.00132 -0.7212 0.00846 -0.00115 C6 0.0863 -0.00115 0.00030 0.0754 -0.00115 0.00038 > print( round( vcov( fit3slsi[[ 2 ]]$e5$eq[[ 1 ]] ), digits = 5 ) ) (Intercept) price income (Intercept) 62.6857 -0.71803 0.09573 price -0.7180 0.00846 -0.00132 income 0.0957 -0.00132 0.00037 > > print( round( vcov( fit3slsi[[ 5 ]]$e5w ), digits = 5 ) ) demand_(Intercept) demand_price demand_income demand_(Intercept) 107.334 -1.39936 0.34281 demand_price -1.399 0.01904 -0.00518 demand_income 0.343 -0.00518 0.00179 supply_(Intercept) 95.422 -1.22389 0.29205 supply_price -1.399 0.01904 -0.00518 supply_farmPrice 0.439 -0.00648 0.00214 supply_trend 0.343 -0.00518 0.00179 supply_(Intercept) supply_price supply_farmPrice demand_(Intercept) 95.422 -1.39936 0.43918 demand_price -1.224 0.01904 -0.00648 demand_income 0.292 -0.00518 0.00214 supply_(Intercept) 92.381 -1.22389 0.30881 supply_price -1.224 0.01904 -0.00648 supply_farmPrice 0.309 -0.00648 0.00328 supply_trend 0.292 -0.00518 0.00214 supply_trend demand_(Intercept) 0.34281 demand_price -0.00518 demand_income 0.00179 supply_(Intercept) 0.29205 supply_price -0.00518 supply_farmPrice 0.00214 supply_trend 0.00179 > print( round( vcov( fit3slsi[[ 5 ]]$e5w, modified.regMat = TRUE ), digits = 5 ) ) C1 C2 C3 C4 C5 C6 C1 107.334 -1.39936 0.34281 95.422 -1.39936 0.43918 C2 -1.399 0.01904 -0.00518 -1.224 0.01904 -0.00648 C3 0.343 -0.00518 0.00179 0.292 -0.00518 0.00214 C4 95.422 -1.22389 0.29205 92.381 -1.22389 0.30881 C5 -1.399 0.01904 -0.00518 -1.224 0.01904 -0.00648 C6 0.439 -0.00648 0.00214 0.309 -0.00648 0.00328 > print( round( vcov( fit3slsi[[ 4 ]]$e5w$eq[[ 1 ]] ), digits = 5 ) ) (Intercept) price income (Intercept) 62.6858 -0.71803 0.09573 price -0.7180 0.00846 -0.00132 income 0.0957 -0.00132 0.00037 > > print( round( vcov( fit3slsd[[ 5 ]]$e1c ), digits = 5 ) ) demand_(Intercept) demand_price demand_income demand_(Intercept) 124.179 -1.51767 0.28519 demand_price -1.518 0.02098 -0.00595 demand_income 0.285 -0.00595 0.00318 supply_(Intercept) 45.831 -0.16114 -0.30261 supply_price -0.564 0.00477 0.00089 supply_farmPrice 0.157 -0.00365 0.00213 supply_trend -0.416 0.00351 0.00066 supply_(Intercept) supply_price supply_farmPrice demand_(Intercept) 45.831 -0.56422 0.15696 demand_price -0.161 0.00477 -0.00365 demand_income -0.303 0.00089 0.00213 supply_(Intercept) 132.389 -0.93831 -0.33973 supply_price -0.938 0.00791 0.00115 supply_farmPrice -0.340 0.00115 0.00221 supply_trend -0.515 0.00349 0.00108 supply_trend demand_(Intercept) -0.41585 demand_price 0.00351 demand_income 0.00066 supply_(Intercept) -0.51541 supply_price 0.00349 supply_farmPrice 0.00108 supply_trend 0.00585 > print( round( vcov( fit3slsd[[ 2 ]]$e1c$eq[[ 2 ]] ), digits = 5 ) ) (Intercept) price farmPrice trend (Intercept) 136.580 -1.06234 -0.24479 -0.60682 price -0.994 0.00955 -0.00011 0.00471 farmPrice -0.334 0.00098 0.00234 0.00096 trend -0.438 0.00119 0.00284 0.00415 > > print( round( vcov( fit3slsd[[ 1 ]]$e2 ), digits = 5 ) ) demand_(Intercept) demand_price demand_income demand_(Intercept) 40.2908 -0.42351 0.02315 demand_price -0.4235 0.00660 -0.00242 demand_income 0.0232 -0.00242 0.00225 supply_(Intercept) 23.1539 0.17811 -0.41781 supply_price -0.2648 0.00059 0.00211 supply_farmPrice 0.0342 -0.00220 0.00190 supply_trend 0.0232 -0.00242 0.00225 supply_(Intercept) supply_price supply_farmPrice demand_(Intercept) 23.154 -0.26482 0.03423 demand_price 0.178 0.00059 -0.00220 demand_income -0.418 0.00211 0.00190 supply_(Intercept) 125.488 -0.81757 -0.40378 supply_price -0.818 0.00616 0.00186 supply_farmPrice -0.404 0.00186 0.00205 supply_trend -0.418 0.00211 0.00190 supply_trend demand_(Intercept) 0.02315 demand_price -0.00242 demand_income 0.00225 supply_(Intercept) -0.41781 supply_price 0.00211 supply_farmPrice 0.00190 supply_trend 0.00225 > print( round( vcov( fit3slsd[[ 3 ]]$e2$eq[[ 1 ]] ), digits = 5 ) ) (Intercept) price income (Intercept) 99.763 -1.2027 0.21239 price -1.203 0.0168 -0.00490 income 0.212 -0.0049 0.00285 > > print( round( vcov( fit3slsd[[ 5 ]]$e2we ), digits = 5 ) ) demand_(Intercept) demand_price demand_income demand_(Intercept) 34.9080 -0.36232 0.01530 demand_price -0.3623 0.00556 -0.00199 demand_income 0.0153 -0.00199 0.00188 supply_(Intercept) 20.3293 0.13409 -0.34409 supply_price -0.2272 0.00057 0.00174 supply_farmPrice 0.0249 -0.00176 0.00155 supply_trend 0.0153 -0.00199 0.00188 supply_(Intercept) supply_price supply_farmPrice demand_(Intercept) 20.329 -0.22716 0.02494 demand_price 0.134 0.00057 -0.00176 demand_income -0.344 0.00174 0.00155 supply_(Intercept) 102.201 -0.66897 -0.32522 supply_price -0.669 0.00505 0.00150 supply_farmPrice -0.325 0.00150 0.00164 supply_trend -0.344 0.00174 0.00155 supply_trend demand_(Intercept) 0.01530 demand_price -0.00199 demand_income 0.00188 supply_(Intercept) -0.34409 supply_price 0.00174 supply_farmPrice 0.00155 supply_trend 0.00188 > print( round( vcov( fit3slsd[[ 3 ]]$e2we$eq[[ 1 ]] ), digits = 5 ) ) (Intercept) price income (Intercept) 83.743 -1.0065 0.17519 price -1.006 0.0141 -0.00410 income 0.175 -0.0041 0.00241 > > print( round( vcov( fit3slsd[[ 2 ]]$e3 ), digits = 5 ) ) demand_(Intercept) demand_price demand_income demand_(Intercept) 155.228 -2.21373 0.68055 demand_price -1.929 0.03005 -0.01103 demand_income 0.389 -0.00812 0.00434 supply_(Intercept) 120.424 -1.33693 0.13854 supply_price -1.546 0.02054 -0.00522 supply_farmPrice 0.314 -0.00655 0.00350 supply_trend 0.389 -0.00812 0.00434 supply_(Intercept) supply_price supply_farmPrice demand_(Intercept) -25.183 -0.42614 0.63002 demand_price 0.811 0.00271 -0.01000 demand_income -0.572 0.00159 0.00380 supply_(Intercept) 84.582 -0.95409 0.10043 supply_price -0.279 0.00796 -0.00478 supply_farmPrice -0.521 0.00147 0.00350 supply_trend -0.572 0.00159 0.00380 supply_trend demand_(Intercept) 0.68055 demand_price -0.01103 demand_income 0.00434 supply_(Intercept) 0.13854 supply_price -0.00522 supply_farmPrice 0.00350 supply_trend 0.00434 > print( round( vcov( fit3slsd[[ 2 ]]$e3, modified.regMat = TRUE ), digits = 5 ) ) C1 C2 C3 C4 C5 C6 C1 155.228 -2.21373 0.68055 -25.183 -0.42614 0.63002 C2 -1.929 0.03005 -0.01103 0.811 0.00271 -0.01000 C3 0.389 -0.00812 0.00434 -0.572 0.00159 0.00380 C4 120.424 -1.33693 0.13854 84.582 -0.95409 0.10043 C5 -1.546 0.02054 -0.00522 -0.279 0.00796 -0.00478 C6 0.314 -0.00655 0.00350 -0.521 0.00147 0.00350 > print( round( vcov( fit3slsd[[ 4 ]]$e3$eq[[ 2 ]] ), digits = 5 ) ) (Intercept) price farmPrice trend (Intercept) 149.704 -1.13641 -0.33425 -0.32676 price -1.136 0.01036 0.00094 0.00091 farmPrice -0.334 0.00094 0.00225 0.00216 trend -0.327 0.00091 0.00216 0.00259 > > print( round( vcov( fit3slsd[[ 3 ]]$e4 ), digits = 5 ) ) demand_(Intercept) demand_price demand_income demand_(Intercept) 105.016 -1.17085 0.12591 demand_price -1.171 0.01356 -0.00191 demand_income 0.126 -0.00191 0.00066 supply_(Intercept) 106.127 -1.19320 0.13778 supply_price -1.171 0.01356 -0.00191 supply_farmPrice 0.102 -0.00148 0.00047 supply_trend 0.126 -0.00191 0.00066 supply_(Intercept) supply_price supply_farmPrice demand_(Intercept) 106.1266 -1.17085 0.10227 demand_price -1.1932 0.01356 -0.00148 demand_income 0.1378 -0.00191 0.00047 supply_(Intercept) 110.0305 -1.19320 0.08453 supply_price -1.1932 0.01356 -0.00148 supply_farmPrice 0.0845 -0.00148 0.00061 supply_trend 0.1378 -0.00191 0.00047 supply_trend demand_(Intercept) 0.12591 demand_price -0.00191 demand_income 0.00066 supply_(Intercept) 0.13778 supply_price -0.00191 supply_farmPrice 0.00047 supply_trend 0.00066 > print( round( vcov( fit3slsd[[ 5 ]]$e4$eq[[ 1 ]] ), digits = 5 ) ) (Intercept) price income (Intercept) 28.9118 -0.25481 -0.03319 price -0.2548 0.00254 0.00001 income -0.0332 0.00001 0.00033 > > print( round( vcov( fit3slsd[[ 4 ]]$e5e ), digits = 5 ) ) demand_(Intercept) demand_price demand_income demand_(Intercept) 57.3878 -0.60414 0.03280 demand_price -0.6041 0.00675 -0.00073 demand_income 0.0328 -0.00073 0.00041 supply_(Intercept) 57.4828 -0.61352 0.04167 supply_price -0.6041 0.00675 -0.00073 supply_farmPrice 0.0288 -0.00056 0.00028 supply_trend 0.0328 -0.00073 0.00041 supply_(Intercept) supply_price supply_farmPrice demand_(Intercept) 57.4828 -0.60414 0.02879 demand_price -0.6135 0.00675 -0.00056 demand_income 0.0417 -0.00073 0.00028 supply_(Intercept) 59.8263 -0.61352 0.01389 supply_price -0.6135 0.00675 -0.00056 supply_farmPrice 0.0139 -0.00056 0.00041 supply_trend 0.0417 -0.00073 0.00028 supply_trend demand_(Intercept) 0.03280 demand_price -0.00073 demand_income 0.00041 supply_(Intercept) 0.04167 supply_price -0.00073 supply_farmPrice 0.00028 supply_trend 0.00041 > print( round( vcov( fit3slsd[[ 4 ]]$e5e, modified.regMat = TRUE ), digits = 5 ) ) C1 C2 C3 C4 C5 C6 C1 57.3878 -0.60414 0.03280 57.4828 -0.60414 0.02879 C2 -0.6041 0.00675 -0.00073 -0.6135 0.00675 -0.00056 C3 0.0328 -0.00073 0.00041 0.0417 -0.00073 0.00028 C4 57.4828 -0.61352 0.04167 59.8263 -0.61352 0.01389 C5 -0.6041 0.00675 -0.00073 -0.6135 0.00675 -0.00056 C6 0.0288 -0.00056 0.00028 0.0139 -0.00056 0.00041 > print( round( vcov( fit3slsd[[ 1 ]]$e5e$eq[[ 2 ]] ), digits = 5 ) ) (Intercept) price farmPrice trend (Intercept) 24.9502 -0.21066 -0.03490 -0.02530 price -0.2107 0.00210 0.00000 0.00004 farmPrice -0.0349 0.00000 0.00034 0.00018 trend -0.0253 0.00004 0.00018 0.00028 > > > ## *********** confidence intervals of coefficients ************* > print( confint( fit3sls[[ 1 ]]$e1c, useDfSys = TRUE ) ) 2.5 % 97.5 % demand_(Intercept) 78.518 110.748 demand_price -0.440 -0.047 demand_income 0.218 0.409 supply_(Intercept) 28.106 76.468 supply_price 0.025 0.431 supply_farmPrice 0.138 0.316 supply_trend 0.221 0.509 > print( confint( fit3sls[[ 1 ]]$e1c$eq[[ 1 ]], level = 0.9, useDfSys = TRUE ) ) 5 % 95 % (Intercept) 81.228 108.038 price -0.407 -0.080 income 0.235 0.393 > > print( confint( fit3sls[[ 2 ]]$e2e, level = 0.9, useDfSys = TRUE ) ) 5 % 95 % demand_(Intercept) 79.254 109.293 demand_price -0.405 -0.044 demand_income 0.213 0.383 supply_(Intercept) 34.318 76.586 supply_price 0.039 0.403 supply_farmPrice 0.135 0.284 supply_trend 0.213 0.383 > print( confint( fit3sls[[ 2 ]]$e2e$eq[[ 2 ]], level = 0.99, useDfSys = TRUE ) ) 0.5 % 99.5 % (Intercept) 27.079 83.826 price -0.024 0.465 farmPrice 0.110 0.309 trend 0.183 0.412 > > print( confint( fit3sls[[ 3 ]]$e3, level = 0.99 ) ) 0.5 % 99.5 % demand_(Intercept) 77.934 110.509 demand_price -0.417 -0.026 demand_income 0.204 0.387 supply_(Intercept) 32.432 79.489 supply_price 0.016 0.423 supply_farmPrice 0.124 0.288 supply_trend 0.204 0.387 > print( confint( fit3sls[[ 3 ]]$e3$eq[[ 1 ]], level = 0.5 ) ) 25 % 75 % (Intercept) 88.757 99.686 price -0.287 -0.156 income 0.265 0.326 > > print( confint( fit3sls[[ 5 ]]$e3we, level = 0.99 ) ) 0.5 % 99.5 % demand_(Intercept) 79.280 109.202 demand_price -0.402 -0.043 demand_income 0.212 0.381 supply_(Intercept) 34.570 76.815 supply_price 0.038 0.402 supply_farmPrice 0.134 0.282 supply_trend 0.212 0.381 > print( confint( fit3sls[[ 5 ]]$e3we$eq[[ 1 ]], level = 0.5 ) ) 25 % 75 % (Intercept) 89.222 99.260 price -0.283 -0.162 income 0.268 0.325 > > print( confint( fit3sls[[ 4 ]]$e4e, level = 0.5, useDfSys = TRUE ) ) 25 % 75 % demand_(Intercept) 79.319 109.021 demand_price -0.414 -0.085 demand_income 0.282 0.367 supply_(Intercept) 34.758 65.413 supply_price 0.086 0.415 supply_farmPrice 0.188 0.274 supply_trend 0.282 0.367 > print( confint( fit3sls[[ 4 ]]$e4e$eq[[ 2 ]], level = 0.25, useDfSys = TRUE ) ) 37.5 % 62.5 % (Intercept) 47.661 52.510 price 0.224 0.277 farmPrice 0.224 0.238 trend 0.318 0.331 > > print( confint( fit3sls[[ 5 ]]$e5, level = 0.25 ) ) 37.5 % 62.5 % demand_(Intercept) 75.213 107.384 demand_price -0.630 -0.268 demand_income 0.512 0.606 supply_(Intercept) -18.445 14.766 supply_price 0.370 0.732 supply_farmPrice 0.384 0.481 supply_trend 0.512 0.606 > print( confint( fit3sls[[ 5 ]]$e5$eq[[ 1 ]], level = 0.975 ) ) 1.3 % 98.8 % (Intercept) 72.742 109.855 price -0.658 -0.241 income 0.505 0.614 > > print( confint( fit3slsi[[ 2 ]]$e3e, level = 0.975, useDfSys = TRUE ) ) 1.3 % 98.8 % demand_(Intercept) 73.905 110.166 demand_price -0.299 0.090 demand_income 0.137 0.259 supply_(Intercept) 45.617 90.949 supply_price -0.029 0.399 supply_farmPrice 0.073 0.175 supply_trend 0.137 0.259 > print( confint( fit3slsi[[ 2 ]]$e3e$eq[[ 1 ]], level = 0.999, useDfSys = TRUE ) ) 0.1 % 100 % (Intercept) 59.912 124.159 price -0.449 0.241 income 0.090 0.306 > > print( confint( fit3slsi[[ 1 ]]$e5w, level = 0.975, useDfSys = TRUE ) ) 1.3 % 98.8 % demand_(Intercept) 74.084 106.230 demand_price -0.387 -0.014 demand_income 0.277 0.355 supply_(Intercept) 30.219 62.743 supply_price 0.113 0.486 supply_farmPrice 0.179 0.259 supply_trend 0.277 0.355 > print( confint( fit3slsi[[ 1 ]]$e5w$eq[[ 1 ]], level = 0.999, useDfSys = TRUE ) ) 0.1 % 100 % (Intercept) 61.724 118.590 price -0.531 0.130 income 0.247 0.385 > > print( confint( fit3slsd[[ 3 ]]$e4, level = 0.999 ) ) 0.1 % 100 % demand_(Intercept) 72.590 114.198 demand_price -0.457 0.016 demand_income 0.251 0.356 supply_(Intercept) 27.716 70.305 supply_price 0.043 0.516 supply_farmPrice 0.165 0.265 supply_trend 0.251 0.356 > print( confint( fit3slsd[[ 3 ]]$e4$eq[[ 2 ]] ) ) 2.5 % 97.5 % (Intercept) 27.716 70.305 price 0.043 0.516 farmPrice 0.165 0.265 trend 0.251 0.356 > > print( confint( fit3slsd[[ 2 ]]$e4w, level = 0.999 ) ) 0.1 % 100 % demand_(Intercept) 120.616 166.320 demand_price -1.063 -0.578 demand_income 0.371 0.439 supply_(Intercept) 77.414 123.333 supply_price -0.563 -0.078 supply_farmPrice 0.253 0.333 supply_trend 0.371 0.439 > print( confint( fit3slsd[[ 2 ]]$e4w$eq[[ 2 ]] ) ) 2.5 % 97.5 % (Intercept) 77.414 123.333 price -0.563 -0.078 farmPrice 0.253 0.333 trend 0.371 0.439 > > > ## *********** fitted values ************* > print( fitted( fit3sls[[ 2 ]]$e1c ) ) demand supply 1 97.6 97.8 2 99.9 99.3 3 99.8 99.5 4 100.0 99.9 5 102.1 101.7 6 102.0 101.8 7 102.4 101.9 8 103.0 104.1 9 101.5 102.3 10 100.3 99.6 11 95.5 95.9 12 94.7 94.8 13 96.1 96.6 14 99.0 98.4 15 103.8 102.7 16 103.7 104.4 17 103.8 103.3 18 102.1 103.6 19 103.6 103.6 20 106.9 106.6 > print( fitted( fit3sls[[ 2 ]]$e1c$eq[[ 1 ]] ) ) 1 2 3 4 5 6 7 8 9 10 11 12 13 97.6 99.9 99.8 100.0 102.1 102.0 102.4 103.0 101.5 100.3 95.5 94.7 96.1 14 15 16 17 18 19 20 99.0 103.8 103.7 103.8 102.1 103.6 106.9 > > print( fitted( fit3sls[[ 1 ]]$e1wc ) ) demand supply 1 97.6 97.8 2 99.9 99.3 3 99.8 99.5 4 100.0 99.9 5 102.1 101.7 6 102.0 101.8 7 102.4 101.9 8 103.0 104.1 9 101.5 102.3 10 100.3 99.6 11 95.5 95.9 12 94.7 94.8 13 96.1 96.6 14 99.0 98.4 15 103.8 102.7 16 103.7 104.4 17 103.8 103.3 18 102.1 103.6 19 103.6 103.6 20 106.9 106.6 > print( fitted( fit3sls[[ 1 ]]$e1wc$eq[[ 1 ]] ) ) 1 2 3 4 5 6 7 8 9 10 11 12 13 97.6 99.9 99.8 100.0 102.1 102.0 102.4 103.0 101.5 100.3 95.5 94.7 96.1 14 15 16 17 18 19 20 99.0 103.8 103.7 103.8 102.1 103.6 106.9 > > print( fitted( fit3sls[[ 3 ]]$e2e ) ) demand supply 1 97.8 98.4 2 100.0 99.8 3 99.9 99.9 4 100.1 100.3 5 102.0 101.8 6 101.9 101.9 7 102.4 102.0 8 102.9 104.0 9 101.4 102.2 10 100.3 99.6 11 95.8 96.2 12 95.0 95.2 13 96.4 96.9 14 99.1 98.5 15 103.7 102.3 16 103.5 103.9 17 103.6 102.8 18 102.0 103.2 19 103.5 103.2 20 106.7 105.9 > print( fitted( fit3sls[[ 3 ]]$e2e$eq[[ 2 ]] ) ) 1 2 3 4 5 6 7 8 9 10 11 12 13 98.4 99.8 99.9 100.3 101.8 101.9 102.0 104.0 102.2 99.6 96.2 95.2 96.9 14 15 16 17 18 19 20 98.5 102.3 103.9 102.8 103.2 103.2 105.9 > > print( fitted( fit3sls[[ 4 ]]$e3 ) ) demand supply 1 97.8 98.4 2 100.0 99.8 3 99.9 99.9 4 100.1 100.3 5 102.0 101.7 6 101.9 101.8 7 102.3 101.9 8 102.9 103.9 9 101.4 102.2 10 100.3 99.6 11 95.8 96.3 12 95.1 95.3 13 96.4 97.0 14 99.1 98.5 15 103.6 102.3 16 103.5 103.9 17 103.6 102.7 18 102.0 103.1 19 103.5 103.2 20 106.7 105.9 > print( fitted( fit3sls[[ 4 ]]$e3$eq[[ 1 ]] ) ) 1 2 3 4 5 6 7 8 9 10 11 12 13 97.8 100.0 99.9 100.1 102.0 101.9 102.3 102.9 101.4 100.3 95.8 95.1 96.4 14 15 16 17 18 19 20 99.1 103.6 103.5 103.6 102.0 103.5 106.7 > > print( fitted( fit3sls[[ 5 ]]$e4e ) ) demand supply 1 95.0 96.3 2 98.9 99.4 3 98.8 99.5 4 99.1 100.2 5 103.2 102.9 6 102.9 103.1 7 103.6 103.4 8 104.5 107.7 9 102.1 103.4 10 100.2 97.8 11 91.5 90.8 12 89.8 88.9 13 92.2 92.6 14 97.6 95.6 15 106.4 103.4 16 105.9 106.9 17 106.7 103.6 18 102.9 105.4 19 105.6 105.5 20 111.3 111.7 > print( fitted( fit3sls[[ 5 ]]$e4e$eq[[ 2 ]] ) ) 1 2 3 4 5 6 7 8 9 10 11 12 13 96.3 99.4 99.5 100.2 102.9 103.1 103.4 107.7 103.4 97.8 90.8 88.9 92.6 14 15 16 17 18 19 20 95.6 103.4 106.9 103.6 105.4 105.5 111.7 > > print( fitted( fit3sls[[ 1 ]]$e5 ) ) demand supply 1 97.5 98.2 2 99.9 99.8 3 99.8 99.9 4 100.0 100.3 5 102.1 101.9 6 102.0 102.0 7 102.5 102.1 8 103.1 104.3 9 101.5 102.3 10 100.3 99.4 11 95.3 95.7 12 94.5 94.6 13 96.0 96.5 14 99.0 98.2 15 103.9 102.4 16 103.7 104.2 17 103.9 102.7 18 102.1 103.4 19 103.7 103.4 20 107.2 106.6 > print( fitted( fit3sls[[ 1 ]]$e5$eq[[ 1 ]] ) ) 1 2 3 4 5 6 7 8 9 10 11 12 13 97.5 99.9 99.8 100.0 102.1 102.0 102.5 103.1 101.5 100.3 95.3 94.5 96.0 14 15 16 17 18 19 20 99.0 103.9 103.7 103.9 102.1 103.7 107.2 > > print( fitted( fit3slsi[[ 3 ]]$e3e ) ) demand supply 1 98.9 99.2 2 100.5 100.3 3 100.4 100.4 4 100.6 100.6 5 101.6 101.2 6 101.5 101.3 7 101.9 101.5 8 102.4 102.9 9 101.1 101.4 10 100.1 99.7 11 97.2 97.8 12 96.9 97.5 13 98.0 98.7 14 99.7 99.5 15 102.5 101.6 16 102.6 102.7 17 102.1 101.4 18 101.8 102.6 19 102.9 102.7 20 105.3 104.8 > print( fitted( fit3slsi[[ 3 ]]$e3e$eq[[ 1 ]] ) ) 1 2 3 4 5 6 7 8 9 10 11 12 13 98.9 100.5 100.4 100.6 101.6 101.5 101.9 102.4 101.1 100.1 97.2 96.9 98.0 14 15 16 17 18 19 20 99.7 102.5 102.6 102.1 101.8 102.9 105.3 > > print( fitted( fit3slsd[[ 4 ]]$e4 ) ) demand supply 1 97.6 98.3 2 99.7 99.7 3 99.7 99.8 4 99.8 100.1 5 102.2 101.9 6 102.0 102.0 7 102.4 102.0 8 102.8 104.1 9 101.6 102.4 10 100.7 99.8 11 95.8 96.1 12 94.8 94.8 13 96.0 96.5 14 99.1 98.3 15 104.1 102.5 16 103.7 104.2 17 104.4 103.2 18 101.9 103.2 19 103.4 103.2 20 106.3 105.9 > print( fitted( fit3slsd[[ 4 ]]$e4$eq[[ 2 ]] ) ) 1 2 3 4 5 6 7 8 9 10 11 12 13 98.3 99.7 99.8 100.1 101.9 102.0 102.0 104.1 102.4 99.8 96.1 94.8 96.5 14 15 16 17 18 19 20 98.3 102.5 104.2 103.2 103.2 103.2 105.9 > > print( fitted( fit3slsd[[ 2 ]]$e3w ) ) demand supply 1 96.1 97.0 2 97.6 97.2 3 97.8 97.8 4 97.7 97.7 5 103.5 103.5 6 102.7 102.8 7 102.6 102.1 8 101.8 103.4 9 103.3 104.8 10 103.9 103.4 11 96.2 97.0 12 92.5 92.4 13 92.7 93.0 14 98.8 97.6 15 107.3 105.6 16 105.6 106.4 17 111.1 110.7 18 100.9 102.3 19 102.3 101.4 20 103.7 101.8 > print( fitted( fit3slsd[[ 2 ]]$e3w$eq[[ 2 ]] ) ) 1 2 3 4 5 6 7 8 9 10 11 12 13 97.0 97.2 97.8 97.7 103.5 102.8 102.1 103.4 104.8 103.4 97.0 92.4 93.0 14 15 16 17 18 19 20 97.6 105.6 106.4 110.7 102.3 101.4 101.8 > > > ## *********** predicted values ************* > predictData <- Kmenta > predictData$consump <- NULL > predictData$price <- Kmenta$price * 0.9 > predictData$income <- Kmenta$income * 1.1 > > print( predict( fit3sls[[ 2 ]]$e1c, se.fit = TRUE, interval = "prediction", + useDfSys = TRUE ) ) demand.pred demand.se.fit demand.lwr demand.upr supply.pred supply.se.fit 1 97.6 0.661 93.4 101.9 97.8 0.826 2 99.9 0.600 95.7 104.1 99.3 0.825 3 99.8 0.564 95.6 104.0 99.5 0.755 4 100.0 0.605 95.8 104.2 99.9 0.783 5 102.1 0.516 98.0 106.2 101.7 0.669 6 102.0 0.474 97.9 106.1 101.8 0.620 7 102.4 0.493 98.3 106.5 101.9 0.608 8 103.0 0.615 98.8 107.2 104.1 0.889 9 101.5 0.544 97.3 105.6 102.3 0.753 10 100.3 0.822 96.0 104.7 99.6 1.022 11 95.5 0.963 91.1 100.0 95.9 1.172 12 94.7 1.006 90.2 99.2 94.8 1.289 13 96.1 0.915 91.7 100.5 96.6 1.114 14 99.0 0.518 94.9 103.2 98.4 0.751 15 103.8 0.793 99.5 108.2 102.7 0.863 16 103.7 0.636 99.5 107.9 104.4 0.902 17 103.8 1.348 99.0 108.7 103.3 1.636 18 102.1 0.549 97.9 106.2 103.6 0.807 19 103.6 0.695 99.4 107.9 103.6 0.898 20 106.9 1.306 102.1 111.7 106.6 1.613 supply.lwr supply.upr 1 92.3 103 2 93.8 105 3 94.0 105 4 94.3 105 5 96.2 107 6 96.3 107 7 96.5 107 8 98.5 110 9 96.8 108 10 93.9 105 11 90.1 102 12 88.9 101 13 90.9 102 14 92.9 104 15 97.1 108 16 98.8 110 17 97.1 110 18 98.1 109 19 98.0 109 20 100.4 113 > print( predict( fit3sls[[ 2 ]]$e1c$eq[[ 1 ]], se.fit = TRUE, interval = "prediction", + useDfSys = TRUE ) ) fit se.fit lwr upr 1 97.6 0.661 93.4 101.9 2 99.9 0.600 95.7 104.1 3 99.8 0.564 95.6 104.0 4 100.0 0.605 95.8 104.2 5 102.1 0.516 98.0 106.2 6 102.0 0.474 97.9 106.1 7 102.4 0.493 98.3 106.5 8 103.0 0.615 98.8 107.2 9 101.5 0.544 97.3 105.6 10 100.3 0.822 96.0 104.7 11 95.5 0.963 91.1 100.0 12 94.7 1.006 90.2 99.2 13 96.1 0.915 91.7 100.5 14 99.0 0.518 94.9 103.2 15 103.8 0.793 99.5 108.2 16 103.7 0.636 99.5 107.9 17 103.8 1.348 99.0 108.7 18 102.1 0.549 97.9 106.2 19 103.6 0.695 99.4 107.9 20 106.9 1.306 102.1 111.7 > > print( predict( fit3sls[[ 3 ]]$e2e, se.pred = TRUE, interval = "confidence", + level = 0.999, newdata = predictData, useDfSys = TRUE ) ) demand.pred demand.se.pred demand.lwr demand.upr supply.pred supply.se.pred 1 102.7 2.20 99.3 106 96.2 2.78 2 105.2 2.21 101.8 109 97.5 2.68 3 105.1 2.22 101.6 109 97.7 2.69 4 105.4 2.21 101.9 109 98.0 2.67 5 107.2 2.47 101.9 112 99.6 2.80 6 107.1 2.43 102.1 112 99.7 2.76 7 107.7 2.42 102.8 113 99.7 2.72 8 108.5 2.38 103.7 113 101.6 2.66 9 106.5 2.48 101.2 112 100.1 2.85 10 105.0 2.59 99.1 111 97.6 3.04 11 100.1 2.36 95.5 105 94.2 3.07 12 99.5 2.19 96.3 103 93.0 3.00 13 101.2 2.11 98.7 104 94.6 2.85 14 104.0 2.29 100.0 108 96.3 2.84 15 108.9 2.68 102.4 115 100.2 2.90 16 108.8 2.57 103.0 115 101.8 2.81 17 108.4 2.99 100.4 116 100.8 3.28 18 107.5 2.34 103.1 112 100.9 2.66 19 109.2 2.42 104.3 114 100.8 2.64 20 113.0 2.63 106.8 119 103.4 2.62 supply.lwr supply.upr 1 92.2 100.2 2 94.6 100.5 3 94.6 100.7 4 95.1 100.8 5 95.4 103.8 6 95.8 103.5 7 96.3 103.1 8 98.9 104.4 9 95.4 104.7 10 91.6 103.6 11 88.0 100.4 12 87.3 98.7 13 90.1 99.2 14 91.8 100.8 15 95.3 105.2 16 97.5 106.0 17 93.4 108.3 18 98.1 103.6 19 98.4 103.2 20 101.2 105.6 > print( predict( fit3sls[[ 3 ]]$e2e$eq[[ 2 ]], se.pred = TRUE, interval = "confidence", + level = 0.999, newdata = predictData, useDfSys = TRUE ) ) fit se.pred lwr upr 1 96.2 2.78 92.2 100.2 2 97.5 2.68 94.6 100.5 3 97.7 2.69 94.6 100.7 4 98.0 2.67 95.1 100.8 5 99.6 2.80 95.4 103.8 6 99.7 2.76 95.8 103.5 7 99.7 2.72 96.3 103.1 8 101.6 2.66 98.9 104.4 9 100.1 2.85 95.4 104.7 10 97.6 3.04 91.6 103.6 11 94.2 3.07 88.0 100.4 12 93.0 3.00 87.3 98.7 13 94.6 2.85 90.1 99.2 14 96.3 2.84 91.8 100.8 15 100.2 2.90 95.3 105.2 16 101.8 2.81 97.5 106.0 17 100.8 3.28 93.4 108.3 18 100.9 2.66 98.1 103.6 19 100.8 2.64 98.4 103.2 20 103.4 2.62 101.2 105.6 > > print( predict( fit3sls[[ 5 ]]$e2w, se.pred = TRUE, interval = "confidence", + level = 0.999, newdata = predictData, useDfSys = TRUE ) ) demand.pred demand.se.pred demand.lwr demand.upr supply.pred supply.se.pred 1 102.6 2.24 99.0 106 96.3 2.84 2 105.1 2.24 101.5 109 97.6 2.72 3 105.0 2.25 101.3 109 97.7 2.73 4 105.3 2.24 101.6 109 98.0 2.71 5 107.1 2.54 101.5 113 99.6 2.88 6 107.0 2.49 101.7 112 99.6 2.82 7 107.6 2.48 102.3 113 99.7 2.77 8 108.3 2.44 103.3 113 101.6 2.70 9 106.4 2.55 100.7 112 100.0 2.94 10 104.9 2.67 98.5 111 97.6 3.17 11 100.1 2.43 95.1 105 94.3 3.20 12 99.5 2.23 96.0 103 93.2 3.11 13 101.2 2.14 98.5 104 94.8 2.92 14 104.0 2.33 99.6 108 96.4 2.92 15 108.7 2.77 101.8 116 100.2 2.99 16 108.7 2.65 102.5 115 101.7 2.88 17 108.3 3.12 99.7 117 100.8 3.45 18 107.4 2.39 102.7 112 100.9 2.70 19 109.1 2.48 103.8 114 100.8 2.67 20 112.9 2.71 106.3 119 103.4 2.65 supply.lwr supply.upr 1 91.8 100.7 2 94.3 100.8 3 94.3 101.1 4 94.8 101.1 5 94.9 104.3 6 95.4 103.9 7 95.9 103.5 8 98.5 104.7 9 94.9 105.2 10 90.9 104.4 11 87.4 101.2 12 86.9 99.5 13 89.7 99.8 14 91.4 101.4 15 94.7 105.8 16 97.0 106.5 17 92.5 109.1 18 97.8 103.9 19 98.1 103.5 20 101.0 105.9 > print( predict( fit3sls[[ 5 ]]$e2w$eq[[ 2 ]], se.pred = TRUE, interval = "confidence", + level = 0.999, newdata = predictData, useDfSys = TRUE ) ) fit se.pred lwr upr 1 96.3 2.84 91.8 100.7 2 97.6 2.72 94.3 100.8 3 97.7 2.73 94.3 101.1 4 98.0 2.71 94.8 101.1 5 99.6 2.88 94.9 104.3 6 99.6 2.82 95.4 103.9 7 99.7 2.77 95.9 103.5 8 101.6 2.70 98.5 104.7 9 100.0 2.94 94.9 105.2 10 97.6 3.17 90.9 104.4 11 94.3 3.20 87.4 101.2 12 93.2 3.11 86.9 99.5 13 94.8 2.92 89.7 99.8 14 96.4 2.92 91.4 101.4 15 100.2 2.99 94.7 105.8 16 101.7 2.88 97.0 106.5 17 100.8 3.45 92.5 109.1 18 100.9 2.70 97.8 103.9 19 100.8 2.67 98.1 103.5 20 103.4 2.65 101.0 105.9 > > print( predict( fit3sls[[ 4 ]]$e3, se.pred = TRUE, interval = "prediction", + level = 0.975 ) ) demand.pred demand.se.pred demand.lwr demand.upr supply.pred supply.se.pred 1 97.8 2.10 92.9 103 98.4 2.64 2 100.0 2.09 95.1 105 99.8 2.66 3 99.9 2.08 95.0 105 99.9 2.65 4 100.1 2.09 95.2 105 100.3 2.66 5 102.0 2.06 97.2 107 101.7 2.65 6 101.9 2.05 97.1 107 101.8 2.63 7 102.3 2.06 97.5 107 101.9 2.63 8 102.9 2.09 98.0 108 103.9 2.71 9 101.4 2.07 96.6 106 102.2 2.67 10 100.3 2.16 95.2 105 99.6 2.76 11 95.8 2.21 90.6 101 96.3 2.80 12 95.1 2.22 89.9 100 95.3 2.84 13 96.4 2.19 91.3 102 97.0 2.78 14 99.1 2.06 94.3 104 98.5 2.67 15 103.6 2.15 98.6 109 102.3 2.68 16 103.5 2.09 98.6 108 103.9 2.68 17 103.6 2.41 97.9 109 102.7 3.00 18 102.0 2.07 97.2 107 103.1 2.66 19 103.5 2.12 98.6 108 103.2 2.69 20 106.7 2.39 101.1 112 105.9 2.98 supply.lwr supply.upr 1 92.2 105 2 93.6 106 3 93.7 106 4 94.0 107 5 95.5 108 6 95.7 108 7 95.8 108 8 97.6 110 9 95.9 108 10 93.2 106 11 89.7 103 12 88.6 102 13 90.5 103 14 92.3 105 15 96.0 109 16 97.6 110 17 95.7 110 18 96.9 109 19 96.9 109 20 98.9 113 > print( predict( fit3sls[[ 4 ]]$e3$eq[[ 1 ]], se.pred = TRUE, interval = "prediction", + level = 0.975 ) ) fit se.pred lwr upr 1 97.8 2.10 92.9 103 2 100.0 2.09 95.1 105 3 99.9 2.08 95.0 105 4 100.1 2.09 95.2 105 5 102.0 2.06 97.2 107 6 101.9 2.05 97.1 107 7 102.3 2.06 97.5 107 8 102.9 2.09 98.0 108 9 101.4 2.07 96.6 106 10 100.3 2.16 95.2 105 11 95.8 2.21 90.6 101 12 95.1 2.22 89.9 100 13 96.4 2.19 91.3 102 14 99.1 2.06 94.3 104 15 103.6 2.15 98.6 109 16 103.5 2.09 98.6 108 17 103.6 2.41 97.9 109 18 102.0 2.07 97.2 107 19 103.5 2.12 98.6 108 20 106.7 2.39 101.1 112 > > print( predict( fit3sls[[ 5 ]]$e4e, se.fit = TRUE, interval = "confidence", + level = 0.25, useDfSys = TRUE ) ) demand.pred demand.se.fit demand.lwr demand.upr supply.pred supply.se.fit 1 95.0 0.465 94.8 95.1 96.3 0.536 2 98.9 0.532 98.7 99.1 99.4 0.663 3 98.8 0.497 98.6 99.0 99.5 0.613 4 99.1 0.541 99.0 99.3 100.2 0.662 5 103.2 0.450 103.0 103.3 102.9 0.593 6 102.9 0.417 102.7 103.0 103.1 0.543 7 103.6 0.420 103.5 103.8 103.4 0.524 8 104.5 0.525 104.3 104.6 107.7 0.634 9 102.1 0.494 101.9 102.2 103.4 0.660 10 100.2 0.760 100.0 100.4 97.8 0.895 11 91.5 0.660 91.3 91.7 90.8 0.736 12 89.8 0.563 89.6 89.9 88.9 0.742 13 92.2 0.597 92.0 92.4 92.6 0.806 14 97.6 0.426 97.4 97.7 95.6 0.568 15 106.4 0.619 106.2 106.6 103.4 0.721 16 105.9 0.476 105.8 106.1 106.9 0.608 17 106.7 1.159 106.3 107.1 103.6 1.414 18 102.9 0.494 102.7 103.0 105.4 0.582 19 105.6 0.574 105.4 105.8 105.5 0.676 20 111.3 1.030 110.9 111.6 111.7 1.146 supply.lwr supply.upr 1 96.1 96.4 2 99.1 99.6 3 99.3 99.7 4 100.0 100.4 5 102.7 103.1 6 102.9 103.3 7 103.2 103.5 8 107.5 107.9 9 103.2 103.7 10 97.5 98.0 11 90.5 91.0 12 88.7 89.1 13 92.4 92.9 14 95.4 95.8 15 103.1 103.6 16 106.7 107.0 17 103.1 104.0 18 105.3 105.6 19 105.3 105.8 20 111.4 112.1 > print( predict( fit3sls[[ 5 ]]$e4e$eq[[ 2 ]], se.fit = TRUE, interval = "confidence", + level = 0.25, useDfSys = TRUE ) ) fit se.fit lwr upr 1 96.3 0.536 96.1 96.4 2 99.4 0.663 99.1 99.6 3 99.5 0.613 99.3 99.7 4 100.2 0.662 100.0 100.4 5 102.9 0.593 102.7 103.1 6 103.1 0.543 102.9 103.3 7 103.4 0.524 103.2 103.5 8 107.7 0.634 107.5 107.9 9 103.4 0.660 103.2 103.7 10 97.8 0.895 97.5 98.0 11 90.8 0.736 90.5 91.0 12 88.9 0.742 88.7 89.1 13 92.6 0.806 92.4 92.9 14 95.6 0.568 95.4 95.8 15 103.4 0.721 103.1 103.6 16 106.9 0.608 106.7 107.0 17 103.6 1.414 103.1 104.0 18 105.4 0.582 105.3 105.6 19 105.5 0.676 105.3 105.8 20 111.7 1.146 111.4 112.1 > > print( predict( fit3sls[[ 1 ]]$e5, se.fit = TRUE, se.pred = TRUE, + interval = "prediction", level = 0.5, newdata = predictData ) ) demand.pred demand.se.fit demand.se.pred demand.lwr demand.upr supply.pred 1 102.8 0.957 2.19 101.3 104 95.7 2 105.6 0.829 2.13 104.1 107 97.1 3 105.5 0.869 2.15 104.0 107 97.3 4 105.8 0.823 2.13 104.3 107 97.6 5 107.8 1.308 2.36 106.2 109 99.4 6 107.7 1.213 2.31 106.1 109 99.4 7 108.3 1.145 2.28 106.7 110 99.5 8 109.1 0.984 2.20 107.6 111 101.7 9 107.0 1.372 2.40 105.3 109 99.8 10 105.4 1.659 2.57 103.6 107 97.1 11 100.1 1.365 2.39 98.4 102 93.3 12 99.4 0.969 2.19 97.9 101 92.1 13 101.3 0.752 2.11 99.8 103 93.9 14 104.3 1.112 2.26 102.8 106 95.7 15 109.6 1.580 2.52 107.9 111 100.0 16 109.6 1.368 2.40 107.9 111 101.7 17 109.1 2.136 2.90 107.1 111 100.5 18 108.1 0.966 2.19 106.6 110 100.8 19 109.9 0.980 2.20 108.4 111 100.7 20 114.1 0.997 2.21 112.6 116 103.7 supply.se.fit supply.se.pred supply.lwr supply.upr 1 0.959 2.74 93.8 97.5 2 0.742 2.67 95.3 99.0 3 0.791 2.69 95.4 99.1 4 0.735 2.67 95.8 99.4 5 1.280 2.87 97.4 101.3 6 1.159 2.82 97.5 101.3 7 1.031 2.77 97.6 101.4 8 0.867 2.71 99.8 103.5 9 1.416 2.93 97.8 101.8 10 1.724 3.09 95.0 99.2 11 1.457 2.95 91.3 95.4 12 1.102 2.79 90.2 94.0 13 0.894 2.72 92.1 95.8 14 1.092 2.79 93.8 97.6 15 1.516 2.98 98.0 102.0 16 1.321 2.89 99.7 103.7 17 2.297 3.44 98.2 102.9 18 0.847 2.70 98.9 102.6 19 0.743 2.67 98.9 102.6 20 0.589 2.63 101.9 105.5 > print( predict( fit3sls[[ 1 ]]$e5$eq[[ 1 ]], se.fit = TRUE, se.pred = TRUE, + interval = "prediction", level = 0.5, newdata = predictData ) ) fit se.fit se.pred lwr upr 1 102.8 0.957 2.19 101.3 104 2 105.6 0.829 2.13 104.1 107 3 105.5 0.869 2.15 104.0 107 4 105.8 0.823 2.13 104.3 107 5 107.8 1.308 2.36 106.2 109 6 107.7 1.213 2.31 106.1 109 7 108.3 1.145 2.28 106.7 110 8 109.1 0.984 2.20 107.6 111 9 107.0 1.372 2.40 105.3 109 10 105.4 1.659 2.57 103.6 107 11 100.1 1.365 2.39 98.4 102 12 99.4 0.969 2.19 97.9 101 13 101.3 0.752 2.11 99.8 103 14 104.3 1.112 2.26 102.8 106 15 109.6 1.580 2.52 107.9 111 16 109.6 1.368 2.40 107.9 111 17 109.1 2.136 2.90 107.1 111 18 108.1 0.966 2.19 106.6 110 19 109.9 0.980 2.20 108.4 111 20 114.1 0.997 2.21 112.6 116 > > print( predict( fit3slsi[[ 3 ]]$e3e, se.fit = TRUE, se.pred = TRUE, + interval = "confidence", level = 0.99, useDfSys = TRUE ) ) demand.pred demand.se.fit demand.se.pred demand.lwr demand.upr supply.pred 1 98.9 0.590 2.49 97.3 100.5 99.2 2 100.5 0.643 2.50 98.7 102.2 100.3 3 100.4 0.602 2.49 98.7 102.0 100.4 4 100.6 0.653 2.50 98.8 102.3 100.6 5 101.6 0.548 2.48 100.1 103.1 101.2 6 101.5 0.512 2.47 100.1 102.9 101.3 7 101.9 0.524 2.47 100.5 103.3 101.5 8 102.4 0.667 2.51 100.6 104.3 102.9 9 101.1 0.599 2.49 99.5 102.7 101.4 10 100.1 0.928 2.59 97.6 102.6 99.7 11 97.2 0.898 2.58 94.7 99.6 97.8 12 96.9 0.767 2.54 94.8 99.0 97.5 13 98.0 0.745 2.53 96.0 100.1 98.7 14 99.7 0.536 2.48 98.2 101.1 99.5 15 102.5 0.745 2.53 100.5 104.5 101.6 16 102.6 0.589 2.49 101.0 104.2 102.7 17 102.1 1.376 2.78 98.3 105.8 101.4 18 101.8 0.615 2.49 100.2 103.5 102.6 19 102.9 0.738 2.53 100.9 104.9 102.7 20 105.3 1.357 2.77 101.6 109.0 104.8 supply.se.fit supply.se.pred supply.lwr supply.upr 1 0.638 3.01 97.5 101.0 2 0.752 3.03 98.3 102.4 3 0.700 3.02 98.4 102.3 4 0.761 3.03 98.6 102.7 5 0.649 3.01 99.4 103.0 6 0.610 3.00 99.7 103.0 7 0.613 3.00 99.8 103.2 8 0.829 3.05 100.7 105.2 9 0.731 3.03 99.4 103.4 10 1.092 3.13 96.7 102.6 11 1.037 3.12 94.9 100.6 12 0.902 3.07 95.0 99.9 13 0.855 3.06 96.4 101.1 14 0.670 3.01 97.6 101.3 15 0.812 3.05 99.4 103.8 16 0.707 3.02 100.8 104.7 17 1.584 3.34 97.1 105.7 18 0.740 3.03 100.6 104.6 19 0.852 3.06 100.4 105.1 20 1.564 3.33 100.6 109.1 > print( predict( fit3slsi[[ 3 ]]$e3e$eq[[ 1 ]], se.fit = TRUE, se.pred = TRUE, + interval = "confidence", level = 0.99, useDfSys = TRUE ) ) fit se.fit se.pred lwr upr 1 98.9 0.590 2.49 97.3 100.5 2 100.5 0.643 2.50 98.7 102.2 3 100.4 0.602 2.49 98.7 102.0 4 100.6 0.653 2.50 98.8 102.3 5 101.6 0.548 2.48 100.1 103.1 6 101.5 0.512 2.47 100.1 102.9 7 101.9 0.524 2.47 100.5 103.3 8 102.4 0.667 2.51 100.6 104.3 9 101.1 0.599 2.49 99.5 102.7 10 100.1 0.928 2.59 97.6 102.6 11 97.2 0.898 2.58 94.7 99.6 12 96.9 0.767 2.54 94.8 99.0 13 98.0 0.745 2.53 96.0 100.1 14 99.7 0.536 2.48 98.2 101.1 15 102.5 0.745 2.53 100.5 104.5 16 102.6 0.589 2.49 101.0 104.2 17 102.1 1.376 2.78 98.3 105.8 18 101.8 0.615 2.49 100.2 103.5 19 102.9 0.738 2.53 100.9 104.9 20 105.3 1.357 2.77 101.6 109.0 > > print( predict( fit3slsi[[ 1 ]]$e5w, se.fit = TRUE, se.pred = TRUE, + interval = "prediction", level = 0.5, newdata = predictData ) ) demand.pred demand.se.fit demand.se.pred demand.lwr demand.upr supply.pred 1 102.4 0.986 2.25 100.9 104 95.3 2 105.2 0.851 2.20 103.7 107 96.9 3 105.1 0.896 2.22 103.6 107 97.0 4 105.4 0.844 2.20 103.9 107 97.4 5 107.1 1.351 2.44 105.5 109 98.7 6 107.1 1.250 2.38 105.5 109 98.9 7 107.8 1.173 2.34 106.2 109 99.0 8 108.7 0.983 2.25 107.2 110 101.3 9 106.3 1.420 2.48 104.6 108 99.1 10 104.6 1.713 2.65 102.8 106 96.2 11 99.4 1.372 2.45 97.8 101 92.8 12 99.0 0.965 2.25 97.5 101 91.9 13 101.0 0.768 2.17 99.5 102 93.8 14 103.8 1.149 2.33 102.2 105 95.3 15 108.8 1.631 2.60 107.0 111 99.2 16 108.9 1.405 2.47 107.2 111 101.1 17 108.0 2.211 3.00 106.0 110 99.4 18 107.7 0.978 2.25 106.1 109 100.4 19 109.5 0.964 2.25 108.0 111 100.5 20 113.8 0.818 2.19 112.3 115 103.7 supply.se.fit supply.se.pred supply.lwr supply.upr 1 0.987 2.85 93.3 97.2 2 0.772 2.79 95.0 98.8 3 0.824 2.80 95.1 98.9 4 0.767 2.79 95.5 99.3 5 1.341 3.00 96.7 100.8 6 1.215 2.94 96.9 100.9 7 1.084 2.89 97.1 101.0 8 0.907 2.83 99.4 103.2 9 1.483 3.06 97.0 101.2 10 1.795 3.22 94.1 98.4 11 1.455 3.05 90.7 94.8 12 1.002 2.86 90.0 93.9 13 0.805 2.80 91.9 95.7 14 1.087 2.89 93.4 97.3 15 1.585 3.11 97.1 101.4 16 1.383 3.01 99.0 103.1 17 2.399 3.60 96.9 101.8 18 0.883 2.82 98.5 102.4 19 0.770 2.79 98.6 102.4 20 0.616 2.75 101.9 105.6 > print( predict( fit3slsi[[ 1 ]]$e5w$eq[[ 1 ]], se.fit = TRUE, se.pred = TRUE, + interval = "prediction", level = 0.5, newdata = predictData ) ) fit se.fit se.pred lwr upr 1 102.4 0.986 2.25 100.9 104 2 105.2 0.851 2.20 103.7 107 3 105.1 0.896 2.22 103.6 107 4 105.4 0.844 2.20 103.9 107 5 107.1 1.351 2.44 105.5 109 6 107.1 1.250 2.38 105.5 109 7 107.8 1.173 2.34 106.2 109 8 108.7 0.983 2.25 107.2 110 9 106.3 1.420 2.48 104.6 108 10 104.6 1.713 2.65 102.8 106 11 99.4 1.372 2.45 97.8 101 12 99.0 0.965 2.25 97.5 101 13 101.0 0.768 2.17 99.5 102 14 103.8 1.149 2.33 102.2 105 15 108.8 1.631 2.60 107.0 111 16 108.9 1.405 2.47 107.2 111 17 108.0 2.211 3.00 106.0 110 18 107.7 0.978 2.25 106.1 109 19 109.5 0.964 2.25 108.0 111 20 113.8 0.818 2.19 112.3 115 > > print( predict( fit3slsd[[ 4 ]]$e4, se.fit = TRUE, interval = "prediction", + level = 0.9, newdata = predictData ) ) demand.pred demand.se.fit demand.lwr demand.upr supply.pred supply.se.fit 1 103 0.972 99.6 107 96.1 0.980 2 106 0.820 102.2 109 97.5 0.751 3 106 0.863 102.1 109 97.6 0.801 4 106 0.813 102.4 109 97.9 0.741 5 108 1.305 104.2 112 99.8 1.287 6 108 1.206 104.1 112 99.8 1.164 7 109 1.132 104.7 112 99.9 1.035 8 109 0.960 105.5 113 101.8 0.857 9 107 1.377 103.4 111 100.3 1.422 10 106 1.688 101.8 110 97.8 1.748 11 101 1.415 96.8 105 94.1 1.490 12 100 1.004 96.3 104 92.7 1.115 13 102 0.766 98.1 105 94.4 0.891 14 105 1.124 101.0 109 96.2 1.107 15 110 1.575 105.8 114 100.5 1.523 16 110 1.355 105.9 114 102.1 1.318 17 110 2.158 105.0 115 101.3 2.305 18 108 0.947 104.5 112 101.0 0.843 19 110 0.953 106.3 114 100.9 0.735 20 114 0.974 109.9 117 103.5 0.583 supply.lwr supply.upr 1 91.6 100.7 2 93.0 101.9 3 93.2 102.1 4 93.5 102.3 5 95.0 104.6 6 95.2 104.5 7 95.3 104.5 8 97.3 106.3 9 95.4 105.2 10 92.6 103.0 11 89.2 99.0 12 88.1 97.4 13 89.8 98.9 14 91.6 100.9 15 95.5 105.5 16 97.3 106.9 17 95.6 107.1 18 96.5 105.5 19 96.5 105.3 20 99.2 107.9 > print( predict( fit3slsd[[ 4 ]]$e4$eq[[ 2 ]], se.fit = TRUE, interval = "prediction", + level = 0.9, newdata = predictData ) ) fit se.fit lwr upr 1 96.1 0.980 91.6 100.7 2 97.5 0.751 93.0 101.9 3 97.6 0.801 93.2 102.1 4 97.9 0.741 93.5 102.3 5 99.8 1.287 95.0 104.6 6 99.8 1.164 95.2 104.5 7 99.9 1.035 95.3 104.5 8 101.8 0.857 97.3 106.3 9 100.3 1.422 95.4 105.2 10 97.8 1.748 92.6 103.0 11 94.1 1.490 89.2 99.0 12 92.7 1.115 88.1 97.4 13 94.4 0.891 89.8 98.9 14 96.2 1.107 91.6 100.9 15 100.5 1.523 95.5 105.5 16 102.1 1.318 97.3 106.9 17 101.3 2.305 95.6 107.1 18 101.0 0.843 96.5 105.5 19 100.9 0.735 96.5 105.3 20 103.5 0.583 99.2 107.9 > > print( predict( fit3slsd[[ 2 ]]$e3w, se.fit = TRUE, se.pred = TRUE, + interval = "confidence", level = 0.99, useDfSys = TRUE ) ) demand.pred demand.se.fit demand.se.pred demand.lwr demand.upr supply.pred 1 96.1 0.832 3.23 93.8 98.3 97.0 2 97.6 0.849 3.24 95.3 99.9 97.2 3 97.8 0.771 3.22 95.7 99.9 97.8 4 97.7 0.857 3.24 95.3 100.0 97.7 5 103.5 0.648 3.19 101.8 105.3 103.5 6 102.7 0.519 3.16 101.3 104.1 102.8 7 102.6 0.499 3.16 101.3 104.0 102.1 8 101.8 0.627 3.18 100.1 103.5 103.4 9 103.3 0.714 3.20 101.3 105.2 104.8 10 103.9 1.172 3.33 100.7 107.1 103.4 11 96.2 0.920 3.25 93.7 98.7 97.0 12 92.5 1.261 3.37 89.1 95.9 92.4 13 92.7 1.364 3.41 89.0 96.5 93.0 14 98.8 0.528 3.17 97.3 100.2 97.6 15 107.3 1.245 3.36 103.9 110.7 105.6 16 105.6 0.856 3.24 103.2 107.9 106.4 17 111.1 2.310 3.88 104.8 117.4 110.7 18 100.9 0.592 3.18 99.2 102.5 102.3 19 102.3 0.700 3.20 100.4 104.2 101.4 20 103.7 1.350 3.40 100.0 107.4 101.8 supply.se.fit supply.se.pred supply.lwr supply.upr 1 0.791 3.73 94.8 99.2 2 0.857 3.74 94.8 99.5 3 0.776 3.72 95.7 99.9 4 0.825 3.73 95.5 100.0 5 0.817 3.73 101.2 105.7 6 0.713 3.71 100.9 104.8 7 0.644 3.70 100.4 103.9 8 0.858 3.74 101.0 105.7 9 0.962 3.77 102.2 107.4 10 1.040 3.79 100.6 106.3 11 1.083 3.80 94.1 100.0 12 1.633 3.99 88.0 96.9 13 1.568 3.96 88.7 97.3 14 0.871 3.74 95.2 100.0 15 1.029 3.78 102.8 108.4 16 1.056 3.79 103.6 109.3 17 2.050 4.18 105.1 116.2 18 0.687 3.71 100.4 104.2 19 0.773 3.72 99.3 103.5 20 1.300 3.87 98.3 105.4 > print( predict( fit3slsd[[ 2 ]]$e3w$eq[[ 1 ]], se.fit = TRUE, se.pred = TRUE, + interval = "confidence", level = 0.99, useDfSys = TRUE ) ) fit se.fit se.pred lwr upr 1 96.1 0.832 3.23 93.8 98.3 2 97.6 0.849 3.24 95.3 99.9 3 97.8 0.771 3.22 95.7 99.9 4 97.7 0.857 3.24 95.3 100.0 5 103.5 0.648 3.19 101.8 105.3 6 102.7 0.519 3.16 101.3 104.1 7 102.6 0.499 3.16 101.3 104.0 8 101.8 0.627 3.18 100.1 103.5 9 103.3 0.714 3.20 101.3 105.2 10 103.9 1.172 3.33 100.7 107.1 11 96.2 0.920 3.25 93.7 98.7 12 92.5 1.261 3.37 89.1 95.9 13 92.7 1.364 3.41 89.0 96.5 14 98.8 0.528 3.17 97.3 100.2 15 107.3 1.245 3.36 103.9 110.7 16 105.6 0.856 3.24 103.2 107.9 17 111.1 2.310 3.88 104.8 117.4 18 100.9 0.592 3.18 99.2 102.5 19 102.3 0.700 3.20 100.4 104.2 20 103.7 1.350 3.40 100.0 107.4 > > > # predict just one observation > smallData <- data.frame( price = 130, income = 150, farmPrice = 120, + trend = 25 ) > > print( predict( fit3sls[[ 3 ]]$e1c, newdata = smallData ) ) demand.pred supply.pred 1 110 118 > print( predict( fit3sls[[ 3 ]]$e1c$eq[[ 1 ]], newdata = smallData ) ) fit 1 110 > > print( predict( fit3sls[[ 4 ]]$e2e, se.fit = TRUE, level = 0.9, + newdata = smallData ) ) demand.pred demand.se.fit supply.pred supply.se.fit 1 110 2.34 117 3.29 > print( predict( fit3sls[[ 5 ]]$e2e$eq[[ 1 ]], se.pred = TRUE, level = 0.99, + newdata = smallData ) ) fit se.pred 1 110 3.07 > > print( predict( fit3sls[[ 1]]$e3, interval = "prediction", level = 0.975, + newdata = smallData ) ) demand.pred demand.lwr demand.upr supply.pred supply.lwr supply.upr 1 110 102 117 117 106 127 > print( predict( fit3sls[[ 1 ]]$e3$eq[[ 1 ]], interval = "confidence", level = 0.8, + newdata = smallData ) ) fit lwr upr 1 110 106 113 > > print( predict( fit3sls[[ 4]]$e3we, interval = "prediction", level = 0.975, + newdata = smallData ) ) demand.pred demand.lwr demand.upr supply.pred supply.lwr supply.upr 1 110 103 117 117 107 126 > print( predict( fit3sls[[ 4 ]]$e3we$eq[[ 1 ]], interval = "confidence", level = 0.8, + newdata = smallData ) ) fit lwr upr 1 110 107 113 > > print( predict( fit3sls[[ 2 ]]$e4e, se.fit = TRUE, interval = "confidence", + level = 0.999, newdata = smallData ) ) demand.pred demand.se.fit demand.lwr demand.upr supply.pred supply.se.fit 1 110 2.14 103 118 119 2.25 supply.lwr supply.upr 1 110 127 > print( predict( fit3sls[[ 2 ]]$e4e$eq[[ 2 ]], se.pred = TRUE, interval = "prediction", + level = 0.75, newdata = smallData ) ) fit se.pred lwr upr 1 119 3.41 115 123 > > print( predict( fit3sls[[ 3 ]]$e5, se.fit = TRUE, interval = "prediction", + newdata = smallData ) ) demand.pred demand.se.fit demand.lwr demand.upr supply.pred supply.se.fit 1 111 2.3 104 117 119 2.44 supply.lwr supply.upr 1 111 126 > print( predict( fit3sls[[ 3 ]]$e5$eq[[ 1 ]], se.pred = TRUE, interval = "confidence", + newdata = smallData ) ) fit se.pred lwr upr 1 111 3.02 106 115 > > print( predict( fit3slsi[[ 4 ]]$e3e, se.fit = TRUE, se.pred = TRUE, + interval = "prediction", level = 0.5, newdata = smallData ) ) demand.pred demand.se.fit demand.se.pred demand.lwr demand.upr supply.pred 1 108 2.75 3.66 106 111 112 supply.se.fit supply.se.pred supply.lwr supply.upr 1 3.46 4.54 109 115 > print( predict( fit3slsd[[ 5 ]]$e4$eq[[ 1 ]], se.fit = TRUE, se.pred = TRUE, + interval = "confidence", level = 0.25, newdata = smallData ) ) fit se.fit se.pred lwr upr 1 111 1.85 3.42 111 112 > > print( predict( fit3slsd[[ 2 ]]$e2we, se.fit = TRUE, se.pred = TRUE, + interval = "prediction", level = 0.5, newdata = smallData ) ) demand.pred demand.se.fit demand.se.pred demand.lwr demand.upr supply.pred 1 101 2.76 4.1 98.7 104 111 supply.se.fit supply.se.pred supply.lwr supply.upr 1 2.79 4.47 108 114 > print( predict( fit3slsi[[ 3 ]]$e4we$eq[[ 1 ]], se.fit = TRUE, se.pred = TRUE, + interval = "confidence", level = 0.25, newdata = smallData ) ) fit se.fit se.pred lwr upr 1 111 2.03 2.86 111 112 > > > ## ************ correlation of predicted values *************** > print( correlation.systemfit( fit3sls[[ 1 ]]$e1c, 2, 1 ) ) [,1] [1,] 0.880 [2,] 0.881 [3,] 0.886 [4,] 0.901 [5,] 0.866 [6,] 0.881 [7,] 0.892 [8,] 0.887 [9,] 0.901 [10,] 0.924 [11,] 0.925 [12,] 0.916 [13,] 0.910 [14,] 0.885 [15,] 0.909 [16,] 0.921 [17,] 0.928 [18,] 0.845 [19,] 0.890 [20,] 0.920 > > print( correlation.systemfit( fit3sls[[ 2 ]]$e2e, 1, 2 ) ) [,1] [1,] 0.935 [2,] 0.927 [3,] 0.923 [4,] 0.921 [5,] 0.876 [6,] 0.884 [7,] 0.894 [8,] 0.875 [9,] 0.890 [10,] 0.917 [11,] 0.911 [12,] 0.898 [13,] 0.892 [14,] 0.871 [15,] 0.905 [16,] 0.945 [17,] 0.926 [18,] 0.908 [19,] 0.915 [20,] 0.926 > > print( correlation.systemfit( fit3sls[[ 5 ]]$e2w, 2, 1 ) ) [,1] [1,] 0.932 [2,] 0.928 [3,] 0.925 [4,] 0.923 [5,] 0.882 [6,] 0.890 [7,] 0.899 [8,] 0.880 [9,] 0.895 [10,] 0.921 [11,] 0.914 [12,] 0.900 [13,] 0.895 [14,] 0.876 [15,] 0.905 [16,] 0.947 [17,] 0.928 [18,] 0.915 [19,] 0.916 [20,] 0.928 > > print( correlation.systemfit( fit3sls[[ 3 ]]$e3, 2, 1 ) ) [,1] [1,] 0.931 [2,] 0.925 [3,] 0.922 [4,] 0.920 [5,] 0.877 [6,] 0.884 [7,] 0.894 [8,] 0.875 [9,] 0.890 [10,] 0.917 [11,] 0.910 [12,] 0.896 [13,] 0.891 [14,] 0.871 [15,] 0.903 [16,] 0.944 [17,] 0.925 [18,] 0.911 [19,] 0.913 [20,] 0.925 > > print( correlation.systemfit( fit3sls[[ 4 ]]$e4e, 1, 2 ) ) [,1] [1,] 0.924 [2,] 0.933 [3,] 0.933 [4,] 0.938 [5,] 0.862 [6,] 0.868 [7,] 0.874 [8,] 0.879 [9,] 0.883 [10,] 0.943 [11,] 0.830 [12,] 0.744 [13,] 0.826 [14,] 0.834 [15,] 0.952 [16,] 0.918 [17,] 0.954 [18,] 0.930 [19,] 0.890 [20,] 0.893 > > print( correlation.systemfit( fit3sls[[ 5 ]]$e5, 2, 1 ) ) [,1] [1,] 0.922 [2,] 0.935 [3,] 0.934 [4,] 0.939 [5,] 0.863 [6,] 0.868 [7,] 0.874 [8,] 0.876 [9,] 0.884 [10,] 0.942 [11,] 0.824 [12,] 0.747 [13,] 0.830 [14,] 0.833 [15,] 0.952 [16,] 0.919 [17,] 0.955 [18,] 0.928 [19,] 0.886 [20,] 0.888 > > print( correlation.systemfit( fit3slsi[[ 2 ]]$e3e, 1, 2 ) ) [,1] [1,] 0.982 [2,] 0.994 [3,] 0.993 [4,] 0.992 [5,] 0.990 [6,] 0.990 [7,] 0.991 [8,] 0.978 [9,] 0.984 [10,] 0.992 [11,] 0.991 [12,] 0.985 [13,] 0.986 [14,] 0.980 [15,] 0.976 [16,] 0.994 [17,] 0.992 [18,] 0.987 [19,] 0.990 [20,] 0.991 > > print( correlation.systemfit( fit3slsi[[ 4 ]]$e5w, 1, 2 ) ) [,1] [1,] 0.962 [2,] 0.975 [3,] 0.974 [4,] 0.976 [5,] 0.946 [6,] 0.948 [7,] 0.951 [8,] 0.944 [9,] 0.952 [10,] 0.976 [11,] 0.912 [12,] 0.871 [13,] 0.926 [14,] 0.927 [15,] 0.979 [16,] 0.968 [17,] 0.981 [18,] 0.970 [19,] 0.947 [20,] 0.943 > > print( correlation.systemfit( fit3slsd[[ 3 ]]$e4, 2, 1 ) ) [,1] [1,] 0.932 [2,] 0.954 [3,] 0.952 [4,] 0.957 [5,] 0.892 [6,] 0.887 [7,] 0.887 [8,] 0.905 [9,] 0.914 [10,] 0.963 [11,] 0.860 [12,] 0.779 [13,] 0.878 [14,] 0.852 [15,] 0.968 [16,] 0.938 [17,] 0.973 [18,] 0.946 [19,] 0.913 [20,] 0.921 > > > ## ************ Log-Likelihood values *************** > print( logLik( fit3sls[[ 1 ]]$e1c ) ) 'log Lik.' -53 (df=10) > print( logLik( fit3sls[[ 1 ]]$e1c, residCovDiag = TRUE ) ) 'log Lik.' -85.6 (df=10) > > print( logLik( fit3sls[[ 2 ]]$e2e ) ) 'log Lik.' -55.6 (df=9) > print( logLik( fit3sls[[ 2 ]]$e2e, residCovDiag = TRUE ) ) 'log Lik.' -85.4 (df=9) > > print( logLik( fit3sls[[ 3 ]]$e3 ) ) 'log Lik.' -55.3 (df=9) > print( logLik( fit3sls[[ 3 ]]$e3, residCovDiag = TRUE ) ) 'log Lik.' -85.5 (df=9) > > print( logLik( fit3sls[[ 4 ]]$e4e ) ) 'log Lik.' -58.5 (df=8) > print( logLik( fit3sls[[ 4 ]]$e4e, residCovDiag = TRUE ) ) 'log Lik.' -85.2 (df=8) > > print( logLik( fit3sls[[ 2 ]]$e4wSym ) ) 'log Lik.' -58.5 (df=8) > print( logLik( fit3sls[[ 2 ]]$e4wSym, residCovDiag = TRUE ) ) 'log Lik.' -85.3 (df=8) > > print( logLik( fit3sls[[ 5 ]]$e5 ) ) 'log Lik.' -87.3 (df=8) > print( logLik( fit3sls[[ 5 ]]$e5, residCovDiag = TRUE ) ) 'log Lik.' -104 (df=8) > > print( logLik( fit3slsi[[ 2 ]]$e3e ) ) 'log Lik.' -46.7 (df=9) > print( logLik( fit3slsi[[ 2 ]]$e3e, residCovDiag = TRUE ) ) 'log Lik.' -92.1 (df=9) > > print( logLik( fit3slsi[[ 1 ]]$e1we ) ) 'log Lik.' -52.7 (df=10) > print( logLik( fit3slsi[[ 1 ]]$e1we, residCovDiag = TRUE ) ) 'log Lik.' -85.8 (df=10) > > print( logLik( fit3slsd[[ 3 ]]$e4 ) ) 'log Lik.' -59.4 (df=8) > print( logLik( fit3slsd[[ 3 ]]$e4, residCovDiag = TRUE ) ) 'log Lik.' -86.1 (df=8) > > print( logLik( fit3slsd[[ 5 ]]$e2we ) ) 'log Lik.' -65 (df=9) > print( logLik( fit3slsd[[ 5 ]]$e2we, residCovDiag = TRUE ) ) 'log Lik.' -85.7 (df=9) > > > ## ************** F tests **************** > # testing first restriction > print( linearHypothesis( fit3sls[[ 1 ]]$e1, restrm ) ) Linear hypothesis test (Theil's F test) Hypothesis: demand_income - supply_trend = 0 Model 1: restricted model Model 2: fit3sls[[1]]$e1 Res.Df Df F Pr(>F) 1 34 2 33 1 1.69 0.2 > linearHypothesis( fit3sls[[ 1 ]]$e1, restrict ) Linear hypothesis test (Theil's F test) Hypothesis: demand_income - supply_trend = 0 Model 1: restricted model Model 2: fit3sls[[1]]$e1 Res.Df Df F Pr(>F) 1 34 2 33 1 1.69 0.2 > > print( linearHypothesis( fit3sls[[ 2 ]]$e1e, restrm ) ) Linear hypothesis test (Theil's F test) Hypothesis: demand_income - supply_trend = 0 Model 1: restricted model Model 2: fit3sls[[2]]$e1e Res.Df Df F Pr(>F) 1 34 2 33 1 1.52 0.23 > linearHypothesis( fit3sls[[ 2 ]]$e1e, restrict ) Linear hypothesis test (Theil's F test) Hypothesis: demand_income - supply_trend = 0 Model 1: restricted model Model 2: fit3sls[[2]]$e1e Res.Df Df F Pr(>F) 1 34 2 33 1 1.52 0.23 > > print( linearHypothesis( fit3sls[[ 3 ]]$e1c, restrm ) ) Linear hypothesis test (Theil's F test) Hypothesis: demand_income - supply_trend = 0 Model 1: restricted model Model 2: fit3sls[[3]]$e1c Res.Df Df F Pr(>F) 1 34 2 33 1 2.47 0.13 > linearHypothesis( fit3sls[[ 3 ]]$e1c, restrict ) Linear hypothesis test (Theil's F test) Hypothesis: demand_income - supply_trend = 0 Model 1: restricted model Model 2: fit3sls[[3]]$e1c Res.Df Df F Pr(>F) 1 34 2 33 1 2.47 0.13 > > print( linearHypothesis( fit3slsi[[ 4 ]]$e1, restrm ) ) Linear hypothesis test (Theil's F test) Hypothesis: demand_income - supply_trend = 0 Model 1: restricted model Model 2: fit3slsi[[4]]$e1 Res.Df Df F Pr(>F) 1 34 2 33 1 4.75 0.037 * --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 > linearHypothesis( fit3slsi[[ 4 ]]$e1, restrict ) Linear hypothesis test (Theil's F test) Hypothesis: demand_income - supply_trend = 0 Model 1: restricted model Model 2: fit3slsi[[4]]$e1 Res.Df Df F Pr(>F) 1 34 2 33 1 4.75 0.037 * --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 > > print( linearHypothesis( fit3slsd[[ 5 ]]$e1e, restrm ) ) Linear hypothesis test (Theil's F test) Hypothesis: demand_income - supply_trend = 0 Model 1: restricted model Model 2: fit3slsd[[5]]$e1e Res.Df Df F Pr(>F) 1 34 2 33 1 0.18 0.68 > linearHypothesis( fit3slsd[[ 5 ]]$e1e, restrict ) Linear hypothesis test (Theil's F test) Hypothesis: demand_income - supply_trend = 0 Model 1: restricted model Model 2: fit3slsd[[5]]$e1e Res.Df Df F Pr(>F) 1 34 2 33 1 0.18 0.68 > > print( linearHypothesis( fit3slsd[[ 2 ]]$e1w, restrm ) ) Linear hypothesis test (Theil's F test) Hypothesis: demand_income - supply_trend = 0 Model 1: restricted model Model 2: fit3slsd[[2]]$e1w Res.Df Df F Pr(>F) 1 34 2 33 1 0.51 0.48 > linearHypothesis( fit3slsd[[ 2 ]]$e1w, restrict ) Linear hypothesis test (Theil's F test) Hypothesis: demand_income - supply_trend = 0 Model 1: restricted model Model 2: fit3slsd[[2]]$e1w Res.Df Df F Pr(>F) 1 34 2 33 1 0.51 0.48 > > # testing second restriction > restrOnly2m <- matrix(0,1,7) > restrOnly2q <- 0.5 > restrOnly2m[1,2] <- -1 > restrOnly2m[1,5] <- 1 > restrictOnly2 <- "- demand_price + supply_price = 0.5" > # first restriction not imposed > print( linearHypothesis( fit3sls[[ 5 ]]$e1c, restrOnly2m, restrOnly2q ) ) Linear hypothesis test (Theil's F test) Hypothesis: - demand_price + supply_price = 0.5 Model 1: restricted model Model 2: fit3sls[[5]]$e1c Res.Df Df F Pr(>F) 1 34 2 33 1 0.17 0.69 > linearHypothesis( fit3sls[[ 5 ]]$e1c, restrictOnly2 ) Linear hypothesis test (Theil's F test) Hypothesis: - demand_price + supply_price = 0.5 Model 1: restricted model Model 2: fit3sls[[5]]$e1c Res.Df Df F Pr(>F) 1 34 2 33 1 0.17 0.69 > > print( linearHypothesis( fit3slsi[[ 1 ]]$e1e, restrOnly2m, restrOnly2q ) ) Linear hypothesis test (Theil's F test) Hypothesis: - demand_price + supply_price = 0.5 Model 1: restricted model Model 2: fit3slsi[[1]]$e1e Res.Df Df F Pr(>F) 1 34 2 33 1 0.13 0.72 > linearHypothesis( fit3slsi[[ 1 ]]$e1e, restrictOnly2 ) Linear hypothesis test (Theil's F test) Hypothesis: - demand_price + supply_price = 0.5 Model 1: restricted model Model 2: fit3slsi[[1]]$e1e Res.Df Df F Pr(>F) 1 34 2 33 1 0.13 0.72 > > print( linearHypothesis( fit3slsi[[ 3 ]]$e1we, restrOnly2m, restrOnly2q ) ) Linear hypothesis test (Theil's F test) Hypothesis: - demand_price + supply_price = 0.5 Model 1: restricted model Model 2: fit3slsi[[3]]$e1we Res.Df Df F Pr(>F) 1 34 2 33 1 0.13 0.72 > linearHypothesis( fit3slsi[[ 3 ]]$e1we, restrictOnly2 ) Linear hypothesis test (Theil's F test) Hypothesis: - demand_price + supply_price = 0.5 Model 1: restricted model Model 2: fit3slsi[[3]]$e1we Res.Df Df F Pr(>F) 1 34 2 33 1 0.13 0.72 > > print( linearHypothesis( fit3slsd[[ 2 ]]$e1, restrOnly2m, restrOnly2q ) ) Linear hypothesis test (Theil's F test) Hypothesis: - demand_price + supply_price = 0.5 Model 1: restricted model Model 2: fit3slsd[[2]]$e1 Res.Df Df F Pr(>F) 1 34 2 33 1 0.25 0.62 > linearHypothesis( fit3slsd[[ 2 ]]$e1, restrictOnly2 ) Linear hypothesis test (Theil's F test) Hypothesis: - demand_price + supply_price = 0.5 Model 1: restricted model Model 2: fit3slsd[[2]]$e1 Res.Df Df F Pr(>F) 1 34 2 33 1 0.25 0.62 > > # first restriction imposed > print( linearHypothesis( fit3sls[[ 4 ]]$e2, restrOnly2m, restrOnly2q ) ) Linear hypothesis test (Theil's F test) Hypothesis: - demand_price + supply_price = 0.5 Model 1: restricted model Model 2: fit3sls[[4]]$e2 Res.Df Df F Pr(>F) 1 35 2 34 1 0.81 0.38 > linearHypothesis( fit3sls[[ 4 ]]$e2, restrictOnly2 ) Linear hypothesis test (Theil's F test) Hypothesis: - demand_price + supply_price = 0.5 Model 1: restricted model Model 2: fit3sls[[4]]$e2 Res.Df Df F Pr(>F) 1 35 2 34 1 0.81 0.38 > > print( linearHypothesis( fit3sls[[ 4 ]]$e3, restrOnly2m, restrOnly2q ) ) Linear hypothesis test (Theil's F test) Hypothesis: - demand_price + supply_price = 0.5 Model 1: restricted model Model 2: fit3sls[[4]]$e3 Res.Df Df F Pr(>F) 1 35 2 34 1 0.81 0.38 > linearHypothesis( fit3sls[[ 4 ]]$e3, restrictOnly2 ) Linear hypothesis test (Theil's F test) Hypothesis: - demand_price + supply_price = 0.5 Model 1: restricted model Model 2: fit3sls[[4]]$e3 Res.Df Df F Pr(>F) 1 35 2 34 1 0.81 0.38 > > print( linearHypothesis( fit3sls[[ 1 ]]$e2w, restrOnly2m, restrOnly2q ) ) Linear hypothesis test (Theil's F test) Hypothesis: - demand_price + supply_price = 0.5 Model 1: restricted model Model 2: fit3sls[[1]]$e2w Res.Df Df F Pr(>F) 1 35 2 34 1 0.9 0.35 > linearHypothesis( fit3sls[[ 1 ]]$e2w, restrictOnly2 ) Linear hypothesis test (Theil's F test) Hypothesis: - demand_price + supply_price = 0.5 Model 1: restricted model Model 2: fit3sls[[1]]$e2w Res.Df Df F Pr(>F) 1 35 2 34 1 0.9 0.35 > > print( linearHypothesis( fit3sls[[ 1 ]]$e3we, restrOnly2m, restrOnly2q ) ) Linear hypothesis test (Theil's F test) Hypothesis: - demand_price + supply_price = 0.5 Model 1: restricted model Model 2: fit3sls[[1]]$e3we Res.Df Df F Pr(>F) 1 35 2 34 1 0.75 0.39 > linearHypothesis( fit3sls[[ 1 ]]$e3we, restrictOnly2 ) Linear hypothesis test (Theil's F test) Hypothesis: - demand_price + supply_price = 0.5 Model 1: restricted model Model 2: fit3sls[[1]]$e3we Res.Df Df F Pr(>F) 1 35 2 34 1 0.75 0.39 > > print( linearHypothesis( fit3slsi[[ 5 ]]$e2e, restrOnly2m, restrOnly2q ) ) Linear hypothesis test (Theil's F test) Hypothesis: - demand_price + supply_price = 0.5 Model 1: restricted model Model 2: fit3slsi[[5]]$e2e Res.Df Df F Pr(>F) 1 35 2 34 1 15.1 0.00044 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 > linearHypothesis( fit3slsi[[ 5 ]]$e2e, restrictOnly2 ) Linear hypothesis test (Theil's F test) Hypothesis: - demand_price + supply_price = 0.5 Model 1: restricted model Model 2: fit3slsi[[5]]$e2e Res.Df Df F Pr(>F) 1 35 2 34 1 15.1 0.00044 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 > > print( linearHypothesis( fit3slsi[[ 5 ]]$e3e, restrOnly2m, restrOnly2q ) ) Linear hypothesis test (Theil's F test) Hypothesis: - demand_price + supply_price = 0.5 Model 1: restricted model Model 2: fit3slsi[[5]]$e3e Res.Df Df F Pr(>F) 1 35 2 34 1 15.1 0.00044 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 > linearHypothesis( fit3slsi[[ 5 ]]$e3e, restrictOnly2 ) Linear hypothesis test (Theil's F test) Hypothesis: - demand_price + supply_price = 0.5 Model 1: restricted model Model 2: fit3slsi[[5]]$e3e Res.Df Df F Pr(>F) 1 35 2 34 1 15.1 0.00044 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 > > print( linearHypothesis( fit3slsd[[ 1 ]]$e2, restrOnly2m, restrOnly2q ) ) Linear hypothesis test (Theil's F test) Hypothesis: - demand_price + supply_price = 0.5 Model 1: restricted model Model 2: fit3slsd[[1]]$e2 Res.Df Df F Pr(>F) 1 35 2 34 1 0.16 0.69 > linearHypothesis( fit3slsd[[ 1 ]]$e2, restrictOnly2 ) Linear hypothesis test (Theil's F test) Hypothesis: - demand_price + supply_price = 0.5 Model 1: restricted model Model 2: fit3slsd[[1]]$e2 Res.Df Df F Pr(>F) 1 35 2 34 1 0.16 0.69 > > print( linearHypothesis( fit3slsd[[ 1 ]]$e3, restrOnly2m, restrOnly2q ) ) Linear hypothesis test (Theil's F test) Hypothesis: - demand_price + supply_price = 0.5 Model 1: restricted model Model 2: fit3slsd[[1]]$e3 Res.Df Df F Pr(>F) 1 35 2 34 1 0.16 0.69 > linearHypothesis( fit3slsd[[ 1 ]]$e3, restrictOnly2 ) Linear hypothesis test (Theil's F test) Hypothesis: - demand_price + supply_price = 0.5 Model 1: restricted model Model 2: fit3slsd[[1]]$e3 Res.Df Df F Pr(>F) 1 35 2 34 1 0.16 0.69 > > # testing both of the restrictions > print( linearHypothesis( fit3sls[[ 2 ]]$e1e, restr2m, restr2q ) ) Linear hypothesis test (Theil's F test) Hypothesis: demand_income - supply_trend = 0 - demand_price + supply_price = 0.5 Model 1: restricted model Model 2: fit3sls[[2]]$e1e Res.Df Df F Pr(>F) 1 35 2 33 2 1 0.38 > linearHypothesis( fit3sls[[ 2 ]]$e1e, restrict2 ) Linear hypothesis test (Theil's F test) Hypothesis: demand_income - supply_trend = 0 - demand_price + supply_price = 0.5 Model 1: restricted model Model 2: fit3sls[[2]]$e1e Res.Df Df F Pr(>F) 1 35 2 33 2 1 0.38 > > print( linearHypothesis( fit3slsi[[ 3 ]]$e1, restr2m, restr2q ) ) Linear hypothesis test (Theil's F test) Hypothesis: demand_income - supply_trend = 0 - demand_price + supply_price = 0.5 Model 1: restricted model Model 2: fit3slsi[[3]]$e1 Res.Df Df F Pr(>F) 1 35 2 33 2 5.59 0.0081 ** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 > linearHypothesis( fit3slsi[[ 3 ]]$e1, restrict2 ) Linear hypothesis test (Theil's F test) Hypothesis: demand_income - supply_trend = 0 - demand_price + supply_price = 0.5 Model 1: restricted model Model 2: fit3slsi[[3]]$e1 Res.Df Df F Pr(>F) 1 35 2 33 2 5.59 0.0081 ** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 > > print( linearHypothesis( fit3slsd[[ 4 ]]$e1e, restr2m, restr2q ) ) Linear hypothesis test (Theil's F test) Hypothesis: demand_income - supply_trend = 0 - demand_price + supply_price = 0.5 Model 1: restricted model Model 2: fit3slsd[[4]]$e1e Res.Df Df F Pr(>F) 1 35 2 33 2 0.64 0.53 > linearHypothesis( fit3slsd[[ 4 ]]$e1e, restrict2 ) Linear hypothesis test (Theil's F test) Hypothesis: demand_income - supply_trend = 0 - demand_price + supply_price = 0.5 Model 1: restricted model Model 2: fit3slsd[[4]]$e1e Res.Df Df F Pr(>F) 1 35 2 33 2 0.64 0.53 > > print( linearHypothesis( fit3slsd[[ 5 ]]$e1w, restr2m, restr2q ) ) Linear hypothesis test (Theil's F test) Hypothesis: demand_income - supply_trend = 0 - demand_price + supply_price = 0.5 Model 1: restricted model Model 2: fit3slsd[[5]]$e1w Res.Df Df F Pr(>F) 1 35 2 33 2 0.45 0.64 > linearHypothesis( fit3slsd[[ 5 ]]$e1w, restrict2 ) Linear hypothesis test (Theil's F test) Hypothesis: demand_income - supply_trend = 0 - demand_price + supply_price = 0.5 Model 1: restricted model Model 2: fit3slsd[[5]]$e1w Res.Df Df F Pr(>F) 1 35 2 33 2 0.45 0.64 > > > ## ************** Wald tests **************** > # testing first restriction > print( linearHypothesis( fit3sls[[ 1 ]]$e1, restrm, test = "Chisq" ) ) Linear hypothesis test (Chi^2 statistic of a Wald test) Hypothesis: demand_income - supply_trend = 0 Model 1: restricted model Model 2: fit3sls[[1]]$e1 Res.Df Df Chisq Pr(>Chisq) 1 34 2 33 1 1.11 0.29 > linearHypothesis( fit3sls[[ 1 ]]$e1, restrict, test = "Chisq" ) Linear hypothesis test (Chi^2 statistic of a Wald test) Hypothesis: demand_income - supply_trend = 0 Model 1: restricted model Model 2: fit3sls[[1]]$e1 Res.Df Df Chisq Pr(>Chisq) 1 34 2 33 1 1.11 0.29 > > print( linearHypothesis( fit3sls[[ 2 ]]$e1e, restrm, test = "Chisq" ) ) Linear hypothesis test (Chi^2 statistic of a Wald test) Hypothesis: demand_income - supply_trend = 0 Model 1: restricted model Model 2: fit3sls[[2]]$e1e Res.Df Df Chisq Pr(>Chisq) 1 34 2 33 1 1.23 0.27 > linearHypothesis( fit3sls[[ 2 ]]$e1e, restrict, test = "Chisq" ) Linear hypothesis test (Chi^2 statistic of a Wald test) Hypothesis: demand_income - supply_trend = 0 Model 1: restricted model Model 2: fit3sls[[2]]$e1e Res.Df Df Chisq Pr(>Chisq) 1 34 2 33 1 1.23 0.27 > > print( linearHypothesis( fit3sls[[ 3 ]]$e1c, restrm, test = "Chisq" ) ) Linear hypothesis test (Chi^2 statistic of a Wald test) Hypothesis: demand_income - supply_trend = 0 Model 1: restricted model Model 2: fit3sls[[3]]$e1c Res.Df Df Chisq Pr(>Chisq) 1 34 2 33 1 1.73 0.19 > linearHypothesis( fit3sls[[ 3 ]]$e1c, restrict, test = "Chisq" ) Linear hypothesis test (Chi^2 statistic of a Wald test) Hypothesis: demand_income - supply_trend = 0 Model 1: restricted model Model 2: fit3sls[[3]]$e1c Res.Df Df Chisq Pr(>Chisq) 1 34 2 33 1 1.73 0.19 > > print( linearHypothesis( fit3slsi[[ 4 ]]$e1, restrm, test = "Chisq" ) ) Linear hypothesis test (Chi^2 statistic of a Wald test) Hypothesis: demand_income - supply_trend = 0 Model 1: restricted model Model 2: fit3slsi[[4]]$e1 Res.Df Df Chisq Pr(>Chisq) 1 34 2 33 1 4.81 0.028 * --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 > linearHypothesis( fit3slsi[[ 4 ]]$e1, restrict, test = "Chisq" ) Linear hypothesis test (Chi^2 statistic of a Wald test) Hypothesis: demand_income - supply_trend = 0 Model 1: restricted model Model 2: fit3slsi[[4]]$e1 Res.Df Df Chisq Pr(>Chisq) 1 34 2 33 1 4.81 0.028 * --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 > > print( linearHypothesis( fit3slsi[[ 2 ]]$e1we, restrm, test = "Chisq" ) ) Linear hypothesis test (Chi^2 statistic of a Wald test) Hypothesis: demand_income - supply_trend = 0 Model 1: restricted model Model 2: fit3slsi[[2]]$e1we Res.Df Df Chisq Pr(>Chisq) 1 34 2 33 1 5.72 0.017 * --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 > linearHypothesis( fit3slsi[[ 2 ]]$e1we, restrict, test = "Chisq" ) Linear hypothesis test (Chi^2 statistic of a Wald test) Hypothesis: demand_income - supply_trend = 0 Model 1: restricted model Model 2: fit3slsi[[2]]$e1we Res.Df Df Chisq Pr(>Chisq) 1 34 2 33 1 5.72 0.017 * --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 > > print( linearHypothesis( fit3slsd[[ 5 ]]$e1e, restrm, test = "Chisq" ) ) Linear hypothesis test (Chi^2 statistic of a Wald test) Hypothesis: demand_income - supply_trend = 0 Model 1: restricted model Model 2: fit3slsd[[5]]$e1e Res.Df Df Chisq Pr(>Chisq) 1 34 2 33 1 0.15 0.7 > linearHypothesis( fit3slsd[[ 5 ]]$e1e, restrict, test = "Chisq" ) Linear hypothesis test (Chi^2 statistic of a Wald test) Hypothesis: demand_income - supply_trend = 0 Model 1: restricted model Model 2: fit3slsd[[5]]$e1e Res.Df Df Chisq Pr(>Chisq) 1 34 2 33 1 0.15 0.7 > > # testing second restriction > # first restriction not imposed > print( linearHypothesis( fit3sls[[ 5 ]]$e1c, restrOnly2m, restrOnly2q, test = "Chisq" ) ) Linear hypothesis test (Chi^2 statistic of a Wald test) Hypothesis: - demand_price + supply_price = 0.5 Model 1: restricted model Model 2: fit3sls[[5]]$e1c Res.Df Df Chisq Pr(>Chisq) 1 34 2 33 1 0.12 0.73 > linearHypothesis( fit3sls[[ 5 ]]$e1c, restrictOnly2, test = "Chisq" ) Linear hypothesis test (Chi^2 statistic of a Wald test) Hypothesis: - demand_price + supply_price = 0.5 Model 1: restricted model Model 2: fit3sls[[5]]$e1c Res.Df Df Chisq Pr(>Chisq) 1 34 2 33 1 0.12 0.73 > > print( linearHypothesis( fit3sls[[ 3 ]]$e1wc, restrOnly2m, restrOnly2q, test = "Chisq" ) ) Linear hypothesis test (Chi^2 statistic of a Wald test) Hypothesis: - demand_price + supply_price = 0.5 Model 1: restricted model Model 2: fit3sls[[3]]$e1wc Res.Df Df Chisq Pr(>Chisq) 1 34 2 33 1 0.12 0.73 > linearHypothesis( fit3sls[[ 3 ]]$e1wc, restrictOnly2, test = "Chisq" ) Linear hypothesis test (Chi^2 statistic of a Wald test) Hypothesis: - demand_price + supply_price = 0.5 Model 1: restricted model Model 2: fit3sls[[3]]$e1wc Res.Df Df Chisq Pr(>Chisq) 1 34 2 33 1 0.12 0.73 > > print( linearHypothesis( fit3slsi[[ 1 ]]$e1e, restrOnly2m, restrOnly2q, test = "Chisq" ) ) Linear hypothesis test (Chi^2 statistic of a Wald test) Hypothesis: - demand_price + supply_price = 0.5 Model 1: restricted model Model 2: fit3slsi[[1]]$e1e Res.Df Df Chisq Pr(>Chisq) 1 34 2 33 1 0.16 0.69 > linearHypothesis( fit3slsi[[ 1 ]]$e1e, restrictOnly2, test = "Chisq" ) Linear hypothesis test (Chi^2 statistic of a Wald test) Hypothesis: - demand_price + supply_price = 0.5 Model 1: restricted model Model 2: fit3slsi[[1]]$e1e Res.Df Df Chisq Pr(>Chisq) 1 34 2 33 1 0.16 0.69 > > print( linearHypothesis( fit3slsd[[ 2 ]]$e1, restrOnly2m, restrOnly2q, test = "Chisq" ) ) Linear hypothesis test (Chi^2 statistic of a Wald test) Hypothesis: - demand_price + supply_price = 0.5 Model 1: restricted model Model 2: fit3slsd[[2]]$e1 Res.Df Df Chisq Pr(>Chisq) 1 34 2 33 1 0.17 0.68 > linearHypothesis( fit3slsd[[ 2 ]]$e1, restrictOnly2, test = "Chisq" ) Linear hypothesis test (Chi^2 statistic of a Wald test) Hypothesis: - demand_price + supply_price = 0.5 Model 1: restricted model Model 2: fit3slsd[[2]]$e1 Res.Df Df Chisq Pr(>Chisq) 1 34 2 33 1 0.17 0.68 > > # first restriction imposed > print( linearHypothesis( fit3sls[[ 4 ]]$e2, restrOnly2m, restrOnly2q, test = "Chisq" ) ) Linear hypothesis test (Chi^2 statistic of a Wald test) Hypothesis: - demand_price + supply_price = 0.5 Model 1: restricted model Model 2: fit3sls[[4]]$e2 Res.Df Df Chisq Pr(>Chisq) 1 35 2 34 1 0.55 0.46 > linearHypothesis( fit3sls[[ 4 ]]$e2, restrictOnly2, test = "Chisq" ) Linear hypothesis test (Chi^2 statistic of a Wald test) Hypothesis: - demand_price + supply_price = 0.5 Model 1: restricted model Model 2: fit3sls[[4]]$e2 Res.Df Df Chisq Pr(>Chisq) 1 35 2 34 1 0.55 0.46 > > print( linearHypothesis( fit3sls[[ 4 ]]$e3, restrOnly2m, restrOnly2q, test = "Chisq" ) ) Linear hypothesis test (Chi^2 statistic of a Wald test) Hypothesis: - demand_price + supply_price = 0.5 Model 1: restricted model Model 2: fit3sls[[4]]$e3 Res.Df Df Chisq Pr(>Chisq) 1 35 2 34 1 0.55 0.46 > linearHypothesis( fit3sls[[ 4 ]]$e3, restrictOnly2, test = "Chisq" ) Linear hypothesis test (Chi^2 statistic of a Wald test) Hypothesis: - demand_price + supply_price = 0.5 Model 1: restricted model Model 2: fit3sls[[4]]$e3 Res.Df Df Chisq Pr(>Chisq) 1 35 2 34 1 0.55 0.46 > > print( linearHypothesis( fit3slsi[[ 5 ]]$e2e, restrOnly2m, restrOnly2q, test = "Chisq" ) ) Linear hypothesis test (Chi^2 statistic of a Wald test) Hypothesis: - demand_price + supply_price = 0.5 Model 1: restricted model Model 2: fit3slsi[[5]]$e2e Res.Df Df Chisq Pr(>Chisq) 1 35 2 34 1 17.8 2.4e-05 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 > linearHypothesis( fit3slsi[[ 5 ]]$e2e, restrictOnly2, test = "Chisq" ) Linear hypothesis test (Chi^2 statistic of a Wald test) Hypothesis: - demand_price + supply_price = 0.5 Model 1: restricted model Model 2: fit3slsi[[5]]$e2e Res.Df Df Chisq Pr(>Chisq) 1 35 2 34 1 17.8 2.4e-05 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 > > print( linearHypothesis( fit3slsi[[ 5 ]]$e3e, restrOnly2m, restrOnly2q, test = "Chisq" ) ) Linear hypothesis test (Chi^2 statistic of a Wald test) Hypothesis: - demand_price + supply_price = 0.5 Model 1: restricted model Model 2: fit3slsi[[5]]$e3e Res.Df Df Chisq Pr(>Chisq) 1 35 2 34 1 17.8 2.4e-05 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 > linearHypothesis( fit3slsi[[ 5 ]]$e3e, restrictOnly2, test = "Chisq" ) Linear hypothesis test (Chi^2 statistic of a Wald test) Hypothesis: - demand_price + supply_price = 0.5 Model 1: restricted model Model 2: fit3slsi[[5]]$e3e Res.Df Df Chisq Pr(>Chisq) 1 35 2 34 1 17.8 2.4e-05 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 > > print( linearHypothesis( fit3slsd[[ 1 ]]$e2, restrOnly2m, restrOnly2q, test = "Chisq" ) ) Linear hypothesis test (Chi^2 statistic of a Wald test) Hypothesis: - demand_price + supply_price = 0.5 Model 1: restricted model Model 2: fit3slsd[[1]]$e2 Res.Df Df Chisq Pr(>Chisq) 1 35 2 34 1 0.13 0.72 > linearHypothesis( fit3slsd[[ 1 ]]$e2, restrictOnly2, test = "Chisq" ) Linear hypothesis test (Chi^2 statistic of a Wald test) Hypothesis: - demand_price + supply_price = 0.5 Model 1: restricted model Model 2: fit3slsd[[1]]$e2 Res.Df Df Chisq Pr(>Chisq) 1 35 2 34 1 0.13 0.72 > > print( linearHypothesis( fit3slsd[[ 1 ]]$e3, restrOnly2m, restrOnly2q, test = "Chisq" ) ) Linear hypothesis test (Chi^2 statistic of a Wald test) Hypothesis: - demand_price + supply_price = 0.5 Model 1: restricted model Model 2: fit3slsd[[1]]$e3 Res.Df Df Chisq Pr(>Chisq) 1 35 2 34 1 0.13 0.72 > linearHypothesis( fit3slsd[[ 1 ]]$e3, restrictOnly2, test = "Chisq" ) Linear hypothesis test (Chi^2 statistic of a Wald test) Hypothesis: - demand_price + supply_price = 0.5 Model 1: restricted model Model 2: fit3slsd[[1]]$e3 Res.Df Df Chisq Pr(>Chisq) 1 35 2 34 1 0.13 0.72 > > print( linearHypothesis( fit3slsd[[ 2 ]]$e2we, restrOnly2m, restrOnly2q, test = "Chisq" ) ) Linear hypothesis test (Chi^2 statistic of a Wald test) Hypothesis: - demand_price + supply_price = 0.5 Model 1: restricted model Model 2: fit3slsd[[2]]$e2we Res.Df Df Chisq Pr(>Chisq) 1 35 2 34 1 1.52 0.22 > linearHypothesis( fit3slsd[[ 2 ]]$e2we, restrictOnly2, test = "Chisq" ) Linear hypothesis test (Chi^2 statistic of a Wald test) Hypothesis: - demand_price + supply_price = 0.5 Model 1: restricted model Model 2: fit3slsd[[2]]$e2we Res.Df Df Chisq Pr(>Chisq) 1 35 2 34 1 1.52 0.22 > > print( linearHypothesis( fit3slsd[[ 3 ]]$e3w, restrOnly2m, restrOnly2q, test = "Chisq" ) ) Linear hypothesis test (Chi^2 statistic of a Wald test) Hypothesis: - demand_price + supply_price = 0.5 Model 1: restricted model Model 2: fit3slsd[[3]]$e3w Res.Df Df Chisq Pr(>Chisq) 1 35 2 34 1 0.23 0.63 > linearHypothesis( fit3slsd[[ 3 ]]$e3w, restrictOnly2, test = "Chisq" ) Linear hypothesis test (Chi^2 statistic of a Wald test) Hypothesis: - demand_price + supply_price = 0.5 Model 1: restricted model Model 2: fit3slsd[[3]]$e3w Res.Df Df Chisq Pr(>Chisq) 1 35 2 34 1 0.23 0.63 > > # testing both of the restrictions > print( linearHypothesis( fit3sls[[ 2 ]]$e1e, restr2m, restr2q, test = "Chisq" ) ) Linear hypothesis test (Chi^2 statistic of a Wald test) Hypothesis: demand_income - supply_trend = 0 - demand_price + supply_price = 0.5 Model 1: restricted model Model 2: fit3sls[[2]]$e1e Res.Df Df Chisq Pr(>Chisq) 1 35 2 33 2 1.62 0.44 > linearHypothesis( fit3sls[[ 2 ]]$e1e, restrict2, test = "Chisq" ) Linear hypothesis test (Chi^2 statistic of a Wald test) Hypothesis: demand_income - supply_trend = 0 - demand_price + supply_price = 0.5 Model 1: restricted model Model 2: fit3sls[[2]]$e1e Res.Df Df Chisq Pr(>Chisq) 1 35 2 33 2 1.62 0.44 > > print( linearHypothesis( fit3sls[[ 5 ]]$e1wc, restr2m, restr2q, test = "Chisq" ) ) Linear hypothesis test (Chi^2 statistic of a Wald test) Hypothesis: demand_income - supply_trend = 0 - demand_price + supply_price = 0.5 Model 1: restricted model Model 2: fit3sls[[5]]$e1wc Res.Df Df Chisq Pr(>Chisq) 1 35 2 33 2 2.43 0.3 > linearHypothesis( fit3sls[[ 5 ]]$e1wc, restrict2, test = "Chisq" ) Linear hypothesis test (Chi^2 statistic of a Wald test) Hypothesis: demand_income - supply_trend = 0 - demand_price + supply_price = 0.5 Model 1: restricted model Model 2: fit3sls[[5]]$e1wc Res.Df Df Chisq Pr(>Chisq) 1 35 2 33 2 2.43 0.3 > > print( linearHypothesis( fit3slsi[[ 3 ]]$e1, restr2m, restr2q, test = "Chisq" ) ) Linear hypothesis test (Chi^2 statistic of a Wald test) Hypothesis: demand_income - supply_trend = 0 - demand_price + supply_price = 0.5 Model 1: restricted model Model 2: fit3slsi[[3]]$e1 Res.Df Df Chisq Pr(>Chisq) 1 35 2 33 2 11.3 0.0035 ** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 > linearHypothesis( fit3slsi[[ 3 ]]$e1, restrict2, test = "Chisq" ) Linear hypothesis test (Chi^2 statistic of a Wald test) Hypothesis: demand_income - supply_trend = 0 - demand_price + supply_price = 0.5 Model 1: restricted model Model 2: fit3slsi[[3]]$e1 Res.Df Df Chisq Pr(>Chisq) 1 35 2 33 2 11.3 0.0035 ** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 > > print( linearHypothesis( fit3slsd[[ 4 ]]$e1e, restr2m, restr2q, test = "Chisq" ) ) Linear hypothesis test (Chi^2 statistic of a Wald test) Hypothesis: demand_income - supply_trend = 0 - demand_price + supply_price = 0.5 Model 1: restricted model Model 2: fit3slsd[[4]]$e1e Res.Df Df Chisq Pr(>Chisq) 1 35 2 33 2 1.55 0.46 > linearHypothesis( fit3slsd[[ 4 ]]$e1e, restrict2, test = "Chisq" ) Linear hypothesis test (Chi^2 statistic of a Wald test) Hypothesis: demand_income - supply_trend = 0 - demand_price + supply_price = 0.5 Model 1: restricted model Model 2: fit3slsd[[4]]$e1e Res.Df Df Chisq Pr(>Chisq) 1 35 2 33 2 1.55 0.46 > > > ## *********** model frame ************* > print( mf <- model.frame( fit3sls[[ 3 ]]$e1c ) ) consump price income farmPrice trend 1 98.5 100.3 87.4 98.0 1 2 99.2 104.3 97.6 99.1 2 3 102.2 103.4 96.7 99.1 3 4 101.5 104.5 98.2 98.1 4 5 104.2 98.0 99.8 110.8 5 6 103.2 99.5 100.5 108.2 6 7 104.0 101.1 103.2 105.6 7 8 99.9 104.8 107.8 109.8 8 9 100.3 96.4 96.6 108.7 9 10 102.8 91.2 88.9 100.6 10 11 95.4 93.1 75.1 81.0 11 12 92.4 98.8 76.9 68.6 12 13 94.5 102.9 84.6 70.9 13 14 98.8 98.8 90.6 81.4 14 15 105.8 95.1 103.1 102.3 15 16 100.2 98.5 105.1 105.0 16 17 103.5 86.5 96.4 110.5 17 18 99.9 104.0 104.4 92.5 18 19 105.2 105.8 110.7 89.3 19 20 106.2 113.5 127.1 93.0 20 > print( mf1 <- model.frame( fit3sls[[ 3 ]]$e1c$eq[[ 1 ]] ) ) consump price income 1 98.5 100.3 87.4 2 99.2 104.3 97.6 3 102.2 103.4 96.7 4 101.5 104.5 98.2 5 104.2 98.0 99.8 6 103.2 99.5 100.5 7 104.0 101.1 103.2 8 99.9 104.8 107.8 9 100.3 96.4 96.6 10 102.8 91.2 88.9 11 95.4 93.1 75.1 12 92.4 98.8 76.9 13 94.5 102.9 84.6 14 98.8 98.8 90.6 15 105.8 95.1 103.1 16 100.2 98.5 105.1 17 103.5 86.5 96.4 18 99.9 104.0 104.4 19 105.2 105.8 110.7 20 106.2 113.5 127.1 > print( attributes( mf1 )$terms ) consump ~ price + income attr(,"variables") list(consump, price, income) attr(,"factors") price income consump 0 0 price 1 0 income 0 1 attr(,"term.labels") [1] "price" "income" attr(,"order") [1] 1 1 attr(,"intercept") [1] 1 attr(,"response") [1] 1 attr(,".Environment") attr(,"predvars") list(consump, price, income) attr(,"dataClasses") consump price income "numeric" "numeric" "numeric" > print( mf2 <- model.frame( fit3sls[[ 3 ]]$e1c$eq[[ 2 ]] ) ) consump price farmPrice trend 1 98.5 100.3 98.0 1 2 99.2 104.3 99.1 2 3 102.2 103.4 99.1 3 4 101.5 104.5 98.1 4 5 104.2 98.0 110.8 5 6 103.2 99.5 108.2 6 7 104.0 101.1 105.6 7 8 99.9 104.8 109.8 8 9 100.3 96.4 108.7 9 10 102.8 91.2 100.6 10 11 95.4 93.1 81.0 11 12 92.4 98.8 68.6 12 13 94.5 102.9 70.9 13 14 98.8 98.8 81.4 14 15 105.8 95.1 102.3 15 16 100.2 98.5 105.0 16 17 103.5 86.5 110.5 17 18 99.9 104.0 92.5 18 19 105.2 105.8 89.3 19 20 106.2 113.5 93.0 20 > print( attributes( mf2 )$terms ) consump ~ price + farmPrice + trend attr(,"variables") list(consump, price, farmPrice, trend) attr(,"factors") price farmPrice trend consump 0 0 0 price 1 0 0 farmPrice 0 1 0 trend 0 0 1 attr(,"term.labels") [1] "price" "farmPrice" "trend" attr(,"order") [1] 1 1 1 attr(,"intercept") [1] 1 attr(,"response") [1] 1 attr(,".Environment") attr(,"predvars") list(consump, price, farmPrice, trend) attr(,"dataClasses") consump price farmPrice trend "numeric" "numeric" "numeric" "numeric" > > print( all.equal( mf, model.frame( fit3sls[[ 3 ]]$e1wc ) ) ) [1] TRUE > print( all.equal( mf2, model.frame( fit3sls[[ 3 ]]$e1wc$eq[[ 2 ]] ) ) ) [1] TRUE > > print( all.equal( mf, model.frame( fit3sls[[ 4 ]]$e2e ) ) ) [1] TRUE > print( all.equal( mf2, model.frame( fit3sls[[ 4 ]]$e2e$eq[[ 2 ]] ) ) ) [1] TRUE > > print( all.equal( mf, model.frame( fit3sls[[ 5 ]]$e3 ) ) ) [1] TRUE > print( all.equal( mf1, model.frame( fit3sls[[ 5 ]]$e3$eq[[ 1 ]] ) ) ) [1] TRUE > > print( all.equal( mf, model.frame( fit3sls[[ 1 ]]$e4e ) ) ) [1] TRUE > print( all.equal( mf2, model.frame( fit3sls[[ 1 ]]$e4e$eq[[ 2 ]] ) ) ) [1] TRUE > > print( all.equal( mf, model.frame( fit3sls[[ 2 ]]$e5 ) ) ) [1] TRUE > print( all.equal( mf1, model.frame( fit3sls[[ 3 ]]$e5$eq[[ 1 ]] ) ) ) [1] TRUE > > print( all.equal( mf, model.frame( fit3slsi[[ 4 ]]$e3e ) ) ) [1] TRUE > print( all.equal( mf1, model.frame( fit3slsi[[ 4 ]]$e3e$eq[[ 1 ]] ) ) ) [1] TRUE > > print( all.equal( mf, model.frame( fit3slsd[[ 5 ]]$e4 ) ) ) [1] TRUE > print( all.equal( mf2, model.frame( fit3slsd[[ 5 ]]$e4$eq[[ 2 ]] ) ) ) [1] TRUE > > fit3sls[[ 3 ]]$e1c$eq[[ 1 ]]$modelInst income farmPrice trend 1 87.4 98.0 1 2 97.6 99.1 2 3 96.7 99.1 3 4 98.2 98.1 4 5 99.8 110.8 5 6 100.5 108.2 6 7 103.2 105.6 7 8 107.8 109.8 8 9 96.6 108.7 9 10 88.9 100.6 10 11 75.1 81.0 11 12 76.9 68.6 12 13 84.6 70.9 13 14 90.6 81.4 14 15 103.1 102.3 15 16 105.1 105.0 16 17 96.4 110.5 17 18 104.4 92.5 18 19 110.7 89.3 19 20 127.1 93.0 20 > fit3sls[[ 3 ]]$e1c$eq[[ 2 ]]$modelInst income farmPrice trend 1 87.4 98.0 1 2 97.6 99.1 2 3 96.7 99.1 3 4 98.2 98.1 4 5 99.8 110.8 5 6 100.5 108.2 6 7 103.2 105.6 7 8 107.8 109.8 8 9 96.6 108.7 9 10 88.9 100.6 10 11 75.1 81.0 11 12 76.9 68.6 12 13 84.6 70.9 13 14 90.6 81.4 14 15 103.1 102.3 15 16 105.1 105.0 16 17 96.4 110.5 17 18 104.4 92.5 18 19 110.7 89.3 19 20 127.1 93.0 20 > > fit3sls[[ 1 ]]$e3$eq[[ 1 ]]$modelInst income farmPrice trend 1 87.4 98.0 1 2 97.6 99.1 2 3 96.7 99.1 3 4 98.2 98.1 4 5 99.8 110.8 5 6 100.5 108.2 6 7 103.2 105.6 7 8 107.8 109.8 8 9 96.6 108.7 9 10 88.9 100.6 10 11 75.1 81.0 11 12 76.9 68.6 12 13 84.6 70.9 13 14 90.6 81.4 14 15 103.1 102.3 15 16 105.1 105.0 16 17 96.4 110.5 17 18 104.4 92.5 18 19 110.7 89.3 19 20 127.1 93.0 20 > fit3sls[[ 1 ]]$e3$eq[[ 2 ]]$modelInst income farmPrice trend 1 87.4 98.0 1 2 97.6 99.1 2 3 96.7 99.1 3 4 98.2 98.1 4 5 99.8 110.8 5 6 100.5 108.2 6 7 103.2 105.6 7 8 107.8 109.8 8 9 96.6 108.7 9 10 88.9 100.6 10 11 75.1 81.0 11 12 76.9 68.6 12 13 84.6 70.9 13 14 90.6 81.4 14 15 103.1 102.3 15 16 105.1 105.0 16 17 96.4 110.5 17 18 104.4 92.5 18 19 110.7 89.3 19 20 127.1 93.0 20 > > fit3slsd[[ 5 ]]$e4$eq[[ 1 ]]$modelInst income farmPrice 1 87.4 98.0 2 97.6 99.1 3 96.7 99.1 4 98.2 98.1 5 99.8 110.8 6 100.5 108.2 7 103.2 105.6 8 107.8 109.8 9 96.6 108.7 10 88.9 100.6 11 75.1 81.0 12 76.9 68.6 13 84.6 70.9 14 90.6 81.4 15 103.1 102.3 16 105.1 105.0 17 96.4 110.5 18 104.4 92.5 19 110.7 89.3 20 127.1 93.0 > fit3slsd[[ 5 ]]$e4$eq[[ 2 ]]$modelInst income farmPrice trend 1 87.4 98.0 1 2 97.6 99.1 2 3 96.7 99.1 3 4 98.2 98.1 4 5 99.8 110.8 5 6 100.5 108.2 6 7 103.2 105.6 7 8 107.8 109.8 8 9 96.6 108.7 9 10 88.9 100.6 10 11 75.1 81.0 11 12 76.9 68.6 12 13 84.6 70.9 13 14 90.6 81.4 14 15 103.1 102.3 15 16 105.1 105.0 16 17 96.4 110.5 17 18 104.4 92.5 18 19 110.7 89.3 19 20 127.1 93.0 20 > > > ## **************** model matrix ************************ > # with x (returnModelMatrix) = TRUE > print( !is.null( fit3sls[[ 4 ]]$e1c$eq[[ 1 ]]$x ) ) [1] TRUE > print( mm <- model.matrix( fit3sls[[ 4 ]]$e1c ) ) demand_(Intercept) demand_price demand_income supply_(Intercept) demand_1 1 100.3 87.4 0 demand_2 1 104.3 97.6 0 demand_3 1 103.4 96.7 0 demand_4 1 104.5 98.2 0 demand_5 1 98.0 99.8 0 demand_6 1 99.5 100.5 0 demand_7 1 101.1 103.2 0 demand_8 1 104.8 107.8 0 demand_9 1 96.4 96.6 0 demand_10 1 91.2 88.9 0 demand_11 1 93.1 75.1 0 demand_12 1 98.8 76.9 0 demand_13 1 102.9 84.6 0 demand_14 1 98.8 90.6 0 demand_15 1 95.1 103.1 0 demand_16 1 98.5 105.1 0 demand_17 1 86.5 96.4 0 demand_18 1 104.0 104.4 0 demand_19 1 105.8 110.7 0 demand_20 1 113.5 127.1 0 supply_1 0 0.0 0.0 1 supply_2 0 0.0 0.0 1 supply_3 0 0.0 0.0 1 supply_4 0 0.0 0.0 1 supply_5 0 0.0 0.0 1 supply_6 0 0.0 0.0 1 supply_7 0 0.0 0.0 1 supply_8 0 0.0 0.0 1 supply_9 0 0.0 0.0 1 supply_10 0 0.0 0.0 1 supply_11 0 0.0 0.0 1 supply_12 0 0.0 0.0 1 supply_13 0 0.0 0.0 1 supply_14 0 0.0 0.0 1 supply_15 0 0.0 0.0 1 supply_16 0 0.0 0.0 1 supply_17 0 0.0 0.0 1 supply_18 0 0.0 0.0 1 supply_19 0 0.0 0.0 1 supply_20 0 0.0 0.0 1 supply_price supply_farmPrice supply_trend demand_1 0.0 0.0 0 demand_2 0.0 0.0 0 demand_3 0.0 0.0 0 demand_4 0.0 0.0 0 demand_5 0.0 0.0 0 demand_6 0.0 0.0 0 demand_7 0.0 0.0 0 demand_8 0.0 0.0 0 demand_9 0.0 0.0 0 demand_10 0.0 0.0 0 demand_11 0.0 0.0 0 demand_12 0.0 0.0 0 demand_13 0.0 0.0 0 demand_14 0.0 0.0 0 demand_15 0.0 0.0 0 demand_16 0.0 0.0 0 demand_17 0.0 0.0 0 demand_18 0.0 0.0 0 demand_19 0.0 0.0 0 demand_20 0.0 0.0 0 supply_1 100.3 98.0 1 supply_2 104.3 99.1 2 supply_3 103.4 99.1 3 supply_4 104.5 98.1 4 supply_5 98.0 110.8 5 supply_6 99.5 108.2 6 supply_7 101.1 105.6 7 supply_8 104.8 109.8 8 supply_9 96.4 108.7 9 supply_10 91.2 100.6 10 supply_11 93.1 81.0 11 supply_12 98.8 68.6 12 supply_13 102.9 70.9 13 supply_14 98.8 81.4 14 supply_15 95.1 102.3 15 supply_16 98.5 105.0 16 supply_17 86.5 110.5 17 supply_18 104.0 92.5 18 supply_19 105.8 89.3 19 supply_20 113.5 93.0 20 > print( mm1 <- model.matrix( fit3sls[[ 4 ]]$e1c$eq[[ 1 ]] ) ) (Intercept) price income 1 1 100.3 87.4 2 1 104.3 97.6 3 1 103.4 96.7 4 1 104.5 98.2 5 1 98.0 99.8 6 1 99.5 100.5 7 1 101.1 103.2 8 1 104.8 107.8 9 1 96.4 96.6 10 1 91.2 88.9 11 1 93.1 75.1 12 1 98.8 76.9 13 1 102.9 84.6 14 1 98.8 90.6 15 1 95.1 103.1 16 1 98.5 105.1 17 1 86.5 96.4 18 1 104.0 104.4 19 1 105.8 110.7 20 1 113.5 127.1 attr(,"assign") [1] 0 1 2 > print( mm2 <- model.matrix( fit3sls[[ 4 ]]$e1c$eq[[ 2 ]] ) ) (Intercept) price farmPrice trend 1 1 100.3 98.0 1 2 1 104.3 99.1 2 3 1 103.4 99.1 3 4 1 104.5 98.1 4 5 1 98.0 110.8 5 6 1 99.5 108.2 6 7 1 101.1 105.6 7 8 1 104.8 109.8 8 9 1 96.4 108.7 9 10 1 91.2 100.6 10 11 1 93.1 81.0 11 12 1 98.8 68.6 12 13 1 102.9 70.9 13 14 1 98.8 81.4 14 15 1 95.1 102.3 15 16 1 98.5 105.0 16 17 1 86.5 110.5 17 18 1 104.0 92.5 18 19 1 105.8 89.3 19 20 1 113.5 93.0 20 attr(,"assign") [1] 0 1 2 3 > > # with x (returnModelMatrix) = FALSE > print( all.equal( mm, model.matrix( fit3sls[[ 4 ]]$e1wc ) ) ) [1] TRUE > print( all.equal( mm1, model.matrix( fit3sls[[ 4 ]]$e1wc$eq[[ 1 ]] ) ) ) [1] TRUE > print( all.equal( mm2, model.matrix( fit3sls[[ 4 ]]$e1wc$eq[[ 2 ]] ) ) ) [1] TRUE > print( !is.null( fit3sls[[ 4 ]]$e1wc$eq[[ 1 ]]$x ) ) [1] FALSE > > # with x (returnModelMatrix) = TRUE > print( !is.null( fit3sls[[ 5 ]]$e2$eq[[ 1 ]]$x ) ) [1] TRUE > print( all.equal( mm, model.matrix( fit3sls[[ 5 ]]$e2 ) ) ) [1] TRUE > print( all.equal( mm1, model.matrix( fit3sls[[ 5 ]]$e2$eq[[ 1 ]] ) ) ) [1] TRUE > print( all.equal( mm2, model.matrix( fit3sls[[ 5 ]]$e2$eq[[ 2 ]] ) ) ) [1] TRUE > > # with x (returnModelMatrix) = FALSE > print( all.equal( mm, model.matrix( fit3sls[[ 5 ]]$e2e ) ) ) [1] TRUE > print( all.equal( mm1, model.matrix( fit3sls[[ 5 ]]$e2e$eq[[ 1 ]] ) ) ) [1] TRUE > print( all.equal( mm2, model.matrix( fit3sls[[ 5 ]]$e2e$eq[[ 2 ]] ) ) ) [1] TRUE > print( !is.null( fit3sls[[ 5 ]]$e1wc$e2e[[ 1 ]]$x ) ) [1] FALSE > > # with x (returnModelMatrix) = TRUE > print( !is.null( fit3sls[[ 1 ]]$e3e$eq[[ 1 ]]$x ) ) [1] TRUE > print( all.equal( mm, model.matrix( fit3sls[[ 1 ]]$e3e ) ) ) [1] TRUE > print( all.equal( mm1, model.matrix( fit3sls[[ 1 ]]$e3e$eq[[ 1 ]] ) ) ) [1] TRUE > print( all.equal( mm2, model.matrix( fit3sls[[ 1 ]]$e3e$eq[[ 2 ]] ) ) ) [1] TRUE > > # with x (returnModelMatrix) = FALSE > print( all.equal( mm, model.matrix( fit3sls[[ 1 ]]$e3 ) ) ) [1] TRUE > print( all.equal( mm1, model.matrix( fit3sls[[ 1 ]]$e3$eq[[ 1 ]] ) ) ) [1] TRUE > print( all.equal( mm2, model.matrix( fit3sls[[ 1 ]]$e3$eq[[ 2 ]] ) ) ) [1] TRUE > print( !is.null( fit3sls[[ 1 ]]$e3$eq[[ 1 ]]$x ) ) [1] FALSE > > # with x (returnModelMatrix) = TRUE > print( !is.null( fit3slsi[[ 2 ]]$e4$eq[[ 1 ]]$x ) ) [1] TRUE > print( all.equal( mm, model.matrix( fit3slsi[[ 2 ]]$e4 ) ) ) [1] TRUE > print( all.equal( mm1, model.matrix( fit3slsi[[ 2 ]]$e4$eq[[ 1 ]] ) ) ) [1] TRUE > print( all.equal( mm2, model.matrix( fit3slsi[[ 2 ]]$e4$eq[[ 2 ]] ) ) ) [1] TRUE > > # with x (returnModelMatrix) = FALSE > print( all.equal( mm, model.matrix( fit3slsi[[ 2 ]]$e4we ) ) ) [1] TRUE > print( all.equal( mm1, model.matrix( fit3slsi[[ 2 ]]$e4we$eq[[ 1 ]] ) ) ) [1] TRUE > print( all.equal( mm2, model.matrix( fit3slsi[[ 2 ]]$e4we$eq[[ 2 ]] ) ) ) [1] TRUE > print( !is.null( fit3slsi[[ 2 ]]$e1wc$e4we[[ 1 ]]$x ) ) [1] FALSE > > # with x (returnModelMatrix) = TRUE > print( !is.null( fit3slsi[[ 5 ]]$e5w$eq[[ 1 ]]$x ) ) [1] TRUE > print( all.equal( mm, model.matrix( fit3slsi[[ 5 ]]$e5w ) ) ) [1] TRUE > print( all.equal( mm1, model.matrix( fit3slsi[[ 5 ]]$e5w$eq[[ 1 ]] ) ) ) [1] TRUE > print( all.equal( mm2, model.matrix( fit3slsi[[ 5 ]]$e5w$eq[[ 2 ]] ) ) ) [1] TRUE > > # with x (returnModelMatrix) = FALSE > print( all.equal( mm, model.matrix( fit3slsi[[ 5 ]]$e5 ) ) ) [1] TRUE > print( all.equal( mm1, model.matrix( fit3slsi[[ 5 ]]$e5$eq[[ 1 ]] ) ) ) [1] TRUE > print( all.equal( mm2, model.matrix( fit3slsi[[ 5 ]]$e5$eq[[ 2 ]] ) ) ) [1] TRUE > print( !is.null( fit3slsi[[ 5 ]]$e5$eq[[ 1 ]]$x ) ) [1] FALSE > > # with x (returnModelMatrix) = TRUE > print( !is.null( fit3slsd[[ 3 ]]$e5e$eq[[ 1 ]]$x ) ) [1] TRUE > print( all.equal( mm, model.matrix( fit3slsd[[ 3 ]]$e5e ) ) ) [1] TRUE > print( all.equal( mm1, model.matrix( fit3slsd[[ 3 ]]$e5e$eq[[ 1 ]] ) ) ) [1] TRUE > print( all.equal( mm2, model.matrix( fit3slsd[[ 3 ]]$e5e$eq[[ 2 ]] ) ) ) [1] TRUE > > # with x (returnModelMatrix) = FALSE > print( all.equal( mm, model.matrix( fit3slsd[[ 3 ]]$e5we ) ) ) [1] TRUE > print( all.equal( mm1, model.matrix( fit3slsd[[ 3 ]]$e5we$eq[[ 1 ]] ) ) ) [1] TRUE > print( all.equal( mm2, model.matrix( fit3slsd[[ 3 ]]$e5we$eq[[ 2 ]] ) ) ) [1] TRUE > print( !is.null( fit3sls[[ 3 ]]$e5we$eq[[ 1 ]]$x ) ) [1] FALSE > > # with x (returnModelMatrix) = TRUE > print( !is.null( fit3slsd[[ 2 ]]$e3w$eq[[ 1 ]]$x ) ) [1] TRUE > print( all.equal( mm, model.matrix( fit3slsd[[ 2 ]]$e3w ) ) ) [1] TRUE > print( all.equal( mm1, model.matrix( fit3slsd[[ 2 ]]$e3w$eq[[ 1 ]] ) ) ) [1] TRUE > print( all.equal( mm2, model.matrix( fit3slsd[[ 2 ]]$e3w$eq[[ 2 ]] ) ) ) [1] TRUE > > # with x (returnModelMatrix) = FALSE > print( all.equal( mm, model.matrix( fit3slsd[[ 2 ]]$e3 ) ) ) [1] TRUE > print( all.equal( mm1, model.matrix( fit3slsd[[ 2 ]]$e3$eq[[ 1 ]] ) ) ) [1] TRUE > print( all.equal( mm2, model.matrix( fit3slsd[[ 2 ]]$e3$eq[[ 2 ]] ) ) ) [1] TRUE > print( !is.null( fit3slsd[[ 2 ]]$e3$eq[[ 1 ]]$x ) ) [1] FALSE > > # matrices of instrumental variables > model.matrix( fit3sls[[ 1 ]]$e1c, which = "z" ) demand_(Intercept) demand_income demand_farmPrice demand_trend demand_1 1 87.4 98.0 1 demand_2 1 97.6 99.1 2 demand_3 1 96.7 99.1 3 demand_4 1 98.2 98.1 4 demand_5 1 99.8 110.8 5 demand_6 1 100.5 108.2 6 demand_7 1 103.2 105.6 7 demand_8 1 107.8 109.8 8 demand_9 1 96.6 108.7 9 demand_10 1 88.9 100.6 10 demand_11 1 75.1 81.0 11 demand_12 1 76.9 68.6 12 demand_13 1 84.6 70.9 13 demand_14 1 90.6 81.4 14 demand_15 1 103.1 102.3 15 demand_16 1 105.1 105.0 16 demand_17 1 96.4 110.5 17 demand_18 1 104.4 92.5 18 demand_19 1 110.7 89.3 19 demand_20 1 127.1 93.0 20 supply_1 0 0.0 0.0 0 supply_2 0 0.0 0.0 0 supply_3 0 0.0 0.0 0 supply_4 0 0.0 0.0 0 supply_5 0 0.0 0.0 0 supply_6 0 0.0 0.0 0 supply_7 0 0.0 0.0 0 supply_8 0 0.0 0.0 0 supply_9 0 0.0 0.0 0 supply_10 0 0.0 0.0 0 supply_11 0 0.0 0.0 0 supply_12 0 0.0 0.0 0 supply_13 0 0.0 0.0 0 supply_14 0 0.0 0.0 0 supply_15 0 0.0 0.0 0 supply_16 0 0.0 0.0 0 supply_17 0 0.0 0.0 0 supply_18 0 0.0 0.0 0 supply_19 0 0.0 0.0 0 supply_20 0 0.0 0.0 0 supply_(Intercept) supply_income supply_farmPrice supply_trend demand_1 0 0.0 0.0 0 demand_2 0 0.0 0.0 0 demand_3 0 0.0 0.0 0 demand_4 0 0.0 0.0 0 demand_5 0 0.0 0.0 0 demand_6 0 0.0 0.0 0 demand_7 0 0.0 0.0 0 demand_8 0 0.0 0.0 0 demand_9 0 0.0 0.0 0 demand_10 0 0.0 0.0 0 demand_11 0 0.0 0.0 0 demand_12 0 0.0 0.0 0 demand_13 0 0.0 0.0 0 demand_14 0 0.0 0.0 0 demand_15 0 0.0 0.0 0 demand_16 0 0.0 0.0 0 demand_17 0 0.0 0.0 0 demand_18 0 0.0 0.0 0 demand_19 0 0.0 0.0 0 demand_20 0 0.0 0.0 0 supply_1 1 87.4 98.0 1 supply_2 1 97.6 99.1 2 supply_3 1 96.7 99.1 3 supply_4 1 98.2 98.1 4 supply_5 1 99.8 110.8 5 supply_6 1 100.5 108.2 6 supply_7 1 103.2 105.6 7 supply_8 1 107.8 109.8 8 supply_9 1 96.6 108.7 9 supply_10 1 88.9 100.6 10 supply_11 1 75.1 81.0 11 supply_12 1 76.9 68.6 12 supply_13 1 84.6 70.9 13 supply_14 1 90.6 81.4 14 supply_15 1 103.1 102.3 15 supply_16 1 105.1 105.0 16 supply_17 1 96.4 110.5 17 supply_18 1 104.4 92.5 18 supply_19 1 110.7 89.3 19 supply_20 1 127.1 93.0 20 > model.matrix( fit3sls[[ 3 ]]$e1c$eq[[ 1 ]], which = "z" ) (Intercept) income farmPrice trend 1 1 87.4 98.0 1 2 1 97.6 99.1 2 3 1 96.7 99.1 3 4 1 98.2 98.1 4 5 1 99.8 110.8 5 6 1 100.5 108.2 6 7 1 103.2 105.6 7 8 1 107.8 109.8 8 9 1 96.6 108.7 9 10 1 88.9 100.6 10 11 1 75.1 81.0 11 12 1 76.9 68.6 12 13 1 84.6 70.9 13 14 1 90.6 81.4 14 15 1 103.1 102.3 15 16 1 105.1 105.0 16 17 1 96.4 110.5 17 18 1 104.4 92.5 18 19 1 110.7 89.3 19 20 1 127.1 93.0 20 attr(,"assign") [1] 0 1 2 3 > model.matrix( fit3sls[[ 4 ]]$e1c$eq[[ 2 ]], which = "z" ) (Intercept) income farmPrice trend 1 1 87.4 98.0 1 2 1 97.6 99.1 2 3 1 96.7 99.1 3 4 1 98.2 98.1 4 5 1 99.8 110.8 5 6 1 100.5 108.2 6 7 1 103.2 105.6 7 8 1 107.8 109.8 8 9 1 96.6 108.7 9 10 1 88.9 100.6 10 11 1 75.1 81.0 11 12 1 76.9 68.6 12 13 1 84.6 70.9 13 14 1 90.6 81.4 14 15 1 103.1 102.3 15 16 1 105.1 105.0 16 17 1 96.4 110.5 17 18 1 104.4 92.5 18 19 1 110.7 89.3 19 20 1 127.1 93.0 20 attr(,"assign") [1] 0 1 2 3 > > # matrices of fitted regressors > model.matrix( fit3slsd[[ 1 ]]$e3w, which = "xHat" ) demand_(Intercept) demand_price demand_income supply_(Intercept) demand_1 1 95.2 87.4 0 demand_2 1 99.3 97.6 0 demand_3 1 99.0 96.7 0 demand_4 1 99.9 98.2 0 demand_5 1 97.0 99.8 0 demand_6 1 98.0 100.5 0 demand_7 1 99.9 103.2 0 demand_8 1 100.7 107.8 0 demand_9 1 96.2 96.6 0 demand_10 1 95.1 88.9 0 demand_11 1 94.7 75.1 0 demand_12 1 99.0 76.9 0 demand_13 1 101.7 84.6 0 demand_14 1 101.3 90.6 0 demand_15 1 100.8 103.1 0 demand_16 1 100.9 105.1 0 demand_17 1 95.6 96.4 0 demand_18 1 104.2 104.4 0 demand_19 1 107.8 110.7 0 demand_20 1 113.9 127.1 0 supply_1 0 0.0 0.0 1 supply_2 0 0.0 0.0 1 supply_3 0 0.0 0.0 1 supply_4 0 0.0 0.0 1 supply_5 0 0.0 0.0 1 supply_6 0 0.0 0.0 1 supply_7 0 0.0 0.0 1 supply_8 0 0.0 0.0 1 supply_9 0 0.0 0.0 1 supply_10 0 0.0 0.0 1 supply_11 0 0.0 0.0 1 supply_12 0 0.0 0.0 1 supply_13 0 0.0 0.0 1 supply_14 0 0.0 0.0 1 supply_15 0 0.0 0.0 1 supply_16 0 0.0 0.0 1 supply_17 0 0.0 0.0 1 supply_18 0 0.0 0.0 1 supply_19 0 0.0 0.0 1 supply_20 0 0.0 0.0 1 supply_price supply_farmPrice supply_trend demand_1 0.0 0.0 0 demand_2 0.0 0.0 0 demand_3 0.0 0.0 0 demand_4 0.0 0.0 0 demand_5 0.0 0.0 0 demand_6 0.0 0.0 0 demand_7 0.0 0.0 0 demand_8 0.0 0.0 0 demand_9 0.0 0.0 0 demand_10 0.0 0.0 0 demand_11 0.0 0.0 0 demand_12 0.0 0.0 0 demand_13 0.0 0.0 0 demand_14 0.0 0.0 0 demand_15 0.0 0.0 0 demand_16 0.0 0.0 0 demand_17 0.0 0.0 0 demand_18 0.0 0.0 0 demand_19 0.0 0.0 0 demand_20 0.0 0.0 0 supply_1 99.6 98.0 1 supply_2 105.1 99.1 2 supply_3 103.8 99.1 3 supply_4 104.5 98.1 4 supply_5 98.7 110.8 5 supply_6 99.6 108.2 6 supply_7 102.0 105.6 7 supply_8 102.2 109.8 8 supply_9 94.6 108.7 9 supply_10 92.7 100.6 10 supply_11 92.4 81.0 11 supply_12 98.9 68.6 12 supply_13 102.2 70.9 13 supply_14 100.3 81.4 14 supply_15 97.6 102.3 15 supply_16 96.9 105.0 16 supply_17 87.7 110.5 17 supply_18 101.1 92.5 18 supply_19 106.1 89.3 19 supply_20 114.4 93.0 20 > model.matrix( fit3slsd[[ 3 ]]$e3w$eq[[ 1 ]], which = "xHat" ) (Intercept) price income 1 1 95.2 87.4 2 1 99.3 97.6 3 1 99.0 96.7 4 1 99.9 98.2 5 1 97.0 99.8 6 1 98.0 100.5 7 1 99.9 103.2 8 1 100.7 107.8 9 1 96.2 96.6 10 1 95.1 88.9 11 1 94.7 75.1 12 1 99.0 76.9 13 1 101.7 84.6 14 1 101.3 90.6 15 1 100.8 103.1 16 1 100.9 105.1 17 1 95.6 96.4 18 1 104.2 104.4 19 1 107.8 110.7 20 1 113.9 127.1 > model.matrix( fit3slsd[[ 4 ]]$e3w$eq[[ 2 ]], which = "xHat" ) (Intercept) price farmPrice trend 1 1 99.6 98.0 1 2 1 105.1 99.1 2 3 1 103.8 99.1 3 4 1 104.5 98.1 4 5 1 98.7 110.8 5 6 1 99.6 108.2 6 7 1 102.0 105.6 7 8 1 102.2 109.8 8 9 1 94.6 108.7 9 10 1 92.7 100.6 10 11 1 92.4 81.0 11 12 1 98.9 68.6 12 13 1 102.2 70.9 13 14 1 100.3 81.4 14 15 1 97.6 102.3 15 16 1 96.9 105.0 16 17 1 87.7 110.5 17 18 1 101.1 92.5 18 19 1 106.1 89.3 19 20 1 114.4 93.0 20 > > > ## **************** formulas ************************ > formula( fit3sls[[ 2 ]]$e1c ) $demand consump ~ price + income $supply consump ~ price + farmPrice + trend > formula( fit3sls[[ 2 ]]$e1c$eq[[ 1 ]] ) consump ~ price + income > > formula( fit3sls[[ 3 ]]$e2e ) $demand consump ~ price + income $supply consump ~ price + farmPrice + trend > formula( fit3sls[[ 3 ]]$e2e$eq[[ 2 ]] ) consump ~ price + farmPrice + trend > > formula( fit3sls[[ 4 ]]$e3 ) $demand consump ~ price + income $supply consump ~ price + farmPrice + trend > formula( fit3sls[[ 4 ]]$e3$eq[[ 1 ]] ) consump ~ price + income > > formula( fit3sls[[ 5 ]]$e4e ) $demand consump ~ price + income $supply consump ~ price + farmPrice + trend > formula( fit3sls[[ 5 ]]$e4e$eq[[ 2 ]] ) consump ~ price + farmPrice + trend > > formula( fit3sls[[ 1 ]]$e5 ) $demand consump ~ price + income $supply consump ~ price + farmPrice + trend > formula( fit3sls[[ 1 ]]$e5$eq[[ 1 ]] ) consump ~ price + income > > formula( fit3slsi[[ 3 ]]$e3e ) $demand consump ~ price + income $supply consump ~ price + farmPrice + trend > formula( fit3slsi[[ 3 ]]$e3e$eq[[ 1 ]] ) consump ~ price + income > > formula( fit3slsd[[ 4 ]]$e4 ) $demand consump ~ price + income $supply consump ~ price + farmPrice + trend > formula( fit3slsd[[ 4 ]]$e4$eq[[ 2 ]] ) consump ~ price + farmPrice + trend > > formula( fit3slsd[[ 2 ]]$e1w ) $demand consump ~ price + income $supply consump ~ price + farmPrice + trend > formula( fit3slsd[[ 2 ]]$e1w$eq[[ 1 ]] ) consump ~ price + income > > > ## **************** model terms ******************* > terms( fit3sls[[ 2 ]]$e1c ) $demand consump ~ price + income attr(,"variables") list(consump, price, income) attr(,"factors") price income consump 0 0 price 1 0 income 0 1 attr(,"term.labels") [1] "price" "income" attr(,"order") [1] 1 1 attr(,"intercept") [1] 1 attr(,"response") [1] 1 attr(,".Environment") attr(,"predvars") list(consump, price, income) attr(,"dataClasses") consump price income "numeric" "numeric" "numeric" $supply consump ~ price + farmPrice + trend attr(,"variables") list(consump, price, farmPrice, trend) attr(,"factors") price farmPrice trend consump 0 0 0 price 1 0 0 farmPrice 0 1 0 trend 0 0 1 attr(,"term.labels") [1] "price" "farmPrice" "trend" attr(,"order") [1] 1 1 1 attr(,"intercept") [1] 1 attr(,"response") [1] 1 attr(,".Environment") attr(,"predvars") list(consump, price, farmPrice, trend) attr(,"dataClasses") consump price farmPrice trend "numeric" "numeric" "numeric" "numeric" > terms( fit3sls[[ 2 ]]$e1c$eq[[ 1 ]] ) consump ~ price + income attr(,"variables") list(consump, price, income) attr(,"factors") price income consump 0 0 price 1 0 income 0 1 attr(,"term.labels") [1] "price" "income" attr(,"order") [1] 1 1 attr(,"intercept") [1] 1 attr(,"response") [1] 1 attr(,".Environment") attr(,"predvars") list(consump, price, income) attr(,"dataClasses") consump price income "numeric" "numeric" "numeric" > > terms( fit3sls[[ 3 ]]$e2e ) $demand consump ~ price + income attr(,"variables") list(consump, price, income) attr(,"factors") price income consump 0 0 price 1 0 income 0 1 attr(,"term.labels") [1] "price" "income" attr(,"order") [1] 1 1 attr(,"intercept") [1] 1 attr(,"response") [1] 1 attr(,".Environment") attr(,"predvars") list(consump, price, income) attr(,"dataClasses") consump price income "numeric" "numeric" "numeric" $supply consump ~ price + farmPrice + trend attr(,"variables") list(consump, price, farmPrice, trend) attr(,"factors") price farmPrice trend consump 0 0 0 price 1 0 0 farmPrice 0 1 0 trend 0 0 1 attr(,"term.labels") [1] "price" "farmPrice" "trend" attr(,"order") [1] 1 1 1 attr(,"intercept") [1] 1 attr(,"response") [1] 1 attr(,".Environment") attr(,"predvars") list(consump, price, farmPrice, trend) attr(,"dataClasses") consump price farmPrice trend "numeric" "numeric" "numeric" "numeric" > terms( fit3sls[[ 3 ]]$e2e$eq[[ 2 ]] ) consump ~ price + farmPrice + trend attr(,"variables") list(consump, price, farmPrice, trend) attr(,"factors") price farmPrice trend consump 0 0 0 price 1 0 0 farmPrice 0 1 0 trend 0 0 1 attr(,"term.labels") [1] "price" "farmPrice" "trend" attr(,"order") [1] 1 1 1 attr(,"intercept") [1] 1 attr(,"response") [1] 1 attr(,".Environment") attr(,"predvars") list(consump, price, farmPrice, trend) attr(,"dataClasses") consump price farmPrice trend "numeric" "numeric" "numeric" "numeric" > > terms( fit3sls[[ 4 ]]$e3 ) $demand consump ~ price + income attr(,"variables") list(consump, price, income) attr(,"factors") price income consump 0 0 price 1 0 income 0 1 attr(,"term.labels") [1] "price" "income" attr(,"order") [1] 1 1 attr(,"intercept") [1] 1 attr(,"response") [1] 1 attr(,".Environment") attr(,"predvars") list(consump, price, income) attr(,"dataClasses") consump price income "numeric" "numeric" "numeric" $supply consump ~ price + farmPrice + trend attr(,"variables") list(consump, price, farmPrice, trend) attr(,"factors") price farmPrice trend consump 0 0 0 price 1 0 0 farmPrice 0 1 0 trend 0 0 1 attr(,"term.labels") [1] "price" "farmPrice" "trend" attr(,"order") [1] 1 1 1 attr(,"intercept") [1] 1 attr(,"response") [1] 1 attr(,".Environment") attr(,"predvars") list(consump, price, farmPrice, trend) attr(,"dataClasses") consump price farmPrice trend "numeric" "numeric" "numeric" "numeric" > terms( fit3sls[[ 4 ]]$e3$eq[[ 1 ]] ) consump ~ price + income attr(,"variables") list(consump, price, income) attr(,"factors") price income consump 0 0 price 1 0 income 0 1 attr(,"term.labels") [1] "price" "income" attr(,"order") [1] 1 1 attr(,"intercept") [1] 1 attr(,"response") [1] 1 attr(,".Environment") attr(,"predvars") list(consump, price, income) attr(,"dataClasses") consump price income "numeric" "numeric" "numeric" > > terms( fit3sls[[ 5 ]]$e4e ) $demand consump ~ price + income attr(,"variables") list(consump, price, income) attr(,"factors") price income consump 0 0 price 1 0 income 0 1 attr(,"term.labels") [1] "price" "income" attr(,"order") [1] 1 1 attr(,"intercept") [1] 1 attr(,"response") [1] 1 attr(,".Environment") attr(,"predvars") list(consump, price, income) attr(,"dataClasses") consump price income "numeric" "numeric" "numeric" $supply consump ~ price + farmPrice + trend attr(,"variables") list(consump, price, farmPrice, trend) attr(,"factors") price farmPrice trend consump 0 0 0 price 1 0 0 farmPrice 0 1 0 trend 0 0 1 attr(,"term.labels") [1] "price" "farmPrice" "trend" attr(,"order") [1] 1 1 1 attr(,"intercept") [1] 1 attr(,"response") [1] 1 attr(,".Environment") attr(,"predvars") list(consump, price, farmPrice, trend) attr(,"dataClasses") consump price farmPrice trend "numeric" "numeric" "numeric" "numeric" > terms( fit3sls[[ 5 ]]$e4e$eq[[ 2 ]] ) consump ~ price + farmPrice + trend attr(,"variables") list(consump, price, farmPrice, trend) attr(,"factors") price farmPrice trend consump 0 0 0 price 1 0 0 farmPrice 0 1 0 trend 0 0 1 attr(,"term.labels") [1] "price" "farmPrice" "trend" attr(,"order") [1] 1 1 1 attr(,"intercept") [1] 1 attr(,"response") [1] 1 attr(,".Environment") attr(,"predvars") list(consump, price, farmPrice, trend) attr(,"dataClasses") consump price farmPrice trend "numeric" "numeric" "numeric" "numeric" > > terms( fit3sls[[ 1 ]]$e5 ) $demand consump ~ price + income attr(,"variables") list(consump, price, income) attr(,"factors") price income consump 0 0 price 1 0 income 0 1 attr(,"term.labels") [1] "price" "income" attr(,"order") [1] 1 1 attr(,"intercept") [1] 1 attr(,"response") [1] 1 attr(,".Environment") attr(,"predvars") list(consump, price, income) attr(,"dataClasses") consump price income "numeric" "numeric" "numeric" $supply consump ~ price + farmPrice + trend attr(,"variables") list(consump, price, farmPrice, trend) attr(,"factors") price farmPrice trend consump 0 0 0 price 1 0 0 farmPrice 0 1 0 trend 0 0 1 attr(,"term.labels") [1] "price" "farmPrice" "trend" attr(,"order") [1] 1 1 1 attr(,"intercept") [1] 1 attr(,"response") [1] 1 attr(,".Environment") attr(,"predvars") list(consump, price, farmPrice, trend) attr(,"dataClasses") consump price farmPrice trend "numeric" "numeric" "numeric" "numeric" > terms( fit3sls[[ 1 ]]$e5$eq[[ 1 ]] ) consump ~ price + income attr(,"variables") list(consump, price, income) attr(,"factors") price income consump 0 0 price 1 0 income 0 1 attr(,"term.labels") [1] "price" "income" attr(,"order") [1] 1 1 attr(,"intercept") [1] 1 attr(,"response") [1] 1 attr(,".Environment") attr(,"predvars") list(consump, price, income) attr(,"dataClasses") consump price income "numeric" "numeric" "numeric" > > terms( fit3sls[[ 2 ]]$e4wSym ) $demand consump ~ price + income attr(,"variables") list(consump, price, income) attr(,"factors") price income consump 0 0 price 1 0 income 0 1 attr(,"term.labels") [1] "price" "income" attr(,"order") [1] 1 1 attr(,"intercept") [1] 1 attr(,"response") [1] 1 attr(,".Environment") attr(,"predvars") list(consump, price, income) attr(,"dataClasses") consump price income "numeric" "numeric" "numeric" $supply consump ~ price + farmPrice + trend attr(,"variables") list(consump, price, farmPrice, trend) attr(,"factors") price farmPrice trend consump 0 0 0 price 1 0 0 farmPrice 0 1 0 trend 0 0 1 attr(,"term.labels") [1] "price" "farmPrice" "trend" attr(,"order") [1] 1 1 1 attr(,"intercept") [1] 1 attr(,"response") [1] 1 attr(,".Environment") attr(,"predvars") list(consump, price, farmPrice, trend) attr(,"dataClasses") consump price farmPrice trend "numeric" "numeric" "numeric" "numeric" > terms( fit3sls[[ 2 ]]$e4wSym$eq[[ 1 ]] ) consump ~ price + income attr(,"variables") list(consump, price, income) attr(,"factors") price income consump 0 0 price 1 0 income 0 1 attr(,"term.labels") [1] "price" "income" attr(,"order") [1] 1 1 attr(,"intercept") [1] 1 attr(,"response") [1] 1 attr(,".Environment") attr(,"predvars") list(consump, price, income) attr(,"dataClasses") consump price income "numeric" "numeric" "numeric" > > terms( fit3slsi[[ 3 ]]$e3e ) $demand consump ~ price + income attr(,"variables") list(consump, price, income) attr(,"factors") price income consump 0 0 price 1 0 income 0 1 attr(,"term.labels") [1] "price" "income" attr(,"order") [1] 1 1 attr(,"intercept") [1] 1 attr(,"response") [1] 1 attr(,".Environment") attr(,"predvars") list(consump, price, income) attr(,"dataClasses") consump price income "numeric" "numeric" "numeric" $supply consump ~ price + farmPrice + trend attr(,"variables") list(consump, price, farmPrice, trend) attr(,"factors") price farmPrice trend consump 0 0 0 price 1 0 0 farmPrice 0 1 0 trend 0 0 1 attr(,"term.labels") [1] "price" "farmPrice" "trend" attr(,"order") [1] 1 1 1 attr(,"intercept") [1] 1 attr(,"response") [1] 1 attr(,".Environment") attr(,"predvars") list(consump, price, farmPrice, trend) attr(,"dataClasses") consump price farmPrice trend "numeric" "numeric" "numeric" "numeric" > terms( fit3slsi[[ 3 ]]$e3e$eq[[ 1 ]] ) consump ~ price + income attr(,"variables") list(consump, price, income) attr(,"factors") price income consump 0 0 price 1 0 income 0 1 attr(,"term.labels") [1] "price" "income" attr(,"order") [1] 1 1 attr(,"intercept") [1] 1 attr(,"response") [1] 1 attr(,".Environment") attr(,"predvars") list(consump, price, income) attr(,"dataClasses") consump price income "numeric" "numeric" "numeric" > > terms( fit3slsd[[ 4 ]]$e4 ) $demand consump ~ price + income attr(,"variables") list(consump, price, income) attr(,"factors") price income consump 0 0 price 1 0 income 0 1 attr(,"term.labels") [1] "price" "income" attr(,"order") [1] 1 1 attr(,"intercept") [1] 1 attr(,"response") [1] 1 attr(,".Environment") attr(,"predvars") list(consump, price, income) attr(,"dataClasses") consump price income "numeric" "numeric" "numeric" $supply consump ~ price + farmPrice + trend attr(,"variables") list(consump, price, farmPrice, trend) attr(,"factors") price farmPrice trend consump 0 0 0 price 1 0 0 farmPrice 0 1 0 trend 0 0 1 attr(,"term.labels") [1] "price" "farmPrice" "trend" attr(,"order") [1] 1 1 1 attr(,"intercept") [1] 1 attr(,"response") [1] 1 attr(,".Environment") attr(,"predvars") list(consump, price, farmPrice, trend) attr(,"dataClasses") consump price farmPrice trend "numeric" "numeric" "numeric" "numeric" > terms( fit3slsd[[ 4 ]]$e4$eq[[ 2 ]] ) consump ~ price + farmPrice + trend attr(,"variables") list(consump, price, farmPrice, trend) attr(,"factors") price farmPrice trend consump 0 0 0 price 1 0 0 farmPrice 0 1 0 trend 0 0 1 attr(,"term.labels") [1] "price" "farmPrice" "trend" attr(,"order") [1] 1 1 1 attr(,"intercept") [1] 1 attr(,"response") [1] 1 attr(,".Environment") attr(,"predvars") list(consump, price, farmPrice, trend) attr(,"dataClasses") consump price farmPrice trend "numeric" "numeric" "numeric" "numeric" > > terms( fit3slsd[[ 5 ]]$e5we ) $demand consump ~ price + income attr(,"variables") list(consump, price, income) attr(,"factors") price income consump 0 0 price 1 0 income 0 1 attr(,"term.labels") [1] "price" "income" attr(,"order") [1] 1 1 attr(,"intercept") [1] 1 attr(,"response") [1] 1 attr(,".Environment") attr(,"predvars") list(consump, price, income) attr(,"dataClasses") consump price income "numeric" "numeric" "numeric" $supply consump ~ price + farmPrice + trend attr(,"variables") list(consump, price, farmPrice, trend) attr(,"factors") price farmPrice trend consump 0 0 0 price 1 0 0 farmPrice 0 1 0 trend 0 0 1 attr(,"term.labels") [1] "price" "farmPrice" "trend" attr(,"order") [1] 1 1 1 attr(,"intercept") [1] 1 attr(,"response") [1] 1 attr(,".Environment") attr(,"predvars") list(consump, price, farmPrice, trend) attr(,"dataClasses") consump price farmPrice trend "numeric" "numeric" "numeric" "numeric" > terms( fit3slsd[[ 5 ]]$e5we$eq[[ 2 ]] ) consump ~ price + farmPrice + trend attr(,"variables") list(consump, price, farmPrice, trend) attr(,"factors") price farmPrice trend consump 0 0 0 price 1 0 0 farmPrice 0 1 0 trend 0 0 1 attr(,"term.labels") [1] "price" "farmPrice" "trend" attr(,"order") [1] 1 1 1 attr(,"intercept") [1] 1 attr(,"response") [1] 1 attr(,".Environment") attr(,"predvars") list(consump, price, farmPrice, trend) attr(,"dataClasses") consump price farmPrice trend "numeric" "numeric" "numeric" "numeric" > > > ## **************** terms of instruments ******************* > fit3sls[[ 2 ]]$e1c$eq[[ 1 ]]$termsInst ~income + farmPrice + trend attr(,"variables") list(income, farmPrice, trend) attr(,"factors") income farmPrice trend income 1 0 0 farmPrice 0 1 0 trend 0 0 1 attr(,"term.labels") [1] "income" "farmPrice" "trend" attr(,"order") [1] 1 1 1 attr(,"intercept") [1] 1 attr(,"response") [1] 0 attr(,".Environment") attr(,"predvars") list(income, farmPrice, trend) attr(,"dataClasses") income farmPrice trend "numeric" "numeric" "numeric" > > fit3sls[[ 3 ]]$e2e$eq[[ 2 ]]$termsInst ~income + farmPrice + trend attr(,"variables") list(income, farmPrice, trend) attr(,"factors") income farmPrice trend income 1 0 0 farmPrice 0 1 0 trend 0 0 1 attr(,"term.labels") [1] "income" "farmPrice" "trend" attr(,"order") [1] 1 1 1 attr(,"intercept") [1] 1 attr(,"response") [1] 0 attr(,".Environment") attr(,"predvars") list(income, farmPrice, trend) attr(,"dataClasses") income farmPrice trend "numeric" "numeric" "numeric" > > fit3sls[[ 4 ]]$e3$eq[[ 1 ]]$termsInst ~income + farmPrice + trend attr(,"variables") list(income, farmPrice, trend) attr(,"factors") income farmPrice trend income 1 0 0 farmPrice 0 1 0 trend 0 0 1 attr(,"term.labels") [1] "income" "farmPrice" "trend" attr(,"order") [1] 1 1 1 attr(,"intercept") [1] 1 attr(,"response") [1] 0 attr(,".Environment") attr(,"predvars") list(income, farmPrice, trend) attr(,"dataClasses") income farmPrice trend "numeric" "numeric" "numeric" > > fit3sls[[ 5 ]]$e4e$eq[[ 2 ]]$termsInst ~income + farmPrice + trend attr(,"variables") list(income, farmPrice, trend) attr(,"factors") income farmPrice trend income 1 0 0 farmPrice 0 1 0 trend 0 0 1 attr(,"term.labels") [1] "income" "farmPrice" "trend" attr(,"order") [1] 1 1 1 attr(,"intercept") [1] 1 attr(,"response") [1] 0 attr(,".Environment") attr(,"predvars") list(income, farmPrice, trend) attr(,"dataClasses") income farmPrice trend "numeric" "numeric" "numeric" > > fit3sls[[ 1 ]]$e5$eq[[ 1 ]]$termsInst ~income + farmPrice + trend attr(,"variables") list(income, farmPrice, trend) attr(,"factors") income farmPrice trend income 1 0 0 farmPrice 0 1 0 trend 0 0 1 attr(,"term.labels") [1] "income" "farmPrice" "trend" attr(,"order") [1] 1 1 1 attr(,"intercept") [1] 1 attr(,"response") [1] 0 attr(,".Environment") attr(,"predvars") list(income, farmPrice, trend) attr(,"dataClasses") income farmPrice trend "numeric" "numeric" "numeric" > > fit3sls[[ 2 ]]$e4wSym$eq[[ 1 ]]$termsInst ~income + farmPrice + trend attr(,"variables") list(income, farmPrice, trend) attr(,"factors") income farmPrice trend income 1 0 0 farmPrice 0 1 0 trend 0 0 1 attr(,"term.labels") [1] "income" "farmPrice" "trend" attr(,"order") [1] 1 1 1 attr(,"intercept") [1] 1 attr(,"response") [1] 0 attr(,".Environment") attr(,"predvars") list(income, farmPrice, trend) attr(,"dataClasses") income farmPrice trend "numeric" "numeric" "numeric" > > fit3slsi[[ 3 ]]$e3e$eq[[ 1 ]]$termsInst ~income + farmPrice + trend attr(,"variables") list(income, farmPrice, trend) attr(,"factors") income farmPrice trend income 1 0 0 farmPrice 0 1 0 trend 0 0 1 attr(,"term.labels") [1] "income" "farmPrice" "trend" attr(,"order") [1] 1 1 1 attr(,"intercept") [1] 1 attr(,"response") [1] 0 attr(,".Environment") attr(,"predvars") list(income, farmPrice, trend) attr(,"dataClasses") income farmPrice trend "numeric" "numeric" "numeric" > > fit3slsd[[ 4 ]]$e4$eq[[ 2 ]]$termsInst ~income + farmPrice + trend attr(,"variables") list(income, farmPrice, trend) attr(,"factors") income farmPrice trend income 1 0 0 farmPrice 0 1 0 trend 0 0 1 attr(,"term.labels") [1] "income" "farmPrice" "trend" attr(,"order") [1] 1 1 1 attr(,"intercept") [1] 1 attr(,"response") [1] 0 attr(,".Environment") attr(,"predvars") list(income, farmPrice, trend) attr(,"dataClasses") income farmPrice trend "numeric" "numeric" "numeric" > > fit3slsd[[ 5 ]]$e5we$eq[[ 2 ]]$termsInst ~income + farmPrice + trend attr(,"variables") list(income, farmPrice, trend) attr(,"factors") income farmPrice trend income 1 0 0 farmPrice 0 1 0 trend 0 0 1 attr(,"term.labels") [1] "income" "farmPrice" "trend" attr(,"order") [1] 1 1 1 attr(,"intercept") [1] 1 attr(,"response") [1] 0 attr(,".Environment") attr(,"predvars") list(income, farmPrice, trend) attr(,"dataClasses") income farmPrice trend "numeric" "numeric" "numeric" > > > ## **************** estfun ************************ > library( "sandwich" ) > > estfun( fit3sls[[ 1 ]]$e1 ) demand_(Intercept) demand_price demand_income supply_(Intercept) demand_1 0.93243 92.895 81.494 -0.67273 demand_2 -0.67769 -71.238 -66.143 0.48894 demand_3 3.38220 351.019 327.058 -2.44019 demand_4 2.06995 216.373 203.269 -1.49343 demand_5 3.17940 313.652 317.304 -2.29388 demand_6 1.83161 182.517 184.077 -1.32147 demand_7 2.47947 252.837 255.881 -1.78889 demand_8 -5.09517 -520.901 -549.259 3.67607 demand_9 -2.17668 -205.928 -210.267 1.57043 demand_10 3.95122 366.354 351.263 -2.85073 demand_11 -0.37870 -34.993 -28.440 0.27322 demand_12 -3.13231 -309.838 -240.875 2.25990 demand_13 -2.46263 -251.590 -208.339 1.77674 demand_14 0.13711 13.748 12.422 -0.09892 demand_15 3.55301 346.849 366.315 -2.56343 demand_16 -5.27287 -510.898 -554.179 3.80428 demand_17 -0.02852 -2.502 -2.750 0.02058 demand_18 -3.97374 -401.582 -414.859 2.86698 demand_19 2.30169 244.124 254.797 -1.66062 demand_20 -0.61976 -70.898 -78.771 0.44714 supply_1 -0.79213 -78.918 -69.232 0.70287 supply_2 0.37122 39.022 36.231 -0.32939 supply_3 -2.54401 -264.028 -246.006 2.25734 supply_4 -1.58295 -165.467 -155.446 1.40458 supply_5 -2.40285 -237.044 -239.804 2.13208 supply_6 -1.41153 -140.656 -141.858 1.25247 supply_7 -1.86174 -189.846 -192.132 1.65195 supply_8 3.60208 368.256 388.304 -3.19618 supply_9 1.52187 143.979 147.013 -1.35038 supply_10 -2.85966 -265.145 -254.224 2.53741 supply_11 0.33741 31.177 25.339 -0.29938 supply_12 2.36613 234.051 181.956 -2.09950 supply_13 1.88385 192.460 159.374 -1.67157 supply_14 -0.00962 -0.965 -0.872 0.00854 supply_15 -2.52306 -246.304 -260.128 2.23875 supply_16 3.84942 372.977 404.574 -3.41564 supply_17 0.07279 6.384 7.017 -0.06459 supply_18 2.96969 300.114 310.035 -2.63504 supply_19 -1.54232 -163.584 -170.735 1.36853 supply_20 0.55542 63.538 70.594 -0.49283 supply_price supply_farmPrice supply_trend demand_1 -67.022 -65.927 -0.673 demand_2 51.397 48.454 0.978 demand_3 -253.253 -241.823 -7.321 demand_4 -156.109 -146.505 -5.974 demand_5 -226.294 -254.162 -11.469 demand_6 -131.682 -142.983 -7.929 demand_7 -182.417 -188.907 -12.522 demand_8 375.820 403.632 29.409 demand_9 148.573 170.706 14.134 demand_10 -264.317 -286.783 -28.507 demand_11 25.247 22.131 3.005 demand_12 223.542 155.029 27.119 demand_13 181.517 125.971 23.098 demand_14 -9.919 -8.052 -1.385 demand_15 -250.245 -262.238 -38.451 demand_16 368.603 399.449 60.868 demand_17 1.805 2.274 0.350 demand_18 289.734 265.195 51.606 demand_19 -176.131 -148.294 -31.552 demand_20 51.151 41.584 8.943 supply_1 70.025 68.881 0.703 supply_2 -34.625 -32.642 -0.659 supply_3 234.276 223.702 6.772 supply_4 146.821 137.789 5.618 supply_5 210.332 236.235 10.660 supply_6 124.806 135.517 7.515 supply_7 168.453 174.446 11.564 supply_8 -326.759 -350.940 -25.569 supply_9 -127.755 -146.786 -12.153 supply_10 235.267 255.264 25.374 supply_11 -27.664 -24.250 -3.293 supply_12 -207.676 -144.026 -25.194 supply_13 -170.773 -118.514 -21.730 supply_14 0.856 0.695 0.120 supply_15 218.549 229.024 33.581 supply_16 -330.948 -358.642 -54.650 supply_17 -5.665 -7.137 -1.098 supply_18 -266.295 -243.742 -47.431 supply_19 145.150 122.209 26.002 supply_20 -56.378 -45.834 -9.857 > round( colSums( estfun( fit3sls[[ 1 ]]$e1 ) ), digits = 7 ) demand_(Intercept) demand_price demand_income supply_(Intercept) 0 0 0 0 supply_price supply_farmPrice supply_trend 0 0 0 > > estfun( fit3sls[[ 2 ]]$e1e ) demand_(Intercept) demand_price demand_income supply_(Intercept) demand_1 1.0970 109.29 95.88 -0.8158 demand_2 -0.7973 -83.81 -77.82 0.5929 demand_3 3.9791 412.96 384.77 -2.9592 demand_4 2.4352 254.56 239.14 -1.8110 demand_5 3.7405 369.00 373.30 -2.7817 demand_6 2.1548 214.73 216.56 -1.6025 demand_7 2.9170 297.45 301.04 -2.1693 demand_8 -5.9943 -612.82 -646.19 4.4579 demand_9 -2.5608 -242.27 -247.37 1.9044 demand_10 4.6485 431.00 413.25 -3.4570 demand_11 -0.4455 -41.17 -33.46 0.3313 demand_12 -3.6851 -364.52 -283.38 2.7405 demand_13 -2.8972 -295.99 -245.10 2.1546 demand_14 0.1613 16.17 14.61 -0.1200 demand_15 4.1800 408.06 430.96 -3.1086 demand_16 -6.2034 -601.06 -651.98 4.6134 demand_17 -0.0336 -2.94 -3.24 0.0250 demand_18 -4.6750 -472.45 -488.07 3.4767 demand_19 2.7079 287.21 299.76 -2.0138 demand_20 -0.7291 -83.41 -92.67 0.5422 supply_1 -0.9222 -91.88 -80.60 0.8435 supply_2 0.4880 51.30 47.63 -0.4463 supply_3 -3.0517 -316.72 -295.10 2.7912 supply_4 -1.8908 -197.65 -185.68 1.7294 supply_5 -2.8789 -284.00 -287.31 2.6331 supply_6 -1.6828 -167.69 -169.12 1.5391 supply_7 -2.2343 -227.83 -230.58 2.0435 supply_8 4.3919 449.01 473.45 -4.0170 supply_9 1.8611 176.08 179.79 -1.7022 supply_10 -3.4650 -321.27 -308.04 3.1691 supply_11 0.3885 35.90 29.18 -0.3554 supply_12 2.8352 280.45 218.03 -2.5932 supply_13 2.2501 229.88 190.36 -2.0580 supply_14 -0.0404 -4.05 -3.66 0.0369 supply_15 -3.0726 -299.95 -316.79 2.8103 supply_16 4.6536 450.90 489.09 -4.2563 supply_17 0.0715 6.27 6.89 -0.0654 supply_18 3.5683 360.61 372.53 -3.2636 supply_19 -1.9084 -202.41 -211.25 1.7454 supply_20 0.6388 73.07 81.19 -0.5842 supply_price supply_farmPrice supply_trend demand_1 -81.28 -79.95 -0.816 demand_2 62.33 58.76 1.186 demand_3 -307.11 -293.25 -8.877 demand_4 -189.31 -177.66 -7.244 demand_5 -274.42 -308.22 -13.909 demand_6 -159.69 -173.39 -9.615 demand_7 -221.21 -229.08 -15.185 demand_8 455.75 489.48 35.663 demand_9 180.17 207.01 17.140 demand_10 -320.53 -347.78 -34.570 demand_11 30.62 26.84 3.645 demand_12 271.08 188.00 32.886 demand_13 220.12 152.76 28.010 demand_14 -12.03 -9.76 -1.679 demand_15 -303.47 -318.01 -46.629 demand_16 447.00 484.40 73.814 demand_17 2.19 2.76 0.424 demand_18 351.35 321.60 62.581 demand_19 -213.59 -179.83 -38.262 demand_20 62.03 50.43 10.845 supply_1 84.04 82.66 0.843 supply_2 -46.92 -44.23 -0.893 supply_3 289.68 276.60 8.373 supply_4 180.78 169.66 6.918 supply_5 259.76 291.74 13.165 supply_6 153.37 166.53 9.235 supply_7 208.38 215.80 14.305 supply_8 -410.67 -441.06 -32.136 supply_9 -161.04 -185.03 -15.320 supply_10 293.84 318.82 31.691 supply_11 -32.84 -28.78 -3.909 supply_12 -256.51 -177.89 -31.118 supply_13 -210.25 -145.91 -26.754 supply_14 3.70 3.00 0.517 supply_15 274.34 287.49 42.154 supply_16 -412.40 -446.91 -68.101 supply_17 -5.73 -7.23 -1.112 supply_18 -329.82 -301.88 -58.745 supply_19 185.13 155.87 33.163 supply_20 -66.83 -54.33 -11.684 > round( colSums( estfun( fit3sls[[ 2 ]]$e1e ) ), digits = 7 ) demand_(Intercept) demand_price demand_income supply_(Intercept) 0 0 0 0 supply_price supply_farmPrice supply_trend 0 0 0 > > estfun( fit3sls[[ 3 ]]$e1c ) demand_(Intercept) demand_price demand_income supply_(Intercept) demand_1 1.3280 132.31 116.07 -0.9904 demand_2 -0.9652 -101.46 -94.20 0.7198 demand_3 4.8171 499.94 465.81 -3.5924 demand_4 2.9481 308.17 289.50 -2.1986 demand_5 4.5282 446.72 451.92 -3.3770 demand_6 2.6087 259.95 262.17 -1.9455 demand_7 3.5314 360.10 364.44 -2.6336 demand_8 -7.2568 -741.89 -782.28 5.4119 demand_9 -3.1001 -293.29 -299.47 2.3120 demand_10 5.6275 521.78 500.28 -4.1968 demand_11 -0.5394 -49.84 -40.51 0.4022 demand_12 -4.4612 -441.28 -343.06 3.3270 demand_13 -3.5074 -358.33 -296.72 2.6157 demand_14 0.1953 19.58 17.69 -0.1456 demand_15 5.0603 494.00 521.72 -3.7739 demand_16 -7.5098 -727.64 -789.29 5.6006 demand_17 -0.0406 -3.56 -3.92 0.0303 demand_18 -5.6596 -571.95 -590.86 4.2207 demand_19 3.2782 347.69 362.89 -2.4448 demand_20 -0.8827 -100.98 -112.19 0.6583 supply_1 -1.2187 -121.42 -106.51 1.0461 supply_2 0.4947 52.00 48.29 -0.4247 supply_3 -3.7909 -393.44 -366.58 3.2542 supply_4 -2.3698 -247.71 -232.71 2.0343 supply_5 -3.5854 -353.70 -357.82 3.0777 supply_6 -2.1176 -211.02 -212.82 1.8178 supply_7 -2.7729 -282.76 -286.16 2.3803 supply_8 5.2704 538.82 568.15 -4.5242 supply_9 2.2191 209.94 214.37 -1.9049 supply_10 -4.2139 -390.71 -374.62 3.6173 supply_11 0.5250 48.51 39.42 -0.4506 supply_12 3.5301 349.19 271.47 -3.0303 supply_13 2.8205 288.15 238.61 -2.4212 supply_14 0.0251 2.52 2.28 -0.0216 supply_15 -3.6967 -360.87 -381.13 3.1733 supply_16 5.6869 551.02 597.70 -4.8817 supply_17 0.1301 11.41 12.54 -0.1117 supply_18 4.4171 446.39 461.15 -3.7917 supply_19 -2.2186 -235.31 -245.60 1.9044 supply_20 0.8653 98.99 109.98 -0.7428 supply_price supply_farmPrice supply_trend demand_1 -98.67 -97.06 -0.990 demand_2 75.67 71.33 1.440 demand_3 -372.84 -356.01 -10.777 demand_4 -229.82 -215.68 -8.794 demand_5 -333.15 -374.17 -16.885 demand_6 -193.86 -210.50 -11.673 demand_7 -268.55 -278.11 -18.435 demand_8 553.28 594.22 43.295 demand_9 218.73 251.31 20.808 demand_10 -389.13 -422.20 -41.968 demand_11 37.17 32.58 4.425 demand_12 329.10 228.23 39.924 demand_13 267.23 185.45 34.004 demand_14 -14.60 -11.85 -2.039 demand_15 -368.41 -386.07 -56.608 demand_16 542.65 588.07 89.610 demand_17 2.66 3.35 0.515 demand_18 426.54 390.42 75.973 demand_19 -259.30 -218.32 -46.450 demand_20 75.30 61.22 13.166 supply_1 104.22 102.52 1.046 supply_2 -44.64 -42.09 -0.849 supply_3 337.73 322.49 9.763 supply_4 212.64 199.56 8.137 supply_5 303.62 341.01 15.389 supply_6 181.14 196.69 10.907 supply_7 242.72 251.36 16.662 supply_8 -462.53 -496.76 -36.194 supply_9 -180.22 -207.07 -17.144 supply_10 335.39 363.90 36.173 supply_11 -41.64 -36.50 -4.957 supply_12 -299.75 -207.88 -36.364 supply_13 -247.35 -171.66 -31.475 supply_14 -2.16 -1.75 -0.302 supply_15 309.78 324.63 47.599 supply_16 -473.00 -512.58 -78.108 supply_17 -9.80 -12.34 -1.899 supply_18 -383.19 -350.73 -68.251 supply_19 201.99 170.07 36.184 supply_20 -84.97 -69.08 -14.856 > round( colSums( estfun( fit3sls[[ 3 ]]$e1c ) ), digits = 7 ) demand_(Intercept) demand_price demand_income supply_(Intercept) 0 0 0 0 supply_price supply_farmPrice supply_trend 0 0 0 > > estfun( fit3sls[[ 4 ]]$e1wc ) demand_(Intercept) demand_price demand_income supply_(Intercept) demand_1 1.3280 132.31 116.07 -0.9904 demand_2 -0.9652 -101.46 -94.20 0.7198 demand_3 4.8171 499.94 465.81 -3.5924 demand_4 2.9481 308.17 289.50 -2.1986 demand_5 4.5282 446.72 451.92 -3.3770 demand_6 2.6087 259.95 262.17 -1.9455 demand_7 3.5314 360.10 364.44 -2.6336 demand_8 -7.2568 -741.89 -782.28 5.4119 demand_9 -3.1001 -293.29 -299.47 2.3120 demand_10 5.6275 521.78 500.28 -4.1968 demand_11 -0.5394 -49.84 -40.51 0.4022 demand_12 -4.4612 -441.28 -343.06 3.3270 demand_13 -3.5074 -358.33 -296.72 2.6157 demand_14 0.1953 19.58 17.69 -0.1456 demand_15 5.0603 494.00 521.72 -3.7739 demand_16 -7.5098 -727.64 -789.29 5.6006 demand_17 -0.0406 -3.56 -3.92 0.0303 demand_18 -5.6596 -571.95 -590.86 4.2207 demand_19 3.2782 347.69 362.89 -2.4448 demand_20 -0.8827 -100.98 -112.19 0.6583 supply_1 -1.2187 -121.42 -106.51 1.0461 supply_2 0.4947 52.00 48.29 -0.4247 supply_3 -3.7909 -393.44 -366.58 3.2542 supply_4 -2.3698 -247.71 -232.71 2.0343 supply_5 -3.5854 -353.70 -357.82 3.0777 supply_6 -2.1176 -211.02 -212.82 1.8178 supply_7 -2.7729 -282.76 -286.16 2.3803 supply_8 5.2704 538.82 568.15 -4.5242 supply_9 2.2191 209.94 214.37 -1.9049 supply_10 -4.2139 -390.71 -374.62 3.6173 supply_11 0.5250 48.51 39.42 -0.4506 supply_12 3.5301 349.19 271.47 -3.0303 supply_13 2.8205 288.15 238.61 -2.4212 supply_14 0.0251 2.52 2.28 -0.0216 supply_15 -3.6967 -360.87 -381.13 3.1733 supply_16 5.6869 551.02 597.70 -4.8817 supply_17 0.1301 11.41 12.54 -0.1117 supply_18 4.4171 446.39 461.15 -3.7917 supply_19 -2.2186 -235.31 -245.60 1.9044 supply_20 0.8653 98.99 109.98 -0.7428 supply_price supply_farmPrice supply_trend demand_1 -98.67 -97.06 -0.990 demand_2 75.67 71.33 1.440 demand_3 -372.84 -356.01 -10.777 demand_4 -229.82 -215.68 -8.794 demand_5 -333.15 -374.17 -16.885 demand_6 -193.86 -210.50 -11.673 demand_7 -268.55 -278.11 -18.435 demand_8 553.28 594.22 43.295 demand_9 218.73 251.31 20.808 demand_10 -389.13 -422.20 -41.968 demand_11 37.17 32.58 4.425 demand_12 329.10 228.23 39.924 demand_13 267.23 185.45 34.004 demand_14 -14.60 -11.85 -2.039 demand_15 -368.41 -386.07 -56.608 demand_16 542.65 588.07 89.610 demand_17 2.66 3.35 0.515 demand_18 426.54 390.42 75.973 demand_19 -259.30 -218.32 -46.450 demand_20 75.30 61.22 13.166 supply_1 104.22 102.52 1.046 supply_2 -44.64 -42.09 -0.849 supply_3 337.73 322.49 9.763 supply_4 212.64 199.56 8.137 supply_5 303.62 341.01 15.389 supply_6 181.14 196.69 10.907 supply_7 242.72 251.36 16.662 supply_8 -462.53 -496.76 -36.194 supply_9 -180.22 -207.07 -17.144 supply_10 335.39 363.90 36.173 supply_11 -41.64 -36.50 -4.957 supply_12 -299.75 -207.88 -36.364 supply_13 -247.35 -171.66 -31.475 supply_14 -2.16 -1.75 -0.302 supply_15 309.78 324.63 47.599 supply_16 -473.00 -512.58 -78.108 supply_17 -9.80 -12.34 -1.899 supply_18 -383.19 -350.73 -68.251 supply_19 201.99 170.07 36.184 supply_20 -84.97 -69.08 -14.856 > > round( colSums( estfun( fit3sls[[ 5 ]]$e1wc ) ), digits = 7 ) demand_(Intercept) demand_price demand_income supply_(Intercept) 0 0 0 0 supply_price supply_farmPrice supply_trend 0 0 0 > round( colSums( estfun( fit3sls[[ 5 ]]$e1wc, residFit = FALSE ) ), digits = 7 ) demand_(Intercept) demand_price demand_income supply_(Intercept) 0 0 0 0 supply_price supply_farmPrice supply_trend 0 0 0 > > round( colSums( estfun( fit3sls[[ 4 ]]$e1wc ) ), digits = 7 ) demand_(Intercept) demand_price demand_income supply_(Intercept) 0 0 0 0 supply_price supply_farmPrice supply_trend 0 0 0 > round( colSums( estfun( fit3sls[[ 4 ]]$e1wc, residFit = FALSE ) ), digits = 7 ) demand_(Intercept) demand_price demand_income supply_(Intercept) 0 0 0 0 supply_price supply_farmPrice supply_trend 0 0 0 > > round( colSums( estfun( fit3sls[[ 3 ]]$e1wc ) ), digits = 7 ) demand_(Intercept) demand_price demand_income supply_(Intercept) 0 0 0 0 supply_price supply_farmPrice supply_trend 0 0 0 > round( colSums( estfun( fit3sls[[ 3 ]]$e1wc, residFit = FALSE ) ), digits = 7 ) demand_(Intercept) demand_price demand_income supply_(Intercept) 0 0 0 0 supply_price supply_farmPrice supply_trend 0 0 0 > > round( colSums( estfun( fit3sls[[ 2 ]]$e1wc ) ), digits = 7 ) demand_(Intercept) demand_price demand_income supply_(Intercept) 0 0 0 0 supply_price supply_farmPrice supply_trend 0 0 0 > round( colSums( estfun( fit3sls[[ 2 ]]$e1wc, residFit = FALSE ) ), digits = 7 ) demand_(Intercept) demand_price demand_income supply_(Intercept) 0 0 0 0 supply_price supply_farmPrice supply_trend 0 0 0 > > round( colSums( estfun( fit3sls[[ 1 ]]$e1wc ) ), digits = 7 ) demand_(Intercept) demand_price demand_income supply_(Intercept) 0 0 0 0 supply_price supply_farmPrice supply_trend 0 0 0 > round( colSums( estfun( fit3sls[[ 1 ]]$e1wc, residFit = FALSE ) ), digits = 7 ) demand_(Intercept) demand_price demand_income supply_(Intercept) 0 0 0 0 supply_price supply_farmPrice supply_trend 0 0 0 > > estfun( fit3slsd[[ 5 ]]$e1w ) demand_(Intercept) demand_price demand_income supply_(Intercept) demand_1 -0.471 -44.9 -41.2 0.299 demand_2 -1.315 -130.6 -128.3 0.835 demand_3 0.736 72.8 71.2 -0.467 demand_4 0.203 20.3 19.9 -0.129 demand_5 0.825 80.0 82.4 -0.524 demand_6 0.290 28.4 29.1 -0.184 demand_7 0.657 65.6 67.8 -0.417 demand_8 -2.887 -290.8 -311.2 1.833 demand_9 -1.172 -112.7 -113.2 0.744 demand_10 1.981 188.4 176.1 -1.258 demand_11 0.308 29.2 23.1 -0.196 demand_12 -0.922 -91.4 -70.9 0.586 demand_13 -0.639 -65.0 -54.1 0.406 demand_14 0.597 60.5 54.0 -0.379 demand_15 2.100 211.7 216.5 -1.333 demand_16 -1.984 -200.3 -208.6 1.260 demand_17 0.785 75.0 75.7 -0.499 demand_18 -1.136 -118.3 -118.6 0.721 demand_19 1.814 195.6 200.8 -1.152 demand_20 0.232 26.4 29.5 -0.147 supply_1 -0.434 -41.3 -37.9 0.449 supply_2 -0.126 -12.6 -12.3 0.131 supply_3 -1.272 -125.8 -123.0 1.316 supply_4 -0.902 -90.1 -88.6 0.933 supply_5 -0.805 -78.1 -80.4 0.833 supply_6 -0.457 -44.8 -46.0 0.473 supply_7 -0.758 -75.8 -78.3 0.784 supply_8 1.582 159.3 170.5 -1.636 supply_9 1.004 96.6 97.0 -1.039 supply_10 -0.856 -81.5 -76.1 0.886 supply_11 0.191 18.1 14.3 -0.197 supply_12 0.607 60.1 46.7 -0.628 supply_13 0.335 34.0 28.3 -0.346 supply_14 -0.201 -20.3 -18.2 0.208 supply_15 -0.801 -80.8 -82.6 0.829 supply_16 1.930 194.8 202.9 -1.997 supply_17 0.811 77.5 78.2 -0.839 supply_18 1.241 129.3 129.5 -1.283 supply_19 -0.858 -92.5 -95.0 0.888 supply_20 -0.229 -26.1 -29.1 0.237 supply_price supply_farmPrice supply_trend demand_1 29.8 29.3 0.299 demand_2 87.8 82.7 1.670 demand_3 -48.5 -46.3 -1.402 demand_4 -13.5 -12.7 -0.516 demand_5 -51.7 -58.1 -2.620 demand_6 -18.3 -19.9 -1.105 demand_7 -42.5 -44.0 -2.919 demand_8 187.4 201.3 14.667 demand_9 70.4 80.9 6.698 demand_10 -116.6 -126.5 -12.579 demand_11 -18.1 -15.8 -2.152 demand_12 57.9 40.2 7.029 demand_13 41.5 28.8 5.278 demand_14 -38.0 -30.8 -5.304 demand_15 -130.2 -136.4 -20.000 demand_16 122.1 132.3 20.164 demand_17 -43.7 -55.1 -8.477 demand_18 72.9 66.7 12.986 demand_19 -122.2 -102.9 -21.890 demand_20 -16.9 -13.7 -2.947 supply_1 44.7 44.0 0.449 supply_2 13.7 13.0 0.262 supply_3 136.5 130.4 3.947 supply_4 97.5 91.5 3.731 supply_5 82.2 92.3 4.165 supply_6 47.1 51.2 2.839 supply_7 80.0 82.8 5.491 supply_8 -167.3 -179.7 -13.089 supply_9 -98.3 -112.9 -9.349 supply_10 82.1 89.1 8.857 supply_11 -18.2 -16.0 -2.169 supply_12 -62.1 -43.1 -7.532 supply_13 -35.4 -24.5 -4.499 supply_14 20.8 16.9 2.907 supply_15 80.9 84.8 12.430 supply_16 -193.5 -209.7 -31.948 supply_17 -73.6 -92.7 -14.264 supply_18 -129.7 -118.7 -23.101 supply_19 94.1 79.3 16.863 supply_20 27.1 22.1 4.744 Warning message: In estfun.systemfit(fit3slsd[[5]]$e1w) : the columns of the returned estimating function do not all sum up to zero, which indicates that the wrong estimating function is returned > estfun( fit3slsd[[ 5 ]]$e1w, residFit = FALSE ) demand_(Intercept) demand_price demand_income supply_(Intercept) demand_1 0.89947 85.649 78.613 -0.57123 demand_2 0.00817 0.811 0.797 -0.00519 demand_3 1.94109 192.071 187.703 -1.23275 demand_4 1.44439 144.277 141.839 -0.91731 demand_5 1.10477 107.119 110.256 -0.70162 demand_6 0.67950 66.596 68.290 -0.43154 demand_7 0.96428 96.352 99.513 -0.61239 demand_8 -1.80100 -181.402 -194.148 1.14378 demand_9 -1.09741 -105.536 -106.009 0.69694 demand_10 0.93145 88.611 82.806 -0.59155 demand_11 -0.13250 -12.551 -9.951 0.08415 demand_12 -0.98743 -97.798 -75.933 0.62710 demand_13 -0.32371 -32.932 -27.386 0.20558 demand_14 -0.09978 -10.112 -9.040 0.06337 demand_15 0.56754 57.219 58.513 -0.36043 demand_16 -2.64753 -267.185 -278.255 1.68140 demand_17 -1.65258 -157.934 -159.308 1.04952 demand_18 -1.17988 -122.919 -123.179 0.74932 demand_19 1.26015 135.883 139.499 -0.80030 demand_20 0.12101 13.783 15.380 -0.07685 supply_1 -0.39424 -37.540 -34.456 0.40779 supply_2 -0.17503 -17.388 -17.083 0.18104 supply_3 -1.29167 -127.811 -124.905 1.33607 supply_4 -0.90312 -90.210 -88.686 0.93416 supply_5 -0.84242 -81.682 -84.074 0.87137 supply_6 -0.46834 -45.901 -47.069 0.48444 supply_7 -0.80988 -80.925 -83.580 0.83772 supply_8 1.72577 173.825 186.038 -1.78508 supply_9 1.10899 106.650 107.128 -1.14710 supply_10 -0.94120 -89.538 -83.673 0.97355 supply_11 0.22943 21.733 17.231 -0.23732 supply_12 0.60019 59.445 46.155 -0.62082 supply_13 0.37695 38.348 31.890 -0.38990 supply_14 -0.28729 -29.116 -26.029 0.29717 supply_15 -0.94355 -95.128 -97.280 0.97597 supply_16 2.01917 203.771 212.215 -2.08856 supply_17 0.74286 70.994 71.612 -0.76839 supply_18 1.40908 146.797 147.108 -1.45750 supply_19 -0.87479 -94.329 -96.840 0.90486 supply_20 -0.28090 -31.995 -35.702 0.29055 supply_price supply_farmPrice supply_trend demand_1 -56.911 -55.981 -0.5712 demand_2 -0.545 -0.514 -0.0104 demand_3 -127.940 -122.166 -3.6983 demand_4 -95.886 -89.988 -3.6692 demand_5 -69.215 -77.739 -3.5081 demand_6 -43.002 -46.692 -2.5892 demand_7 -62.447 -64.669 -4.2868 demand_8 116.934 125.587 9.1502 demand_9 65.935 75.758 6.2725 demand_10 -54.848 -59.510 -5.9155 demand_11 7.776 6.816 0.9257 demand_12 62.030 43.019 7.5252 demand_13 21.003 14.576 2.6726 demand_14 6.354 5.158 0.8871 demand_15 -35.186 -36.872 -5.4065 demand_16 162.914 176.547 26.9023 demand_17 92.041 115.972 17.8418 demand_18 75.726 69.312 13.4878 demand_19 -84.882 -71.467 -15.2057 demand_20 -8.791 -7.147 -1.5370 supply_1 40.627 39.963 0.4078 supply_2 19.031 17.941 0.3621 supply_3 138.662 132.404 4.0082 supply_4 97.648 91.641 3.7366 supply_5 85.962 96.548 4.3569 supply_6 48.274 52.416 2.9066 supply_7 85.424 88.463 5.8640 supply_8 -182.496 -196.002 -14.2806 supply_9 -108.523 -124.690 -10.3239 supply_10 90.266 97.939 9.7355 supply_11 -21.929 -19.223 -2.6105 supply_12 -61.410 -42.588 -7.4498 supply_13 -39.834 -27.644 -5.0687 supply_14 29.799 24.189 4.1603 supply_15 95.276 99.842 14.6396 supply_16 -202.365 -219.299 -33.4170 supply_17 -67.387 -84.908 -13.0627 supply_18 -147.294 -134.819 -26.2351 supply_19 95.972 80.804 17.1923 supply_20 33.238 27.021 5.8111 > > round( colSums( estfun( fit3slsd[[ 5 ]]$e1w ) ), digits = 7 ) demand_(Intercept) demand_price demand_income supply_(Intercept) 0.0 0.0 0.0 0.0 supply_price supply_farmPrice supply_trend 38.6 0.0 -52.4 Warning message: In estfun.systemfit(fit3slsd[[5]]$e1w) : the columns of the returned estimating function do not all sum up to zero, which indicates that the wrong estimating function is returned > round( colSums( estfun( fit3slsd[[ 5 ]]$e1w, residFit = FALSE ) ), digits = 7 ) demand_(Intercept) demand_price demand_income supply_(Intercept) 0 0 0 0 supply_price supply_farmPrice supply_trend 0 0 0 > > round( colSums( estfun( fit3slsd[[ 4 ]]$e1w ) ), digits = 7 ) demand_(Intercept) demand_price demand_income supply_(Intercept) 0.00 0.00 0.00 0.00 supply_price supply_farmPrice supply_trend 9.67 0.00 -13.12 Warning message: In estfun.systemfit(fit3slsd[[4]]$e1w) : the columns of the returned estimating function do not all sum up to zero, which indicates that the wrong estimating function is returned > round( colSums( estfun( fit3slsd[[ 4 ]]$e1w, residFit = FALSE ) ), digits = 7 ) demand_(Intercept) demand_price demand_income supply_(Intercept) 0.0 0.0 0.0 0.0 supply_price supply_farmPrice supply_trend -28.9 0.0 39.3 Warning message: In estfun.systemfit(fit3slsd[[4]]$e1w, residFit = FALSE) : the columns of the returned estimating function do not all sum up to zero, which indicates that the wrong estimating function is returned > > round( colSums( estfun( fit3slsd[[ 3 ]]$e1w ) ), digits = 7 ) demand_(Intercept) demand_price demand_income supply_(Intercept) 0.00 0.00 0.00 0.00 supply_price supply_farmPrice supply_trend 9.67 0.00 -13.12 Warning message: In estfun.systemfit(fit3slsd[[3]]$e1w) : the columns of the returned estimating function do not all sum up to zero, which indicates that the wrong estimating function is returned > round( colSums( estfun( fit3slsd[[ 3 ]]$e1w, residFit = FALSE ) ), digits = 7 ) demand_(Intercept) demand_price demand_income supply_(Intercept) 0.0 0.0 0.0 0.0 supply_price supply_farmPrice supply_trend -28.9 0.0 39.3 Warning message: In estfun.systemfit(fit3slsd[[3]]$e1w, residFit = FALSE) : the columns of the returned estimating function do not all sum up to zero, which indicates that the wrong estimating function is returned > > round( colSums( estfun( fit3slsd[[ 2 ]]$e1w ) ), digits = 7 ) demand_(Intercept) demand_price demand_income supply_(Intercept) 0.0 0.0 0.0 0.0 supply_price supply_farmPrice supply_trend 38.6 0.0 -52.4 Warning message: In estfun.systemfit(fit3slsd[[2]]$e1w) : the columns of the returned estimating function do not all sum up to zero, which indicates that the wrong estimating function is returned > round( colSums( estfun( fit3slsd[[ 2 ]]$e1w, residFit = FALSE ) ), digits = 7 ) demand_(Intercept) demand_price demand_income supply_(Intercept) 0 0 0 0 supply_price supply_farmPrice supply_trend 0 0 0 > > round( colSums( estfun( fit3slsd[[ 1 ]]$e1w ) ), digits = 7 ) demand_(Intercept) demand_price demand_income supply_(Intercept) 0 0 0 0 supply_price supply_farmPrice supply_trend 0 0 0 > round( colSums( estfun( fit3slsd[[ 1 ]]$e1w, residFit = FALSE ) ), digits = 7 ) demand_(Intercept) demand_price demand_income supply_(Intercept) 0.0 0.0 0.0 0.0 supply_price supply_farmPrice supply_trend -38.6 0.0 52.4 Warning message: In estfun.systemfit(fit3slsd[[1]]$e1w, residFit = FALSE) : the columns of the returned estimating function do not all sum up to zero, which indicates that the wrong estimating function is returned > > > ## **************** bread ************************ > bread( fit3sls[[ 1 ]]$e1 ) demand_(Intercept) demand_price demand_income supply_(Intercept) [1,] 2509.59 -26.9369 1.9721 2525.8 [2,] -26.94 0.3724 -0.1057 -14.1 [3,] 1.97 -0.1057 0.0881 -11.3 [4,] 2525.80 -14.1479 -11.2987 5658.1 [5,] -27.01 0.2401 0.0307 -43.3 [6,] 1.64 -0.0877 0.0732 -11.8 [7,] 2.47 -0.1324 0.1104 -16.4 supply_price supply_farmPrice supply_trend [1,] -27.0066 1.6369 2.4699 [2,] 0.2401 -0.0877 -0.1324 [3,] 0.0307 0.0732 0.1104 [4,] -43.3336 -11.7989 -16.3581 [5,] 0.3974 0.0325 0.0428 [6,] 0.0325 0.0774 0.1019 [7,] 0.0428 0.1019 0.2125 > > bread( fit3sls[[ 2 ]]$e1e ) demand_(Intercept) demand_price demand_income supply_(Intercept) [1,] 2133.15 -22.8963 1.6763 2082.83 [2,] -22.90 0.3165 -0.0898 -11.67 [3,] 1.68 -0.0898 0.0749 -9.32 [4,] 2082.83 -11.6667 -9.3172 4526.47 [5,] -22.27 0.1980 0.0253 -34.67 [6,] 1.35 -0.0723 0.0603 -9.44 [7,] 2.04 -0.1091 0.0910 -13.09 supply_price supply_farmPrice supply_trend [1,] -22.2702 1.3498 2.0367 [2,] 0.1980 -0.0723 -0.1091 [3,] 0.0253 0.0603 0.0910 [4,] -34.6668 -9.4391 -13.0865 [5,] 0.3179 0.0260 0.0342 [6,] 0.0260 0.0619 0.0815 [7,] 0.0342 0.0815 0.1700 > > bread( fit3sls[[ 3 ]]$e1c ) demand_(Intercept) demand_price demand_income supply_(Intercept) [1,] 2509.59 -26.9369 1.9721 2610.8 [2,] -26.94 0.3724 -0.1057 -14.6 [3,] 1.97 -0.1057 0.0881 -11.7 [4,] 2610.83 -14.6243 -11.6791 5650.4 [5,] -27.92 0.2482 0.0317 -43.3 [6,] 1.69 -0.0907 0.0756 -11.7 [7,] 2.55 -0.1368 0.1141 -16.7 supply_price supply_farmPrice supply_trend [1,] -27.9159 1.6920 2.5531 [2,] 0.2482 -0.0907 -0.1368 [3,] 0.0317 0.0756 0.1141 [4,] -43.3005 -11.7199 -16.6696 [5,] 0.3972 0.0321 0.0441 [6,] 0.0321 0.0766 0.1051 [7,] 0.0441 0.1051 0.1999 > > bread( fit3sls[[ 4 ]]$e1wc ) demand_(Intercept) demand_price demand_income supply_(Intercept) [1,] 2509.59 -26.9369 1.9721 2610.8 [2,] -26.94 0.3724 -0.1057 -14.6 [3,] 1.97 -0.1057 0.0881 -11.7 [4,] 2610.83 -14.6243 -11.6791 5650.4 [5,] -27.92 0.2482 0.0317 -43.3 [6,] 1.69 -0.0907 0.0756 -11.7 [7,] 2.55 -0.1368 0.1141 -16.7 supply_price supply_farmPrice supply_trend [1,] -27.9159 1.6920 2.5531 [2,] 0.2482 -0.0907 -0.1368 [3,] 0.0317 0.0756 0.1141 [4,] -43.3005 -11.7199 -16.6696 [5,] 0.3972 0.0321 0.0441 [6,] 0.0321 0.0766 0.1051 [7,] 0.0441 0.1051 0.1999 > > bread( fit3slsd[[ 5 ]]$e1w ) demand_(Intercept) demand_price demand_income supply_(Intercept) [1,] 4967.14 -60.707 11.4076 1773.52 [2,] -60.71 0.839 -0.2382 -6.24 [3,] 11.41 -0.238 0.1273 -11.71 [4,] 1773.52 -6.236 -11.7103 5325.96 [5,] -21.83 0.185 0.0346 -37.94 [6,] 6.07 -0.141 0.0826 -13.55 [7,] -16.09 0.136 0.0255 -20.05 supply_price supply_farmPrice supply_trend [1,] -21.8336 6.0740 -16.0922 [2,] 0.1845 -0.1413 0.1360 [3,] 0.0346 0.0826 0.0255 [4,] -37.9350 -13.5483 -20.0519 [5,] 0.3216 0.0453 0.1323 [6,] 0.0453 0.0885 0.0440 [7,] 0.1323 0.0440 0.2443 > > bread( fit3slsd[[ 4 ]]$e1w ) demand_(Intercept) demand_price demand_income supply_(Intercept) [1,] 4967.14 -60.707 11.4076 1773.52 [2,] -60.71 0.839 -0.2382 -6.24 [3,] 11.41 -0.238 0.1273 -11.71 [4,] 1773.52 -6.236 -11.7103 5325.96 [5,] -21.83 0.185 0.0346 -37.94 [6,] 6.07 -0.141 0.0826 -13.55 [7,] -16.09 0.136 0.0255 -20.05 supply_price supply_farmPrice supply_trend [1,] -21.8336 6.0740 -16.0922 [2,] 0.1845 -0.1413 0.1360 [3,] 0.0346 0.0826 0.0255 [4,] -37.9350 -13.5483 -20.0519 [5,] 0.3216 0.0453 0.1323 [6,] 0.0453 0.0885 0.0440 [7,] 0.1323 0.0440 0.2443 > > bread( fit3slsd[[ 3 ]]$e1w ) demand_(Intercept) demand_price demand_income supply_(Intercept) [1,] 4967.14 -60.707 11.4076 1773.52 [2,] -60.71 0.839 -0.2382 -6.24 [3,] 11.41 -0.238 0.1273 -11.71 [4,] 1773.52 -6.236 -11.7103 5325.96 [5,] -21.83 0.185 0.0346 -37.94 [6,] 6.07 -0.141 0.0826 -13.55 [7,] -16.09 0.136 0.0255 -20.05 supply_price supply_farmPrice supply_trend [1,] -21.8336 6.0740 -16.0922 [2,] 0.1845 -0.1413 0.1360 [3,] 0.0346 0.0826 0.0255 [4,] -37.9350 -13.5483 -20.0519 [5,] 0.3216 0.0453 0.1323 [6,] 0.0453 0.0885 0.0440 [7,] 0.1323 0.0440 0.2443 > > bread( fit3slsd[[ 2 ]]$e1w ) demand_(Intercept) demand_price demand_income supply_(Intercept) [1,] 4967.14 -60.707 11.4076 1773.52 [2,] -60.71 0.839 -0.2382 -6.24 [3,] 11.41 -0.238 0.1273 -11.71 [4,] 1773.52 -6.236 -11.7103 5325.96 [5,] -21.83 0.185 0.0346 -37.94 [6,] 6.07 -0.141 0.0826 -13.55 [7,] -16.09 0.136 0.0255 -20.05 supply_price supply_farmPrice supply_trend [1,] -21.8336 6.0740 -16.0922 [2,] 0.1845 -0.1413 0.1360 [3,] 0.0346 0.0826 0.0255 [4,] -37.9350 -13.5483 -20.0519 [5,] 0.3216 0.0453 0.1323 [6,] 0.0453 0.0885 0.0440 [7,] 0.1323 0.0440 0.2443 > > bread( fit3slsd[[ 1 ]]$e1w ) demand_(Intercept) demand_price demand_income supply_(Intercept) [1,] 4967.14 -60.707 11.4076 1773.52 [2,] -60.71 0.839 -0.2382 -6.24 [3,] 11.41 -0.238 0.1273 -11.71 [4,] 1773.52 -6.236 -11.7103 5325.96 [5,] -21.83 0.185 0.0346 -37.94 [6,] 6.07 -0.141 0.0826 -13.55 [7,] -16.09 0.136 0.0255 -20.05 supply_price supply_farmPrice supply_trend [1,] -21.8336 6.0740 -16.0922 [2,] 0.1845 -0.1413 0.1360 [3,] 0.0346 0.0826 0.0255 [4,] -37.9350 -13.5483 -20.0519 [5,] 0.3216 0.0453 0.1323 [6,] 0.0453 0.0885 0.0440 [7,] 0.1323 0.0440 0.2443 > > proc.time() user system elapsed 4.028 0.219 4.239 systemfit/tests/test_2sls.R0000644000176200001440000007214512565330330015521 0ustar liggesuserslibrary( systemfit ) options( digits = 3 ) data( "Kmenta" ) useMatrix <- FALSE demand <- consump ~ price + income supply <- consump ~ price + farmPrice + trend inst <- ~ income + farmPrice + trend inst1 <- ~ income + farmPrice instlist <- list( inst1, inst ) system <- list( demand = demand, supply = supply ) restrm <- matrix(0,1,7) # restriction matrix "R" restrm[1,3] <- 1 restrm[1,7] <- -1 restrict <- "demand_income - supply_trend = 0" restr2m <- matrix(0,2,7) # restriction matrix "R" 2 restr2m[1,3] <- 1 restr2m[1,7] <- -1 restr2m[2,2] <- -1 restr2m[2,5] <- 1 restr2q <- c( 0, 0.5 ) # restriction vector "q" 2 restrict2 <- c( "demand_income - supply_trend = 0", "- demand_price + supply_price = 0.5" ) tc <- matrix(0,7,6) tc[1,1] <- 1 tc[2,2] <- 1 tc[3,3] <- 1 tc[4,4] <- 1 tc[5,5] <- 1 tc[6,6] <- 1 tc[7,3] <- 1 restr3m <- matrix(0,1,6) # restriction matrix "R" 2 restr3m[1,2] <- -1 restr3m[1,5] <- 1 restr3q <- c( 0.5 ) # restriction vector "q" 2 restrict3 <- "- C2 + C5 = 0.5" # It is not possible to estimate 2SLS with systemfit exactly # as EViews does, because EViews uses # methodResidCov == "geomean" for the coefficient covariance matrix and # methodResidCov == "noDfCor" for the residual covariance matrix. # systemfit uses always the same formulas for both calculations. ## *************** 2SLS estimation ************************ ## ************ 2SLS estimation (default)********************* fit2sls1 <- systemfit( system, "2SLS", data = Kmenta, inst = inst, x = TRUE, useMatrix = useMatrix ) print( summary( fit2sls1 ) ) nobs( fit2sls1 ) ## *************** 2SLS estimation (singleEqSigma=F)******************* fit2sls1s <- systemfit( system, "2SLS", data = Kmenta, inst = inst, singleEqSigma = FALSE, useMatrix = useMatrix ) print( summary( fit2sls1s ) ) nobs( fit2sls1s ) ## ********************* 2SLS (useDfSys = TRUE) ***************** print( summary( fit2sls1, useDfSys = TRUE ) ) nobs( fit2sls1 ) ## ********************* 2SLS (methodResidCov = "noDfCor" ) ***************** fit2sls1r <- systemfit( system, "2SLS", data = Kmenta, inst = inst, methodResidCov = "noDfCor", useMatrix = useMatrix ) print( summary( fit2sls1r ) ) nobs( fit2sls1r ) ## *************** 2SLS (methodResidCov="noDfCor", singleEqSigma=F) ************* fit2sls1rs <- systemfit( system, "2SLS", data = Kmenta, inst = inst, methodResidCov = "noDfCor", singleEqSigma = FALSE, useMatrix = useMatrix ) print( summary( fit2sls1rs ) ) nobs( fit2sls1rs ) ## ********************* 2SLS with restriction ******************** ## **************** 2SLS with restriction (default)******************** fit2sls2 <- systemfit( system, "2SLS", data = Kmenta, restrict.matrix = restrm, inst = inst, useMatrix = useMatrix ) print( summary( fit2sls2 ) ) nobs( fit2sls2 ) # the same with symbolically specified restrictions fit2sls2Sym <- systemfit( system, "2SLS", data = Kmenta, restrict.matrix = restrict, inst = inst, useMatrix = useMatrix ) all.equal( fit2sls2, fit2sls2Sym ) nobs( fit2sls2Sym ) ## ************* 2SLS with restriction (singleEqSigma=T) ***************** fit2sls2s <- systemfit( system, "2SLS", data = Kmenta, restrict.matrix = restrm, inst = inst, singleEqSigma = TRUE, x = TRUE, useMatrix = useMatrix ) print( summary( fit2sls2s ) ) nobs( fit2sls2s ) ## ********************* 2SLS with restriction (useDfSys=T) ************** print( summary( fit2sls2, useDfSys = TRUE ) ) nobs( fit2sls2 ) ## ********************* 2SLS with restriction (methodResidCov = "noDfCor") ************** fit2sls2r <- systemfit( system, "2SLS", data = Kmenta, restrict.matrix = restrm, inst = inst, methodResidCov = "noDfCor", useMatrix = useMatrix ) print( summary( fit2sls2r ) ) nobs( fit2sls2r ) ## ******** 2SLS with restriction (methodResidCov="noDfCor", singleEqSigma=TRUE) ********* fit2sls2rs <- systemfit( system, "2SLS", data = Kmenta, restrict.matrix = restrm, inst = inst, methodResidCov = "noDfCor", singleEqSigma = TRUE, useMatrix = useMatrix ) print( summary( fit2sls2rs ) ) nobs( fit2sls2rs ) ## ********************* 2SLS with restriction via restrict.regMat ****************** ## *************** 2SLS with restriction via restrict.regMat (default )*************** fit2sls3 <- systemfit( system, "2SLS", data = Kmenta, restrict.regMat = tc, inst = inst, methodResidCov = "noDfCor", useMatrix = useMatrix ) print( summary( fit2sls3, useDfSys = TRUE ) ) nobs( fit2sls3 ) ## ***************** 2SLS with 2 restrictions ******************* ## ************** 2SLS with 2 restrictions (default) ************** fit2sls4 <- systemfit( system, "2SLS", data = Kmenta, restrict.matrix = restr2m, restrict.rhs = restr2q, inst = inst, useMatrix = useMatrix ) print( summary( fit2sls4 ) ) nobs( fit2sls4 ) # the same with symbolically specified restrictions fit2sls4Sym <- systemfit( system, "2SLS", data = Kmenta, restrict.matrix = restrict2, inst = inst, useMatrix = useMatrix ) all.equal( fit2sls4, fit2sls4Sym ) nobs( fit2sls4Sym ) ## ************ 2SLS with 2 restrictions (singleEqSigma=T) ************** fit2sls4s <- systemfit( system, "2SLS", data = Kmenta, restrict.matrix = restr2m, restrict.rhs = restr2q, inst = inst, singleEqSigma = TRUE, useMatrix = useMatrix ) print( summary( fit2sls4s ) ) nobs( fit2sls4s ) ## ***************** 2SLS with 2 restrictions (useDfSys=T) ************** print( summary( fit2sls4, useDfSys = TRUE ) ) nobs( fit2sls4 ) ## ***************** 2SLS with 2 restrictions (methodResidCov="noDfCor") ************** fit2sls4r <- systemfit( system, "2SLS", data = Kmenta, restrict.matrix = restr2m, restrict.rhs = restr2q, inst = inst, methodResidCov = "noDfCor", x = TRUE, useMatrix = useMatrix ) print( summary( fit2sls4r ) ) nobs( fit2sls4r ) ## ***** 2SLS with 2 restrictions (methodResidCov="noDfCor", singleEqSigma=T) ******* fit2sls4rs <- systemfit( system, "2SLS", data = Kmenta, restrict.matrix = restr2m, restrict.rhs = restr2q, inst = inst, methodResidCov = "noDfCor", singleEqSigma = TRUE, useMatrix = useMatrix ) print( summary( fit2sls4rs ) ) nobs( fit2sls4rs ) ## ************* 2SLS with 2 restrictions via R and restrict.regMat ****************** ## ******** 2SLS with 2 restrictions via R and restrict.regMat (default) ************* fit2sls5 <- systemfit( system, "2SLS", data = Kmenta, restrict.matrix = restr3m, restrict.rhs = restr3q, restrict.regMat = tc, inst = inst, useMatrix = useMatrix ) print( summary( fit2sls5 ) ) nobs( fit2sls5 ) # the same with symbolically specified restrictions fit2sls5Sym <- systemfit( system, "2SLS", data = Kmenta, restrict.matrix = restrict3, restrict.regMat = tc, inst = inst, useMatrix = useMatrix ) all.equal( fit2sls5, fit2sls5Sym ) nobs( fit2sls5Sym ) ## ******* 2SLS with 2 restrictions via R and restrict.regMat (singleEqSigma=T) ****** fit2sls5s <- systemfit( system, "2SLS", data = Kmenta, restrict.matrix = restr3m, restrict.rhs = restr3q, restrict.regMat = tc, inst = inst, singleEqSigma = TRUE, useMatrix = useMatrix ) print( summary( fit2sls5s ) ) nobs( fit2sls5s ) ## ********** 2SLS with 2 restrictions via R and restrict.regMat (useDfSys=T) ******* print( summary( fit2sls5, useDfSys = TRUE ) ) nobs( fit2sls5 ) ## ************* 2SLS with 2 restrictions via R and restrict.regMat (methodResidCov="noDfCor") ********* fit2sls5r <- systemfit( system, "2SLS", data = Kmenta, restrict.matrix = restr3m, restrict.rhs = restr3q, restrict.regMat = tc, inst = inst, methodResidCov = "noDfCor", useMatrix = useMatrix ) print( summary( fit2sls5r ) ) nobs( fit2sls5r ) ## ** 2SLS with 2 restrictions via R and restrict.regMat (methodResidCov="noDfCor", singleEqSigma=T) ** fit2sls5rs <- systemfit( system, "2SLS", data = Kmenta, restrict.matrix = restr3m, restrict.rhs = restr3q, restrict.regMat = tc, inst = inst, methodResidCov = "noDfCor", singleEqSigma = TRUE, x = TRUE, useMatrix = useMatrix ) print( summary( fit2sls5rs ) ) nobs( fit2sls5rs ) ## *********** 2SLS estimation with different instruments ************** ## ******* 2SLS estimation with different instruments (default) ********* fit2slsd1 <- systemfit( system, "2SLS", data = Kmenta, inst = instlist, useMatrix = useMatrix ) print( summary( fit2slsd1 ) ) nobs( fit2slsd1 ) ## *********** 2SLS estimation with different instruments (singleEqSigma=F)***** fit2slsd1s <- systemfit( system, "2SLS", data = Kmenta, inst = instlist, singleEqSigma = FALSE, useMatrix = useMatrix ) print( summary( fit2slsd1s ) ) nobs( fit2slsd1s ) ## ********* 2SLS estimation with different instruments (useDfSys=T) ******* print( summary( fit2slsd1, useDfSys = TRUE ) ) nobs( fit2slsd1 ) ## ********* 2SLS estimation with different instruments (methodResidCov="noDfCor") ****** fit2slsd1r <- systemfit( system, "2SLS", data = Kmenta, inst = instlist, methodResidCov = "noDfCor", useMatrix = useMatrix ) print( summary( fit2slsd1r ) ) nobs( fit2slsd1r ) ## 2SLS estimation with different instruments (methodResidCov="noDfCor",singleEqSigma=F) fit2slsd1r <- systemfit( system, "2SLS", data = Kmenta, inst = instlist, methodResidCov = "noDfCor", singleEqSigma = FALSE, useMatrix = useMatrix ) print( summary( fit2slsd1r ) ) nobs( fit2slsd1r ) ## **** 2SLS estimation with different instruments and restriction ******* ## ** 2SLS estimation with different instruments and restriction (default) **** fit2slsd2 <- systemfit( system, "2SLS", data = Kmenta, restrict.matrix = restrm, inst = instlist, useMatrix = useMatrix ) print( summary( fit2slsd2 ) ) nobs( fit2slsd2 ) ## 2SLS estimation with different instruments and restriction (singleEqSigma=T) fit2slsd2s <- systemfit( system, "2SLS", data = Kmenta, restrict.matrix = restrm, inst = instlist, singleEqSigma = TRUE, useMatrix = useMatrix ) print( summary( fit2slsd2s ) ) nobs( fit2slsd2s ) ## **** 2SLS estimation with different instruments and restriction (useDfSys=F) print( summary( fit2slsd2, useDfSys = FALSE ) ) nobs( fit2slsd2 ) ## **** 2SLS estimation with different instruments and restriction (methodResidCov="noDfCor") fit2slsd2r <- systemfit( system, "2SLS", data = Kmenta, restrict.matrix = restrm, inst = instlist, methodResidCov = "noDfCor", useMatrix = useMatrix ) print( summary( fit2slsd2r ) ) nobs( fit2slsd2r ) ## 2SLS estimation with different instr. and restr. (methodResidCov="noDfCor", singleEqSigma=T) fit2slsd2rs <- systemfit( system, "2SLS", data = Kmenta, restrict.matrix = restrm, inst = instlist, methodResidCov = "noDfCor", singleEqSigma = TRUE, useMatrix = useMatrix ) print( summary( fit2slsd2rs ) ) nobs( fit2slsd2rs ) ## **** 2SLS estimation with different instruments and restriction via restrict.regMat * ## 2SLS estimation with different instruments and restriction via restrict.regMat (default) fit2slsd3 <- systemfit( system, "2SLS", data = Kmenta, restrict.regMat = tc, inst = instlist, useMatrix = useMatrix ) print( summary( fit2slsd3 ) ) nobs( fit2slsd3 ) ## **** 2SLS estimation with different instr. and restr. via restrict.regMat (methodResidCov="noDfCor") fit2slsd3r <- systemfit( system, "2SLS", data = Kmenta, restrict.regMat = tc, inst = instlist, methodResidCov = "noDfCor", useMatrix = useMatrix ) print( summary( fit2slsd3r ) ) nobs( fit2slsd3r ) ## *********** estimations with a single regressor ************ fit2slsS1 <- systemfit( list( consump ~ price - 1, price ~ consump + trend ), "2SLS", data = Kmenta, inst = ~ farmPrice + trend + income, useMatrix = useMatrix ) print( summary( fit2slsS1 ) ) nobs( fit2slsS1 ) fit2slsS2 <- systemfit( list( consump ~ price - 1, consump ~ trend - 1 ), "2SLS", data = Kmenta, inst = ~ farmPrice + price + income, useMatrix = useMatrix ) print( summary( fit2slsS2 ) ) nobs( fit2slsS2 ) fit2slsS3 <- systemfit( list( consump ~ trend - 1, price ~ trend - 1 ), "2SLS", data = Kmenta, inst = instlist, useMatrix = useMatrix ) print( summary( fit2slsS3 ) ) nobs( fit2slsS3 ) fit2slsS4 <- systemfit( list( consump ~ trend - 1, price ~ trend - 1 ), "2SLS", data = Kmenta, inst = ~ farmPrice + trend + income, restrict.matrix = matrix( c( 1, -1 ), nrow = 1 ), useMatrix = useMatrix ) print( summary( fit2slsS4 ) ) nobs( fit2slsS4 ) fit2slsS5 <- systemfit( list( consump ~ 1, price ~ 1 ), "2SLS", data = Kmenta, inst = ~ farmPrice, useMatrix = useMatrix ) print( summary( fit2slsS1 ) ) ## **************** shorter summaries ********************** print( summary( fit2sls1, useDfSys = TRUE, residCov = FALSE ) ) print( summary( fit2sls1, equations = FALSE ) ) print( summary( fit2sls1rs, residCov = FALSE, equations = FALSE ) ) print( summary( fit2sls2Sym, useDfSys = FALSE ), equations = FALSE ) print( summary( fit2sls2 ), residCov = FALSE ) print( summary( fit2sls3, useDfSys = FALSE, residCov = FALSE, equations = FALSE ) ) print( summary( fit2sls4s ), equations = FALSE, residCov = FALSE ) print( summary( fit2sls5r, equations = FALSE, residCov = FALSE ) ) print( summary( fit2slsd1s ), residCov = FALSE, equations = FALSE ) print( summary( fit2slsd2, residCov = FALSE, equations = FALSE ) ) print( summary( fit2slsd3r ), residCov = FALSE, equations = FALSE ) ## ****************** residuals ************************** print( residuals( fit2sls1 ) ) print( residuals( fit2sls1$eq[[ 1 ]] ) ) print( residuals( fit2sls2s ) ) print( residuals( fit2sls2s$eq[[ 2 ]] ) ) print( residuals( fit2sls3 ) ) print( residuals( fit2sls3$eq[[ 1 ]] ) ) print( residuals( fit2sls4r ) ) print( residuals( fit2sls4r$eq[[ 2 ]] ) ) print( residuals( fit2sls5rs ) ) print( residuals( fit2sls5rs$eq[[ 1 ]] ) ) print( residuals( fit2slsd1 ) ) print( residuals( fit2slsd1$eq[[ 2 ]] ) ) print( residuals( fit2slsd2r ) ) print( residuals( fit2slsd2r$eq[[ 1 ]] ) ) ## *************** coefficients ********************* print( round( coef( fit2sls1s ), digits = 6 ) ) print( round( coef( fit2sls1s$eq[[ 1 ]] ), digits = 6 ) ) print( round( coef( fit2sls2 ), digits = 6 ) ) print( round( coef( fit2sls2$eq[[ 2 ]] ), digits = 6 ) ) print( round( coef( fit2sls3 ), digits = 6 ) ) print( round( coef( fit2sls3, modified.regMat = TRUE ), digits = 6 ) ) print( round( coef( fit2sls3$eq[[ 1 ]] ), digits = 6 ) ) print( round( coef( fit2sls4s ), digits = 6 ) ) print( round( coef( fit2sls4s$eq[[ 2 ]] ), digits = 6 ) ) print( round( coef( fit2sls5r ), digits = 6 ) ) print( round( coef( fit2sls5r, modified.regMat = TRUE ), digits = 6 ) ) print( round( coef( fit2sls5r$eq[[ 2 ]] ), digits = 6 ) ) ## *************** coefficients with stats ********************* print( round( coef( summary( fit2sls1s ) ), digits = 6 ) ) print( round( coef( summary( fit2sls1s$eq[[ 1 ]] ) ), digits = 6 ) ) print( round( coef( summary( fit2sls2, useDfSys = FALSE ) ), digits = 6 ) ) print( round( coef( summary( fit2sls2$eq[[ 2 ]], useDfSys = FALSE ) ), digits = 6 ) ) print( round( coef( summary( fit2sls3 ) ), digits = 6 ) ) print( round( coef( summary( fit2sls3 ), modified.regMat = TRUE ), digits = 6 ) ) print( round( coef( summary( fit2sls3$eq[[ 1 ]] ) ), digits = 6 ) ) print( round( coef( summary( fit2sls4s ) ), digits = 6 ) ) print( round( coef( summary( fit2sls4s$eq[[ 2 ]] ) ), digits = 6 ) ) print( round( coef( summary( fit2sls5r, useDfSys = FALSE ) ), digits = 6 ) ) print( round( coef( summary( fit2sls5r, useDfSys = FALSE ), modified.regMat = TRUE ), digits = 6 ) ) print( round( coef( summary( fit2sls5r$eq[[ 2 ]], useDfSys = FALSE ) ), digits = 6 ) ) ## *********** variance covariance matrix of the coefficients ******* print( round( vcov( fit2sls1s ), digits = 6 ) ) print( round( vcov( fit2sls1s$eq[[ 1 ]] ), digits = 6 ) ) print( round( vcov( fit2sls1r ), digits = 6 ) ) print( round( vcov( fit2sls1r$eq[[ 2 ]] ), digits = 6 ) ) print( round( vcov( fit2sls2 ), digits = 6 ) ) print( round( vcov( fit2sls2$eq[[ 1 ]] ), digits = 6 ) ) print( round( vcov( fit2sls3 ), digits = 6 ) ) print( round( vcov( fit2sls3, modified.regMat = TRUE ), digits = 6 ) ) print( round( vcov( fit2sls3$eq[[ 2 ]] ), digits = 6 ) ) print( round( vcov( fit2sls4s ), digits = 6 ) ) print( round( vcov( fit2sls4s$eq[[ 1 ]] ), digits = 6 ) ) print( round( vcov( fit2sls5r ), digits = 6 ) ) print( round( vcov( fit2sls5r, modified.regMat = TRUE ), digits = 6 ) ) print( round( vcov( fit2sls5r$eq[[ 2 ]] ), digits = 6 ) ) print( round( vcov( fit2slsd1 ), digits = 6 ) ) print( round( vcov( fit2slsd1$eq[[ 1 ]] ), digits = 6 ) ) print( round( vcov( fit2slsd2rs ), digits = 6 ) ) print( round( vcov( fit2slsd2rs$eq[[ 2 ]] ), digits = 6 ) ) print( round( vcov( fit2slsd3 ), digits = 6 ) ) print( round( vcov( fit2slsd3, modified.regMat = TRUE ), digits = 6 ) ) print( round( vcov( fit2slsd3$eq[[ 1 ]] ), digits = 6 ) ) ## *********** confidence intervals of coefficients ************* print( confint( fit2sls1 ) ) print( confint( fit2sls1$eq[[ 1 ]], level = 0.9 ) ) print( confint( fit2sls2s, level = 0.9 ) ) print( confint( fit2sls2s$eq[[ 2 ]], level = 0.99 ) ) print( confint( fit2sls3, level = 0.99, useDfSys = TRUE ) ) print( confint( fit2sls3$eq[[ 1 ]], level = 0.5, useDfSys = TRUE ) ) print( confint( fit2sls4r, level = 0.5 ) ) print( confint( fit2sls4r$eq[[ 2 ]], level = 0.25 ) ) print( confint( fit2sls5rs, level = 0.25 ) ) print( confint( fit2sls5rs$eq[[ 1 ]], level = 0.975 ) ) print( confint( fit2slsd1, level = 0.975, useDfSys = TRUE ) ) print( confint( fit2slsd1$eq[[ 2 ]], level = 0.999, useDfSys = TRUE ) ) print( confint( fit2slsd2r, level = 0.999 ) ) print( confint( fit2slsd2r$eq[[ 1 ]] ) ) ## *********** fitted values ************* print( fitted( fit2sls1, se.fit = TRUE, interval = "prediction" ) ) print( fitted( fit2sls1$eq[[ 1 ]] ) ) print( fitted( fit2sls2s ) ) print( fitted( fit2sls2s$eq[[ 2 ]] ) ) print( fitted( fit2sls3 ) ) print( fitted( fit2sls3$eq[[ 1 ]] ) ) print( fitted( fit2sls4r ) ) print( fitted( fit2sls4r$eq[[ 2 ]] ) ) print( fitted( fit2sls5rs ) ) print( fitted( fit2sls5rs$eq[[ 1 ]] ) ) print( fitted( fit2slsd1 ) ) print( fitted( fit2slsd1$eq[[ 2 ]] ) ) print( fitted( fit2slsd2r ) ) print( fitted( fit2slsd2r$eq[[ 1 ]] ) ) ## *********** predicted values ************* predictData <- Kmenta predictData$consump <- NULL predictData$price <- Kmenta$price * 0.9 predictData$income <- Kmenta$income * 1.1 print( predict( fit2sls1, se.fit = TRUE, interval = "prediction" ) ) print( predict( fit2sls1$eq[[ 1 ]], se.fit = TRUE, interval = "prediction" ) ) print( predict( fit2sls2s, se.pred = TRUE, interval = "confidence", level = 0.999, newdata = predictData ) ) print( predict( fit2sls2s$eq[[ 2 ]], se.pred = TRUE, interval = "confidence", level = 0.999, newdata = predictData ) ) print( predict( fit2sls3, se.pred = TRUE, interval = "prediction", level = 0.975, useDfSys = TRUE ) ) print( predict( fit2sls3$eq[[ 1 ]], se.pred = TRUE, interval = "prediction", level = 0.975, useDfSys = TRUE ) ) print( predict( fit2sls4r, se.fit = TRUE, interval = "confidence", level = 0.25 ) ) print( predict( fit2sls4r$eq[[ 2 ]], se.fit = TRUE, interval = "confidence", level = 0.25 ) ) print( predict( fit2sls5rs, se.fit = TRUE, se.pred = TRUE, interval = "prediction", level = 0.5, newdata = predictData ) ) print( predict( fit2sls5rs$eq[[ 1 ]], se.fit = TRUE, se.pred = TRUE, interval = "prediction", level = 0.5, newdata = predictData ) ) print( predict( fit2slsd1, se.fit = TRUE, se.pred = TRUE, interval = "confidence", level = 0.99, useDfSys = TRUE ) ) print( predict( fit2slsd1$eq[[ 2 ]], se.fit = TRUE, se.pred = TRUE, interval = "confidence", level = 0.99, useDfSys = TRUE ) ) print( predict( fit2slsd2r, se.fit = TRUE, interval = "prediction", level = 0.9, newdata = predictData ) ) print( predict( fit2slsd2r$eq[[ 1 ]], se.fit = TRUE, interval = "prediction", level = 0.9, newdata = predictData ) ) # predict just one observation smallData <- data.frame( price = 130, income = 150, farmPrice = 120, trend = 25 ) print( predict( fit2sls1rs, newdata = smallData ) ) print( predict( fit2sls1rs$eq[[ 1 ]], newdata = smallData ) ) print( predict( fit2sls2, se.fit = TRUE, level = 0.9, newdata = smallData ) ) print( predict( fit2sls2$eq[[ 1 ]], se.pred = TRUE, level = 0.99, newdata = smallData ) ) print( predict( fit2sls3, interval = "prediction", level = 0.975, newdata = smallData ) ) print( predict( fit2sls3$eq[[ 1 ]], interval = "confidence", level = 0.8, newdata = smallData ) ) print( predict( fit2sls4r, se.fit = TRUE, interval = "confidence", level = 0.999, newdata = smallData ) ) print( predict( fit2sls4r$eq[[ 2 ]], se.pred = TRUE, interval = "prediction", level = 0.75, newdata = smallData ) ) print( predict( fit2sls5s, se.fit = TRUE, interval = "prediction", newdata = smallData ) ) print( predict( fit2sls5s$eq[[ 1 ]], se.pred = TRUE, interval = "confidence", newdata = smallData ) ) print( predict( fit2slsd3, se.fit = TRUE, se.pred = TRUE, interval = "prediction", level = 0.5, newdata = smallData ) ) print( predict( fit2slsd3$eq[[ 1 ]], se.fit = TRUE, se.pred = TRUE, interval = "confidence", level = 0.25, newdata = smallData ) ) ## ************ correlation of predicted values *************** print( correlation.systemfit( fit2sls1, 1, 2 ) ) print( correlation.systemfit( fit2sls2s, 2, 1 ) ) print( correlation.systemfit( fit2sls3, 1, 2 ) ) print( correlation.systemfit( fit2sls4r, 2, 1 ) ) print( correlation.systemfit( fit2sls5rs, 1, 2 ) ) print( correlation.systemfit( fit2slsd1, 2, 1 ) ) print( correlation.systemfit( fit2slsd2r, 1, 2 ) ) ## ************ Log-Likelihood values *************** print( logLik( fit2sls1 ) ) print( logLik( fit2sls1, residCovDiag = TRUE ) ) print( logLik( fit2sls2s ) ) print( logLik( fit2sls2s, residCovDiag = TRUE ) ) print( logLik( fit2sls3 ) ) print( logLik( fit2sls3, residCovDiag = TRUE ) ) print( logLik( fit2sls4r ) ) print( logLik( fit2sls4r, residCovDiag = TRUE ) ) print( logLik( fit2sls5rs ) ) print( logLik( fit2sls5rs, residCovDiag = TRUE ) ) print( logLik( fit2slsd1 ) ) print( logLik( fit2slsd1, residCovDiag = TRUE ) ) print( logLik( fit2slsd2r ) ) print( logLik( fit2slsd2r, residCovDiag = TRUE ) ) ## ************** F tests **************** # testing first restriction print( linearHypothesis( fit2sls1, restrm ) ) linearHypothesis( fit2sls1, restrict ) print( linearHypothesis( fit2sls1s, restrm ) ) linearHypothesis( fit2sls1s, restrict ) print( linearHypothesis( fit2sls1, restrm ) ) linearHypothesis( fit2sls1, restrict ) print( linearHypothesis( fit2sls1r, restrm ) ) linearHypothesis( fit2sls1r, restrict ) # testing second restriction restrOnly2m <- matrix(0,1,7) restrOnly2q <- 0.5 restrOnly2m[1,2] <- -1 restrOnly2m[1,5] <- 1 restrictOnly2 <- "- demand_price + supply_price = 0.5" # first restriction not imposed print( linearHypothesis( fit2sls1, restrOnly2m, restrOnly2q ) ) linearHypothesis( fit2sls1, restrictOnly2 ) # first restriction imposed print( linearHypothesis( fit2sls2, restrOnly2m, restrOnly2q ) ) linearHypothesis( fit2sls2, restrictOnly2 ) print( linearHypothesis( fit2sls2r, restrOnly2m, restrOnly2q ) ) linearHypothesis( fit2sls2r, restrictOnly2 ) print( linearHypothesis( fit2sls3, restrOnly2m, restrOnly2q ) ) linearHypothesis( fit2sls3, restrictOnly2 ) # testing both of the restrictions print( linearHypothesis( fit2sls1, restr2m, restr2q ) ) linearHypothesis( fit2sls1, restrict2 ) ## ************** Wald tests **************** # testing first restriction print( linearHypothesis( fit2sls1, restrm, test = "Chisq" ) ) linearHypothesis( fit2sls1, restrict, test = "Chisq" ) print( linearHypothesis( fit2sls1s, restrm, test = "Chisq" ) ) linearHypothesis( fit2sls1s, restrict, test = "Chisq" ) print( linearHypothesis( fit2sls1, restrm, test = "Chisq" ) ) linearHypothesis( fit2sls1, restrict, test = "Chisq" ) print( linearHypothesis( fit2sls1r, restrm, test = "Chisq" ) ) linearHypothesis( fit2sls1r, restrict, test = "Chisq" ) # testing second restriction # first restriction not imposed print( linearHypothesis( fit2sls1, restrOnly2m, restrOnly2q, test = "Chisq" ) ) linearHypothesis( fit2sls1, restrictOnly2, test = "Chisq" ) # first restriction imposed print( linearHypothesis( fit2sls2, restrOnly2m, restrOnly2q, test = "Chisq" ) ) linearHypothesis( fit2sls2, restrictOnly2, test = "Chisq" ) print( linearHypothesis( fit2sls2r, restrOnly2m, restrOnly2q, test = "Chisq" ) ) linearHypothesis( fit2sls2r, restrictOnly2, test = "Chisq" ) print( linearHypothesis( fit2sls3, restrOnly2m, restrOnly2q, test = "Chisq" ) ) linearHypothesis( fit2sls3, restrictOnly2, test = "Chisq" ) # testing both of the restrictions print( linearHypothesis( fit2sls1, restr2m, restr2q, test = "Chisq" ) ) linearHypothesis( fit2sls1, restrict2, test = "Chisq" ) ## **************** model frame ************************ print( mf <- model.frame( fit2sls1 ) ) print( mf1 <- model.frame( fit2sls1$eq[[ 1 ]] ) ) print( attributes( mf1 )$terms ) print( mf2 <- model.frame( fit2sls1$eq[[ 2 ]] ) ) print( attributes( mf2 )$terms ) print( all.equal( mf, model.frame( fit2sls2s ) ) ) print( all.equal( mf2, model.frame( fit2sls2s$eq[[ 2 ]] ) ) ) print( all.equal( mf, model.frame( fit2sls3 ) ) ) print( all.equal( mf1, model.frame( fit2sls3$eq[[ 1 ]] ) ) ) print( all.equal( mf, model.frame( fit2sls4r ) ) ) print( all.equal( mf2, model.frame( fit2sls4r$eq[[ 2 ]] ) ) ) print( all.equal( mf, model.frame( fit2sls5rs ) ) ) print( all.equal( mf1, model.frame( fit2sls5rs$eq[[ 1 ]] ) ) ) fit2sls1$eq[[ 1 ]]$modelInst fit2sls1$eq[[ 2 ]]$modelInst fit2sls2s$eq[[ 1 ]]$modelInst fit2sls2s$eq[[ 2 ]]$modelInst fit2sls5rs$eq[[ 1 ]]$modelInst fit2sls5rs$eq[[ 2 ]]$modelInst ## **************** model matrix ************************ # with x (returnModelMatrix) = TRUE print( !is.null( fit2sls1$eq[[ 1 ]]$x ) ) print( mm <- model.matrix( fit2sls1 ) ) print( mm1 <- model.matrix( fit2sls1$eq[[ 1 ]] ) ) print( mm2 <- model.matrix( fit2sls1$eq[[ 2 ]] ) ) # with x (returnModelMatrix) = FALSE print( all.equal( mm, model.matrix( fit2sls1s ) ) ) print( all.equal( mm1, model.matrix( fit2sls1s$eq[[ 1 ]] ) ) ) print( all.equal( mm2, model.matrix( fit2sls1s$eq[[ 2 ]] ) ) ) print( !is.null( fit2sls1s$eq[[ 1 ]]$x ) ) # with x (returnModelMatrix) = TRUE print( !is.null( fit2sls2s$eq[[ 1 ]]$x ) ) print( all.equal( mm, model.matrix( fit2sls2s ) ) ) print( all.equal( mm1, model.matrix( fit2sls2s$eq[[ 1 ]] ) ) ) print( all.equal( mm2, model.matrix( fit2sls2s$eq[[ 2 ]] ) ) ) # with x (returnModelMatrix) = FALSE print( all.equal( mm, model.matrix( fit2sls2Sym ) ) ) print( all.equal( mm1, model.matrix( fit2sls2Sym$eq[[ 1 ]] ) ) ) print( all.equal( mm2, model.matrix( fit2sls2Sym$eq[[ 2 ]] ) ) ) print( !is.null( fit2sls2Sym$eq[[ 1 ]]$x ) ) # with x (returnModelMatrix) = FALSE print( all.equal( mm, model.matrix( fit2sls3 ) ) ) print( all.equal( mm1, model.matrix( fit2sls3$eq[[ 1 ]] ) ) ) print( all.equal( mm2, model.matrix( fit2sls3$eq[[ 2 ]] ) ) ) print( !is.null( fit2sls3$eq[[ 1 ]]$x ) ) # with x (returnModelMatrix) = TRUE print( !is.null( fit2sls4r$eq[[ 1 ]]$x ) ) print( all.equal( mm, model.matrix( fit2sls4r ) ) ) print( all.equal( mm1, model.matrix( fit2sls4r$eq[[ 1 ]] ) ) ) print( all.equal( mm2, model.matrix( fit2sls4r$eq[[ 2 ]] ) ) ) # with x (returnModelMatrix) = FALSE print( all.equal( mm, model.matrix( fit2sls4s ) ) ) print( all.equal( mm1, model.matrix( fit2sls4s$eq[[ 1 ]] ) ) ) print( all.equal( mm2, model.matrix( fit2sls4s$eq[[ 2 ]] ) ) ) print( !is.null( fit2sls4s$eq[[ 1 ]]$x ) ) # with x (returnModelMatrix) = TRUE print( !is.null( fit2sls5rs$eq[[ 1 ]]$x ) ) print( all.equal( mm, model.matrix( fit2sls5rs ) ) ) print( all.equal( mm1, model.matrix( fit2sls5rs$eq[[ 1 ]] ) ) ) print( all.equal( mm2, model.matrix( fit2sls5rs$eq[[ 2 ]] ) ) ) # with x (returnModelMatrix) = FALSE print( all.equal( mm, model.matrix( fit2sls5r ) ) ) print( all.equal( mm1, model.matrix( fit2sls5r$eq[[ 1 ]] ) ) ) print( all.equal( mm2, model.matrix( fit2sls5r$eq[[ 2 ]] ) ) ) print( !is.null( fit2sls5r$eq[[ 1 ]]$x ) ) # matrices of instrumental variables model.matrix( fit2sls1, which = "z" ) model.matrix( fit2sls1$eq[[ 1 ]], which = "z" ) model.matrix( fit2sls1$eq[[ 2 ]], which = "z" ) # matrices of fitted regressors model.matrix( fit2sls5r, which = "xHat" ) model.matrix( fit2sls5r$eq[[ 1 ]], which = "xHat" ) model.matrix( fit2sls5r$eq[[ 2 ]], which = "xHat" ) ## **************** formulas ************************ formula( fit2sls1 ) formula( fit2sls1$eq[[ 1 ]] ) formula( fit2sls2s ) formula( fit2sls2s$eq[[ 2 ]] ) formula( fit2sls3 ) formula( fit2sls3$eq[[ 1 ]] ) formula( fit2sls4r ) formula( fit2sls4r$eq[[ 2 ]] ) formula( fit2sls5rs ) formula( fit2sls5rs$eq[[ 1 ]] ) formula( fit2slsd1 ) formula( fit2slsd1$eq[[ 2 ]] ) formula( fit2slsd2r ) formula( fit2slsd2r$eq[[ 1 ]] ) ## **************** model terms ******************* terms( fit2sls1 ) terms( fit2sls1$eq[[ 1 ]] ) terms( fit2sls2s ) terms( fit2sls2s$eq[[ 2 ]] ) terms( fit2sls3 ) terms( fit2sls3$eq[[ 1 ]] ) terms( fit2sls4r ) terms( fit2sls4r$eq[[ 2 ]] ) terms( fit2sls5rs ) terms( fit2sls5rs$eq[[ 1 ]] ) terms( fit2slsd1 ) terms( fit2slsd1$eq[[ 2 ]] ) terms( fit2slsd2r ) terms( fit2slsd2r$eq[[ 1 ]] ) ## **************** terms of instruments ******************* fit2sls1$eq[[ 1 ]]$termsInst fit2sls2s$eq[[ 2 ]]$termsInst fit2sls3$eq[[ 1 ]]$termsInst fit2sls4r$eq[[ 2 ]]$termsInst fit2sls5rs$eq[[ 1 ]]$termsInst fit2slsd1$eq[[ 2 ]]$termsInst fit2slsd2r$eq[[ 1 ]]$termsInst ## **************** estfun ************************ library( "sandwich" ) estfun( fit2sls1 ) round( colSums( estfun( fit2sls1 ) ), digits = 7 ) estfun( fit2sls1s ) round( colSums( estfun( fit2sls1s ) ), digits = 7 ) estfun( fit2sls1r ) round( colSums( estfun( fit2sls1r ) ), digits = 7 ) ## **************** bread ************************ bread( fit2sls1 ) bread( fit2sls1s ) bread( fit2sls1r ) systemfit/tests/test_hausman.R0000644000176200001440000001326712535351012016267 0ustar liggesuserslibrary( "systemfit" ) options( digits = 5 ) data( "Kmenta" ) useMatrix <- FALSE eqDemand <- consump ~ price + income eqSupply <- consump ~ price + farmPrice + trend inst <- ~ income + farmPrice + trend eqSystem <- list( demand = eqDemand, supply = eqSupply ) restrm <- matrix(0,1,7) # restriction matrix "R" restrm[1,3] <- 1 restrm[1,7] <- -1 restr2m <- matrix(0,2,7) # restriction matrix "R" 2 restr2m[1,3] <- 1 restr2m[1,7] <- -1 restr2m[2,2] <- -1 restr2m[2,5] <- 1 restr2q <- c( 0, 0.5 ) # restriction vector "q" 2 tc <- matrix(0,7,6) tc[1,1] <- 1 tc[2,2] <- 1 tc[3,3] <- 1 tc[4,4] <- 1 tc[5,5] <- 1 tc[6,6] <- 1 tc[7,3] <- 1 restr3m <- matrix(0,1,6) # restriction matrix "R" 2 restr3m[1,2] <- -1 restr3m[1,5] <- 1 restr3q <- c( 0.5 ) # restriction vector "q" 2 ## ******************* unrestricted estimation ***************** ## ******************** default estimation ********************* fit2sls1 <- systemfit( eqSystem, "2SLS", data = Kmenta, inst = inst, useMatrix = useMatrix ) fit3sls1 <- systemfit( eqSystem, "3SLS", data = Kmenta, inst = inst, useMatrix = useMatrix ) print( hausman.systemfit( fit2sls1, fit3sls1 ) ) ## ************** 2SLS estimation with singleEqSigma = FALSE ***************** fit2sls1s <- systemfit( eqSystem, "2SLS", data = Kmenta, inst = inst, singleEqSigma = FALSE, useMatrix = useMatrix ) print( hausman.systemfit( fit2sls1s, fit3sls1 ) ) ## ******************* estimations with methodResidCov = 0 ***************** fit2sls1r <- systemfit( eqSystem, "2SLS", data = Kmenta, inst = inst, methodResidCov = "noDfCor", useMatrix = useMatrix ) fit3sls1r <- systemfit( eqSystem, "3SLS", data = Kmenta, inst = inst, methodResidCov = "noDfCor", useMatrix = useMatrix ) print( hausman.systemfit( fit2sls1r, fit3sls1r ) ) ## ********************* estimation with restriction ******************** ## *********************** default estimation *********************** fit2sls2 <- systemfit( eqSystem, "2SLS", data = Kmenta, restrict.matrix = restrm, inst = inst, useMatrix = useMatrix ) fit3sls2 <- systemfit( eqSystem, "3SLS", data = Kmenta, restrict.matrix = restrm, inst = inst, useMatrix = useMatrix ) # print( hausman.systemfit( fit2sls2, fit3sls2 ) ) ## ************* 2SLS estimation with singleEqSigma = TRUE ***************** fit2sls2s <- systemfit( eqSystem, "2SLS", data = Kmenta, restrict.matrix = restrm, inst = inst, singleEqSigma = TRUE, useMatrix = useMatrix ) # print( hausman.systemfit( fit2sls2s, fit3sls2 ) ) ## ********************* estimations with methodResidCov = 0 ************** fit2sls2r <- systemfit( eqSystem, "2SLS", data = Kmenta, restrict.matrix = restrm, inst = inst, methodResidCov = "noDfCor", useMatrix = useMatrix ) fit3sls2r <- systemfit( eqSystem, "3SLS", data = Kmenta, restrict.matrix = restrm, inst = inst, methodResidCov = "noDfCor", useMatrix = useMatrix ) # print( hausman.systemfit( fit2sls2r, fit3sls2r ) ) ## ****************** estimation with restriction via restrict.regMat ****************** ## ********************** default estimation ******************** fit2sls3 <- systemfit( eqSystem, "2SLS", data = Kmenta, restrict.regMat = tc, inst = inst, useMatrix = useMatrix ) fit3sls3 <- systemfit( eqSystem, "3SLS", data = Kmenta, restrict.regMat = tc, inst = inst, useMatrix = useMatrix ) print( hausman.systemfit( fit2sls3, fit3sls3 ) ) ## ******************* estimations with methodResidCov = 0 ******* fit2sls3r <- systemfit( eqSystem, "2SLS", data = Kmenta, restrict.regMat = tc, inst = inst, methodResidCov = "noDfCor", useMatrix = useMatrix ) fit3sls3r <- systemfit( eqSystem, "3SLS", data = Kmenta, restrict.regMat = tc, inst = inst, methodResidCov = "noDfCor", useMatrix = useMatrix ) print( hausman.systemfit( fit2sls3r, fit3sls3r ) ) ## ***************** estimations with 2 restrictions ******************* ## *********************** default estimations ************** fit2sls4 <- systemfit( eqSystem, "2SLS", data = Kmenta, restrict.matrix = restr2m, restrict.rhs = restr2q, inst = inst, useMatrix = useMatrix ) fit3sls4 <- systemfit( eqSystem, "3SLS", data = Kmenta, restrict.matrix = restr2m, restrict.rhs = restr2q, inst = inst, useMatrix = useMatrix ) # print( hausman.systemfit( fit2sls4, fit3sls4 ) ) ## ***************** estimations with methodResidCov = 0 ************** fit2sls4r <- systemfit( eqSystem, "2SLS", data = Kmenta, restrict.matrix = restr2m, restrict.rhs = restr2q, inst = inst, methodResidCov = "noDfCor", useMatrix = useMatrix ) fit3sls4r <- systemfit( eqSystem, "3SLS", data = Kmenta, restrict.matrix = restr2m, restrict.rhs = restr2q, inst = inst, methodResidCov = "noDfCor", useMatrix = useMatrix ) # print( hausman.systemfit( fit2sls4r, fit3sls4r ) ) ## *********** estimations with 2 restrictions via R and restrict.regMat *************** ## ***************** default estimations ******************* fit2sls5 <- systemfit( eqSystem, "2SLS", data = Kmenta, restrict.matrix = restr3m, restrict.rhs = restr3q, restrict.regMat = tc, inst = inst, useMatrix = useMatrix ) fit3sls5 <- systemfit( eqSystem, "3SLS", data = Kmenta, restrict.matrix = restr3m, restrict.rhs = restr3q, restrict.regMat = tc, inst = inst, useMatrix = useMatrix ) # print( hausman.systemfit( fit2sls5, fit3sls5 ) ) ## ************* estimations with methodResidCov = 0 ********* fit2sls5r <- systemfit( eqSystem, "2SLS", data = Kmenta, restrict.matrix = restr3m, restrict.rhs = restr3q, restrict.regMat = tc, inst = inst, methodResidCov = "noDfCor", useMatrix = useMatrix ) fit3sls5r <- systemfit( eqSystem, "3SLS", data = Kmenta, restrict.matrix = restr3m, restrict.rhs = restr3q, restrict.regMat = tc, inst = inst, methodResidCov = "noDfCor", useMatrix = useMatrix ) # print( hausman.systemfit( fit2sls5r, fit3sls5r ) ) systemfit/tests/test_w2sls.R0000644000176200001440000006321512565331615015715 0ustar liggesuserslibrary( systemfit ) options( digits = 3 ) data( "Kmenta" ) useMatrix <- FALSE demand <- consump ~ price + income supply <- consump ~ price + farmPrice + trend inst <- ~ income + farmPrice + trend inst1 <- ~ income + farmPrice instlist <- list( inst1, inst ) system <- list( demand = demand, supply = supply ) restrm <- matrix(0,1,7) # restriction matrix "R" restrm[1,3] <- 1 restrm[1,7] <- -1 restrict <- "demand_income - supply_trend = 0" restr2m <- matrix(0,2,7) # restriction matrix "R" 2 restr2m[1,3] <- 1 restr2m[1,7] <- -1 restr2m[2,2] <- -1 restr2m[2,5] <- 1 restr2q <- c( 0, 0.5 ) # restriction vector "q" 2 restrict2 <- c( "demand_income - supply_trend = 0", "- demand_price + supply_price = 0.5" ) tc <- matrix(0,7,6) tc[1,1] <- 1 tc[2,2] <- 1 tc[3,3] <- 1 tc[4,4] <- 1 tc[5,5] <- 1 tc[6,6] <- 1 tc[7,3] <- 1 restr3m <- matrix(0,1,6) # restriction matrix "R" 2 restr3m[1,2] <- -1 restr3m[1,5] <- 1 restr3q <- c( 0.5 ) # restriction vector "q" 2 restrict3 <- "- C2 + C5 = 0.5" ## ********************* W2SLS ***************** fitw2sls1 <- systemfit( system, "W2SLS", data = Kmenta, inst = inst, useMatrix = useMatrix ) print( summary( fitw2sls1 ) ) ## ********************* W2SLS (EViews-like) ***************** fitw2sls1e <- systemfit( system, "W2SLS", data = Kmenta, inst = inst, methodResidCov = "noDfCor", x = TRUE, useMatrix = useMatrix ) print( summary( fitw2sls1e, useDfSys = TRUE ) ) ## ********************* W2SLS with restriction ******************* fitw2sls2 <- systemfit( system, "W2SLS", data = Kmenta, restrict.matrix = restrm, inst = inst, useMatrix = useMatrix ) print( summary( fitw2sls2 ) ) # the same with symbolically specified restrictions fitw2sls2Sym <- systemfit( system, "W2SLS", data = Kmenta, restrict.matrix = restrict, inst = inst, useMatrix = useMatrix ) all.equal( fitw2sls2, fitw2sls2Sym ) ## ********************* W2SLS with restriction (EViews-like) ************** fitw2sls2e <- systemfit( system, "W2SLS", data = Kmenta, restrict.matrix = restrm, inst = inst, methodResidCov = "noDfCor", x = TRUE, useMatrix = useMatrix ) print( summary( fitw2sls2e, useDfSys = TRUE ) ) nobs( fitw2sls2e ) ## ********************* W2SLS with restriction via restrict.regMat ******************* fitw2sls3 <- systemfit( system, "W2SLS", data = Kmenta, restrict.regMat = tc, inst = inst, x = TRUE, useMatrix = useMatrix ) print( summary( fitw2sls3 ) ) ## ********************* W2SLS with restriction via restrict.regMat (EViews-like) ************** fitw2sls3e <- systemfit( system, "W2SLS", data = Kmenta, restrict.regMat = tc, inst = inst, methodResidCov = "noDfCor", useMatrix = useMatrix ) print( summary( fitw2sls3e, useDfSys = TRUE ) ) ## ***************** W2SLS with 2 restrictions ******************** fitw2sls4 <- systemfit( system, "W2SLS", data = Kmenta, restrict.matrix = restr2m, restrict.rhs = restr2q, inst = inst, x = TRUE, useMatrix = useMatrix ) print( summary( fitw2sls4 ) ) # the same with symbolically specified restrictions fitw2sls4Sym <- systemfit( system, "W2SLS", data = Kmenta, restrict.matrix = restrict2, inst = inst, x = TRUE, useMatrix = useMatrix ) all.equal( fitw2sls4, fitw2sls4Sym ) ## ***************** W2SLS with 2 restrictions (EViews-like) ************** fitw2sls4e <- systemfit( system, "W2SLS", data = Kmenta, restrict.matrix = restr2m, restrict.rhs = restr2q, inst = inst, methodResidCov = "noDfCor", useMatrix = useMatrix ) print( summary( fitw2sls4e, useDfSys = TRUE ) ) ## ***************** W2SLS with 2 restrictions via R and restrict.regMat ****************** fitw2sls5 <- systemfit( system, "W2SLS", data = Kmenta, restrict.matrix = restr3m, restrict.rhs = restr3q, restrict.regMat = tc, inst = inst, x = TRUE, useMatrix = useMatrix ) print( summary( fitw2sls5 ) ) # the same with symbolically specified restrictions fitw2sls5Sym <- systemfit( system, "W2SLS", data = Kmenta, restrict.matrix = restrict3, restrict.regMat = tc, inst = inst, x = TRUE, useMatrix = useMatrix ) all.equal( fitw2sls5, fitw2sls5Sym ) ## ***************** W2SLS with 2 restrictions via R and restrict.regMat (EViews-like) ************** fitw2sls5e <- systemfit( system, "W2SLS", data = Kmenta, restrict.matrix = restr3m, restrict.rhs = restr3q, restrict.regMat = tc, inst = inst, methodResidCov = "noDfCor", useMatrix = useMatrix ) print( summary( fitw2sls5e, useDfSys = TRUE ) ) ## ****** 2SLS estimation with different instruments ********************** fitw2slsd1 <- systemfit( system, "W2SLS", data = Kmenta, inst = instlist, useMatrix = useMatrix ) print( summary( fitw2slsd1 ) ) ## ****** 2SLS estimation with different instruments (EViews-like)****************** fitw2slsd1e <- systemfit( system, "W2SLS", data = Kmenta, inst = instlist, methodResidCov = "noDfCor", x = TRUE, useMatrix = useMatrix ) print( summary( fitw2slsd1e, useDfSys = TRUE ) ) ## **** W2SLS estimation with different instruments and restriction ******** fitw2slsd2 <- systemfit( system, "W2SLS", data = Kmenta, restrict.matrix = restrm, inst = instlist, useMatrix = useMatrix ) print( summary( fitw2slsd2 ) ) ## **** W2SLS estimation with different instruments and restriction (EViews-like)* fitw2slsd2e <- systemfit( system, "W2SLS", data = Kmenta, restrict.matrix = restrm, inst = instlist, methodResidCov = "noDfCor", x = TRUE, useMatrix = useMatrix ) print( summary( fitw2slsd2e, useDfSys = TRUE ) ) ## ** W2SLS estimation with different instruments and restriction via restrict.regMat **** fitw2slsd3 <- systemfit( system, "W2SLS", data = Kmenta, restrict.regMat = tc, inst = instlist, x = TRUE, useMatrix = useMatrix ) print( summary( fitw2slsd3 ) ) ## W2SLS estimation with different instruments and restriction via restrict.regMat (EViews-like) fitw2slsd3e <- systemfit( system, "W2SLS", data = Kmenta, restrict.regMat = tc, inst = instlist, methodResidCov = "noDfCor", useMatrix = useMatrix ) print( summary( fitw2slsd3e, useDfSys = TRUE ) ) ## *********** estimations with a single regressor ************ fitw2slsS1 <- systemfit( list( consump ~ price - 1, price ~ consump + trend ), "W2SLS", data = Kmenta, inst = ~ farmPrice + trend + income, useMatrix = useMatrix ) print( summary( fitw2slsS1 ) ) fitw2slsS2 <- systemfit( list( consump ~ price - 1, consump ~ trend - 1 ), "W2SLS", data = Kmenta, inst = ~ farmPrice + price + income, useMatrix = useMatrix ) print( summary( fitw2slsS2 ) ) fitw2slsS3 <- systemfit( list( consump ~ trend - 1, price ~ trend - 1 ), "W2SLS", data = Kmenta, inst = instlist, useMatrix = useMatrix ) print( summary( fitw2slsS3 ) ) fitw2slsS4 <- systemfit( list( consump ~ trend - 1, price ~ trend - 1 ), "W2SLS", data = Kmenta, inst = ~ farmPrice + trend + income, restrict.matrix = matrix( c( 1, -1 ), nrow = 1 ), useMatrix = useMatrix ) print( summary( fitw2slsS4 ) ) fitw2slsS5 <- systemfit( list( consump ~ 1, price ~ 1 ), "W2SLS", data = Kmenta, inst = instlist, useMatrix = useMatrix ) print( summary( fitw2slsS5 ) ) ## **************** shorter summaries ********************** print( summary( fitw2sls1e, residCov = FALSE ) ) print( summary( fitw2sls2, residCov = FALSE, equations = FALSE ) ) print( summary( fitw2sls3, useDfSys = FALSE ), equations = FALSE ) print( summary( fitw2sls4e ), residCov = FALSE ) print( summary( fitw2sls5, useDfSys = FALSE, residCov = FALSE ) ) print( summary( fitw2slsd1, useDfSys = TRUE ), residCov = FALSE, equations = FALSE ) print( summary( fitw2slsd2e, equations = TRUE ), equations = FALSE ) print( summary( fitw2slsd3e, equations = FALSE ), residCov = FALSE ) ## ****************** residuals ************************** print( residuals( fitw2sls1e ) ) print( residuals( fitw2sls1e$eq[[ 1 ]] ) ) print( residuals( fitw2sls2 ) ) print( residuals( fitw2sls2$eq[[ 2 ]] ) ) print( residuals( fitw2sls3 ) ) print( residuals( fitw2sls3$eq[[ 1 ]] ) ) print( residuals( fitw2sls4e ) ) print( residuals( fitw2sls4e$eq[[ 2 ]] ) ) print( residuals( fitw2sls5 ) ) print( residuals( fitw2sls5$eq[[ 1 ]] ) ) print( residuals( fitw2slsd1 ) ) print( residuals( fitw2slsd1$eq[[ 2 ]] ) ) print( residuals( fitw2slsd2e ) ) print( residuals( fitw2slsd2e$eq[[ 1 ]] ) ) print( residuals( fitw2slsd3e ) ) print( residuals( fitw2slsd3e$eq[[ 2 ]] ) ) ## *************** coefficients ********************* print( round( coef( fitw2sls1e ), digits = 6 ) ) print( round( coef( fitw2sls1e$eq[[ 2 ]] ), digits = 6 ) ) print( round( coef( fitw2slsd2e ), digits = 6 ) ) print( round( coef( fitw2slsd2e$eq[[ 1 ]] ), digits = 6 ) ) print( round( coef( fitw2slsd3e ), digits = 6 ) ) print( round( coef( fitw2slsd3e, modified.regMat = TRUE ), digits = 6 ) ) print( round( coef( fitw2slsd3e$eq[[ 2 ]] ), digits = 6 ) ) print( round( coef( fitw2sls4 ), digits = 6 ) ) print( round( coef( fitw2sls4$eq[[ 1 ]] ), digits = 6 ) ) print( round( coef( fitw2sls5 ), digits = 6 ) ) print( round( coef( fitw2sls5, modified.regMat = TRUE ), digits = 6 ) ) print( round( coef( fitw2sls5$eq[[ 2 ]] ), digits = 6 ) ) ## *************** coefficients with stats ********************* print( round( coef( summary( fitw2sls1e, useDfSys = FALSE ) ), digits = 6 ) ) print( round( coef( summary( fitw2sls1e$eq[[ 2 ]], useDfSys = FALSE ) ), digits = 6 ) ) print( round( coef( summary( fitw2slsd2e ) ), digits = 6 ) ) print( round( coef( summary( fitw2slsd2e$eq[[ 1 ]] ) ), digits = 6 ) ) print( round( coef( summary( fitw2slsd3e, useDfSys = FALSE ) ), digits = 6 ) ) print( round( coef( summary( fitw2slsd3e, useDfSys = FALSE ), modified.regMat = TRUE ), digits = 6 ) ) print( round( coef( summary( fitw2slsd3e$eq[[ 2 ]], useDfSys = FALSE ) ), digits = 6 ) ) print( round( coef( summary( fitw2sls4 ) ), digits = 6 ) ) print( round( coef( summary( fitw2sls4$eq[[ 1 ]] ) ), digits = 6 ) ) print( round( coef( summary( fitw2sls5 ) ), digits = 6 ) ) print( round( coef( summary( fitw2sls5 ), modified.regMat = TRUE ), digits = 6 ) ) print( round( coef( summary( fitw2sls5$eq[[ 2 ]] ) ), digits = 6 ) ) ## *********** variance covariance matrix of the coefficients ******* print( round( vcov( fitw2sls1e ), digits = 6 ) ) print( round( vcov( fitw2sls1e$eq[[ 2 ]] ), digits = 6 ) ) print( round( vcov( fitw2sls2 ), digits = 6 ) ) print( round( vcov( fitw2sls2$eq[[ 1 ]] ), digits = 6 ) ) print( round( vcov( fitw2sls3e ), digits = 6 ) ) print( round( vcov( fitw2sls3e, modified.regMat = TRUE ), digits = 6 ) ) print( round( vcov( fitw2sls3e$eq[[ 2 ]] ), digits = 6 ) ) print( round( vcov( fitw2sls4 ), digits = 6 ) ) print( round( vcov( fitw2sls4$eq[[ 1 ]] ), digits = 6 ) ) print( round( vcov( fitw2sls5 ), digits = 6 ) ) print( round( vcov( fitw2sls5, modified.regMat = TRUE ), digits = 6 ) ) print( round( vcov( fitw2sls5$eq[[ 2 ]] ), digits = 6 ) ) print( round( vcov( fitw2slsd1 ), digits = 6 ) ) print( round( vcov( fitw2slsd1$eq[[ 1 ]] ), digits = 6 ) ) print( round( vcov( fitw2slsd2e ), digits = 6 ) ) print( round( vcov( fitw2slsd2e$eq[[ 2 ]] ), digits = 6 ) ) print( round( vcov( fitw2slsd3 ), digits = 6 ) ) print( round( vcov( fitw2slsd3, modified.regMat = TRUE ), digits = 6 ) ) print( round( vcov( fitw2slsd3$eq[[ 1 ]] ), digits = 6 ) ) ## *********** confidence intervals of coefficients ************* print( confint( fitw2sls1e, useDfSys = TRUE ) ) print( confint( fitw2sls1e$eq[[ 1 ]], level = 0.9, useDfSys = TRUE ) ) print( confint( fitw2sls2, level = 0.9 ) ) print( confint( fitw2sls2$eq[[ 2 ]], level = 0.99 ) ) print( confint( fitw2sls3, level = 0.99 ) ) print( confint( fitw2sls3$eq[[ 1 ]], level = 0.5 ) ) print( confint( fitw2sls4e, level = 0.5, useDfSys = TRUE ) ) print( confint( fitw2sls4e$eq[[ 2 ]], level = 0.25, useDfSys = TRUE ) ) print( confint( fitw2sls5, level = 0.25 ) ) print( confint( fitw2sls5$eq[[ 1 ]], level = 0.975 ) ) print( confint( fitw2slsd1, level = 0.975 ) ) print( confint( fitw2slsd1$eq[[ 2 ]], level = 0.999 ) ) print( confint( fitw2slsd2e, level = 0.999, useDfSys = TRUE ) ) print( confint( fitw2slsd2e$eq[[ 1 ]], level = 0.01, useDfSys = TRUE ) ) print( confint( fitw2slsd3e, level = 0.01, useDfSys = TRUE ) ) print( confint( fitw2slsd3e$eq[[ 2 ]], useDfSys = TRUE ) ) ## *********** fitted values ************* print( fitted( fitw2sls1e ) ) print( fitted( fitw2sls1e$eq[[ 1 ]] ) ) print( fitted( fitw2sls2 ) ) print( fitted( fitw2sls2$eq[[ 2 ]] ) ) print( fitted( fitw2sls3 ) ) print( fitted( fitw2sls3$eq[[ 1 ]] ) ) print( fitted( fitw2sls4e ) ) print( fitted( fitw2sls4e$eq[[ 2 ]] ) ) print( fitted( fitw2sls5 ) ) print( fitted( fitw2sls5$eq[[ 1 ]] ) ) print( fitted( fitw2slsd1 ) ) print( fitted( fitw2slsd1$eq[[ 2 ]] ) ) print( fitted( fitw2slsd2e ) ) print( fitted( fitw2slsd2e$eq[[ 1 ]] ) ) print( fitted( fitw2slsd3e ) ) print( fitted( fitw2slsd3e$eq[[ 2 ]] ) ) ## *********** predicted values ************* predictData <- Kmenta predictData$consump <- NULL predictData$price <- Kmenta$price * 0.9 predictData$income <- Kmenta$income * 1.1 print( predict( fitw2sls1e, se.fit = TRUE, interval = "prediction", useDfSys = TRUE ) ) print( predict( fitw2sls1e$eq[[ 1 ]], se.fit = TRUE, interval = "prediction", useDfSys = TRUE ) ) print( predict( fitw2sls2, se.pred = TRUE, interval = "confidence", level = 0.999, newdata = predictData ) ) print( predict( fitw2sls2$eq[[ 2 ]], se.pred = TRUE, interval = "confidence", level = 0.999, newdata = predictData ) ) print( predict( fitw2sls3, se.pred = TRUE, interval = "prediction", level = 0.975 ) ) print( predict( fitw2sls3$eq[[ 1 ]], se.pred = TRUE, interval = "prediction", level = 0.975 ) ) print( predict( fitw2sls4e, se.fit = TRUE, interval = "confidence", level = 0.25, useDfSys = TRUE ) ) print( predict( fitw2sls4e$eq[[ 2 ]], se.fit = TRUE, interval = "confidence", level = 0.25, useDfSys = TRUE ) ) print( predict( fitw2sls5, se.fit = TRUE, se.pred = TRUE, interval = "prediction", level = 0.5, newdata = predictData ) ) print( predict( fitw2sls5$eq[[ 1 ]], se.fit = TRUE, se.pred = TRUE, interval = "prediction", level = 0.5, newdata = predictData ) ) print( predict( fitw2slsd1, se.fit = TRUE, se.pred = TRUE, interval = "confidence", level = 0.99 ) ) print( predict( fitw2slsd1$eq[[ 2 ]], se.fit = TRUE, se.pred = TRUE, interval = "confidence", level = 0.99 ) ) print( predict( fitw2slsd2e, se.fit = TRUE, interval = "prediction", level = 0.9, newdata = predictData, useDfSys = TRUE ) ) print( predict( fitw2slsd2e$eq[[ 1 ]], se.fit = TRUE, interval = "prediction", level = 0.9, newdata = predictData, useDfSys = TRUE ) ) print( predict( fitw2slsd3e, se.fit = TRUE, se.pred = TRUE, interval = "prediction", level = 0.01, useDfSys = TRUE ) ) print( predict( fitw2slsd3e$eq[[ 2 ]], se.fit = TRUE, se.pred = TRUE, interval = "prediction", level = 0.01, useDfSys = TRUE ) ) # predict just one observation smallData <- data.frame( price = 130, income = 150, farmPrice = 120, trend = 25 ) print( predict( fitw2sls1e, newdata = smallData ) ) print( predict( fitw2sls1e$eq[[ 1 ]], newdata = smallData ) ) print( predict( fitw2sls2, se.fit = TRUE, level = 0.9, newdata = smallData ) ) print( predict( fitw2sls2$eq[[ 1 ]], se.pred = TRUE, level = 0.99, newdata = smallData ) ) print( predict( fitw2sls3, interval = "prediction", level = 0.975, newdata = smallData ) ) print( predict( fitw2sls3$eq[[ 1 ]], interval = "confidence", level = 0.8, newdata = smallData ) ) print( predict( fitw2sls4e, se.fit = TRUE, interval = "confidence", level = 0.999, newdata = smallData ) ) print( predict( fitw2sls4e$eq[[ 2 ]], se.pred = TRUE, interval = "prediction", level = 0.75, newdata = smallData ) ) print( predict( fitw2sls5, se.fit = TRUE, interval = "prediction", newdata = smallData ) ) print( predict( fitw2sls5$eq[[ 1 ]], se.pred = TRUE, interval = "confidence", newdata = smallData ) ) print( predict( fitw2slsd2e, se.fit = TRUE, se.pred = TRUE, interval = "prediction", level = 0.5, newdata = smallData ) ) print( predict( fitw2slsd2e$eq[[ 1 ]], se.fit = TRUE, se.pred = TRUE, interval = "confidence", level = 0.25, newdata = smallData ) ) ## ************ correlation of predicted values *************** print( correlation.systemfit( fitw2sls1e, 1, 2 ) ) print( correlation.systemfit( fitw2sls2, 2, 1 ) ) print( correlation.systemfit( fitw2sls3, 1, 2 ) ) print( correlation.systemfit( fitw2sls4e, 2, 1 ) ) print( correlation.systemfit( fitw2sls5, 1, 2 ) ) print( correlation.systemfit( fitw2slsd1, 2, 1 ) ) print( correlation.systemfit( fitw2slsd2e, 1, 2 ) ) print( correlation.systemfit( fitw2slsd3e, 2, 1 ) ) ## ************ LOG-Likelihood values *************** print( logLik( fitw2sls1e ) ) print( logLik( fitw2sls1e, residCovDiag = TRUE ) ) print( logLik( fitw2sls2 ) ) print( logLik( fitw2sls2, residCovDiag = TRUE ) ) print( logLik( fitw2sls3 ) ) print( logLik( fitw2sls3, residCovDiag = TRUE ) ) print( logLik( fitw2sls4e ) ) print( logLik( fitw2sls4e, residCovDiag = TRUE ) ) print( logLik( fitw2sls5 ) ) print( logLik( fitw2sls5, residCovDiag = TRUE ) ) print( logLik( fitw2slsd1 ) ) print( logLik( fitw2slsd1, residCovDiag = TRUE ) ) print( logLik( fitw2slsd2e ) ) print( logLik( fitw2slsd2e, residCovDiag = TRUE ) ) print( logLik( fitw2slsd3e ) ) print( logLik( fitw2slsd3e, residCovDiag = TRUE ) ) ## ************** F tests **************** # testing first restriction print( linearHypothesis( fitw2sls1, restrm ) ) linearHypothesis( fitw2sls1, restrict ) print( linearHypothesis( fitw2slsd1e, restrm ) ) linearHypothesis( fitw2slsd1e, restrict ) # testing second restriction restrOnly2m <- matrix(0,1,7) restrOnly2q <- 0.5 restrOnly2m[1,2] <- -1 restrOnly2m[1,5] <- 1 restrictOnly2 <- "- demand_price + supply_price = 0.5" # first restriction not imposed print( linearHypothesis( fitw2sls1e, restrOnly2m, restrOnly2q ) ) linearHypothesis( fitw2sls1e, restrictOnly2 ) print( linearHypothesis( fitw2slsd1, restrOnly2m, restrOnly2q ) ) linearHypothesis( fitw2slsd1, restrictOnly2 ) # first restriction imposed print( linearHypothesis( fitw2sls2, restrOnly2m, restrOnly2q ) ) linearHypothesis( fitw2sls2, restrictOnly2 ) print( linearHypothesis( fitw2sls3, restrOnly2m, restrOnly2q ) ) linearHypothesis( fitw2sls3, restrictOnly2 ) print( linearHypothesis( fitw2slsd2e, restrOnly2m, restrOnly2q ) ) linearHypothesis( fitw2slsd2e, restrictOnly2 ) print( linearHypothesis( fitw2slsd3e, restrOnly2m, restrOnly2q ) ) linearHypothesis( fitw2slsd3e, restrictOnly2 ) # testing both of the restrictions print( linearHypothesis( fitw2sls1e, restr2m, restr2q ) ) linearHypothesis( fitw2sls1e, restrict2 ) print( linearHypothesis( fitw2slsd1, restr2m, restr2q ) ) linearHypothesis( fitw2slsd1, restrict2 ) ## ************** Wald tests **************** # testing first restriction print( linearHypothesis( fitw2sls1, restrm, test = "Chisq" ) ) linearHypothesis( fitw2sls1, restrict, test = "Chisq" ) print( linearHypothesis( fitw2slsd1e, restrm, test = "Chisq" ) ) linearHypothesis( fitw2slsd1e, restrict, test = "Chisq" ) # testing second restriction # first restriction not imposed print( linearHypothesis( fitw2sls1e, restrOnly2m, restrOnly2q, test = "Chisq" ) ) linearHypothesis( fitw2sls1e, restrictOnly2, test = "Chisq" ) print( linearHypothesis( fitw2slsd1, restrOnly2m, restrOnly2q, test = "Chisq" ) ) linearHypothesis( fitw2slsd1, restrictOnly2, test = "Chisq" ) # first restriction imposed print( linearHypothesis( fitw2sls2, restrOnly2m, restrOnly2q, test = "Chisq" ) ) linearHypothesis( fitw2sls2, restrictOnly2, test = "Chisq" ) print( linearHypothesis( fitw2sls3, restrOnly2m, restrOnly2q, test = "Chisq" ) ) linearHypothesis( fitw2sls3, restrictOnly2, test = "Chisq" ) print( linearHypothesis( fitw2slsd2e, restrOnly2m, restrOnly2q, test = "Chisq" ) ) linearHypothesis( fitw2slsd2e, restrictOnly2, test = "Chisq" ) print( linearHypothesis( fitw2slsd3e, restrOnly2m, restrOnly2q, test = "Chisq" ) ) linearHypothesis( fitw2slsd3e, restrictOnly2, test = "Chisq" ) # testing both of the restrictions print( linearHypothesis( fitw2sls1e, restr2m, restr2q, test = "Chisq" ) ) linearHypothesis( fitw2sls1e, restrict2, test = "Chisq" ) print( linearHypothesis( fitw2slsd1, restr2m, restr2q, test = "Chisq" ) ) linearHypothesis( fitw2slsd1, restrict2, test = "Chisq" ) ## ****************** model frame ************************** print( mf <- model.frame( fitw2sls1e ) ) print( mf1 <- model.frame( fitw2sls1e$eq[[ 1 ]] ) ) print( attributes( mf1 )$terms ) print( mf2 <- model.frame( fitw2sls1e$eq[[ 2 ]] ) ) print( attributes( mf2 )$terms ) print( all.equal( mf, model.frame( fitw2sls2 ) ) ) print( all.equal( mf2, model.frame( fitw2sls2$eq[[ 2 ]] ) ) ) print( all.equal( mf, model.frame( fitw2sls3 ) ) ) print( all.equal( mf1, model.frame( fitw2sls3$eq[[ 1 ]] ) ) ) print( all.equal( mf, model.frame( fitw2sls4e ) ) ) print( all.equal( mf2, model.frame( fitw2sls4e$eq[[ 2 ]] ) ) ) print( all.equal( mf, model.frame( fitw2sls5 ) ) ) print( all.equal( mf1, model.frame( fitw2sls5$eq[[ 1 ]] ) ) ) print( all.equal( mf, model.frame( fitw2slsd1 ) ) ) print( all.equal( mf2, model.frame( fitw2slsd1$eq[[ 2 ]] ) ) ) print( all.equal( mf, model.frame( fitw2slsd2e ) ) ) print( all.equal( mf1, model.frame( fitw2slsd2e$eq[[ 1 ]] ) ) ) print( all.equal( mf, model.frame( fitw2slsd3e ) ) ) print( all.equal( mf2, model.frame( fitw2slsd3e$eq[[ 2 ]] ) ) ) fitw2sls1e$eq[[ 1 ]]$modelInst fitw2sls1e$eq[[ 2 ]]$modelInst fitw2sls4Sym$eq[[ 1 ]]$modelInst fitw2sls4Sym$eq[[ 2 ]]$modelInst fitw2sls5$eq[[ 1 ]]$modelInst fitw2sls5$eq[[ 2 ]]$modelInst ## **************** model matrix ************************ # with x (returnModelMatrix) = TRUE print( !is.null( fitw2sls1e$eq[[ 1 ]]$x ) ) print( mm <- model.matrix( fitw2sls1e ) ) print( mm1 <- model.matrix( fitw2sls1e$eq[[ 1 ]] ) ) print( mm2 <- model.matrix( fitw2sls1e$eq[[ 2 ]] ) ) # with x (returnModelMatrix) = FALSE print( all.equal( mm, model.matrix( fitw2sls1 ) ) ) print( all.equal( mm1, model.matrix( fitw2sls1$eq[[ 1 ]] ) ) ) print( all.equal( mm2, model.matrix( fitw2sls1$eq[[ 2 ]] ) ) ) print( !is.null( fitw2sls1$eq[[ 1 ]]$x ) ) # with x (returnModelMatrix) = TRUE print( !is.null( fitw2sls2e$eq[[ 1 ]]$x ) ) print( all.equal( mm, model.matrix( fitw2sls2e ) ) ) print( all.equal( mm1, model.matrix( fitw2sls2e$eq[[ 1 ]] ) ) ) print( all.equal( mm2, model.matrix( fitw2sls2e$eq[[ 2 ]] ) ) ) # with x (returnModelMatrix) = FALSE print( all.equal( mm, model.matrix( fitw2sls2Sym ) ) ) print( all.equal( mm1, model.matrix( fitw2sls2Sym$eq[[ 1 ]] ) ) ) print( all.equal( mm2, model.matrix( fitw2sls2Sym$eq[[ 2 ]] ) ) ) print( !is.null( fitw2sls2Sym$eq[[ 1 ]]$x ) ) # with x (returnModelMatrix) = TRUE print( !is.null( fitw2slsd3$eq[[ 1 ]]$x ) ) print( all.equal( mm, model.matrix( fitw2slsd3 ) ) ) print( all.equal( mm1, model.matrix( fitw2slsd3$eq[[ 1 ]] ) ) ) print( all.equal( mm2, model.matrix( fitw2slsd3$eq[[ 2 ]] ) ) ) # with x (returnModelMatrix) = FALSE print( all.equal( mm, model.matrix( fitw2slsd3e ) ) ) print( all.equal( mm1, model.matrix( fitw2slsd3e$eq[[ 1 ]] ) ) ) print( all.equal( mm2, model.matrix( fitw2slsd3e$eq[[ 2 ]] ) ) ) print( !is.null( fitw2slsd3e$eq[[ 1 ]]$x ) ) # with x (returnModelMatrix) = TRUE print( !is.null( fitw2sls4$eq[[ 1 ]]$x ) ) print( all.equal( mm, model.matrix( fitw2sls4 ) ) ) print( all.equal( mm1, model.matrix( fitw2sls4$eq[[ 1 ]] ) ) ) print( all.equal( mm2, model.matrix( fitw2sls4$eq[[ 2 ]] ) ) ) # with x (returnModelMatrix) = FALSE print( all.equal( mm, model.matrix( fitw2sls4e ) ) ) print( all.equal( mm1, model.matrix( fitw2sls4e$eq[[ 1 ]] ) ) ) print( all.equal( mm2, model.matrix( fitw2sls4e$eq[[ 2 ]] ) ) ) print( !is.null( fitw2sls4e$eq[[ 1 ]]$x ) ) # with x (returnModelMatrix) = TRUE print( !is.null( fitw2sls5$eq[[ 1 ]]$x ) ) print( all.equal( mm, model.matrix( fitw2sls5 ) ) ) print( all.equal( mm1, model.matrix( fitw2sls5$eq[[ 1 ]] ) ) ) print( all.equal( mm2, model.matrix( fitw2sls5$eq[[ 2 ]] ) ) ) # with x (returnModelMatrix) = FALSE print( all.equal( mm, model.matrix( fitw2sls5e ) ) ) print( all.equal( mm1, model.matrix( fitw2sls5e$eq[[ 1 ]] ) ) ) print( all.equal( mm2, model.matrix( fitw2sls5e$eq[[ 2 ]] ) ) ) print( !is.null( fitw2sls5e$eq[[ 1 ]]$x ) ) # matrices of instrumental variables model.matrix( fitw2sls1, which = "z" ) model.matrix( fitw2sls1$eq[[ 1 ]], which = "z" ) model.matrix( fitw2sls1$eq[[ 2 ]], which = "z" ) # matrices of fitted regressors model.matrix( fitw2sls5e, which = "xHat" ) model.matrix( fitw2sls5e$eq[[ 1 ]], which = "xHat" ) model.matrix( fitw2sls5e$eq[[ 2 ]], which = "xHat" ) ## **************** formulas ************************ formula( fitw2sls1e ) formula( fitw2sls1e$eq[[ 1 ]] ) formula( fitw2sls2 ) formula( fitw2sls2$eq[[ 2 ]] ) formula( fitw2sls3 ) formula( fitw2sls3$eq[[ 1 ]] ) formula( fitw2sls4e ) formula( fitw2sls4e$eq[[ 2 ]] ) formula( fitw2sls5 ) formula( fitw2sls5$eq[[ 1 ]] ) formula( fitw2slsd1 ) formula( fitw2slsd1$eq[[ 2 ]] ) formula( fitw2slsd2e ) formula( fitw2slsd2e$eq[[ 1 ]] ) formula( fitw2slsd3e ) formula( fitw2slsd3e$eq[[ 2 ]] ) ## **************** model terms ******************* terms( fitw2sls1e ) terms( fitw2sls1e$eq[[ 1 ]] ) terms( fitw2sls2 ) terms( fitw2sls2$eq[[ 2 ]] ) terms( fitw2sls3 ) terms( fitw2sls3$eq[[ 1 ]] ) terms( fitw2sls4e ) terms( fitw2sls4e$eq[[ 2 ]] ) terms( fitw2sls5 ) terms( fitw2sls5$eq[[ 1 ]] ) terms( fitw2slsd1 ) terms( fitw2slsd1$eq[[ 2 ]] ) terms( fitw2slsd2e ) terms( fitw2slsd2e$eq[[ 1 ]] ) terms( fitw2slsd3e ) terms( fitw2slsd3e$eq[[ 2 ]] ) ## **************** terms of instruments ******************* fitw2sls1e$eq[[ 1 ]]$termsInst fitw2sls2$eq[[ 2 ]]$termsInst fitw2sls3$eq[[ 1 ]]$termsInst fitw2sls4e$eq[[ 2 ]]$termsInst fitw2sls5$eq[[ 1 ]]$termsInst fitw2slsd1$eq[[ 2 ]]$termsInst fitw2slsd2e$eq[[ 1 ]]$termsInst fitw2slsd3e$eq[[ 2 ]]$termsInst ## **************** estfun ************************ library( "sandwich" ) estfun( fitw2sls1 ) round( colSums( estfun( fitw2sls1 ) ), digits = 7 ) estfun( fitw2sls1e ) round( colSums( estfun( fitw2sls1e ) ), digits = 7 ) estfun( fitw2slsd1e ) round( colSums( estfun( fitw2slsd1e ) ), digits = 7 ) ## **************** bread ************************ bread( fitw2sls1 ) bread( fitw2sls1e ) bread( fitw2slsd1e ) systemfit/tests/test_wls.Rout.save0000644000176200001440000062503713060100647017131 0ustar liggesusers R version 3.3.2 (2016-10-31) -- "Sincere Pumpkin Patch" Copyright (C) 2016 The R Foundation for Statistical Computing Platform: x86_64-pc-linux-gnu (64-bit) R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > library( systemfit ) Loading required package: Matrix Loading required package: car Loading required package: lmtest Loading required package: zoo Attaching package: 'zoo' The following objects are masked from 'package:base': as.Date, as.Date.numeric Please cite the 'systemfit' package as: Arne Henningsen and Jeff D. Hamann (2007). systemfit: A Package for Estimating Systems of Simultaneous Equations in R. Journal of Statistical Software 23(4), 1-40. http://www.jstatsoft.org/v23/i04/. If you have questions, suggestions, or comments regarding the 'systemfit' package, please use a forum or 'tracker' at systemfit's R-Forge site: https://r-forge.r-project.org/projects/systemfit/ > options( digits = 3 ) > > data( "Kmenta" ) > useMatrix <- FALSE > > demand <- consump ~ price + income > supply <- consump ~ price + farmPrice + trend > system <- list( demand = demand, supply = supply ) > restrm <- matrix(0,1,7) # restriction matrix "R" > restrm[1,3] <- 1 > restrm[1,7] <- -1 > restrict <- "demand_income - supply_trend = 0" > restr2m <- matrix(0,2,7) # restriction matrix "R" 2 > restr2m[1,3] <- 1 > restr2m[1,7] <- -1 > restr2m[2,2] <- -1 > restr2m[2,5] <- 1 > restr2q <- c( 0, 0.5 ) # restriction vector "q" 2 > restrict2 <- c( "demand_income - supply_trend = 0", + "- demand_price + supply_price = 0.5" ) > tc <- matrix(0,7,6) > tc[1,1] <- 1 > tc[2,2] <- 1 > tc[3,3] <- 1 > tc[4,4] <- 1 > tc[5,5] <- 1 > tc[6,6] <- 1 > tc[7,3] <- 1 > restr3m <- matrix(0,1,6) # restriction matrix "R" 2 > restr3m[1,2] <- -1 > restr3m[1,5] <- 1 > restr3q <- c( 0.5 ) # restriction vector "q" 2 > restrict3 <- "- C2 + C5 = 0.5" > > > ## ******* single-equation OLS estimations ********************* > lmDemand <- lm( demand, data = Kmenta ) > lmSupply <- lm( supply, data = Kmenta ) > > ## *************** WLS estimation ************************ > fitwls1 <- systemfit( system, "WLS", data = Kmenta, useMatrix = useMatrix ) > print( summary( fitwls1 ) ) systemfit results method: WLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 33 156 4.43 0.709 0.558 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 63.3 3.73 1.93 0.764 0.736 supply 20 16 92.6 5.78 2.40 0.655 0.590 The covariance matrix of the residuals used for estimation demand supply demand 3.73 0.00 supply 0.00 5.78 The covariance matrix of the residuals demand supply demand 3.73 4.14 supply 4.14 5.78 The correlations of the residuals demand supply demand 1.000 0.891 supply 0.891 1.000 WLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Estimate Std. Error t value Pr(>|t|) (Intercept) 99.8954 7.5194 13.29 2.1e-10 *** price -0.3163 0.0907 -3.49 0.0028 ** income 0.3346 0.0454 7.37 1.1e-06 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.93 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 63.332 MSE: 3.725 Root MSE: 1.93 Multiple R-Squared: 0.764 Adjusted R-Squared: 0.736 WLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 58.2754 11.4629 5.08 0.00011 *** price 0.1604 0.0949 1.69 0.11039 farmPrice 0.2481 0.0462 5.37 6.2e-05 *** trend 0.2483 0.0975 2.55 0.02157 * --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.405 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 92.551 MSE: 5.784 Root MSE: 2.405 Multiple R-Squared: 0.655 Adjusted R-Squared: 0.59 > all.equal( coef( fitwls1 ), c( coef( lmDemand ), coef( lmSupply ) ), + check.attributes = FALSE ) [1] TRUE > all.equal( coef( summary( fitwls1 ) ), + rbind( coef( summary( lmDemand ) ), coef( summary( lmSupply ) ) ), + check.attributes = FALSE ) [1] TRUE > all.equal( vcov( fitwls1 ), + as.matrix( bdiag( vcov( lmDemand ), vcov( lmSupply ) ) ), + check.attributes = FALSE ) [1] TRUE > > ## *************** WLS estimation (EViews-like) ************************ > fitwls1e <- systemfit( system, "WLS", data = Kmenta, methodResidCov = "noDfCor", + x = TRUE, useMatrix = useMatrix ) > print( summary( fitwls1e, useDfSys = TRUE ) ) systemfit results method: WLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 33 156 3.02 0.709 0.537 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 63.3 3.73 1.93 0.764 0.736 supply 20 16 92.6 5.78 2.40 0.655 0.590 The covariance matrix of the residuals used for estimation demand supply demand 3.17 0.00 supply 0.00 4.63 The covariance matrix of the residuals demand supply demand 3.17 3.41 supply 3.41 4.63 The correlations of the residuals demand supply demand 1.000 0.891 supply 0.891 1.000 WLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Estimate Std. Error t value Pr(>|t|) (Intercept) 99.8954 6.9325 14.41 8.9e-16 *** price -0.3163 0.0836 -3.78 0.00062 *** income 0.3346 0.0419 7.99 3.2e-09 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.93 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 63.332 MSE: 3.725 Root MSE: 1.93 Multiple R-Squared: 0.764 Adjusted R-Squared: 0.736 WLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 58.2754 10.2527 5.68 2.4e-06 *** price 0.1604 0.0849 1.89 0.0676 . farmPrice 0.2481 0.0413 6.01 9.5e-07 *** trend 0.2483 0.0872 2.85 0.0075 ** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.405 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 92.551 MSE: 5.784 Root MSE: 2.405 Multiple R-Squared: 0.655 Adjusted R-Squared: 0.59 > all.equal( coef( fitwls1e ), c( coef( lmDemand ), coef( lmSupply ) ), + check.attributes = FALSE ) [1] TRUE > > ## ************** WLS with cross-equation restriction *************** > fitwls2 <- systemfit( system, "WLS", data = Kmenta, restrict.matrix = restrm, + x = TRUE, useMatrix = useMatrix ) > print( summary( fitwls2 ) ) systemfit results method: WLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 34 159 2.35 0.703 0.622 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 63.8 3.75 1.94 0.762 0.734 supply 20 16 95.6 5.98 2.44 0.643 0.576 The covariance matrix of the residuals used for estimation demand supply demand 3.78 0.00 supply 0.00 5.94 The covariance matrix of the residuals demand supply demand 3.75 4.48 supply 4.48 5.98 The correlations of the residuals demand supply demand 1.000 0.946 supply 0.946 1.000 WLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Estimate Std. Error t value Pr(>|t|) (Intercept) 99.6582 7.5640 13.18 6.4e-15 *** price -0.2991 0.0887 -3.37 0.0019 ** income 0.3194 0.0415 7.70 6.0e-09 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.936 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 63.75 MSE: 3.75 Root MSE: 1.936 Multiple R-Squared: 0.762 Adjusted R-Squared: 0.734 WLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 56.1877 11.3165 4.97 1.9e-05 *** price 0.1643 0.0960 1.71 0.096 . farmPrice 0.2580 0.0451 5.71 2.0e-06 *** trend 0.3194 0.0415 7.70 6.0e-09 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.445 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 95.627 MSE: 5.977 Root MSE: 2.445 Multiple R-Squared: 0.643 Adjusted R-Squared: 0.576 > # the same with symbolically specified restrictions > fitwls2Sym <- systemfit( system, "WLS", data = Kmenta, + restrict.matrix = restrict, x = TRUE, + useMatrix = useMatrix ) > all.equal( fitwls2, fitwls2Sym ) [1] "Component \"call\": target, current do not match when deparsed" > > ## ************** WLS with cross-equation restriction (EViews-like) ******* > fitwls2e <- systemfit( system, "WLS", data = Kmenta, restrict.matrix = restrm, + methodResidCov = "noDfCor", useMatrix = useMatrix ) > print( summary( fitwls2e ) ) systemfit results method: WLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 34 159 1.61 0.703 0.589 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 63.8 3.75 1.94 0.762 0.734 supply 20 16 95.6 5.97 2.44 0.644 0.577 The covariance matrix of the residuals used for estimation demand supply demand 3.21 0.00 supply 0.00 4.75 The covariance matrix of the residuals demand supply demand 3.19 3.69 supply 3.69 4.78 The correlations of the residuals demand supply demand 1.000 0.946 supply 0.946 1.000 WLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Estimate Std. Error t value Pr(>|t|) (Intercept) 99.6461 6.9734 14.29 6.7e-16 *** price -0.2982 0.0816 -3.65 0.00086 *** income 0.3186 0.0381 8.37 8.9e-10 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.937 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 63.794 MSE: 3.753 Root MSE: 1.937 Multiple R-Squared: 0.762 Adjusted R-Squared: 0.734 WLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 56.2104 10.1248 5.55 3.3e-06 *** price 0.1642 0.0859 1.91 0.064 . farmPrice 0.2579 0.0404 6.38 2.7e-07 *** trend 0.3186 0.0381 8.37 8.9e-10 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.444 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 95.561 MSE: 5.973 Root MSE: 2.444 Multiple R-Squared: 0.644 Adjusted R-Squared: 0.577 > > ## ******* WLS with cross-equation restriction via restrict.regMat ********** > fitwls3 <- systemfit( system,"WLS", data = Kmenta, restrict.regMat = tc, + x = TRUE, useMatrix = useMatrix ) > print( summary( fitwls3 ) ) systemfit results method: WLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 34 159 2.35 0.703 0.622 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 63.8 3.75 1.94 0.762 0.734 supply 20 16 95.6 5.98 2.44 0.643 0.576 The covariance matrix of the residuals used for estimation demand supply demand 3.78 0.00 supply 0.00 5.94 The covariance matrix of the residuals demand supply demand 3.75 4.48 supply 4.48 5.98 The correlations of the residuals demand supply demand 1.000 0.946 supply 0.946 1.000 WLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Estimate Std. Error t value Pr(>|t|) (Intercept) 99.6582 7.5640 13.18 6.4e-15 *** price -0.2991 0.0887 -3.37 0.0019 ** income 0.3194 0.0415 7.70 6.0e-09 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.936 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 63.75 MSE: 3.75 Root MSE: 1.936 Multiple R-Squared: 0.762 Adjusted R-Squared: 0.734 WLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 56.1877 11.3165 4.97 1.9e-05 *** price 0.1643 0.0960 1.71 0.096 . farmPrice 0.2580 0.0451 5.71 2.0e-06 *** trend 0.3194 0.0415 7.70 6.0e-09 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.445 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 95.627 MSE: 5.977 Root MSE: 2.445 Multiple R-Squared: 0.643 Adjusted R-Squared: 0.576 > > ## ******* WLS with cross-equation restriction via restrict.regMat (EViews-like) ***** > fitwls3e <- systemfit( system,"WLS", data = Kmenta, restrict.regMat = tc, + methodResidCov = "noDfCor", useMatrix = useMatrix ) > print( summary( fitwls3e ) ) systemfit results method: WLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 34 159 1.61 0.703 0.589 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 63.8 3.75 1.94 0.762 0.734 supply 20 16 95.6 5.97 2.44 0.644 0.577 The covariance matrix of the residuals used for estimation demand supply demand 3.21 0.00 supply 0.00 4.75 The covariance matrix of the residuals demand supply demand 3.19 3.69 supply 3.69 4.78 The correlations of the residuals demand supply demand 1.000 0.946 supply 0.946 1.000 WLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Estimate Std. Error t value Pr(>|t|) (Intercept) 99.6461 6.9734 14.29 6.7e-16 *** price -0.2982 0.0816 -3.65 0.00086 *** income 0.3186 0.0381 8.37 8.9e-10 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.937 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 63.794 MSE: 3.753 Root MSE: 1.937 Multiple R-Squared: 0.762 Adjusted R-Squared: 0.734 WLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 56.2104 10.1248 5.55 3.3e-06 *** price 0.1642 0.0859 1.91 0.064 . farmPrice 0.2579 0.0404 6.38 2.7e-07 *** trend 0.3186 0.0381 8.37 8.9e-10 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.444 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 95.561 MSE: 5.973 Root MSE: 2.444 Multiple R-Squared: 0.644 Adjusted R-Squared: 0.577 > > ## ***** WLS with 2 cross-equation restrictions *************** > fitwls4 <- systemfit( system,"WLS", data = Kmenta, restrict.matrix = restr2m, + restrict.rhs = restr2q, useMatrix = useMatrix ) > print( summary( fitwls4 ) ) systemfit results method: WLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 35 160 2.51 0.702 0.619 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 63.6 3.74 1.94 0.763 0.735 supply 20 16 96.3 6.02 2.45 0.641 0.574 The covariance matrix of the residuals used for estimation demand supply demand 3.76 0.00 supply 0.00 5.99 The covariance matrix of the residuals demand supply demand 3.74 4.47 supply 4.47 6.02 The correlations of the residuals demand supply demand 1.000 0.943 supply 0.943 1.000 WLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Estimate Std. Error t value Pr(>|t|) (Intercept) 100.9138 6.0474 16.69 < 2e-16 *** price -0.3160 0.0648 -4.87 2.3e-05 *** income 0.3238 0.0385 8.42 6.3e-10 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.935 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 63.636 MSE: 3.743 Root MSE: 1.935 Multiple R-Squared: 0.763 Adjusted R-Squared: 0.735 WLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 53.9416 7.9687 6.77 7.6e-08 *** price 0.1840 0.0648 2.84 0.0075 ** farmPrice 0.2603 0.0446 5.84 1.3e-06 *** trend 0.3238 0.0385 8.42 6.3e-10 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.453 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 96.268 MSE: 6.017 Root MSE: 2.453 Multiple R-Squared: 0.641 Adjusted R-Squared: 0.574 > # the same with symbolically specified restrictions > fitwls4Sym <- systemfit( system, "WLS", data = Kmenta, + restrict.matrix = restrict2, useMatrix = useMatrix ) > all.equal( fitwls4, fitwls4Sym ) [1] "Component \"call\": target, current do not match when deparsed" > > ## ***** WLS with 2 cross-equation restrictions (EViews-like) ********** > fitwls4e <- systemfit( system,"WLS", data = Kmenta, methodResidCov = "noDfCor", + restrict.matrix = restr2m, restrict.rhs = restr2q, + x = TRUE, useMatrix = useMatrix ) > print( summary( fitwls4e ) ) systemfit results method: WLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 35 160 1.72 0.702 0.586 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 63.7 3.75 1.94 0.763 0.735 supply 20 16 96.2 6.01 2.45 0.641 0.574 The covariance matrix of the residuals used for estimation demand supply demand 3.2 0.00 supply 0.0 4.79 The covariance matrix of the residuals demand supply demand 3.18 3.69 supply 3.69 4.81 The correlations of the residuals demand supply demand 1.000 0.942 supply 0.942 1.000 WLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Estimate Std. Error t value Pr(>|t|) (Intercept) 100.9762 5.5234 18.28 < 2e-16 *** price -0.3160 0.0589 -5.37 5.3e-06 *** income 0.3233 0.0352 9.18 7.6e-11 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.935 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 63.67 MSE: 3.745 Root MSE: 1.935 Multiple R-Squared: 0.763 Adjusted R-Squared: 0.735 WLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 53.9630 7.2089 7.49 9.1e-09 *** price 0.1840 0.0589 3.13 0.0036 ** farmPrice 0.2602 0.0399 6.53 1.6e-07 *** trend 0.3233 0.0352 9.18 7.6e-11 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.452 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 96.215 MSE: 6.013 Root MSE: 2.452 Multiple R-Squared: 0.641 Adjusted R-Squared: 0.574 > > ## *********** WLS with 2 cross-equation restrictions via R and restrict.regMat ****** > fitwls5 <- systemfit( system, "WLS", data = Kmenta, restrict.matrix = restr3m, + restrict.rhs = restr3q, restrict.regMat = tc, + x = TRUE, useMatrix = useMatrix ) > print( summary( fitwls5 ) ) systemfit results method: WLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 35 160 2.51 0.702 0.619 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 63.6 3.74 1.94 0.763 0.735 supply 20 16 96.3 6.02 2.45 0.641 0.574 The covariance matrix of the residuals used for estimation demand supply demand 3.76 0.00 supply 0.00 5.99 The covariance matrix of the residuals demand supply demand 3.74 4.47 supply 4.47 6.02 The correlations of the residuals demand supply demand 1.000 0.943 supply 0.943 1.000 WLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Estimate Std. Error t value Pr(>|t|) (Intercept) 100.9138 6.0474 16.69 < 2e-16 *** price -0.3160 0.0648 -4.87 2.3e-05 *** income 0.3238 0.0385 8.42 6.3e-10 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.935 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 63.636 MSE: 3.743 Root MSE: 1.935 Multiple R-Squared: 0.763 Adjusted R-Squared: 0.735 WLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 53.9416 7.9687 6.77 7.6e-08 *** price 0.1840 0.0648 2.84 0.0075 ** farmPrice 0.2603 0.0446 5.84 1.3e-06 *** trend 0.3238 0.0385 8.42 6.3e-10 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.453 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 96.268 MSE: 6.017 Root MSE: 2.453 Multiple R-Squared: 0.641 Adjusted R-Squared: 0.574 > # the same with symbolically specified restrictions > fitwls5Sym <- systemfit( system, "WLS", data = Kmenta, + restrict.matrix = restrict3, restrict.regMat = tc, + x = TRUE, useMatrix = useMatrix ) > all.equal( fitwls5, fitwls5Sym ) [1] "Component \"call\": target, current do not match when deparsed" > > ## *********** WLS with 2 cross-equation restrictions via R and restrict.regMat (EViews-like) > fitwls5e <- systemfit( system, "WLS", data = Kmenta, methodResidCov = "noDfCor", + restrict.matrix = restr3m, restrict.rhs = restr3q, restrict.regMat = tc, + useMatrix = useMatrix ) > print( summary( fitwls5e ) ) systemfit results method: WLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 35 160 1.72 0.702 0.586 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 63.7 3.75 1.94 0.763 0.735 supply 20 16 96.2 6.01 2.45 0.641 0.574 The covariance matrix of the residuals used for estimation demand supply demand 3.2 0.00 supply 0.0 4.79 The covariance matrix of the residuals demand supply demand 3.18 3.69 supply 3.69 4.81 The correlations of the residuals demand supply demand 1.000 0.942 supply 0.942 1.000 WLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Estimate Std. Error t value Pr(>|t|) (Intercept) 100.9762 5.5234 18.28 < 2e-16 *** price -0.3160 0.0589 -5.37 5.3e-06 *** income 0.3233 0.0352 9.18 7.6e-11 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.935 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 63.67 MSE: 3.745 Root MSE: 1.935 Multiple R-Squared: 0.763 Adjusted R-Squared: 0.735 WLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 53.9630 7.2089 7.49 9.1e-09 *** price 0.1840 0.0589 3.13 0.0036 ** farmPrice 0.2602 0.0399 6.53 1.6e-07 *** trend 0.3233 0.0352 9.18 7.6e-11 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.452 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 96.215 MSE: 6.013 Root MSE: 2.452 Multiple R-Squared: 0.641 Adjusted R-Squared: 0.574 > > ## *************** iterated WLS estimation ********************* > fitwlsi1 <- systemfit( system, "WLS", data = Kmenta, + maxit = 100, useMatrix = useMatrix ) > print( summary( fitwlsi1, useDfSys = TRUE ) ) systemfit results method: WLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 33 156 4.43 0.709 0.558 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 63.3 3.73 1.93 0.764 0.736 supply 20 16 92.6 5.78 2.40 0.655 0.590 The covariance matrix of the residuals used for estimation demand supply demand 3.73 0.00 supply 0.00 5.78 The covariance matrix of the residuals demand supply demand 3.73 4.14 supply 4.14 5.78 The correlations of the residuals demand supply demand 1.000 0.891 supply 0.891 1.000 WLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Estimate Std. Error t value Pr(>|t|) (Intercept) 99.8954 7.5194 13.29 8.4e-15 *** price -0.3163 0.0907 -3.49 0.0014 ** income 0.3346 0.0454 7.37 1.8e-08 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.93 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 63.332 MSE: 3.725 Root MSE: 1.93 Multiple R-Squared: 0.764 Adjusted R-Squared: 0.736 WLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 58.2754 11.4629 5.08 1.4e-05 *** price 0.1604 0.0949 1.69 0.100 farmPrice 0.2481 0.0462 5.37 6.1e-06 *** trend 0.2483 0.0975 2.55 0.016 * --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.405 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 92.551 MSE: 5.784 Root MSE: 2.405 Multiple R-Squared: 0.655 Adjusted R-Squared: 0.59 > > ## *************** iterated WLS estimation (EViews-like) ************ > fitwlsi1e <- systemfit( system, "WLS", data = Kmenta, methodResidCov = "noDfCor", + maxit = 100, x = TRUE, useMatrix = useMatrix ) > print( summary( fitwlsi1e, useDfSys = TRUE ) ) systemfit results method: WLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 33 156 3.02 0.709 0.537 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 63.3 3.73 1.93 0.764 0.736 supply 20 16 92.6 5.78 2.40 0.655 0.590 The covariance matrix of the residuals used for estimation demand supply demand 3.17 0.00 supply 0.00 4.63 The covariance matrix of the residuals demand supply demand 3.17 3.41 supply 3.41 4.63 The correlations of the residuals demand supply demand 1.000 0.891 supply 0.891 1.000 WLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Estimate Std. Error t value Pr(>|t|) (Intercept) 99.8954 6.9325 14.41 8.9e-16 *** price -0.3163 0.0836 -3.78 0.00062 *** income 0.3346 0.0419 7.99 3.2e-09 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.93 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 63.332 MSE: 3.725 Root MSE: 1.93 Multiple R-Squared: 0.764 Adjusted R-Squared: 0.736 WLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 58.2754 10.2527 5.68 2.4e-06 *** price 0.1604 0.0849 1.89 0.0676 . farmPrice 0.2481 0.0413 6.01 9.5e-07 *** trend 0.2483 0.0872 2.85 0.0075 ** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.405 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 92.551 MSE: 5.784 Root MSE: 2.405 Multiple R-Squared: 0.655 Adjusted R-Squared: 0.59 > > ## ****** iterated WLS with cross-equation restriction *************** > fitwlsi2 <- systemfit( system, "WLS", data = Kmenta, restrict.matrix = restrm, + maxit = 100, x = TRUE, useMatrix = useMatrix ) > print( summary( fitwlsi2 ) ) systemfit results method: iterated WLS convergence achieved after 3 iterations N DF SSR detRCov OLS-R2 McElroy-R2 system 40 34 159 2.34 0.703 0.623 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 63.7 3.75 1.94 0.762 0.734 supply 20 16 95.6 5.98 2.44 0.643 0.576 The covariance matrix of the residuals used for estimation demand supply demand 3.75 0.00 supply 0.00 5.98 The covariance matrix of the residuals demand supply demand 3.75 4.48 supply 4.48 5.98 The correlations of the residuals demand supply demand 1.000 0.946 supply 0.946 1.000 WLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Estimate Std. Error t value Pr(>|t|) (Intercept) 99.6607 7.5378 13.22 5.8e-15 *** price -0.2993 0.0884 -3.39 0.0018 ** income 0.3196 0.0414 7.72 5.6e-09 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.936 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 63.741 MSE: 3.749 Root MSE: 1.936 Multiple R-Squared: 0.762 Adjusted R-Squared: 0.734 WLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 56.1830 11.3487 4.95 2.0e-05 *** price 0.1643 0.0963 1.71 0.097 . farmPrice 0.2580 0.0453 5.70 2.1e-06 *** trend 0.3196 0.0414 7.72 5.6e-09 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.445 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 95.641 MSE: 5.978 Root MSE: 2.445 Multiple R-Squared: 0.643 Adjusted R-Squared: 0.576 > > ## ****** iterated WLS with cross-equation restriction (EViews-like) ******** > fitwlsi2e <- systemfit( system, "WLS", data = Kmenta, restrict.matrix = restrm, + methodResidCov = "noDfCor", maxit = 100, useMatrix = useMatrix ) > print( summary( fitwlsi2e ) ) systemfit results method: iterated WLS convergence achieved after 3 iterations N DF SSR detRCov OLS-R2 McElroy-R2 system 40 34 159 1.6 0.703 0.589 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 63.8 3.75 1.94 0.762 0.734 supply 20 16 95.6 5.97 2.44 0.644 0.577 The covariance matrix of the residuals used for estimation demand supply demand 3.19 0.00 supply 0.00 4.78 The covariance matrix of the residuals demand supply demand 3.19 3.69 supply 3.69 4.78 The correlations of the residuals demand supply demand 1.000 0.946 supply 0.946 1.000 WLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Estimate Std. Error t value Pr(>|t|) (Intercept) 99.6484 6.9516 14.33 4.4e-16 *** price -0.2984 0.0814 -3.67 0.00083 *** income 0.3188 0.0380 8.39 8.4e-10 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.937 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 63.785 MSE: 3.752 Root MSE: 1.937 Multiple R-Squared: 0.762 Adjusted R-Squared: 0.734 WLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 56.2061 10.1500 5.54 3.4e-06 *** price 0.1642 0.0861 1.91 0.065 . farmPrice 0.2579 0.0405 6.37 2.9e-07 *** trend 0.3188 0.0380 8.39 8.4e-10 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.444 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 95.573 MSE: 5.973 Root MSE: 2.444 Multiple R-Squared: 0.644 Adjusted R-Squared: 0.577 > > ## ******* iterated WLS with cross-equation restriction via restrict.regMat ********** > fitwlsi3 <- systemfit( system, "WLS", data = Kmenta, restrict.regMat = tc, + maxit = 100, x = TRUE, useMatrix = useMatrix ) > print( summary( fitwlsi3 ) ) systemfit results method: iterated WLS convergence achieved after 3 iterations N DF SSR detRCov OLS-R2 McElroy-R2 system 40 34 159 2.34 0.703 0.623 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 63.7 3.75 1.94 0.762 0.734 supply 20 16 95.6 5.98 2.44 0.643 0.576 The covariance matrix of the residuals used for estimation demand supply demand 3.75 0.00 supply 0.00 5.98 The covariance matrix of the residuals demand supply demand 3.75 4.48 supply 4.48 5.98 The correlations of the residuals demand supply demand 1.000 0.946 supply 0.946 1.000 WLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Estimate Std. Error t value Pr(>|t|) (Intercept) 99.6607 7.5378 13.22 5.8e-15 *** price -0.2993 0.0884 -3.39 0.0018 ** income 0.3196 0.0414 7.72 5.6e-09 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.936 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 63.741 MSE: 3.749 Root MSE: 1.936 Multiple R-Squared: 0.762 Adjusted R-Squared: 0.734 WLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 56.1830 11.3487 4.95 2.0e-05 *** price 0.1643 0.0963 1.71 0.097 . farmPrice 0.2580 0.0453 5.70 2.1e-06 *** trend 0.3196 0.0414 7.72 5.6e-09 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.445 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 95.641 MSE: 5.978 Root MSE: 2.445 Multiple R-Squared: 0.643 Adjusted R-Squared: 0.576 > > ## ******* iterated WLS with cross-equation restriction via restrict.regMat (EViews-like) *** > fitwlsi3e <- systemfit( system, "WLS", data = Kmenta, restrict.regMat = tc, + methodResidCov = "noDfCor", maxit = 100, useMatrix = useMatrix ) > print( summary( fitwlsi3e ) ) systemfit results method: iterated WLS convergence achieved after 3 iterations N DF SSR detRCov OLS-R2 McElroy-R2 system 40 34 159 1.6 0.703 0.589 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 63.8 3.75 1.94 0.762 0.734 supply 20 16 95.6 5.97 2.44 0.644 0.577 The covariance matrix of the residuals used for estimation demand supply demand 3.19 0.00 supply 0.00 4.78 The covariance matrix of the residuals demand supply demand 3.19 3.69 supply 3.69 4.78 The correlations of the residuals demand supply demand 1.000 0.946 supply 0.946 1.000 WLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Estimate Std. Error t value Pr(>|t|) (Intercept) 99.6484 6.9516 14.33 4.4e-16 *** price -0.2984 0.0814 -3.67 0.00083 *** income 0.3188 0.0380 8.39 8.4e-10 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.937 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 63.785 MSE: 3.752 Root MSE: 1.937 Multiple R-Squared: 0.762 Adjusted R-Squared: 0.734 WLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 56.2061 10.1500 5.54 3.4e-06 *** price 0.1642 0.0861 1.91 0.065 . farmPrice 0.2579 0.0405 6.37 2.9e-07 *** trend 0.3188 0.0380 8.39 8.4e-10 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.444 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 95.573 MSE: 5.973 Root MSE: 2.444 Multiple R-Squared: 0.644 Adjusted R-Squared: 0.577 > nobs( fitwlsi3e ) [1] 40 > > ## ******* iterated WLS with 2 cross-equation restrictions *********** > fitwlsi4 <- systemfit( system, "WLS", data = Kmenta, restrict.matrix = restr2m, + restrict.rhs = restr2q, maxit = 100, useMatrix = useMatrix ) > print( summary( fitwlsi4 ) ) systemfit results method: iterated WLS convergence achieved after 3 iterations N DF SSR detRCov OLS-R2 McElroy-R2 system 40 35 160 2.51 0.702 0.619 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 63.6 3.74 1.94 0.763 0.735 supply 20 16 96.3 6.02 2.45 0.641 0.574 The covariance matrix of the residuals used for estimation demand supply demand 3.74 0.00 supply 0.00 6.02 The covariance matrix of the residuals demand supply demand 3.74 4.47 supply 4.47 6.02 The correlations of the residuals demand supply demand 1.000 0.943 supply 0.943 1.000 WLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Estimate Std. Error t value Pr(>|t|) (Intercept) 100.9031 6.0396 16.71 < 2e-16 *** price -0.3159 0.0648 -4.88 2.3e-05 *** income 0.3239 0.0384 8.43 6.0e-10 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.935 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 63.63 MSE: 3.743 Root MSE: 1.935 Multiple R-Squared: 0.763 Adjusted R-Squared: 0.735 WLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 53.9379 7.9718 6.77 7.7e-08 *** price 0.1841 0.0648 2.84 0.0075 ** farmPrice 0.2603 0.0447 5.83 1.3e-06 *** trend 0.3239 0.0384 8.43 6.0e-10 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.453 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 96.277 MSE: 6.017 Root MSE: 2.453 Multiple R-Squared: 0.641 Adjusted R-Squared: 0.574 > > ## ******* iterated WLS with 2 cross-equation restrictions (EViews-like) ***** > fitwlsi4e <- systemfit( system, "WLS", data = Kmenta, methodResidCov = "noDfCor", + restrict.matrix = restr2m, restrict.rhs = restr2q, maxit = 100, + x = TRUE, useMatrix = useMatrix ) > print( summary( fitwlsi4e ) ) systemfit results method: iterated WLS convergence achieved after 3 iterations N DF SSR detRCov OLS-R2 McElroy-R2 system 40 35 160 1.72 0.702 0.586 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 63.7 3.75 1.94 0.763 0.735 supply 20 16 96.2 6.01 2.45 0.641 0.574 The covariance matrix of the residuals used for estimation demand supply demand 3.18 0.00 supply 0.00 4.81 The covariance matrix of the residuals demand supply demand 3.18 3.69 supply 3.69 4.81 The correlations of the residuals demand supply demand 1.000 0.942 supply 0.942 1.000 WLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Estimate Std. Error t value Pr(>|t|) (Intercept) 100.9662 5.5170 18.30 < 2e-16 *** price -0.3160 0.0589 -5.37 5.2e-06 *** income 0.3234 0.0352 9.20 7.3e-11 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.935 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 63.665 MSE: 3.745 Root MSE: 1.935 Multiple R-Squared: 0.763 Adjusted R-Squared: 0.735 WLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 53.9595 7.2114 7.48 9.2e-09 *** price 0.1840 0.0589 3.13 0.0036 ** farmPrice 0.2602 0.0400 6.51 1.6e-07 *** trend 0.3234 0.0352 9.20 7.3e-11 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.452 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 96.223 MSE: 6.014 Root MSE: 2.452 Multiple R-Squared: 0.641 Adjusted R-Squared: 0.574 > > ## ***** iterated WLS with 2 cross-equation restrictions via R and restrict.regMat ****** > fitwlsi5 <- systemfit( system, "WLS", data = Kmenta, restrict.matrix = restr3m, + restrict.rhs = restr3q, restrict.regMat = tc, maxit = 100, + x = TRUE, useMatrix = useMatrix ) > print( summary( fitwlsi5 ) ) systemfit results method: iterated WLS convergence achieved after 3 iterations N DF SSR detRCov OLS-R2 McElroy-R2 system 40 35 160 2.51 0.702 0.619 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 63.6 3.74 1.94 0.763 0.735 supply 20 16 96.3 6.02 2.45 0.641 0.574 The covariance matrix of the residuals used for estimation demand supply demand 3.74 0.00 supply 0.00 6.02 The covariance matrix of the residuals demand supply demand 3.74 4.47 supply 4.47 6.02 The correlations of the residuals demand supply demand 1.000 0.943 supply 0.943 1.000 WLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Estimate Std. Error t value Pr(>|t|) (Intercept) 100.9031 6.0396 16.71 < 2e-16 *** price -0.3159 0.0648 -4.88 2.3e-05 *** income 0.3239 0.0384 8.43 6.0e-10 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.935 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 63.63 MSE: 3.743 Root MSE: 1.935 Multiple R-Squared: 0.763 Adjusted R-Squared: 0.735 WLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 53.9379 7.9718 6.77 7.7e-08 *** price 0.1841 0.0648 2.84 0.0075 ** farmPrice 0.2603 0.0447 5.83 1.3e-06 *** trend 0.3239 0.0384 8.43 6.0e-10 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.453 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 96.277 MSE: 6.017 Root MSE: 2.453 Multiple R-Squared: 0.641 Adjusted R-Squared: 0.574 > > ## *** iterated WLS with 2 cross-equation restrictions via R and restrict.regMat (EViews-like) > fitwlsi5e <- systemfit( system, "WLS", data = Kmenta, methodResidCov = "noDfCor", + restrict.matrix = restr3m, restrict.rhs = restr3q, restrict.regMat = tc, + maxit = 100, useMatrix = useMatrix ) > print( summary( fitwlsi5e ) ) systemfit results method: iterated WLS convergence achieved after 3 iterations N DF SSR detRCov OLS-R2 McElroy-R2 system 40 35 160 1.72 0.702 0.586 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 63.7 3.75 1.94 0.763 0.735 supply 20 16 96.2 6.01 2.45 0.641 0.574 The covariance matrix of the residuals used for estimation demand supply demand 3.18 0.00 supply 0.00 4.81 The covariance matrix of the residuals demand supply demand 3.18 3.69 supply 3.69 4.81 The correlations of the residuals demand supply demand 1.000 0.942 supply 0.942 1.000 WLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Estimate Std. Error t value Pr(>|t|) (Intercept) 100.9662 5.5170 18.30 < 2e-16 *** price -0.3160 0.0589 -5.37 5.2e-06 *** income 0.3234 0.0352 9.20 7.3e-11 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.935 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 63.665 MSE: 3.745 Root MSE: 1.935 Multiple R-Squared: 0.763 Adjusted R-Squared: 0.735 WLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 53.9595 7.2114 7.48 9.2e-09 *** price 0.1840 0.0589 3.13 0.0036 ** farmPrice 0.2602 0.0400 6.51 1.6e-07 *** trend 0.3234 0.0352 9.20 7.3e-11 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.452 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 96.223 MSE: 6.014 Root MSE: 2.452 Multiple R-Squared: 0.641 Adjusted R-Squared: 0.574 > > > ## *********** estimations with a single regressor ************ > fitwlsS1 <- systemfit( + list( consump ~ price - 1, consump ~ price + trend ), "WLS", + data = Kmenta, useMatrix = useMatrix ) > print( summary( fitwlsS1 ) ) systemfit results method: WLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 36 1121 484 -1.09 -1.05 N DF SSR MSE RMSE R2 Adj R2 eq1 20 19 861 45.3 6.73 -2.213 -2.213 eq2 20 17 259 15.3 3.91 0.032 -0.082 The covariance matrix of the residuals used for estimation eq1 eq2 eq1 45.3 0.0 eq2 0.0 15.3 The covariance matrix of the residuals eq1 eq2 eq1 45.3 14.4 eq2 14.4 15.3 The correlations of the residuals eq1 eq2 eq1 1.000 0.549 eq2 0.549 1.000 WLS estimates for 'eq1' (equation 1) Model Formula: consump ~ price - 1 Estimate Std. Error t value Pr(>|t|) price 1.006 0.015 66.9 <2e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 6.733 on 19 degrees of freedom Number of observations: 20 Degrees of Freedom: 19 SSR: 861.449 MSE: 45.339 Root MSE: 6.733 Multiple R-Squared: -2.213 Adjusted R-Squared: -2.213 WLS estimates for 'eq2' (equation 2) Model Formula: consump ~ price + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 93.6767 15.2367 6.15 1.1e-05 *** price 0.0622 0.1513 0.41 0.69 trend 0.0953 0.1515 0.63 0.54 --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 3.907 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 259.497 MSE: 15.265 Root MSE: 3.907 Multiple R-Squared: 0.032 Adjusted R-Squared: -0.082 > fitwlsS2 <- systemfit( + list( consump ~ price - 1, consump ~ trend - 1 ), "WLS", + data = Kmenta, useMatrix = useMatrix ) > print( summary( fitwlsS2 ) ) systemfit results method: WLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 38 47370 110957 -87.3 -5.28 N DF SSR MSE RMSE R2 Adj R2 eq1 20 19 861 45.3 6.73 -2.21 -2.21 eq2 20 19 46509 2447.8 49.48 -172.47 -172.47 The covariance matrix of the residuals used for estimation eq1 eq2 eq1 45.3 0 eq2 0.0 2448 The covariance matrix of the residuals eq1 eq2 eq1 45.34 -5.15 eq2 -5.15 2447.84 The correlations of the residuals eq1 eq2 eq1 1.0000 -0.0439 eq2 -0.0439 1.0000 WLS estimates for 'eq1' (equation 1) Model Formula: consump ~ price - 1 Estimate Std. Error t value Pr(>|t|) price 1.006 0.015 66.9 <2e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 6.733 on 19 degrees of freedom Number of observations: 20 Degrees of Freedom: 19 SSR: 861.449 MSE: 45.339 Root MSE: 6.733 Multiple R-Squared: -2.213 Adjusted R-Squared: -2.213 WLS estimates for 'eq2' (equation 2) Model Formula: consump ~ trend - 1 Estimate Std. Error t value Pr(>|t|) trend 7.405 0.924 8.02 1.6e-07 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 49.476 on 19 degrees of freedom Number of observations: 20 Degrees of Freedom: 19 SSR: 46508.922 MSE: 2447.838 Root MSE: 49.476 Multiple R-Squared: -172.467 Adjusted R-Squared: -172.467 > fitwlsS3 <- systemfit( + list( consump ~ trend - 1, price ~ trend - 1 ), "WLS", + data = Kmenta, useMatrix = useMatrix ) > print( summary( fitwlsS3 ) ) systemfit results method: WLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 38 93537 108970 -99 -0.977 N DF SSR MSE RMSE R2 Adj R2 eq1 20 19 46509 2448 49.5 -172.5 -172.5 eq2 20 19 47028 2475 49.8 -69.5 -69.5 The covariance matrix of the residuals used for estimation eq1 eq2 eq1 2448 0 eq2 0 2475 The covariance matrix of the residuals eq1 eq2 eq1 2448 2439 eq2 2439 2475 The correlations of the residuals eq1 eq2 eq1 1.000 0.988 eq2 0.988 1.000 WLS estimates for 'eq1' (equation 1) Model Formula: consump ~ trend - 1 Estimate Std. Error t value Pr(>|t|) trend 7.405 0.924 8.02 1.6e-07 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 49.476 on 19 degrees of freedom Number of observations: 20 Degrees of Freedom: 19 SSR: 46508.922 MSE: 2447.838 Root MSE: 49.476 Multiple R-Squared: -172.467 Adjusted R-Squared: -172.467 WLS estimates for 'eq2' (equation 2) Model Formula: price ~ trend - 1 Estimate Std. Error t value Pr(>|t|) trend 7.318 0.929 7.88 2.1e-07 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 49.751 on 19 degrees of freedom Number of observations: 20 Degrees of Freedom: 19 SSR: 47028.107 MSE: 2475.164 Root MSE: 49.751 Multiple R-Squared: -69.48 Adjusted R-Squared: -69.48 > fitwlsS4 <- systemfit( + list( consump ~ trend - 1, price ~ trend - 1 ), "WLS", + data = Kmenta, restrict.matrix = matrix( c( 1, -1 ), nrow = 1 ), + useMatrix = useMatrix ) > print( summary( fitwlsS4 ) ) systemfit results method: WLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 39 93548 111736 -99 -1.03 N DF SSR MSE RMSE R2 Adj R2 eq1 20 19 46514 2448 49.5 -172.5 -172.5 eq2 20 19 47034 2475 49.8 -69.5 -69.5 The covariance matrix of the residuals used for estimation eq1 eq2 eq1 2448 0 eq2 0 2475 The covariance matrix of the residuals eq1 eq2 eq1 2448 2439 eq2 2439 2475 The correlations of the residuals eq1 eq2 eq1 1.000 0.988 eq2 0.988 1.000 WLS estimates for 'eq1' (equation 1) Model Formula: consump ~ trend - 1 Estimate Std. Error t value Pr(>|t|) trend 7.362 0.655 11.2 8.4e-14 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 49.478 on 19 degrees of freedom Number of observations: 20 Degrees of Freedom: 19 SSR: 46514.224 MSE: 2448.117 Root MSE: 49.478 Multiple R-Squared: -172.487 Adjusted R-Squared: -172.487 WLS estimates for 'eq2' (equation 2) Model Formula: price ~ trend - 1 Estimate Std. Error t value Pr(>|t|) trend 7.362 0.655 11.2 8.4e-14 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 49.754 on 19 degrees of freedom Number of observations: 20 Degrees of Freedom: 19 SSR: 47033.528 MSE: 2475.449 Root MSE: 49.754 Multiple R-Squared: -69.488 Adjusted R-Squared: -69.488 > fitwlsS5 <- systemfit( + list( consump ~ 1, price ~ 1 ), "WLS", + data = Kmenta, useMatrix = useMatrix ) > print( summary( fitwlsS5) ) systemfit results method: WLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 38 935 491 0 0 N DF SSR MSE RMSE R2 Adj R2 eq1 20 19 268 14.1 3.76 0 0 eq2 20 19 667 35.1 5.93 0 0 The covariance matrix of the residuals used for estimation eq1 eq2 eq1 14.1 0.0 eq2 0.0 35.1 The covariance matrix of the residuals eq1 eq2 eq1 14.11 2.18 eq2 2.18 35.12 The correlations of the residuals eq1 eq2 eq1 1.0000 0.0981 eq2 0.0981 1.0000 WLS estimates for 'eq1' (equation 1) Model Formula: consump ~ 1 Estimate Std. Error t value Pr(>|t|) (Intercept) 100.90 0.84 120 <2e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 3.756 on 19 degrees of freedom Number of observations: 20 Degrees of Freedom: 19 SSR: 268.114 MSE: 14.111 Root MSE: 3.756 Multiple R-Squared: 0 Adjusted R-Squared: 0 WLS estimates for 'eq2' (equation 2) Model Formula: price ~ 1 Estimate Std. Error t value Pr(>|t|) (Intercept) 100.02 1.33 75.5 <2e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 5.926 on 19 degrees of freedom Number of observations: 20 Degrees of Freedom: 19 SSR: 667.251 MSE: 35.118 Root MSE: 5.926 Multiple R-Squared: 0 Adjusted R-Squared: 0 > > > ## **************** shorter summaries ********************** > print( summary( fitwls1 ), residCov = FALSE, equations = FALSE ) systemfit results method: WLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 33 156 4.43 0.709 0.558 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 63.3 3.73 1.93 0.764 0.736 supply 20 16 92.6 5.78 2.40 0.655 0.590 Coefficients: Estimate Std. Error t value Pr(>|t|) demand_(Intercept) 99.8954 7.5194 13.29 2.1e-10 *** demand_price -0.3163 0.0907 -3.49 0.00282 ** demand_income 0.3346 0.0454 7.37 1.1e-06 *** supply_(Intercept) 58.2754 11.4629 5.08 0.00011 *** supply_price 0.1604 0.0949 1.69 0.11039 supply_farmPrice 0.2481 0.0462 5.37 6.2e-05 *** supply_trend 0.2483 0.0975 2.55 0.02157 * --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 > > print( summary( fitwls2e, useDfSys = FALSE, residCov = FALSE ), + equations = FALSE ) systemfit results method: WLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 34 159 1.61 0.703 0.589 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 63.8 3.75 1.94 0.762 0.734 supply 20 16 95.6 5.97 2.44 0.644 0.577 Coefficients: Estimate Std. Error t value Pr(>|t|) demand_(Intercept) 99.6461 6.9734 14.29 6.7e-11 *** demand_price -0.2982 0.0816 -3.65 0.002 ** demand_income 0.3186 0.0381 8.37 2.0e-07 *** supply_(Intercept) 56.2104 10.1248 5.55 4.4e-05 *** supply_price 0.1642 0.0859 1.91 0.074 . supply_farmPrice 0.2579 0.0404 6.38 9.1e-06 *** supply_trend 0.3186 0.0381 8.37 3.1e-07 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 > > print( summary( fitwls3 ), residCov = FALSE ) systemfit results method: WLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 34 159 2.35 0.703 0.622 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 63.8 3.75 1.94 0.762 0.734 supply 20 16 95.6 5.98 2.44 0.643 0.576 WLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Estimate Std. Error t value Pr(>|t|) (Intercept) 99.6582 7.5640 13.18 6.4e-15 *** price -0.2991 0.0887 -3.37 0.0019 ** income 0.3194 0.0415 7.70 6.0e-09 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.936 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 63.75 MSE: 3.75 Root MSE: 1.936 Multiple R-Squared: 0.762 Adjusted R-Squared: 0.734 WLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 56.1877 11.3165 4.97 1.9e-05 *** price 0.1643 0.0960 1.71 0.096 . farmPrice 0.2580 0.0451 5.71 2.0e-06 *** trend 0.3194 0.0415 7.70 6.0e-09 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.445 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 95.627 MSE: 5.977 Root MSE: 2.445 Multiple R-Squared: 0.643 Adjusted R-Squared: 0.576 > > print( summary( fitwls4e, residCov = FALSE, equations = FALSE ) ) systemfit results method: WLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 35 160 1.72 0.702 0.586 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 63.7 3.75 1.94 0.763 0.735 supply 20 16 96.2 6.01 2.45 0.641 0.574 Coefficients: Estimate Std. Error t value Pr(>|t|) demand_(Intercept) 100.9762 5.5234 18.28 < 2e-16 *** demand_price -0.3160 0.0589 -5.37 5.3e-06 *** demand_income 0.3233 0.0352 9.18 7.6e-11 *** supply_(Intercept) 53.9630 7.2089 7.49 9.1e-09 *** supply_price 0.1840 0.0589 3.13 0.0036 ** supply_farmPrice 0.2602 0.0399 6.53 1.6e-07 *** supply_trend 0.3233 0.0352 9.18 7.6e-11 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 > > print( summary( fitwls5, useDfSys = FALSE ), residCov = FALSE ) systemfit results method: WLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 35 160 2.51 0.702 0.619 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 63.6 3.74 1.94 0.763 0.735 supply 20 16 96.3 6.02 2.45 0.641 0.574 WLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Estimate Std. Error t value Pr(>|t|) (Intercept) 100.9138 6.0474 16.69 5.6e-12 *** price -0.3160 0.0648 -4.87 0.00014 *** income 0.3238 0.0385 8.42 1.8e-07 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.935 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 63.636 MSE: 3.743 Root MSE: 1.935 Multiple R-Squared: 0.763 Adjusted R-Squared: 0.735 WLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 53.9416 7.9687 6.77 4.5e-06 *** price 0.1840 0.0648 2.84 0.012 * farmPrice 0.2603 0.0446 5.84 2.5e-05 *** trend 0.3238 0.0385 8.42 2.9e-07 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.453 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 96.268 MSE: 6.017 Root MSE: 2.453 Multiple R-Squared: 0.641 Adjusted R-Squared: 0.574 > > print( summary( fitwlsi1e, useDfSys = TRUE, equations = FALSE ) ) systemfit results method: WLS N DF SSR detRCov OLS-R2 McElroy-R2 system 40 33 156 3.02 0.709 0.537 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 63.3 3.73 1.93 0.764 0.736 supply 20 16 92.6 5.78 2.40 0.655 0.590 The covariance matrix of the residuals used for estimation demand supply demand 3.17 0.00 supply 0.00 4.63 The covariance matrix of the residuals demand supply demand 3.17 3.41 supply 3.41 4.63 The correlations of the residuals demand supply demand 1.000 0.891 supply 0.891 1.000 Coefficients: Estimate Std. Error t value Pr(>|t|) demand_(Intercept) 99.8954 6.9325 14.41 8.9e-16 *** demand_price -0.3163 0.0836 -3.78 0.00062 *** demand_income 0.3346 0.0419 7.99 3.2e-09 *** supply_(Intercept) 58.2754 10.2527 5.68 2.4e-06 *** supply_price 0.1604 0.0849 1.89 0.06762 . supply_farmPrice 0.2481 0.0413 6.01 9.5e-07 *** supply_trend 0.2483 0.0872 2.85 0.00754 ** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 > > print( summary( fitwlsi2, equations = FALSE, residCov = FALSE ), + residCov = TRUE ) systemfit results method: iterated WLS convergence achieved after 3 iterations N DF SSR detRCov OLS-R2 McElroy-R2 system 40 34 159 2.34 0.703 0.623 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 63.7 3.75 1.94 0.762 0.734 supply 20 16 95.6 5.98 2.44 0.643 0.576 The covariance matrix of the residuals used for estimation demand supply demand 3.75 0.00 supply 0.00 5.98 The covariance matrix of the residuals demand supply demand 3.75 4.48 supply 4.48 5.98 The correlations of the residuals demand supply demand 1.000 0.946 supply 0.946 1.000 Coefficients: Estimate Std. Error t value Pr(>|t|) demand_(Intercept) 99.6607 7.5378 13.22 5.8e-15 *** demand_price -0.2993 0.0884 -3.39 0.0018 ** demand_income 0.3196 0.0414 7.72 5.6e-09 *** supply_(Intercept) 56.1830 11.3487 4.95 2.0e-05 *** supply_price 0.1643 0.0963 1.71 0.0972 . supply_farmPrice 0.2580 0.0453 5.70 2.1e-06 *** supply_trend 0.3196 0.0414 7.72 5.6e-09 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 > > print( summary( fitwlsi3e ), equations = FALSE, residCov = FALSE ) systemfit results method: iterated WLS convergence achieved after 3 iterations N DF SSR detRCov OLS-R2 McElroy-R2 system 40 34 159 1.6 0.703 0.589 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 63.8 3.75 1.94 0.762 0.734 supply 20 16 95.6 5.97 2.44 0.644 0.577 Coefficients: Estimate Std. Error t value Pr(>|t|) demand_(Intercept) 99.6484 6.9516 14.33 4.4e-16 *** demand_price -0.2984 0.0814 -3.67 0.00083 *** demand_income 0.3188 0.0380 8.39 8.4e-10 *** supply_(Intercept) 56.2061 10.1500 5.54 3.4e-06 *** supply_price 0.1642 0.0861 1.91 0.06502 . supply_farmPrice 0.2579 0.0405 6.37 2.9e-07 *** supply_trend 0.3188 0.0380 8.39 8.4e-10 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 > > print( summary( fitwlsi4, equations = FALSE ), equations = TRUE ) systemfit results method: iterated WLS convergence achieved after 3 iterations N DF SSR detRCov OLS-R2 McElroy-R2 system 40 35 160 2.51 0.702 0.619 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 63.6 3.74 1.94 0.763 0.735 supply 20 16 96.3 6.02 2.45 0.641 0.574 The covariance matrix of the residuals used for estimation demand supply demand 3.74 0.00 supply 0.00 6.02 The covariance matrix of the residuals demand supply demand 3.74 4.47 supply 4.47 6.02 The correlations of the residuals demand supply demand 1.000 0.943 supply 0.943 1.000 WLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Estimate Std. Error t value Pr(>|t|) (Intercept) 100.9031 6.0396 16.71 < 2e-16 *** price -0.3159 0.0648 -4.88 2.3e-05 *** income 0.3239 0.0384 8.43 6.0e-10 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.935 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 63.63 MSE: 3.743 Root MSE: 1.935 Multiple R-Squared: 0.763 Adjusted R-Squared: 0.735 WLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 53.9379 7.9718 6.77 7.7e-08 *** price 0.1841 0.0648 2.84 0.0075 ** farmPrice 0.2603 0.0447 5.83 1.3e-06 *** trend 0.3239 0.0384 8.43 6.0e-10 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.453 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 96.277 MSE: 6.017 Root MSE: 2.453 Multiple R-Squared: 0.641 Adjusted R-Squared: 0.574 > > print( summary( fitwlsi5e, useDfSys = FALSE, residCov = FALSE ) ) systemfit results method: iterated WLS convergence achieved after 3 iterations N DF SSR detRCov OLS-R2 McElroy-R2 system 40 35 160 1.72 0.702 0.586 N DF SSR MSE RMSE R2 Adj R2 demand 20 17 63.7 3.75 1.94 0.763 0.735 supply 20 16 96.2 6.01 2.45 0.641 0.574 WLS estimates for 'demand' (equation 1) Model Formula: consump ~ price + income Estimate Std. Error t value Pr(>|t|) (Intercept) 100.9662 5.5170 18.30 1.3e-12 *** price -0.3160 0.0589 -5.37 5.1e-05 *** income 0.3234 0.0352 9.20 5.2e-08 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.935 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 63.665 MSE: 3.745 Root MSE: 1.935 Multiple R-Squared: 0.763 Adjusted R-Squared: 0.735 WLS estimates for 'supply' (equation 2) Model Formula: consump ~ price + farmPrice + trend Estimate Std. Error t value Pr(>|t|) (Intercept) 53.9595 7.2114 7.48 1.3e-06 *** price 0.1840 0.0589 3.13 0.0065 ** farmPrice 0.2602 0.0400 6.51 7.2e-06 *** trend 0.3234 0.0352 9.20 8.7e-08 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.452 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 96.223 MSE: 6.014 Root MSE: 2.452 Multiple R-Squared: 0.641 Adjusted R-Squared: 0.574 > > > ## ****************** residuals ************************** > print( residuals( fitwls1 ) ) demand supply 1 1.074 -0.444 2 -0.390 -0.896 3 2.625 1.965 4 1.802 1.134 5 1.946 1.514 6 1.175 0.680 7 1.530 1.569 8 -2.933 -4.407 9 -1.365 -2.599 10 2.031 2.469 11 -0.149 -0.598 12 -1.954 -1.697 13 -1.121 -1.064 14 -0.220 0.970 15 1.487 3.159 16 -3.701 -3.866 17 -1.273 -0.265 18 -2.002 -2.449 19 1.738 3.110 20 -0.299 1.714 > print( residuals( fitwls1$eq[[ 2 ]] ) ) 1 2 3 4 5 6 7 8 9 10 11 -0.444 -0.896 1.965 1.134 1.514 0.680 1.569 -4.407 -2.599 2.469 -0.598 12 13 14 15 16 17 18 19 20 -1.697 -1.064 0.970 3.159 -3.866 -0.265 -2.449 3.110 1.714 > > print( residuals( fitwls2e ) ) demand supply 1 0.9069 0.209 2 -0.4660 -0.338 3 2.5495 2.455 4 1.7320 1.560 5 2.0183 1.771 6 1.2321 0.886 7 1.6019 1.724 8 -2.8544 -4.378 9 -1.3158 -2.597 10 2.0517 2.500 11 -0.3823 -0.455 12 -2.2623 -1.525 13 -1.3801 -1.001 14 -0.3081 0.877 15 1.6643 2.806 16 -3.5513 -4.328 17 -1.0466 -0.805 18 -1.9647 -2.952 19 1.8446 2.561 20 -0.0697 1.029 > print( residuals( fitwls2e$eq[[ 1 ]] ) ) 1 2 3 4 5 6 7 8 9 10 0.9069 -0.4660 2.5495 1.7320 2.0183 1.2321 1.6019 -2.8544 -1.3158 2.0517 11 12 13 14 15 16 17 18 19 20 -0.3823 -2.2623 -1.3801 -0.3081 1.6643 -3.5513 -1.0466 -1.9647 1.8446 -0.0697 > > print( residuals( fitwls3 ) ) demand supply 1 0.9150 0.217 2 -0.4624 -0.332 3 2.5532 2.461 4 1.7354 1.564 5 2.0148 1.773 6 1.2293 0.889 7 1.5984 1.725 8 -2.8582 -4.378 9 -1.3182 -2.597 10 2.0507 2.500 11 -0.3710 -0.453 12 -2.2473 -1.524 13 -1.3675 -1.000 14 -0.3038 0.876 15 1.6557 2.802 16 -3.5586 -4.333 17 -1.0576 -0.811 18 -1.9666 -2.957 19 1.8394 2.555 20 -0.0808 1.022 > print( residuals( fitwls3$eq[[ 2 ]] ) ) 1 2 3 4 5 6 7 8 9 10 11 0.217 -0.332 2.461 1.564 1.773 0.889 1.725 -4.378 -2.597 2.500 -0.453 12 13 14 15 16 17 18 19 20 -1.524 -1.000 0.876 2.802 -4.333 -0.811 -2.957 2.555 1.022 > > print( residuals( fitwls4e ) ) demand supply 1 0.9593 0.244 2 -0.3907 -0.388 3 2.6143 2.417 4 1.8088 1.498 5 1.9718 1.803 6 1.2083 0.892 7 1.5943 1.699 8 -2.8174 -4.491 9 -1.3751 -2.548 10 1.9351 2.667 11 -0.4019 -0.284 12 -2.1883 -1.443 13 -1.2686 -1.010 14 -0.2984 0.921 15 1.5512 2.869 16 -3.6143 -4.342 17 -1.2823 -0.600 18 -1.9253 -3.056 19 1.8860 2.425 20 0.0333 0.728 > print( residuals( fitwls4e$eq[[ 1 ]] ) ) 1 2 3 4 5 6 7 8 9 10 0.9593 -0.3907 2.6143 1.8088 1.9718 1.2083 1.5943 -2.8174 -1.3751 1.9351 11 12 13 14 15 16 17 18 19 20 -0.4019 -2.1883 -1.2686 -0.2984 1.5512 -3.6143 -1.2823 -1.9253 1.8860 0.0333 > > print( residuals( fitwls5 ) ) demand supply 1 0.9649 0.249 2 -0.3911 -0.384 3 2.6145 2.421 4 1.8081 1.501 5 1.9707 1.805 6 1.2067 0.893 7 1.5910 1.700 8 -2.8235 -4.491 9 -1.3743 -2.548 10 1.9406 2.667 11 -0.3887 -0.282 12 -2.1767 -1.442 13 -1.2616 -1.009 14 -0.2944 0.920 15 1.5485 2.866 16 -3.6185 -4.345 17 -1.2806 -0.604 18 -1.9295 -3.060 19 1.8782 2.420 20 0.0157 0.721 > print( residuals( fitwls5$eq[[ 2 ]] ) ) 1 2 3 4 5 6 7 8 9 10 11 0.249 -0.384 2.421 1.501 1.805 0.893 1.700 -4.491 -2.548 2.667 -0.282 12 13 14 15 16 17 18 19 20 -1.442 -1.009 0.920 2.866 -4.345 -0.604 -3.060 2.420 0.721 > > print( residuals( fitwlsi1e ) ) demand supply 1 1.074 -0.444 2 -0.390 -0.896 3 2.625 1.965 4 1.802 1.134 5 1.946 1.514 6 1.175 0.680 7 1.530 1.569 8 -2.933 -4.407 9 -1.365 -2.599 10 2.031 2.469 11 -0.149 -0.598 12 -1.954 -1.697 13 -1.121 -1.064 14 -0.220 0.970 15 1.487 3.159 16 -3.701 -3.866 17 -1.273 -0.265 18 -2.002 -2.449 19 1.738 3.110 20 -0.299 1.714 > print( residuals( fitwlsi1e$eq[[ 1 ]] ) ) 1 2 3 4 5 6 7 8 9 10 11 1.074 -0.390 2.625 1.802 1.946 1.175 1.530 -2.933 -1.365 2.031 -0.149 12 13 14 15 16 17 18 19 20 -1.954 -1.121 -0.220 1.487 -3.701 -1.273 -2.002 1.738 -0.299 > > print( residuals( fitwlsi2 ) ) demand supply 1 0.9167 0.218 2 -0.4616 -0.331 3 2.5539 2.462 4 1.7361 1.565 5 2.0140 1.774 6 1.2288 0.889 7 1.5977 1.726 8 -2.8589 -4.378 9 -1.3187 -2.597 10 2.0505 2.500 11 -0.3686 -0.453 12 -2.2443 -1.523 13 -1.3649 -1.000 14 -0.3029 0.876 15 1.6539 2.802 16 -3.5601 -4.334 17 -1.0599 -0.812 18 -1.9669 -2.958 19 1.8383 2.554 20 -0.0831 1.020 > print( residuals( fitwlsi2$eq[[ 2 ]] ) ) 1 2 3 4 5 6 7 8 9 10 11 0.218 -0.331 2.462 1.565 1.774 0.889 1.726 -4.378 -2.597 2.500 -0.453 12 13 14 15 16 17 18 19 20 -1.523 -1.000 0.876 2.802 -4.334 -0.812 -2.958 2.554 1.020 > > print( residuals( fitwlsi3e ) ) demand supply 1 0.9084 0.211 2 -0.4653 -0.337 3 2.5502 2.456 4 1.7326 1.561 5 2.0176 1.771 6 1.2316 0.887 7 1.6012 1.724 8 -2.8551 -4.378 9 -1.3162 -2.597 10 2.0515 2.500 11 -0.3801 -0.454 12 -2.2594 -1.525 13 -1.3777 -1.001 14 -0.3073 0.877 15 1.6627 2.806 16 -3.5527 -4.329 17 -1.0487 -0.806 18 -1.9651 -2.953 19 1.8436 2.560 20 -0.0718 1.028 > print( residuals( fitwlsi3e$eq[[ 1 ]] ) ) 1 2 3 4 5 6 7 8 9 10 0.9084 -0.4653 2.5502 1.7326 2.0176 1.2316 1.6012 -2.8551 -1.3162 2.0515 11 12 13 14 15 16 17 18 19 20 -0.3801 -2.2594 -1.3777 -0.3073 1.6627 -3.5527 -1.0487 -1.9651 1.8436 -0.0718 > > print( residuals( fitwlsi4 ) ) demand supply 1 0.9659 0.250 2 -0.3911 -0.383 3 2.6145 2.421 4 1.8080 1.502 5 1.9705 1.805 6 1.2064 0.893 7 1.5905 1.700 8 -2.8246 -4.491 9 -1.3742 -2.547 10 1.9415 2.667 11 -0.3865 -0.282 12 -2.1747 -1.442 13 -1.2604 -1.009 14 -0.2938 0.920 15 1.5480 2.866 16 -3.6192 -4.346 17 -1.2804 -0.604 18 -1.9302 -3.061 19 1.8768 2.420 20 0.0127 0.720 > print( residuals( fitwlsi4$eq[[ 2 ]] ) ) 1 2 3 4 5 6 7 8 9 10 11 0.250 -0.383 2.421 1.502 1.805 0.893 1.700 -4.491 -2.547 2.667 -0.282 12 13 14 15 16 17 18 19 20 -1.442 -1.009 0.920 2.866 -4.346 -0.604 -3.061 2.420 0.720 > > print( residuals( fitwlsi5e ) ) demand supply 1 0.9602 0.245 2 -0.3908 -0.388 3 2.6143 2.418 4 1.8087 1.498 5 1.9716 1.803 6 1.2081 0.892 7 1.5938 1.699 8 -2.8184 -4.491 9 -1.3750 -2.548 10 1.9360 2.667 11 -0.3997 -0.284 12 -2.1865 -1.443 13 -1.2675 -1.010 14 -0.2978 0.921 15 1.5508 2.869 16 -3.6150 -4.342 17 -1.2820 -0.601 18 -1.9260 -3.057 19 1.8848 2.424 20 0.0305 0.727 > print( residuals( fitwlsi5e$eq[[ 1 ]] ) ) 1 2 3 4 5 6 7 8 9 10 0.9602 -0.3908 2.6143 1.8087 1.9716 1.2081 1.5938 -2.8184 -1.3750 1.9360 11 12 13 14 15 16 17 18 19 20 -0.3997 -2.1865 -1.2675 -0.2978 1.5508 -3.6150 -1.2820 -1.9260 1.8848 0.0305 > > > ## *************** coefficients ********************* > print( round( coef( fitwls1e ), digits = 6 ) ) demand_(Intercept) demand_price demand_income supply_(Intercept) 99.895 -0.316 0.335 58.275 supply_price supply_farmPrice supply_trend 0.160 0.248 0.248 > print( round( coef( fitwls1e$eq[[ 1 ]] ), digits = 6 ) ) (Intercept) price income 99.895 -0.316 0.335 > > print( round( coef( fitwlsi2 ), digits = 6 ) ) demand_(Intercept) demand_price demand_income supply_(Intercept) 99.661 -0.299 0.320 56.183 supply_price supply_farmPrice supply_trend 0.164 0.258 0.320 > print( round( coef( fitwlsi2$eq[[ 2 ]] ), digits = 6 ) ) (Intercept) price farmPrice trend 56.183 0.164 0.258 0.320 > > print( round( coef( fitwls3e ), digits = 6 ) ) demand_(Intercept) demand_price demand_income supply_(Intercept) 99.646 -0.298 0.319 56.210 supply_price supply_farmPrice supply_trend 0.164 0.258 0.319 > print( round( coef( fitwls3e, modified.regMat = TRUE ), digits = 6 ) ) C1 C2 C3 C4 C5 C6 99.646 -0.298 0.319 56.210 0.164 0.258 > print( round( coef( fitwls3e$eq[[ 1 ]] ), digits = 6 ) ) (Intercept) price income 99.646 -0.298 0.319 > > print( round( coef( fitwls4 ), digits = 6 ) ) demand_(Intercept) demand_price demand_income supply_(Intercept) 100.914 -0.316 0.324 53.942 supply_price supply_farmPrice supply_trend 0.184 0.260 0.324 > print( round( coef( fitwls4$eq[[ 2 ]] ), digits = 6 ) ) (Intercept) price farmPrice trend 53.942 0.184 0.260 0.324 > > print( round( coef( fitwlsi5 ), digits = 6 ) ) demand_(Intercept) demand_price demand_income supply_(Intercept) 100.903 -0.316 0.324 53.938 supply_price supply_farmPrice supply_trend 0.184 0.260 0.324 > print( round( coef( fitwlsi5, modified.regMat = TRUE ), digits = 6 ) ) C1 C2 C3 C4 C5 C6 100.903 -0.316 0.324 53.938 0.184 0.260 > print( round( coef( fitwlsi5$eq[[ 1 ]] ), digits = 6 ) ) (Intercept) price income 100.903 -0.316 0.324 > > > ## *************** coefficients with stats ********************* > print( round( coef( summary( fitwls1e ) ), digits = 6 ) ) Estimate Std. Error t value Pr(>|t|) demand_(Intercept) 99.895 6.9325 14.41 0.000000 demand_price -0.316 0.0836 -3.78 0.001483 demand_income 0.335 0.0419 7.99 0.000000 supply_(Intercept) 58.275 10.2527 5.68 0.000034 supply_price 0.160 0.0849 1.89 0.077067 supply_farmPrice 0.248 0.0413 6.01 0.000018 supply_trend 0.248 0.0872 2.85 0.011659 > print( round( coef( summary( fitwls1e$eq[[ 1 ]] ) ), digits = 6 ) ) Estimate Std. Error t value Pr(>|t|) (Intercept) 99.895 6.9325 14.41 0.00000 price -0.316 0.0836 -3.78 0.00148 income 0.335 0.0419 7.99 0.00000 > > print( round( coef( summary( fitwlsi2 ) ), digits = 6 ) ) Estimate Std. Error t value Pr(>|t|) demand_(Intercept) 99.661 7.5378 13.22 0.000000 demand_price -0.299 0.0884 -3.39 0.001805 demand_income 0.320 0.0414 7.72 0.000000 supply_(Intercept) 56.183 11.3487 4.95 0.000020 supply_price 0.164 0.0963 1.71 0.097239 supply_farmPrice 0.258 0.0453 5.70 0.000002 supply_trend 0.320 0.0414 7.72 0.000000 > print( round( coef( summary( fitwlsi2$eq[[ 2 ]] ) ), digits = 6 ) ) Estimate Std. Error t value Pr(>|t|) (Intercept) 56.183 11.3487 4.95 0.000020 price 0.164 0.0963 1.71 0.097239 farmPrice 0.258 0.0453 5.70 0.000002 trend 0.320 0.0414 7.72 0.000000 > > print( round( coef( summary( fitwls3e ) ), digits = 6 ) ) Estimate Std. Error t value Pr(>|t|) demand_(Intercept) 99.646 6.9734 14.29 0.000000 demand_price -0.298 0.0816 -3.65 0.000863 demand_income 0.319 0.0381 8.37 0.000000 supply_(Intercept) 56.210 10.1248 5.55 0.000003 supply_price 0.164 0.0859 1.91 0.064384 supply_farmPrice 0.258 0.0404 6.38 0.000000 supply_trend 0.319 0.0381 8.37 0.000000 > print( round( coef( summary( fitwls3e ), modified.regMat = TRUE ), digits = 6 ) ) Estimate Std. Error t value Pr(>|t|) C1 99.646 6.9734 14.29 0.000000 C2 -0.298 0.0816 -3.65 0.000863 C3 0.319 0.0381 8.37 0.000000 C4 56.210 10.1248 5.55 0.000003 C5 0.164 0.0859 1.91 0.064384 C6 0.258 0.0404 6.38 0.000000 > print( round( coef( summary( fitwls3e$eq[[ 1 ]] ) ), digits = 6 ) ) Estimate Std. Error t value Pr(>|t|) (Intercept) 99.646 6.9734 14.29 0.000000 price -0.298 0.0816 -3.65 0.000863 income 0.319 0.0381 8.37 0.000000 > > print( round( coef( summary( fitwls4, useDfSys = FALSE ) ), digits = 6 ) ) Estimate Std. Error t value Pr(>|t|) demand_(Intercept) 100.914 6.0474 16.69 0.000000 demand_price -0.316 0.0648 -4.87 0.000143 demand_income 0.324 0.0385 8.42 0.000000 supply_(Intercept) 53.942 7.9687 6.77 0.000005 supply_price 0.184 0.0648 2.84 0.011833 supply_farmPrice 0.260 0.0446 5.84 0.000025 supply_trend 0.324 0.0385 8.42 0.000000 > print( round( coef( summary( fitwls4$eq[[ 2 ]], useDfSys = FALSE ) ), + digits = 6 ) ) Estimate Std. Error t value Pr(>|t|) (Intercept) 53.942 7.9687 6.77 0.000005 price 0.184 0.0648 2.84 0.011833 farmPrice 0.260 0.0446 5.84 0.000025 trend 0.324 0.0385 8.42 0.000000 > > print( round( coef( summary( fitwlsi5, useDfSys = FALSE ) ), digits = 6 ) ) Estimate Std. Error t value Pr(>|t|) demand_(Intercept) 100.903 6.0396 16.71 0.000000 demand_price -0.316 0.0648 -4.88 0.000142 demand_income 0.324 0.0384 8.43 0.000000 supply_(Intercept) 53.938 7.9718 6.77 0.000005 supply_price 0.184 0.0648 2.84 0.011806 supply_farmPrice 0.260 0.0447 5.83 0.000026 supply_trend 0.324 0.0384 8.43 0.000000 > print( round( coef( summary( fitwlsi5, useDfSys = FALSE ), + modified.regMat = TRUE ), digits = 6 ) ) Estimate Std. Error t value Pr(>|t|) C1 100.903 6.0396 16.71 NA C2 -0.316 0.0648 -4.88 NA C3 0.324 0.0384 8.43 NA C4 53.938 7.9718 6.77 NA C5 0.184 0.0648 2.84 NA C6 0.260 0.0447 5.83 NA > print( round( coef( summary( fitwlsi5$eq[[ 1 ]], useDfSys = FALSE ) ), + digits = 6 ) ) Estimate Std. Error t value Pr(>|t|) (Intercept) 100.903 6.0396 16.71 0.000000 price -0.316 0.0648 -4.88 0.000142 income 0.324 0.0384 8.43 0.000000 > > > ## *********** variance covariance matrix of the coefficients ******* > print( round( vcov( fitwls1e ), digits = 6 ) ) demand_(Intercept) demand_price demand_income demand_(Intercept) 48.0597 -0.50558 0.02734 demand_price -0.5056 0.00699 -0.00198 demand_income 0.0273 -0.00198 0.00175 supply_(Intercept) 0.0000 0.00000 0.00000 supply_price 0.0000 0.00000 0.00000 supply_farmPrice 0.0000 0.00000 0.00000 supply_trend 0.0000 0.00000 0.00000 supply_(Intercept) supply_price supply_farmPrice demand_(Intercept) 0.000 0.000000 0.000000 demand_price 0.000 0.000000 0.000000 demand_income 0.000 0.000000 0.000000 supply_(Intercept) 105.119 -0.790000 -0.243489 supply_price -0.790 0.007202 0.000675 supply_farmPrice -0.243 0.000675 0.001707 supply_trend -0.223 0.000418 0.001052 supply_trend demand_(Intercept) 0.000000 demand_price 0.000000 demand_income 0.000000 supply_(Intercept) -0.223347 supply_price 0.000418 supply_farmPrice 0.001052 supply_trend 0.007608 > print( round( vcov( fitwls1e$eq[[ 1 ]] ), digits = 6 ) ) (Intercept) price income (Intercept) 48.0597 -0.50558 0.02734 price -0.5056 0.00699 -0.00198 income 0.0273 -0.00198 0.00175 > > print( round( vcov( fitwls2 ), digits = 6 ) ) demand_(Intercept) demand_price demand_income demand_(Intercept) 57.21413 -0.596328 0.026850 demand_price -0.59633 0.007862 -0.001948 demand_income 0.02685 -0.001948 0.001722 supply_(Intercept) -0.78825 0.057190 -0.050565 supply_price 0.00147 -0.000107 0.000095 supply_farmPrice 0.00371 -0.000269 0.000238 supply_trend 0.02685 -0.001948 0.001722 supply_(Intercept) supply_price supply_farmPrice demand_(Intercept) -0.7883 0.001474 0.003714 demand_price 0.0572 -0.000107 -0.000269 demand_income -0.0506 0.000095 0.000238 supply_(Intercept) 128.0635 -1.001596 -0.280017 supply_price -1.0016 0.009225 0.000806 supply_farmPrice -0.2800 0.000806 0.002038 supply_trend -0.0506 0.000095 0.000238 supply_trend demand_(Intercept) 0.026850 demand_price -0.001948 demand_income 0.001722 supply_(Intercept) -0.050565 supply_price 0.000095 supply_farmPrice 0.000238 supply_trend 0.001722 > print( round( vcov( fitwls2$eq[[ 2 ]] ), digits = 6 ) ) (Intercept) price farmPrice trend (Intercept) 128.0635 -1.001596 -0.280017 -0.050565 price -1.0016 0.009225 0.000806 0.000095 farmPrice -0.2800 0.000806 0.002038 0.000238 trend -0.0506 0.000095 0.000238 0.001722 > > print( round( vcov( fitwls3e ), digits = 6 ) ) demand_(Intercept) demand_price demand_income demand_(Intercept) 48.62814 -0.506597 0.022574 demand_price -0.50660 0.006662 -0.001638 demand_income 0.02257 -0.001638 0.001448 supply_(Intercept) -0.66271 0.048082 -0.042512 supply_price 0.00124 -0.000090 0.000079 supply_farmPrice 0.00312 -0.000227 0.000200 supply_trend 0.02257 -0.001638 0.001448 supply_(Intercept) supply_price supply_farmPrice demand_(Intercept) -0.6627 0.001239 0.003123 demand_price 0.0481 -0.000090 -0.000227 demand_income -0.0425 0.000079 0.000200 supply_(Intercept) 102.5112 -0.801390 -0.224299 supply_price -0.8014 0.007381 0.000645 supply_farmPrice -0.2243 0.000645 0.001632 supply_trend -0.0425 0.000079 0.000200 supply_trend demand_(Intercept) 0.022574 demand_price -0.001638 demand_income 0.001448 supply_(Intercept) -0.042512 supply_price 0.000079 supply_farmPrice 0.000200 supply_trend 0.001448 > print( round( vcov( fitwls3e, modified.regMat = TRUE ), digits = 6 ) ) C1 C2 C3 C4 C5 C6 C1 48.62814 -0.506597 0.022574 -0.6627 0.001239 0.003123 C2 -0.50660 0.006662 -0.001638 0.0481 -0.000090 -0.000227 C3 0.02257 -0.001638 0.001448 -0.0425 0.000079 0.000200 C4 -0.66271 0.048082 -0.042512 102.5112 -0.801390 -0.224299 C5 0.00124 -0.000090 0.000079 -0.8014 0.007381 0.000645 C6 0.00312 -0.000227 0.000200 -0.2243 0.000645 0.001632 > print( round( vcov( fitwls3e$eq[[ 1 ]] ), digits = 6 ) ) (Intercept) price income (Intercept) 48.6281 -0.50660 0.02257 price -0.5066 0.00666 -0.00164 income 0.0226 -0.00164 0.00145 > > print( round( vcov( fitwls4 ), digits = 6 ) ) demand_(Intercept) demand_price demand_income demand_(Intercept) 36.5710 -0.321554 -0.043279 demand_price -0.3216 0.004201 -0.001011 demand_income -0.0433 -0.001011 0.001481 supply_(Intercept) 35.8467 -0.431417 0.074877 supply_price -0.3216 0.004201 -0.001011 supply_farmPrice -0.0334 0.000226 0.000111 supply_trend -0.0433 -0.001011 0.001481 supply_(Intercept) supply_price supply_farmPrice demand_(Intercept) 35.8467 -0.321554 -0.033436 demand_price -0.4314 0.004201 0.000226 demand_income 0.0749 -0.001011 0.000111 supply_(Intercept) 63.5001 -0.431417 -0.215648 supply_price -0.4314 0.004201 0.000226 supply_farmPrice -0.2156 0.000226 0.001986 supply_trend 0.0749 -0.001011 0.000111 supply_trend demand_(Intercept) -0.043279 demand_price -0.001011 demand_income 0.001481 supply_(Intercept) 0.074877 supply_price -0.001011 supply_farmPrice 0.000111 supply_trend 0.001481 > print( round( vcov( fitwls4$eq[[ 2 ]] ), digits = 6 ) ) (Intercept) price farmPrice trend (Intercept) 63.5001 -0.431417 -0.215648 0.074877 price -0.4314 0.004201 0.000226 -0.001011 farmPrice -0.2156 0.000226 0.001986 0.000111 trend 0.0749 -0.001011 0.000111 0.001481 > > print( round( vcov( fitwls5 ), digits = 6 ) ) demand_(Intercept) demand_price demand_income demand_(Intercept) 36.5710 -0.321554 -0.043279 demand_price -0.3216 0.004201 -0.001011 demand_income -0.0433 -0.001011 0.001481 supply_(Intercept) 35.8467 -0.431417 0.074877 supply_price -0.3216 0.004201 -0.001011 supply_farmPrice -0.0334 0.000226 0.000111 supply_trend -0.0433 -0.001011 0.001481 supply_(Intercept) supply_price supply_farmPrice demand_(Intercept) 35.8467 -0.321554 -0.033436 demand_price -0.4314 0.004201 0.000226 demand_income 0.0749 -0.001011 0.000111 supply_(Intercept) 63.5001 -0.431417 -0.215648 supply_price -0.4314 0.004201 0.000226 supply_farmPrice -0.2156 0.000226 0.001986 supply_trend 0.0749 -0.001011 0.000111 supply_trend demand_(Intercept) -0.043279 demand_price -0.001011 demand_income 0.001481 supply_(Intercept) 0.074877 supply_price -0.001011 supply_farmPrice 0.000111 supply_trend 0.001481 > print( round( vcov( fitwls5, modified.regMat = TRUE ), digits = 6 ) ) C1 C2 C3 C4 C5 C6 C1 36.5710 -0.321554 -0.043279 35.8467 -0.321554 -0.033436 C2 -0.3216 0.004201 -0.001011 -0.4314 0.004201 0.000226 C3 -0.0433 -0.001011 0.001481 0.0749 -0.001011 0.000111 C4 35.8467 -0.431417 0.074877 63.5001 -0.431417 -0.215648 C5 -0.3216 0.004201 -0.001011 -0.4314 0.004201 0.000226 C6 -0.0334 0.000226 0.000111 -0.2156 0.000226 0.001986 > print( round( vcov( fitwls5$eq[[ 1 ]] ), digits = 6 ) ) (Intercept) price income (Intercept) 36.5710 -0.32155 -0.04328 price -0.3216 0.00420 -0.00101 income -0.0433 -0.00101 0.00148 > > print( round( vcov( fitwlsi1 ), digits = 6 ) ) demand_(Intercept) demand_price demand_income demand_(Intercept) 56.5408 -0.59480 0.03216 demand_price -0.5948 0.00822 -0.00233 demand_income 0.0322 -0.00233 0.00206 supply_(Intercept) 0.0000 0.00000 0.00000 supply_price 0.0000 0.00000 0.00000 supply_farmPrice 0.0000 0.00000 0.00000 supply_trend 0.0000 0.00000 0.00000 supply_(Intercept) supply_price supply_farmPrice demand_(Intercept) 0.000 0.000000 0.000000 demand_price 0.000 0.000000 0.000000 demand_income 0.000 0.000000 0.000000 supply_(Intercept) 131.398 -0.987500 -0.304361 supply_price -0.988 0.009003 0.000844 supply_farmPrice -0.304 0.000844 0.002133 supply_trend -0.279 0.000522 0.001316 supply_trend demand_(Intercept) 0.000000 demand_price 0.000000 demand_income 0.000000 supply_(Intercept) -0.279183 supply_price 0.000522 supply_farmPrice 0.001316 supply_trend 0.009510 > print( round( vcov( fitwlsi1$eq[[ 2 ]] ), digits = 6 ) ) (Intercept) price farmPrice trend (Intercept) 131.398 -0.987500 -0.304361 -0.279183 price -0.988 0.009003 0.000844 0.000522 farmPrice -0.304 0.000844 0.002133 0.001316 trend -0.279 0.000522 0.001316 0.009510 > > print( round( vcov( fitwlsi2e ), digits = 6 ) ) demand_(Intercept) demand_price demand_income demand_(Intercept) 48.32515 -0.503487 0.022480 demand_price -0.50349 0.006624 -0.001631 demand_income 0.02248 -0.001631 0.001442 supply_(Intercept) -0.65995 0.047882 -0.042335 supply_price 0.00123 -0.000090 0.000079 supply_farmPrice 0.00311 -0.000226 0.000199 supply_trend 0.02248 -0.001631 0.001442 supply_(Intercept) supply_price supply_farmPrice demand_(Intercept) -0.6600 0.001234 0.003110 demand_price 0.0479 -0.000090 -0.000226 demand_income -0.0423 0.000079 0.000199 supply_(Intercept) 103.0226 -0.805456 -0.225388 supply_price -0.8055 0.007418 0.000649 supply_farmPrice -0.2254 0.000649 0.001640 supply_trend -0.0423 0.000079 0.000199 supply_trend demand_(Intercept) 0.022480 demand_price -0.001631 demand_income 0.001442 supply_(Intercept) -0.042335 supply_price 0.000079 supply_farmPrice 0.000199 supply_trend 0.001442 > print( round( vcov( fitwlsi2e$eq[[ 1 ]] ), digits = 6 ) ) (Intercept) price income (Intercept) 48.3251 -0.50349 0.02248 price -0.5035 0.00662 -0.00163 income 0.0225 -0.00163 0.00144 > > print( round( vcov( fitwlsi3 ), digits = 6 ) ) demand_(Intercept) demand_price demand_income demand_(Intercept) 56.81857 -0.592263 0.026724 demand_price -0.59226 0.007812 -0.001939 demand_income 0.02672 -0.001939 0.001714 supply_(Intercept) -0.78454 0.056921 -0.050327 supply_price 0.00147 -0.000106 0.000094 supply_farmPrice 0.00370 -0.000268 0.000237 supply_trend 0.02672 -0.001939 0.001714 supply_(Intercept) supply_price supply_farmPrice demand_(Intercept) -0.7845 0.001467 0.003697 demand_price 0.0569 -0.000106 -0.000268 demand_income -0.0503 0.000094 0.000237 supply_(Intercept) 128.7924 -1.007391 -0.281572 supply_price -1.0074 0.009279 0.000811 supply_farmPrice -0.2816 0.000811 0.002049 supply_trend -0.0503 0.000094 0.000237 supply_trend demand_(Intercept) 0.026724 demand_price -0.001939 demand_income 0.001714 supply_(Intercept) -0.050327 supply_price 0.000094 supply_farmPrice 0.000237 supply_trend 0.001714 > print( round( vcov( fitwlsi3, modified.regMat = TRUE ), digits = 6 ) ) C1 C2 C3 C4 C5 C6 C1 56.81857 -0.592263 0.026724 -0.7845 0.001467 0.003697 C2 -0.59226 0.007812 -0.001939 0.0569 -0.000106 -0.000268 C3 0.02672 -0.001939 0.001714 -0.0503 0.000094 0.000237 C4 -0.78454 0.056921 -0.050327 128.7924 -1.007391 -0.281572 C5 0.00147 -0.000106 0.000094 -1.0074 0.009279 0.000811 C6 0.00370 -0.000268 0.000237 -0.2816 0.000811 0.002049 > print( round( vcov( fitwlsi3$eq[[ 2 ]] ), digits = 6 ) ) (Intercept) price farmPrice trend (Intercept) 128.7924 -1.007391 -0.281572 -0.050327 price -1.0074 0.009279 0.000811 0.000094 farmPrice -0.2816 0.000811 0.002049 0.000237 trend -0.0503 0.000094 0.000237 0.001714 > > print( round( vcov( fitwlsi4e ), digits = 6 ) ) demand_(Intercept) demand_price demand_income demand_(Intercept) 30.4377 -0.265752 -0.037918 demand_price -0.2658 0.003463 -0.000827 demand_income -0.0379 -0.000827 0.001237 supply_(Intercept) 29.6762 -0.355820 0.060620 supply_price -0.2658 0.003463 -0.000827 supply_farmPrice -0.0279 0.000187 0.000094 supply_trend -0.0379 -0.000827 0.001237 supply_(Intercept) supply_price supply_farmPrice demand_(Intercept) 29.6762 -0.265752 -0.027921 demand_price -0.3558 0.003463 0.000187 demand_income 0.0606 -0.000827 0.000094 supply_(Intercept) 52.0044 -0.355820 -0.173988 supply_price -0.3558 0.003463 0.000187 supply_farmPrice -0.1740 0.000187 0.001596 supply_trend 0.0606 -0.000827 0.000094 supply_trend demand_(Intercept) -0.037918 demand_price -0.000827 demand_income 0.001237 supply_(Intercept) 0.060620 supply_price -0.000827 supply_farmPrice 0.000094 supply_trend 0.001237 > print( round( vcov( fitwlsi4e$eq[[ 1 ]] ), digits = 6 ) ) (Intercept) price income (Intercept) 30.4377 -0.265752 -0.037918 price -0.2658 0.003463 -0.000827 income -0.0379 -0.000827 0.001237 > > print( round( vcov( fitwlsi5e ), digits = 6 ) ) demand_(Intercept) demand_price demand_income demand_(Intercept) 30.4377 -0.265752 -0.037918 demand_price -0.2658 0.003463 -0.000827 demand_income -0.0379 -0.000827 0.001237 supply_(Intercept) 29.6762 -0.355820 0.060620 supply_price -0.2658 0.003463 -0.000827 supply_farmPrice -0.0279 0.000187 0.000094 supply_trend -0.0379 -0.000827 0.001237 supply_(Intercept) supply_price supply_farmPrice demand_(Intercept) 29.6762 -0.265752 -0.027921 demand_price -0.3558 0.003463 0.000187 demand_income 0.0606 -0.000827 0.000094 supply_(Intercept) 52.0044 -0.355820 -0.173988 supply_price -0.3558 0.003463 0.000187 supply_farmPrice -0.1740 0.000187 0.001596 supply_trend 0.0606 -0.000827 0.000094 supply_trend demand_(Intercept) -0.037918 demand_price -0.000827 demand_income 0.001237 supply_(Intercept) 0.060620 supply_price -0.000827 supply_farmPrice 0.000094 supply_trend 0.001237 > print( round( vcov( fitwlsi5e, modified.regMat = TRUE ), digits = 6 ) ) C1 C2 C3 C4 C5 C6 C1 30.4377 -0.265752 -0.037918 29.6762 -0.265752 -0.027921 C2 -0.2658 0.003463 -0.000827 -0.3558 0.003463 0.000187 C3 -0.0379 -0.000827 0.001237 0.0606 -0.000827 0.000094 C4 29.6762 -0.355820 0.060620 52.0044 -0.355820 -0.173988 C5 -0.2658 0.003463 -0.000827 -0.3558 0.003463 0.000187 C6 -0.0279 0.000187 0.000094 -0.1740 0.000187 0.001596 > print( round( vcov( fitwlsi5e$eq[[ 2 ]] ), digits = 6 ) ) (Intercept) price farmPrice trend (Intercept) 52.0044 -0.355820 -0.173988 0.060620 price -0.3558 0.003463 0.000187 -0.000827 farmPrice -0.1740 0.000187 0.001596 0.000094 trend 0.0606 -0.000827 0.000094 0.001237 > > > ## *********** confidence intervals of coefficients ************* > print( confint( fitwls1 ) ) 2.5 % 97.5 % demand_(Intercept) 84.031 115.760 demand_price -0.508 -0.125 demand_income 0.239 0.430 supply_(Intercept) 33.975 82.576 supply_price -0.041 0.362 supply_farmPrice 0.150 0.346 supply_trend 0.042 0.455 > print( confint( fitwls1$eq[[ 2 ]], level = 0.9 ) ) 5 % 95 % (Intercept) 38.263 78.288 price -0.005 0.326 farmPrice 0.167 0.329 trend 0.078 0.419 > > print( confint( fitwls2e, level = 0.9 ) ) 5 % 95 % demand_(Intercept) 85.474 113.818 demand_price -0.464 -0.132 demand_income 0.241 0.396 supply_(Intercept) 35.634 76.786 supply_price -0.010 0.339 supply_farmPrice 0.176 0.340 supply_trend 0.241 0.396 > print( confint( fitwls2e$eq[[ 1 ]], level = 0.99 ) ) 0.5 % 99.5 % (Intercept) 80.620 118.672 price -0.521 -0.076 income 0.215 0.422 > > print( confint( fitwls3, level = 0.99 ) ) 0.5 % 99.5 % demand_(Intercept) 84.286 115.030 demand_price -0.479 -0.119 demand_income 0.235 0.404 supply_(Intercept) 33.190 79.186 supply_price -0.031 0.359 supply_farmPrice 0.166 0.350 supply_trend 0.235 0.404 > print( confint( fitwls3$eq[[ 2 ]], level = 0.5 ) ) 25 % 75 % (Intercept) 48.472 63.903 price 0.099 0.230 farmPrice 0.227 0.289 trend 0.291 0.348 > > print( confint( fitwls4e, level = 0.5 ) ) 25 % 75 % demand_(Intercept) 89.763 112.189 demand_price -0.436 -0.197 demand_income 0.252 0.395 supply_(Intercept) 39.328 68.598 supply_price 0.064 0.303 supply_farmPrice 0.179 0.341 supply_trend 0.252 0.395 > print( confint( fitwls4e$eq[[ 1 ]], level = 0.25 ) ) 37.5 % 62.5 % (Intercept) 99.202 102.750 price -0.335 -0.297 income 0.312 0.335 > > print( confint( fitwls5, level = 0.25 ) ) 37.5 % 62.5 % demand_(Intercept) 88.637 113.191 demand_price -0.448 -0.184 demand_income 0.246 0.402 supply_(Intercept) 37.764 70.119 supply_price 0.052 0.316 supply_farmPrice 0.170 0.351 supply_trend 0.246 0.402 > print( confint( fitwls5$eq[[ 2 ]], level = 0.975 ) ) 1.3 % 98.8 % (Intercept) 35.279 72.604 price 0.032 0.336 farmPrice 0.156 0.365 trend 0.234 0.414 > > print( confint( fitwlsi1e, level = 0.975, useDfSys = TRUE ) ) 1.3 % 98.8 % demand_(Intercept) 85.791 114.000 demand_price -0.486 -0.146 demand_income 0.249 0.420 supply_(Intercept) 37.416 79.135 supply_price -0.012 0.333 supply_farmPrice 0.164 0.332 supply_trend 0.071 0.426 > print( confint( fitwlsi1e$eq[[ 1 ]], level = 0.999, useDfSys = TRUE ) ) 0.1 % 100 % (Intercept) 74.863 124.928 price -0.618 -0.014 income 0.183 0.486 > > print( confint( fitwlsi2, level = 0.999 ) ) 0.1 % 100 % demand_(Intercept) 84.342 114.979 demand_price -0.479 -0.120 demand_income 0.235 0.404 supply_(Intercept) 33.120 79.246 supply_price -0.031 0.360 supply_farmPrice 0.166 0.350 supply_trend 0.235 0.404 > print( confint( fitwlsi2$eq[[ 2 ]], level = 0.1 ) ) 45 % 55 % (Intercept) 54.746 57.620 price 0.152 0.176 farmPrice 0.252 0.264 trend 0.314 0.325 > > print( confint( fitwlsi3e, level = 0.1 ) ) 45 % 55 % demand_(Intercept) 85.521 113.776 demand_price -0.464 -0.133 demand_income 0.242 0.396 supply_(Intercept) 35.579 76.833 supply_price -0.011 0.339 supply_farmPrice 0.176 0.340 supply_trend 0.242 0.396 > print( confint( fitwlsi3e$eq[[ 1 ]], level = 0.01 ) ) 49.5 % 50.5 % (Intercept) 99.561 99.736 price -0.299 -0.297 income 0.318 0.319 > > print( confint( fitwlsi4, level = 0.01 ) ) 49.5 % 50.5 % demand_(Intercept) 88.642 113.164 demand_price -0.447 -0.184 demand_income 0.246 0.402 supply_(Intercept) 37.754 70.122 supply_price 0.053 0.316 supply_farmPrice 0.170 0.351 supply_trend 0.246 0.402 > print( confint( fitwlsi4$eq[[ 2 ]], level = 0.33 ) ) 33.5 % 66.5 % (Intercept) 50.512 57.364 price 0.156 0.212 farmPrice 0.241 0.279 trend 0.307 0.340 > > print( confint( fitwlsi5e, level = 0.33 ) ) 33.5 % 66.5 % demand_(Intercept) 89.766 112.166 demand_price -0.435 -0.197 demand_income 0.252 0.395 supply_(Intercept) 39.320 68.599 supply_price 0.065 0.303 supply_farmPrice 0.179 0.341 supply_trend 0.252 0.395 > print( confint( fitwlsi5e$eq[[ 1 ]] ) ) 2.5 % 97.5 % (Intercept) 89.766 112.166 price -0.435 -0.197 income 0.252 0.395 > > > ## *********** fitted values ************* > print( fitted( fitwls1 ) ) demand supply 1 97.4 98.9 2 99.6 100.1 3 99.5 100.2 4 99.7 100.4 5 102.3 102.7 6 102.1 102.6 7 102.5 102.4 8 102.8 104.3 9 101.7 102.9 10 100.8 100.4 11 95.6 96.0 12 94.4 94.1 13 95.7 95.6 14 99.0 97.8 15 104.3 102.6 16 103.9 104.1 17 104.8 103.8 18 101.9 102.4 19 103.5 102.1 20 106.5 104.5 > print( fitted( fitwls1$eq[[ 2 ]] ) ) 1 2 3 4 5 6 7 8 9 10 11 12 13 98.9 100.1 100.2 100.4 102.7 102.6 102.4 104.3 102.9 100.4 96.0 94.1 95.6 14 15 16 17 18 19 20 97.8 102.6 104.1 103.8 102.4 102.1 104.5 > > print( fitted( fitwls2e ) ) demand supply 1 97.6 98.3 2 99.7 99.5 3 99.6 99.7 4 99.8 99.9 5 102.2 102.5 6 102.0 102.4 7 102.4 102.3 8 102.8 104.3 9 101.7 102.9 10 100.8 100.3 11 95.8 95.9 12 94.7 93.9 13 95.9 95.5 14 99.1 97.9 15 104.1 103.0 16 103.8 104.6 17 104.6 104.3 18 101.9 102.9 19 103.4 102.7 20 106.3 105.2 > print( fitted( fitwls2e$eq[[ 1 ]] ) ) 1 2 3 4 5 6 7 8 9 10 11 12 13 97.6 99.7 99.6 99.8 102.2 102.0 102.4 102.8 101.7 100.8 95.8 94.7 95.9 14 15 16 17 18 19 20 99.1 104.1 103.8 104.6 101.9 103.4 106.3 > > print( fitted( fitwls3 ) ) demand supply 1 97.6 98.3 2 99.6 99.5 3 99.6 99.7 4 99.8 99.9 5 102.2 102.5 6 102.0 102.4 7 102.4 102.3 8 102.8 104.3 9 101.7 102.9 10 100.8 100.3 11 95.8 95.9 12 94.7 93.9 13 95.9 95.5 14 99.1 97.9 15 104.1 103.0 16 103.8 104.6 17 104.6 104.3 18 101.9 102.9 19 103.4 102.7 20 106.3 105.2 > print( fitted( fitwls3$eq[[ 2 ]] ) ) 1 2 3 4 5 6 7 8 9 10 11 12 13 98.3 99.5 99.7 99.9 102.5 102.4 102.3 104.3 102.9 100.3 95.9 93.9 95.5 14 15 16 17 18 19 20 97.9 103.0 104.6 104.3 102.9 102.7 105.2 > > print( fitted( fitwls4e ) ) demand supply 1 97.5 98.2 2 99.6 99.6 3 99.5 99.7 4 99.7 100.0 5 102.3 102.4 6 102.0 102.4 7 102.4 102.3 8 102.7 104.4 9 101.7 102.9 10 100.9 100.2 11 95.8 95.7 12 94.6 93.9 13 95.8 95.5 14 99.1 97.8 15 104.2 102.9 16 103.8 104.6 17 104.8 104.1 18 101.9 103.0 19 103.3 102.8 20 106.2 105.5 > print( fitted( fitwls4e$eq[[ 1 ]] ) ) 1 2 3 4 5 6 7 8 9 10 11 12 13 97.5 99.6 99.5 99.7 102.3 102.0 102.4 102.7 101.7 100.9 95.8 94.6 95.8 14 15 16 17 18 19 20 99.1 104.2 103.8 104.8 101.9 103.3 106.2 > > print( fitted( fitwls5 ) ) demand supply 1 97.5 98.2 2 99.6 99.6 3 99.5 99.7 4 99.7 100.0 5 102.3 102.4 6 102.0 102.3 7 102.4 102.3 8 102.7 104.4 9 101.7 102.9 10 100.9 100.2 11 95.8 95.7 12 94.6 93.9 13 95.8 95.5 14 99.1 97.8 15 104.2 102.9 16 103.8 104.6 17 104.8 104.1 18 101.9 103.0 19 103.3 102.8 20 106.2 105.5 > print( fitted( fitwls5$eq[[ 2 ]] ) ) 1 2 3 4 5 6 7 8 9 10 11 12 13 98.2 99.6 99.7 100.0 102.4 102.3 102.3 104.4 102.9 100.2 95.7 93.9 95.5 14 15 16 17 18 19 20 97.8 102.9 104.6 104.1 103.0 102.8 105.5 > > print( fitted( fitwlsi1e ) ) demand supply 1 97.4 98.9 2 99.6 100.1 3 99.5 100.2 4 99.7 100.4 5 102.3 102.7 6 102.1 102.6 7 102.5 102.4 8 102.8 104.3 9 101.7 102.9 10 100.8 100.4 11 95.6 96.0 12 94.4 94.1 13 95.7 95.6 14 99.0 97.8 15 104.3 102.6 16 103.9 104.1 17 104.8 103.8 18 101.9 102.4 19 103.5 102.1 20 106.5 104.5 > print( fitted( fitwlsi1e$eq[[ 1 ]] ) ) 1 2 3 4 5 6 7 8 9 10 11 12 13 97.4 99.6 99.5 99.7 102.3 102.1 102.5 102.8 101.7 100.8 95.6 94.4 95.7 14 15 16 17 18 19 20 99.0 104.3 103.9 104.8 101.9 103.5 106.5 > > print( fitted( fitwlsi2 ) ) demand supply 1 97.6 98.3 2 99.6 99.5 3 99.6 99.7 4 99.8 99.9 5 102.2 102.5 6 102.0 102.4 7 102.4 102.3 8 102.8 104.3 9 101.7 102.9 10 100.8 100.3 11 95.8 95.9 12 94.7 93.9 13 95.9 95.5 14 99.1 97.9 15 104.1 103.0 16 103.8 104.6 17 104.6 104.3 18 101.9 102.9 19 103.4 102.7 20 106.3 105.2 > print( fitted( fitwlsi2$eq[[ 2 ]] ) ) 1 2 3 4 5 6 7 8 9 10 11 12 13 98.3 99.5 99.7 99.9 102.5 102.4 102.3 104.3 102.9 100.3 95.9 93.9 95.5 14 15 16 17 18 19 20 97.9 103.0 104.6 104.3 102.9 102.7 105.2 > > print( fitted( fitwlsi3e ) ) demand supply 1 97.6 98.3 2 99.7 99.5 3 99.6 99.7 4 99.8 99.9 5 102.2 102.5 6 102.0 102.4 7 102.4 102.3 8 102.8 104.3 9 101.7 102.9 10 100.8 100.3 11 95.8 95.9 12 94.7 93.9 13 95.9 95.5 14 99.1 97.9 15 104.1 103.0 16 103.8 104.6 17 104.6 104.3 18 101.9 102.9 19 103.4 102.7 20 106.3 105.2 > print( fitted( fitwlsi3e$eq[[ 1 ]] ) ) 1 2 3 4 5 6 7 8 9 10 11 12 13 97.6 99.7 99.6 99.8 102.2 102.0 102.4 102.8 101.7 100.8 95.8 94.7 95.9 14 15 16 17 18 19 20 99.1 104.1 103.8 104.6 101.9 103.4 106.3 > > print( fitted( fitwlsi4 ) ) demand supply 1 97.5 98.2 2 99.6 99.6 3 99.5 99.7 4 99.7 100.0 5 102.3 102.4 6 102.0 102.3 7 102.4 102.3 8 102.7 104.4 9 101.7 102.9 10 100.9 100.2 11 95.8 95.7 12 94.6 93.9 13 95.8 95.5 14 99.1 97.8 15 104.2 102.9 16 103.8 104.6 17 104.8 104.1 18 101.9 103.0 19 103.3 102.8 20 106.2 105.5 > print( fitted( fitwlsi4$eq[[ 2 ]] ) ) 1 2 3 4 5 6 7 8 9 10 11 12 13 98.2 99.6 99.7 100.0 102.4 102.3 102.3 104.4 102.9 100.2 95.7 93.9 95.5 14 15 16 17 18 19 20 97.8 102.9 104.6 104.1 103.0 102.8 105.5 > > print( fitted( fitwlsi5e ) ) demand supply 1 97.5 98.2 2 99.6 99.6 3 99.5 99.7 4 99.7 100.0 5 102.3 102.4 6 102.0 102.4 7 102.4 102.3 8 102.7 104.4 9 101.7 102.9 10 100.9 100.2 11 95.8 95.7 12 94.6 93.9 13 95.8 95.5 14 99.1 97.8 15 104.2 102.9 16 103.8 104.6 17 104.8 104.1 18 101.9 103.0 19 103.3 102.8 20 106.2 105.5 > print( fitted( fitwlsi5e$eq[[ 1 ]] ) ) 1 2 3 4 5 6 7 8 9 10 11 12 13 97.5 99.6 99.5 99.7 102.3 102.0 102.4 102.7 101.7 100.9 95.8 94.6 95.8 14 15 16 17 18 19 20 99.1 104.2 103.8 104.8 101.9 103.3 106.2 > > > ## *********** predicted values ************* > predictData <- Kmenta > predictData$consump <- NULL > predictData$price <- Kmenta$price * 0.9 > predictData$income <- Kmenta$income * 1.1 > > print( predict( fitwls1, se.fit = TRUE, interval = "prediction" ) ) demand.pred demand.se.fit demand.lwr demand.upr supply.pred supply.se.fit 1 97.4 0.643 93.1 101.7 98.9 1.056 2 99.6 0.577 95.3 103.8 100.1 1.037 3 99.5 0.545 95.3 103.8 100.2 0.939 4 99.7 0.582 95.4 104.0 100.4 0.912 5 102.3 0.502 98.1 106.5 102.7 0.895 6 102.1 0.463 97.9 106.3 102.6 0.791 7 102.5 0.484 98.3 106.7 102.4 0.719 8 102.8 0.601 98.6 107.1 104.3 0.963 9 101.7 0.527 97.5 105.9 102.9 0.788 10 100.8 0.788 96.4 105.2 100.4 0.981 11 95.6 0.946 91.0 100.1 96.0 1.185 12 94.4 0.980 89.8 98.9 94.1 1.394 13 95.7 0.880 91.2 100.1 95.6 1.244 14 99.0 0.508 94.8 103.2 97.8 0.896 15 104.3 0.758 99.9 108.7 102.6 0.874 16 103.9 0.616 99.7 108.2 104.1 0.916 17 104.8 1.273 99.9 109.7 103.8 1.605 18 101.9 0.536 97.7 106.2 102.4 0.962 19 103.5 0.680 99.2 107.8 102.1 1.098 20 106.5 1.274 101.7 111.4 104.5 1.664 supply.lwr supply.upr 1 93.4 104 2 94.5 106 3 94.7 106 4 94.9 106 5 97.3 108 6 97.2 108 7 97.1 108 8 98.8 110 9 97.6 108 10 94.8 106 11 90.3 102 12 88.2 100 13 89.9 101 14 92.3 103 15 97.2 108 16 98.6 110 17 97.7 110 18 96.9 108 19 96.5 108 20 98.3 111 > print( predict( fitwls1$eq[[ 2 ]], se.fit = TRUE, interval = "prediction" ) ) fit se.fit lwr upr 1 98.9 1.056 93.4 104 2 100.1 1.037 94.5 106 3 100.2 0.939 94.7 106 4 100.4 0.912 94.9 106 5 102.7 0.895 97.3 108 6 102.6 0.791 97.2 108 7 102.4 0.719 97.1 108 8 104.3 0.963 98.8 110 9 102.9 0.788 97.6 108 10 100.4 0.981 94.8 106 11 96.0 1.185 90.3 102 12 94.1 1.394 88.2 100 13 95.6 1.244 89.9 101 14 97.8 0.896 92.3 103 15 102.6 0.874 97.2 108 16 104.1 0.916 98.6 110 17 103.8 1.605 97.7 110 18 102.4 0.962 96.9 108 19 102.1 1.098 96.5 108 20 104.5 1.664 98.3 111 > > print( predict( fitwls2e, se.pred = TRUE, interval = "confidence", + level = 0.999, newdata = predictData ) ) demand.pred demand.se.pred demand.lwr demand.upr supply.pred supply.se.pred 1 103 2.12 100.2 106 96.6 2.65 2 106 2.12 102.7 109 97.8 2.57 3 106 2.13 102.6 109 98.0 2.58 4 106 2.12 102.9 109 98.2 2.56 5 108 2.35 103.5 113 100.9 2.72 6 108 2.31 103.6 113 100.7 2.67 7 109 2.30 104.2 113 100.6 2.62 8 109 2.27 105.0 114 102.6 2.58 9 108 2.36 102.8 112 101.4 2.74 10 106 2.46 100.8 112 98.8 2.92 11 101 2.28 96.7 105 94.4 2.98 12 100 2.12 97.0 103 92.3 2.96 13 102 2.05 99.3 104 93.8 2.81 14 105 2.20 101.2 109 96.3 2.78 15 110 2.53 104.4 116 101.4 2.78 16 110 2.44 104.7 115 102.9 2.69 17 110 2.81 102.9 118 102.9 3.14 18 108 2.23 104.3 112 101.2 2.58 19 110 2.30 105.6 115 100.9 2.57 20 114 2.50 108.1 119 103.3 2.52 supply.lwr supply.upr 1 92.9 100.3 2 95.0 100.6 3 95.1 100.9 4 95.5 100.9 5 96.6 105.1 6 96.9 104.6 7 97.2 104.0 8 99.6 105.5 9 96.9 105.9 10 93.1 104.6 11 88.2 100.5 12 86.3 98.4 13 88.8 98.9 14 91.5 101.0 15 96.7 106.2 16 98.9 106.9 17 95.8 110.0 18 98.2 104.1 19 98.1 103.8 20 101.1 105.6 > print( predict( fitwls2e$eq[[ 1 ]], se.pred = TRUE, interval = "confidence", + level = 0.999, newdata = predictData ) ) fit se.pred lwr upr 1 103 2.12 100.2 106 2 106 2.12 102.7 109 3 106 2.13 102.6 109 4 106 2.12 102.9 109 5 108 2.35 103.5 113 6 108 2.31 103.6 113 7 109 2.30 104.2 113 8 109 2.27 105.0 114 9 108 2.36 102.8 112 10 106 2.46 100.8 112 11 101 2.28 96.7 105 12 100 2.12 97.0 103 13 102 2.05 99.3 104 14 105 2.20 101.2 109 15 110 2.53 104.4 116 16 110 2.44 104.7 115 17 110 2.81 102.9 118 18 108 2.23 104.3 112 19 110 2.30 105.6 115 20 114 2.50 108.1 119 > > print( predict( fitwls3, se.pred = TRUE, interval = "prediction", + level = 0.975 ) ) demand.pred demand.se.pred demand.lwr demand.upr supply.pred supply.se.pred 1 97.6 2.03 92.8 102.3 98.3 2.54 2 99.6 2.02 94.9 104.4 99.5 2.56 3 99.6 2.01 94.9 104.3 99.7 2.55 4 99.8 2.02 95.0 104.5 99.9 2.56 5 102.2 2.00 97.5 106.9 102.5 2.59 6 102.0 1.99 97.3 106.7 102.4 2.56 7 102.4 1.99 97.7 107.1 102.3 2.54 8 102.8 2.03 98.0 107.5 104.3 2.63 9 101.7 2.01 97.0 106.4 102.9 2.57 10 100.8 2.09 95.9 105.7 100.3 2.64 11 95.8 2.14 90.8 100.8 95.9 2.72 12 94.7 2.14 89.6 99.7 93.9 2.82 13 95.9 2.11 91.0 100.8 95.5 2.75 14 99.1 2.00 94.4 103.8 97.9 2.61 15 104.1 2.07 99.3 109.0 103.0 2.56 16 103.8 2.03 99.0 108.5 104.6 2.55 17 104.6 2.31 99.2 110.0 104.3 2.85 18 101.9 2.01 97.2 106.6 102.9 2.55 19 103.4 2.05 98.6 108.2 102.7 2.59 20 106.3 2.31 100.9 111.7 105.2 2.84 supply.lwr supply.upr 1 92.3 104 2 93.5 106 3 93.7 106 4 93.9 106 5 96.4 109 6 96.4 108 7 96.3 108 8 98.1 110 9 96.9 109 10 94.1 107 11 89.5 102 12 87.3 101 13 89.1 102 14 91.8 104 15 97.0 109 16 98.6 111 17 97.6 111 18 96.9 109 19 96.6 109 20 98.6 112 > print( predict( fitwls3$eq[[ 2 ]], se.pred = TRUE, interval = "prediction", + level = 0.975 ) ) fit se.pred lwr upr 1 98.3 2.54 92.3 104 2 99.5 2.56 93.5 106 3 99.7 2.55 93.7 106 4 99.9 2.56 93.9 106 5 102.5 2.59 96.4 109 6 102.4 2.56 96.4 108 7 102.3 2.54 96.3 108 8 104.3 2.63 98.1 110 9 102.9 2.57 96.9 109 10 100.3 2.64 94.1 107 11 95.9 2.72 89.5 102 12 93.9 2.82 87.3 101 13 95.5 2.75 89.1 102 14 97.9 2.61 91.8 104 15 103.0 2.56 97.0 109 16 104.6 2.55 98.6 111 17 104.3 2.85 97.6 111 18 102.9 2.55 96.9 109 19 102.7 2.59 96.6 109 20 105.2 2.84 98.6 112 > > print( predict( fitwls4e, se.fit = TRUE, interval = "confidence", + level = 0.25 ) ) demand.pred demand.se.fit demand.lwr demand.upr supply.pred supply.se.fit 1 97.5 0.541 97.4 97.7 98.2 0.598 2 99.6 0.471 99.4 99.7 99.6 0.679 3 99.5 0.454 99.4 99.7 99.7 0.634 4 99.7 0.475 99.5 99.8 100.0 0.643 5 102.3 0.434 102.1 102.4 102.4 0.753 6 102.0 0.418 101.9 102.2 102.4 0.680 7 102.4 0.440 102.3 102.5 102.3 0.625 8 102.7 0.537 102.5 102.9 104.4 0.799 9 101.7 0.447 101.6 101.9 102.9 0.700 10 100.9 0.628 100.7 101.1 100.2 0.716 11 95.8 0.833 95.6 96.1 95.7 0.916 12 94.6 0.807 94.4 94.9 93.9 1.226 13 95.8 0.677 95.6 96.0 95.5 1.130 14 99.1 0.459 98.9 99.2 97.8 0.796 15 104.2 0.572 104.1 104.4 102.9 0.656 16 103.8 0.509 103.7 104.0 104.6 0.644 17 104.8 0.877 104.5 105.1 104.1 1.150 18 101.9 0.478 101.7 102.0 103.0 0.575 19 103.3 0.604 103.1 103.5 102.8 0.649 20 106.2 1.102 105.8 106.6 105.5 0.875 supply.lwr supply.upr 1 98.0 98.4 2 99.4 99.8 3 99.5 99.9 4 99.8 100.2 5 102.2 102.7 6 102.1 102.6 7 102.1 102.5 8 104.1 104.6 9 102.7 103.1 10 99.9 100.4 11 95.4 96.0 12 93.5 94.3 13 95.2 95.9 14 97.6 98.1 15 102.7 103.1 16 104.4 104.8 17 103.8 104.5 18 102.8 103.2 19 102.6 103.0 20 105.2 105.8 > print( predict( fitwls4e$eq[[ 1 ]], se.fit = TRUE, interval = "confidence", + level = 0.25 ) ) fit se.fit lwr upr 1 97.5 0.541 97.4 97.7 2 99.6 0.471 99.4 99.7 3 99.5 0.454 99.4 99.7 4 99.7 0.475 99.5 99.8 5 102.3 0.434 102.1 102.4 6 102.0 0.418 101.9 102.2 7 102.4 0.440 102.3 102.5 8 102.7 0.537 102.5 102.9 9 101.7 0.447 101.6 101.9 10 100.9 0.628 100.7 101.1 11 95.8 0.833 95.6 96.1 12 94.6 0.807 94.4 94.9 13 95.8 0.677 95.6 96.0 14 99.1 0.459 98.9 99.2 15 104.2 0.572 104.1 104.4 16 103.8 0.509 103.7 104.0 17 104.8 0.877 104.5 105.1 18 101.9 0.478 101.7 102.0 19 103.3 0.604 103.1 103.5 20 106.2 1.102 105.8 106.6 > > print( predict( fitwls5, se.fit = TRUE, se.pred = TRUE, + interval = "prediction", level = 0.5, newdata = predictData ) ) demand.pred demand.se.fit demand.se.pred demand.lwr demand.upr supply.pred 1 104 0.749 2.07 102.1 105 96.4 2 106 0.784 2.09 104.6 107 97.7 3 106 0.793 2.09 104.5 107 97.8 4 106 0.792 2.09 104.8 108 98.1 5 109 1.136 2.24 107.1 110 100.6 6 108 1.086 2.22 106.9 110 100.5 7 109 1.097 2.22 107.4 110 100.4 8 110 1.107 2.23 108.0 111 102.5 9 108 1.126 2.24 106.4 109 101.1 10 107 1.243 2.30 105.1 108 98.5 11 101 1.066 2.21 99.7 103 94.0 12 100 0.814 2.10 98.8 102 92.0 13 102 0.617 2.03 100.4 103 93.7 14 105 0.874 2.12 103.7 107 96.0 15 111 1.377 2.37 109.0 112 101.2 16 110 1.279 2.32 108.8 112 102.8 17 111 1.656 2.55 108.9 112 102.5 18 109 1.014 2.18 107.0 110 101.1 19 110 1.180 2.27 108.7 112 100.9 20 114 1.635 2.53 112.2 116 103.4 supply.se.fit supply.se.pred supply.lwr supply.upr 1 0.799 2.58 94.6 98.1 2 0.679 2.55 95.9 99.4 3 0.692 2.55 96.1 99.6 4 0.657 2.54 96.3 99.8 5 1.051 2.67 98.8 102.5 6 0.947 2.63 98.7 102.3 7 0.845 2.59 98.7 102.2 8 0.849 2.60 100.7 104.2 9 1.100 2.69 99.3 103.0 10 1.276 2.77 96.6 100.4 11 1.422 2.84 92.1 95.9 12 1.595 2.93 90.1 94.0 13 1.401 2.82 91.7 95.6 14 1.201 2.73 94.2 97.9 15 1.169 2.72 99.3 103.0 16 1.060 2.67 100.9 104.6 17 1.727 3.00 100.5 104.6 18 0.831 2.59 99.3 102.8 19 0.834 2.59 99.1 102.6 20 0.653 2.54 101.7 105.2 > print( predict( fitwls5$eq[[ 2 ]], se.fit = TRUE, se.pred = TRUE, + interval = "prediction", level = 0.5, newdata = predictData ) ) fit se.fit se.pred lwr upr 1 96.4 0.799 2.58 94.6 98.1 2 97.7 0.679 2.55 95.9 99.4 3 97.8 0.692 2.55 96.1 99.6 4 98.1 0.657 2.54 96.3 99.8 5 100.6 1.051 2.67 98.8 102.5 6 100.5 0.947 2.63 98.7 102.3 7 100.4 0.845 2.59 98.7 102.2 8 102.5 0.849 2.60 100.7 104.2 9 101.1 1.100 2.69 99.3 103.0 10 98.5 1.276 2.77 96.6 100.4 11 94.0 1.422 2.84 92.1 95.9 12 92.0 1.595 2.93 90.1 94.0 13 93.7 1.401 2.82 91.7 95.6 14 96.0 1.201 2.73 94.2 97.9 15 101.2 1.169 2.72 99.3 103.0 16 102.8 1.060 2.67 100.9 104.6 17 102.5 1.727 3.00 100.5 104.6 18 101.1 0.831 2.59 99.3 102.8 19 100.9 0.834 2.59 99.1 102.6 20 103.4 0.653 2.54 101.7 105.2 > > print( predict( fitwlsi1e, se.fit = TRUE, se.pred = TRUE, + interval = "confidence", level = 0.99, useDfSys = TRUE ) ) demand.pred demand.se.fit demand.se.pred demand.lwr demand.upr supply.pred 1 97.4 0.593 2.02 95.8 99.0 98.9 2 99.6 0.532 2.00 98.1 101.0 100.1 3 99.5 0.502 1.99 98.2 100.9 100.2 4 99.7 0.537 2.00 98.2 101.2 100.4 5 102.3 0.463 1.98 101.0 103.6 102.7 6 102.1 0.427 1.98 100.9 103.2 102.6 7 102.5 0.446 1.98 101.2 103.7 102.4 8 102.8 0.554 2.01 101.3 104.3 104.3 9 101.7 0.486 1.99 100.4 103.0 102.9 10 100.8 0.727 2.06 98.8 102.8 100.4 11 95.6 0.872 2.12 93.2 98.0 96.0 12 94.4 0.903 2.13 91.9 96.8 94.1 13 95.7 0.811 2.09 93.4 97.9 95.6 14 99.0 0.468 1.99 97.7 100.3 97.8 15 104.3 0.699 2.05 102.4 106.2 102.6 16 103.9 0.568 2.01 102.4 105.5 104.1 17 104.8 1.174 2.26 101.6 108.0 103.8 18 101.9 0.494 1.99 100.6 103.3 102.4 19 103.5 0.627 2.03 101.8 105.2 102.1 20 106.5 1.175 2.26 103.3 109.7 104.5 supply.se.fit supply.se.pred supply.lwr supply.upr 1 0.945 2.58 96.3 101.5 2 0.928 2.58 97.5 102.6 3 0.839 2.55 97.9 102.5 4 0.816 2.54 98.1 102.6 5 0.800 2.53 100.5 104.9 6 0.707 2.51 100.6 104.5 7 0.643 2.49 100.7 104.2 8 0.862 2.55 102.0 106.7 9 0.705 2.51 101.0 104.9 10 0.877 2.56 98.0 102.7 11 1.060 2.63 93.1 98.9 12 1.247 2.71 90.7 97.5 13 1.113 2.65 92.6 98.6 14 0.801 2.53 95.6 100.0 15 0.782 2.53 100.5 104.8 16 0.819 2.54 101.9 106.3 17 1.436 2.80 99.9 107.7 18 0.861 2.55 100.0 104.7 19 0.982 2.60 99.4 104.8 20 1.489 2.83 100.4 108.6 > print( predict( fitwlsi1e$eq[[ 1 ]], se.fit = TRUE, se.pred = TRUE, + interval = "confidence", level = 0.99, useDfSys = TRUE ) ) fit se.fit se.pred lwr upr 1 97.4 0.593 2.02 95.8 99.0 2 99.6 0.532 2.00 98.1 101.0 3 99.5 0.502 1.99 98.2 100.9 4 99.7 0.537 2.00 98.2 101.2 5 102.3 0.463 1.98 101.0 103.6 6 102.1 0.427 1.98 100.9 103.2 7 102.5 0.446 1.98 101.2 103.7 8 102.8 0.554 2.01 101.3 104.3 9 101.7 0.486 1.99 100.4 103.0 10 100.8 0.727 2.06 98.8 102.8 11 95.6 0.872 2.12 93.2 98.0 12 94.4 0.903 2.13 91.9 96.8 13 95.7 0.811 2.09 93.4 97.9 14 99.0 0.468 1.99 97.7 100.3 15 104.3 0.699 2.05 102.4 106.2 16 103.9 0.568 2.01 102.4 105.5 17 104.8 1.174 2.26 101.6 108.0 18 101.9 0.494 1.99 100.6 103.3 19 103.5 0.627 2.03 101.8 105.2 20 106.5 1.175 2.26 103.3 109.7 > > print( predict( fitwlsi2, se.fit = TRUE, interval = "prediction", + level = 0.9, newdata = predictData ) ) demand.pred demand.se.fit demand.lwr demand.upr supply.pred supply.se.fit 1 103 0.937 99.7 107 96.6 1.151 2 106 0.942 102.2 110 97.8 0.875 3 106 0.966 102.1 109 98.0 0.909 4 106 0.947 102.4 110 98.2 0.833 5 108 1.448 104.3 112 100.9 1.327 6 108 1.368 104.2 112 100.7 1.192 7 109 1.352 104.7 113 100.6 1.052 8 109 1.293 105.4 113 102.6 0.914 9 108 1.459 103.5 112 101.4 1.400 10 106 1.647 102.0 111 98.8 1.787 11 101 1.300 97.0 105 94.4 1.911 12 100 0.938 96.4 104 92.3 1.880 13 102 0.722 98.2 105 93.8 1.565 14 105 1.121 101.1 109 96.3 1.479 15 110 1.769 105.8 115 101.4 1.481 16 110 1.602 105.8 114 102.9 1.248 17 110 2.210 105.3 115 102.9 2.201 18 108 1.205 104.5 112 101.2 0.911 19 110 1.353 106.1 114 100.9 0.877 20 114 1.714 109.4 118 103.3 0.705 supply.lwr supply.upr 1 92.0 101.2 2 93.4 102.2 3 93.6 102.4 4 93.9 102.6 5 96.2 105.6 6 96.1 105.3 7 96.1 105.1 8 98.1 107.0 9 96.6 106.1 10 93.7 103.9 11 89.1 99.6 12 87.1 97.5 13 88.9 98.8 14 91.4 101.1 15 96.6 106.3 16 98.3 107.6 17 97.4 108.5 18 96.8 105.6 19 96.5 105.3 20 99.0 107.7 > print( predict( fitwlsi2$eq[[ 2 ]], se.fit = TRUE, interval = "prediction", + level = 0.9, newdata = predictData ) ) fit se.fit lwr upr 1 96.6 1.151 92.0 101.2 2 97.8 0.875 93.4 102.2 3 98.0 0.909 93.6 102.4 4 98.2 0.833 93.9 102.6 5 100.9 1.327 96.2 105.6 6 100.7 1.192 96.1 105.3 7 100.6 1.052 96.1 105.1 8 102.6 0.914 98.1 107.0 9 101.4 1.400 96.6 106.1 10 98.8 1.787 93.7 103.9 11 94.4 1.911 89.1 99.6 12 92.3 1.880 87.1 97.5 13 93.8 1.565 88.9 98.8 14 96.3 1.479 91.4 101.1 15 101.4 1.481 96.6 106.3 16 102.9 1.248 98.3 107.6 17 102.9 2.201 97.4 108.5 18 101.2 0.911 96.8 105.6 19 100.9 0.877 96.5 105.3 20 103.3 0.705 99.0 107.7 > > print( predict( fitwlsi3e, interval = "prediction", level = 0.925 ) ) demand.pred demand.lwr demand.upr supply.pred supply.lwr supply.upr 1 97.6 93.9 101.3 98.3 93.6 103 2 99.7 96.0 103.3 99.5 94.9 104 3 99.6 95.9 103.3 99.7 95.1 104 4 99.8 96.1 103.5 99.9 95.3 105 5 102.2 98.6 105.9 102.5 97.8 107 6 102.0 98.4 105.7 102.4 97.7 107 7 102.4 98.7 106.0 102.3 97.6 107 8 102.8 99.1 106.5 104.3 99.5 109 9 101.7 98.0 105.3 102.9 98.3 108 10 100.8 97.0 104.6 100.3 95.5 105 11 95.8 91.9 99.7 95.9 91.0 101 12 94.7 90.8 98.6 93.9 88.9 99 13 95.9 92.1 99.7 95.5 90.6 100 14 99.1 95.4 102.7 97.9 93.2 103 15 104.1 100.4 107.9 103.0 98.3 108 16 103.8 100.1 107.5 104.6 99.9 109 17 104.6 100.4 108.7 104.3 99.2 109 18 101.9 98.2 105.6 102.9 98.2 108 19 103.4 99.6 107.1 102.7 98.0 107 20 106.3 102.2 110.4 105.2 100.1 110 > print( predict( fitwlsi3e$eq[[ 1 ]], interval = "prediction", level = 0.925 ) ) fit lwr upr 1 97.6 93.9 101.3 2 99.7 96.0 103.3 3 99.6 95.9 103.3 4 99.8 96.1 103.5 5 102.2 98.6 105.9 6 102.0 98.4 105.7 7 102.4 98.7 106.0 8 102.8 99.1 106.5 9 101.7 98.0 105.3 10 100.8 97.0 104.6 11 95.8 91.9 99.7 12 94.7 90.8 98.6 13 95.9 92.1 99.7 14 99.1 95.4 102.7 15 104.1 100.4 107.9 16 103.8 100.1 107.5 17 104.6 100.4 108.7 18 101.9 98.2 105.6 19 103.4 99.6 107.1 20 106.3 102.2 110.4 > > print( predict( fitwlsi4, interval = "confidence", newdata = predictData ) ) demand.pred demand.lwr demand.upr supply.pred supply.lwr supply.upr 1 104 102.0 105 96.4 94.8 98.0 2 106 104.4 108 97.7 96.3 99.0 3 106 104.3 108 97.8 96.4 99.2 4 106 104.6 108 98.1 96.7 99.4 5 109 106.3 111 100.6 98.5 102.8 6 108 106.2 111 100.5 98.6 102.4 7 109 106.7 111 100.4 98.7 102.2 8 110 107.3 112 102.5 100.7 104.2 9 108 105.6 110 101.1 98.9 103.4 10 107 104.1 109 98.5 95.9 101.1 11 101 99.0 103 94.0 91.1 96.9 12 100 98.6 102 92.0 88.8 95.3 13 102 100.5 103 93.7 90.8 96.5 14 105 103.3 107 96.0 93.6 98.5 15 111 107.8 113 101.2 98.8 103.6 16 110 107.8 113 102.8 100.6 104.9 17 111 107.3 114 102.5 99.0 106.0 18 109 106.5 111 101.1 99.4 102.8 19 110 107.9 113 100.9 99.2 102.6 20 114 110.6 117 103.4 102.1 104.7 > print( predict( fitwlsi4$eq[[ 2 ]], interval = "confidence", + newdata = predictData ) ) fit lwr upr 1 96.4 94.8 98.0 2 97.7 96.3 99.0 3 97.8 96.4 99.2 4 98.1 96.7 99.4 5 100.6 98.5 102.8 6 100.5 98.6 102.4 7 100.4 98.7 102.2 8 102.5 100.7 104.2 9 101.1 98.9 103.4 10 98.5 95.9 101.1 11 94.0 91.1 96.9 12 92.0 88.8 95.3 13 93.7 90.8 96.5 14 96.0 93.6 98.5 15 101.2 98.8 103.6 16 102.8 100.6 104.9 17 102.5 99.0 106.0 18 101.1 99.4 102.8 19 100.9 99.2 102.6 20 103.4 102.1 104.7 > > print( predict( fitwlsi5e, se.fit = TRUE, se.pred = TRUE, + interval = "prediction", level = 0.01 ) ) demand.pred demand.se.fit demand.se.pred demand.lwr demand.upr supply.pred 1 97.5 0.540 2.01 97.5 97.6 98.2 2 99.6 0.470 1.99 99.6 99.6 99.6 3 99.5 0.453 1.99 99.5 99.6 99.7 4 99.7 0.474 1.99 99.7 99.7 100.0 5 102.3 0.433 1.98 102.2 102.3 102.4 6 102.0 0.417 1.98 102.0 102.1 102.4 7 102.4 0.439 1.98 102.4 102.4 102.3 8 102.7 0.536 2.01 102.7 102.7 104.4 9 101.7 0.446 1.99 101.7 101.8 102.9 10 100.9 0.627 2.03 100.9 100.9 100.2 11 95.8 0.831 2.11 95.8 95.9 95.7 12 94.6 0.806 2.10 94.6 94.6 93.9 13 95.8 0.676 2.05 95.8 95.8 95.5 14 99.1 0.458 1.99 99.0 99.1 97.8 15 104.2 0.571 2.02 104.2 104.3 102.9 16 103.8 0.508 2.00 103.8 103.9 104.6 17 104.8 0.877 2.12 104.8 104.8 104.1 18 101.9 0.477 1.99 101.8 101.9 103.0 19 103.3 0.602 2.03 103.3 103.4 102.8 20 106.2 1.100 2.23 106.2 106.2 105.5 supply.se.fit supply.se.pred supply.lwr supply.upr 1 0.598 2.52 98.2 98.3 2 0.680 2.54 99.5 99.6 3 0.634 2.53 99.7 99.8 4 0.644 2.54 100.0 100.0 5 0.754 2.57 102.4 102.5 6 0.681 2.55 102.3 102.4 7 0.626 2.53 102.3 102.3 8 0.800 2.58 104.4 104.4 9 0.701 2.55 102.9 102.9 10 0.716 2.55 100.1 100.2 11 0.918 2.62 95.7 95.8 12 1.229 2.74 93.8 93.9 13 1.132 2.70 95.5 95.6 14 0.797 2.58 97.8 97.9 15 0.657 2.54 102.9 103.0 16 0.645 2.54 104.5 104.6 17 1.151 2.71 104.1 104.2 18 0.575 2.52 103.0 103.0 19 0.649 2.54 102.8 102.8 20 0.875 2.60 105.5 105.5 > print( predict( fitwlsi5e$eq[[ 1 ]], se.fit = TRUE, se.pred = TRUE, + interval = "prediction", level = 0.01 ) ) fit se.fit se.pred lwr upr 1 97.5 0.540 2.01 97.5 97.6 2 99.6 0.470 1.99 99.6 99.6 3 99.5 0.453 1.99 99.5 99.6 4 99.7 0.474 1.99 99.7 99.7 5 102.3 0.433 1.98 102.2 102.3 6 102.0 0.417 1.98 102.0 102.1 7 102.4 0.439 1.98 102.4 102.4 8 102.7 0.536 2.01 102.7 102.7 9 101.7 0.446 1.99 101.7 101.8 10 100.9 0.627 2.03 100.9 100.9 11 95.8 0.831 2.11 95.8 95.9 12 94.6 0.806 2.10 94.6 94.6 13 95.8 0.676 2.05 95.8 95.8 14 99.1 0.458 1.99 99.0 99.1 15 104.2 0.571 2.02 104.2 104.3 16 103.8 0.508 2.00 103.8 103.9 17 104.8 0.877 2.12 104.8 104.8 18 101.9 0.477 1.99 101.8 101.9 19 103.3 0.602 2.03 103.3 103.4 20 106.2 1.100 2.23 106.2 106.2 > > # predict just one observation > smallData <- data.frame( price = 130, income = 150, farmPrice = 120, + trend = 25 ) > > print( predict( fitwls1, newdata = smallData ) ) demand.pred supply.pred 1 109 115 > print( predict( fitwls1$eq[[ 1 ]], newdata = smallData ) ) fit 1 109 > > print( predict( fitwls2e, se.fit = TRUE, level = 0.9, + newdata = smallData ) ) demand.pred demand.se.fit supply.pred supply.se.fit 1 109 2.23 116 3.03 > print( predict( fitwls2e$eq[[ 1 ]], se.pred = TRUE, level = 0.99, + newdata = smallData ) ) fit se.pred 1 109 2.96 > > print( predict( fitwls3, interval = "prediction", level = 0.975, + newdata = smallData ) ) demand.pred demand.lwr demand.upr supply.pred supply.lwr supply.upr 1 109 101 116 116 107 126 > print( predict( fitwls3$eq[[ 1 ]], interval = "confidence", level = 0.8, + newdata = smallData ) ) fit lwr upr 1 109 106 112 > > print( predict( fitwls4e, se.fit = TRUE, interval = "confidence", + level = 0.999, newdata = smallData ) ) demand.pred demand.se.fit demand.lwr demand.upr supply.pred supply.se.fit 1 108 2.02 101 116 117 2.02 supply.lwr supply.upr 1 110 124 > print( predict( fitwls4e$eq[[ 2 ]], se.pred = TRUE, interval = "prediction", + level = 0.75, newdata = smallData ) ) fit se.pred lwr upr 1 117 3.18 113 121 > > print( predict( fitwls5, se.fit = TRUE, interval = "prediction", + newdata = smallData ) ) demand.pred demand.se.fit demand.lwr demand.upr supply.pred supply.se.fit 1 108 2.2 102 114 117 2.23 supply.lwr supply.upr 1 110 124 > print( predict( fitwls5$eq[[ 1 ]], se.pred = TRUE, interval = "confidence", + newdata = smallData ) ) fit se.pred lwr upr 1 108 2.93 104 113 > > print( predict( fitwlsi3e, se.fit = TRUE, se.pred = TRUE, + interval = "prediction", level = 0.5, newdata = smallData ) ) demand.pred demand.se.fit demand.se.pred demand.lwr demand.upr supply.pred 1 109 2.23 2.95 107 111 116 supply.se.fit supply.se.pred supply.lwr supply.upr 1 3.04 3.9 114 119 > print( predict( fitwlsi3e$eq[[ 1 ]], se.fit = TRUE, se.pred = TRUE, + interval = "confidence", level = 0.25, newdata = smallData ) ) fit se.fit se.pred lwr upr 1 109 2.23 2.95 108 109 > > > ## ************ correlation of predicted values *************** > print( correlation.systemfit( fitwls1, 2, 1 ) ) [,1] [1,] 0 [2,] 0 [3,] 0 [4,] 0 [5,] 0 [6,] 0 [7,] 0 [8,] 0 [9,] 0 [10,] 0 [11,] 0 [12,] 0 [13,] 0 [14,] 0 [15,] 0 [16,] 0 [17,] 0 [18,] 0 [19,] 0 [20,] 0 > > print( correlation.systemfit( fitwls2e, 1, 2 ) ) [,1] [1,] 0.411525 [2,] 0.147624 [3,] 0.147711 [4,] 0.107654 [5,] -0.069284 [6,] -0.053039 [7,] -0.051551 [8,] -0.006153 [9,] -0.000333 [10,] -0.001262 [11,] 0.048574 [12,] 0.064996 [13,] 0.024618 [14,] -0.028485 [15,] 0.174980 [16,] 0.252722 [17,] 0.103392 [18,] 0.074219 [19,] 0.156545 [20,] 0.135438 > > print( correlation.systemfit( fitwls3, 2, 1 ) ) [,1] [1,] 0.405901 [2,] 0.145364 [3,] 0.145375 [4,] 0.105835 [5,] -0.067958 [6,] -0.052026 [7,] -0.050543 [8,] -0.006031 [9,] -0.000326 [10,] -0.001237 [11,] 0.047534 [12,] 0.063493 [13,] 0.024060 [14,] -0.027910 [15,] 0.171580 [16,] 0.248212 [17,] 0.101409 [18,] 0.073084 [19,] 0.153950 [20,] 0.132944 > > print( correlation.systemfit( fitwls4e, 1, 2 ) ) [,1] [1,] 0.38162 [2,] 0.29173 [3,] 0.25421 [4,] 0.28598 [5,] -0.02775 [6,] -0.04974 [7,] -0.05850 [8,] 0.09388 [9,] 0.09469 [10,] 0.43814 [11,] 0.10559 [12,] 0.00876 [13,] 0.04090 [14,] -0.03984 [15,] 0.40767 [16,] 0.24571 [17,] 0.64160 [18,] 0.24037 [19,] 0.34075 [20,] 0.54270 > > print( correlation.systemfit( fitwls5, 2, 1 ) ) [,1] [1,] 0.3775 [2,] 0.2936 [3,] 0.2553 [4,] 0.2875 [5,] -0.0274 [6,] -0.0492 [7,] -0.0578 [8,] 0.0932 [9,] 0.0944 [10,] 0.4375 [11,] 0.1027 [12,] 0.0072 [13,] 0.0404 [14,] -0.0396 [15,] 0.4062 [16,] 0.2430 [17,] 0.6406 [18,] 0.2362 [19,] 0.3347 [20,] 0.5378 > > print( correlation.systemfit( fitwlsi1e, 1, 2 ) ) [,1] [1,] 0 [2,] 0 [3,] 0 [4,] 0 [5,] 0 [6,] 0 [7,] 0 [8,] 0 [9,] 0 [10,] 0 [11,] 0 [12,] 0 [13,] 0 [14,] 0 [15,] 0 [16,] 0 [17,] 0 [18,] 0 [19,] 0 [20,] 0 > > print( correlation.systemfit( fitwlsi2, 2, 1 ) ) [,1] [1,] 0.404696 [2,] 0.144881 [3,] 0.144877 [4,] 0.105448 [5,] -0.067678 [6,] -0.051812 [7,] -0.050330 [8,] -0.006005 [9,] -0.000325 [10,] -0.001232 [11,] 0.047315 [12,] 0.063179 [13,] 0.023943 [14,] -0.027789 [15,] 0.170862 [16,] 0.247256 [17,] 0.100990 [18,] 0.072842 [19,] 0.153398 [20,] 0.132415 > > print( correlation.systemfit( fitwlsi3e, 1, 2 ) ) [,1] [1,] 0.410485 [2,] 0.147206 [3,] 0.147278 [4,] 0.107316 [5,] -0.069036 [6,] -0.052850 [7,] -0.051363 [8,] -0.006130 [9,] -0.000331 [10,] -0.001257 [11,] 0.048379 [12,] 0.064714 [13,] 0.024513 [14,] -0.028377 [15,] 0.174345 [16,] 0.251882 [17,] 0.103022 [18,] 0.074009 [19,] 0.156063 [20,] 0.134974 > > print( correlation.systemfit( fitwlsi4, 2, 1 ) ) [,1] [1,] 0.37672 [2,] 0.29387 [3,] 0.25544 [4,] 0.28775 [5,] -0.02729 [6,] -0.04911 [7,] -0.05771 [8,] 0.09311 [9,] 0.09437 [10,] 0.43736 [11,] 0.10223 [12,] 0.00693 [13,] 0.04035 [14,] -0.03961 [15,] 0.40591 [16,] 0.24248 [17,] 0.64034 [18,] 0.23551 [19,] 0.33360 [20,] 0.53687 > > print( correlation.systemfit( fitwlsi5e, 1, 2 ) ) [,1] [1,] 0.38098 [2,] 0.29204 [3,] 0.25439 [4,] 0.28624 [5,] -0.02769 [6,] -0.04966 [7,] -0.05840 [8,] 0.09378 [9,] 0.09465 [10,] 0.43805 [11,] 0.10513 [12,] 0.00851 [13,] 0.04083 [14,] -0.03981 [15,] 0.40746 [16,] 0.24528 [17,] 0.64146 [18,] 0.23972 [19,] 0.33979 [20,] 0.54192 > > > ## ************ Log-Likelihood values *************** > print( logLik( fitwls1 ) ) 'log Lik.' -67.8 (df=9) > print( logLik( fitwls1, residCovDiag = TRUE ) ) 'log Lik.' -83.6 (df=9) > all.equal( logLik( fitwls1, residCovDiag = TRUE ), + logLik( lmDemand ) + logLik( lmSupply ), + check.attributes = FALSE ) [1] TRUE > > print( logLik( fitwls2e ) ) 'log Lik.' -61.5 (df=8) > print( logLik( fitwls2e, residCovDiag = TRUE ) ) 'log Lik.' -84 (df=8) > > print( logLik( fitwls3 ) ) 'log Lik.' -61.4 (df=8) > print( logLik( fitwls3, residCovDiag = TRUE ) ) 'log Lik.' -84 (df=8) > > print( logLik( fitwls4e ) ) 'log Lik.' -62.2 (df=7) > print( logLik( fitwls4e, residCovDiag = TRUE ) ) 'log Lik.' -84 (df=7) > > print( logLik( fitwls5 ) ) 'log Lik.' -62.1 (df=7) > print( logLik( fitwls5, residCovDiag = TRUE ) ) 'log Lik.' -84 (df=7) > > print( logLik( fitwlsi1e ) ) 'log Lik.' -67.8 (df=9) > print( logLik( fitwlsi1e, residCovDiag = TRUE ) ) 'log Lik.' -83.6 (df=9) > > print( logLik( fitwlsi2 ) ) 'log Lik.' -61.4 (df=8) > print( logLik( fitwlsi2, residCovDiag = TRUE ) ) 'log Lik.' -84 (df=8) > > print( logLik( fitwlsi3e ) ) 'log Lik.' -61.5 (df=8) > print( logLik( fitwlsi3e, residCovDiag = TRUE ) ) 'log Lik.' -84 (df=8) > > print( logLik( fitwlsi4 ) ) 'log Lik.' -62.1 (df=7) > print( logLik( fitwlsi4, residCovDiag = TRUE ) ) 'log Lik.' -84 (df=7) > > print( logLik( fitwlsi5e ) ) 'log Lik.' -62.2 (df=7) > print( logLik( fitwlsi5e, residCovDiag = TRUE ) ) 'log Lik.' -84 (df=7) > > > ## ************** F tests **************** > # testing first restriction > print( linearHypothesis( fitwls1, restrm ) ) Linear hypothesis test (Theil's F test) Hypothesis: demand_income - supply_trend = 0 Model 1: restricted model Model 2: fitwls1 Res.Df Df F Pr(>F) 1 34 2 33 1 0.64 0.43 > linearHypothesis( fitwls1, restrict ) Linear hypothesis test (Theil's F test) Hypothesis: demand_income - supply_trend = 0 Model 1: restricted model Model 2: fitwls1 Res.Df Df F Pr(>F) 1 34 2 33 1 0.64 0.43 > > print( linearHypothesis( fitwlsi1e, restrm ) ) Linear hypothesis test (Theil's F test) Hypothesis: demand_income - supply_trend = 0 Model 1: restricted model Model 2: fitwlsi1e Res.Df Df F Pr(>F) 1 34 2 33 1 0.66 0.42 > linearHypothesis( fitwlsi1e, restrict ) Linear hypothesis test (Theil's F test) Hypothesis: demand_income - supply_trend = 0 Model 1: restricted model Model 2: fitwlsi1e Res.Df Df F Pr(>F) 1 34 2 33 1 0.66 0.42 > > # testing second restriction > restrOnly2m <- matrix(0,1,7) > restrOnly2q <- 0.5 > restrOnly2m[1,2] <- -1 > restrOnly2m[1,5] <- 1 > restrictOnly2 <- "- demand_price + supply_price = 0.5" > # first restriction not imposed > print( linearHypothesis( fitwls1e, restrOnly2m, restrOnly2q ) ) Linear hypothesis test (Theil's F test) Hypothesis: - demand_price + supply_price = 0.5 Model 1: restricted model Model 2: fitwls1e Res.Df Df F Pr(>F) 1 34 2 33 1 0.03 0.86 > linearHypothesis( fitwls1e, restrictOnly2 ) Linear hypothesis test (Theil's F test) Hypothesis: - demand_price + supply_price = 0.5 Model 1: restricted model Model 2: fitwls1e Res.Df Df F Pr(>F) 1 34 2 33 1 0.03 0.86 > > print( linearHypothesis( fitwlsi1, restrOnly2m, restrOnly2q ) ) Linear hypothesis test (Theil's F test) Hypothesis: - demand_price + supply_price = 0.5 Model 1: restricted model Model 2: fitwlsi1 Res.Df Df F Pr(>F) 1 34 2 33 1 0.03 0.86 > linearHypothesis( fitwlsi1, restrictOnly2 ) Linear hypothesis test (Theil's F test) Hypothesis: - demand_price + supply_price = 0.5 Model 1: restricted model Model 2: fitwlsi1 Res.Df Df F Pr(>F) 1 34 2 33 1 0.03 0.86 > > # first restriction imposed > print( linearHypothesis( fitwls2, restrOnly2m, restrOnly2q ) ) Linear hypothesis test (Theil's F test) Hypothesis: - demand_price + supply_price = 0.5 Model 1: restricted model Model 2: fitwls2 Res.Df Df F Pr(>F) 1 35 2 34 1 0.08 0.78 > linearHypothesis( fitwls2, restrictOnly2 ) Linear hypothesis test (Theil's F test) Hypothesis: - demand_price + supply_price = 0.5 Model 1: restricted model Model 2: fitwls2 Res.Df Df F Pr(>F) 1 35 2 34 1 0.08 0.78 > > print( linearHypothesis( fitwls3, restrOnly2m, restrOnly2q ) ) Linear hypothesis test (Theil's F test) Hypothesis: - demand_price + supply_price = 0.5 Model 1: restricted model Model 2: fitwls3 Res.Df Df F Pr(>F) 1 35 2 34 1 0.08 0.78 > linearHypothesis( fitwls3, restrictOnly2 ) Linear hypothesis test (Theil's F test) Hypothesis: - demand_price + supply_price = 0.5 Model 1: restricted model Model 2: fitwls3 Res.Df Df F Pr(>F) 1 35 2 34 1 0.08 0.78 > > print( linearHypothesis( fitwlsi2e, restrOnly2m, restrOnly2q ) ) Linear hypothesis test (Theil's F test) Hypothesis: - demand_price + supply_price = 0.5 Model 1: restricted model Model 2: fitwlsi2e Res.Df Df F Pr(>F) 1 35 2 34 1 0.08 0.77 > linearHypothesis( fitwlsi2e, restrictOnly2 ) Linear hypothesis test (Theil's F test) Hypothesis: - demand_price + supply_price = 0.5 Model 1: restricted model Model 2: fitwlsi2e Res.Df Df F Pr(>F) 1 35 2 34 1 0.08 0.77 > > print( linearHypothesis( fitwlsi3e, restrOnly2m, restrOnly2q ) ) Linear hypothesis test (Theil's F test) Hypothesis: - demand_price + supply_price = 0.5 Model 1: restricted model Model 2: fitwlsi3e Res.Df Df F Pr(>F) 1 35 2 34 1 0.08 0.77 > linearHypothesis( fitwlsi3e, restrictOnly2 ) Linear hypothesis test (Theil's F test) Hypothesis: - demand_price + supply_price = 0.5 Model 1: restricted model Model 2: fitwlsi3e Res.Df Df F Pr(>F) 1 35 2 34 1 0.08 0.77 > > # testing both of the restrictions > print( linearHypothesis( fitwls1e, restr2m, restr2q ) ) Linear hypothesis test (Theil's F test) Hypothesis: demand_income - supply_trend = 0 - demand_price + supply_price = 0.5 Model 1: restricted model Model 2: fitwls1e Res.Df Df F Pr(>F) 1 35 2 33 2 0.37 0.69 > linearHypothesis( fitwls1e, restrict2 ) Linear hypothesis test (Theil's F test) Hypothesis: demand_income - supply_trend = 0 - demand_price + supply_price = 0.5 Model 1: restricted model Model 2: fitwls1e Res.Df Df F Pr(>F) 1 35 2 33 2 0.37 0.69 > > print( linearHypothesis( fitwlsi1, restr2m, restr2q ) ) Linear hypothesis test (Theil's F test) Hypothesis: demand_income - supply_trend = 0 - demand_price + supply_price = 0.5 Model 1: restricted model Model 2: fitwlsi1 Res.Df Df F Pr(>F) 1 35 2 33 2 0.36 0.7 > linearHypothesis( fitwlsi1, restrict2 ) Linear hypothesis test (Theil's F test) Hypothesis: demand_income - supply_trend = 0 - demand_price + supply_price = 0.5 Model 1: restricted model Model 2: fitwlsi1 Res.Df Df F Pr(>F) 1 35 2 33 2 0.36 0.7 > > > ## ************** Wald tests **************** > # testing first restriction > print( linearHypothesis( fitwls1, restrm, test = "Chisq" ) ) Linear hypothesis test (Chi^2 statistic of a Wald test) Hypothesis: demand_income - supply_trend = 0 Model 1: restricted model Model 2: fitwls1 Res.Df Df Chisq Pr(>Chisq) 1 34 2 33 1 0.64 0.42 > linearHypothesis( fitwls1, restrict, test = "Chisq" ) Linear hypothesis test (Chi^2 statistic of a Wald test) Hypothesis: demand_income - supply_trend = 0 Model 1: restricted model Model 2: fitwls1 Res.Df Df Chisq Pr(>Chisq) 1 34 2 33 1 0.64 0.42 > > print( linearHypothesis( fitwlsi1e, restrm, test = "Chisq" ) ) Linear hypothesis test (Chi^2 statistic of a Wald test) Hypothesis: demand_income - supply_trend = 0 Model 1: restricted model Model 2: fitwlsi1e Res.Df Df Chisq Pr(>Chisq) 1 34 2 33 1 0.8 0.37 > linearHypothesis( fitwlsi1e, restrict, test = "Chisq" ) Linear hypothesis test (Chi^2 statistic of a Wald test) Hypothesis: demand_income - supply_trend = 0 Model 1: restricted model Model 2: fitwlsi1e Res.Df Df Chisq Pr(>Chisq) 1 34 2 33 1 0.8 0.37 > > # testing second restriction > # first restriction not imposed > print( linearHypothesis( fitwls1e, restrOnly2m, restrOnly2q, test = "Chisq" ) ) Linear hypothesis test (Chi^2 statistic of a Wald test) Hypothesis: - demand_price + supply_price = 0.5 Model 1: restricted model Model 2: fitwls1e Res.Df Df Chisq Pr(>Chisq) 1 34 2 33 1 0.04 0.84 > linearHypothesis( fitwls1e, restrictOnly2, test = "Chisq" ) Linear hypothesis test (Chi^2 statistic of a Wald test) Hypothesis: - demand_price + supply_price = 0.5 Model 1: restricted model Model 2: fitwls1e Res.Df Df Chisq Pr(>Chisq) 1 34 2 33 1 0.04 0.84 > > print( linearHypothesis( fitwlsi1, restrOnly2m, restrOnly2q, test = "Chisq" ) ) Linear hypothesis test (Chi^2 statistic of a Wald test) Hypothesis: - demand_price + supply_price = 0.5 Model 1: restricted model Model 2: fitwlsi1 Res.Df Df Chisq Pr(>Chisq) 1 34 2 33 1 0.03 0.86 > linearHypothesis( fitwlsi1, restrictOnly2, test = "Chisq" ) Linear hypothesis test (Chi^2 statistic of a Wald test) Hypothesis: - demand_price + supply_price = 0.5 Model 1: restricted model Model 2: fitwlsi1 Res.Df Df Chisq Pr(>Chisq) 1 34 2 33 1 0.03 0.86 > > # first restriction imposed > print( linearHypothesis( fitwls2, restrOnly2m, restrOnly2q, test = "Chisq" ) ) Linear hypothesis test (Chi^2 statistic of a Wald test) Hypothesis: - demand_price + supply_price = 0.5 Model 1: restricted model Model 2: fitwls2 Res.Df Df Chisq Pr(>Chisq) 1 35 2 34 1 0.08 0.78 > linearHypothesis( fitwls2, restrictOnly2, test = "Chisq" ) Linear hypothesis test (Chi^2 statistic of a Wald test) Hypothesis: - demand_price + supply_price = 0.5 Model 1: restricted model Model 2: fitwls2 Res.Df Df Chisq Pr(>Chisq) 1 35 2 34 1 0.08 0.78 > > print( linearHypothesis( fitwls3, restrOnly2m, restrOnly2q, test = "Chisq" ) ) Linear hypothesis test (Chi^2 statistic of a Wald test) Hypothesis: - demand_price + supply_price = 0.5 Model 1: restricted model Model 2: fitwls3 Res.Df Df Chisq Pr(>Chisq) 1 35 2 34 1 0.08 0.78 > linearHypothesis( fitwls3, restrictOnly2, test = "Chisq" ) Linear hypothesis test (Chi^2 statistic of a Wald test) Hypothesis: - demand_price + supply_price = 0.5 Model 1: restricted model Model 2: fitwls3 Res.Df Df Chisq Pr(>Chisq) 1 35 2 34 1 0.08 0.78 > > print( linearHypothesis( fitwlsi2e, restrOnly2m, restrOnly2q, test = "Chisq" ) ) Linear hypothesis test (Chi^2 statistic of a Wald test) Hypothesis: - demand_price + supply_price = 0.5 Model 1: restricted model Model 2: fitwlsi2e Res.Df Df Chisq Pr(>Chisq) 1 35 2 34 1 0.1 0.75 > linearHypothesis( fitwlsi2e, restrictOnly2, test = "Chisq" ) Linear hypothesis test (Chi^2 statistic of a Wald test) Hypothesis: - demand_price + supply_price = 0.5 Model 1: restricted model Model 2: fitwlsi2e Res.Df Df Chisq Pr(>Chisq) 1 35 2 34 1 0.1 0.75 > > print( linearHypothesis( fitwlsi3e, restrOnly2m, restrOnly2q, test = "Chisq" ) ) Linear hypothesis test (Chi^2 statistic of a Wald test) Hypothesis: - demand_price + supply_price = 0.5 Model 1: restricted model Model 2: fitwlsi3e Res.Df Df Chisq Pr(>Chisq) 1 35 2 34 1 0.1 0.75 > linearHypothesis( fitwlsi3e, restrictOnly2, test = "Chisq" ) Linear hypothesis test (Chi^2 statistic of a Wald test) Hypothesis: - demand_price + supply_price = 0.5 Model 1: restricted model Model 2: fitwlsi3e Res.Df Df Chisq Pr(>Chisq) 1 35 2 34 1 0.1 0.75 > > # testing both of the restrictions > print( linearHypothesis( fitwls1e, restr2m, restr2q, test = "Chisq" ) ) Linear hypothesis test (Chi^2 statistic of a Wald test) Hypothesis: demand_income - supply_trend = 0 - demand_price + supply_price = 0.5 Model 1: restricted model Model 2: fitwls1e Res.Df Df Chisq Pr(>Chisq) 1 35 2 33 2 0.9 0.64 > linearHypothesis( fitwls1e, restrict2, test = "Chisq" ) Linear hypothesis test (Chi^2 statistic of a Wald test) Hypothesis: demand_income - supply_trend = 0 - demand_price + supply_price = 0.5 Model 1: restricted model Model 2: fitwls1e Res.Df Df Chisq Pr(>Chisq) 1 35 2 33 2 0.9 0.64 > > print( linearHypothesis( fitwlsi1, restr2m, restr2q, test = "Chisq" ) ) Linear hypothesis test (Chi^2 statistic of a Wald test) Hypothesis: demand_income - supply_trend = 0 - demand_price + supply_price = 0.5 Model 1: restricted model Model 2: fitwlsi1 Res.Df Df Chisq Pr(>Chisq) 1 35 2 33 2 0.72 0.7 > linearHypothesis( fitwlsi1, restrict2, test = "Chisq" ) Linear hypothesis test (Chi^2 statistic of a Wald test) Hypothesis: demand_income - supply_trend = 0 - demand_price + supply_price = 0.5 Model 1: restricted model Model 2: fitwlsi1 Res.Df Df Chisq Pr(>Chisq) 1 35 2 33 2 0.72 0.7 > > > ## ****************** model frame ************************** > print( mf <- model.frame( fitwls1 ) ) consump price income farmPrice trend 1 98.5 100.3 87.4 98.0 1 2 99.2 104.3 97.6 99.1 2 3 102.2 103.4 96.7 99.1 3 4 101.5 104.5 98.2 98.1 4 5 104.2 98.0 99.8 110.8 5 6 103.2 99.5 100.5 108.2 6 7 104.0 101.1 103.2 105.6 7 8 99.9 104.8 107.8 109.8 8 9 100.3 96.4 96.6 108.7 9 10 102.8 91.2 88.9 100.6 10 11 95.4 93.1 75.1 81.0 11 12 92.4 98.8 76.9 68.6 12 13 94.5 102.9 84.6 70.9 13 14 98.8 98.8 90.6 81.4 14 15 105.8 95.1 103.1 102.3 15 16 100.2 98.5 105.1 105.0 16 17 103.5 86.5 96.4 110.5 17 18 99.9 104.0 104.4 92.5 18 19 105.2 105.8 110.7 89.3 19 20 106.2 113.5 127.1 93.0 20 > print( mf1 <- model.frame( fitwls1$eq[[ 1 ]] ) ) consump price income 1 98.5 100.3 87.4 2 99.2 104.3 97.6 3 102.2 103.4 96.7 4 101.5 104.5 98.2 5 104.2 98.0 99.8 6 103.2 99.5 100.5 7 104.0 101.1 103.2 8 99.9 104.8 107.8 9 100.3 96.4 96.6 10 102.8 91.2 88.9 11 95.4 93.1 75.1 12 92.4 98.8 76.9 13 94.5 102.9 84.6 14 98.8 98.8 90.6 15 105.8 95.1 103.1 16 100.2 98.5 105.1 17 103.5 86.5 96.4 18 99.9 104.0 104.4 19 105.2 105.8 110.7 20 106.2 113.5 127.1 > print( attributes( mf1 )$terms ) consump ~ price + income attr(,"variables") list(consump, price, income) attr(,"factors") price income consump 0 0 price 1 0 income 0 1 attr(,"term.labels") [1] "price" "income" attr(,"order") [1] 1 1 attr(,"intercept") [1] 1 attr(,"response") [1] 1 attr(,".Environment") attr(,"predvars") list(consump, price, income) attr(,"dataClasses") consump price income "numeric" "numeric" "numeric" > print( mf2 <- model.frame( fitwls1$eq[[ 2 ]] ) ) consump price farmPrice trend 1 98.5 100.3 98.0 1 2 99.2 104.3 99.1 2 3 102.2 103.4 99.1 3 4 101.5 104.5 98.1 4 5 104.2 98.0 110.8 5 6 103.2 99.5 108.2 6 7 104.0 101.1 105.6 7 8 99.9 104.8 109.8 8 9 100.3 96.4 108.7 9 10 102.8 91.2 100.6 10 11 95.4 93.1 81.0 11 12 92.4 98.8 68.6 12 13 94.5 102.9 70.9 13 14 98.8 98.8 81.4 14 15 105.8 95.1 102.3 15 16 100.2 98.5 105.0 16 17 103.5 86.5 110.5 17 18 99.9 104.0 92.5 18 19 105.2 105.8 89.3 19 20 106.2 113.5 93.0 20 > print( attributes( mf2 )$terms ) consump ~ price + farmPrice + trend attr(,"variables") list(consump, price, farmPrice, trend) attr(,"factors") price farmPrice trend consump 0 0 0 price 1 0 0 farmPrice 0 1 0 trend 0 0 1 attr(,"term.labels") [1] "price" "farmPrice" "trend" attr(,"order") [1] 1 1 1 attr(,"intercept") [1] 1 attr(,"response") [1] 1 attr(,".Environment") attr(,"predvars") list(consump, price, farmPrice, trend) attr(,"dataClasses") consump price farmPrice trend "numeric" "numeric" "numeric" "numeric" > > print( all.equal( mf, model.frame( fitwls2e ) ) ) [1] TRUE > print( all.equal( mf1, model.frame( fitwls2e$eq[[ 1 ]] ) ) ) [1] TRUE > > print( all.equal( mf, model.frame( fitwls3 ) ) ) [1] TRUE > print( all.equal( mf2, model.frame( fitwls3$eq[[ 2 ]] ) ) ) [1] TRUE > > print( all.equal( mf, model.frame( fitwls4e ) ) ) [1] TRUE > print( all.equal( mf1, model.frame( fitwls4e$eq[[ 1 ]] ) ) ) [1] TRUE > > print( all.equal( mf, model.frame( fitwls5 ) ) ) [1] TRUE > print( all.equal( mf2, model.frame( fitwls5$eq[[ 2 ]] ) ) ) [1] TRUE > > print( all.equal( mf, model.frame( fitwlsi1e ) ) ) [1] TRUE > print( all.equal( mf1, model.frame( fitwlsi1e$eq[[ 1 ]] ) ) ) [1] TRUE > > print( all.equal( mf, model.frame( fitwlsi2 ) ) ) [1] TRUE > print( all.equal( mf2, model.frame( fitwlsi2$eq[[ 2 ]] ) ) ) [1] TRUE > > print( all.equal( mf, model.frame( fitwlsi3e ) ) ) [1] TRUE > print( all.equal( mf1, model.frame( fitwlsi3e$eq[[ 1 ]] ) ) ) [1] TRUE > > print( all.equal( mf, model.frame( fitwlsi4 ) ) ) [1] TRUE > print( all.equal( mf2, model.frame( fitwlsi4$eq[[ 2 ]] ) ) ) [1] TRUE > > print( all.equal( mf, model.frame( fitwlsi5e ) ) ) [1] TRUE > print( all.equal( mf1, model.frame( fitwlsi5e$eq[[ 1 ]] ) ) ) [1] TRUE > > > ## **************** model matrix ************************ > # with x (returnModelMatrix) = TRUE > print( !is.null( fitwls1e$eq[[ 1 ]]$x ) ) [1] TRUE > print( mm <- model.matrix( fitwlsi1e ) ) demand_(Intercept) demand_price demand_income supply_(Intercept) demand_1 1 100.3 87.4 0 demand_2 1 104.3 97.6 0 demand_3 1 103.4 96.7 0 demand_4 1 104.5 98.2 0 demand_5 1 98.0 99.8 0 demand_6 1 99.5 100.5 0 demand_7 1 101.1 103.2 0 demand_8 1 104.8 107.8 0 demand_9 1 96.4 96.6 0 demand_10 1 91.2 88.9 0 demand_11 1 93.1 75.1 0 demand_12 1 98.8 76.9 0 demand_13 1 102.9 84.6 0 demand_14 1 98.8 90.6 0 demand_15 1 95.1 103.1 0 demand_16 1 98.5 105.1 0 demand_17 1 86.5 96.4 0 demand_18 1 104.0 104.4 0 demand_19 1 105.8 110.7 0 demand_20 1 113.5 127.1 0 supply_1 0 0.0 0.0 1 supply_2 0 0.0 0.0 1 supply_3 0 0.0 0.0 1 supply_4 0 0.0 0.0 1 supply_5 0 0.0 0.0 1 supply_6 0 0.0 0.0 1 supply_7 0 0.0 0.0 1 supply_8 0 0.0 0.0 1 supply_9 0 0.0 0.0 1 supply_10 0 0.0 0.0 1 supply_11 0 0.0 0.0 1 supply_12 0 0.0 0.0 1 supply_13 0 0.0 0.0 1 supply_14 0 0.0 0.0 1 supply_15 0 0.0 0.0 1 supply_16 0 0.0 0.0 1 supply_17 0 0.0 0.0 1 supply_18 0 0.0 0.0 1 supply_19 0 0.0 0.0 1 supply_20 0 0.0 0.0 1 supply_price supply_farmPrice supply_trend demand_1 0.0 0.0 0 demand_2 0.0 0.0 0 demand_3 0.0 0.0 0 demand_4 0.0 0.0 0 demand_5 0.0 0.0 0 demand_6 0.0 0.0 0 demand_7 0.0 0.0 0 demand_8 0.0 0.0 0 demand_9 0.0 0.0 0 demand_10 0.0 0.0 0 demand_11 0.0 0.0 0 demand_12 0.0 0.0 0 demand_13 0.0 0.0 0 demand_14 0.0 0.0 0 demand_15 0.0 0.0 0 demand_16 0.0 0.0 0 demand_17 0.0 0.0 0 demand_18 0.0 0.0 0 demand_19 0.0 0.0 0 demand_20 0.0 0.0 0 supply_1 100.3 98.0 1 supply_2 104.3 99.1 2 supply_3 103.4 99.1 3 supply_4 104.5 98.1 4 supply_5 98.0 110.8 5 supply_6 99.5 108.2 6 supply_7 101.1 105.6 7 supply_8 104.8 109.8 8 supply_9 96.4 108.7 9 supply_10 91.2 100.6 10 supply_11 93.1 81.0 11 supply_12 98.8 68.6 12 supply_13 102.9 70.9 13 supply_14 98.8 81.4 14 supply_15 95.1 102.3 15 supply_16 98.5 105.0 16 supply_17 86.5 110.5 17 supply_18 104.0 92.5 18 supply_19 105.8 89.3 19 supply_20 113.5 93.0 20 > print( mm1 <- model.matrix( fitwlsi1e$eq[[ 1 ]] ) ) (Intercept) price income 1 1 100.3 87.4 2 1 104.3 97.6 3 1 103.4 96.7 4 1 104.5 98.2 5 1 98.0 99.8 6 1 99.5 100.5 7 1 101.1 103.2 8 1 104.8 107.8 9 1 96.4 96.6 10 1 91.2 88.9 11 1 93.1 75.1 12 1 98.8 76.9 13 1 102.9 84.6 14 1 98.8 90.6 15 1 95.1 103.1 16 1 98.5 105.1 17 1 86.5 96.4 18 1 104.0 104.4 19 1 105.8 110.7 20 1 113.5 127.1 attr(,"assign") [1] 0 1 2 > print( mm2 <- model.matrix( fitwlsi1e$eq[[ 2 ]] ) ) (Intercept) price farmPrice trend 1 1 100.3 98.0 1 2 1 104.3 99.1 2 3 1 103.4 99.1 3 4 1 104.5 98.1 4 5 1 98.0 110.8 5 6 1 99.5 108.2 6 7 1 101.1 105.6 7 8 1 104.8 109.8 8 9 1 96.4 108.7 9 10 1 91.2 100.6 10 11 1 93.1 81.0 11 12 1 98.8 68.6 12 13 1 102.9 70.9 13 14 1 98.8 81.4 14 15 1 95.1 102.3 15 16 1 98.5 105.0 16 17 1 86.5 110.5 17 18 1 104.0 92.5 18 19 1 105.8 89.3 19 20 1 113.5 93.0 20 attr(,"assign") [1] 0 1 2 3 > > # with x (returnModelMatrix) = FALSE > print( all.equal( mm, model.matrix( fitwlsi1 ) ) ) [1] TRUE > print( all.equal( mm1, model.matrix( fitwlsi1$eq[[ 1 ]] ) ) ) [1] TRUE > print( all.equal( mm2, model.matrix( fitwlsi1$eq[[ 2 ]] ) ) ) [1] TRUE > print( !is.null( fitwls1$eq[[ 1 ]]$x ) ) [1] FALSE > > # with x (returnModelMatrix) = TRUE > print( !is.null( fitwls2$eq[[ 1 ]]$x ) ) [1] TRUE > print( all.equal( mm, model.matrix( fitwls2 ) ) ) [1] TRUE > print( all.equal( mm1, model.matrix( fitwls2$eq[[ 1 ]] ) ) ) [1] TRUE > print( all.equal( mm2, model.matrix( fitwls2$eq[[ 2 ]] ) ) ) [1] TRUE > > # with x (returnModelMatrix) = FALSE > print( all.equal( mm, model.matrix( fitwls2e ) ) ) [1] TRUE > print( all.equal( mm1, model.matrix( fitwls2e$eq[[ 1 ]] ) ) ) [1] TRUE > print( all.equal( mm2, model.matrix( fitwls2e$eq[[ 2 ]] ) ) ) [1] TRUE > print( !is.null( fitwls2e$eq[[ 1 ]]$x ) ) [1] FALSE > > # with x (returnModelMatrix) = TRUE > print( !is.null( fitwlsi3$eq[[ 1 ]]$x ) ) [1] TRUE > print( all.equal( mm, model.matrix( fitwlsi3 ) ) ) [1] TRUE > print( all.equal( mm1, model.matrix( fitwlsi3$eq[[ 1 ]] ) ) ) [1] TRUE > print( all.equal( mm2, model.matrix( fitwlsi3$eq[[ 2 ]] ) ) ) [1] TRUE > > # with x (returnModelMatrix) = FALSE > print( all.equal( mm, model.matrix( fitwlsi3e ) ) ) [1] TRUE > print( all.equal( mm1, model.matrix( fitwlsi3e$eq[[ 1 ]] ) ) ) [1] TRUE > print( all.equal( mm2, model.matrix( fitwlsi3e$eq[[ 2 ]] ) ) ) [1] TRUE > print( !is.null( fitwlsi3e$eq[[ 1 ]]$x ) ) [1] FALSE > > # with x (returnModelMatrix) = TRUE > print( !is.null( fitwls4e$eq[[ 1 ]]$x ) ) [1] TRUE > print( all.equal( mm, model.matrix( fitwls4e ) ) ) [1] TRUE > print( all.equal( mm1, model.matrix( fitwls4e$eq[[ 1 ]] ) ) ) [1] TRUE > print( all.equal( mm2, model.matrix( fitwls4e$eq[[ 2 ]] ) ) ) [1] TRUE > > # with x (returnModelMatrix) = FALSE > print( all.equal( mm, model.matrix( fitwls4Sym ) ) ) [1] TRUE > print( all.equal( mm1, model.matrix( fitwls4Sym$eq[[ 1 ]] ) ) ) [1] TRUE > print( all.equal( mm2, model.matrix( fitwls4Sym$eq[[ 2 ]] ) ) ) [1] TRUE > print( !is.null( fitwls4Sym$eq[[ 1 ]]$x ) ) [1] FALSE > > # with x (returnModelMatrix) = TRUE > print( !is.null( fitwls5$eq[[ 1 ]]$x ) ) [1] TRUE > print( all.equal( mm, model.matrix( fitwls5 ) ) ) [1] TRUE > print( all.equal( mm1, model.matrix( fitwls5$eq[[ 1 ]] ) ) ) [1] TRUE > print( all.equal( mm2, model.matrix( fitwls5$eq[[ 2 ]] ) ) ) [1] TRUE > > # with x (returnModelMatrix) = FALSE > print( all.equal( mm, model.matrix( fitwls5e ) ) ) [1] TRUE > print( all.equal( mm1, model.matrix( fitwls5e$eq[[ 1 ]] ) ) ) [1] TRUE > print( all.equal( mm2, model.matrix( fitwls5e$eq[[ 2 ]] ) ) ) [1] TRUE > print( !is.null( fitwls5e$eq[[ 1 ]]$x ) ) [1] FALSE > > > ## **************** formulas ************************ > formula( fitwls1 ) $demand consump ~ price + income $supply consump ~ price + farmPrice + trend > formula( fitwls1$eq[[ 2 ]] ) consump ~ price + farmPrice + trend > > formula( fitwls2e ) $demand consump ~ price + income $supply consump ~ price + farmPrice + trend > formula( fitwls2e$eq[[ 1 ]] ) consump ~ price + income > > formula( fitwls3 ) $demand consump ~ price + income $supply consump ~ price + farmPrice + trend > formula( fitwls3$eq[[ 2 ]] ) consump ~ price + farmPrice + trend > > formula( fitwls4e ) $demand consump ~ price + income $supply consump ~ price + farmPrice + trend > formula( fitwls4e$eq[[ 1 ]] ) consump ~ price + income > > formula( fitwls5 ) $demand consump ~ price + income $supply consump ~ price + farmPrice + trend > formula( fitwls5$eq[[ 2 ]] ) consump ~ price + farmPrice + trend > > formula( fitwlsi1e ) $demand consump ~ price + income $supply consump ~ price + farmPrice + trend > formula( fitwlsi1e$eq[[ 1 ]] ) consump ~ price + income > > formula( fitwlsi2 ) $demand consump ~ price + income $supply consump ~ price + farmPrice + trend > formula( fitwlsi2$eq[[ 2 ]] ) consump ~ price + farmPrice + trend > > formula( fitwlsi3e ) $demand consump ~ price + income $supply consump ~ price + farmPrice + trend > formula( fitwlsi3e$eq[[ 1 ]] ) consump ~ price + income > > formula( fitwlsi4 ) $demand consump ~ price + income $supply consump ~ price + farmPrice + trend > formula( fitwlsi4$eq[[ 2 ]] ) consump ~ price + farmPrice + trend > > formula( fitwlsi5e ) $demand consump ~ price + income $supply consump ~ price + farmPrice + trend > formula( fitwlsi5e$eq[[ 1 ]] ) consump ~ price + income > > > ## **************** model terms ******************* > terms( fitwls1 ) $demand consump ~ price + income attr(,"variables") list(consump, price, income) attr(,"factors") price income consump 0 0 price 1 0 income 0 1 attr(,"term.labels") [1] "price" "income" attr(,"order") [1] 1 1 attr(,"intercept") [1] 1 attr(,"response") [1] 1 attr(,".Environment") attr(,"predvars") list(consump, price, income) attr(,"dataClasses") consump price income "numeric" "numeric" "numeric" $supply consump ~ price + farmPrice + trend attr(,"variables") list(consump, price, farmPrice, trend) attr(,"factors") price farmPrice trend consump 0 0 0 price 1 0 0 farmPrice 0 1 0 trend 0 0 1 attr(,"term.labels") [1] "price" "farmPrice" "trend" attr(,"order") [1] 1 1 1 attr(,"intercept") [1] 1 attr(,"response") [1] 1 attr(,".Environment") attr(,"predvars") list(consump, price, farmPrice, trend) attr(,"dataClasses") consump price farmPrice trend "numeric" "numeric" "numeric" "numeric" > terms( fitwls1$eq[[ 2 ]] ) consump ~ price + farmPrice + trend attr(,"variables") list(consump, price, farmPrice, trend) attr(,"factors") price farmPrice trend consump 0 0 0 price 1 0 0 farmPrice 0 1 0 trend 0 0 1 attr(,"term.labels") [1] "price" "farmPrice" "trend" attr(,"order") [1] 1 1 1 attr(,"intercept") [1] 1 attr(,"response") [1] 1 attr(,".Environment") attr(,"predvars") list(consump, price, farmPrice, trend) attr(,"dataClasses") consump price farmPrice trend "numeric" "numeric" "numeric" "numeric" > > terms( fitwls2e ) $demand consump ~ price + income attr(,"variables") list(consump, price, income) attr(,"factors") price income consump 0 0 price 1 0 income 0 1 attr(,"term.labels") [1] "price" "income" attr(,"order") [1] 1 1 attr(,"intercept") [1] 1 attr(,"response") [1] 1 attr(,".Environment") attr(,"predvars") list(consump, price, income) attr(,"dataClasses") consump price income "numeric" "numeric" "numeric" $supply consump ~ price + farmPrice + trend attr(,"variables") list(consump, price, farmPrice, trend) attr(,"factors") price farmPrice trend consump 0 0 0 price 1 0 0 farmPrice 0 1 0 trend 0 0 1 attr(,"term.labels") [1] "price" "farmPrice" "trend" attr(,"order") [1] 1 1 1 attr(,"intercept") [1] 1 attr(,"response") [1] 1 attr(,".Environment") attr(,"predvars") list(consump, price, farmPrice, trend) attr(,"dataClasses") consump price farmPrice trend "numeric" "numeric" "numeric" "numeric" > terms( fitwls2e$eq[[ 1 ]] ) consump ~ price + income attr(,"variables") list(consump, price, income) attr(,"factors") price income consump 0 0 price 1 0 income 0 1 attr(,"term.labels") [1] "price" "income" attr(,"order") [1] 1 1 attr(,"intercept") [1] 1 attr(,"response") [1] 1 attr(,".Environment") attr(,"predvars") list(consump, price, income) attr(,"dataClasses") consump price income "numeric" "numeric" "numeric" > > terms( fitwls3 ) $demand consump ~ price + income attr(,"variables") list(consump, price, income) attr(,"factors") price income consump 0 0 price 1 0 income 0 1 attr(,"term.labels") [1] "price" "income" attr(,"order") [1] 1 1 attr(,"intercept") [1] 1 attr(,"response") [1] 1 attr(,".Environment") attr(,"predvars") list(consump, price, income) attr(,"dataClasses") consump price income "numeric" "numeric" "numeric" $supply consump ~ price + farmPrice + trend attr(,"variables") list(consump, price, farmPrice, trend) attr(,"factors") price farmPrice trend consump 0 0 0 price 1 0 0 farmPrice 0 1 0 trend 0 0 1 attr(,"term.labels") [1] "price" "farmPrice" "trend" attr(,"order") [1] 1 1 1 attr(,"intercept") [1] 1 attr(,"response") [1] 1 attr(,".Environment") attr(,"predvars") list(consump, price, farmPrice, trend) attr(,"dataClasses") consump price farmPrice trend "numeric" "numeric" "numeric" "numeric" > terms( fitwls3$eq[[ 2 ]] ) consump ~ price + farmPrice + trend attr(,"variables") list(consump, price, farmPrice, trend) attr(,"factors") price farmPrice trend consump 0 0 0 price 1 0 0 farmPrice 0 1 0 trend 0 0 1 attr(,"term.labels") [1] "price" "farmPrice" "trend" attr(,"order") [1] 1 1 1 attr(,"intercept") [1] 1 attr(,"response") [1] 1 attr(,".Environment") attr(,"predvars") list(consump, price, farmPrice, trend) attr(,"dataClasses") consump price farmPrice trend "numeric" "numeric" "numeric" "numeric" > > terms( fitwls4e ) $demand consump ~ price + income attr(,"variables") list(consump, price, income) attr(,"factors") price income consump 0 0 price 1 0 income 0 1 attr(,"term.labels") [1] "price" "income" attr(,"order") [1] 1 1 attr(,"intercept") [1] 1 attr(,"response") [1] 1 attr(,".Environment") attr(,"predvars") list(consump, price, income) attr(,"dataClasses") consump price income "numeric" "numeric" "numeric" $supply consump ~ price + farmPrice + trend attr(,"variables") list(consump, price, farmPrice, trend) attr(,"factors") price farmPrice trend consump 0 0 0 price 1 0 0 farmPrice 0 1 0 trend 0 0 1 attr(,"term.labels") [1] "price" "farmPrice" "trend" attr(,"order") [1] 1 1 1 attr(,"intercept") [1] 1 attr(,"response") [1] 1 attr(,".Environment") attr(,"predvars") list(consump, price, farmPrice, trend) attr(,"dataClasses") consump price farmPrice trend "numeric" "numeric" "numeric" "numeric" > terms( fitwls4e$eq[[ 1 ]] ) consump ~ price + income attr(,"variables") list(consump, price, income) attr(,"factors") price income consump 0 0 price 1 0 income 0 1 attr(,"term.labels") [1] "price" "income" attr(,"order") [1] 1 1 attr(,"intercept") [1] 1 attr(,"response") [1] 1 attr(,".Environment") attr(,"predvars") list(consump, price, income) attr(,"dataClasses") consump price income "numeric" "numeric" "numeric" > > terms( fitwls5 ) $demand consump ~ price + income attr(,"variables") list(consump, price, income) attr(,"factors") price income consump 0 0 price 1 0 income 0 1 attr(,"term.labels") [1] "price" "income" attr(,"order") [1] 1 1 attr(,"intercept") [1] 1 attr(,"response") [1] 1 attr(,".Environment") attr(,"predvars") list(consump, price, income) attr(,"dataClasses") consump price income "numeric" "numeric" "numeric" $supply consump ~ price + farmPrice + trend attr(,"variables") list(consump, price, farmPrice, trend) attr(,"factors") price farmPrice trend consump 0 0 0 price 1 0 0 farmPrice 0 1 0 trend 0 0 1 attr(,"term.labels") [1] "price" "farmPrice" "trend" attr(,"order") [1] 1 1 1 attr(,"intercept") [1] 1 attr(,"response") [1] 1 attr(,".Environment") attr(,"predvars") list(consump, price, farmPrice, trend) attr(,"dataClasses") consump price farmPrice trend "numeric" "numeric" "numeric" "numeric" > terms( fitwls5$eq[[ 2 ]] ) consump ~ price + farmPrice + trend attr(,"variables") list(consump, price, farmPrice, trend) attr(,"factors") price farmPrice trend consump 0 0 0 price 1 0 0 farmPrice 0 1 0 trend 0 0 1 attr(,"term.labels") [1] "price" "farmPrice" "trend" attr(,"order") [1] 1 1 1 attr(,"intercept") [1] 1 attr(,"response") [1] 1 attr(,".Environment") attr(,"predvars") list(consump, price, farmPrice, trend) attr(,"dataClasses") consump price farmPrice trend "numeric" "numeric" "numeric" "numeric" > > terms( fitwlsi1e ) $demand consump ~ price + income attr(,"variables") list(consump, price, income) attr(,"factors") price income consump 0 0 price 1 0 income 0 1 attr(,"term.labels") [1] "price" "income" attr(,"order") [1] 1 1 attr(,"intercept") [1] 1 attr(,"response") [1] 1 attr(,".Environment") attr(,"predvars") list(consump, price, income) attr(,"dataClasses") consump price income "numeric" "numeric" "numeric" $supply consump ~ price + farmPrice + trend attr(,"variables") list(consump, price, farmPrice, trend) attr(,"factors") price farmPrice trend consump 0 0 0 price 1 0 0 farmPrice 0 1 0 trend 0 0 1 attr(,"term.labels") [1] "price" "farmPrice" "trend" attr(,"order") [1] 1 1 1 attr(,"intercept") [1] 1 attr(,"response") [1] 1 attr(,".Environment") attr(,"predvars") list(consump, price, farmPrice, trend) attr(,"dataClasses") consump price farmPrice trend "numeric" "numeric" "numeric" "numeric" > terms( fitwlsi1e$eq[[ 1 ]] ) consump ~ price + income attr(,"variables") list(consump, price, income) attr(,"factors") price income consump 0 0 price 1 0 income 0 1 attr(,"term.labels") [1] "price" "income" attr(,"order") [1] 1 1 attr(,"intercept") [1] 1 attr(,"response") [1] 1 attr(,".Environment") attr(,"predvars") list(consump, price, income) attr(,"dataClasses") consump price income "numeric" "numeric" "numeric" > > terms( fitwlsi2 ) $demand consump ~ price + income attr(,"variables") list(consump, price, income) attr(,"factors") price income consump 0 0 price 1 0 income 0 1 attr(,"term.labels") [1] "price" "income" attr(,"order") [1] 1 1 attr(,"intercept") [1] 1 attr(,"response") [1] 1 attr(,".Environment") attr(,"predvars") list(consump, price, income) attr(,"dataClasses") consump price income "numeric" "numeric" "numeric" $supply consump ~ price + farmPrice + trend attr(,"variables") list(consump, price, farmPrice, trend) attr(,"factors") price farmPrice trend consump 0 0 0 price 1 0 0 farmPrice 0 1 0 trend 0 0 1 attr(,"term.labels") [1] "price" "farmPrice" "trend" attr(,"order") [1] 1 1 1 attr(,"intercept") [1] 1 attr(,"response") [1] 1 attr(,".Environment") attr(,"predvars") list(consump, price, farmPrice, trend) attr(,"dataClasses") consump price farmPrice trend "numeric" "numeric" "numeric" "numeric" > terms( fitwlsi2$eq[[ 2 ]] ) consump ~ price + farmPrice + trend attr(,"variables") list(consump, price, farmPrice, trend) attr(,"factors") price farmPrice trend consump 0 0 0 price 1 0 0 farmPrice 0 1 0 trend 0 0 1 attr(,"term.labels") [1] "price" "farmPrice" "trend" attr(,"order") [1] 1 1 1 attr(,"intercept") [1] 1 attr(,"response") [1] 1 attr(,".Environment") attr(,"predvars") list(consump, price, farmPrice, trend) attr(,"dataClasses") consump price farmPrice trend "numeric" "numeric" "numeric" "numeric" > > terms( fitwlsi3e ) $demand consump ~ price + income attr(,"variables") list(consump, price, income) attr(,"factors") price income consump 0 0 price 1 0 income 0 1 attr(,"term.labels") [1] "price" "income" attr(,"order") [1] 1 1 attr(,"intercept") [1] 1 attr(,"response") [1] 1 attr(,".Environment") attr(,"predvars") list(consump, price, income) attr(,"dataClasses") consump price income "numeric" "numeric" "numeric" $supply consump ~ price + farmPrice + trend attr(,"variables") list(consump, price, farmPrice, trend) attr(,"factors") price farmPrice trend consump 0 0 0 price 1 0 0 farmPrice 0 1 0 trend 0 0 1 attr(,"term.labels") [1] "price" "farmPrice" "trend" attr(,"order") [1] 1 1 1 attr(,"intercept") [1] 1 attr(,"response") [1] 1 attr(,".Environment") attr(,"predvars") list(consump, price, farmPrice, trend) attr(,"dataClasses") consump price farmPrice trend "numeric" "numeric" "numeric" "numeric" > terms( fitwlsi3e$eq[[ 1 ]] ) consump ~ price + income attr(,"variables") list(consump, price, income) attr(,"factors") price income consump 0 0 price 1 0 income 0 1 attr(,"term.labels") [1] "price" "income" attr(,"order") [1] 1 1 attr(,"intercept") [1] 1 attr(,"response") [1] 1 attr(,".Environment") attr(,"predvars") list(consump, price, income) attr(,"dataClasses") consump price income "numeric" "numeric" "numeric" > > terms( fitwlsi4 ) $demand consump ~ price + income attr(,"variables") list(consump, price, income) attr(,"factors") price income consump 0 0 price 1 0 income 0 1 attr(,"term.labels") [1] "price" "income" attr(,"order") [1] 1 1 attr(,"intercept") [1] 1 attr(,"response") [1] 1 attr(,".Environment") attr(,"predvars") list(consump, price, income) attr(,"dataClasses") consump price income "numeric" "numeric" "numeric" $supply consump ~ price + farmPrice + trend attr(,"variables") list(consump, price, farmPrice, trend) attr(,"factors") price farmPrice trend consump 0 0 0 price 1 0 0 farmPrice 0 1 0 trend 0 0 1 attr(,"term.labels") [1] "price" "farmPrice" "trend" attr(,"order") [1] 1 1 1 attr(,"intercept") [1] 1 attr(,"response") [1] 1 attr(,".Environment") attr(,"predvars") list(consump, price, farmPrice, trend) attr(,"dataClasses") consump price farmPrice trend "numeric" "numeric" "numeric" "numeric" > terms( fitwlsi4$eq[[ 2 ]] ) consump ~ price + farmPrice + trend attr(,"variables") list(consump, price, farmPrice, trend) attr(,"factors") price farmPrice trend consump 0 0 0 price 1 0 0 farmPrice 0 1 0 trend 0 0 1 attr(,"term.labels") [1] "price" "farmPrice" "trend" attr(,"order") [1] 1 1 1 attr(,"intercept") [1] 1 attr(,"response") [1] 1 attr(,".Environment") attr(,"predvars") list(consump, price, farmPrice, trend) attr(,"dataClasses") consump price farmPrice trend "numeric" "numeric" "numeric" "numeric" > > terms( fitwlsi5e ) $demand consump ~ price + income attr(,"variables") list(consump, price, income) attr(,"factors") price income consump 0 0 price 1 0 income 0 1 attr(,"term.labels") [1] "price" "income" attr(,"order") [1] 1 1 attr(,"intercept") [1] 1 attr(,"response") [1] 1 attr(,".Environment") attr(,"predvars") list(consump, price, income) attr(,"dataClasses") consump price income "numeric" "numeric" "numeric" $supply consump ~ price + farmPrice + trend attr(,"variables") list(consump, price, farmPrice, trend) attr(,"factors") price farmPrice trend consump 0 0 0 price 1 0 0 farmPrice 0 1 0 trend 0 0 1 attr(,"term.labels") [1] "price" "farmPrice" "trend" attr(,"order") [1] 1 1 1 attr(,"intercept") [1] 1 attr(,"response") [1] 1 attr(,".Environment") attr(,"predvars") list(consump, price, farmPrice, trend) attr(,"dataClasses") consump price farmPrice trend "numeric" "numeric" "numeric" "numeric" > terms( fitwlsi5e$eq[[ 1 ]] ) consump ~ price + income attr(,"variables") list(consump, price, income) attr(,"factors") price income consump 0 0 price 1 0 income 0 1 attr(,"term.labels") [1] "price" "income" attr(,"order") [1] 1 1 attr(,"intercept") [1] 1 attr(,"response") [1] 1 attr(,".Environment") attr(,"predvars") list(consump, price, income) attr(,"dataClasses") consump price income "numeric" "numeric" "numeric" > > > ## **************** estfun ************************ > library( "sandwich" ) > > estfun( fitwls1 ) demand_(Intercept) demand_price demand_income supply_(Intercept) demand_1 0.2884 28.93 25.21 0.0000 demand_2 -0.1048 -10.92 -10.22 0.0000 demand_3 0.7045 72.87 68.13 0.0000 demand_4 0.4838 50.56 47.51 0.0000 demand_5 0.5222 51.18 52.12 0.0000 demand_6 0.3153 31.36 31.68 0.0000 demand_7 0.4108 41.51 42.39 0.0000 demand_8 -0.7872 -82.47 -84.86 0.0000 demand_9 -0.3665 -35.35 -35.41 0.0000 demand_10 0.5451 49.73 48.46 0.0000 demand_11 -0.0400 -3.72 -3.00 0.0000 demand_12 -0.5246 -51.83 -40.34 0.0000 demand_13 -0.3009 -30.96 -25.45 0.0000 demand_14 -0.0591 -5.83 -5.35 0.0000 demand_15 0.3991 37.96 41.14 0.0000 demand_16 -0.9934 -97.80 -104.40 0.0000 demand_17 -0.3417 -29.56 -32.94 0.0000 demand_18 -0.5375 -55.90 -56.11 0.0000 demand_19 0.4665 49.34 51.65 0.0000 demand_20 -0.0802 -9.10 -10.20 0.0000 supply_1 0.0000 0.00 0.00 -0.0768 supply_2 0.0000 0.00 0.00 -0.1548 supply_3 0.0000 0.00 0.00 0.3397 supply_4 0.0000 0.00 0.00 0.1961 supply_5 0.0000 0.00 0.00 0.2617 supply_6 0.0000 0.00 0.00 0.1176 supply_7 0.0000 0.00 0.00 0.2712 supply_8 0.0000 0.00 0.00 -0.7619 supply_9 0.0000 0.00 0.00 -0.4493 supply_10 0.0000 0.00 0.00 0.4269 supply_11 0.0000 0.00 0.00 -0.1034 supply_12 0.0000 0.00 0.00 -0.2934 supply_13 0.0000 0.00 0.00 -0.1839 supply_14 0.0000 0.00 0.00 0.1677 supply_15 0.0000 0.00 0.00 0.5461 supply_16 0.0000 0.00 0.00 -0.6683 supply_17 0.0000 0.00 0.00 -0.0458 supply_18 0.0000 0.00 0.00 -0.4234 supply_19 0.0000 0.00 0.00 0.5376 supply_20 0.0000 0.00 0.00 0.2963 supply_price supply_farmPrice supply_trend demand_1 0.00 0.00 0.0000 demand_2 0.00 0.00 0.0000 demand_3 0.00 0.00 0.0000 demand_4 0.00 0.00 0.0000 demand_5 0.00 0.00 0.0000 demand_6 0.00 0.00 0.0000 demand_7 0.00 0.00 0.0000 demand_8 0.00 0.00 0.0000 demand_9 0.00 0.00 0.0000 demand_10 0.00 0.00 0.0000 demand_11 0.00 0.00 0.0000 demand_12 0.00 0.00 0.0000 demand_13 0.00 0.00 0.0000 demand_14 0.00 0.00 0.0000 demand_15 0.00 0.00 0.0000 demand_16 0.00 0.00 0.0000 demand_17 0.00 0.00 0.0000 demand_18 0.00 0.00 0.0000 demand_19 0.00 0.00 0.0000 demand_20 0.00 0.00 0.0000 supply_1 -7.70 -7.53 -0.0768 supply_2 -16.14 -15.34 -0.3096 supply_3 35.14 33.67 1.0192 supply_4 20.49 19.24 0.7843 supply_5 25.65 29.00 1.3085 supply_6 11.70 12.73 0.7057 supply_7 27.41 28.64 1.8987 supply_8 -79.82 -83.66 -6.0955 supply_9 -43.33 -48.84 -4.0437 supply_10 38.95 42.95 4.2691 supply_11 -9.63 -8.38 -1.1377 supply_12 -28.99 -20.13 -3.5213 supply_13 -18.93 -13.04 -2.3913 supply_14 16.56 13.65 2.3480 supply_15 51.95 55.87 8.1920 supply_16 -65.79 -70.17 -10.6922 supply_17 -3.96 -5.06 -0.7779 supply_18 -44.04 -39.16 -7.6205 supply_19 56.86 48.01 10.2144 supply_20 33.63 27.56 5.9267 > round( colSums( estfun( fitwls1 ) ), digits = 7 ) demand_(Intercept) demand_price demand_income supply_(Intercept) 0 0 0 0 supply_price supply_farmPrice supply_trend 0 0 0 > > estfun( fitwlsi1e ) demand_(Intercept) demand_price demand_income supply_(Intercept) demand_1 0.3393 34.04 29.66 0.0000 demand_2 -0.1232 -12.85 -12.03 0.0000 demand_3 0.8289 85.73 80.15 0.0000 demand_4 0.5692 59.49 55.90 0.0000 demand_5 0.6144 60.21 61.32 0.0000 demand_6 0.3709 36.89 37.28 0.0000 demand_7 0.4832 48.84 49.87 0.0000 demand_8 -0.9261 -97.03 -99.84 0.0000 demand_9 -0.4312 -41.59 -41.66 0.0000 demand_10 0.6413 58.51 57.01 0.0000 demand_11 -0.0470 -4.38 -3.53 0.0000 demand_12 -0.6172 -60.98 -47.46 0.0000 demand_13 -0.3540 -36.43 -29.95 0.0000 demand_14 -0.0695 -6.86 -6.29 0.0000 demand_15 0.4695 44.66 48.40 0.0000 demand_16 -1.1687 -115.06 -122.83 0.0000 demand_17 -0.4020 -34.78 -38.76 0.0000 demand_18 -0.6323 -65.77 -66.01 0.0000 demand_19 0.5489 58.05 60.76 0.0000 demand_20 -0.0944 -10.71 -12.00 0.0000 supply_1 0.0000 0.00 0.00 -0.0960 supply_2 0.0000 0.00 0.00 -0.1935 supply_3 0.0000 0.00 0.00 0.4247 supply_4 0.0000 0.00 0.00 0.2451 supply_5 0.0000 0.00 0.00 0.3271 supply_6 0.0000 0.00 0.00 0.1470 supply_7 0.0000 0.00 0.00 0.3390 supply_8 0.0000 0.00 0.00 -0.9524 supply_9 0.0000 0.00 0.00 -0.5616 supply_10 0.0000 0.00 0.00 0.5336 supply_11 0.0000 0.00 0.00 -0.1293 supply_12 0.0000 0.00 0.00 -0.3668 supply_13 0.0000 0.00 0.00 -0.2299 supply_14 0.0000 0.00 0.00 0.2096 supply_15 0.0000 0.00 0.00 0.6827 supply_16 0.0000 0.00 0.00 -0.8353 supply_17 0.0000 0.00 0.00 -0.0572 supply_18 0.0000 0.00 0.00 -0.5292 supply_19 0.0000 0.00 0.00 0.6720 supply_20 0.0000 0.00 0.00 0.3704 supply_price supply_farmPrice supply_trend demand_1 0.00 0.00 0.000 demand_2 0.00 0.00 0.000 demand_3 0.00 0.00 0.000 demand_4 0.00 0.00 0.000 demand_5 0.00 0.00 0.000 demand_6 0.00 0.00 0.000 demand_7 0.00 0.00 0.000 demand_8 0.00 0.00 0.000 demand_9 0.00 0.00 0.000 demand_10 0.00 0.00 0.000 demand_11 0.00 0.00 0.000 demand_12 0.00 0.00 0.000 demand_13 0.00 0.00 0.000 demand_14 0.00 0.00 0.000 demand_15 0.00 0.00 0.000 demand_16 0.00 0.00 0.000 demand_17 0.00 0.00 0.000 demand_18 0.00 0.00 0.000 demand_19 0.00 0.00 0.000 demand_20 0.00 0.00 0.000 supply_1 -9.63 -9.41 -0.096 supply_2 -20.18 -19.18 -0.387 supply_3 43.92 42.08 1.274 supply_4 25.61 24.04 0.980 supply_5 32.06 36.25 1.636 supply_6 14.62 15.91 0.882 supply_7 34.27 35.80 2.373 supply_8 -99.78 -104.58 -7.619 supply_9 -54.17 -61.05 -5.055 supply_10 48.68 53.68 5.336 supply_11 -12.03 -10.47 -1.422 supply_12 -36.24 -25.16 -4.402 supply_13 -23.66 -16.30 -2.989 supply_14 20.70 17.06 2.935 supply_15 64.93 69.84 10.240 supply_16 -82.24 -87.71 -13.365 supply_17 -4.95 -6.32 -0.972 supply_18 -55.05 -48.95 -9.526 supply_19 71.08 60.01 12.768 supply_20 42.04 34.45 7.408 > round( colSums( estfun( fitwlsi1e ) ), digits = 7 ) demand_(Intercept) demand_price demand_income supply_(Intercept) 0 0 0 0 supply_price supply_farmPrice supply_trend 0 0 0 > > > ## **************** bread ************************ > bread( fitwls1 ) demand_(Intercept) demand_price demand_income supply_(Intercept) [1,] 2261.63 -23.7921 1.2865 0.0 [2,] -23.79 0.3289 -0.0933 0.0 [3,] 1.29 -0.0933 0.0825 0.0 [4,] 0.00 0.0000 0.0000 5255.9 [5,] 0.00 0.0000 0.0000 -39.5 [6,] 0.00 0.0000 0.0000 -12.2 [7,] 0.00 0.0000 0.0000 -11.2 supply_price supply_farmPrice supply_trend [1,] 0.0000 0.0000 0.0000 [2,] 0.0000 0.0000 0.0000 [3,] 0.0000 0.0000 0.0000 [4,] -39.5000 -12.1744 -11.1673 [5,] 0.3601 0.0338 0.0209 [6,] 0.0338 0.0853 0.0526 [7,] 0.0209 0.0526 0.3804 > > bread( fitwlsi1e ) demand_(Intercept) demand_price demand_income supply_(Intercept) [1,] 1922.39 -20.2232 1.0935 0.00 [2,] -20.22 0.2796 -0.0793 0.00 [3,] 1.09 -0.0793 0.0701 0.00 [4,] 0.00 0.0000 0.0000 4204.75 [5,] 0.00 0.0000 0.0000 -31.60 [6,] 0.00 0.0000 0.0000 -9.74 [7,] 0.00 0.0000 0.0000 -8.93 supply_price supply_farmPrice supply_trend [1,] 0.0000 0.0000 0.0000 [2,] 0.0000 0.0000 0.0000 [3,] 0.0000 0.0000 0.0000 [4,] -31.6000 -9.7395 -8.9339 [5,] 0.2881 0.0270 0.0167 [6,] 0.0270 0.0683 0.0421 [7,] 0.0167 0.0421 0.3043 > > proc.time() user system elapsed 2.15 0.06 2.21 systemfit/vignettes/0000755000176200001440000000000014406577565014334 5ustar liggesuserssystemfit/vignettes/systemfit.Rnw0000755000176200001440000032011614254020035017031 0ustar liggesusers\documentclass[article,nojss]{jss} \usepackage[utf8]{inputenc} \usepackage{amsmath} \usepackage{float} % \usepackage{lineno} % % \linenumbers \newcommand{\bHat}{\hat{\beta}} \newcommand{\COVHat}{\widehat{\COV}} \newcommand{\lHat}{\hat{\lambda}} \newcommand{\OHat}{\widehat{\Omega}} \newcommand{\SHat}{\widehat{\Sigma}} \newcommand{\sHat}{\hat{\sigma}} \newcommand{\uHat}{\hat{u}} \newcommand{\XHat}{\widehat{X}} \newcommand{\tr}{\mathrm{tr}} \newcommand{\LR}{\mathit{LR}} \clubpenalty=10000 \widowpenalty=10000 \setlength{\emergencystretch}{3em} % \setlength{\overfullrule}{5pt} \newcommand{\codeD}[2]{\code{#1}\hspace{0pt}\code{.#2}} \newcommand{\codeDD}[3]{\code{#1}\hspace{0pt}\code{.#2}\hspace{0pt}\code{.#3}} \newcommand{\codeDDD}[4]{\code{#1}\hspace{0pt}\code{.#2}\hspace{0pt}% \code{.#3}\hspace{0pt}\code{.#4}} \hyphenation{systemfit} \author{Arne Henningsen\\University of Copenhagen \And Jeff D.\ Hamann\\ Forest Informatics, Inc.} \Plainauthor{Arne Henningsen, Jeff D. Hamann} \title{\pkg{systemfit}: A Package for Estimating Systems of Simultaneous Equations in \proglang{R}} \Plaintitle{systemfit: A Package for Estimating Systems of Simultaneous Equations in R} \Shorttitle{\pkg{systemfit}: Estimating Systems of Simultaneous Equations in \proglang{R}} %% an abstract and keywords \Abstract{ This introduction to the \proglang{R} package \pkg{systemfit} is a slightly modified version of \cite{henningsen07a}, published in the \emph{Journal of Statistical Software}. Many statistical analyses (e.g., in econometrics, biostatistics and experimental design) are based on models containing systems of structurally related equations. The \pkg{systemfit} package provides the capability to estimate systems of linear equations within the \proglang{R} programming environment. For instance, this package can be used for ``ordinary least squares'' (OLS), ``seemingly unrelated regression'' (SUR), and the instrumental variable (IV) methods ``two-stage least squares'' (2SLS) and ``three-stage least squares'' (3SLS), where SUR and 3SLS estimations can optionally be iterated. Furthermore, the \pkg{systemfit} package provides tools for several statistical tests. It has been tested on a variety of datasets and its reliability is demonstrated. } \Keywords{\proglang{R}, system of simultaneous equations, seemingly unrelated regression, two-stage least squares, three-stage least squares, instrumental variables} \Plainkeywords{R, system of simultaneous equations, seemingly unrelated regression, two-stage least squares, three-stage least squares, instrumental variables} %% at least one keyword must be supplied %% publication information %% NOTE: This needs to filled out ONLY IF THE PAPER WAS ACCEPTED. %% If it was not (yet) accepted, leave them commented. \Volume{23} \Issue{4} \Month{December} \Year{2007} \Submitdate{2006-03-15} \Acceptdate{2007-10-24} %% The address of (at least) one author should be given %% in the following format: \Address{ Arne Henningsen\\ Institute of Food and Resource Economics\\ University of Copenhagen\\ Rolighedsvej 25\\ D-1958 Frederiksberg C, Denmark\\ E-mail: \email{arne.henningsen@gmail.com}\\ URL: \url{http://www.arne-henningsen.name/}\\ \\ Jeff D.\ Hamann\\ Forest Informatics, Inc.\\ PO Box 1421\\ Corvallis, Oregon 97339-1421, United States of America\\ E-mail: \email{jeff.hamann@forestinformatics.com}\\ URL: \url{http://www.forestinformatics.com/}\\ } %% It is also possible to add a telephone and fax number %% before the e-mail in the following format: %% Telephone: +43/1/31336-5053 %% Fax: +43/1/31336-734 %% for those who use Sweave please include the following line (with % symbols): %% need no \usepackage{Sweave.sty} %% end of declarations %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \begin{document} % initialisation stuff <>= library(knitr) opts_chunk$set( engine='R' ) @ %\VignetteIndexEntry{Systemfit} %\VignetteDepends{plm,sem} %\VignetteKeywords{R, system of simultaneous equations, % seemingly unrelated regression, two-stage least squares, % three-stage least squares, instrumental variables} %\VignettePackage{systemfit} %\VignetteEngine{knitr::knitr} <>= options( prompt = "R> ", ctinue = "+ " ) @ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \section{Introduction} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Many theoretical models that are econometrically estimated consist of more than one equation. The disturbance terms of these equations are likely to be contemporaneously correlated, because unconsidered factors that influence the disturbance term in one equation probably influence the disturbance terms in other equations, too. Ignoring this contemporaneous correlation and estimating these equations separately leads to inefficient estimates of the coefficients. However, estimating all equations simultaneously with a ``generalized least squares'' (GLS) estimator, which takes the covariance structure of the residuals into account, leads to efficient estimates. This estimation procedure is generally called ``seemingly unrelated regression'' \citep[SUR,][]{zellner62}. Another reason to estimate a system of equations simultaneously are cross-equation restrictions on the coefficients.% \footnote{ Especially the economic theory suggests many cross-equation restrictions on the coefficients (e.g., the symmetry restriction in demand models). } Estimating the coefficients under cross-equation restrictions and testing these restrictions requires a simultaneous estimation approach. Furthermore, these models can contain variables that appear on the left-hand side in one equation and on the right-hand side of another equation. Ignoring the endogeneity of these variables can lead to inconsistent estimates. This simultaneity bias can be corrected for by applying a ``two-stage least squares'' (2SLS) estimation to each equation. Combining this estimation method with the SUR method results in a simultaneous estimation of the system of equations by the ``three-stage least squares'' (3SLS) method \citep{zellner62b}. % For all of the methods developed in the package, the disturbances of % the individual equations are assumed to be independent and identically % distributed (iid). % In the future, we would like to add the ability to fit equations were % the disturbances are serially correlated (wikins 1969). The \pkg{systemfit} package provides the capability to estimate systems of linear equations in \proglang{R} \citep{r-project-07}. Currently, the estimation methods ``ordinary least squares'' (OLS), ``weighted least squares'' (WLS), ``seemingly unrelated regression'' (SUR), ``two-stage least squares'' (2SLS), ``weighted two-stage least squares'' (W2SLS), and ``three-stage least squares'' (3SLS) are implemented.% \footnote{ In this context, the term ``weighted'' in ``weighted least squares'' (WLS) and ``weighted two-stage least squares'' (W2SLS) means that the \emph{equations} might have different weights and \emph{not} that the \emph{observations} have different weights. } The WLS, SUR, W2SLS, and 3SLS estimates can be based either on one-step (OLS or 2SLS) (co)variances or these estimations can be iterated, where the (co)variances are calculated from the estimates of the previous step. Furthermore, the \pkg{systemfit} package provides statistical tests for restrictions on the coefficients and for testing the consistency of the 3SLS estimation. Although systems of linear equations can be estimated with several other statistical and econometric software packages (e.g., \proglang{SAS}, \proglang{EViews}, \proglang{TSP}), \pkg{systemfit} has several advantages. First, all estimation procedures are publicly available in the source code. Second, the estimation algorithms can be easily modified to meet specific requirements. Third, the (advanced) user can control estimation details generally not available in other software packages by overriding reasonable defaults. % This paper is organized as follows: In Section~\ref{sec:statistics} we introduce the statistical background of estimating equation systems. The implementation of the statistical procedures in \proglang{R} is briefly explained in Section~\ref{sec:code}. Section~\ref{sec:Usage} demonstrates how to run \pkg{systemfit} and how some of the features presented in the second section can be used. In Section~\ref{sec:reliability} we replicate several textbook results with the \pkg{systemfit} package. Finally, a summary and outlook are presented in Section~\ref{sec:Summmary}. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \section{Statistical background}\label{sec:statistics} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% In this section we give a short overview of the statistical background that the \pkg{systemfit} package is based on. More detailed descriptions of simultaneous equations systems are available for instance in \citet[Chapter~7]{theil71}, \citet[Part~4]{judge82}, \citet[Part~5]{judge85}, \citet{srivastava87}, \citet[Chapters 14--15]{greene03}, and \citet[Chapter~10]{zivot06}. After introducing notations and assumptions, we provide the formulas to estimate systems of linear equations. We then demonstrate how to estimate coefficients under linear restrictions. Finally, we present additional relevant issues about estimation of equation systems. Consider a system of $G$ equations, where the $i$th equation is of the form \begin{equation} y_{i} = X_i \beta_i + u_i, \quad i = 1, 2, \ldots, G , \label{eq:model} \end{equation} where $y_i$ is a vector of the dependent variable, $X_i$ is a matrix of the exogenous variables, $\beta_i$ is the coefficient vector and $u_i$ is a vector of the disturbance terms of the $i$th equation. We can write the ``stacked'' system as \begin{equation} \left[ \begin{array}{c} y_1 \\ y_2\\ \vdots\\ y_G \end{array} \right] = \left[ \begin{array}{cccc} X_1 & 0 & \cdots & 0\\ 0 & X_2 & \cdots & 0\\ \vdots & \vdots & \ddots & \vdots\\ 0 & 0 & \cdots & X_G \end{array}\right] \left[ \begin{array}{c} \beta_1 \\ \beta_2 \\ \vdots\\ \beta_G \end{array} \right] + \left[ \begin{array}{c} u_1 \\ u_2 \\ \vdots\\ u_G \end{array} \right] \label{eq:model-array} \end{equation} or more simply as \begin{equation} y = X \beta + u . \label{eq:model-matrices} \end{equation} We assume that there is no correlation of the disturbance terms across observations, so that \begin{equation} \E \left[ u_{it} \, u_{js} \right] = 0 \; \forall \; t \neq s , \end{equation} where $i$ and $j$ indicate the equation number and $t$ and $s$ denote the observation number, where the number of observations is the same for all equations. However, we explicitly allow for contemporaneous correlation, i.e., \begin{equation} \E \left[ u_{it} \, u_{jt} \right] = \sigma_{ij} . \end{equation} Thus, the covariance matrix of all disturbances is \begin{equation} \E \left[ u \, u^\top \right] = \Omega = \Sigma \otimes I_T , \end{equation} where $\Sigma = \left[ \sigma_{ij} \right]$ is the (contemporaneous) disturbance covariance matrix, $\otimes$ is the Kronecker product, $I_T$ is an identity matrix of dimension $T$, and $T$ is the number of observations in each equation. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \subsection{Estimation with only exogenous regressors} \label{sec:Estimation-ols-wls-sur} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% If all regressors are exogenous, the system of equations (Equation~\ref{eq:model}) can be consistently estimated by ordinary least squares (OLS), weighted least squares (WLS), and seemingly unrelated regression (SUR). These estimators can be obtained by \begin{equation} \bHat = \left( X^\top \OHat^{-1} X \right)^{-1} X^\top \OHat^{-1} y . \label{eq:ols-wls-sur} \end{equation} The covariance matrix of these estimators can be estimated by \begin{equation} \COVHat \left[ \bHat \right] = \left( X^\top \OHat^{-1} X \right)^{-1} . \label{eq:cov-ols-wls-sur} \end{equation} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \subsubsection{Ordinary least squares (OLS)} The ordinary least squares (OLS) estimator is based on the assumption that the disturbance terms are not contemporaneously correlated $(\sigma_{ij} = 0 \; \forall \; i \neq j)$ and have the same variance in each equation $( \sigma_i^2 = \sigma_j^2 \, \forall \, i, j)$. In this case, $\OHat$ in Equation~\ref{eq:ols-wls-sur} is equal to $I_{G \cdot T}$ and thus, cancels out. The OLS estimator is efficient, as long as the disturbances are not contemporaneously correlated. If the whole system is treated as one single equation, $\OHat$ in Equation~\ref{eq:cov-ols-wls-sur} is $\sHat^2 I_{G \cdot T}$, where $\sHat^2$ is an estimator for the variance of all disturbances $(\sigma^2 = \E [ u_{it}^2 ])$. If the disturbance terms of the individual equations are allowed to have different variances, $\OHat$ in Equation~\ref{eq:cov-ols-wls-sur} is $\SHat \otimes I_T$, where $\sHat_{ij} = 0 \; \forall \; i \neq j$ and $\sHat_{ii} = \sHat_i^2$ is the estimated variance of the disturbance term in the $i$th equation. If the estimated coefficients are not constrained by cross-equation restrictions, the simultaneous OLS estimation of the system leads to the same estimated coefficients as an equation-wise OLS estimation. The covariance matrix of the coefficients from an equation-wise OLS estimation is equal to the covariance matrix obtained by Equation~\ref{eq:cov-ols-wls-sur} with $\OHat$ equal to $\SHat \otimes I_T$. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \subsubsection{Weighted least squares (WLS)} The weighted least squares (WLS) estimator allows for different variances of the disturbance terms in the different equations $( \sigma_i^2 \neq \sigma_j^2 \, \forall \, i \neq j)$, but assumes that the disturbance terms are not contemporaneously correlated. In this case, $\OHat$ in Equations~\ref{eq:ols-wls-sur} and~\ref{eq:cov-ols-wls-sur} is $\SHat \otimes I_T$, where $\sHat_{ij} = 0 \; \forall \; i \neq j$ and $\sHat_{ii} = \sHat_i^2$ is the estimated variance of the disturbance terms in the $i$th equation. Theoretically, $\sHat_{ii}$ should be the variance of the (true) disturbances $( \sigma_{ii} )$. However, they are not known in most empirical applications. Therefore, true variances are generally replaced by estimated variances $( \sHat_{ii} )$ that are calculated from the residuals of a first-step OLS estimation (see Section~\ref{sec:residcov}).% \footnote{% Note that $\OHat$ in Equation~\ref{eq:ols-wls-sur} is not the same $\OHat$ as in Equation~\ref{eq:cov-ols-wls-sur}. The first is calculated from the residuals of a first-step OLS estimation; the second is calculated from the residuals of this WLS estimation. The same applies to the SUR, W2SLS, and 3SLS estimations described in the following sections. } The WLS estimator is (asymptotically) efficient only if the disturbance terms are not contemporaneously correlated. If the estimated coefficients are not constrained by cross-equation restrictions, they are equal to OLS estimates. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \subsubsection{Seemingly unrelated regression (SUR)} If the disturbances are contemporaneously correlated, a generalized least squares (GLS) estimation leads to an efficient estimator for the coefficients. In this case, the GLS estimator is generally called ``seemingly unrelated regression'' (SUR) estimator \citep{zellner62}. However, the true covariance matrix of the disturbance terms is generally unknown. The textbook solution for this problem is a feasible generalized least squares (FGLS) estimation. As the FGLS estimator is based on an estimated covariance matrix of the disturbance terms, it is only asymptotically efficient. In case of a SUR estimator, $\OHat$ in Equations~\ref{eq:ols-wls-sur} and~\ref{eq:cov-ols-wls-sur} is $\SHat \otimes I_T$, where $\SHat$ is the estimated covariance matrix of the disturbance terms. It should be noted that while an unbiased OLS or WLS estimation requires only that the regressors and the disturbance terms of each single equation are uncorrelated $( \E \left[ u_i^\top X_i \right] = 0 \; \forall \; i )$, a consistent SUR estimation requires that all disturbance terms and all regressors are uncorrelated $( \E \left[ u_i^\top X_j \right] = 0 \; \forall \; i, j )$. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \subsection{Estimation with endogenous regressors} \label{sec:Estimation-2sls-w2sls-3sls} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% If the regressors of one or more equations are correlated with the disturbances ($\E \left[ u_i^\top X_i \right] \neq 0$), OLS, WLS, and SUR estimates are biased. This can be circumvented by a two-stage least squares (2SLS), weighted two-stage least squares (W2SLS), or a three-stage least squares (3SLS) estimation with instrumental variables (IV). The instrumental variables for each equation $Z_i$ can be either different or identical for all equations. They must not be correlated with the disturbance terms of the corresponding equation ($\E \left[ u_i^\top Z_i \right] = 0$). At the first stage new (``fitted'') regressors are obtained by \begin{equation} \XHat_i = Z_i \left( Z_i^\top Z_i \right)^{-1} Z_i^\top X_i . \end{equation} Then, these ``fitted'' regressors are substituted for the original regressors in Equation~\ref{eq:ols-wls-sur} to obtain unbiased 2SLS, W2SLS, or 3SLS estimates of $\beta$ by \begin{equation} \bHat = \left( \XHat^\top \OHat^{-1} \XHat \right)^{-1} \XHat^\top \OHat^{-1} y , \label{eq:2sls-w2sls-3sls} \end{equation} where \begin{equation} \XHat = \left[ \begin{array}{cccc} \XHat_1 & 0 & \cdots & 0\\ 0 & \XHat_2 & \cdots & 0\\ \vdots & \vdots & \ddots & \vdots\\ 0 & 0 & \cdots & \XHat_G \end{array}\right] . \end{equation} An estimator of the covariance matrix of the estimated coefficients can be obtained from Equation~\ref{eq:cov-ols-wls-sur} analogously. Hence, we get \begin{equation} \COVHat \left[ \bHat \right] = \left( \XHat^\top \OHat^{-1} \XHat \right)^{-1} . \label{eq:cov-2sls-w2sls-3sls} \end{equation} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \subsubsection{Two-stage least squares (2SLS)} The two-stage least squares (2SLS) estimator is based on the same assumptions about the disturbance terms as the OLS estimator. Accordingly, $\OHat$ in Equation~\ref{eq:2sls-w2sls-3sls} is equal to $I_{G \cdot T}$ and thus, cancels out. Like for the OLS estimator, the whole system can be treated either as one single equation with $\OHat$ in Equation~\ref{eq:cov-2sls-w2sls-3sls} equal to $\sHat^2 I_{G \cdot T}$, or the disturbance terms of the individual equations are allowed to have different variances with $\OHat$ in Equation~\ref{eq:cov-2sls-w2sls-3sls} equal to $\SHat \otimes I_T$, where $\sHat_{ij} = 0 \; \forall \; i \neq j$ and $\sHat_{ii} = \sHat_i^2$. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \subsubsection{Weighted two-stage least squares (W2SLS)} The weighted two-stage least squares (W2SLS) estimator allows for different variances of the disturbance terms in the different equations. Hence, $\OHat$ in Equations~\ref{eq:2sls-w2sls-3sls} and~\ref{eq:cov-2sls-w2sls-3sls} is $\SHat \otimes I_T$, where $\sHat_{ij} = 0 \; \forall \; i \neq j$ and $\sHat_{ii} = \sHat_i^2$. If the estimated coefficients are not constrained by cross-equation restrictions, they are equal to 2SLS estimates. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \subsubsection{Three-stage least squares (3SLS)} If the disturbances are contemporaneously correlated, a feasible generalized least squares (FGLS) version of the two-stage least squares estimation leads to consistent and asymptotically more efficient estimates. This estimation procedure is generally called ``three-stage least squares'' \citep[3SLS,][]{zellner62b}. The standard 3SLS estimator and its covariance matrix are obtained by Equations~\ref{eq:2sls-w2sls-3sls} and~\ref{eq:cov-2sls-w2sls-3sls} with $\OHat$ equal to $\SHat \otimes I_T$, where $\SHat$ is the estimated covariance matrix of the disturbance terms. While an unbiased 2SLS or W2SLS estimation requires only that the instrumental variables and the disturbance terms of each single equation are uncorrelated $( \E \left[ u_i^\top Z_i \right]) = 0 \; \forall \; i )$, \cite{schmidt90} points out that the 3SLS estimator is only consistent if all disturbance terms and all instrumental variables are uncorrelated $( \E \left[ u_i^\top Z_j \right]) = 0 \; \forall \; i, j )$. Since there might be occasions where this cannot be avoided, \cite{schmidt90} analyses other approaches to obtain 3SLS estimators. One of these approaches based on instrumental variable estimation (3SLS-IV) is \begin{equation} \bHat_\text{3SLS-IV} = \left( \XHat^\top \OHat^{-1} X \right)^{-1} \XHat^\top \OHat^{-1} y . \label{eq:3slsIv} \end{equation} An estimator of the covariance matrix of the estimated 3SLS-IV coefficients is \begin{equation} \COVHat \left[ \bHat_\text{3SLS-IV} \right] = \left( \XHat^\top \OHat^{-1} X \right)^{-1} . \end{equation} Another approach based on the generalized method of moments (GMM) estimator (3SLS-GMM) is \begin{equation} \bHat_\text{3SLS-GMM} = \left( X^\top Z \left( Z^\top \OHat Z \right)^{-1} Z^\top X \right)^{-1} X^\top Z \left( Z^\top \OHat Z \right)^{-1} Z^\top y \label{eq:3slsGmm} \end{equation} with \begin{equation} Z = \left[ \begin{array}{cccc} Z_1 & 0 & \cdots & 0\\ 0 & Z_2 & \cdots & 0\\ \vdots & \vdots & \ddots & \vdots\\ 0 & 0 & \cdots & Z_G \end{array}\right] . \end{equation} An estimator of the covariance matrix of the estimated 3SLS-GMM coefficients is \begin{equation} \COVHat \left[ \bHat_\text{3SLS-GMM} \right] = \left( X^\top Z \left( Z^\top \OHat Z \right)^{-1} Z^\top X \right)^{-1} . \end{equation} A fourth approach developed by \cite{schmidt90} himself is \begin{equation} \bHat_\text{3SLS-Schmidt} = \left( \XHat^\top \OHat^{-1} \XHat \right)^{-1} \XHat^\top \OHat^{-1} Z \left( Z^\top Z \right)^{-1} Z^\top y . \label{eq:3slsSchmidt} \end{equation} An estimator of the covariance matrix of these estimated coefficients is \begin{align} \COVHat \left[ \bHat_\text{3SLS-Schmidt} \right] = & \left( \XHat^\top \OHat^{-1} \XHat \right)^{-1} \XHat^\top \OHat^{-1} Z \left( Z^\top Z \right)^{-1} Z^\top \OHat Z \\ & \left( Z^\top Z \right)^{-1} Z^\top \OHat^{-1} \XHat \left( \XHat^\top \OHat^{-1} \XHat \right)^{-1} . \nonumber \end{align} The econometrics software \proglang{EViews} uses \begin{equation} \bHat_\text{3SLS-EViews} = \bHat_\text{2SLS} + \left( \XHat^\top \OHat^{-1} \XHat \right)^{-1} \XHat^\top \OHat^{-1} \left( y - X \bHat_\text{2SLS} \right) , \label{eq:3slsEViews} \end{equation} where $\bHat_\text{2SLS}$ is the two-stage least squares estimator as defined above. \proglang{EViews} uses the standard 3SLS formula (Equation~\ref{eq:cov-2sls-w2sls-3sls}) to calculate an estimator of the covariance matrix of the estimated coefficients. If the same instrumental variables are used in all equations ($Z_1 = Z_2 = \ldots = Z_G$), all the above mentioned approaches lead to identical estimates. However, if this is not the case, the results depend on the method used \citep{schmidt90}. The only reason to use different instruments for different equations is a correlation of the instruments of one equation with the disturbance terms of another equation. Otherwise, one could simply use all instruments in every equation \citep{schmidt90}. In this case, only the 3SLS-GMM (Equation~\ref{eq:3slsGmm}) and the 3SLS estimator developed by \cite{schmidt90} (Equation~\ref{eq:3slsSchmidt}) are consistent. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \subsection{Estimation under linear restrictions on the coefficients} \label{sec:Restrictions} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% In many empirical applications, it is desirable to estimate the coefficients under linear restrictions. For instance, in econometric demand and production analysis, it is common to estimate the coefficients under homogeneity and symmetry restrictions that are derived from the underlying theoretical model. There are two different methods to estimate the coefficients under linear restrictions. First, a matrix $M$ can be specified that \begin{equation} \beta = M \cdot \beta^\text{M} \label{eq:T-restr} , \end{equation} where $\beta^\text{M}$ is a vector of restricted (linear independent) coefficients, and $M$ is a matrix with the number of rows equal to the number of unrestricted coefficients ($\beta$) and the number of columns equal to the number of restricted coefficients ($\beta^\text{M}$). $M$ can be used to map each unrestricted coefficient to one or more restricted coefficients. The second method to estimate the coefficients under linear restrictions constrains the coefficients by \begin{equation} R \beta^\text{R} = q , \label{eq:restr-R} \end{equation} where $\beta^\text{R}$ is the vector of the restricted coefficients, and $R$ and $q$ are a matrix and vector, respectively, that specify the restrictions \citep[see][p.~100]{greene03}. Each linear independent restriction is represented by one row of $R$ and the corresponding element of~$q$. The first method is less flexible than the second% \footnote{ While restrictions like $\beta_1 = 2 \beta_2$ can be specified by both methods, restrictions like $\beta_1 + \beta_2 = 4$ can be specified only by the second method. }, but is preferable if the coefficients are estimated under many equality constraints across different equations of the system. Of course, these restrictions can be also specified using the latter method. However, while the latter method increases the dimension of the matrices to be inverted during estimation, the first reduces it. Thus, in some cases the latter way leads to estimation problems (e.g., (near) singularity of the matrices to be inverted), while the first does not. These two methods can be combined. In this case, the restrictions specified using the latter method are imposed on the linear independent coefficients that are restricted by the first method, so that \begin{equation} R \beta^\text{MR} = q , \end{equation} where $\beta^\text{MR}$ is the vector of the restricted $\beta^\text{M}$ coefficients. \subsubsection{Calculation of restricted estimators} If the first method (Equation~\ref{eq:T-restr}) is chosen to estimate the coefficients under these restrictions, the matrix of regressors $X$ is (post-)\hspace{0pt}multiplied by the $M$ matrix, so that \begin{equation} X^\text{M} = X \cdot M . \end{equation} Then, $X^\text{M}$ is substituted for $X$ and a standard estimation as described in the previous section is done (Equations~\ref{eq:ols-wls-sur}--\ref{eq:3slsEViews}). This results in the linear independent coefficient estimates $\bHat^\text{M}$ and their covariance matrix. The original coefficients can be obtained by Equation~\ref{eq:T-restr} and the estimated covariance matrix of the original coefficients can be obtained by \begin{equation} \COVHat \left[ \bHat \right] = M \cdot \COVHat \left[ \bHat^\text{M} \right] \cdot M^\top . \end{equation} The implementation of the second method to estimate the coefficients under linear restrictions (Equation~\ref{eq:restr-R}) is described for each estimation method in the following sections. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \subsubsection{Restricted OLS, WLS, and SUR estimation} The OLS, WLS, and SUR estimators restricted by $R \beta^\text{R} = q$ can be obtained by \begin{equation} \left[ \begin{array}{c} \bHat^\text{R} \\[0.2em] \lHat \end{array} \right] = \left[ \begin{array}{cc} X^\top \OHat^{-1} X & R^\top \\ R & 0 \end{array} \right]^{-1} \cdot \left[ \begin{array}{c} X^\top \OHat^{-1} y \\ q \end{array} \right] , \label{eq:ols-wls-sur-r} \end{equation} where $\lambda$ is a vector of the Lagrangean multipliers of the restrictions and $\OHat$ is defined as in Section~\ref{sec:Estimation-ols-wls-sur}. An estimator of the covariance matrix of the estimated coefficients is \begin{equation} \COVHat \left[ \begin{array}{c} \bHat^\text{R} \\[0.2em] \lHat \end{array} \right] = \left[ \begin{array}{cc} X^\top \OHat^{-1} X & R^\top \\ R & 0 \end{array} \right]^{-1} . \label{eq:cov-ols-wls-sur-r} \end{equation} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \subsubsection{Restricted 2SLS, W2SLS, and 3SLS estimation} The 2SLS, W2SLS, and standard 3SLS estimators restricted by $R \beta^\text{R} = q$ can be obtained by \begin{equation} \left[ \begin{array}{c} \bHat^\text{R} \\[0.2em] \lHat \end{array} \right] = \left[ \begin{array}{cc} \XHat^\top \OHat^{-1} \XHat & R^\top \\ R & 0 \end{array} \right]^{-1} \cdot \left[ \begin{array}{c} \XHat^\top \OHat^{-1} y \\ q \end{array} \right] , \label{eq:2sls-w2sls-3sls-r} \end{equation} where $\OHat$ is defined as in Section~\ref{sec:Estimation-2sls-w2sls-3sls}. An estimator of the covariance matrix of the estimated coefficients is \begin{equation} \COVHat \left[ \begin{array}{c} \bHat^\text{R} \\[0.2em] \lHat \end{array} \right] = \left[ \begin{array}{cc} \XHat^\top \OHat^{-1} \XHat & R^\top \\ R & 0 \end{array} \right]^{-1} . \label{eq:cov-2sls-w2sls-3sls-r} \end{equation} The 3SLS-IV estimator restricted by $R \beta^\text{R} = q$ can be obtained by \begin{equation} \left[ \begin{array}{c} \bHat^\text{R}_\text{3SLS-IV} \\[0.2em] \lHat \end{array} \right] = \left[ \begin{array}{cc} \XHat^\top \OHat^{-1} X & R^\top \\ R & 0 \end{array} \right]^{-1} \cdot \left[ \begin{array}{c} \XHat^\top \OHat^{-1} y \\ q \end{array} \right] , \label{eq:3slsIvR} \end{equation} where \begin{equation} \COVHat \left[ \begin{array}{c} \bHat^\text{R}_\text{3SLS-IV} \\[0.2em] \lHat \end{array} \right] = \left[ \begin{array}{cc} \XHat^\top \OHat^{-1} X & R^\top \\ R & 0 \end{array} \right]^{-1} . \end{equation} The restricted 3SLS-GMM estimator can be obtained by \begin{equation} \left[ \begin{array}{c} \bHat^\text{R}_\text{3SLS-GMM} \\[0.2em] \lHat \end{array} \right] = \left[ \begin{array}{cc} X^\top Z \left( Z^\top \OHat Z \right)^{-1} Z^\top X & R^\top \\ R & 0 \end{array} \right]^{-1} \cdot \left[ \begin{array}{c} X^\top Z \left( Z \OHat Z \right)^{-1} Z^\top y \\ q \end{array} \right] , \label{eq:3slsGmmR} \end{equation} where \begin{equation} \COVHat \left[ \begin{array}{c} \bHat^\text{R}_\text{3SLS-GMM} \\[0.2em] \lHat \end{array} \right] = \left[ \begin{array}{cc} X^\top Z \left( Z^\top \OHat Z \right)^{-1} Z^\top X & R^\top \\ R & 0 \end{array} \right]^{-1} . \end{equation} The restricted 3SLS estimator based on the suggestion of \cite{schmidt90} is \begin{equation} \left[ \begin{array}{c} \bHat^\text{R}_\text{3SLS-Schmidt} \\[0.2em] \lHat \end{array} \right] = \left[ \begin{array}{cc} \XHat^\top \OHat^{-1} \XHat & R^\top \\ R & 0 \end{array} \right]^{-1} \cdot \left[ \begin{array}{c} \XHat^\top \OHat^{-1} Z \left( Z^\top Z \right)^{-1} Z^\top y \\ q \end{array} \right] , \label{eq:3slsSchmidtR} \end{equation} where \begin{eqnarray} \COVHat \left[ \begin{array}{c} \bHat^\text{R}_\text{3SLS-Schmidt} \\[0.2em] \lHat \end{array} \right] & = & \left[ \begin{array}{cc} \XHat^\top \OHat^{-1} \XHat & R^\top \\ R & 0 \end{array} \right]^{-1} \\ & & \cdot \left[ \begin{array}{cc} \XHat^\top \OHat^{-1} Z \left( Z^\top Z \right)^{-1} Z^\top \OHat Z \left( Z^\top Z \right)^{-1} Z^\top \OHat^{-1} \XHat & 0^\top \\ 0 & 0 \end{array} \right] \nonumber \\ & & \cdot \left[ \begin{array}{cc} \XHat^\top \OHat^{-1} \XHat & R^\top \\ R & 0 \end{array} \right]^{-1} . \nonumber \end{eqnarray} The econometrics software \proglang{EViews} calculates the restricted 3SLS estimator by \begin{equation} \left[ \begin{array}{c} \bHat^\text{R}_\text{3SLS-EViews} \\[0.2em] \lHat \end{array} \right] = \left[ \begin{array}{cc} \XHat^\top \OHat^{-1} \XHat & R^\top \\ R & 0 \end{array} \right]^{-1} \cdot \left[ \begin{array}{c} \XHat^\top \OHat^{-1} \left( y - X \bHat^\text{R}_\text{2SLS} \right) \\ q \end{array} \right] , \label{eq:3slsEViewsR} \end{equation} where $\bHat^\text{R}_\text{2SLS}$ is the restricted 2SLS estimator calculated by Equation~\ref{eq:2sls-w2sls-3sls-r}. \proglang{EViews} uses the standard formula of the restricted 3SLS estimator (Equation~\ref{eq:cov-2sls-w2sls-3sls-r}) to calculate an estimator for the covariance matrix of the estimated coefficients. If the same instrumental variables are used in all equations ($Z_1 = Z_2 = \ldots = Z_G$), all the above mentioned approaches lead to identical coefficient estimates and identical covariance matrices of the estimated coefficients. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %\section{Other issues and tools}\label{sec:Other} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \subsection{Residual covariance matrix}\label{sec:residcov} Since the (true) disturbances ($u_i$) of the estimated equations are generally not known, their covariance matrix cannot be determined. Therefore, this covariance matrix is generally calculated from estimated residuals ($\uHat_i$) that are obtained from a first-step OLS or 2SLS estimation. Then, in a second step, the estimated residual covariance matrix can be employed for a WLS, SUR, W2SLS, or 3SLS estimation. In many cases, the residual covariance matrix is calculated by \begin{equation} \sHat_{ij} = \frac{ \uHat_i^\top \uHat_j }{ T }, \label{eq:rcovNoDfCor} \end{equation} where $T$ is the number of observations in each equation. However, in finite samples this estimator is biased, because it is not corrected for degrees of freedom. The usual single-equation procedure to correct for degrees of freedom cannot always be applied, because the number of regressors in each equation might differ. Two alternative approaches to calculate the residual covariance matrix are \begin{equation} \sHat_{ij} = \frac{ \uHat_i^\top \uHat_j } { \sqrt{ \left( T - K_i \right) \cdot \left( T - K_j \right) } } \label{eq:rcovGeomean} \end{equation} and \begin{equation} \sHat_{ij} = \frac{ \uHat_i^\top \uHat_j } { T - \max \left( K_i , K_j \right) } \; , \label{eq:rcovMax} \end{equation} where $K_i$ and $K_j$ are the number of regressors in equation $i$ and $j$, respectively. However, these formulas yield unbiased estimators only if $K_i = K_j$ \citep[p.~469]{judge85}. % Greene (2003, p. 344) says that the second is unbiased if i = j or K_i = K_j, % whereas the first is unbiased only if i = j. % However, if K_i = K_j the first and the second are equal. % Why is the first biased if K_i = K_j ??????????? A further approach to obtain a residual covariance matrix is \begin{eqnarray} \sHat_{ij} & = & \frac{ \uHat_i^\top \uHat_j } { T - K_i - K_j + \tr \left[ X_i \left( X_i^\top X_i \right)^{-1} X_i^\top X_j \left( X_j^\top X_j \right)^{-1} X_j^\top \right] } \label{eq:rcovTheil} \\ & = & \frac{ \uHat_i^\top \uHat_j } { T - K_i - K_j + \tr \left[ \left( X_i^\top X_i \right)^{-1} X_i^\top X_j \left( X_j^\top X_j \right)^{-1} X_j^\top X_i \right] } \end{eqnarray} \citep[p.~309]{zellner62c}. This yields an unbiased estimator for all elements of $\Sigma$, but even if $\SHat$ is an unbiased estimator of $\Sigma$, its inverse $\SHat^{-1}$ is not an unbiased estimator of $\Sigma^{-1}$ \citep[p.~322]{theil71}. Furthermore, the covariance matrix calculated by Equation~\ref{eq:rcovTheil} is not necessarily positive semidefinite \citep[p.~322]{theil71}. Hence, ``it is doubtful whether [this formula] is really superior to [Equation~\ref{eq:rcovNoDfCor}]'' \citep[p.~322]{theil71}. The WLS, SUR, W2SLS and 3SLS coefficient estimates are consistent if the residual covariance matrix is calculated using the residuals from a first-step OLS or 2SLS estimation. There exists also an alternative slightly different approach that consists of three steps.% \footnote{ For instance, this approach is applied by the command \code{TSCS} of the software \proglang{LIMDEP} that carries out SUR estimations in which all coefficient vectors are constrained to be equal \citep{greene06}. } In a first step, an OLS or 2SLS estimation is applied to obtain residuals to calculate a (first-step) residual covariance matrix. In a second step, the first-step residual covariance matrix is used to estimate the model by WLS or W2SLS and new residuals are obtained to calculate a (second-step) residual covariance matrix. Finally, in the third step, the second-step residual covariance matrix is used to estimate the model by SUR or 3SLS. If the estimated coefficients are not constrained by cross-equation restrictions, OLS and WLS estimates as well as 2SLS and W2SLS estimates are identical. Hence, in this case both approaches generate the same results. It is also possible to iterate WLS, SUR, W2SLS and 3SLS estimations. At each iteration the residual covariance matrix is calculated from the residuals of the previous iteration. If Equation~\ref{eq:rcovNoDfCor} is applied to calculate the residual covariance matrix, an iterated SUR estimation converges to maximum likelihood \citep[p.~345]{greene03}. In some uncommon cases, for instance in pooled estimations, where the coefficients are restricted to be equal in all equations, the means of the residuals of each equation are not equal to zero $( \overline{ \uHat }_i \neq 0 )$. Therefore, it might be argued that the residual covariance matrix should be calculated by subtracting the means from the residuals and substituting $\uHat_i - \overline{ \uHat }_i$ for $\uHat_i$ in Equations~\ref{eq:rcovNoDfCor}--\ref{eq:rcovTheil}. If the coefficients are estimated under any restrictions, the residual covariance matrix for a WLS, SUR, W2SLS, or 3SLS estimation can be obtained either from a restricted or from an unrestricted first-step estimation. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \subsection{Degrees of freedom} \label{sec:degreesOfFreedom} To our knowledge the question about how to determine the degrees of freedom for single-coefficient $t$ tests is not comprehensively discussed in the literature. While sometimes the degrees of freedom of the entire system (total number of observations in all equations minus total number of estimated coefficients) are applied, in other cases the degrees of freedom of each single equation (number of observations in the equations minus number of estimated coefficients in the equation) are used. Asymptotically, this distinction does not make a difference. However, in many empirical applications, the number of observations of each equation is rather small, and therefore, it matters. If a system of equations is estimated by an unrestricted OLS and the covariance matrix of the coefficients is calculated with $\OHat$ in Equation~\ref{eq:cov-ols-wls-sur} equal to $\SHat \otimes I_T$, the estimated coefficients and their standard errors are identical to an equation-wise OLS estimation. In this case, it is reasonable to use the degrees of freedom of each single equation, because this yields the same $P$ values as the equation-wise OLS estimation. In contrast, if a system of equations is estimated with many cross-equation restrictions and the covariance matrix of an OLS estimation is calculated with $\OHat$ in Equation~\ref{eq:cov-ols-wls-sur} equal to $\sHat^2 I_{G \cdot T}$, the system estimation is similar to a single equation estimation. Therefore, in this case, it seems to be reasonable to use the degrees of freedom of the entire system. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \subsection{Goodness of fit} The goodness of fit of each single equation can be measured by the traditional $R^2$ values \begin{equation} R_i^2 = 1 - \frac{ \uHat_i^\top \uHat_i } { ( y_i - \overline{y_i} )^\top ( y_i - \overline{y_i} ) } \; , \end{equation} where $R_i^2$ is the $R^2$ value of the $i$th equation and $\overline{y_i}$ is the mean value of $y_i$. The goodness of fit of the whole system can be measured by the McElroy's $R^2$ value % also: \citep[p.~345]{greene03} \begin{equation} R_*^2 = 1 - \frac{ \uHat^\top \OHat^{-1} \uHat } { y^\top \left( \SHat^{-1} \otimes \left( I_T - \frac{\iota \iota^\top}{T} \right) \right) y } , \end{equation} where $\iota$ is a column vector of $T$ ones \citep{mcelroy77}. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \subsection{Testing linear restrictions} \label{sec:testingRestrictions} Linear restrictions can be tested by an $F$ test, two Wald tests and a likelihood ratio (LR) test. The $F$ statistic for systems of equations is \begin{equation} F = \frac{ ( R \bHat - q )^\top ( R ( X^\top ( \Sigma \otimes I )^{-1} X )^{-1} R^\top )^{-1} ( R \bHat - q ) / j }{ \uHat^\top ( \Sigma \otimes I )^{-1} \uHat / ( G \cdot T - K ) } \; , \label{eq:f-test} \end{equation} where $j$ is the number of restrictions, $K$ is the total number of estimated coefficients, and all other variables are as defined before \citep[p.~314]{theil71}. Under the null hypothesis, $F$ is $F$ distributed with $j$ and $G \cdot T - K$ degrees of freedom. However, $F$ in Equation~\ref{eq:f-test} cannot be computed, because $\Sigma$ is generally unknown. As a solution, \citet[p.~314]{theil71} proposes to replace the unknown $\Sigma$ in Equation~\ref{eq:f-test} by the estimated covariance matrix $\SHat$. \begin{equation} \hat{F} = \frac{ ( R \bHat - q )^\top ( R ( X^\top ( \SHat \otimes I )^{-1} X )^{-1} R^\top )^{-1} ( R \bHat - q ) / j }{ \uHat^\top ( \SHat \otimes I )^{-1} \uHat / ( G \cdot T - K ) } \label{eq:f-test-theil} \end{equation} Asymptotically, $\hat{F}$ has the same distribution as $F$ in Equation~\ref{eq:f-test}, because the numerator of Equation~\ref{eq:f-test-theil} converges in probability to the numerator of Equation~\ref{eq:f-test} and the denominator of Equation~\ref{eq:f-test-theil} converges in probability to the denominator of Equation~\ref{eq:f-test} \citep[p.~402]{theil71}. Furthermore, the denominators of both Equations~\ref{eq:f-test} and~\ref{eq:f-test-theil} converge in probability to~$1$. Taking this into account and applying Equation~\ref{eq:cov-ols-wls-sur}, we obtain the usual $F$~statistic of the Wald test. \begin{equation} \hat{\hat{F}} = \frac{ ( R \bHat - q )^\top ( R \, \COVHat \left[ \bHat \right] R^\top )^{-1} ( R \bHat - q ) }{ j } \label{eq:f-test-wald} \end{equation} Under the null hypotheses, also $\hat{\hat{F}}$ is asymptotically $F$ distributed with $j$ and $G \cdot T - K$ degrees of freedom. Multiplying Equation~\ref{eq:f-test-wald} with $j$, we obtain the usual $\chi^2$ statistic for the Wald test \begin{equation} W = ( R \bHat - q )^\top ( R \, \COVHat [ \bHat ] \, R^\top )^{-1} ( R \bHat - q ) . \label{eq:chi2-test-wald} \end{equation} Asymptotically, $W$ has a $\chi^2$ distribution with $j$ degrees of freedom under the null hypothesis \citep[p.~347]{greene03}. The likelihood-ratio (LR) statistic for systems of equations is \begin{equation} \LR = T \cdot \left( \log \left| \SHat_r \right| - \log \left| \SHat_u \right| \right) , \label{eq:lr-test} \end{equation} where $T$ is the number of observations per equation, and $\SHat_r$ and $\SHat_u$ are the residual covariance matrices calculated by Equation~\ref{eq:rcovNoDfCor} of the restricted and unrestricted estimation, respectively. Asymptotically, $\LR$ has a $\chi^2$ distribution with $j$ degrees of freedom under the null hypothesis \citep[p.~349]{greene03}. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \subsection{Hausman test} \label{sec:hausman} \citet{hausman78} developed a test for misspecification. The null hypothesis of the test is that the instrumental variables of each equation are uncorrelated with the disturbance terms of all other equations ($\E \left[ u_i^\top Z_j \right] = 0 \, \forall \, i \neq j$). Under this null hypothesis, both the 2SLS and the 3SLS estimator are consistent, but the 3SLS estimator is (asymptotically) more efficient. Under the alternative hypothesis, the 2SLS estimator is consistent but the 3SLS estimator is inconsistent, i.e., the instrumental variables of each equation are uncorrelated with the disturbances of the same equation ($\E \left[ u_i^\top Z_i \right] = 0 \, \forall \, i$), but the instrumental variables of at least one equation are correlated with the disturbances of another equation ($\E \left[ u_i^\top Z_j \right] \neq 0 \, \exists \, i \neq j$). The Hausman test statistic is \begin{equation} m = \left( \bHat_\text{2SLS} - \bHat_\text{3SLS} \right)^\top \left( \COVHat \left[ \bHat_\text{2SLS} \right] - \COVHat \left[ \bHat_\text{3SLS} \right] \right) \left( \bHat_\text{2SLS} - \bHat_\text{3SLS} \right) , \label{eq:hausman} \end{equation} where $\bHat_\text{2SLS}$ and $\COVHat \left[ \bHat_\text{2SLS} \right]$ are the estimated coefficient and covariance matrix from a 2SLS estimation, and $\bHat_\text{3SLS}$ and $\COVHat \left[ \bHat_\text{3SLS} \right]$ are the estimated coefficients and covariance matrix from a 3SLS estimation. Under the null hypothesis, this test statistic has a $\chi^2$ distribution with degrees of freedom equal to the number of estimated coefficients. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \section{Source code}\label{sec:code} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% The source code of the \pkg{systemfit} package is publicly available for download from the Comprehensive \proglang{R} Archive Network (CRAN, \url{http://CRAN.R-project.org/}). The basic functionality of this package is provided by the function \code{systemfit}. Moreover, this package provides tools for statistical tests, functions (methods) to show, extract or calculate results, some convenience functions, and internal helper functions. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \subsection[The basic function systemfit]{The basic function \code{systemfit}} The \code{systemfit} function estimates systems of linear equations by different estimation methods. Where possible, the user interface and the returned object of this function follow the function \code{lm} --- the basic tool for linear regressions in \proglang{R} --- to make the usage of \code{systemfit} as easy as possible for \proglang{R} users. The econometric estimation is done by applying the formulas in Sections~\ref{sec:Estimation-ols-wls-sur} and~\ref{sec:Estimation-2sls-w2sls-3sls} or --- if the coefficients are estimate under linear restrictions --- by the formulas in Section~\ref{sec:Restrictions}. If the restrictions on the coefficients are specified symbolically, function \code{makeHypothesis} of the \pkg{car} package \citep{r-car-1.2-1, fox02a} is used to create the restriction matrix. The \code{systemfit} function returns a list of class \code{systemfit} that contains the results that belong to the entire system of equations. One special element of this list is called \code{eq}, which is a list that contains one object for each estimated equation. These objects are lists of class \codeD{systemfit}{equation} and contain the results that belong only to the regarding equation. A complete description is available in the documentation of this function that is included in the package. A comparison of the elements returned by \code{lm} and by \code{systemfit} is available in appendix~\ref{sec:returned-object}. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \subsection{Statistical tests} The \code{linearHypothesis} and \code{lrtest} methods for \code{systemfit} objects as well as the function \codeD{hausman}{systemfit} apply the statistical tests described in Sections~\ref{sec:testingRestrictions} and~\ref{sec:hausman}. The \code{linearHypothesis} method for {systemfit} objects can be used to test linear restrictions on the estimated coefficients by \citeauthor{theil71}'s $F$ test or by usual Wald tests. Internally, \citeauthor{theil71}'s $F$ statistic is computed by the hidden function \codeD{.ftest}{systemfit} and the Wald tests are computed by the default \code{linearHypothesis} method of the \pkg{car} package \citep{r-car-1.2-1, fox02a}. The \code{lrtest} method for \code{systemfit} objects is a wrapper function to the default \code{lrtest} method of the \pkg{lmtest} package \citep{r-lmtest}, which computes the likelihood-ratio (LR) test statistic. All these functions return an object of class \code{anova} that contains --- amongst others --- the empirical test statistic, the degrees of freedom, and the corresponding $P$ value. The function \codeD{hausman}{systemfit} tests the consistency of the 3SLS estimator. It returns an object of class \code{htest}, which contains --- amongst others --- the empirical test statistic, the degrees of freedom, and the $P$ value. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \subsection{Other methods and functions} The \pkg{systemfit} package provides several methods for objects both of classes \code{systemfit} and \codeD{systemfit}{equation}: \code{print} methods print the estimation results, \code{summary} methods calculate summary results, \code{confint} methods compute confidence intervals for the coefficients, \code{predict} methods calculate predicted values, \code{coef} methods extract the estimated coefficients, \code{vcov} methods extract their covariance matrix, \code{fitted} methods extract the fitted values, \code{residuals} methods extract the residuals, \code{formula} methods extract the formula(s), \code{terms} methods extract the model terms, \codeD{model}{frame} methods extract the model frame, and \codeD{model}{matrix} methods extract the model matrix. Some methods can be applied to objects of class \code{systemfit} only: a \code{correlation} method calculates the correlations between the predictions of two equations, an \code{se.ratio} method computes the ratios of the standard errors of the predictions between two models, and a \code{logLik} method extracts the log likelihood value. The package provides \code{print} methods to print objects of classes \codeD{summary}{systemfit}, \codeDD{summary}{systemfit}{equation}, and \codeD{confint}{systemfit} that are returned by the above mentioned \code{summary} and \code{confint} methods. There exist also two \code{coef} methods to extract the estimated coefficients, their standard errors, $t$ values, and $P$ values from objects of classes \codeD{summary}{systemfit} and \codeDD{summary}{systemfit}{equation}.% \footnote{% There does not exist a special method to extract the degrees of freedom of the residuals from \code{systemfit} objects, because the default method of \code{df.residual} works for these objects. } The convenience function \code{createSystemfitModel} creates a model for \code{systemfit} by random numbers; \codeD{systemfit}{control} sets suitable default values for the technical control parameters for \code{systemfit}. Finally, the package includes some internal (hidden) helper functions: \codeD{.prepareData}{systemfit}, \code{.stackMatList}, and \code{.prepareWmatrix} for preparing the data matrices; \code{.calcXtOmegaInv} and \code{.calcGLS} for calculating the GLS estimator; \code{.calcResidCov} and \code{.calcSigma2} for calculating the (co)variances of the residuals; and \codeD{.ftest}{systemfit} for calculating \citeauthor{theil71}'s $F$ statistic. If \code{systemfit} is applied to a (classical) ``seemingly unrelated regression'' analysis with panel data, it calls the hidden internal function \code{.systemfitPanel}, which reshapes the data, creates the formulas to be estimated, and --- if requested --- specifies restrictions to ensure that the coefficients of all individuals are equal. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \subsection{Efficiency of computations} \label{sec:code-efficiency} We have followed \cite{bates04} to make the code of \pkg{systemfit} faster and more stable. First, if a formula contains an inverse of a matrix that is post-multiplied by a vector or matrix, we use \code{solve(A,b)} instead of \code{solve(A) \%*\% b}. Second, we calculate crossproducts by \code{crossprod(X)} or \code{crossprod(X,y)} instead of \code{t(X) \%*\% X} or \code{t(X) \%*\% y}, respectively. The matrix $\Omega^{-1}$ that is used to compute the estimated coefficients and their covariance matrix is of size $( G \cdot T ) \times ( G \cdot T )$ (see Sections~\ref{sec:Estimation-ols-wls-sur}, \ref{sec:Estimation-2sls-w2sls-3sls}, and~\ref{sec:Restrictions}). In case of large data sets, $\Omega^{-1}$ becomes computationally infeasible. Therefore, we use the following transformation and compute $X^\top \Omega^{-1}$ by dividing the $X$ matrix into submatrices, doing some calculations with these submatrices, adding up some of these submatrices, and finally putting the submatrices together, so that \begin{equation} X^\top \Omega^{-1} %= X^\top \left( \Sigma^{-1} \otimes I \right) = \sum_{i=1} \left[ \begin{array}{c} \sigma^{1i} {X^1} \\ \sigma^{2i} {X^2} \\ \vdots \\ \sigma^{Gi} {X^G} \\ \end{array} \right]^\top , \label{eq:omegaInv} \end{equation} where $\sigma^{ij}$ are the elements of the matrix $\Sigma^{-1}$, and $X^i$ is a submatrix of $X$ that contains the rows that belong to the $i$'s equation. This computation is done inside the internal (hidden) function \code{.calcXtOmegaInv}. Since version 1.0, the \code{systemfit} function by default uses the \pkg{Matrix} package \citep{r-matrix-07} for all computations where matrices are involved. The \pkg{Matrix} package provides classes for different types of matrices. For instance, we choose class \code{dgeMatrix} (``real matrices in general storage mode''), for matrices $X_i$ in Equation~\ref{eq:model-array}, class \code{dgCMatrix} (``general, numeric, sparse matrices in the (sorted) compressed sparse column format'') for matrix $X$ in Equation~\ref{eq:model-matrices}, and class \code{dspMatrix} (``symmetric real matrices in packed storage (one triangle only)'') for the residual covariance matrix $\SHat$. If the \pkg{Matrix} package is used, the possibly huge matrix $\Omega^{-1}$ is no longer a problem, because it is a sparse matrix that can be stored in a compressed format (class \code{dgCMatrix}). Hence, we no longer need the algorithm in Equation~\ref{eq:omegaInv}. We have tested different ways to calculate a GLS estimator like in Equation~\ref{eq:ols-wls-sur} and we found that the following code is the fastest: <>= sigmaInv <- solve( residCov ) xtOmegaInv <- crossprod( xMat, kronecker( sigmaInv, Diagonal( nObs ) ) ) coef <- solve( xtOmegaInv %*% xMat, xtOmegaInv %*% yVec ) @ In this code snippet, \code{residCov} is the residual covariance matrix $\SHat$, \code{nObs} is the number of observations in each equation $T$, \code{xMat} is the matrix $X$ and \code{yVec} is the vector $y$ in Equation~\ref{eq:ols-wls-sur}. By default, the \code{systemfit} function uses the \pkg{Matrix} package to perform GLS estimations, because using this package considerably decreases the computation time for many common models. However, the estimation of small models with small data sets gets slower by using the \pkg{Matrix} package (see appendix~\ref{sec:timings}). While this increase in computation time is often imperceptible to human beings, it might matter in some cases such as iterated estimations or Monte Carlo studies. Therefore, the user can opt for not using the \pkg{Matrix} package, but Equation~\ref{eq:omegaInv} with standard \proglang{R} matrices. \subsection[Overlap with other functions and packages in R] {Overlap with other functions and packages in \proglang{R}} Single-equation models can be fitted in \proglang{R} by OLS with function \code{lm} (package \pkg{stats}) and by 2SLS with function \code{tsls} (package \pkg{sem}, \citealp{r-sem-2.0}). This is also possible with the \code{systemfit} function, but \code{systemfit} is specialized in estimating systems of equation, i.e., more than one equation. Its capability to estimate single-equation models is just a side-effect. Function \code{sem} (package \pkg{sem}, \citealp{r-sem-2.0}) can be used to estimate structural equation models in \proglang{R} by limited information maximum likelihood (LIML) and full information maximum likelihood (FIML) assuming normal or multinormal errors, respectively. A special feature of this function is the estimation of models with unobserved (``latent'') variables, which is not possible with \code{systemfit}. While \code{sem} cannot be used to consistently estimate systems of simultaneous equations with some endogenous regressors, it can be used to estimate systems of equations, where all regressors are exogenous. However, the latter is rather cumbersome (see appendix~\ref{sec:sem}). Hence, \code{systemfit} is the only function in \proglang{R} that can be used to estimate systems of simultaneous equations and it is the most convenient function to estimate systems of equations with purely exogenous regressors. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \section[Using systemfit]{Using \pkg{systemfit}}\label{sec:Usage} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% In this section we demonstrate how to use the \pkg{systemfit} package. First, we show the standard usage of \code{systemfit} by a simple example. Second, several options that can be specified by the user are presented. Then, the usage of \code{systemfit} for a (classical) ``seemingly unrelated regression'' analysis with panel data is described. Finally, we demonstrate how to apply some statistical tests. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \subsection[Standard usage of systemfit]{Standard usage of \code{systemfit}} \label{sec:standard-usage} As described in the previous section, systems of equations can be econometrically estimated with the function \code{systemfit}. The only mandatory argument is \code{formula}. Typically, it is a list of formulas to be estimated, but it may also be a single formula for estimating a single-equation model. Each formula is a standard regression formula in \proglang{R} (see documentation of \code{formula}). The following demonstration uses an example taken from \citet[p.~685]{kmenta86}. We want to estimate a small model of the US food market: \begin{align} \texttt{consump} & = \beta_1 + \beta_2 \cdot \texttt{price} + \beta_3 \cdot \texttt{income} \\ \texttt{consump} & = \beta_4 + \beta_5 \cdot \texttt{price} + \beta_6 \cdot \texttt{farmPrice} + \beta_7 \cdot \texttt{trend} \end{align} The first equation represents the demand side of the food market. Variable \code{consump} (food consumption per capita) is the dependent variable. The regressors are \code{price} (ratio of food prices to general consumer prices) and \code{income} (disposable income) as well as a constant. The second equation specifies the supply side of the food market. Variable \code{consump} is the dependent variable of this equation as well. The regressors are again \code{price} (ratio of food prices to general consumer prices) and a constant as well as \code{farmPrice} (ratio of preceding year's prices received by farmers to general consumer prices) and \code{trend} (a time trend in years). These equations can be estimated by OLS in \proglang{R} by <>= library( "systemfit" ) data( "Kmenta" ) attach( Kmenta ) eqDemand <- consump ~ price + income eqSupply <- consump ~ price + farmPrice + trend eqSystem <- list( demand = eqDemand, supply = eqSupply ) fitols <- systemfit( eqSystem ) print( fitols ) @ The first line loads the \pkg{systemfit} package. The second line loads example data that are included with the package. They are attached to the \proglang{R} search path in line three. In the fourth and fifth line, the demand and supply equations are specified, respectively.% \footnote{ A regression constant is always implied if not explicitly omitted. } In the sixth line, these equations are concatenated into a list and are labeled \code{demand} and \code{supply}, respectively.% \footnote{ If no labels are provided, the equations are numbered consecutively ( \code{eq1}, \code{eq2}, \ldots ). } Finally, in the last two lines, the regression is performed and the estimation results are printed. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \subsection[User options of systemfit]{User options of \code{systemfit}} \label{sec:user-options} The user can modify the default estimation method by providing additional optional arguments, e.g., to specify instrumental variables or restrictions on the coefficients. All optional arguments are described in the following: %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \subsubsection{Estimation method} The optional argument \code{method} is a string that determines the estimation method. It must be either \code{"OLS"}, \code{"WLS"}, \code{"SUR"}, \code{"2SLS"}, \code{"W2SLS"}, or \code{"3SLS"}. These methods correspond to the estimation methods described in Sections~\ref{sec:Estimation-ols-wls-sur}, \ref{sec:Estimation-2sls-w2sls-3sls}, and~\ref{sec:Restrictions}. The following command estimates the model described above as ``seemingly unrelated regression''. <<>>= fitsur <- systemfit( eqSystem, method = "SUR" ) @ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \subsubsection{Instrumental variables} The instruments for a 2SLS, W2SLS or 3SLS estimation can be specified by the argument \code{inst}. If the same instruments should be used for all equations, \code{inst} must be a one-sided formula.% \footnote{ A one-sided formula is a standard formula in \proglang{R} without a dependent variable.} If different instruments should be used for each equation, \code{inst} must be a list that contains a one-sided formula for each equation. The following example uses instrumental variables to estimate the model described above by ``three-stage least squares'' (3SLS). While the first command specifies the same instruments for all equations, the second uses different instruments: <<>>= fit3sls <- systemfit( eqSystem, method = "3SLS", inst = ~ income + farmPrice + trend ) fit3sls2 <- systemfit( eqSystem, method = "3SLS", inst = list( ~ farmPrice + trend, ~ income + farmPrice + trend ) ) @ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \subsubsection{Data} Having all data in the global environment or attached to the search path is often inconvenient. Therefore, \code{systemfit} has the argument \code{data} to specify a data frame that contains the variables of the model. In the following example, we use this argument to specify that the data for the estimation should be taken from the data frame \code{Kmenta}. Hence, we no longer need to attach this data frame before calling \code{systemfit}: <<>>= fitsur <- systemfit( eqSystem, method = "SUR", data = Kmenta ) @ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \subsubsection{Restrictions on the coefficients} As outlined in Section~\ref{sec:Restrictions}, restrictions on the coefficients can be specified in two ways. One way is to use the matrix $R$ and the vector $q$ (see Section~\ref{sec:Restrictions}). These restrictions can be specified symbolically by argument \codeD{restrict}{matrix} as in the generic function \code{linearHypothesis} of the \pkg{car} package \citep{r-car-1.2-1, fox02a}. This argument must be a vector of character strings, where each element represents one linear restriction, and each element must be either a linear combination of coefficients, or a linear equation in the coefficients (see documentation of function \code{linearHypothesis} in the \pkg{car} package, \citealp{r-car-1.2-1, fox02a}). We illustrate this by estimating the model under the restriction $\beta_2 + \beta_6 = 0$. Since the name of $\beta_2$ (coefficient of variable \code{price} in equation \code{demand}) is \code{demand\_price} and the name of $\beta_6$ (coefficient of variable \code{farmPrice} in equation \code{supply}) is \code{supply\_farmPrice}, this restriction can be specified by <>= restrict <- "demand_price + supply_farmPrice = 0" fitsurRmat <- systemfit(eqSystem, method = "SUR", restrict.matrix = restrict) @ \label{code:Rmat} Alternatively, the restrictions via matrix $R$ and vector $q$ can be specified numerically. The matrix $R$ can be specified with argument \codeD{restrict}{matrix} and the vector $q$ with argument \codeD{restrict}{rhs}. <>= Rmat <- matrix(0, nrow = 1, ncol = 7) Rmat[1, 2] <- 1 Rmat[1, 6] <- 1 qvec <- c(0) fitsurRmatNum <- systemfit(eqSystem, method = "SUR", restrict.matrix = Rmat, restrict.rhs = qvec) @ The first line creates a $1 \times 7$ matrix of zeros, where 1 is the number of restrictions and 7 is the number of unrestricted coefficients. The following two lines specify this matrix in a way that the multiplication with the coefficient vector results in $ \beta_2 + \beta_6 $. The fourth line creates a vector with a single element that contains the right hand side of the restriction, i.e., zero. Finally the coefficients are estimated under the restriction $\beta_2 + \beta_6 = 0$. The other way to specify restrictions on the coefficients is to modify the regressor matrix by post-multiplying it with a matrix, say $M$ (see Section~\ref{sec:Restrictions}). This kind of restriction can be specified by setting argument \codeD{restrict}{regMat} equal to the matrix $M$. We convert the restriction specified above to $\beta_2 = - \beta_6$, and set $\beta_1 = \beta^\text{M}_1$, \ldots, $\beta_5 = \beta^\text{M}_5$, $\beta_6 = - \beta^\text{M}_2$, and $\beta_7 = \beta^\text{M}_6$. We can do this in \proglang{R} by <>= modRegMat <- matrix(0, nrow = 7, ncol = 6) modRegMat[1:5, 1:5] <- diag(5) modRegMat[6, 2] <- -1 modRegMat[7, 6] <- 1 fitsurRegMat <- systemfit(eqSystem, method = "SUR", restrict.regMat = modRegMat) @ The first line creates a $7 \times 6$ matrix of zeros, where 7 is the number of unrestricted coefficients and 6 is the number of restricted coefficients. The following three lines specify the matrix $M$ (\code{modRegMat}) as described before. Finally the coefficients are estimated under the restriction $\beta^\text{M}_2 = \beta_2 = - \beta_6$. Of course, the estimation results do not depend on the method that was used to specify this restriction: <<>>= all.equal( coef( fitsurRmat ), coef( fitsurRmatNum ) ) all.equal( coef( fitsurRmat ), coef( fitsurRegMat ) ) @ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \subsubsection{Iteration control} The estimation methods WLS, SUR, W2SLS and 3SLS need a covariance matrix of the residuals that can be calculated from a first-step OLS or 2SLS estimation (see Section~\ref{sec:residcov}). This procedure can be iterated and at each iteration the covariance matrix is calculated from the previous step estimation. This iteration is repeated until the maximum number of iterations is reached or the coefficient estimates have converged. The maximum number of iterations is specified by argument \code{maxiter}. Its default value is one, which means no iteration. The convergence criterion is \begin{equation} \sqrt{ \frac{ \sum_i (\beta_{i,g} - \beta_{i,g-1})^2 } { \sum_i \beta_{i,g-1}^2 }} < \texttt{tol} , \end{equation} where $\beta_{i,g}$ is the $i$th coefficient of the $g$th iteration. The default value of the convergence criterion (argument \code{tol}) is $10^{-5}$. In the following example, we estimate the model described above by iterated SUR: <<>>= fitsurit <- systemfit( eqSystem, method = "SUR", maxiter = 500 ) @ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \subsubsection{Residual covariance matrix} It was explained in Section~\ref{sec:residcov} that several different methods have been proposed to calculate the residual covariance matrix. The user can specify, which method \code{systemfit} should use. Possible values of the argument \code{methodResidCov} are presented in Table~\ref{tab:methodResidCov}. By default, \code{systemfit} uses Equation~\ref{eq:rcovGeomean}. \begin{table}[H] \centering \begin{tabular}{|c|c|} \hline argument & equation \\ \code{methodResidCov} & \\ \hline \code{"noDfCor"} & \ref{eq:rcovNoDfCor} \\ \hline \code{"geomean"} & \ref{eq:rcovGeomean} \\ \hline \code{"max"} & \ref{eq:rcovMax} \\ \hline \code{"Theil"} & \ref{eq:rcovTheil} \\ \hline \end{tabular} \caption{Possible values of argument \code{methodResidCov}} \label{tab:methodResidCov} \end{table} Furthermore, the user can specify whether the means should be subtracted from the residuals before Equations~\ref{eq:rcovNoDfCor}, \ref{eq:rcovGeomean}, \ref{eq:rcovMax}, or~\ref{eq:rcovTheil} are applied to calculate the residual covariance matrix (see Section~\ref{sec:residcov}). The corresponding argument is called \code{centerResiduals}. It must be either \code{TRUE} (subtract the means) or \code{FALSE} (take the unmodified residuals). The default value of \code{centerResiduals} is \code{FALSE}. Moreover, if the coefficients are estimated under restrictions, the user can use argument \code{residCovRestricted} to specify whether the residual covariance matrix for a WLS, SUR, W2SLS, or 3SLS estimation should be obtained from a restricted or from an unrestricted first-step estimation (see Section~\ref{sec:residcov}). If this argument is \code{TRUE} (the default), the residual covariance matrix is obtained from a restricted OLS or 2SLS estimation. If it is \code{FALSE}, the residual covariance matrix is obtained from an unrestricted first-step estimation. Finally, argument \code{residCovWeighted} can be used to decide, whether the residual covariance matrix for a SUR (3SLS) estimation should be obtained from a WLS (W2SLS) estimation instead of from an OLS (2SLS) estimation (see Section~\ref{sec:residcov}). By default, \code{residCovWeighted} is \code{FALSE}, which means that the residuals of an OLS (2SLS) estimation are used to compute the residual covariance matrix. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \subsubsection{3SLS formula} As discussed in Sections~\ref{sec:Estimation-2sls-w2sls-3sls} and~\ref{sec:Restrictions}, there exist several different methods to perform a 3SLS estimation. The user can specify the method by argument \code{method3sls}. Possible values are presented in Table~\ref{tab:method3sls}. The default value is \code{"GLS"}. \begin{table}[H] \centering \begin{tabular}{|c|c|c|} \hline argument & equation & equation \\ \code{method3sls} & (unrestricted) & (restricted) \\ \hline \code{"GLS"} & \ref{eq:2sls-w2sls-3sls} & \ref{eq:2sls-w2sls-3sls-r} \\ \hline \code{"IV"} & \ref{eq:3slsIv} & \ref{eq:3slsIvR} \\ \hline \code{"GMM"} & \ref{eq:3slsGmm} & \ref{eq:3slsGmmR} \\ \hline \code{"Schmidt"} & \ref{eq:3slsSchmidt} & \ref{eq:3slsSchmidtR} \\ \hline \code{"EViews"} & \ref{eq:3slsEViews} & \ref{eq:3slsEViewsR} \\ \hline \end{tabular} \caption{Possible values of argument \code{method3sls}} \label{tab:method3sls} \end{table} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \subsubsection{Sigma squared} In case of OLS or 2SLS estimations, argument \code{singleEqSigma} can be used to specify, whether different $\sigma^2$s for each single equation or the same $\sigma^2$ for all equations should be used. If argument \code{singleEqSigma} is \code{TRUE}, $\OHat$ in Equation~\ref{eq:cov-ols-wls-sur} or~\ref{eq:cov-2sls-w2sls-3sls} is set to $\SHat \otimes I_T$. In contrast, if argument \code{singleEqSigma} is \code{FALSE}, $\OHat$ in Equation~\ref{eq:cov-ols-wls-sur} or~\ref{eq:cov-2sls-w2sls-3sls} is set to $\sHat^2 I_{G \cdot T}$. In case of an unrestricted regression, argument \code{singleEqSigma} is \code{TRUE} by default. However, if the coefficients are estimated under restrictions, this argument is \code{FALSE} by default. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \subsubsection{System options} Furthermore, two options regarding some internal calculations are available. First, argument \code{solvetol} specifies the tolerance level for detecting linear dependencies when inverting a matrix or calculating a determinant (using functions \code{solve} and \code{det}). The default value depends on the used computer system and is equal to the default tolerance level of \code{solve} and \code{det}. Second, argument \code{useMatrix} specifies whether the \pkg{Matrix} package \citep{r-matrix-07} should be used for all computations where matrices are involved (see Section~\ref{sec:code-efficiency}). %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \subsubsection{Returned data objects} Finally, the user can decide whether \code{systemfit} should return some data objects. Argument \code{model} indicates whether a data frame with the data of the model should be returned. Its default value is \code{TRUE}, i.e., the model frame is returned. Arguments \code{x}, \code{y}, and \code{z} specify whether the model matrices ($X_i$), the responses ($y_i$), and the matrices of instrumental variables ($Z_i$), respectively, should be returned. These three arguments are \code{FALSE} by default, i.e., these data objects are not returned. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \subsection[Summary results with summary.systemfit] {Summary results with \code{summary.systemfit}} The \code{summary} method can be used to compute and print summary results of objects returned by \code{systemfit}. <<>>= summary( fitsur ) @ First, the estimation method is reported and a few summary statistics for the entire system and for each equation are given. Then, the covariance matrix used for estimation and the covariance matrix as well as the correlation matrix of the (final) residuals are printed. Finally, the estimation results of each equation are reported: the formula of the estimated equation, the estimated coefficients, their standard errors, $t$ values, $P$ values and codes indicating their statistical significance, as well as some other statistics like the standard error of the residuals and the $R^2$ value of the equation. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \subsubsection[Degrees of freedom for t tests] {Degrees of freedom for $t$ tests} The \code{summary} method for \code{systemfit} objects has an optional argument \code{useDfSys}. It selects the approach that is applied by \code{systemfit} to determine the degrees of freedom of $t$ tests of the estimated coefficients (Section~\ref{sec:degreesOfFreedom}). If argument \code{useDfSys} is \code{TRUE}, the degrees of freedom of the whole system are taken. In contrast, if \code{useDfSys} is \code{FALSE}, the degrees of freedom of the single equation are taken. If the coefficients are estimated under restrictions, argument \code{useDfSys} is \code{TRUE} by default. However, if no restrictions on the coefficient are specified, the default value of \code{useDfSys} is \code{FALSE}. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \subsubsection{Reduce amount of printed output} The optional arguments \code{residCov} and \code{equations} can be used reduce the amount of the printed output. Argument \code{residCov} specifies whether the covariance matrix and the correlation matrix of the residuals are printed. Argument \code{equations} specifies whether summary results of each equation are printed. By default, both arguments are \code{TRUE}. The following command returns a sparse summary output: <<>>= summary( fitsur, residCov = FALSE, equations = FALSE ) @ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \subsection{Panel data} The \code{systemfit} function can also be used for a (classical) ``seemingly unrelated regression'' analysis with panel data. For this type of analysis, the data must be provided in a transformed data frame of class \codeD{pdata}{frame}% \footnote{ Generally, panel data can be either in ``long format'' (different individuals are arranged below each other) or in ``wide format'' (different individuals are arranged next to each other). For this analysis, the data must be in ``long format''. } which can be created with the function \codeD{pdata}{frame} from the \proglang{R} package \pkg{plm} \citep{r-plm-0.3-1}. In contrast to the previously described usage of \code{systemfit}, argument \code{formula} must be a single equation (object of class \code{formula}). This formula is estimated for all individuals. We demonstrate the application of \code{systemfit} to panel data using an example taken from \citet[p.~340]{greene03} that is based on \citet{grunfeld58}. We want to estimate a model for gross investment of 5 US firms in the years 1935--1954: \begin{equation} \texttt{invest}_{it} = \beta_1 + \beta_2 \cdot \texttt{value}_{it} + \beta_3 \cdot \texttt{capital}_{it} \end{equation} where \code{invest} is the gross investment of firm $i$ in year $t$, \code{value} is the market value of the firm at the end of the previous year, and \code{capital} is the capital stock of the firm at the end of the previous year. This model can be estimated by <>= ### this code chunk is evaluated only if the 'plm' package is available data( "GrunfeldGreene" ) library( "plm" ) GGPanel <- pdata.frame( GrunfeldGreene, c( "firm", "year" ) ) greeneSur <- systemfit( invest ~ value + capital, method = "SUR", data = GGPanel ) @ The first line loads the example data set \code{GrunfeldGreene} that is included in the \pkg{systemfit} package. The second line loads the \pkg{plm} package and the following line specifies a data frame of class \codeD{pdata}{frame}, where the variables \code{firm} and \code{year} indicate the individual (cross-section) and time identifier, respectively. Finally, a seemingly unrelated regression is performed. The optional argument \code{pooled} is a logical variable indicating whether the coefficients are restricted to be equal for all individuals. By default, this argument is set to \code{FALSE}. The following command does a seemingly unrelated regression of the same model as before, but with coefficients restricted to be equal for all individuals. <>= ### this code chunk is evaluated only if the 'plm' package is available greeneSurPooled <- systemfit( invest ~ value + capital, method = "SUR", data = GGPanel, pooled = TRUE ) @ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \subsection{Testing linear restrictions} As described in Section~\ref{sec:testingRestrictions}, linear restrictions can be tested by an $F$ test, two Wald tests and an LR test. The \pkg{systemfit} package provides the method \code{linearHypothesis} for the $F$ and Wald tests as well as the method \code{lrtest} for LR tests. We will now test the restriction $\beta_2 = -\beta_6$ that was specified by the matrix \code{Rmat} and the vector \code{qvec} in the example above (p.~\pageref{code:Rmat}). <<>>= linearHypothesis( fitsur, Rmat, qvec, test = "FT" ) linearHypothesis( fitsur, Rmat, qvec, test = "F" ) linearHypothesis( fitsur, Rmat, qvec, test = "Chisq" ) lrtest( fitsurRmat, fitsur ) @ The linear restrictions are tested by \citeauthor{theil71}'s $F$ test (Equation~\ref{eq:f-test-theil}) first, second by the $F$ statistic of a Wald test (Equation~\ref{eq:f-test-wald}), third by the $\chi^2$ statistic of a Wald test (Equation~\ref{eq:chi2-test-wald}), and finally by an LR test (Equation~\ref{eq:lr-test}). The first argument of the \code{linearHypothesis} method for \code{systemfit} objects must be an unrestricted regression returned by \code{systemfit}. The second and third arguments are the restriction matrix $R$ and the optional vector $q$, as described in Section~\ref{sec:Restrictions}. Analogously to the argument \codeD{restrict}{matrix} of the \code{systemfit} function, the restrictions can be specified either in matrix form or symbolically. The optional argument \code{test} must be a character string, \code{"FT"}, \code{"F"}, or \code{"Chisq"}, specifying whether to compute \citeauthor{theil71}'s finite-sample $F$ test (with approximate $F$ distribution) the finite-sample Wald test (with approximate $F$ distribution) or the large-sample Wald test (with asymptotic $\chi^2$ distribution). All arguments of the \code{lrtest} method for \code{systemfit} objects must be fitted model objects returned by \code{systemfit}. It consecutively compares all provided fitted model objects. All tests print a short description of the test and the tested model objects first. Then, a small table is printed, where each row belongs to one (unrestricted or restricted) model. The second row reports (amongst others) the degree(s) of freedom of the test, the empirical test statistic, and the marginal level of significance ($P$ value). Although all tests check the same hypothesis, there is some variation of the $P$ values. However, all tests suggest the same decision: The null hypothesis $\beta_2 = -\beta_6$ cannot be rejected at any reasonable level of significance. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \subsection{Hausman test} A Hausman test, which is described in Section~\ref{sec:hausman}, can be carried out with following commands: <<>>= fit2sls <- systemfit( eqSystem, method = "2SLS", inst = ~ income + farmPrice + trend, data = Kmenta ) fit3sls <- systemfit( eqSystem, method = "3SLS", inst = ~ income + farmPrice + trend, data = Kmenta ) hausman.systemfit( fit2sls, fit3sls ) @ <>= hausmantest <- hausman.systemfit( fit2sls, fit3sls ) @ First of all, the model is estimated by 2SLS and then by 3SLS. Finally, in the last line the test is carried out by the command \codeD{hausman}{systemfit}. This function requires two arguments: the result of a 2SLS estimation and the result of a 3SLS estimation. The Hausman test statistic is \Sexpr{round( hausmantest$statistic, digits = 3)}, which has a $\chi^2$ distribution with \Sexpr{hausmantest$parameter} degrees of freedom under the null hypothesis. The corresponding $P$ value is \Sexpr{round( hausmantest$p.value, digits = 3 )}. This shows that the null hypothesis is not rejected at any reasonable level of significance. Hence, we can assume that the 3SLS estimator is consistent. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \section{Replication of textbook results}\label{sec:reliability} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% In this section, we reproduce results from several textbook examples using the \pkg{systemfit} package for several reasons. First, a comparison of \pkg{systemfit}'s results with results published in the literature confirms the reliability of the \pkg{systemfit} package. Second, this section helps teachers and students become familiar with using the \pkg{systemfit} package. Third, the section encourages reproducible research, which should be a general goal in scientific analysis \citep{buckheit95,schwab00}. For instance, by preparing this section, the exact estimation methods of the replicated analyses have been discovered and a few errors in \citet{greene03} have been found \citep[see][]{greene06a}. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \subsection[Kmenta (1986): Example on p. 685 (food market)] {Kmenta (1986): Example on p.~685 (food market)} First, we reproduce an example taken from \citet[p.~685]{kmenta86}. The data are available from Table~13-1 (p.~687), and the results are presented in Table~13-2 (p.~712) of this book. Before starting the estimation, we load the data and specify the two formulas of the model as well as the instrumental variables. Then the equation system is estimated by OLS, 2SLS, 3SLS, and iterated 3SLS. After each estimation, we provide the commands to print the estimated coefficients. <>= library( "systemfit" ) @ <>= data( "Kmenta" ) eqDemand <- consump ~ price + income eqSupply <- consump ~ price + farmPrice + trend inst <- ~ income + farmPrice + trend system <- list( demand = eqDemand, supply = eqSupply ) @ OLS estimation: <>= fitOls <- systemfit( system, data = Kmenta ) round( coef( summary( fitOls ) ), digits = 4 ) @ 2SLS estimation: <>= fit2sls <- systemfit( system, method = "2SLS", inst = inst, data = Kmenta ) round( coef( summary( fit2sls ) ), digits = 4 ) @ 3SLS estimation: <>= fit3sls <- systemfit( system, method = "3SLS", inst = inst, data = Kmenta ) round( coef( summary( fit3sls ) ), digits = 4 ) @ Iterated 3SLS estimation: <>= fitI3sls <- systemfit( system, method = "3SLS", inst = inst, data = Kmenta, maxit = 250 ) round( coef( summary( fitI3sls ) ), digits = 4 ) @ The above commands return exactly the same coefficients and standard errors as published in \citet[p.~712]{kmenta86} except for two minor exceptions: two standard errors of the 2SLS estimation deviate by $0.0001$. However, this difference is likely due to rounding errors in \code{systemfit} or \citet{kmenta86} and is so small that it empirically does not matter. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \subsection{Greene (2003): Example 15.1 (Klein's model I)} \label{sec:KleinsModel} Second, we try to replicate Klein's ``Model I'' \citep{klein50} that is described in \citet[p.~381]{greene03}. The data are available from the online complements to \citet{greene03}, Table~F15.1 (\url{http://pages.stern.nyu.edu/~wgreene/Text/tables/TableF15-1.txt}), and the estimation results are presented in Table~15.3 (p.~412). Initially, the data are loaded and three equations as well as the instrumental variables are specified. As in the example before, the equation system is estimated by OLS, 2SLS, 3SLS, and iterated 3SLS, and commands to print the estimated coefficients are presented. <<>>= data( "KleinI" ) eqConsump <- consump ~ corpProf + corpProfLag + wages eqInvest <- invest ~ corpProf + corpProfLag + capitalLag eqPrivWage <- privWage ~ gnp + gnpLag + trend inst <- ~ govExp + taxes + govWage + trend + capitalLag + corpProfLag + gnpLag system <- list( Consumption = eqConsump, Investment = eqInvest, PrivateWages = eqPrivWage ) @ OLS estimation: <>= kleinOls <- systemfit( system, data = KleinI ) round( coef( summary( kleinOls ) ), digits = 3 ) @ 2SLS estimation: <>= klein2sls <- systemfit( system, method = "2SLS", inst = inst, data = KleinI, methodResidCov = "noDfCor" ) round( coef( summary( klein2sls ) ), digits = 3 ) @ 3SLS estimation: <>= klein3sls <- systemfit( system, method = "3SLS", inst = inst, data = KleinI, methodResidCov = "noDfCor" ) round( coef( summary( klein3sls ) ), digits = 3 ) @ iterated 3SLS estimation: <>= kleinI3sls <- systemfit( system, method = "3SLS", inst = inst, data = KleinI, methodResidCov = "noDfCor", maxit = 500 ) round( coef( summary( kleinI3sls ) ), digits = 3 ) @ Again, these commands return almost the same results as published in \citet{greene03}.% \footnote{ There are two typos in Table~15.3 (p.~412). Please take a look at the errata \citep{greene06a}. } There are only two minor deviations, where these values differ merely in the last digit. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \subsection{Greene (2003): Example 14.1 (Grunfeld's investment data)} \label{sec:grunfeld-greene} Third, we reproduce Example~14.1 of \citet[p.~340]{greene03} that is based on \citet{grunfeld58}. The data are available from the online complements to \citet{greene03}, Table~F13.1 (\url{http://pages.stern.nyu.edu/~wgreene/Text/tables/TableF13-1.txt}). Several different versions of the ``Grunfeld'' data set can be found, whereas the version of \citet{greene03} is considered incorrect \citep{cummins01}. However, we use this incorrect version to replicate the results in \citet{greene03}, Tables~14.1 and~14.2 (p.~351).% \footnote{ A correct version of this data set with five additional firms is available as data set \code{Grunfeld} in the \pkg{Ecdat} package \citep{r-Ecdat-0.1-5}. } First, we load the data and the \pkg{plm} package, indicate the individual (cross-section) and time identifiers, and specify the formula to be estimated. Then, the system is estimated by OLS, pooled OLS, SUR, and pooled SUR. After each estimation, we show the commands to print the estimated coefficients, the $\sigma^2$ values of the OLS estimations, and the residual covariance matrix as well as the residual correlation matrix of the SUR estimations. <>= ### this code chunk is evaluated only if the 'plm' package is available data( "GrunfeldGreene" ) library( "plm" ) GGPanel <- pdata.frame( GrunfeldGreene, c( "firm", "year" ) ) formulaGrunfeld <- invest ~ value + capital @ OLS estimation (Table 14.2): <>= ### this code chunk is evaluated only if the 'plm' package is available greeneOls <- systemfit( formulaGrunfeld, data = GGPanel ) round( coef( summary( greeneOls ) ), digits = 4 ) round( sapply( greeneOls$eq, function(x){return(summary(x)$ssr/20)} ), digits = 3 ) @ pooled OLS (Table 14.2): <>= ### this code chunk is evaluated only if the 'plm' package is available greeneOlsPooled <- systemfit( formulaGrunfeld, data = GGPanel, pooled = TRUE ) round( coef( summary( greeneOlsPooled$eq[[1]] ) ), digits = 4 ) #$ sum( sapply( greeneOlsPooled$eq, function(x){return(summary(x)$ssr)}) )/100 @ SUR estimation (Table~14.1): <>= ### this code chunk is evaluated only if the 'plm' package is available greeneSur <- systemfit( formulaGrunfeld, method = "SUR", data = GGPanel, methodResidCov = "noDfCor" ) round( coef( summary( greeneSur ) ), digits = 4 ) round( greeneSur$residCov, digits = 3 ) #$ round( summary( greeneSur )$residCor, digits = 3 ) #$ @ pooled SUR estimation (Table~14.1): <>= ### this code chunk is evaluated only if the 'plm' package is available greeneSurPooled <- systemfit( formulaGrunfeld, method = "SUR", data = GGPanel, pooled = TRUE, methodResidCov = "noDfCor", residCovWeighted = TRUE ) round( coef( summary( greeneSurPooled$eq[[1]] ) ), digits = 4 ) #$ round( greeneSurPooled$residCov, digits = 3 ) #$ round( cov( residuals( greeneSurPooled ) ), digits = 3 ) round( summary( greeneSurPooled )$residCor, digits = 3 ) #$ @ These commands return nearly the same results as published in \citet{greene03}.% \footnote{ There are several typos and errors in Table~14.1 (p.~412). Please take a look at the errata of this book \citep{greene06a}. } We present two different commands to print the residual covariance matrix of the pooled SUR estimation. The first calculates the covariance matrix without centering the residuals (see Section~\ref{sec:residcov}); the returned values are equal to those published in \citet[p.~351]{greene03}. The second command calculates the residual covariance matrix after centering the residuals; these returned values are equal to those published in the errata \citep{greene06a}. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \subsection[Theil (1971): Example on p. 295ff (Grunfeld's investment data)] {Theil (1971): Example on p.~295ff (Grunfeld's investment data)} Finally, we estimate an example taken from \citet[p.~295ff]{theil71} that is also based on \citet{grunfeld58}. The data are available in Table~7.1 of \citet[p.~296]{theil71}. They are a subset of the data set published by \citet{greene03} (see Section~\ref{sec:grunfeld-greene}). After extracting the data from the \code{GrunfeldGreene} data set, the individual (cross-section) and time identifiers are indicated. Then, the formula is specified, and the model is estimated by OLS and SUR. Commands to print the estimated coefficients are reported after each estimation. <>= ### this code chunk is evaluated only if the 'plm' package is available GrunfeldTheil <- subset( GrunfeldGreene, firm %in% c( "General Electric", "Westinghouse" ) ) GTPanel <- pdata.frame( GrunfeldTheil, c( "firm", "year" ) ) formulaGrunfeld <- invest ~ value + capital @ OLS estimation (page 295) <>= ### this code chunk is evaluated only if the 'plm' package is available theilOls <- systemfit( formulaGrunfeld, data = GTPanel ) round( coef( summary( theilOls ) ), digits = 3 ) @ SUR estimation (page 300) <>= ### this code chunk is evaluated only if the 'plm' package is available theilSur <- systemfit( formulaGrunfeld, method = "SUR", data = GTPanel, methodResidCov = "noDfCor" ) round( coef( summary( theilSur ) ), digits = 3 ) @ These commands return exactly the same results as published in \citet[pp.~295, 300]{theil71}. Now, we apply an $F$ test to check whether the slope parameters are equal for General Electric and Westinghouse (pages~313--315). Then we re-estimate the model under these restrictions on the coefficients. $F$ test (page 313--315)% \footnote{% The same restriction can be specified also symbolically by \code{RMatrix <- c("General.Electric\_value = Westinghouse\_value", "General.Electric\_capital = Westinghouse\_capital")} } <>= ### this code chunk is evaluated only if the 'plm' package is available RMatrix <- rbind( c( 0, 1, 0, 0, -1, 0 ), c( 0, 0, 1, 0, 0, -1 ) ) linearHypothesis( theilSur, RMatrix ) @ Restricted SUR estimation (page~316) <>= ### this code chunk is evaluated only if the 'plm' package is available theilSurRestr <- systemfit(formulaGrunfeld, method = "SUR", data = GTPanel, methodResidCov = "noDfCor", restrict.matrix = RMatrix, residCovRestricted = FALSE) round(coef(summary(theilSurRestr)), digits = 3) @ The method \code{linearHypothesis} returns the same value of the $F$ statistic as published in \citet[p.~315]{theil71}. Hence, we arrive at the the same conclusion: we accept the null hypothesis (restrictions on the coefficients are true) at the 5~percent significance level. Also the results of the restricted SUR estimation are identical to the results published in \citet[p.~316]{theil71}. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \section{Summary and outlook}\label{sec:Summmary} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \nopagebreak In this article, we have described some of the basic features of the \pkg{systemfit} package for estimating systems of linear equations. Many details of the estimation can be controlled by the user. Furthermore, the package provides some statistical tests for restrictions on the coefficients and consistency of 3SLS estimation. It has been tested on a variety of datasets and has produced satisfactory for a few years. While the \pkg{systemfit} package performs the basic fitting methods, more sophisticated tools exist. We hope to implement missing functionalities in the near future. % Some of these are discussed in the following. \subsubsection*{Unbalanced datasets} Currently, the \pkg{systemfit} package requires that all equations have the same number of observations. However, many data sets have unbalanced observations.% \footnote{ For instance, forestry datasets typically contain many observations of inexpensive variables (stem diameter, tree count) and few expensive variables such as stem height or volume. } Simply dropping data points that do not contain observations for all equations may reduce the number of observations considerably, and thus, the information utilized in the estimation. Hence, it is our intention to include the capability for estimations with unbalanced data sets as described in \citet{schmidt77} in future releases of \pkg{systemfit}. \subsubsection*{Serial correlation and heteroscedasticity} For all of the methods developed in the package, the disturbances of the individual equations are assumed to be independent and identically distributed (iid). The package could be enhanced by the inclusion of methods to fit equations with serially correlated and heteroscedastic disturbances \citep{parks67}. \subsubsection*{Estimation methods} In the future, we wish to include more sophisticated estimation methods such as limited information maximum likelihood (LIML), full information maximum likelihood (FIML), generalized methods of moments (GMM) and spatial econometric methods \citep{paelinck79,anselin88}. \subsubsection*{Non-linear estimation} Finally, the \pkg{systemfit} package provides a function to estimate systems of non-linear equations. However, the function \code{nlsystemfit} is currently under development and the results are not yet always reliable due to convergence difficulties. \section*{Acknowledgments} We thank Achim Zeileis, John Fox, Ott Toomet, William H.\ Greene, two anonymous referees and several users of \pkg{systemfit} for their comments and suggestions that helped us to improve the \pkg{systemfit} package as well as this paper. Of course, any remaining errors are the authors'. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \bibliography{systemfit} % a subset of my big bibtex file %\bibliography{agrarpol} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \clearpage \begin{appendix} \section[Object returned by systemfit]{Object returned by \code{systemfit}} \label{sec:returned-object} \code{systemfit} returns a list of class \code{systemfit} that contains the results that belong to the entire system of equations. One special element of this list is called \code{eq}. It is a list that contains one object for each estimated equation. These objects are of the class \codeD{systemfit}{equation} and contain the results that belong only to the regarding equation. \begin{table}[htbp] \centering \setlength{\tabcolsep}{4mm} {\ttfamily \begin{tabular}{|l|l|l|} \hline \textbf{\code{lm}} & \textbf{\code{systemfit}} & \textbf{\code{systemfit.equation}} \\ \hline coefficients & coefficients & coefficients \\ & coefCov & coefCov \\ fitted.values & & fitted.values \\ residuals & & residuals \\ & residCov & \\ & residCovEst & \\ rank & rank & rank \\ & & rank.sys \\ & & nCoef.sys \\ df.residual & df.residual & df.residual \\ & & df.residual.sys \\ call & call & \\ terms & & terms \\ & & inst \\ weights & & \\ contrasts & & \\ xlevels & & \\ offset & & \\ model\textnormal{*} & & model\textnormal{*} \\ x\textnormal{**} & & x\textnormal{**} \\ y\textnormal{**} & & y\textnormal{**} \\ & & z\textnormal{**} \\ & iter & \\ & eq & \\ & & eqnLabel \\ & & eqnNo \\ & method & method \\ & panelLike & \\ & restrict.matrix& \\ & restrict.rhs & \\ & restrict.regMat& \\ & control & \\ \hline \end{tabular} } \caption{Elements returned by \code{systemfit} and \code{lm} (* if requested by the user with default \code{TRUE}, ** if requested by the user with default \code{FALSE}).} \label{tab:compare-lm} \end{table} The elements returned by \code{systemfit} are similar to those returned by \code{lm}, the basic tool for linear regressions in \proglang{R}. While some counterparts of elements returned by \code{lm} can be found directly in objects of class \code{systemfit}, other counterparts are available for each equation in objects of class \codeD{systemfit}{equation}. This is demonstrated in Table~\ref{tab:compare-lm}. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \section{Computation times}\label{sec:timings} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Theoretically, one would expect that the calculations with the \pkg{Matrix} package are faster and more robust than calculations with the traditional method. To test this hypothesis, we use function \code{createSystemfitModel} to create a medium-sized multi-equation model with 8~equations, 10~regressors in each equation (without constant), and 750~observations. Then, we estimated this model with and without using the \pkg{Matrix} package. Finally, the results are compared. <>= library( "systemfit" ) set.seed( 1 ) systemfitModel <- createSystemfitModel( nEq = 8, nReg = 10, nObs = 750 ) system.time( fitMatrix <- systemfit( systemfitModel$formula, method = "SUR", data = systemfitModel$data ) ) system.time( fitTrad <- systemfit( systemfitModel$formula, method = "SUR", data = systemfitModel$data, useMatrix = FALSE ) ) all.equal( fitMatrix, fitTrad ) @ The returned computation times clearly show that using the \pkg{Matrix} package makes the estimation faster. The comparison of the estimation results shows that both methods return the same results. The only differences between the returned objects are --- as expected --- the \code{call} and the stored control variable \code{useMatrix}. However, the estimation of rather small models is much slower with the \pkg{Matrix} package than without this package. Moreover, the differences in computation time accumulate, if the estimation is iterated. <<>>= smallModel <- createSystemfitModel( nEq = 3, nReg = 4, nObs = 50 ) system.time( fitSmallMatrix <- systemfit( smallModel$formula, method = "SUR", data = smallModel$data, maxit = 500 ) ) system.time( fitSmallTrad <- systemfit( smallModel$formula, method = "SUR", data = smallModel$data, maxit = 500, useMatrix = FALSE ) ) all.equal( fitSmallMatrix, fitSmallTrad ) @ As mentioned above, the usage of the \pkg{Matrix} package clearly increases the computation times for iterated (SUR) estimations of small models with small data sets. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \section[Estimating systems of equations with sem] {Estimating systems of equations with \code{sem}} \label{sec:sem} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% <>= options( width = 75 ) @ This section compares the commands to estimate a system of equations by \code{sem} and \code{systemfit}. This comparison uses Klein's ``Model I'' (see Section~\ref{sec:KleinsModel}). Before starting the estimation, we load the \pkg{sem} and \pkg{systemfit} package as well as the required data set. <>= ### this code chunk is evaluated only if the 'sem' package is available library( "sem" ) library( "systemfit" ) data( "KleinI" ) @ First, we estimate the system by limited information maximum likelihood (LIML) with \code{sem}: <>= ### this code chunk is evaluated only if the 'sem' package is available limlRam <- matrix(c( "consump <- corpProf", "consump_corpProf", NA, "consump <- corpProfLag", "consump_corpProfLag", NA, "consump <- wages", "consump_wages", NA, "invest <- corpProf", "invest_corpProf", NA, "invest <- corpProfLag", "invest_corpProfLag", NA, "invest <- capitalLag", "invest_capitalLag", NA, "privWage <- gnp", "privWage_gnp", NA, "privWage <- gnpLag", "privWage_gnpLag", NA, "privWage <- trend", "privWage_trend", NA, "consump <-> consump", "s11", NA, "privWage <-> privWage", "s22", NA, "invest <-> invest", "s33", NA), ncol = 3, byrow = TRUE) class(limlRam) <- "mod" exogVar <- c("corpProf", "corpProfLag", "wages", "capitalLag", "trend", "gnp", "gnpLag") endogVar <- c("consump", "invest", "privWage") allVar <- c(exogVar, endogVar) limlResult <- sem(model = limlRam, S = cov(KleinI[ -1, allVar ]), N = (nrow(KleinI) - 1), fixed.x = exogVar) print(limlResult) @ Theoretically, the LIML results should be identical to OLS results. Therefore, we re-estimate this model by OLS with \code{systemfit}. <>= eqConsump <- consump ~ corpProf + corpProfLag + wages eqInvest <- invest ~ corpProf + corpProfLag + capitalLag eqPrivWage <- privWage ~ gnp + gnpLag + trend system <- list(consump = eqConsump, invest = eqInvest, privWage = eqPrivWage) olsResult <- systemfit(system, data = KleinI) print(olsResult) @ As expected, the results are identical. Now, we estimate the system by full information maximum likelihood (FIML) with \code{sem}: <>= ### this code chunk is evaluated only if the 'sem' package is available fimlRam <- rbind(limlRam, c("consump <-> invest", "s12", NA), c("consump <-> privWage", "s13", NA), c("privWage <-> invest", "s23", NA)) class(fimlRam) <- "mod" fimlResult <- sem(model = fimlRam, S = cov(KleinI[ -1, allVar ]), N = (nrow(KleinI) - 1), fixed.x = exogVar) print(fimlResult) @ Theoretically, results of an iterated SUR estimation should converge to FIML results. Therefore, we re-estimate this model by iterated SUR with \code{systemfit}. <<>>= surResult <- systemfit( system, method = "SUR", data = KleinI, methodResidCov = "noDfCor", maxit = 500 ) print( surResult ) @ As expected, the results are rather similar. \end{appendix} \end{document} %%% Local Variables: %%% mode: latex %%% TeX-master: t %%% End: systemfit/vignettes/aux2bib_systemfit.sh0000755000176200001440000000011011657237035020314 0ustar liggesusers#!/bin/bash aux2bib systemfit.aux bibsort references.bib >systemfit.bib systemfit/vignettes/runSweave.sh0000755000176200001440000000030711657237035016640 0ustar liggesusers#!/bin/sh echo "Sweave(\"systemfit.Rnw\")" | LC_ALL="C" R --no-save --no-restore echo "Stangle(\"systemfit.Rnw\", annotate=FALSE, split=TRUE, prefix=FALSE)" | LC_ALL="C" R --no-save --no-restore systemfit/vignettes/systemfit.bib0000755000176200001440000002025111657237035017032 0ustar liggesusers% BibTeX bibliography file @Book{anselin88, author = {Luc Anselin}, title = {Spatial Econometrics: Methods and Models}, year = {1988}, publisher = {Kluwer Academic}, address = {Dordrecht} } @Article{bates04, author = {Douglas Bates}, title = {Least Squares Calculations in {R}}, journal = {R News}, year = {2004}, month = {June}, volume = {4}, number = {1}, pages = {17-20}, URL = {http://CRAN.R-project.org/doc/Rnews/} } @InCollection{buckheit95, author = {Buckheit, J. and Donoho, D. L.}, title = {Wavelab and Reproducible Research}, booktitle = {Wavelets and Statistics}, editor = {Antoniadis, A}, year = {1995}, publisher = {Springer} } @Misc{cummins01, author = {Clint Cummins}, title = {Different Versions of {Grunfeld} Dataset}, year = {2001}, URL = {http://www.stanford.edu/~clint/bench/grunfeld.htm} } @Book{fox02a, author = {John Fox}, title = {An {R} and {S-Plus} Companion to Applied Regression}, year = {2002}, publisher = {SAGE Publications Ltd}, address = {Thousand Oaks} } @Book{greene03, author = {William H. Greene}, title = {Econometric Analysis}, edition = {5th}, year = {2003}, publisher = {Prentice Hall} } @Misc{greene06, author = {William H. Greene}, title = {Information about {SUR} Estimation in {LIMDEP}}, year = {2006}, howpublished = {Personal email on 2006/02/16} } @Misc{greene06a, author = {William H. Greene}, title = {Errata and Discussion to Econometric Analysis, 5th edition}, year = {2006}, URL = {http://pages.stern.nyu.edu/~wgreene/Text/Errata/ERRATA5.htm} } @PhdThesis{grunfeld58, author = {Y. Grunfeld}, title = {The Determinants of Corporate Investment}, year = {1958}, school = {University of Chicago} } @Article{hausman78, author = {Jerry A. Hausman}, title = {Specification Test in Econometrics}, journal = {Econometrica}, year = {1978}, volume = {46}, number = {6}, pages = {1251-1272} } @Article{henningsen07a, author = {Arne Henningsen and Jeff D. Hamann}, title = {{systemfit}: A Package for Estimating Systems of Simultaneous Equations in {R}}, journal = {Journal of Statistical Software}, year = {2007}, volume = {23}, number = {4}, pages = {1-40}, URL = {http://www.jstatsoft.org/v23/i04/} } @Book{judge82, author = {Judge, George G. and Hill, R. Carter and Griffiths, William and L{\"u}tkepohl, Helmut and Lee, Tsoung-Chao}, title = {Introduction to the Theory and Practice of Econometrics}, year = {1982}, publisher = {John Wiley and Sons}, address = {New York} } @Book{judge85, author = {George G. Judge and W. E. Griffiths and R. Carter Hill and Helmut L{\"u}tkepohl and Tsoung-Chao Lee}, title = {The Theory and Practice of Econometrics}, edition = {2nd}, year = {1985}, publisher = {John Wiley and Sons}, address = {New York} } @Book{klein50, author = {L. Klein}, title = {Economic Fluctuations in the United States, 1921--1941}, year = {1950}, publisher = {John Wiley}, address = {New York} } @Book{kmenta86, author = {Jan Kmenta}, title = {Elements of Econometrics}, edition = {2}, year = {1986}, publisher = {Macmillan}, address = {New York} } @Article{mcelroy77, author = {Marjorie B. McElroy}, title = {Goodness of Fit for Seemingly Unrelated Regressions}, journal = {Journal of Econometrics}, year = {1977}, volume = {6}, pages = {381-387} } @Book{paelinck79, author = {Jean H. P. Paelinck and Leo H. Klaassen}, title = {Spatial Econometrics}, year = {1979}, publisher = {Saxon House}, address = {Farnborough} } @Article{parks67, author = {Richard W. Parks}, title = {Efficient Estimation of a System of Regression Equations when Disturbances are both Serially and Contemporaneously Correlated}, journal = {Journal of the American Statistical Association}, year = {1967}, volume = {62}, number = {318}, pages = {500-509}, abstract = {This paper considers the problem of obtaining efficient estimates for the parameters of a system of M regression equations. The disturbance terms of this system are assumed to be related by both serial and contemporaneous correlation. Under the further assumption that the serial correlation is a first order autoregressive process, the paper develops an estimator that is consistent and has the same asymptotic normal distribution as the Aitken estimator which assumes the covariance matrix to be known. The paper concludes with a discussion of some alternative covariance specifications and points out certain difficulties with the standard single equation procedures for handling autoregressive schemes.} } @Manual{r-car-1.2-1, author = {John Fox}, title = {{car}: Companion to Applied Regression}, year = {2006}, note = {{R} package version 1.2-1}, URL = {http://CRAN.R-project.org/} } @Manual{r-Ecdat-0.1-5, author = {Yves Croissant}, title = {{Ecdat}: Data Sets for Econometrics}, year = {2006}, note = {{R} package version 0.1-5}, URL = {http://CRAN.R-project.org/} } @Article{r-lmtest, author = {Achim Zeileis and Torsten Hothorn}, title = {Diagnostic Checking in Regression Relationships}, journal = {R News}, year = {2002}, volume = {2}, number = {3}, pages = {7--10}, URL = {http://CRAN.R-project.org/doc/Rnews/} } @Manual{r-matrix-07, author = {Douglas Bates and Martin Maechler}, title = {Matrix: A Matrix Package for {R}}, year = {2007}, note = {{R} package version 0.99875-2}, URL = {http://CRAN.R-project.org/} } @Manual{r-plm-0.3-1, author = {Yves Croissant and Giovanni Millo}, title = {\pkg{plm}: Linear Models for Panel Data}, year = {2007}, note = {\proglang{R} package version 0.3-1}, URL = {http://CRAN.R-project.org/} } @Manual{r-project-07, author = {{R~Development Core Team}}, title = {R:~A Language and Environment for Statistical Computing}, year = {2007}, organization = {R~Foundation for Statistical Computing}, address = {Vienna, Austria}, note = {{ISBN} 3-900051-07-0}, URL = {http://www.R-project.org/} } @Manual{r-sem-2.0, author = {John Fox}, title = {{sem}: Structural Equation Models}, year = {2011}, note = {{R} package version 2.0}, URL = {http://CRAN.R-project.org/} } @Article{schmidt77, author = {Peter Schmidt}, title = {Estimation of Seemingly Unrelated Regressions with Unequal Numbers of Observations}, journal = {Journal of Econometrics}, year = {1977}, volume = {5}, pages = {365-377} } @Article{schmidt90, author = {Peter Schmidt}, title = {Three-Stage Least Squares with Different Instruments for Different Equations}, journal = {Journal of Econometrics}, year = {1990}, volume = {43}, pages = {389-394} } @Article{schwab00, author = {Matthias Schwab and Martin Karrenbach and Jon Claerbout}, title = {Making Scientific Computations Reproducible}, journal = {Computing in Science \& Engineering}, year = {2000}, volume = {2}, number = {6}, pages = {61-67} } @Book{srivastava87, author = {Virenda K. Srivastava and David E. A. Giles}, title = {Seemingly Unrelated Regression Equations Models}, year = {1987}, publisher = {Marcel Dekker, Inc.}, address = {New York} } @Book{theil71, author = {H. Theil}, title = {Principles of Econometrics}, year = {1971}, publisher = {Wiley, New York} } @Article{zellner62, author = {Arnold Zellner}, title = {An Efficient Method of Estimating Seemingly Unrelated Regressions and Tests for Aggregation Bias}, journal = {Journal of the American Statistical Association}, year = {1962}, volume = {57}, pages = {348-368} } @Article{zellner62b, author = {Arnold Zellner and H. Theil}, title = {Three-Stage Least Squares: Simultaneous Estimation of Simultaneous Equations}, journal = {Econometrica}, year = {1962}, volume = {30}, number = {1}, pages = {54-78} } @Article{zellner62c, author = {Arnold Zellner and D. S. Huang}, title = {Further Properties of Efficient Estimators for Seemingly Unrelated Regression Equations}, journal = {International Economic Review}, year = {1962}, volume = {3}, number = {3}, pages = {300-313} } @Book{zivot06, author = {Eric Zivot and Jiahui Wang}, title = {Modeling Financial Time Series with {S-PLUS}}, edition = {2nd}, year = {2006}, publisher = {Springer}, address = {New York} } systemfit/vignettes/.install_extras0000644000176200001440000000001711660553267017357 0ustar liggesuserssystemfit.bib$ systemfit/NEWS0000644000176200001440000001160614406577524013022 0ustar liggesusersTHIS IS THE CHANGELOG OF THE "systemfit" PACKAGE Please note that only the most significant changes are reported here. A full ChangeLog is available in the log messages of the SVN repository on R-Forge. CHANGES IN VERSION 1.1-30 (2023-03-22) * adjusted bread.systemfit() and estfun.systemfit() to recent changes of the 'sandwich' package CHANGES IN VERSION 1.1-28 (2022-09-04) * some adjustments to make the 'systemfit' package compatible with future versions (i.e., >= 1.4.2) of the 'Matrix' package CHANGES IN VERSION 1.1-26 (2022-06-20) * corrected a typo in the vignette (in the equation for calculating the variance-covariance matrix of the coefficients estimated by the "3SLS-Schmidt" estimator in the presence of restrictions) * fixed a few minor issues pointed out by 'R CMD check' CHANGES IN VERSION 1.1-24 (2019-12-08) * implemented 2SLS and 3SLS (instrumental variable) estimations for panel data * fixed a bug that occurred in panel data estimations when one variable name was a substring of another variable name * internal improvements to make this package compatible with R 4.0.0 CHANGES IN VERSION 1.1-22 (2018-04-04) * made this package compatible to the latest version of the "Matrix" package CHANGES IN VERSION 1.1-20 (2017-03-09) * users can now use pdata.frame() (in addition to plm.data()) to specify the panel structure of (panel) data sets (patch provided by Kevin Tappe -- thanks a lot!) [note: the use of plm.data() is deprecated] CHANGES IN VERSION 1.1-18 (2015-08-27) * added argument 'residCovDiag' to logLik.systemfit() * improved documentation of logLik.systemfit(): * slightly improved documentation of systemfit(): * imported functions from packages 'methods' and 'stats' (as indicated by 'R CMD check --as-cran' when using R-devel) CHANGES IN VERSION 1.1-16 (2015-06-08) * fixed a few minor issues pointed out by 'R CMD check' CHANGES IN VERSION 1.1-14 (2012-11-17) * added (incomplete) estfun() method (from the "sandwhich" package) for objects of class "systemfit" (currently, the residual covariance matrix is always assumed to be the identity matrix, although this is only true for OLS estimations!); therefore, the sandwich package is now "imported" * changed dependency ("Imports") from "stats (>= 2.15.0)" to "stats (>= 2.14.0)" CHANGES IN VERSION 1.1-12 (2012-06-02) * added nobs() method for objects of class "systemfit" CHANGES IN VERSION 1.1-10 (2011-11-11) * slightly revised the package vignette so that it works with version 2.0 of the "sem" package CHANGES IN VERSION 1.1-8 * the systemfit package now works with version 2.0 of the "car" package (linear.hypothesis() has been renamed as linearHypothesis()) CHANGES IN VERSION 1.1-6 * the logLik method now uses the average number of non-NA observations per equation (instead of the number of rows of the residual matrix, which might include NAs) to calculate the log-likelihood value: hence, the likelihood value is correct now even if there are NAs in the data; the calculation of the log-likelihood value for unbalanced systems uses the conditional density function for the unbalanced observations assuming that the errors of not-included observations are zero (the log-likelihood value was incorrect before if there were NAs in the data) * the logLik() method now takes the number of (linearly independent) coefficients from element "rank" to calculate the degrees of freedom, because this is correct even if there are NAs in the data (it was incorrect before if there were NAs in the data) * the logLik() method now returns (as attribute "nobs") the correct number of observations even if there are NAs in the data (it was incorrect before if there were NAs in the data) CHANGES IN VERSION 1.1-4 * model.matrix.systemfit.equation() now returns a matrix (and not a vector) even if the equation has only one regressor (including the constant); this fixes bugs in model.matrix.systemfit() and predict.systemfit() that occured if (at least) one equation has only one regressor CHANGES IN VERSION 1.1-2 * the subfolder "tests" and the test scripts in this subfolder are no longer included in the R package in order to reduce the time for checking this package on CRAN CHANGES IN VERSION 1.1-0 * added a NAMESPACE file * the returned fitted values, residuals, and the model frame include *all* observations now, where fitted values and residuals of observation that were not included in the estimation are NA * systemfit can estimate systems of equations with unequal numbers of observations now CHANGES IN VERSION 1.0-4 * added our JSS paper about systemfit as a vignette CHANGES IN VERSION 1.0-0 AND BEFORE * please take a look at the log messages of the SVN repository on R-Forgesystemfit/R/0000755000176200001440000000000014406577567012527 5ustar liggesuserssystemfit/R/systemfitPanel.R0000644000176200001440000000601513374002056015636 0ustar liggesusers.systemfitPanel <- function( formula, inst, data, pooled ) { if (inherits( data, "pdata.frame" )) { # current panel data format from pkg plm index <- index( data ) eqnVar <- names( index )[1] timeVar <- names( index )[2] # pdata.frames do not necessarily carry the index variables as columns. # attach index vars to data, if not in data (pdata.frame(..., drop.index = TRUE)) if (! (eqnVar %in% colnames(data))) { data <- cbind(data, index) } } else { if (inherits( data, "plm.dim" )) { # deprecated panel data format from pkg plm eqnVar <- names( data )[1] timeVar <- names( data )[2] } else { stop( "argument 'data' must be of class 'pdata.frame'", " (created with 'pdata.frame')" ) } } result <- list() data[[ eqnVar ]] <- gsub( " |_", ".", data[[ eqnVar ]] ) eqnLabels <- levels( as.factor( data[[ eqnVar ]] ) ) nEqn <- length( eqnLabels ) timeLabels <- levels( as.factor( data[[ timeVar ]] ) ) nRegressors <- ncol( model.matrix( formula, data ) ) eqnSystem <- list() wideData <- data.frame( time = timeLabels ) rownames( wideData ) <- make.names( timeLabels ) for( eqnNo in 1:nEqn ) { eqn <- eqnLabels[ eqnNo ] endogVar <- formula[2] exogVar <- formula[3] eqnData <- data[ data[[ eqnVar ]] == eqn, ] for( var in all.vars( formula ) ) { newVar <- paste( eqn, var, sep = "_" ) newVar <- make.names( newVar ) wideData[[ newVar ]] <- NA wideData[ make.names( eqnData[ , timeVar ] ), newVar ] <- eqnData[ , var ] endogVar <- gsub( paste0( "\\b", var, "\\b" ), newVar, endogVar ) exogVar <- gsub( paste0( "\\b", var, "\\b" ), newVar, exogVar ) } eqnSystem[[ eqnNo ]] <- as.formula( paste( endogVar, "~", exogVar ) ) } names( eqnSystem ) <- eqnLabels #reshape( data, idvar=timevar, timevar=eqnVar,direction="wide") if( is.null( inst ) ) { instSystem <- NULL } else { instSystem <- list() for( eqnNo in 1:nEqn ) { eqn <- eqnLabels[ eqnNo ] instVar <- inst[2] eqnData <- data[ data[[ eqnVar ]] == eqn, ] for( var in all.vars( inst ) ) { newVar <- paste( eqn, var, sep = "_" ) newVar <- make.names( newVar ) wideData[[ newVar ]] <- NA wideData[ make.names( eqnData[ , timeVar ] ), newVar ] <- eqnData[ , var ] instVar <- gsub( paste0( "\\b", var, "\\b" ), newVar, instVar ) } instSystem[[ eqnNo ]] <- as.formula( paste( "~", instVar ) ) } names( instSystem ) <- eqnLabels } restrict.regMat <- NULL if( pooled ) { for( eqnNo in 1:nEqn ) { restrict.regMat <- rbind( restrict.regMat, diag( 1, nRegressors ) ) } } result$eqnSystem <- eqnSystem result$instSystem <- instSystem result$wideData <- wideData result$restrict.regMat <- restrict.regMat return( result ) }systemfit/R/zzz.R0000644000176200001440000000137714305176027013477 0ustar liggesusers.onAttach <- function( lib, pkg ) { packageStartupMessage( paste0( "\nPlease cite the 'systemfit' package as:\n", "Arne Henningsen and Jeff D. Hamann (2007). ", "systemfit: A Package for Estimating Systems of Simultaneous Equations in R. ", "Journal of Statistical Software 23(4), 1-40. ", "http://www.jstatsoft.org/v23/i04/.\n\n", "If you have questions, suggestions, or comments ", "regarding the 'systemfit' package, ", "please use a forum or 'tracker' at systemfit's R-Forge site:\n", "https://r-forge.r-project.org/projects/systemfit/"), domain = NULL, appendLF = TRUE ) } # .onLoad <- function( lib, pkg ) { # options(Matrix.warnDeprecatedCoerce = 2) # where n >= 1 # }systemfit/R/calcFittedRegMat.R0000644000176200001440000000146514305164754016006 0ustar liggesuserscalcFittedRegMat<- function( xMatAll, zMatEq, nEq, nObsEq, useMatrix, solvetol ) { # fitted values of regressors for IV estimations xMatHatEq <- list() for(i in 1:nEq) { # rows that belong to the ith equation rowsEq <- c( (1+sum(nObsEq[1:i])-nObsEq[i]):(sum(nObsEq[1:i])) ) # extract instrument matrix xMatAllThisEq <- xMatAll[ rowsEq, ] if( useMatrix ){ xMatAllThisEq <- as( xMatAllThisEq, "denseMatrix") } xMatHatEq[[ i ]] <- zMatEq[[i]] %*% solve( crossprod( zMatEq[[i]] ), crossprod( zMatEq[[i]], xMatAllThisEq ), tol = solvetol ) } # fitted values of all regressors xMatHatAll <- .stackMatList( xMatHatEq, way = "below", useMatrix = useMatrix ) return( xMatHatAll ) } systemfit/R/prepareData.R0000644000176200001440000000055411216215643015062 0ustar liggesusers.prepareData.systemfit <- function( data ) { callNoDots <- match.call( expand.dots = FALSE ) #-"- without ...-expansion # model frame (without formula) modelFrame <- callNoDots[ c( 1, match( "data", names( callNoDots ), 0 ) ) ] modelFrame$na.action <- as.name( "na.pass" ) modelFrame[[1]] <- as.name( "model.frame" ) return( modelFrame ) } systemfit/R/predict.systemfit.R0000644000176200001440000000747011237011222016304 0ustar liggesusers## calculate predicted values, its standard errors and the prediction intervals predict.systemfit <- function( object, newdata = NULL, se.fit=FALSE, se.pred=FALSE, interval="none", level=0.95, useDfSys = NULL, ... ) { if( is.null( useDfSys ) ) { useDfSys <- length( coef( object ) ) != object$rank # TRUE if there are restrictions imposed } for(i in 1:length( object$eq ) ) { predicted.i <- predict( object$eq[[ i ]], newdata = newdata, se.fit = se.fit, se.pred = se.pred, interval = interval, level = level, useDfSys = useDfSys ) names( predicted.i ) <- paste( object$eq[[ i ]]$eqnLabel, ".", names( predicted.i ), sep = "" ) if( i == 1 ) { predicted <- predicted.i } else { predicted <- cbind( predicted, predicted.i ) } } names( predicted ) <- sub( "(?|t|)" ) result$df <- c( object$rank, object$df.residual ) # coefficients of the modified regressor matrix if( !is.null( object$restrict.regMat ) ) { coefModReg <- coef( object, modified.regMat = TRUE ) stdErModReg <- diag( vcov( object, modified.regMat = TRUE ) )^0.5 # standard errors tStatModReg <- coefModReg / stdErModReg # t-statistic if( useDfSys ) { # p-values pValModReg <- 2 * ( 1 - pt( abs( tStatModReg ), object$df.residual ) ) } else { pValModReg <- rep( NA, length( coefModReg ) ) } result$coefModReg <- cbind( coefModReg, stdErModReg, tStatModReg, pValModReg ) colnames( result$coefModReg ) <- c( "Estimate", "Std. Error", "t value", "Pr(>|t|)" ) } # R^2 values resid <- NULL response <- NULL responseMinusMean <- NULL for( i in 1:length( object$eq ) ) { resid <- c( resid, residuals( object$eq[[ i ]], na.rm = TRUE ) ) responseEqI <- fitted( object$eq[[ i ]], na.rm = TRUE ) + residuals( object$eq[[ i ]], na.rm = TRUE ) response <- c( response, responseEqI ) responseMinusMean <- c( responseMinusMean, responseEqI - mean( responseEqI ) ) } # OLS R^2 value of the entire system rss <- sum( resid^2 ) tss <- sum( responseMinusMean^2 ) result$ols.r.squared <- 1 - rss / tss # System R^2 value of McElroy (1977) # formula from Greene (2003, p. 345 ) # (first formula, numerator modified to save memory) xMat <- matrix( resid, ncol = 1 ) if( object$control$useMatrix ){ object$residCov <- as( object$residCov, "symmetricMatrix") xMat <- as( xMat, "CsparseMatrix" ) } rtOmega <- .calcXtOmegaInv( xMat = xMat, sigma = object$residCov, validObsEq = validObsEq, solvetol = object$control$solvetol, useMatrix = object$control$useMatrix ) yCov <- .calcResidCov( response, methodResidCov = "noDfCor", validObsEq = validObsEq, centered = TRUE, solvetol = object$control$solvetol ) residCovInv <- solve( object$residCov, tol = object$control$solvetol ) denominator <- 0 for( i in 1:length( object$eq ) ) { for( j in 1:length( object$eq ) ) { denominator <- denominator + residCovInv[ i, j ] * yCov[ i, j ] * ( nObsEq[ i ] * nObsEq[ j ] )^0.5 } } result$mcelroy.r.squared <- drop( 1 - ( rtOmega %*% resid ) / denominator ) result$printEquations <- equations result$printResidCov <- residCov class( result ) <- "summary.systemfit" return( result ) } ## print summary results of the whole system print.summary.systemfit <- function( x, digits = max( 3, getOption("digits") - 1 ), residCov = x$printResidCov, equations = x$printEquations, ... ) { table <- NULL labels <- NULL cat("\n") cat("systemfit results \n") cat("method: ") if(!is.null(x$iter)) if(x$iter>1) cat("iterated ") cat( paste( x$method, "\n\n")) if(!is.null(x$iter)) { if(x$iter>1) { if(x$iter|t|)" ) result$df <- c( length( coef( object ) ), nObs - length( coef( object ) ) ) result$ssr <- sum( residuals( object, na.rm = TRUE )^2 ) result$sigma <- sqrt( result$ssr / df.residual( object ) ) # R^2 values response <- fitted( object, na.rm = TRUE ) + residuals( object, na.rm = TRUE ) rss <- sum( residuals( object, na.rm = TRUE )^2 ) tss <- sum( ( response - mean( response ) )^2 ) result$r.squared <- 1 - rss / tss result$adj.r.squared <- 1 - ( ( nObs - 1 ) / object$df.residual ) * ( 1 - result$r.squared ) class( result ) <- "summary.systemfit.equation" return( result ) } ## print summary results for a single equation print.summary.systemfit.equation <- function( x, digits = max( 3, getOption("digits") - 1 ), ... ) { cat("\n") cat( x$method, " estimates for '", x$eqnLabel, "' (equation ", x$eqnNo, ")\n", sep = "" ) cat("Model Formula: ") print( formula( x$terms ) ) if(!is.null(x$inst)) { cat("Instruments: ") print(x$inst) } cat("\n") printCoefmat( x$coefficients, digits = digits ) cat(paste("\nResidual standard error:", round( x$sigma, digits ), "on", x$df[ 2 ], "degrees of freedom\n" )) cat( paste( "Number of observations:", round( sum( x$df ), digits ), "Degrees of Freedom:", round( x$df[ 2 ], digits ),"\n" ) ) cat( paste( "SSR:", round( x$ssr, digits ), "MSE:", round( x$sigma^2, digits ), "Root MSE:", round(x$sigma, digits), "\n" ) ) cat( paste( "Multiple R-Squared:", round( x$r.squared, digits ), "Adjusted R-Squared:", round( x$adj.r.squared, digits ), "\n" ) ) cat("\n") invisible( x ) } systemfit/R/nlsystemfit.r0000644000176200001440000006276312535400111015254 0ustar liggesusers### $Id: nlsystemfit.r 1132 2015-06-08 20:51:21Z arne $ ### ### Simultaneous Nonlinear Least Squares for R ### ### Copyright 2003-2004 Jeff D. Hamann ### ### This file is part of the nlsystemfit library for R and related languages. ### It is made available under the terms of the GNU General Public ### License, version 2, or at your option, any later version, ### incorporated herein by reference. ### ### This program is distributed in the hope that it will be ### useful, but WITHOUT ANY WARRANTY; without even the implied ### warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR ### PURPOSE. See the GNU General Public License for more ### details. ### ### You should have received a copy of the GNU General Public ### License along with this program; if not, write to the Free ### Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, ### MA 02111-1307, USA ### uses the Dennis + Schnabel Minimizer which is the one utilized by R's nlm() ### remove before release # rm(list=ls(all=TRUE)) ### this function is the "driver" function for the minimization... knls <- function( theta, eqns, data, fitmethod="OLS", parmnames, instr=NULL, S=NULL ) { r <- matrix() # residuals equation wise r <- NULL gmm.resids <- matrix() gmm.resids <- NULL residi <- list() # residuals equation wise lhs <- list() rhs <- list() neqs <- length( eqns ) nobs <- dim( data )[[1]] # number of nonmissing observations ## GMM specific variables, in this case... g = 2, k = 3 # V <- matrix( 0, g*k, g*k ) # V is a 6x6 matrix moments <- list() mn <- array() moments <- NULL mn <- NULL lhs <- NULL rhs <- NULL residi <- NULL # partial derivatives of the residuals with respect to the parameters dResidTheta <- NULL dResidThetai <- list() d2ResidTheta <- array( NA, c( 0, 0, 0 ) ) d2ResidThetai <- list() ## get the values of the parameters for( i in 1:length( parmnames ) ) { name <- names( parmnames )[i] val <- theta[i] storage.mode( val ) <- "double" assign( name, val ) } ## build the residual vector... for( i in 1:length( eqns ) ) { lhs[[i]] <- as.matrix( eval( as.formula( eqns[[i]] )[[2]], envir = data ) ) rhs[[i]] <- as.matrix( eval( as.formula( eqns[[i]] )[[3]], envir = data ) ) residi[[i]] <- lhs[[i]] - rhs[[i]] r <- rbind( r, as.matrix( residi[[i]] ) ) if( fitmethod == "GMM" ) { gmm.resids <- cbind( gmm.resids, as.matrix( residi[[i]] ) ) } dResidThetai[[ i ]] <- - attributes( with( data, with( as.list( theta ), eval( deriv( eqns[[i]], names( parmnames )), envir = data ))))$gradient dResidTheta <- rbind( dResidTheta, dResidThetai[[ i ]] ) d2ResidThetai[[ i ]] <- - attributes( with( data, with( as.list( theta ), eval( deriv3( eqns[[i]], names( parmnames ) ), envir = data ))))$hessian temp <- array( NA, c( dim( d2ResidTheta )[ 1 ] + dim( d2ResidThetai[[ i ]] )[ 1 ], dim( d2ResidThetai[[ i ]] )[ 2:3 ] ) ) if( i > 1 ) { temp[ 1:dim( d2ResidTheta )[ 1 ], , ] <- d2ResidTheta } temp[ ( dim( d2ResidTheta )[ 1 ] + 1 ):( dim( temp )[ 1 ] ), , ] <- d2ResidThetai[[ i ]] d2ResidTheta <- temp } ## these are the objective functions for the various fitting methods if( fitmethod == "OLS" ) { obj <- crossprod( r ) gradient <- 2 * t( r ) %*% dResidTheta #print( d2ResidTheta ) #print( t( dResidTheta ) %*% dResidTheta ) hessian <- matrix( NA, nrow = length( parmnames ), ncol = length( parmnames ) ) for( i in 1:length( parmnames ) ) { hessian[ i, ] <- 2 * t( r ) %*% d2ResidTheta[ , , i ] } hessian <- hessian + 2 * t( dResidTheta ) %*% dResidTheta rownames( hessian ) <- colnames( dResidTheta ) colnames( hessian ) <- colnames( dResidTheta ) #print( hessian - t( hessian ) ) hessian <- NULL attributes( obj ) <- list( gradient = gradient, hessian = hessian ) } if( fitmethod == "2SLS" ) { ## W is premultiplied == ( diag( neqs ) %x% W ) ##obj <- ( t(r) %*% S %*% r ) obj <- crossprod(t(crossprod(r,S)),r) attributes( obj ) <- list( gradient = 2 * t( r ) %*% S %*% dResidTheta ) } if( fitmethod == "SUR" ) { ## S is premultiplied == ( qr.solve( S ) %x% diag( nobs ) ) ##obj <- ( t(r) %*% S %*% r ) obj <- crossprod(t(crossprod(r,S)),r) attributes( obj ) <- list( gradient = 2 * t( r ) %*% S %*% dResidTheta ) } if( fitmethod == "3SLS" ) { ## S is premultiplied == ( qr.solve( S ) %x% W ) ##obj <- ( t(r) %*% S %*% r ) obj <- crossprod(t(crossprod(r,S)),r) attributes( obj ) <- list( gradient = 2 * t( r ) %*% S %*% dResidTheta ) } if( fitmethod == "GMM" ) { ## this just can't be correct... or can it... ## S is a gx x gk matrix ## g = number of eqns, k = number of inst variables z <- as.matrix( model.frame( instr, data = data ) ) for(t in 1:nobs) { moments <- rbind( moments, gmm.resids[t,] %x% z[t,] ) } g <- length( eqns ) # number of equations k <- dim( as.matrix( model.frame( instr, data = data ) ) )[[2]] gk <- g*k for( i in 1:gk ) { mn <- rbind( mn, mean( moments[,i] ) ) } ##obj <- ( t(nobs*mn) %*% S %*% (nobs*mn) ) / nobs ##obj <- ( t(mn) %*% S %*% (mn) ) obj <- crossprod(t(crossprod(mn,S)),mn) } ## it would be nice to place the gradient and/or hessian attributes... ## how can I make this work??? ## attr( obj, "gradient" ) <- "hi mom" ## attr( obj, "hessian" ) <- hessian... return( obj ) } nlsystemfit <- function( method="OLS", eqns, startvals, eqnlabels=c(as.character(1:length(eqns))), inst=NULL, data=list(), solvtol=.Machine$double.eps, maxiter=1000, ... ) { ## some tests if(!(method=="OLS" | method=="SUR" | method=="2SLS" | method=="3SLS" | method=="GMM" )){ stop("The method must be 'OLS', 'SUR', '2SLS', or '3SLS'")} if((method=="2SLS" | method=="3SLS" | method=="GMM") & is.null(inst)) { stop("The methods '2SLS', '3SLS' and 'GMM' need instruments!")} lhs <- list() rhs <- list() derivs <- list() results <- list() # results to be returned results$eq <- list() # results for the individual equations resulti <- list() # results of the ith equation residi <- list() # residuals equation wise iter <- NULL # number of iterations G <- length( eqns ) # number of equations n <- array( 0, c(G)) # number of observations in each equation k <- array( 0, c(G) ) # number of (unrestricted) coefficients/regressors in each equation df <- array( 0, c(G) ) # degrees of freedom in each equation instl <- list() # list of the instruments for each equation ssr <- array( 0, c(G)) # sum of squared residuals of each equation mse <- array( 0, c(G)) # mean square error (residuals) of each equation rmse <- array( 0, c(G)) # root of mse r2 <- array( 0, c(G)) # R-squared value adjr2 <- array( 0, c(G)) # adjusted R-squared value nobs <- dim( data )[[1]] S <- matrix( 0, G, G ) # covariance matrix of the residuals X <- array() x <- list() resids <- array() resids <- NULL if( method == "OLS" ) { if( TRUE ) { est <- nlm( knls, startvals, typsize=abs(startvals),iterlim=maxiter, eqns=eqns, data=data, fitmethod=method, parmnames=startvals, ... ) } else { est <- optim( fn = knls, par = startvals, eqns=eqns, data=data, fitmethod=method, parmnames=startvals ) } } if( method == "2SLS" ) { ## just fit and part out the return structure z <- as.matrix( model.frame( inst, data = data ) ) Wt <- z %*% qr.solve( crossprod( z ), tol=solvtol ) %*% t(z) W2 <- diag( length( eqns ) ) %x% Wt est <- nlm( knls, startvals, typsize=abs(startvals),iterlim=maxiter, eqns=eqns, data=data, fitmethod=method, parmnames=startvals, S=W2, ... ) } if( method == "SUR" || method == "3SLS" || method == "GMM" ) { ## fit ols/2sls, build the cov matrix for estimation and refit if( method == "SUR" ) { estols <- nlm( knls, startvals, typsize=abs(startvals),iterlim=maxiter, eqns=eqns, data=data, fitmethod="OLS", parmnames=startvals, ... ) } if( method == "3SLS" || method == "GMM" ) { z <- as.matrix( model.frame( inst, data = data ) ) W <- z %*% qr.solve( crossprod( z ), tol=solvtol ) %*% t(z) W2 <- ( diag( length( eqns ) ) %x% W ) estols <- nlm( knls, startvals, typsize=abs(startvals),iterlim=maxiter, eqns=eqns, data=data, fitmethod="2SLS", parmnames=startvals, instr=inst, S=W2, ... ) } ## build the S matrix names( estols$estimate ) <- names( startvals ) for( i in 1:length( estols$estimate ) ) { name <- names( estols$estimate )[i] val <- estols$estimate[i] storage.mode( val ) <- "double" assign( name, val ) } ## get the rank for the eqns, compute the first-stage ## cov matrix to finish the SUR and 3SLS methods for(i in 1:G) { lhs[[i]] <- as.matrix( eval( as.formula( eqns[[i]] )[[2]], envir = data ) ) rhs[[i]] <- as.matrix( eval( as.formula( eqns[[i]] )[[3]], envir = data ) ) residi[[i]] <- lhs[[i]] - rhs[[i]] derivs[[i]] <- deriv( as.formula( eqns[[i]] ), names( startvals ) ) ## computing the jacobian to get the rank to get the number of variables... jacobian <- attr( eval( derivs[[i]], envir = data ), "gradient" ) n[i] <- length( lhs[[i]] ) k[i] <- qr( jacobian )$rank df[i] <- n[i] - k[i] } ## covariance matrix of the residuals from the first stage... Sols <- matrix( 0, G, G ) rcovformula <- 1 for(i in 1:G) { for(j in 1:G) { Sols[i,j] <- sum(residi[[i]]*residi[[j]])/( sqrt((n[i]-rcovformula*k[i])*(n[j]-rcovformula*k[j]))) } } if( method == "SUR" ) { Solsinv <- qr.solve( Sols, tol=solvtol ) %x% diag( nobs ) est <- nlm( knls,estols$estimate, typsize=abs(estols$estimate),iterlim=maxiter, eqns=eqns, data=data, fitmethod=method, parmnames=startvals, S=Solsinv, ... ) } if( method == "3SLS" ) { z <- as.matrix( model.frame( inst, data = data ) ) W <- z %*% qr.solve( crossprod( z ), tol=solvtol ) %*% t(z) Solsinv <- qr.solve( Sols, tol=solvtol ) %x% W est <- nlm( knls, estols$estimate, typsize=abs(estols$estimate),iterlim=maxiter, eqns=eqns, data=data, fitmethod=method, parmnames=startvals, S=Solsinv, instr=z, ... ) } if( method == "GMM" ) { resids <- NULL for(i in 1:G) { resids <- cbind( resids, residi[[i]] ) } z <- as.matrix( model.frame( inst, data = data ) ) moments <- list() moments <- NULL for(t in 1:nobs) { moments <- rbind( moments, resids[t,] %x% z[t,] ) } v2sls <- qr.solve( var( moments ), tol=solvtol ) est <- nlm( knls,estols$estimate, typsize=abs(estols$estimate),iterlim=maxiter, eqns=eqns, data=data, fitmethod="GMM", parmnames=startvals, S=v2sls, instr=inst, ... ) } } ## done with the fitting... ## now, part out the results from the nlm function ## to rebuild the equations and return object ## get the parameters for each of the equations and ## evaluate the residuals for eqn ## get the values of the final parameters if( TRUE ) { estimate <- est$estimate } else { estimate <- est$par } names( estimate ) <- names( startvals ) for( i in 1:length( estimate ) ) { name <- names( estimate )[i] ### I wonder if I need to clear out the variables before assigning them for good measure... assign( name, NULL ) val <- estimate[i] storage.mode( val ) <- "double" assign( name, val ) } ## get the rank for the eqns, compute the first-stage ## cov matrix to finish the SUR and 3SLS methods X <- NULL results$resids <- array() results$resids <- NULL ## you're working on parsing out the parameters and the estiamtes for the return structure... for(i in 1:G) { lhs[[i]] <- as.matrix( eval( as.formula( eqns[[i]] )[[2]], envir = data ) ) rhs[[i]] <- as.matrix( eval( as.formula( eqns[[i]] )[[3]], envir = data ) ) residi[[i]] <- lhs[[i]] - rhs[[i]] derivs[[i]] <- deriv( as.formula( eqns[[i]] ), names( startvals ) ) ## computing the jacobian to get the rank to get the number of variables... jacobian <- attr( eval( derivs[[i]], envir = data ), "gradient" ) n[i] <- length( lhs[[i]] ) k[i] <- qr( jacobian )$rank df[i] <- n[i] - k[i] ssr[i] <- crossprod( residi[[i]] ) mse[i] <- ssr[i] / ( n[i] - k[i] ) rmse[i] <- sqrt( mse[i] ) X <- rbind( X, jacobian ) results$resids <- cbind( results$resids, as.matrix( residi[[i]] ) ) } ## compute the final covariance matrix ## you really should use the code below to handle weights... rcovformula <- 1 for(i in 1:G) { for(j in 1:G) { S[i,j] <- sum(residi[[i]]*residi[[j]])/( sqrt((n[i]-rcovformula*k[i])*(n[j]-rcovformula*k[j]))) } } ### for when you get the weights working... # vardef <- 1 # if( vardef == 1 ) { # D <- diag( G ) * 1 / sqrt( nrow( data ) ) # } # if( vardef == 2 ) { # D <- diag( G ) * 1 / sqrt( sum( weights ) ) # } # if( vardef == 3 ) { # D <- diag( G ) * 1 / sqrt( sum( weights ) - ( sum( n ) - sum( k ) ) ) # } # if( vardef == 4 ) { # for(i in 1:G) { # D <- diag( G ) # D[i,i] <- D[i,i] * 1 / sqrt( nrow( data ) - n[i] ) # } # } # ## the docs have this, but the table contains the above equations # R <- crossprod( results$resids ) # S <- D %*% R %*% D # SI <- qr.solve( S, tol=solvtol ) %x% diag( nrow( data ) ) # covb <- qr.solve(t(X) %*% SI %*% X, tol=solvtol ) ## get the variance-covariance matrix if( method == "OLS" ) { SI <- diag( diag( qr.solve( S, tol=solvtol ) ) ) %x% diag( nrow( data ) ) covb <- qr.solve(t(X) %*% SI %*% X, tol=solvtol ) } if( method == "2SLS" ) { Z <- model.matrix(inst, data = data ) W <- Z %*% qr.solve( crossprod( Z ), tol=solvtol ) %*% t(Z) SW <- diag( diag( qr.solve( S, tol=solvtol ) ) ) %x% W covb <- qr.solve(t(X) %*% SW %*% X, tol=solvtol ) } if( method == "SUR" ) { SI <- qr.solve( S, tol=solvtol ) %x% diag( nrow( data ) ) covb <- qr.solve(t(X) %*% SI %*% X, tol=solvtol ) } if( method == "3SLS" ) { Z <- model.matrix(inst, data = data ) W <- Z %*% qr.solve( crossprod( Z ), tol=solvtol ) %*% t(Z) SW <- qr.solve( S, tol=solvtol ) %x% W covb <- qr.solve(t(X) %*% SW %*% X, tol=solvtol ) } if( method == "GMM" ) { # print( "obtaining GMM(SE)" ) z <- as.matrix( model.frame( inst, data = data ) ) moments <- list() moments <- NULL resids <- NULL for(i in 1:G) { resids <- cbind( resids, residi[[i]] ) } for(t in 1:nobs) { moments <- rbind( moments, resids[t,] %x% z[t,] ) } # print( var( moments ) ) Vinv <- qr.solve( var( moments ), tol=solvtol ) # print( Vinv ) Y <- diag( length( eqns ) ) %x% t(z) # print( "covb now..." ) # print( dim( Y ) ) # print( dim( X ) ) covb <- qr.solve( t( Y %*% X ) %*% Vinv %*% ( Y %*% X ), tol=solvtol ) # print( covb ) } colnames( covb ) <- rownames( covb ) ## bind the standard errors to the parameter estimate matrix se2 <- sqrt( diag( covb ) ) t.val <- estimate / se2 prob <- 2*( 1 - pt( abs( t.val ), sum( n ) - sum( k ) ) ) ### you better check this... results$method <- method results$n <- sum( n ) results$k <- sum( k ) results$b <- estimate results$se <- se2 results$t <- t.val results$p <- prob ## build the results structure... for(i in 1:G) { ## you may be able to shrink this up a little and write the values directly to the return structure... eqn.terms <- vector() eqn.est <- vector() eqn.se <- vector() jacob <- attr( eval( deriv( as.formula( eqns[[i]] ), names( startvals ) ), envir = data ), "gradient" ) for( v in 1:length( estimate ) ) { if( qr( jacob[,v] )$rank > 0 ) { eqn.terms <- rbind( eqn.terms, name <- names( estimate )[v] ) eqn.est <- rbind( eqn.est, estimate[v] ) eqn.se <- rbind( eqn.se, se2[v] ) } } ## build the "return" structure for the equations resulti$method <- method resulti$i <- i # equation number resulti$eqnlabel <- eqnlabels[[i]] resulti$formula <- eqns[[i]] resulti$b <- as.vector( eqn.est ) names( resulti$b ) <- eqn.terms resulti$se <- eqn.se resulti$t <- resulti$b / resulti$se resulti$p <- 2*( 1-pt(abs(resulti$t), n[i] - k[i] )) resulti$n <- n[i] # number of observations resulti$k <- k[i] # number of coefficients/regressors resulti$df <- df[i] # degrees of freedom of residuals resulti$predicted <- rhs[[i]] # predicted values resulti$residuals <- residi[[i]] # residuals resulti$ssr <- ssr[i] # sum of squared errors/residuals resulti$mse <- mse[i] # estimated variance of the residuals (mean squared error) resulti$s2 <- mse[i] # the same (sigma hat squared) resulti$rmse <- rmse[i] # estimated standard error of the residuals resulti$s <- rmse[i] # the same (sigma hat) # ## you'll need these to compute the correlations... # print( paste( "eqn ", i ) ) coefNames <- rownames( covb )[ rownames( covb ) %in% strsplit( as.character( eqns[[ i ]] )[ 3 ], "[^a-zA-Z0-9.]" )[[ 1 ]] ] resulti$covb <- covb[ coefNames, coefNames ] # resulti$x <- model.frame( as.formula( eqns[[i]] )[[3]], data = data ) # print( resulti$x ) # print( model.frame( eval( eqns[[i]], envir = data ), data = data ) ) ## fix this to allow for multiple instruments? if(method=="2SLS" | method=="3SLS" | method=="GMM") { resulti$inst <- inst ##resulti$inst <- inst[[i]] ##resulti$inst <- instl[[i]] ## resulti$h <- h[[i]] # matrix of instrumental variables } resulti$r2 <- 1 - ssr[i] / ( ( crossprod( lhs[[i]]) ) - mean( lhs[[i]] )^2 * nobs ) resulti$adjr2 <- 1 - ((n[i]-1)/df[i])*(1-resulti$r2) class(resulti) <- "nlsystemfit.equation" results$eq[[i]] <- resulti } results$solvtol <- solvtol results$covb <- covb results$rcov <- S results$rcor <- cor( results$resids ) results$drcov <- det(results$rcov) # det(rcov, tol=solvetol) if(method=="2SLS" || method=="3SLS") { ## results$h <- H # matrix of all (diagonally stacked) instrumental variables } if(method=="SUR" || method=="3SLS" || method=="GMM" ) { results$rcovest <- Sols # residual covarance matrix used for estimation ##results$mcelr2 <- mcelr2 # McElroy's R-squared value for the equation system } ## build the "return" structure for the whole system results$method <- method results$g <- G # number of equations results$nlmest <- est class(results) <- "nlsystemfit.system" if( results$nlmest$code >= 4 ) { warning( "Estimation did not converge!" ) } return( results ) } ## print the (summary) results that belong to the whole system summary.nlsystemfit.system <- function(object,...) { summary.nlsystemfit.system <- object summary.nlsystemfit.system } ## print the results that belong to the whole system print.nlsystemfit.system <- function( x, digits=6,... ) { object <- x save.digits <- unlist(options(digits=digits)) on.exit(options(digits=save.digits)) table <- NULL labels <- NULL cat("\n") cat("nlsystemfit results \n") cat("method: ") # if(!is.null(object$iter)) if(object$iter>1) cat("iterated ") cat( paste( object$method, "\n\n")) # if(!is.null(object$iter)) { # if(object$iter>1) { # if(object$iter|t|)","") ##print.matrix(table, quote = FALSE, right = TRUE ) ##prmatrix(table, quote = FALSE, right = TRUE ) print(table, quote = FALSE, right = TRUE ) cat("---\nSignif. codes: ",attr(Signif,"legend"),"\n") cat(paste("\nResidual standard error:", round(object$s, digits), ## s ist the variance, isn't it??? "on", object$df, "degrees of freedom\n")) cat( paste( "Number of observations:", round(object$n, digits), "Degrees of Freedom:", round(object$df, digits),"\n" ) ) cat( paste( "SSR:", round(object$ssr, digits), "MSE:", round(object$mse, digits), "Root MSE:", round(object$rmse, digits), "\n" ) ) cat( paste( "Multiple R-Squared:", round(object$r2, digits), "Adjusted R-Squared:", round(object$adjr2, digits), "\n" ) ) cat("\n") } # from Model Selection and Inference: A Practical Information-Theoretic Approach # Kenneth P. Burnham and David R. Anderson, 1998. Springer-Verlag, New York, New York. ## Akaike's Information Criterion ## AIC = n * log( sigmahat^2 ) + 2K ## n = number of obs ## sigmahat^2 = sum( error^2 ) / n == residual sums of squares ## K is the total number if estimated parameters, including the intercept and sigma^2 (nparams + 1) ## second order AIC ## AICc = AIC + (2K*(K+1))/(n-K-1) ## unless the sample size is large with repsect to the number of estiamted parameters, use AICc. systemfit/R/calcResidCov.R0000644000176200001440000000701414305170370015170 0ustar liggesusers## Calculate the residual covariance matrix .calcResidCov <- function( resids, methodResidCov, validObsEq = NULL, nCoefEq = NULL, xEq = NULL, diag = FALSE, centered = FALSE, useMatrix = FALSE, solvetol = .Machine$double.eps ) { eqNames <- NULL if( inherits( resids, "data.frame" ) ) { resids <- as.matrix( resids ) validObsEq <- !is.na( resids ) eqNames <- names( resids ) } else if( !is.null( validObsEq ) ) { residMat <- matrix( NA, nrow = nrow( validObsEq ), ncol = ncol( validObsEq ) ) for( i in 1:ncol( validObsEq ) ) { residMat[ validObsEq[ , i ], i ] <- resids[ ( 1 + sum( validObsEq[ , 0:(i-1) ] ) ):( sum(validObsEq[ , 1:i ] ) ) ] } resids <- residMat rm( residMat ) } else { stop( "internal error in .calcResidCov: if argument 'validObsEq'", " is not provided, argument 'resids' must be a data.frame'" ) } nEq <- ncol( validObsEq ) result <- matrix( 0, nEq, nEq ) if( centered ) { for( i in 1:nEq ) { resids[ , i ] <- resids[ , i ] - mean( resids[ validObsEq[ , i ], i ] ) } } validObsAll <- rowSums( !validObsEq ) == 0 for( i in 1:nEq ) { for( j in ifelse( diag, i, 1 ):ifelse( diag, i, nEq ) ) { if( methodResidCov == "noDfCor" ) { result[ i, j ] <- sum( resids[ validObsAll, i ] * resids[ validObsAll, j ] ) / sum( validObsAll ) } else if( methodResidCov == "geomean" ) { result[ i, j ] <- sum( resids[ validObsAll, i ] * resids[ validObsAll, j ] ) / sqrt( ( sum( validObsAll ) - nCoefEq[i] ) * ( sum( validObsAll ) - nCoefEq[j] ) ) } else if( methodResidCov == "Theil" ) { #result[ i, j ] <- sum( residi[[i]] * residi[[j]] ) / # ( sum( validObsAll ) - nCoefEq[i] - nCoefEq[j] + sum( diag( # xEq[[i]] %*% solve( crossprod( xEq[[i]] ), tol=solvetol ) %*% # crossprod( xEq[[i]], xEq[[j]]) %*% # solve( crossprod( xEq[[j]] ), tol=solvetol ) %*% # t( xEq[[j]] ) ) ) ) result[ i, j ] <- sum( resids[ validObsAll, i ] * resids[ validObsAll, j ] ) / ( sum( validObsAll ) - nCoefEq[i] - nCoefEq[j] + sum( diag( solve( crossprod( xEq[[i]] ), tol=solvetol ) %*% crossprod( xEq[[i]], xEq[[j]]) %*% solve( crossprod( xEq[[j]] ), tol=solvetol ) %*% crossprod( xEq[[j]], xEq[[i]] ) ) ) ) } else if( methodResidCov == "max" ) { result[ i, j ] <- sum( resids[ validObsAll, i ] * resids[ validObsAll, j ] ) / ( sum( validObsAll ) - max( nCoefEq[ i ], nCoefEq[ j ] ) ) } else { stop( paste( "Argument 'methodResidCov' must be either 'noDfCor',", "'geomean', 'max', or 'Theil'." ) ) } } } if( !is.null( eqNames ) ) { rownames( result ) <- eqNames colnames( result ) <- eqNames } if( useMatrix ){ result <- as( result, "symmetricMatrix" ) } return( result ) } ## Calculate Sigma squared .calcSigma2 <- function( resids, methodResidCov, nObs, nCoef ) { if( methodResidCov == "noDfCor" ) { result <- sum( resids^2 ) / nObs } else if( methodResidCov %in% c( "geomean", "max" ) ){ result <- sum( resids^2 )/ ( nObs - nCoef ) } else { stop( paste( "Sigma^2 can only be calculated if argument", "'methodResidCov' is either 'noDfCor', 'geomean', or 'max'" ) ) } } systemfit/R/hausman.R0000644000176200001440000000264211063415462014267 0ustar liggesusers## this function returns test statistic for ## the hausman test # The m-statistic is then distributed with k degrees of freedom, where k # is the rank of the matrix .A generalized inverse is used, as # recommended by Hausman (1982). hausman.systemfit <- function( results2sls, results3sls ) { result <- list() if( is.null( results2sls$restrict.regMat ) ) { result$q <- coef( results2sls ) - coef( results3sls ) result$qVar <- vcov( results2sls ) - vcov( results3sls ) } else { result$q <- coef( results2sls, modified.regMat = TRUE ) - coef( results3sls, modified.regMat = TRUE ) result$qVar <- vcov( results2sls, modified.regMat = TRUE ) - vcov( results3sls, modified.regMat = TRUE ) } # if( min( eigen( hausman$qVar )$values ) < 0 ) { # warning( "the matrix V is not 'positive definite'" ) # } result$statistic <- crossprod( result$q, solve( result$qVar, result$q ) ) names( result$statistic ) <- "Hausman" result$parameter <- nrow( result$qVar ) names( result$parameter ) <- "df" result$p.value <- 1 - pchisq( result$statistic, result$parameter ) result$method = paste( "Hausman specification test for consistency of", "the 3SLS estimation" ) if( "data" %in% names( results2sls$call ) ) { result$data.name <- results2sls$call$data } else { result$data.name <- "unknown" } class( result ) <- "htest" return( result ) } systemfit/R/fiml.R0000644000176200001440000000454511216215643013565 0ustar liggesusers## Likelihood function for FIML estimations .systemfitFimlLik <- function( mlCoef, mlVars ) { nObs <- sum( mlVars$nObsEq ) nEq <- length( mlVars$nObsEq ) if( length( mlCoef ) != ncol( mlVars$xMat ) ){ stop( "internal error: argument 'mlCoef' has length ", length( mlCoef ), " but must have length ", ncol( mlVars$xMat ) ) } mlResids <- mlVars$yVec - mlVars$xMat %*% mlCoef mlSigma <- .calcResidCov( resids = mlResids, methodResidCov = mlVars$methodResidCov, validObsEq = mlVars$validObsEq, nCoefEq = mlVars$nCoefEq, xEq = mlVars$xEq, centered = mlVars$centerResiduals, diag = FALSE, solvetol = mlVars$solvetol ) likValue <- - nObs * log( 2 * pi ) - ( nObs / 2 ) * log( det( mlSigma ) ) - ( 1 / 2 ) * .calcXtOmegaInv( mlResids, mlSigma, validObsEq = mlVars$validObsEq, solvetol = mlVars$solvetol ) %*% mlResids return( likValue ) } ## FIML estimation .systemfitFiml <- function( systemfitCall, nObsEq, validObsEq, nCoefEq, yVec, xMat, xEq, methodResidCov, centerResiduals, solvetol, startCoef = "ITSUR" ) { nObs <- sum( nObsEq ) nEq <- length( nObsEq ) # starting values if( startCoef %in% c( "OLS", "SUR", "ITSUR" ) ) { if( startCoef == "OLS" ) { systemfitCall$method <- "OLS" } else if( startCoef == "SUR" ) { systemfitCall$method <- "SUR" systemfitCall$maxiter <- 1 } else if( startCoef == "ITSUR" ) { systemfitCall$method <- "SUR" systemfitCall$maxiter <- 500 } startResult <- eval( systemfitCall ) startCoef <- startResult$b } # variables passed to .systemfitFimlLik mlVars <- list() mlVars$nObsEq <- nObsEq mlVars$validObsEq <- validObsEq mlVars$nCoefEq <- nCoefEq mlVars$yVec <- yVec mlVars$xMat <- xMat mlVars$xEq <- xEq mlVars$methodResidCov <- methodResidCov mlVars$centerResiduals <- centerResiduals mlVars$sollvetol <- solvetol # list for results of ML estimation mlResult <- list() mlResult$optim <- optim( startCoef, .systemfitFimlLik, method = "BFGS", control = list( fnscale = -1 ), mlVars = mlVars ) # methods: "BFGS" "Nelder-Mead" mlResult$coefficients <- mlResult$optim$par mlResult$coefCov <- diag( 1, length( mlResult$coefficients ) ) mlResult$resids <- yVec - xMat %*% mlResult$coefficients return( mlResult ) } systemfit/R/systemfit.R0000644000176200001440000011163614305172153014665 0ustar liggesusers### $Id: systemfit.R 1178 2022-09-04 18:54:35Z arne $ ### ### Simultaneous Equation Estimation for R ### ### Copyright 2002-2004 Jeff D. Hamann ### Arne Henningsen ### ### This file is part of the nlsystemfit library for R and related languages. ### It is made available under the terms of the GNU General Public ### License, version 2, or at your option, any later version, ### incorporated herein by reference. ### ### This program is distributed in the hope that it will be ### useful, but WITHOUT ANY WARRANTY; without even the implied ### warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR ### PURPOSE. See the GNU General Public License for more ### details. ### ### You should have received a copy of the GNU General Public ### License along with this program; if not, write to the Free ### Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, ### MA 02111-1307, USA systemfit <- function( formula, method = "OLS", inst=NULL, data=list(), restrict.matrix = NULL, restrict.rhs = NULL, restrict.regMat = NULL, pooled = FALSE, control = systemfit.control( ... ), ... ) { ## determine whether we have panel date and thus a panel-like model panelLike <- inherits(data, c("pdata.frame", "plm.dim")) ## checking argument 'formula' if( panelLike ){ if( !inherits( formula, "formula" ) ){ stop( "argument 'formula' must be an object of class 'formula'", " for panel-like models" ) } } else { # single-equation models if( inherits( formula, "formula" ) ){ formula <- list( formula ) } else if( inherits( formula, "list" ) ){ if( !all( sapply( formula, function(x) inherits( x, "formula" ) ) ) ){ stop( "the list of argument 'formula' must", " contain only objects of class 'formula'" ) } } else { stop( "argument 'formula' must be an object of class 'formula'", " or a list of objects of class 'formula'" ) } } ## checking argument 'method' if(!( method %in% c( "OLS", "WLS", "SUR", "2SLS", "W2SLS", "3SLS", "LIML", "FIML" ) ) ){ stop( "The method must be 'OLS', 'WLS', 'SUR',", " '2SLS', 'W2SLS', or '3SLS'" ) } ## prepare model and data for panel-like models if( panelLike ) { if( !is.null( restrict.regMat ) && pooled ){ stop( "argument 'restrict.regMat' cannot be used for pooled estimation", " of panel-like data" ) } result <- .systemfitPanel( formula = formula, inst = inst, data = data, pooled = pooled ) data <- result$wideData formula <- result$eqnSystem inst <- result$instSystem if( pooled ){ restrict.regMat <- result$restrict.regMat } } ## checking argument 'inst' if( method %in% c( "2SLS", "W2SLS", "3SLS" ) ){ if( is.null( inst ) ) { stop( "The methods '2SLS', 'W2SLS', and '3SLS' need instruments" ) } else if( inherits( inst, "formula" ) ){ if( length( inst ) != 2 ){ stop( "argument 'inst' must be a one-sided formula" ) } inst <- lapply( c( 1:length( formula ) ), function(x) inst ) } else if( inherits( inst, "list" ) ){ if( length( inst ) != length( formula ) ){ stop( "if different instruments are specified for each equation,", " the length of argument 'inst' must be equal to the number", " of equations" ) } if( !is.null( names( inst ) ) && !is.null( names( formula ) ) ){ if( any( names( inst ) != names( formula ) ) ){ warning( "names of formulas for instruments (argument 'inst')", " are not equal to names of equations (argument 'formula')" ) } } if( !all( sapply( inst, function(x) inherits( x, "formula" ) ) ) ){ stop( "the list of argument 'inst' must", " contain only objects of class 'formula'" ) } if( !all( lapply( inst, length ) == 2 ) ){ stop( "the list of argument 'inst' must", " contain only one-sided formulas" ) } } else { stop( "argument 'inst' must be an object of class 'formula'", " or a list of objects of class 'formula'" ) } } else { if( !is.null( inst ) ) { warning( "The methods 'OLS', 'WLS', and 'SUR' do not need instruments;", " ignoring argument 'inst'" ) inst <- NULL } } ## default value of argument 'singleEqSigma' if( is.null( control$singleEqSigma ) ) { control$singleEqSigma <- ( is.null( restrict.matrix ) & is.null( restrict.regMat ) ) } ## checking argument 'pooled' if( !is.logical( pooled ) || length( pooled ) != 1 ){ stop( "argument 'pooled' must be logical" ) } results <- list() # results to be returned results$eq <- list() # results for the individual equations iter <- NULL # number of iterations nEq <- length( formula ) # number of equations ssr <- numeric( nEq ) # sum of squared residuals of each equation sigma <- numeric( nEq ) # estimated sigma (std. dev. of residuals) of each equation if( is.null( names( formula ) ) ) { eqnLabels <- paste( "eq", c( 1:nEq ), sep = "" ) } else { eqnLabels <- names( formula ) if( sum( regexpr( " |_", eqnLabels ) != -1 ) > 0 ) { stop( "equation labels may not contain blanks (' ') or underscores ('_')" ) } } results$call <- match.call() # get the original call ## prepare y vectors and X matrices for each equation modelFrame <- .prepareData.systemfit( data ) # list of terms objects of each equation termsEq <- list() # terms and model frames for the individual equations modelFrameEq <- list() # list of evaluated model frames of each equation evalModelFrameEq <- list() # list for vectors of endogenous variables in each equation yVecEq <- list() # list for matrices of regressors in each equation xMatEq <- list() # number of exogenous variables /(unrestricted) coefficients in each equation nCoefEq <- numeric( nEq ) # names of observations of each equation (with observations with NAs) obsNamesNaEq <- list() # names of coefficients coefNames <- NULL # names of coefficients of each equation coefNamesEq <- list() # prepare data for individual equations for(i in 1:nEq ) { modelFrameEq[[ i ]] <- modelFrame modelFrameEq[[ i ]]$formula <- formula[[ i ]] evalModelFrameEq[[ i ]] <- eval( modelFrameEq[[ i ]] ) termsEq[[ i ]] <- attr( evalModelFrameEq[[ i ]], "terms" ) weights <- model.extract( evalModelFrameEq[[ i ]], "weights" ) yVecEq[[i]] <- model.extract( evalModelFrameEq[[ i ]], "response" ) xMatEq[[i]] <- model.matrix( termsEq[[ i ]], evalModelFrameEq[[ i ]] ) obsNamesNaEq[[ i ]] <- rownames( xMatEq[[ i ]] ) nCoefEq[i] <- ncol(xMatEq[[i]]) cNamesEq <- NULL for(j in 1:nCoefEq[i]) { xjName <- colnames( xMatEq[[ i ]] )[ j ] if( panelLike && xjName != "(Intercept)" ){ coefNames <- c( coefNames, xjName ) cNamesEq <- c( cNamesEq, sub( paste( "^", eqnLabels[ i ], "_", sep = "" ), "", xjName ) ) } else { coefNames <- c( coefNames, paste( eqnLabels[ i ], xjName, sep = "_" ) ) cNamesEq <- c( cNamesEq, xjName ) } } coefNamesEq[[ i ]] <- cNamesEq } rm( modelFrameEq, xjName, cNamesEq ) ## prepare Z matrices of instruments for each equation if( !is.null( inst ) ) { # list of terms objects of instruments of each equation termsInst <- list() # model frame of instruments modelFrameInst <- list() # evaluated model frame of instruments evalModelFrameInst <- list() # list for matrices of instruments in each equation zMatEq <- list() # prepare data for individual equations for(i in 1:nEq) { modelFrameInst[[ i ]] <- modelFrame modelFrameInst[[ i ]]$formula <- inst[[ i ]] evalModelFrameInst[[ i ]] <- eval( modelFrameInst[[ i ]] ) termsInst[[ i ]] <- attr( evalModelFrameInst[[ i ]], "terms" ) zMatEq[[i]] <- model.matrix( termsInst[[ i ]], evalModelFrameInst[[ i ]] ) } } ## check if all endogenous variables, regressors, and instruments ## have the same number of observations (including observations with NAs) # total number of observations per equation (including NAs) nObsWithNa <- length( yVecEq[[ 1 ]] ) for( i in 1:nEq ){ if( nObsWithNa != length( yVecEq[[ i ]] ) ) { stop( "all equations must have the same number of observations", " (including observations with NAs)", " but the endogenous variable of equation 1 has ", nObsWithNa, " observations", " while the endogenous variable of equation ", i, " has ", length( yVecEq[[ i ]] ), " observations" ) } if( nObsWithNa != nrow( xMatEq[[ i ]] ) ) { stop( "the regressors of each equation must have the same number", " of observations as the corresponding endogenous variable", " (including observations with NAs)", " but the regressors of equation ", i, " have ", nrow( xMatEq[[ i ]] ), " observations", " while the endogenous variable of this equation has ", length( yVecEq[[ i ]] ), " observations" ) } if( !is.null( inst ) ) { if( nObsWithNa != nrow( zMatEq[[ i ]] ) ) { stop( "the instrumental variables of each equation must have", " the same number of observations as the corresponding regressors", " (including observations with NAs)", " but the instrumental variables of equation ", i, " have ", nrow( zMatEq[[ i ]] ), " observations", " while the regressors of this equation have ", nrow( xMatEq[[ i ]] ), " observations" ) } } } ## determine valid observations of each equation # which observations in each equation have no NAs validObsEq <- matrix( NA, nrow = nObsWithNa, ncol = nEq ) for( i in 1:nEq ){ validObsEq[ , i ] <- !is.na( yVecEq[[ i ]] ) & rowSums( is.na( xMatEq[[ i ]] ) ) == 0 if( !is.null( inst ) ) { validObsEq[ , i ] <- validObsEq[ , i ] & rowSums( is.na( zMatEq[[ i ]] ) ) == 0 } } ## check if the system of equations is unbalanced # which observations have no NAs in all equations validObsAll <- rowSums( !validObsEq ) == 0 unbalanced <- FALSE for( i in 1:nEq ) { if( any( validObsEq[ !validObsAll, i ] ) ) { unbalanced <- TRUE } } if( unbalanced ) { warning( "the estimation of systems of equations with unequal numbers", " of observations has not been thoroughly tested yet" ) } rm( validObsAll, unbalanced ) ## remove all observations with NAs for( i in 1:nEq ) { # vectors of endogenous variables yVecEq[[ i ]] <- yVecEq[[ i ]][ validObsEq[ , i ] ] # matrices of regressors attrAssign <- attributes( xMatEq[[ i ]] )$assign xMatEq[[ i ]] <- xMatEq[[ i ]][ validObsEq[ , i ], , drop = FALSE ] attributes( xMatEq[[ i ]] )$assign <- attrAssign # matrices of instrumental variables if( !is.null( inst ) ) { zMatEq[[ i ]] <- zMatEq[[ i ]][ validObsEq[ , i ], , drop = FALSE ] } } rm( attrAssign ) ## prepare matrices for using the Matrix package if( control$useMatrix ){ # attributes of the model matrices xMatEqAttr <- list() for( i in 1:nEq ) { xMatEqAttr[[ i ]] <- attributes( xMatEq[[i]] ) xMatEq[[ i ]] <- as( xMatEq[[ i ]], "denseMatrix") if( !is.null( inst ) ) { zMatEq[[ i ]] <- as( zMatEq[[ i ]], "denseMatrix") } } } # number of observations in each equation nObsEq <- numeric( nEq ) # names of observations of each equation (without observations with NAs) obsNamesEq <- list() for( i in 1:nEq ){ obsNamesEq[[ i ]] <- rownames( xMatEq[[ i ]] ) nObsEq[i] <- length( yVecEq[[i]] ) } # stacked vector of all endogenous variables yVecAll <- matrix( 0, 0, 1 ) for( i in 1:nEq ) { yVecAll <- c(yVecAll,yVecEq[[i]]) } # stacked matrices of all regressors xMatAll <- .stackMatList( xMatEq, way = "diag", useMatrix = control$useMatrix ) # impose restrictions via argument 'restrict.regMat' if( !is.null( restrict.regMat ) ) { # checking matrix to modify (post-multiply) the regressor matrix (restrict.regMat) if( !is.matrix( restrict.regMat ) ) { stop( "argument 'restrict.regMat' must be a matrix" ) } if( nrow( restrict.regMat ) != sum( nCoefEq ) ){ stop( "argument 'restrict.regMat' must be a matrix with number of rows", " equal to the number of all regressors [in this model: ", sum( nCoefEq ), "]" ) } # default names for modified regressors and their coefficients if( is.null( colnames( restrict.regMat ) ) ){ colnames( restrict.regMat ) <- paste( "C", c( 1:ncol( restrict.regMat ) ), sep = "" ) } # default rownames for matrix to modify regressors if( is.null( rownames( restrict.regMat ) ) ){ rownames( restrict.regMat ) <- coefNames } # modify regressor matrix (by restrict.regMat) XU <- xMatAll xMatAll <- XU %*% restrict.regMat if( control$useMatrix ){ xMatAll <- as( xMatAll, "CsparseMatrix" ) } } # fitted values of regressors for IV estimations if( !is.null( inst ) ) { # stacked matrices of all instruments zMatAll <- .stackMatList( zMatEq, way = "diag", useMatrix = control$useMatrix ) # fitted values of all regressors xMatHatAll <- calcFittedRegMat( xMatAll = xMatAll, zMatEq = zMatEq, nEq = nEq, nObsEq = nObsEq, useMatrix = control$useMatrix, solvetol = control$solvetol ) } # checking and modifying parameter restrictions coefNamesModReg <- if( is.null( restrict.regMat ) ) coefNames else colnames( restrict.regMat ) if( is.character( restrict.matrix ) ) { R.restr <- car::makeHypothesis( coefNamesModReg, restrict.matrix, restrict.rhs ) if( is.null( dim( R.restr ) ) ){ R.restr <- t( R.restr ) } q.restr <- R.restr[ , ncol( R.restr ), drop = FALSE ] R.restr <- R.restr[ , -ncol( R.restr ), drop = FALSE ] } else if( !is.null( restrict.matrix ) ) { if( is.null( dim( restrict.matrix ) ) ) { R.restr <- t( restrict.matrix ) } else { R.restr <- restrict.matrix } if( is.null( restrict.rhs ) ) { q.restr <- matrix( 0, nrow( restrict.matrix ) ,1 ) } else { if( is.null( dim( restrict.rhs ) ) ) { q.restr <- matrix( restrict.rhs, ncol = 1 ) } else { q.restr <- restrict.rhs } } } else { R.restr <- NULL if( !is.null( restrict.rhs ) ) { warning( "ignoring argument 'restrict.rhs',", " because argument 'restrict.matrix' is not specified" ) } q.restr <- restrict.rhs } # row names and column names of restriction matrix and vector if( !is.null( R.restr ) ){ if( is.null( rownames( R.restr ) ) ) { rownames( R.restr ) <- car::printHypothesis( R.restr, q.restr, coefNamesModReg ) } if( is.null( colnames( R.restr ) ) ) { colnames( R.restr ) <- coefNamesModReg } if( is.null( rownames( q.restr ) ) ) { rownames( q.restr ) <- car::printHypothesis( R.restr, q.restr, coefNamesModReg ) } if( is.null( colnames( q.restr ) ) ) { colnames( q.restr ) <- "*rhs*" } } nObsAll <- sum( nObsEq ) # total number of observations of all equations nCoefAll <- sum( nCoefEq ) # total number of exogenous variables/(unrestricted) coefficients in all equations nCoefLiAll <- nCoefAll # total number of linear independent coefficients in all equations nCoefLiEq <- nCoefEq # total number of linear independent coefficients in each equation if(!is.null(restrict.regMat)) { nCoefLiAll <- nCoefLiAll - ( nrow( restrict.regMat ) - ncol( restrict.regMat ) ) for(i in 1:nEq) { nCoefLiEq[i] <- ncol(xMatAll) for(j in 1: ncol(xMatAll) ) { if(sum(xMatAll[(1+sum(nObsEq[1:i])-nObsEq[i]):(sum(nObsEq[1:i])),j]^2)==0) { nCoefLiEq[i] <- nCoefLiEq[i]-1 } } } } if(!is.null(R.restr)) { nCoefLiAll <- nCoefLiAll - nrow(R.restr) if(is.null(restrict.regMat)) { for(j in 1:nrow(R.restr)) { for(i in 1:nEq) { # search for restrictions that are NOT cross-equation if( sum( R.restr[ j, (1+sum(nCoefEq[1:i])-nCoefEq[i]):(sum(nCoefEq[1:i]))]^2) == sum(R.restr[j,]^2)) { nCoefLiEq[i] <- nCoefLiEq[i]-1 } } } } } df <- nObsEq - nCoefLiEq # degress of freedom of each equation ## only for OLS, WLS and SUR estimation if( method %in% c( "OLS", "WLS", "SUR" ) ) { if(is.null(R.restr)) { coef <- solve( crossprod( xMatAll ), crossprod( xMatAll, yVecAll ), tol=control$solvetol ) # estimated coefficients } else { W <- .prepareWmatrix( crossprod( xMatAll ), R.restr, useMatrix = control$useMatrix ) V <- c( as.numeric( crossprod( xMatAll, yVecAll ) ), q.restr ) if( method == "OLS" || control$residCovRestricted ){ coef <- solve( W, V, tol=control$solvetol )[ 1:ncol(xMatAll) ] } else { coef <- solve( crossprod( xMatAll ), crossprod( xMatAll, yVecAll ), tol = control$solvetol ) } } } ## only for OLS estimation if(method=="OLS") { resids <- yVecAll - xMatAll %*% coef # residuals if(control$singleEqSigma) { rcov <- .calcResidCov( resids, methodResidCov = control$methodResidCov, validObsEq = validObsEq, nCoefEq = nCoefLiEq, xEq = xMatEq, diag = TRUE, centered = control$centerResiduals, useMatrix = control$useMatrix, solvetol = control$solvetol ) # residual covariance matrix coefCov <- .calcGLS( xMat = xMatAll, R.restr = R.restr, q.restr = q.restr, sigma = rcov, validObsEq = validObsEq, useMatrix = control$useMatrix, solvetol = control$solvetol ) # coefficient covariance matrix } else { s2 <- .calcSigma2( resids, nObs = nObsAll, nCoef = nCoefLiAll, methodResidCov = control$methodResidCov ) # sigma squared if(is.null(R.restr)) { coefCov <- s2 * solve( crossprod( xMatAll ), tol=control$solvetol ) # coefficient covariance matrix } else { coefCov <- s2 * solve( W, tol=control$solvetol )[1:ncol(xMatAll),1:ncol(xMatAll)] # coefficient covariance matrix } } } ## only for WLS estimation if( method %in% c( "WLS" ) || ( method %in% c( "SUR" ) && control$residCovWeighted ) ) { coefOld <- coef # coefficients of previous step coefDiff <- coef # difference of coefficients between this and previous step iter <- 0 while((sum(coefDiff^2)/sum(coefOld^2))^0.5>control$tol & iter < control$maxiter^( method == "WLS" ) ) { iter <- iter+1 coefOld <- coef # coefficients of previous step resids <- yVecAll - xMatAll %*% coef # residuals rcov <- .calcResidCov( resids, methodResidCov = control$methodResidCov, validObsEq = validObsEq, nCoefEq = nCoefLiEq, xEq = xMatEq, diag = TRUE, centered = control$centerResiduals, useMatrix = control$useMatrix, solvetol = control$solvetol ) coef <- .calcGLS( xMat = xMatAll, yVec = yVecAll, R.restr = R.restr, q.restr = q.restr, sigma = rcov, validObsEq = validObsEq, useMatrix = control$useMatrix, solvetol = control$solvetol ) coefDiff <- coef - coefOld # difference of coefficients between this and previous step } coefCov <- .calcGLS( xMat = xMatAll, R.restr = R.restr, q.restr = q.restr, sigma = rcov, validObsEq = validObsEq, useMatrix = control$useMatrix, solvetol = control$solvetol ) resids <- yVecAll - xMatAll %*% coef # residuals } ## only for SUR estimation if( method %in% c( "SUR" ) ) { coefOld <- coef # coefficients of previous step coefDiff <- coef # difference of coefficients between this and previous step iter <- 0 while((sum(coefDiff^2)/sum(coefOld^2))^0.5>control$tol & iter < control$maxiter) { iter <- iter+1 coefOld <- coef # coefficients of previous step resids <- yVecAll-xMatAll%*%coef # residuals rcov <- .calcResidCov( resids, methodResidCov = control$methodResidCov, validObsEq = validObsEq, nCoefEq = nCoefLiEq, xEq = xMatEq, centered = control$centerResiduals, useMatrix = control$useMatrix, solvetol = control$solvetol ) coef <- .calcGLS( xMat = xMatAll, yVec = yVecAll, R.restr = R.restr, q.restr = q.restr, sigma = rcov, validObsEq = validObsEq, useMatrix = control$useMatrix, solvetol = control$solvetol ) # coefficients coefDiff <- coef - coefOld # difference of coefficients between this and previous step } coefCov <- .calcGLS( xMat = xMatAll, R.restr = R.restr, q.restr = q.restr, sigma = rcov, validObsEq = validObsEq, useMatrix = control$useMatrix, solvetol = control$solvetol ) # final step coefficient covariance matrix resids <- yVecAll - xMatAll %*% coef # residuals } ## only for 2SLS, W2SLS and 3SLS estimation if( method %in% c( "2SLS", "W2SLS", "3SLS" ) ) { if(is.null(R.restr)) { coef <- solve( crossprod( xMatHatAll ), crossprod( xMatHatAll, yVecAll ), tol=control$solvetol ) # 2nd stage coefficients } else { W <- .prepareWmatrix( crossprod(xMatHatAll), R.restr, useMatrix = control$useMatrix ) V <- c( as.numeric( crossprod( xMatHatAll, yVecAll ) ), q.restr ) if( method == "2SLS" || control$residCovRestricted ){ coef <- solve( W, V, tol=control$solvetol )[ 1:ncol(xMatAll) ] } else { coef <- solve( crossprod( xMatHatAll ), crossprod( xMatHatAll, yVecAll ), tol = control$solvetol ) } } b2 <- coef } ## only for 2SLS estimation if(method=="2SLS") { resids <- yVecAll - xMatAll %*% coef # residuals if(control$singleEqSigma) { rcov <- .calcResidCov( resids, methodResidCov = control$methodResidCov, validObsEq = validObsEq, nCoefEq = nCoefLiEq, xEq = xMatEq, diag = TRUE, centered = control$centerResiduals, useMatrix = control$useMatrix, solvetol = control$solvetol ) coefCov <- .calcGLS( xMat = xMatHatAll, R.restr = R.restr, q.restr = q.restr, sigma = rcov, validObsEq = validObsEq, useMatrix = control$useMatrix, solvetol = control$solvetol ) # coefficient covariance matrix } else { s2 <- .calcSigma2( resids, nObs = nObsAll, nCoef = nCoefLiAll, methodResidCov = control$methodResidCov ) # sigma squared if(is.null(R.restr)) { coefCov <- s2 * solve( crossprod( xMatHatAll ), tol=control$solvetol ) # coefficient covariance matrix } else { coefCov <- s2 * solve( W, tol=control$solvetol )[1:ncol(xMatAll),1:ncol(xMatAll)] # coeff. covariance matrix } } } ## only for W2SLS estimation if( method %in% c( "W2SLS" ) || ( method %in% c( "3SLS" ) && control$residCovWeighted ) ) { coefOld <- coef # coefficients of previous step coefDiff <- coef # difference of coefficients between this and previous step iter <- 0 while((sum(coefDiff^2)/sum(coefOld^2))^0.5>control$tol & iter < control$maxiter^( method == "W2LS" ) ) { iter <- iter+1 coefOld <- coef # coefficients of previous step resids <- yVecAll-xMatAll%*%coef # residuals rcov <- .calcResidCov( resids, methodResidCov = control$methodResidCov, validObsEq = validObsEq, nCoefEq = nCoefLiEq, xEq = xMatEq, diag = TRUE, centered = control$centerResiduals, useMatrix = control$useMatrix, solvetol = control$solvetol ) coef <- .calcGLS( xMat = xMatHatAll, yVec = yVecAll, R.restr = R.restr, q.restr = q.restr, sigma = rcov, validObsEq = validObsEq, useMatrix = control$useMatrix, solvetol = control$solvetol ) # (unrestr.) coeffic. coefDiff <- coef - coefOld # difference of coefficients between this and previous step } coefCov <- .calcGLS( xMat = xMatHatAll, R.restr = R.restr, q.restr = q.restr, sigma = rcov, validObsEq = validObsEq, useMatrix = control$useMatrix, solvetol = control$solvetol ) # coefficient covariance matrix resids <- yVecAll - xMatAll %*% coef # residuals } ## only for 3SLS estimation if( method %in% c( "3SLS" ) ) { coefOld <- coef # coefficients of previous step coefDiff <- coef # difference of coefficients between this and previous step iter <- 0 while((sum(coefDiff^2)/sum(coefOld^2))^0.5>control$tol & iter < control$maxiter) { iter <- iter+1 coefOld <- coef # coefficients of previous step resids <- yVecAll-xMatAll%*%coef # residuals rcov <- .calcResidCov( resids, methodResidCov = control$methodResidCov, validObsEq = validObsEq, nCoefEq = nCoefLiEq, xEq = xMatEq, centered = control$centerResiduals, useMatrix = control$useMatrix, solvetol = control$solvetol ) if(control$method3sls=="GLS") { coef <- .calcGLS( xMat = xMatHatAll, yVec = yVecAll, R.restr = R.restr, q.restr = q.restr, sigma = rcov, validObsEq = validObsEq, useMatrix = control$useMatrix, solvetol = control$solvetol ) # (unrestr.) coeffic. } if(control$method3sls=="IV") { coef <- .calcGLS( xMat = xMatHatAll, xMat2 = xMatAll, yVec = yVecAll, R.restr = R.restr, q.restr = q.restr, sigma = rcov, validObsEq = validObsEq, useMatrix = control$useMatrix, solvetol = control$solvetol ) # (unrestr.) coeffic. } if(control$method3sls=="GMM") { ZtOmega <- .calcXtOmegaInv( xMat = zMatAll, sigma = rcov, validObsEq = validObsEq, invertSigma = FALSE, useMatrix = control$useMatrix, solvetol = control$solvetol ) if(is.null(R.restr)) { coef <- as.numeric( solve( crossprod( xMatAll, zMatAll ) %*% solve( ZtOmega %*% zMatAll, crossprod( zMatAll, xMatAll ), tol=control$solvetol ), crossprod( xMatAll, zMatAll ) %*% solve( ZtOmega %*% zMatAll, crossprod( zMatAll, yVecAll ), tol=control$solvetol ), tol=control$solvetol ) ) } else { W <- .prepareWmatrix( crossprod( xMatAll, zMatAll ) %*% solve( ZtOmega %*% zMatAll, crossprod( zMatAll, xMatAll ), tol=control$solvetol ), R.restr, useMatrix = control$useMatrix ) V <- c( as.numeric( crossprod( xMatAll, zMatAll ) %*% solve( ZtOmega %*% zMatAll, crossprod( zMatAll, yVecAll ), tol = control$solvetol ) ), q.restr ) Winv <- solve( W, tol=control$solvetol ) coef <- ( Winv %*% V )[1:ncol(xMatAll),] # restricted coefficients } } if(control$method3sls=="Schmidt") { xMatHatOmegaInv <- .calcXtOmegaInv( xMat = xMatHatAll, sigma = rcov, validObsEq = validObsEq, useMatrix = control$useMatrix, solvetol = control$solvetol ) if(is.null(R.restr)) { coef <- as.numeric( solve( crossprod( xMatHatAll, t( xMatHatOmegaInv ) ), xMatHatOmegaInv %*% zMatAll %*% solve( crossprod( zMatAll ), crossprod( zMatAll, yVecAll), tol=control$solvetol ), tol=control$solvetol ) ) # (unrestr.) coeffic. } else { W <- .prepareWmatrix( crossprod( xMatHatAll, t( xMatHatOmegaInv ) ), R.restr, useMatrix = control$useMatrix ) V <- c( as.numeric( xMatHatOmegaInv %*% zMatAll %*% solve( crossprod( zMatAll ), crossprod( zMatAll, yVecAll ), tol = control$solvetol ) ), q.restr ) Winv <- solve( W, tol=control$solvetol ) coef <- ( Winv %*% V )[1:ncol(xMatAll),] # restricted coefficients } } if(control$method3sls=="EViews") { coef <- b2 + .calcGLS( xMat = xMatHatAll, yVec = ( yVecAll - xMatAll %*% b2 ), R.restr = R.restr, q.restr = q.restr, sigma = rcov, validObsEq = validObsEq, useMatrix = control$useMatrix, solvetol = control$solvetol ) # (unrestr.) coeffic. } coefDiff <- coef - coefOld # difference of coefficients between this and previous step } if(control$method3sls=="GLS") { coefCov <- .calcGLS( xMat = xMatHatAll, R.restr = R.restr, q.restr = q.restr, sigma = rcov, validObsEq = validObsEq, useMatrix = control$useMatrix, solvetol = control$solvetol ) # coefficient covariance matrix } if(control$method3sls=="IV") { coefCov <- .calcGLS( xMat = xMatHatAll, xMat2 = xMatAll, R.restr = R.restr, q.restr = q.restr, sigma = rcov, validObsEq = validObsEq, useMatrix = control$useMatrix, solvetol = control$solvetol ) } if(control$method3sls=="GMM") { if(is.null(R.restr)) { coefCov <- solve( crossprod( xMatAll, zMatAll ) %*% solve( ZtOmega %*% zMatAll, crossprod( zMatAll, xMatAll ), tol=control$solvetol ), tol=control$solvetol ) # final step coefficient covariance matrix } else { coefCov <- Winv[1:ncol(xMatAll),1:ncol(xMatAll)] # coefficient covariance matrix } } if(control$method3sls=="Schmidt") { xMatHatOmegaInv <- .calcXtOmegaInv( xMat = xMatHatAll, sigma = rcov, validObsEq = validObsEq, useMatrix = control$useMatrix, solvetol = control$solvetol ) PH <- zMatAll %*% solve( crossprod( zMatAll ), t( zMatAll ), tol=control$solvetol ) PHOmega <- .calcXtOmegaInv( xMat = t( PH ), sigma = rcov, validObsEq = validObsEq, invertSigma = FALSE, useMatrix = control$useMatrix, solvetol = control$solvetol ) if(is.null(R.restr)) { coefCov <- solve( xMatHatOmegaInv %*% xMatHatAll, xMatHatOmegaInv %*% PHOmega %*% PH %*% crossprod( xMatHatOmegaInv, solve( xMatHatOmegaInv %*% xMatHatAll, tol=control$solvetol ) ), tol=control$solvetol ) # final step coefficient covariance matrix } else { VV <- .stackMatList( list( xMatHatOmegaInv %*% PHOmega %*% PH %*% t( xMatHatOmegaInv ), matrix( 0, nrow( R.restr ), nrow( R.restr ) ) ), "diag", useMatrix = control$useMatrix ) coefCov <- ( Winv %*% VV %*% Winv )[ 1:ncol(xMatAll), 1:ncol(xMatAll) ] # coefficient covariance matrix } } if(control$method3sls=="EViews") { coefCov <- .calcGLS( xMat = xMatHatAll, R.restr = R.restr, q.restr = q.restr, sigma = rcov, validObsEq = validObsEq, useMatrix = control$useMatrix, solvetol = control$solvetol ) # final step coefficient covariance matrix } resids <- yVecAll - xMatAll %*% coef # residuals } ## FIML estimation if( method == "FIML" ) { fimlResult <- .systemfitFiml( systemfitCall = results$call, nObsEq = nObsEq, validObsEq = validObsEq, nCoefEq = nCoefLiEq, yVec = yVecAll, xMat = xMatAll, xEq = xMatEq, methodResidCov = control$methodResidCov, centerResiduals = control$centerResiduals, solvetol = control$solvetol ) #print( fimlResult ) coef <- fimlResult$coefficients coefCov <- fimlResult$coefCov resids <- fimlResult$resids } ## for all estimation methods fitted.values <- xMatAll %*% coef # fitted endogenous values if(!is.null(restrict.regMat)) { coef <- restrict.regMat %*% coef coefCov <- restrict.regMat %*% coefCov %*% t(restrict.regMat) } ## equation wise results for(i in 1:nEq) { results$eq[[ i ]] <- list() results$eq[[ i ]]$eqnNo <- i # equation number results$eq[[ i ]]$eqnLabel <- eqnLabels[[i]] results$eq[[ i ]]$method <- method results$eq[[ i ]]$residuals <- rep( NA, nObsWithNa ) results$eq[[ i ]]$residuals[ validObsEq[ , i ] ] <- resids[ ( 1 + sum(nObsEq[1:i]) -nObsEq[i] ):( sum(nObsEq[1:i]) ) ] names( results$eq[[ i ]]$residuals ) <- obsNamesNaEq[[ i ]] results$eq[[ i ]]$coefficients <- drop( coef[(1+sum(nCoefEq[1:i])-nCoefEq[i]):(sum(nCoefEq[1:i]))] ) # estimated coefficients of equation i results$eq[[ i ]]$coefCov <- as.matrix( coefCov[(1+sum(nCoefEq[1:i])-nCoefEq[i]):(sum(nCoefEq[1:i])), (1+sum(nCoefEq[1:i])-nCoefEq[i]):(sum(nCoefEq[1:i]))] ) # covariance matrix of estimated coefficients of equation i # set names names( results$eq[[ i ]]$coefficients ) <- coefNamesEq[[ i ]] colnames( results$eq[[ i ]]$coefCov ) <- coefNamesEq[[ i ]] rownames( results$eq[[ i ]]$coefCov ) <- coefNamesEq[[ i ]] results$eq[[ i ]]$fitted.values <- rep( NA, nObsWithNa ) results$eq[[ i ]]$fitted.values[ validObsEq[ , i ] ] <- fitted.values[(1+sum(nObsEq[1:i])-nObsEq[i]):(sum(nObsEq[1:i]))] names( results$eq[[ i ]]$fitted.values ) <- obsNamesNaEq[[ i ]] results$eq[[ i ]]$terms <- termsEq[[ i ]] results$eq[[ i ]]$rank <- nCoefLiEq[i] # rank = number of linear independent coefficients results$eq[[ i ]]$nCoef.sys <- nCoefAll # total number of coefficients of the entire system results$eq[[ i ]]$rank.sys <- nCoefLiAll # rank = number of linear independent coefficients of the entire system results$eq[[ i ]]$df.residual <- df[i] # degrees of freedom of residuals results$eq[[ i ]]$df.residual.sys <- nObsAll- nCoefLiAll # degrees of freedom of residuals of the whole system if( control$y ){ results$eq[[ i ]]$y <- yVecEq[[i]] # vector of endogenous variables names( results$eq[[ i ]]$y ) <- obsNamesEq[[ i ]] } if( control$x ){ results$eq[[ i ]]$x <- as.matrix( xMatEq[[i]] ) if( control$useMatrix ){ attributes( results$eq[[ i ]]$x ) <- xMatEqAttr[[ i ]] } rownames( results$eq[[ i ]]$x ) <- obsNamesEq[[ i ]] } if( control$model ){ results$eq[[ i ]]$model <- evalModelFrameEq[[ i ]] # model frame of this equation rownames( results$eq[[ i ]]$model ) <- obsNamesNaEq[[ i ]] if( !is.null( inst ) ) { results$eq[[ i ]]$modelInst <- evalModelFrameInst[[ i ]] rownames( results$eq[[ i ]]$modelInst ) <- obsNamesNaEq[[ i ]] } } if( method %in% c( "2SLS", "W2SLS", "3SLS" ) ) { results$eq[[ i ]]$inst <- inst[[i]] results$eq[[ i ]]$termsInst <- termsInst[[i]] if( control$z ) { results$eq[[ i ]]$z <- zMatEq[[i]] # matrix of instrumental variables rownames( results$eq[[ i ]]$z ) <- obsNamesEq[[ i ]] } } class( results$eq[[ i ]] ) <- "systemfit.equation" } ## results of the total system # all estimated coefficients results$coefficients <- as.numeric( drop( coef ) ) names( results$coefficients ) <- coefNames # coefficients covariance matrix results$coefCov <- as.matrix( coefCov ) colnames( results$coefCov ) <- coefNames rownames( results$coefCov ) <- coefNames # residual covarance matrix used for estimation if( method %in% c( "WLS", "W2SLS", "SUR", "3SLS" ) ){ results$residCovEst <- as.matrix( rcov ) colnames( results$residCovEst ) <- eqnLabels rownames( results$residCovEst ) <- eqnLabels } # residual covarance matrix results$residCov <- .calcResidCov( resids, methodResidCov = control$methodResidCov, validObsEq = validObsEq, nCoefEq = nCoefLiEq, xEq = xMatEq, centered = control$centerResiduals, solvetol = control$solvetol ) colnames( results$residCov ) <- eqnLabels rownames( results$residCov ) <- eqnLabels results$method <- method results$rank <- nCoefLiAll # rank = total number of linear independent coefficients of all equations results$df.residual <- nObsAll - nCoefLiAll # degrees of freedom of the whole system results$iter <- iter results$restrict.matrix <- R.restr results$restrict.rhs <- q.restr results$restrict.regMat <- restrict.regMat results$control <- control results$panelLike <- panelLike class(results) <- "systemfit" results } systemfit/R/systemfit.control.R0000644000176200001440000000624411216215643016342 0ustar liggesuserssystemfit.control <- function( maxiter = 1, tol = 1e-5, methodResidCov = "geomean", centerResiduals = FALSE, residCovRestricted = TRUE, residCovWeighted = FALSE, method3sls = "GLS", singleEqSigma = NULL, useMatrix = TRUE, solvetol = .Machine$double.eps, model = TRUE, x = FALSE, y = FALSE, z = FALSE ) { result <- list() ## maxiter if( maxiter <= 0 || round( maxiter ) != maxiter ) { stop( "control parameter 'maxiter' must be a positive integer" ) } result$maxiter <- maxiter ## tol if( tol <= 0 || !is.numeric( tol ) || length( tol ) != 1 ) { stop( "control parameter 'tol' must be a positive scalar" ) } result$tol <- tol ## methodResidCov if( !( methodResidCov %in% c( "noDfCor", "geomean", "max", "Theil" ) ) ) { stop( "control parameter 'methodResidCov' must be either", " 'noDfCor', 'geomean', 'max', or 'Theil'" ) } result$methodResidCov <- methodResidCov ## centerResiduals if( !is.logical( centerResiduals ) || length( centerResiduals ) != 1 ) { stop( "control parameter 'centerResiduals' must be logical" ) } result$centerResiduals <- centerResiduals ## method3sls if( !( method3sls %in% c( "GLS", "IV", "GMM", "Schmidt", "EViews" ) ) ) { stop( "control parameter 'method3sls' must be either", " 'GLS', 'IV', 'GMM', 'Schmidt', or 'EViews'" ) } result$method3sls <- method3sls ## singleEqSigma if( ( !is.logical( singleEqSigma ) || length( singleEqSigma ) != 1 ) && !is.null( singleEqSigma ) ) { stop( "control parameter 'singleEqSigma' must be logical or NULL" ) } result$singleEqSigma <- singleEqSigma ## useMatrix if( !is.logical( useMatrix ) || length( useMatrix ) != 1 ) { stop( "control parameter 'useMatrix' must be logical" ) } result$useMatrix <- useMatrix ## solvetol if( solvetol <= 0 || !is.numeric( solvetol ) || length( solvetol ) != 1 ) { stop( "control parameter 'solvetol' must be a positive scalar" ) } result$solvetol <- solvetol ## residCovRestricted if( !is.logical( residCovRestricted ) || length( residCovRestricted ) != 1 ) { stop( "control parameter 'residCovRestricted' must be logical" ) } result$residCovRestricted <- residCovRestricted ## residCovWeighted if( !is.logical( residCovWeighted ) || length( residCovWeighted ) != 1 ) { stop( "control parameter 'residCovWeighted' must be logical" ) } result$residCovWeighted <- residCovWeighted ## model (returnModelFrame) if( !is.logical( model ) || length( model ) != 1 ) { stop( "control parameter 'model' must be logical" ) } result$model <- model ## x (returnModelMatrix) if( !is.logical( x ) || length( x ) != 1 ) { stop( "control parameter 'x' must be logical" ) } result$x <- x ## y (returnResponse) if( !is.logical( y ) || length( y ) != 1 ) { stop( "control parameter 'y' must be logical" ) } result$y <- y ## z (returnInstMatrix) if( !is.logical( z ) || length( z ) != 1 ) { stop( "control parameter 'z' must be logical" ) } result$z <- z return( result ) }systemfit/R/bread.systemfit.R0000644000176200001440000000135014406557155015743 0ustar liggesusersbread.systemfit <- function ( x, ... ) { if( !is.null( x$restrict.matrix ) || !is.null( x$restrict.rhs ) || !is.null( x$restrict.regMat ) ) { stop( "returning the 'bread' for models with restrictions", " has not yet been implemented.") } # model matrix if( is.null( x$eq[[1]]$inst ) ) { mm <- model.matrix( x ) } else { mm <- model.matrix( x, which = "xHat" ) } if( is.null( x$residCovEst ) ) { omegaInvXmat <- mm } else { omegaInvXmat <- t( .calcXtOmegaInv( xMat = mm, sigma = x$residCovEst, validObsEq = !is.na( residuals( x ) ), invertSigma = TRUE ) ) } result <- solve( crossprod( mm, omegaInvXmat ) / nrow( mm ) ) return( result ) }systemfit/R/stackMatList.R0000644000176200001440000000210614305165333015232 0ustar liggesusers.stackMatList <- function( matList, way, useMatrix = FALSE ){ if( way == "diag" ){ result <- matrix( 0, 0, 0 ) for( i in 1:length( matList ) ){ result <- rbind( cbind( result, matrix( 0, nrow( result ), ncol( matList[[ i ]] ) ) ), cbind( matrix( 0, nrow( matList[[ i ]] ), ncol( result ) ), as.matrix( matList[[ i ]] ) ) ) } } else if( way == "below" ) { result <- NULL for( i in 1:length( matList ) ){ result <- rbind( result, as.matrix( matList[[ i ]] ) ) } } if( useMatrix ){ result <- as( result, "CsparseMatrix" ) } return( result ) } .prepareWmatrix <- function( upperleft, R.restr, useMatrix = FALSE ){ if( nrow( R.restr ) == 1 ){ lowerRows <- c( R.restr, 0 ) } else { lowerRows <- cbind2( R.restr, matrix( 0, nrow( R.restr ), nrow( R.restr ) ) ) } result <- rbind2( cbind2( as.matrix( upperleft ), t(R.restr) ), lowerRows ) if( useMatrix ){ result <- as( result, "denseMatrix") } return( result ) } systemfit/R/smallMethods.R0000644000176200001440000001411012007015563015255 0ustar liggesusers## this function returns a vector of the ## cross-equation corrlations between eq i and eq j ## from the results set for equation ij correlation.systemfit <- function( results, eqni, eqnj ) { nCoefEq <- NULL for( i in 1:length( results$eq ) ) { nCoefEq <- c( nCoefEq, length( coef( results$eq[[ i ]] ) ) ) } cij <- vcov( results )[(1+sum(nCoefEq[1:eqni])-nCoefEq[eqni]):(sum(nCoefEq[1:eqni])), (1+sum(nCoefEq[1:eqnj])-nCoefEq[eqnj]):(sum(nCoefEq[1:eqnj]))] cii <- vcov( results )[(1+sum(nCoefEq[1:eqni])-nCoefEq[eqni]):(sum(nCoefEq[1:eqni])), (1+sum(nCoefEq[1:eqni])-nCoefEq[eqni]):(sum(nCoefEq[1:eqni]))] cjj <- vcov( results )[(1+sum(nCoefEq[1:eqnj])-nCoefEq[eqnj]):(sum(nCoefEq[1:eqnj])), (1+sum(nCoefEq[1:eqnj])-nCoefEq[eqnj]):(sum(nCoefEq[1:eqnj]))] rij <- NULL for( i in 1:nrow( residuals( results ) ) ) { xik <- model.matrix( results$eq[[eqni]] )[i,] xjk <- model.matrix( results$eq[[eqnj]] )[i,] top <- xik %*% cij %*% xjk bottom <- sqrt( ( xik %*% cii %*% xik ) * ( xjk %*% cjj %*% xjk ) ) rijk <- top / bottom rij <- rbind( rij, rijk ) } rij } ## determines the improvement of resultsj (3sls) over ## resultsi (2sls) for equation i and returns a matrix ## of the values, so you can examine the range, mean, etc se.ratio.systemfit <- function( resultsi, resultsj, eqni ) { ratio <- NULL for( i in 1:nrow( residuals( resultsi ) ) ) { xik <- model.matrix( resultsi$eq[[eqni]] )[i,] top <- sqrt( xik %*% vcov( resultsi$eq[[eqni]] ) %*% xik ) bottom <- sqrt( xik %*% vcov( resultsj$eq[[eqni]] ) %*% xik ) rk <- top / bottom ratio <- rbind( ratio, rk ) } ratio } ## return all coefficients coef.systemfit <- function( object, modified.regMat = FALSE, ... ) { if( modified.regMat ){ if( is.null( object$restrict.regMat ) ){ stop( "coefficients of the modified regressor matrix are not available,", " because argument 'restrict.regMat' has not been used in this estimation." ) } else { return( drop( solve( crossprod( object$restrict.regMat ), t( object$restrict.regMat ) %*% coef( object ) ) ) ) } } else { return( object$coefficients ) } } ## return all coefficients, std.errors, t-values and p-values coef.summary.systemfit <- function( object, modified.regMat = FALSE, ... ) { if( modified.regMat ){ if( is.null( object$coefModReg ) ){ stop( "coefficients of the modified regressor matrix are not available,", " because argument 'restrict.regMat' has not been used in this estimation." ) } else { return( object$coefModReg ) } } else { return( object$coefficients ) } } ## return the coefficients of a single equation coef.systemfit.equation <- function( object, ... ) { object$coefficients } ## return coefficients, std.errors, t-values and p-values of a single equation coef.summary.systemfit.equation <- function( object, ... ) { object$coefficients } ## return all residuals residuals.systemfit <- function( object, ... ) { result <- data.frame( obsNo = c( 1:length( residuals( object$eq[[1]] ) ) ) ) for( i in 1:length( object$eq ) ) { result[[ object$eq[[i]]$eqnLabel ]] <- residuals( object$eq[[i]] ) } result$obsNo <- NULL rownames( result ) <- names( residuals( object$eq[[ 1 ]] ) ) return( result ) } ## return residuals of a single equation residuals.systemfit.equation <- function( object, na.rm = FALSE, ... ) { if( na.rm ) { return( object$residuals[ !is.na( object$residuals ) ] ) } else { return( object$residuals ) } } ## return the variance covariance matrix of the coefficients vcov.systemfit <- function( object, modified.regMat = FALSE, ... ) { if( modified.regMat ){ if( is.null( object$restrict.regMat ) ){ stop( "coefficients of the modified regressor matrix", " and their covariance matrix are not available,", " because argument 'restrict.regMat' has not been used in this estimation." ) } else { txtxInv <- solve( crossprod( object$restrict.regMat ) ) result <- txtxInv %*% t( object$restrict.regMat ) %*% vcov( object ) %*% object$restrict.regMat %*% txtxInv return( result ) } } else { return( object$coefCov ) } } ## return the variance covariance matrix of the coefficients of a single equation vcov.systemfit.equation <- function( object, ... ) { object$coefCov } ## return the fitted values fitted.systemfit <- function( object, ... ) { nEq <- length( object$eq ) fitted.values <- matrix( NA, length( object$eq[[1]]$fitted.values ), nEq ) colnames( fitted.values ) <- as.character( 1:ncol( fitted.values ) ) for(i in 1:nEq ) { fitted.values[ , i ] <- object$eq[[ i ]]$fitted.values colnames( fitted.values )[ i ] <- object$eq[[ i ]]$eqnLabel } rownames( fitted.values ) <- names( fitted( object$eq[[ 1 ]] ) ) return( as.data.frame( fitted.values ) ) } ## return the fitted values of e single euation fitted.systemfit.equation <- function( object, na.rm = FALSE, ... ) { if( na.rm ) { return( object$fitted.values[ !is.na( object$fitted.values ) ] ) } else { return( object$fitted.values ) } } ## return model frame of the entire system model.frame.systemfit <- function( formula, ... ){ mfColNames <- NULL for( i in 1:length( formula$eq ) ) { mfi <- model.frame( formula$eq[[ i ]] ) if( i == 1 ) { result <- mfi } else { for( j in 1:ncol( mfi ) ) { if( ! names( mfi )[ j ] %in% names( result ) ) { result[[ names( mfi )[ j ] ]] <- mfi[ , j ] } } } } return( result ) } ## return model frame of a single equation model.frame.systemfit.equation <- function( formula, ... ){ if( !is.null( formula$model ) ) { result <- formula$model } else { stop( "returning model frame not possible. Please re-estimate", " the system with control variable 'model'", " set to TRUE" ) } return( result ) } systemfit/R/logLik.R0000644000176200001440000000355012565341730014057 0ustar liggesuserslogLik.systemfit <- function( object, residCovDiag = FALSE, ... ){ if( length( residCovDiag ) != 1 || any( !is.logical( residCovDiag ) ) ) { stop( "argument 'residCovDiag' must be a single logical value" ) } resid <- residuals( object ) residCov <- .calcResidCov( resid, "noDfCor" ) if( residCovDiag ) { residCov <- diag( diag( residCov ) ) } residCovInv <- solve( residCov ) resid <- as.matrix( resid ) nEq <- ncol( resid ) result <- 0 for( i in 1:nrow( resid ) ) { vEq <- !is.na( resid[ i, ] ) if( sum( vEq ) == nEq ) { result <- result - ( nEq / 2 ) * log( 2 * pi ) - ( 1 / 2 ) * log( det( residCov ) ) - ( 1 / 2 ) * resid[ i, , drop = FALSE ] %*% residCovInv %*% t( resid[ i, , drop = FALSE ] ) } else if( sum( vEq ) > 0 ) { nEq2 <- sum( vEq ) residCov2 <- residCov[ vEq, vEq, drop = FALSE ] - residCov[ vEq, !vEq, drop = FALSE ] %*% solve( residCov[ !vEq, !vEq, drop = FALSE ] ) %*% residCov[ !vEq, vEq, drop = FALSE ] residCov2Inv <- solve( residCov2 ) result <- result - ( nEq2 / 2 ) * log( 2 * pi ) - ( 1 / 2 ) * log( det( residCov2 ) ) - ( 1 / 2 ) * resid[ i, vEq, drop = FALSE ] %*% residCov2Inv %*% t( resid[ i, vEq, drop = FALSE ] ) } } if( object$method %in% c( "OLS", "2SLS" ) ){ nSigma <- 1 } else if( object$method %in% c( "WLS", "W2SLS" ) ){ nSigma <- nEq } else if( object$method %in% c( "SUR", "3SLS" ) ){ nSigma <- nEq * ( nEq + 1 ) / 2 } else { stop( "internal error: unknown estimation method '", object$method, "'" ) } attributes( result )$nobs <- df.residual( object ) + object$rank attributes( result )$df <- object$rank + nSigma class( result ) <- "logLik" return( result ) }systemfit/R/lrtest.R0000644000176200001440000000306713573245473014165 0ustar liggesusers## Likelihood Ratio Test lrtest.systemfit <- function( object, ... ) { thisCall <- match.call() if( !inherits( object, "systemfit" ) ){ stop( "argument 'object' must be of class 'systemfit'" ) } object$lrtest.systemfit.name <- deparse( substitute( object ) ) objectList <- list( ... ) if( length( objectList ) < 1 ){ stop( "at least one further argument ('...') must be provided" ) } if( !all( sapply( objectList, function(x) inherits( x, "systemfit" ) ) ) ){ stop( "all further arguments ('...') must be of class 'systemfit'" ) } dotsNames <- as.list( thisCall )[ -1 ] dotsNames$object <- NULL for( i in 1:length( objectList ) ){ objectList[[ i ]]$lrtest.systemfit.name <- deparse( dotsNames[[ i ]] ) } extractName <- function( object ){ return( object$lrtest.systemfit.name ) } result <- do.call( lrtest.default, c( list( object = object ), objectList, list( name = extractName ) ) ) for( i in 2:nrow( result ) ){ if( ( result[ i, "#Df" ] - result[ i - 1, "#Df" ] ) * ( result[ i, "LogLik" ] - result[ i - 1, "LogLik" ] ) < 0 ) { if( result[ i, "LogLik" ] > result[ i - 1, "LogLik" ] ) { compareLikelihood <- "larger" compareDf <- "less" } else { compareLikelihood <- "smaller" compareDf <- "more" } warning( "model '", i, "' has a ", compareLikelihood, " log-likelihood value than the ", compareDf, " restricted model '", i - 1, "'" ) } } return( result ) } systemfit/R/estfun.systemfit.R0000644000176200001440000000313514406557220016166 0ustar liggesusersestfun.systemfit <- function ( x, residFit = TRUE, ... ) { if( !is.null( x$restrict.matrix ) || !is.null( x$restrict.rhs ) || !is.null( x$restrict.regMat ) ) { stop( "returning the estimation function for models with restrictions", " has not yet been implemented.") } # residuals res <- unlist( residuals( x ) ) # model matrix if( is.null( x$eq[[1]]$inst ) ) { mm <- model.matrix( x ) } else { mm <- model.matrix( x, which = "xHat" ) if( residFit ) { res[ !is.na( res ) ] <- res[ !is.na( res ) ] + ( model.matrix( x ) - mm ) %*% coef( x ) # resid_fit = y - x_fit b # resid = y - x b # resid_fit - resid = - x_fit b + x b # resid_fit = resid + ( x - x_fit ) b } } if( sum( !is.na( res ) ) != nrow( mm ) ) { stop( "internal error: the number of residuals is not equal to the", " number of rows of the model matrix. Please contact the maintainer." ) } if( is.null( x$residCovEst ) ) { omegaInvXmat <- mm } else { omegaInvXmat <- t( .calcXtOmegaInv( xMat = mm, sigma = x$residCovEst, validObsEq = !is.na( residuals( x ) ), invertSigma = TRUE ) ) } result <- res[ !is.na( res ) ] * omegaInvXmat dimnames( result ) <- dimnames( mm ) if( max( abs( colSums( result ) ) ) > 1e-6 ) { warning( "the columns of the returned estimating function", " do not all sum up to zero,", " which indicates that the wrong estimating function is returned" ) } return( result ) }systemfit/R/calcGLS.R0000644000176200001440000000733114305171010014071 0ustar liggesusers.calcXtOmegaInv <- function( xMat, sigma, validObsEq, invertSigma = TRUE, useMatrix = FALSE, warnMatrix = TRUE, solvetol = 1e-5 ){ nEq <- ncol( validObsEq ) if( useMatrix && warnMatrix ){ if( !inherits( sigma, "dsyMatrix" ) ){ warning( "class of 'sigma' is '", paste( class( sigma ), collapse = ", " ), "', but it should be 'dsyMatrix'" ) } if( !inherits( xMat,"dgCMatrix" ) ){ warning( "class of 'xMat' is '", paste( class( xMat ), collapse = ", " ), "', but it should be 'dgCMatrix'" ) } } if( invertSigma ) { sigmaInv <- solve( sigma, tol = solvetol ) } else { sigmaInv <- sigma } if( useMatrix ){ for( i in 1:nEq ) { for( j in 1:nEq ) { thisBlock <- sparseMatrix( i = which( validObsEq[ validObsEq[ , i ], j ] ), j = which( validObsEq[ validObsEq[ , j ], i ] ), x = sigmaInv[ i, j ], dims = c( sum( validObsEq[ , i ] ), sum( validObsEq[ , j ] ) ) ) if( j == 1 ) { thisRow <- thisBlock } else { thisRow <- cbind( thisRow, thisBlock ) } } if( i == 1 ) { omegaInv <- thisRow } else { omegaInv <- rbind( omegaInv, thisRow ) } } result <- crossprod( xMat, omegaInv ) } else { eqSelect <- rep( 0, nrow( xMat ) ) for( i in 1:nEq ) { eqSelect[ ( sum( validObsEq[ , 0:( i - 1 ) ] ) + 1 ):sum( validObsEq[ , 1:i ] ) ] <- i } result <- matrix( 0, nrow = ncol( xMat ), ncol = nrow( xMat ) ) for( i in 1:nEq ) { for( j in 1:nEq ) { colSelectI <- eqSelect == i colSelectI[ colSelectI ] <- validObsEq[ validObsEq[ , i ], j ] colSelectJ <- eqSelect == j colSelectJ[ colSelectJ ] <- validObsEq[ validObsEq[ , j ], i ] result[ , colSelectI ] <- result[ , colSelectI ] + t( xMat )[ , colSelectJ ] * sigmaInv[ i, j ] } } } return( result ) } .calcGLS <- function( xMat, yVec = NULL, xMat2 = xMat, R.restr = NULL, q.restr = NULL, sigma, validObsEq, useMatrix = TRUE, warnMatrix = TRUE, solvetol = 1e-5 ){ if( useMatrix && warnMatrix ){ if( !inherits( xMat, "dgCMatrix" ) ){ warning( "class of 'xMat' is '", paste( class( xMat ), collapse = ", " ), "', but it should be 'dgCMatrix'" ) } if( !inherits( xMat2, "dgCMatrix" ) ){ warning( "class of 'xMat2' is '", paste( class( xMat2 ), collapse = ", " ), "', but it should be 'dgCMatrix'" ) } if( !inherits( sigma, "dsyMatrix" ) ){ warning( "class of 'sigma' is '", paste( class( sigma ), collapse = ", " ), "', but it should be 'dsyMatrix'" ) } } xtOmegaInv <- .calcXtOmegaInv( xMat = xMat, sigma = sigma, validObsEq = validObsEq, useMatrix = useMatrix, solvetol = solvetol ) if( is.null( R.restr ) ) { if( is.null( yVec ) ) { result <- solve( xtOmegaInv %*% xMat2, tol = solvetol ) } else { result <- as.numeric( solve( xtOmegaInv %*% xMat2, xtOmegaInv %*% yVec, tol = solvetol ) ) } } else { W <- rbind2( cbind2( xtOmegaInv %*% xMat2, t(R.restr) ), cbind2( R.restr, matrix(0, nrow(R.restr), nrow(R.restr) ))) if( is.null( yVec ) ) { result <- as.matrix( solve( W, tol=solvetol )[ 1:ncol(xMat), 1:ncol(xMat) ] ) } else{ V <- c( as.numeric( xtOmegaInv %*% yVec ), q.restr ) result <- solve( W, V, tol=solvetol )[ 1:ncol( xMat ) ] } } return( result ) } systemfit/R/ftest.R0000644000176200001440000000303214305170271013750 0ustar liggesusers.ftest.systemfit <- function( object, restrict.matrix, restrict.rhs = NULL, vcov. = NULL ){ coef <- coef( object ) # coefficient covariance matrix if( is.null( vcov. ) ){ vcov <- vcov( object ) } else if( is.function( vcov. ) ){ vcov <- vcov.( object ) } else { vcov <- vcov. } resid <- unlist( residuals( object ) ) resid <- resid[ !is.na( resid ) ] nEq <- length( object$eq ) if( is.null( object$residCovEst ) ) { rcov <- diag( nEq ) } else { rcov <- object$residCovEst } validObsEq <- matrix( NA, nrow = nrow( residuals( object ) ), ncol = nEq ) for( i in 1:nEq ) { validObsEq[ , i ] <- !is.na( residuals( object$eq[[ i ]] ) ) } result <- list() result$nRestr <- nrow( restrict.matrix ) result$df.residual.sys <- object$df.residual numerator <- t( restrict.matrix %*% coef - restrict.rhs ) %*% solve( restrict.matrix %*% vcov %*% t( restrict.matrix ) ) %*% ( restrict.matrix %*% coef - restrict.rhs ) resid <- matrix( resid, ncol = 1 ) if( object$control$useMatrix ) { resid <- as( resid, "CsparseMatrix" ) rcov <- as( rcov, "symmetricMatrix" ) } denominator <- as.numeric( .calcXtOmegaInv( xMat = resid, sigma = rcov, validObsEq = validObsEq, useMatrix = object$control$useMatrix ) %*% resid ) result$statistic <- ( numerator / result$nRestr ) / ( denominator / result$df.residual.sys ) result$p.value <- 1 - pf( result$statistic, result$nRestr, result$df.residual.sys ) return( result ) } systemfit/R/confint.systemfit.R0000644000176200001440000000356311063415462016324 0ustar liggesusers## calculate confidence intervals of the coefficients confint.systemfit <- function( object, parm = NULL, level = 0.95, useDfSys = NULL, ... ) { if( is.null( useDfSys ) ) { useDfSys <- length( coef( object ) ) != object$rank # TRUE if there are restrictions imposed } probLower <- ( 1 - level ) / 2 probBoth <- c( probLower, 1 - probLower ) pct <- paste( round( 100 * probBoth, 1 ), "%" ) ci <- matrix( NA, length( object$coefficients ), 2, dimnames = list( names( object$coefficients ), pct ) ) j <- 1 for( i in 1:length( object$eq ) ) { object$eq[[i]]$df.residual.sys <- object$df.residual ci[ j:(j+length( coef( object$eq[[ i ]] ) )-1), ] <- confint( object$eq[[ i ]], useDfSys = useDfSys ) j <- j + length( coef( object$eq[[ i ]] ) ) } class( ci ) <- "confint.systemfit" ci } ## calculate confidence intervals of the coefficients of a single equation confint.systemfit.equation <- function( object, parm = NULL, level = 0.95, useDfSys = NULL, ... ) { if( is.null( useDfSys ) ) { useDfSys <- object$nCoef.sys != object$rank.sys # TRUE if there are restrictions imposed } probLower <- ( 1 - level ) / 2 probBoth <- c( probLower, 1 - probLower ) pct <- paste( round( 100 * probBoth, 1 ), "%" ) ci <- matrix( NA, length( object$coefficients ), 2, dimnames = list( names( object$coefficients ), pct ) ) if( useDfSys ) { fac <- qt( probBoth, object$df.residual.sys ) } else { fac <- qt( probBoth, object$df.residual ) } coef <- summary( object )$coefficients ci[] <- coef[ , 1 ] + coef[ , 2 ] %o% fac class( ci ) <- "confint.systemfit" ci } ## print the confidence intervals of the coefficients print.confint.systemfit <- function( x, digits = 3, ... ) { print( unclass( round( x, digits = digits, ...) ) ) invisible(x) } systemfit/R/model.matrix.systemfit.R0000644000176200001440000000602012007151276017255 0ustar liggesusers## return model matrix of the entire system model.matrix.systemfit <- function( object, which = "x", ... ){ result <- matrix( NA, 0, 0 ) mmRowNames <- NULL mmColNames <- NULL for( i in 1:length( object$eq ) ) { mmi <- model.matrix( object$eq[[ i ]], which = which ) result <- rbind( cbind( result, matrix( 0, nrow( result ), ncol( mmi ) ) ), cbind( matrix( 0, nrow( mmi ), ncol( result ) ), mmi ) ) mmRowNames <- c( mmRowNames, paste( object$eq[[ i ]]$eqnLabel, "_", rownames( mmi ), sep = "" ) ) for( j in 1:ncol( mmi ) ){ cName <- colnames( mmi )[ j ] if( object$panelLike && cName != "(Intercept)" ){ mmColNames <- c( mmColNames, cName ) } else { mmColNames <- c( mmColNames, paste( object$eq[[ i ]]$eqnLabel, "_", cName, sep = "" ) ) } } } rownames( result ) <- mmRowNames colnames( result ) <- mmColNames return( result ) } ## return model matrix of a single equation model.matrix.systemfit.equation <- function( object, which = "x", ... ){ if( ! which %in% c( "x", "xHat", "z" ) ) { stop( "argument 'which' must be either \"x\", \"xHat\", or \"z\"" ) } else if( which %in% c( "xHat", "z" ) && is.null( object$termsInst ) ) { stop( "argument 'which' can only be set to \"xHat\" or \"z\" if instruments were used" ) } if( which == "xHat" ) { xMat <- model.matrix( object, which = "x" ) zMat <- model.matrix( object, which = "z" ) res <- residuals( object ) if( sum( !is.na( res ) ) != nrow( xMat ) ) { stop( "internal error: number of non-NA residuals not equal to", " number of observations in xMat. Please contact the maintainer" ) } else if( nrow( xMat ) != nrow( zMat) ) { stop( "internal error: number of observations in xMat is not equal to", " number of observations in zMat. Please contact the maintainer" ) } result <- zMat %*% solve( crossprod( zMat ), crossprod( zMat, xMat ) ) } else { if( !is.null( object[[ which ]] ) ) { result <- object[[ which ]] } else if( !is.null( model.frame( object ) ) ) { if( which == "x" ) { result <- model.matrix( object$terms, data = model.frame( object ) ) } else { result <- model.matrix( object$termsIns, data = object$modelInst ) } attrAssign <- attributes( result )$assign result <- result[ !is.na( residuals( object ) ), , drop = FALSE ] attributes( result )$assign <- attrAssign } else { if( which == "x" ) { stop( "returning model matrix not possible. Please re-estimate", " the system with either control variable", " 'x' or 'model' set to TRUE" ) } else { stop( "returning matrix of instruments not possible. Please re-estimate", " the system with either control variable", " 'z' or 'model' set to TRUE" ) } } } return( result ) } systemfit/R/formula.systemfit.R0000644000176200001440000000060511063415462016323 0ustar liggesusersformula.systemfit <- function( x, ... ) { result <- list() eqnLabels <- NULL for( i in 1:length( x$eq ) ){ result <- c( result, formula( x$eq[[ i ]] ) ) eqnLabels <- c( eqnLabels, x$eq[[ i ]]$eqnLabel ) } names( result ) <- eqnLabels return( result ) } formula.systemfit.equation <- function( x, ... ) { result <- formula( x$terms ) return( result ) } systemfit/R/print.systemfit.R0000644000176200001440000000225611063415462016016 0ustar liggesusers## print a few results of the whole system print.systemfit <- function( x, digits = max( 3, getOption("digits") - 1 ),... ) { cat("\n") cat("systemfit results \n") cat("method: ") if(!is.null(x$iter)) if(x$iter>1) cat("iterated ") cat( paste( x$method, "\n\n")) if(!is.null(x$iter)) { if(x$iter>1) { if(x$iterF)" ) rownames( result ) <- c( 1, 2 ) ftest <- .ftest.systemfit( object = model, restrict.matrix = R.restr, restrict.rhs = q.restr, vcov. = vcov. ) result[ 1, 1 ] <- ftest$df.residual.sys + ftest$nRestr result[ 2, 1 ] <- ftest$df.residual.sys result[ 2, 2 ] <- result[ 1, 1 ] - result[ 2, 1 ] result[ 2, 3 ] <- ftest$statistic result[ 2, 4 ] <- ftest$p.value title <- "Linear hypothesis test (Theil's F test)\n\nHypothesis:" topnote <- paste( "Model 1: restricted model", "\nModel 2: ", modelName, sep = "" ) if( is.null( vcov. ) ){ note <- "" } else { note <- "\nNote: Coefficient covariance matrix supplied.\n" } attributes( result )$heading <- c( title, car::printHypothesis( R.restr, q.restr, names( coef( model ) ) ), "", topnote, note ) class( result ) <- c( "anova", "data.frame" ) } else { stop( "unknown test statistic '", test, "'. Please use 'F', 'FT', or 'Chisq'" ) } return( result ) } linear.hypothesis.systemfit <- function( ... ) { .Deprecated( "linearHypothesis.systemfit", package = "systemfit" ) return( linearHypothesis.systemfit( ... ) ) } systemfit/R/createSystemfitModel.R0000644000176200001440000000271412535351730016771 0ustar liggesuserscreateSystemfitModel <- function( nEq, nRegEq, nObs, coef = NULL, sigma = NULL ){ result <- list() nCoef <- nEq * ( nRegEq + 1 ) if( is.null( coef ) ){ coef <- round( rnorm( nCoef ), 1 ) } else { if( length( coef ) != nCoef ){ stop( "argument 'coef' must have length ", nCoef ) } } if( is.null( sigma ) ){ sigma <- matrix( rnorm( nEq^2 ), nEq, nEq ) sigma <- crossprod( sigma ) } else { if( all.equal( dim( sigma ), c( nEq, nEq ) ) != TRUE ){ stop( "argument 'sigma' must be a ", nEq, "x", nEq, " matrix" ) } } disturbances <- mvrnorm( nObs, rep( 0, nEq ), sigma ) result$data <- data.frame( obsNo = c( 1:nObs ) ) result$formula <- list() for( eqNo in 1:nEq ){ result$formula[[ eqNo ]] <- as.formula( paste( "y.", eqNo, " ~ ", paste( paste( "x.", eqNo, ".", sep = "" ), c( 1:nRegEq ), sep = "", collapse = " + " ), sep = "" ) ) for( regNo in 1:nRegEq ){ result$data[[ paste( "x", eqNo, regNo, sep = "." ) ]] <- rnorm( nObs ) } result$data[[ paste( "y", eqNo, sep = "." ) ]] <- 0 xMatEq <- model.matrix( result$formula[[ eqNo ]], result$data ) result$data[[ paste( "y", eqNo, sep = "." ) ]] <- drop( xMatEq %*% coef[ ( ( eqNo - 1 ) * ( nRegEq + 1 ) + 1 ): ( eqNo * ( nRegEq + 1 ) ) ] ) + disturbances[ , eqNo ] } result$coef <- coef result$sigma <- sigma return( result ) }systemfit/R/terms.systemfit.R0000644000176200001440000000056411063415462016014 0ustar liggesusersterms.systemfit <- function( x, ... ) { result <- list() eqnLabels <- NULL for( i in 1:length( x$eq ) ){ result <- c( result, terms( x$eq[[ i ]] ) ) eqnLabels <- c( eqnLabels, x$eq[[ i ]]$eqnLabel ) } names( result ) <- eqnLabels return( result ) } terms.systemfit.equation <- function( x, ... ) { result <- x$terms return( result ) } systemfit/MD50000644000176200001440000001235114406632022012612 0ustar liggesusers93154fb52f3141c77c45caf103c7120e *DESCRIPTION b621dd1da2fa341709c291758891895f *NAMESPACE f615297eeca1bc85d4c888002430738c *NEWS 03dbafe40ca29e1288a40d4f165dfa99 *R/bread.systemfit.R d586b0893c8816b26db3b522715b0d67 *R/calcFittedRegMat.R d54c51249d9e0dd516b0037b33006680 *R/calcGLS.R e9aaa065e2c4eedf849ab4652a36a90b *R/calcResidCov.R a928f6a81bb77da3442f0fec48411bde *R/confint.systemfit.R f174d645f3f7752c4c90eaf6ad44352b *R/createSystemfitModel.R bcbbb3f3ef3d8fb6e362a5da2245b1b7 *R/estfun.systemfit.R 3d9eda536dbec31a581b5655e0e9d30e *R/fiml.R 6fb775a56cae5e24fbf2867736b7d7b9 *R/formula.systemfit.R 14f25797c85989f036c22c7a6dcaeb11 *R/ftest.R 14199c9a2c75dcafbac1dd1e639ceeeb *R/hausman.R e29ebd07f031b75d31ebf3a939e86a44 *R/linear.hypothesis.R bf655afdc4b5e1ca40e7c2897fec7319 *R/logLik.R 4cd68f3e4e0461a59622a2a3d283c4bf *R/lrtest.R 05a989b12c4da59e768bf0f3ed63cab2 *R/model.matrix.systemfit.R 952e16b8f97019098c4d1691d786dcc6 *R/nlsystemfit.r d079b7a96f565673fef9d77a8e588d83 *R/nobs.systemfit.R 0d0e8e5e22fa6c367f00823f13d5a1e6 *R/predict.systemfit.R 9932d5f663a75d059e156ec0b8823dd2 *R/prepareData.R 960dc551552270a7d45569ee62f17892 *R/print.systemfit.R c2fc6c993ab6d0761c5f1a35f2fd5a17 *R/smallMethods.R 31f50802751d4ad237f720af580f8a8a *R/stackMatList.R 0e7828cb4d7a859f985adbe508761cfe *R/summary.systemfit.R 49bf9a6057729b0e5b1cd9cfd017aa8e *R/systemfit.R 2584a22d7e034161de7fc2106943bdb1 *R/systemfit.control.R 43e75cac8e8714637fef80df93bc5a94 *R/systemfitPanel.R 4d7e7270bd69d6694db06179ebc73b17 *R/terms.systemfit.R a0c73bae78cc768956cd9e7b9d629b51 *R/zzz.R 97579367dae3ba8171157da7d12bd9aa *build/vignette.rds 73d1f5128c46530e9c9e90a30b911eea *data/GrunfeldGreene.rda 823978032ef9dbca31df78670ca9d8cc *data/KleinI.txt.gz 39240597a57aa474288421c00c284080 *data/Kmenta.txt.gz 8728f320ef604eea0cbfa28bbe5e0d72 *data/ppine.txt.gz 2717334772419c778a79887eced3a60c *inst/CITATION 572027cef6164aa551a2f1c14296606f *inst/doc/systemfit.R 90dbc4b095e72da9c33c815ebfa06b06 *inst/doc/systemfit.Rnw 5abc09d659a3e7d6f2cff448779ab3b3 *inst/doc/systemfit.bib 8e13b45f2d1161d08e2bf11a0cec0dfa *inst/doc/systemfit.pdf 74d695ce758bb0e5642126e1e43f9cb5 *man/GrunfeldGreene.Rd 7ab1a785f77591e4ee06e234cca2e6c5 *man/KleinI.Rd 7f9c41af36eab43ea77d978df1f7a84e *man/Kmenta.Rd 2f8e1f45eea807ddd3feffa20bc74a9a *man/bread.systemfit.Rd 5c34ebefba9bf6b7082d02218e0ff11d *man/coef.systemfit.Rd aad912f0b55057ae3641e006059b38ea *man/confint.systemfit.Rd 0ee0ef07591df7378ef39845df0caa28 *man/correlation.systemfit.Rd 3fe8093bbfd01933e7f87c4d10c74b58 *man/createSystemfitModel.Rd f693779d9bf874cc0b9a382a927c767c *man/estfun.systemfit.Rd 54145526a78b9117e0e9ec1afad64598 *man/fitted.systemfit.Rd eeef2ebd3f5398bfbd158f468b5c03a7 *man/formula.systemfit.Rd 847f184a1cb55e62539d7ed1cd6bd47b *man/hausman.systemfit.Rd 12a9cc1914028c7ba6178384f657773f *man/linear.hypothesis.systemfit.Rd e59bb86b196b5bf2c0cc1886d3ea77bf *man/logLik.systemfit.Rd 3574b333e2713f149159599e2df589f4 *man/lrtest.systemfit.Rd 1889cf5be7186a23f33783c36d2e182d *man/model.frame.systemfit.Rd 59df9ecc5e004a11c5d0d5f69757568b *man/model.matrix.systemfit.Rd 580981256de9d15a6958983be71a06ed *man/nlsystemfit.Rd 677b1d74eb0ac4eb2cce27403e7e676f *man/ppine.Rd 09aad49dee931bf4231feef78e7ede1e *man/predict.systemfit.Rd f004eb157b7f3d6cefebbb35ead755e9 *man/print.confint.systemfit.Rd 87727d4673ce6158d67ef4087e837645 *man/print.nlsystemfit.system.Rd af42d93e1ee1b30b289249756b31751a *man/print.systemfit.Rd 86c66a217741aa02b7043490ec64a1df *man/residuals.systemfit.Rd 696d1b40956d9dd18d0b3e493a176861 *man/se.ratio.systemfit.Rd 6867c53f1421491ee5ec4e57d9bc2de4 *man/summary.nlsystemfit.system.Rd 28a9d38f40b3d685b34cfdfe3c9f99f2 *man/summary.systemfit.Rd 108ed94cd44dc159f98361db4b7e3c83 *man/systemfit-internal.Rd 1b40037035263925ce6d9cd5a17f9d38 *man/systemfit.Rd 9f2d01cc920b1b88d9a5d20d0c73354a *man/systemfit.control.Rd e65abeb8646fd4fa52eaa7da55d170b0 *man/terms.systemfit.Rd c8f410a732c7c6e53e3144d8721a3ee4 *man/vcov.systemfit.Rd 6f7fc86406bd005b175f69c1d9cfa85a *tests/KleinI.R 46a874ed6d4d32197e3f2c990d711417 *tests/KleinI.Rout.save 0268e29269a168ef00ff89888399387d *tests/KleinI_noMat.R 169714c14f3dce4202538c040f65033f *tests/KleinI_noMat.Rout.save 13f51d189c830e30723f482fb68c56fd *tests/test_2sls.R 2cda26a6fcb97595466c39abbf17df6d *tests/test_2sls.Rout.save 3d3ff4c2080206fded3f3fb2c669af66 *tests/test_3sls.R 48836921657183c852361745d729170e *tests/test_3sls.Rout.save de4b30c9df1dbc610ca0d13c5b915aff *tests/test_hausman.R 24158efa557f8c6661fae923ecef89b7 *tests/test_hausman.Rout.save ddca4a044ef7750a7d5bb2fd76b29e99 *tests/test_ols.R ceefd9874fe0e71c2c9523abe4bb3faf *tests/test_ols.Rout.save 032d37861d9d6fee0f91bfb0fc88abec *tests/test_panel.R 3e0e78fb744b9d326f350046c6bf9df5 *tests/test_panel.Rout.save 205ae7adabb1210113e97cca01ca34b0 *tests/test_sur.R 58196d31c4e1078a20aa54216ba014f7 *tests/test_sur.Rout.save e1548cd947bc63df38e82b5a64750e35 *tests/test_w2sls.R 96ba210915911e876c3b1f6656de9fed *tests/test_w2sls.Rout.save bd8a91b887c7f223eecf7562d525d315 *tests/test_wls.R da7872de93b212f63f675ff9ee78beb1 *tests/test_wls.Rout.save bb6a5c44398ffc0baf2cdbee65475546 *vignettes/aux2bib_systemfit.sh c7458c1ce622c85a6a34a9ef1e7a2873 *vignettes/runSweave.sh 90dbc4b095e72da9c33c815ebfa06b06 *vignettes/systemfit.Rnw 5abc09d659a3e7d6f2cff448779ab3b3 *vignettes/systemfit.bib systemfit/inst/0000755000176200001440000000000014304733347013266 5ustar liggesuserssystemfit/inst/doc/0000755000176200001440000000000014406577565014046 5ustar liggesuserssystemfit/inst/doc/systemfit.Rnw0000755000176200001440000032011614254020035016543 0ustar liggesusers\documentclass[article,nojss]{jss} \usepackage[utf8]{inputenc} \usepackage{amsmath} \usepackage{float} % \usepackage{lineno} % % \linenumbers \newcommand{\bHat}{\hat{\beta}} \newcommand{\COVHat}{\widehat{\COV}} \newcommand{\lHat}{\hat{\lambda}} \newcommand{\OHat}{\widehat{\Omega}} \newcommand{\SHat}{\widehat{\Sigma}} \newcommand{\sHat}{\hat{\sigma}} \newcommand{\uHat}{\hat{u}} \newcommand{\XHat}{\widehat{X}} \newcommand{\tr}{\mathrm{tr}} \newcommand{\LR}{\mathit{LR}} \clubpenalty=10000 \widowpenalty=10000 \setlength{\emergencystretch}{3em} % \setlength{\overfullrule}{5pt} \newcommand{\codeD}[2]{\code{#1}\hspace{0pt}\code{.#2}} \newcommand{\codeDD}[3]{\code{#1}\hspace{0pt}\code{.#2}\hspace{0pt}\code{.#3}} \newcommand{\codeDDD}[4]{\code{#1}\hspace{0pt}\code{.#2}\hspace{0pt}% \code{.#3}\hspace{0pt}\code{.#4}} \hyphenation{systemfit} \author{Arne Henningsen\\University of Copenhagen \And Jeff D.\ Hamann\\ Forest Informatics, Inc.} \Plainauthor{Arne Henningsen, Jeff D. Hamann} \title{\pkg{systemfit}: A Package for Estimating Systems of Simultaneous Equations in \proglang{R}} \Plaintitle{systemfit: A Package for Estimating Systems of Simultaneous Equations in R} \Shorttitle{\pkg{systemfit}: Estimating Systems of Simultaneous Equations in \proglang{R}} %% an abstract and keywords \Abstract{ This introduction to the \proglang{R} package \pkg{systemfit} is a slightly modified version of \cite{henningsen07a}, published in the \emph{Journal of Statistical Software}. Many statistical analyses (e.g., in econometrics, biostatistics and experimental design) are based on models containing systems of structurally related equations. The \pkg{systemfit} package provides the capability to estimate systems of linear equations within the \proglang{R} programming environment. For instance, this package can be used for ``ordinary least squares'' (OLS), ``seemingly unrelated regression'' (SUR), and the instrumental variable (IV) methods ``two-stage least squares'' (2SLS) and ``three-stage least squares'' (3SLS), where SUR and 3SLS estimations can optionally be iterated. Furthermore, the \pkg{systemfit} package provides tools for several statistical tests. It has been tested on a variety of datasets and its reliability is demonstrated. } \Keywords{\proglang{R}, system of simultaneous equations, seemingly unrelated regression, two-stage least squares, three-stage least squares, instrumental variables} \Plainkeywords{R, system of simultaneous equations, seemingly unrelated regression, two-stage least squares, three-stage least squares, instrumental variables} %% at least one keyword must be supplied %% publication information %% NOTE: This needs to filled out ONLY IF THE PAPER WAS ACCEPTED. %% If it was not (yet) accepted, leave them commented. \Volume{23} \Issue{4} \Month{December} \Year{2007} \Submitdate{2006-03-15} \Acceptdate{2007-10-24} %% The address of (at least) one author should be given %% in the following format: \Address{ Arne Henningsen\\ Institute of Food and Resource Economics\\ University of Copenhagen\\ Rolighedsvej 25\\ D-1958 Frederiksberg C, Denmark\\ E-mail: \email{arne.henningsen@gmail.com}\\ URL: \url{http://www.arne-henningsen.name/}\\ \\ Jeff D.\ Hamann\\ Forest Informatics, Inc.\\ PO Box 1421\\ Corvallis, Oregon 97339-1421, United States of America\\ E-mail: \email{jeff.hamann@forestinformatics.com}\\ URL: \url{http://www.forestinformatics.com/}\\ } %% It is also possible to add a telephone and fax number %% before the e-mail in the following format: %% Telephone: +43/1/31336-5053 %% Fax: +43/1/31336-734 %% for those who use Sweave please include the following line (with % symbols): %% need no \usepackage{Sweave.sty} %% end of declarations %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \begin{document} % initialisation stuff <>= library(knitr) opts_chunk$set( engine='R' ) @ %\VignetteIndexEntry{Systemfit} %\VignetteDepends{plm,sem} %\VignetteKeywords{R, system of simultaneous equations, % seemingly unrelated regression, two-stage least squares, % three-stage least squares, instrumental variables} %\VignettePackage{systemfit} %\VignetteEngine{knitr::knitr} <>= options( prompt = "R> ", ctinue = "+ " ) @ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \section{Introduction} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Many theoretical models that are econometrically estimated consist of more than one equation. The disturbance terms of these equations are likely to be contemporaneously correlated, because unconsidered factors that influence the disturbance term in one equation probably influence the disturbance terms in other equations, too. Ignoring this contemporaneous correlation and estimating these equations separately leads to inefficient estimates of the coefficients. However, estimating all equations simultaneously with a ``generalized least squares'' (GLS) estimator, which takes the covariance structure of the residuals into account, leads to efficient estimates. This estimation procedure is generally called ``seemingly unrelated regression'' \citep[SUR,][]{zellner62}. Another reason to estimate a system of equations simultaneously are cross-equation restrictions on the coefficients.% \footnote{ Especially the economic theory suggests many cross-equation restrictions on the coefficients (e.g., the symmetry restriction in demand models). } Estimating the coefficients under cross-equation restrictions and testing these restrictions requires a simultaneous estimation approach. Furthermore, these models can contain variables that appear on the left-hand side in one equation and on the right-hand side of another equation. Ignoring the endogeneity of these variables can lead to inconsistent estimates. This simultaneity bias can be corrected for by applying a ``two-stage least squares'' (2SLS) estimation to each equation. Combining this estimation method with the SUR method results in a simultaneous estimation of the system of equations by the ``three-stage least squares'' (3SLS) method \citep{zellner62b}. % For all of the methods developed in the package, the disturbances of % the individual equations are assumed to be independent and identically % distributed (iid). % In the future, we would like to add the ability to fit equations were % the disturbances are serially correlated (wikins 1969). The \pkg{systemfit} package provides the capability to estimate systems of linear equations in \proglang{R} \citep{r-project-07}. Currently, the estimation methods ``ordinary least squares'' (OLS), ``weighted least squares'' (WLS), ``seemingly unrelated regression'' (SUR), ``two-stage least squares'' (2SLS), ``weighted two-stage least squares'' (W2SLS), and ``three-stage least squares'' (3SLS) are implemented.% \footnote{ In this context, the term ``weighted'' in ``weighted least squares'' (WLS) and ``weighted two-stage least squares'' (W2SLS) means that the \emph{equations} might have different weights and \emph{not} that the \emph{observations} have different weights. } The WLS, SUR, W2SLS, and 3SLS estimates can be based either on one-step (OLS or 2SLS) (co)variances or these estimations can be iterated, where the (co)variances are calculated from the estimates of the previous step. Furthermore, the \pkg{systemfit} package provides statistical tests for restrictions on the coefficients and for testing the consistency of the 3SLS estimation. Although systems of linear equations can be estimated with several other statistical and econometric software packages (e.g., \proglang{SAS}, \proglang{EViews}, \proglang{TSP}), \pkg{systemfit} has several advantages. First, all estimation procedures are publicly available in the source code. Second, the estimation algorithms can be easily modified to meet specific requirements. Third, the (advanced) user can control estimation details generally not available in other software packages by overriding reasonable defaults. % This paper is organized as follows: In Section~\ref{sec:statistics} we introduce the statistical background of estimating equation systems. The implementation of the statistical procedures in \proglang{R} is briefly explained in Section~\ref{sec:code}. Section~\ref{sec:Usage} demonstrates how to run \pkg{systemfit} and how some of the features presented in the second section can be used. In Section~\ref{sec:reliability} we replicate several textbook results with the \pkg{systemfit} package. Finally, a summary and outlook are presented in Section~\ref{sec:Summmary}. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \section{Statistical background}\label{sec:statistics} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% In this section we give a short overview of the statistical background that the \pkg{systemfit} package is based on. More detailed descriptions of simultaneous equations systems are available for instance in \citet[Chapter~7]{theil71}, \citet[Part~4]{judge82}, \citet[Part~5]{judge85}, \citet{srivastava87}, \citet[Chapters 14--15]{greene03}, and \citet[Chapter~10]{zivot06}. After introducing notations and assumptions, we provide the formulas to estimate systems of linear equations. We then demonstrate how to estimate coefficients under linear restrictions. Finally, we present additional relevant issues about estimation of equation systems. Consider a system of $G$ equations, where the $i$th equation is of the form \begin{equation} y_{i} = X_i \beta_i + u_i, \quad i = 1, 2, \ldots, G , \label{eq:model} \end{equation} where $y_i$ is a vector of the dependent variable, $X_i$ is a matrix of the exogenous variables, $\beta_i$ is the coefficient vector and $u_i$ is a vector of the disturbance terms of the $i$th equation. We can write the ``stacked'' system as \begin{equation} \left[ \begin{array}{c} y_1 \\ y_2\\ \vdots\\ y_G \end{array} \right] = \left[ \begin{array}{cccc} X_1 & 0 & \cdots & 0\\ 0 & X_2 & \cdots & 0\\ \vdots & \vdots & \ddots & \vdots\\ 0 & 0 & \cdots & X_G \end{array}\right] \left[ \begin{array}{c} \beta_1 \\ \beta_2 \\ \vdots\\ \beta_G \end{array} \right] + \left[ \begin{array}{c} u_1 \\ u_2 \\ \vdots\\ u_G \end{array} \right] \label{eq:model-array} \end{equation} or more simply as \begin{equation} y = X \beta + u . \label{eq:model-matrices} \end{equation} We assume that there is no correlation of the disturbance terms across observations, so that \begin{equation} \E \left[ u_{it} \, u_{js} \right] = 0 \; \forall \; t \neq s , \end{equation} where $i$ and $j$ indicate the equation number and $t$ and $s$ denote the observation number, where the number of observations is the same for all equations. However, we explicitly allow for contemporaneous correlation, i.e., \begin{equation} \E \left[ u_{it} \, u_{jt} \right] = \sigma_{ij} . \end{equation} Thus, the covariance matrix of all disturbances is \begin{equation} \E \left[ u \, u^\top \right] = \Omega = \Sigma \otimes I_T , \end{equation} where $\Sigma = \left[ \sigma_{ij} \right]$ is the (contemporaneous) disturbance covariance matrix, $\otimes$ is the Kronecker product, $I_T$ is an identity matrix of dimension $T$, and $T$ is the number of observations in each equation. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \subsection{Estimation with only exogenous regressors} \label{sec:Estimation-ols-wls-sur} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% If all regressors are exogenous, the system of equations (Equation~\ref{eq:model}) can be consistently estimated by ordinary least squares (OLS), weighted least squares (WLS), and seemingly unrelated regression (SUR). These estimators can be obtained by \begin{equation} \bHat = \left( X^\top \OHat^{-1} X \right)^{-1} X^\top \OHat^{-1} y . \label{eq:ols-wls-sur} \end{equation} The covariance matrix of these estimators can be estimated by \begin{equation} \COVHat \left[ \bHat \right] = \left( X^\top \OHat^{-1} X \right)^{-1} . \label{eq:cov-ols-wls-sur} \end{equation} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \subsubsection{Ordinary least squares (OLS)} The ordinary least squares (OLS) estimator is based on the assumption that the disturbance terms are not contemporaneously correlated $(\sigma_{ij} = 0 \; \forall \; i \neq j)$ and have the same variance in each equation $( \sigma_i^2 = \sigma_j^2 \, \forall \, i, j)$. In this case, $\OHat$ in Equation~\ref{eq:ols-wls-sur} is equal to $I_{G \cdot T}$ and thus, cancels out. The OLS estimator is efficient, as long as the disturbances are not contemporaneously correlated. If the whole system is treated as one single equation, $\OHat$ in Equation~\ref{eq:cov-ols-wls-sur} is $\sHat^2 I_{G \cdot T}$, where $\sHat^2$ is an estimator for the variance of all disturbances $(\sigma^2 = \E [ u_{it}^2 ])$. If the disturbance terms of the individual equations are allowed to have different variances, $\OHat$ in Equation~\ref{eq:cov-ols-wls-sur} is $\SHat \otimes I_T$, where $\sHat_{ij} = 0 \; \forall \; i \neq j$ and $\sHat_{ii} = \sHat_i^2$ is the estimated variance of the disturbance term in the $i$th equation. If the estimated coefficients are not constrained by cross-equation restrictions, the simultaneous OLS estimation of the system leads to the same estimated coefficients as an equation-wise OLS estimation. The covariance matrix of the coefficients from an equation-wise OLS estimation is equal to the covariance matrix obtained by Equation~\ref{eq:cov-ols-wls-sur} with $\OHat$ equal to $\SHat \otimes I_T$. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \subsubsection{Weighted least squares (WLS)} The weighted least squares (WLS) estimator allows for different variances of the disturbance terms in the different equations $( \sigma_i^2 \neq \sigma_j^2 \, \forall \, i \neq j)$, but assumes that the disturbance terms are not contemporaneously correlated. In this case, $\OHat$ in Equations~\ref{eq:ols-wls-sur} and~\ref{eq:cov-ols-wls-sur} is $\SHat \otimes I_T$, where $\sHat_{ij} = 0 \; \forall \; i \neq j$ and $\sHat_{ii} = \sHat_i^2$ is the estimated variance of the disturbance terms in the $i$th equation. Theoretically, $\sHat_{ii}$ should be the variance of the (true) disturbances $( \sigma_{ii} )$. However, they are not known in most empirical applications. Therefore, true variances are generally replaced by estimated variances $( \sHat_{ii} )$ that are calculated from the residuals of a first-step OLS estimation (see Section~\ref{sec:residcov}).% \footnote{% Note that $\OHat$ in Equation~\ref{eq:ols-wls-sur} is not the same $\OHat$ as in Equation~\ref{eq:cov-ols-wls-sur}. The first is calculated from the residuals of a first-step OLS estimation; the second is calculated from the residuals of this WLS estimation. The same applies to the SUR, W2SLS, and 3SLS estimations described in the following sections. } The WLS estimator is (asymptotically) efficient only if the disturbance terms are not contemporaneously correlated. If the estimated coefficients are not constrained by cross-equation restrictions, they are equal to OLS estimates. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \subsubsection{Seemingly unrelated regression (SUR)} If the disturbances are contemporaneously correlated, a generalized least squares (GLS) estimation leads to an efficient estimator for the coefficients. In this case, the GLS estimator is generally called ``seemingly unrelated regression'' (SUR) estimator \citep{zellner62}. However, the true covariance matrix of the disturbance terms is generally unknown. The textbook solution for this problem is a feasible generalized least squares (FGLS) estimation. As the FGLS estimator is based on an estimated covariance matrix of the disturbance terms, it is only asymptotically efficient. In case of a SUR estimator, $\OHat$ in Equations~\ref{eq:ols-wls-sur} and~\ref{eq:cov-ols-wls-sur} is $\SHat \otimes I_T$, where $\SHat$ is the estimated covariance matrix of the disturbance terms. It should be noted that while an unbiased OLS or WLS estimation requires only that the regressors and the disturbance terms of each single equation are uncorrelated $( \E \left[ u_i^\top X_i \right] = 0 \; \forall \; i )$, a consistent SUR estimation requires that all disturbance terms and all regressors are uncorrelated $( \E \left[ u_i^\top X_j \right] = 0 \; \forall \; i, j )$. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \subsection{Estimation with endogenous regressors} \label{sec:Estimation-2sls-w2sls-3sls} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% If the regressors of one or more equations are correlated with the disturbances ($\E \left[ u_i^\top X_i \right] \neq 0$), OLS, WLS, and SUR estimates are biased. This can be circumvented by a two-stage least squares (2SLS), weighted two-stage least squares (W2SLS), or a three-stage least squares (3SLS) estimation with instrumental variables (IV). The instrumental variables for each equation $Z_i$ can be either different or identical for all equations. They must not be correlated with the disturbance terms of the corresponding equation ($\E \left[ u_i^\top Z_i \right] = 0$). At the first stage new (``fitted'') regressors are obtained by \begin{equation} \XHat_i = Z_i \left( Z_i^\top Z_i \right)^{-1} Z_i^\top X_i . \end{equation} Then, these ``fitted'' regressors are substituted for the original regressors in Equation~\ref{eq:ols-wls-sur} to obtain unbiased 2SLS, W2SLS, or 3SLS estimates of $\beta$ by \begin{equation} \bHat = \left( \XHat^\top \OHat^{-1} \XHat \right)^{-1} \XHat^\top \OHat^{-1} y , \label{eq:2sls-w2sls-3sls} \end{equation} where \begin{equation} \XHat = \left[ \begin{array}{cccc} \XHat_1 & 0 & \cdots & 0\\ 0 & \XHat_2 & \cdots & 0\\ \vdots & \vdots & \ddots & \vdots\\ 0 & 0 & \cdots & \XHat_G \end{array}\right] . \end{equation} An estimator of the covariance matrix of the estimated coefficients can be obtained from Equation~\ref{eq:cov-ols-wls-sur} analogously. Hence, we get \begin{equation} \COVHat \left[ \bHat \right] = \left( \XHat^\top \OHat^{-1} \XHat \right)^{-1} . \label{eq:cov-2sls-w2sls-3sls} \end{equation} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \subsubsection{Two-stage least squares (2SLS)} The two-stage least squares (2SLS) estimator is based on the same assumptions about the disturbance terms as the OLS estimator. Accordingly, $\OHat$ in Equation~\ref{eq:2sls-w2sls-3sls} is equal to $I_{G \cdot T}$ and thus, cancels out. Like for the OLS estimator, the whole system can be treated either as one single equation with $\OHat$ in Equation~\ref{eq:cov-2sls-w2sls-3sls} equal to $\sHat^2 I_{G \cdot T}$, or the disturbance terms of the individual equations are allowed to have different variances with $\OHat$ in Equation~\ref{eq:cov-2sls-w2sls-3sls} equal to $\SHat \otimes I_T$, where $\sHat_{ij} = 0 \; \forall \; i \neq j$ and $\sHat_{ii} = \sHat_i^2$. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \subsubsection{Weighted two-stage least squares (W2SLS)} The weighted two-stage least squares (W2SLS) estimator allows for different variances of the disturbance terms in the different equations. Hence, $\OHat$ in Equations~\ref{eq:2sls-w2sls-3sls} and~\ref{eq:cov-2sls-w2sls-3sls} is $\SHat \otimes I_T$, where $\sHat_{ij} = 0 \; \forall \; i \neq j$ and $\sHat_{ii} = \sHat_i^2$. If the estimated coefficients are not constrained by cross-equation restrictions, they are equal to 2SLS estimates. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \subsubsection{Three-stage least squares (3SLS)} If the disturbances are contemporaneously correlated, a feasible generalized least squares (FGLS) version of the two-stage least squares estimation leads to consistent and asymptotically more efficient estimates. This estimation procedure is generally called ``three-stage least squares'' \citep[3SLS,][]{zellner62b}. The standard 3SLS estimator and its covariance matrix are obtained by Equations~\ref{eq:2sls-w2sls-3sls} and~\ref{eq:cov-2sls-w2sls-3sls} with $\OHat$ equal to $\SHat \otimes I_T$, where $\SHat$ is the estimated covariance matrix of the disturbance terms. While an unbiased 2SLS or W2SLS estimation requires only that the instrumental variables and the disturbance terms of each single equation are uncorrelated $( \E \left[ u_i^\top Z_i \right]) = 0 \; \forall \; i )$, \cite{schmidt90} points out that the 3SLS estimator is only consistent if all disturbance terms and all instrumental variables are uncorrelated $( \E \left[ u_i^\top Z_j \right]) = 0 \; \forall \; i, j )$. Since there might be occasions where this cannot be avoided, \cite{schmidt90} analyses other approaches to obtain 3SLS estimators. One of these approaches based on instrumental variable estimation (3SLS-IV) is \begin{equation} \bHat_\text{3SLS-IV} = \left( \XHat^\top \OHat^{-1} X \right)^{-1} \XHat^\top \OHat^{-1} y . \label{eq:3slsIv} \end{equation} An estimator of the covariance matrix of the estimated 3SLS-IV coefficients is \begin{equation} \COVHat \left[ \bHat_\text{3SLS-IV} \right] = \left( \XHat^\top \OHat^{-1} X \right)^{-1} . \end{equation} Another approach based on the generalized method of moments (GMM) estimator (3SLS-GMM) is \begin{equation} \bHat_\text{3SLS-GMM} = \left( X^\top Z \left( Z^\top \OHat Z \right)^{-1} Z^\top X \right)^{-1} X^\top Z \left( Z^\top \OHat Z \right)^{-1} Z^\top y \label{eq:3slsGmm} \end{equation} with \begin{equation} Z = \left[ \begin{array}{cccc} Z_1 & 0 & \cdots & 0\\ 0 & Z_2 & \cdots & 0\\ \vdots & \vdots & \ddots & \vdots\\ 0 & 0 & \cdots & Z_G \end{array}\right] . \end{equation} An estimator of the covariance matrix of the estimated 3SLS-GMM coefficients is \begin{equation} \COVHat \left[ \bHat_\text{3SLS-GMM} \right] = \left( X^\top Z \left( Z^\top \OHat Z \right)^{-1} Z^\top X \right)^{-1} . \end{equation} A fourth approach developed by \cite{schmidt90} himself is \begin{equation} \bHat_\text{3SLS-Schmidt} = \left( \XHat^\top \OHat^{-1} \XHat \right)^{-1} \XHat^\top \OHat^{-1} Z \left( Z^\top Z \right)^{-1} Z^\top y . \label{eq:3slsSchmidt} \end{equation} An estimator of the covariance matrix of these estimated coefficients is \begin{align} \COVHat \left[ \bHat_\text{3SLS-Schmidt} \right] = & \left( \XHat^\top \OHat^{-1} \XHat \right)^{-1} \XHat^\top \OHat^{-1} Z \left( Z^\top Z \right)^{-1} Z^\top \OHat Z \\ & \left( Z^\top Z \right)^{-1} Z^\top \OHat^{-1} \XHat \left( \XHat^\top \OHat^{-1} \XHat \right)^{-1} . \nonumber \end{align} The econometrics software \proglang{EViews} uses \begin{equation} \bHat_\text{3SLS-EViews} = \bHat_\text{2SLS} + \left( \XHat^\top \OHat^{-1} \XHat \right)^{-1} \XHat^\top \OHat^{-1} \left( y - X \bHat_\text{2SLS} \right) , \label{eq:3slsEViews} \end{equation} where $\bHat_\text{2SLS}$ is the two-stage least squares estimator as defined above. \proglang{EViews} uses the standard 3SLS formula (Equation~\ref{eq:cov-2sls-w2sls-3sls}) to calculate an estimator of the covariance matrix of the estimated coefficients. If the same instrumental variables are used in all equations ($Z_1 = Z_2 = \ldots = Z_G$), all the above mentioned approaches lead to identical estimates. However, if this is not the case, the results depend on the method used \citep{schmidt90}. The only reason to use different instruments for different equations is a correlation of the instruments of one equation with the disturbance terms of another equation. Otherwise, one could simply use all instruments in every equation \citep{schmidt90}. In this case, only the 3SLS-GMM (Equation~\ref{eq:3slsGmm}) and the 3SLS estimator developed by \cite{schmidt90} (Equation~\ref{eq:3slsSchmidt}) are consistent. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \subsection{Estimation under linear restrictions on the coefficients} \label{sec:Restrictions} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% In many empirical applications, it is desirable to estimate the coefficients under linear restrictions. For instance, in econometric demand and production analysis, it is common to estimate the coefficients under homogeneity and symmetry restrictions that are derived from the underlying theoretical model. There are two different methods to estimate the coefficients under linear restrictions. First, a matrix $M$ can be specified that \begin{equation} \beta = M \cdot \beta^\text{M} \label{eq:T-restr} , \end{equation} where $\beta^\text{M}$ is a vector of restricted (linear independent) coefficients, and $M$ is a matrix with the number of rows equal to the number of unrestricted coefficients ($\beta$) and the number of columns equal to the number of restricted coefficients ($\beta^\text{M}$). $M$ can be used to map each unrestricted coefficient to one or more restricted coefficients. The second method to estimate the coefficients under linear restrictions constrains the coefficients by \begin{equation} R \beta^\text{R} = q , \label{eq:restr-R} \end{equation} where $\beta^\text{R}$ is the vector of the restricted coefficients, and $R$ and $q$ are a matrix and vector, respectively, that specify the restrictions \citep[see][p.~100]{greene03}. Each linear independent restriction is represented by one row of $R$ and the corresponding element of~$q$. The first method is less flexible than the second% \footnote{ While restrictions like $\beta_1 = 2 \beta_2$ can be specified by both methods, restrictions like $\beta_1 + \beta_2 = 4$ can be specified only by the second method. }, but is preferable if the coefficients are estimated under many equality constraints across different equations of the system. Of course, these restrictions can be also specified using the latter method. However, while the latter method increases the dimension of the matrices to be inverted during estimation, the first reduces it. Thus, in some cases the latter way leads to estimation problems (e.g., (near) singularity of the matrices to be inverted), while the first does not. These two methods can be combined. In this case, the restrictions specified using the latter method are imposed on the linear independent coefficients that are restricted by the first method, so that \begin{equation} R \beta^\text{MR} = q , \end{equation} where $\beta^\text{MR}$ is the vector of the restricted $\beta^\text{M}$ coefficients. \subsubsection{Calculation of restricted estimators} If the first method (Equation~\ref{eq:T-restr}) is chosen to estimate the coefficients under these restrictions, the matrix of regressors $X$ is (post-)\hspace{0pt}multiplied by the $M$ matrix, so that \begin{equation} X^\text{M} = X \cdot M . \end{equation} Then, $X^\text{M}$ is substituted for $X$ and a standard estimation as described in the previous section is done (Equations~\ref{eq:ols-wls-sur}--\ref{eq:3slsEViews}). This results in the linear independent coefficient estimates $\bHat^\text{M}$ and their covariance matrix. The original coefficients can be obtained by Equation~\ref{eq:T-restr} and the estimated covariance matrix of the original coefficients can be obtained by \begin{equation} \COVHat \left[ \bHat \right] = M \cdot \COVHat \left[ \bHat^\text{M} \right] \cdot M^\top . \end{equation} The implementation of the second method to estimate the coefficients under linear restrictions (Equation~\ref{eq:restr-R}) is described for each estimation method in the following sections. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \subsubsection{Restricted OLS, WLS, and SUR estimation} The OLS, WLS, and SUR estimators restricted by $R \beta^\text{R} = q$ can be obtained by \begin{equation} \left[ \begin{array}{c} \bHat^\text{R} \\[0.2em] \lHat \end{array} \right] = \left[ \begin{array}{cc} X^\top \OHat^{-1} X & R^\top \\ R & 0 \end{array} \right]^{-1} \cdot \left[ \begin{array}{c} X^\top \OHat^{-1} y \\ q \end{array} \right] , \label{eq:ols-wls-sur-r} \end{equation} where $\lambda$ is a vector of the Lagrangean multipliers of the restrictions and $\OHat$ is defined as in Section~\ref{sec:Estimation-ols-wls-sur}. An estimator of the covariance matrix of the estimated coefficients is \begin{equation} \COVHat \left[ \begin{array}{c} \bHat^\text{R} \\[0.2em] \lHat \end{array} \right] = \left[ \begin{array}{cc} X^\top \OHat^{-1} X & R^\top \\ R & 0 \end{array} \right]^{-1} . \label{eq:cov-ols-wls-sur-r} \end{equation} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \subsubsection{Restricted 2SLS, W2SLS, and 3SLS estimation} The 2SLS, W2SLS, and standard 3SLS estimators restricted by $R \beta^\text{R} = q$ can be obtained by \begin{equation} \left[ \begin{array}{c} \bHat^\text{R} \\[0.2em] \lHat \end{array} \right] = \left[ \begin{array}{cc} \XHat^\top \OHat^{-1} \XHat & R^\top \\ R & 0 \end{array} \right]^{-1} \cdot \left[ \begin{array}{c} \XHat^\top \OHat^{-1} y \\ q \end{array} \right] , \label{eq:2sls-w2sls-3sls-r} \end{equation} where $\OHat$ is defined as in Section~\ref{sec:Estimation-2sls-w2sls-3sls}. An estimator of the covariance matrix of the estimated coefficients is \begin{equation} \COVHat \left[ \begin{array}{c} \bHat^\text{R} \\[0.2em] \lHat \end{array} \right] = \left[ \begin{array}{cc} \XHat^\top \OHat^{-1} \XHat & R^\top \\ R & 0 \end{array} \right]^{-1} . \label{eq:cov-2sls-w2sls-3sls-r} \end{equation} The 3SLS-IV estimator restricted by $R \beta^\text{R} = q$ can be obtained by \begin{equation} \left[ \begin{array}{c} \bHat^\text{R}_\text{3SLS-IV} \\[0.2em] \lHat \end{array} \right] = \left[ \begin{array}{cc} \XHat^\top \OHat^{-1} X & R^\top \\ R & 0 \end{array} \right]^{-1} \cdot \left[ \begin{array}{c} \XHat^\top \OHat^{-1} y \\ q \end{array} \right] , \label{eq:3slsIvR} \end{equation} where \begin{equation} \COVHat \left[ \begin{array}{c} \bHat^\text{R}_\text{3SLS-IV} \\[0.2em] \lHat \end{array} \right] = \left[ \begin{array}{cc} \XHat^\top \OHat^{-1} X & R^\top \\ R & 0 \end{array} \right]^{-1} . \end{equation} The restricted 3SLS-GMM estimator can be obtained by \begin{equation} \left[ \begin{array}{c} \bHat^\text{R}_\text{3SLS-GMM} \\[0.2em] \lHat \end{array} \right] = \left[ \begin{array}{cc} X^\top Z \left( Z^\top \OHat Z \right)^{-1} Z^\top X & R^\top \\ R & 0 \end{array} \right]^{-1} \cdot \left[ \begin{array}{c} X^\top Z \left( Z \OHat Z \right)^{-1} Z^\top y \\ q \end{array} \right] , \label{eq:3slsGmmR} \end{equation} where \begin{equation} \COVHat \left[ \begin{array}{c} \bHat^\text{R}_\text{3SLS-GMM} \\[0.2em] \lHat \end{array} \right] = \left[ \begin{array}{cc} X^\top Z \left( Z^\top \OHat Z \right)^{-1} Z^\top X & R^\top \\ R & 0 \end{array} \right]^{-1} . \end{equation} The restricted 3SLS estimator based on the suggestion of \cite{schmidt90} is \begin{equation} \left[ \begin{array}{c} \bHat^\text{R}_\text{3SLS-Schmidt} \\[0.2em] \lHat \end{array} \right] = \left[ \begin{array}{cc} \XHat^\top \OHat^{-1} \XHat & R^\top \\ R & 0 \end{array} \right]^{-1} \cdot \left[ \begin{array}{c} \XHat^\top \OHat^{-1} Z \left( Z^\top Z \right)^{-1} Z^\top y \\ q \end{array} \right] , \label{eq:3slsSchmidtR} \end{equation} where \begin{eqnarray} \COVHat \left[ \begin{array}{c} \bHat^\text{R}_\text{3SLS-Schmidt} \\[0.2em] \lHat \end{array} \right] & = & \left[ \begin{array}{cc} \XHat^\top \OHat^{-1} \XHat & R^\top \\ R & 0 \end{array} \right]^{-1} \\ & & \cdot \left[ \begin{array}{cc} \XHat^\top \OHat^{-1} Z \left( Z^\top Z \right)^{-1} Z^\top \OHat Z \left( Z^\top Z \right)^{-1} Z^\top \OHat^{-1} \XHat & 0^\top \\ 0 & 0 \end{array} \right] \nonumber \\ & & \cdot \left[ \begin{array}{cc} \XHat^\top \OHat^{-1} \XHat & R^\top \\ R & 0 \end{array} \right]^{-1} . \nonumber \end{eqnarray} The econometrics software \proglang{EViews} calculates the restricted 3SLS estimator by \begin{equation} \left[ \begin{array}{c} \bHat^\text{R}_\text{3SLS-EViews} \\[0.2em] \lHat \end{array} \right] = \left[ \begin{array}{cc} \XHat^\top \OHat^{-1} \XHat & R^\top \\ R & 0 \end{array} \right]^{-1} \cdot \left[ \begin{array}{c} \XHat^\top \OHat^{-1} \left( y - X \bHat^\text{R}_\text{2SLS} \right) \\ q \end{array} \right] , \label{eq:3slsEViewsR} \end{equation} where $\bHat^\text{R}_\text{2SLS}$ is the restricted 2SLS estimator calculated by Equation~\ref{eq:2sls-w2sls-3sls-r}. \proglang{EViews} uses the standard formula of the restricted 3SLS estimator (Equation~\ref{eq:cov-2sls-w2sls-3sls-r}) to calculate an estimator for the covariance matrix of the estimated coefficients. If the same instrumental variables are used in all equations ($Z_1 = Z_2 = \ldots = Z_G$), all the above mentioned approaches lead to identical coefficient estimates and identical covariance matrices of the estimated coefficients. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %\section{Other issues and tools}\label{sec:Other} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \subsection{Residual covariance matrix}\label{sec:residcov} Since the (true) disturbances ($u_i$) of the estimated equations are generally not known, their covariance matrix cannot be determined. Therefore, this covariance matrix is generally calculated from estimated residuals ($\uHat_i$) that are obtained from a first-step OLS or 2SLS estimation. Then, in a second step, the estimated residual covariance matrix can be employed for a WLS, SUR, W2SLS, or 3SLS estimation. In many cases, the residual covariance matrix is calculated by \begin{equation} \sHat_{ij} = \frac{ \uHat_i^\top \uHat_j }{ T }, \label{eq:rcovNoDfCor} \end{equation} where $T$ is the number of observations in each equation. However, in finite samples this estimator is biased, because it is not corrected for degrees of freedom. The usual single-equation procedure to correct for degrees of freedom cannot always be applied, because the number of regressors in each equation might differ. Two alternative approaches to calculate the residual covariance matrix are \begin{equation} \sHat_{ij} = \frac{ \uHat_i^\top \uHat_j } { \sqrt{ \left( T - K_i \right) \cdot \left( T - K_j \right) } } \label{eq:rcovGeomean} \end{equation} and \begin{equation} \sHat_{ij} = \frac{ \uHat_i^\top \uHat_j } { T - \max \left( K_i , K_j \right) } \; , \label{eq:rcovMax} \end{equation} where $K_i$ and $K_j$ are the number of regressors in equation $i$ and $j$, respectively. However, these formulas yield unbiased estimators only if $K_i = K_j$ \citep[p.~469]{judge85}. % Greene (2003, p. 344) says that the second is unbiased if i = j or K_i = K_j, % whereas the first is unbiased only if i = j. % However, if K_i = K_j the first and the second are equal. % Why is the first biased if K_i = K_j ??????????? A further approach to obtain a residual covariance matrix is \begin{eqnarray} \sHat_{ij} & = & \frac{ \uHat_i^\top \uHat_j } { T - K_i - K_j + \tr \left[ X_i \left( X_i^\top X_i \right)^{-1} X_i^\top X_j \left( X_j^\top X_j \right)^{-1} X_j^\top \right] } \label{eq:rcovTheil} \\ & = & \frac{ \uHat_i^\top \uHat_j } { T - K_i - K_j + \tr \left[ \left( X_i^\top X_i \right)^{-1} X_i^\top X_j \left( X_j^\top X_j \right)^{-1} X_j^\top X_i \right] } \end{eqnarray} \citep[p.~309]{zellner62c}. This yields an unbiased estimator for all elements of $\Sigma$, but even if $\SHat$ is an unbiased estimator of $\Sigma$, its inverse $\SHat^{-1}$ is not an unbiased estimator of $\Sigma^{-1}$ \citep[p.~322]{theil71}. Furthermore, the covariance matrix calculated by Equation~\ref{eq:rcovTheil} is not necessarily positive semidefinite \citep[p.~322]{theil71}. Hence, ``it is doubtful whether [this formula] is really superior to [Equation~\ref{eq:rcovNoDfCor}]'' \citep[p.~322]{theil71}. The WLS, SUR, W2SLS and 3SLS coefficient estimates are consistent if the residual covariance matrix is calculated using the residuals from a first-step OLS or 2SLS estimation. There exists also an alternative slightly different approach that consists of three steps.% \footnote{ For instance, this approach is applied by the command \code{TSCS} of the software \proglang{LIMDEP} that carries out SUR estimations in which all coefficient vectors are constrained to be equal \citep{greene06}. } In a first step, an OLS or 2SLS estimation is applied to obtain residuals to calculate a (first-step) residual covariance matrix. In a second step, the first-step residual covariance matrix is used to estimate the model by WLS or W2SLS and new residuals are obtained to calculate a (second-step) residual covariance matrix. Finally, in the third step, the second-step residual covariance matrix is used to estimate the model by SUR or 3SLS. If the estimated coefficients are not constrained by cross-equation restrictions, OLS and WLS estimates as well as 2SLS and W2SLS estimates are identical. Hence, in this case both approaches generate the same results. It is also possible to iterate WLS, SUR, W2SLS and 3SLS estimations. At each iteration the residual covariance matrix is calculated from the residuals of the previous iteration. If Equation~\ref{eq:rcovNoDfCor} is applied to calculate the residual covariance matrix, an iterated SUR estimation converges to maximum likelihood \citep[p.~345]{greene03}. In some uncommon cases, for instance in pooled estimations, where the coefficients are restricted to be equal in all equations, the means of the residuals of each equation are not equal to zero $( \overline{ \uHat }_i \neq 0 )$. Therefore, it might be argued that the residual covariance matrix should be calculated by subtracting the means from the residuals and substituting $\uHat_i - \overline{ \uHat }_i$ for $\uHat_i$ in Equations~\ref{eq:rcovNoDfCor}--\ref{eq:rcovTheil}. If the coefficients are estimated under any restrictions, the residual covariance matrix for a WLS, SUR, W2SLS, or 3SLS estimation can be obtained either from a restricted or from an unrestricted first-step estimation. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \subsection{Degrees of freedom} \label{sec:degreesOfFreedom} To our knowledge the question about how to determine the degrees of freedom for single-coefficient $t$ tests is not comprehensively discussed in the literature. While sometimes the degrees of freedom of the entire system (total number of observations in all equations minus total number of estimated coefficients) are applied, in other cases the degrees of freedom of each single equation (number of observations in the equations minus number of estimated coefficients in the equation) are used. Asymptotically, this distinction does not make a difference. However, in many empirical applications, the number of observations of each equation is rather small, and therefore, it matters. If a system of equations is estimated by an unrestricted OLS and the covariance matrix of the coefficients is calculated with $\OHat$ in Equation~\ref{eq:cov-ols-wls-sur} equal to $\SHat \otimes I_T$, the estimated coefficients and their standard errors are identical to an equation-wise OLS estimation. In this case, it is reasonable to use the degrees of freedom of each single equation, because this yields the same $P$ values as the equation-wise OLS estimation. In contrast, if a system of equations is estimated with many cross-equation restrictions and the covariance matrix of an OLS estimation is calculated with $\OHat$ in Equation~\ref{eq:cov-ols-wls-sur} equal to $\sHat^2 I_{G \cdot T}$, the system estimation is similar to a single equation estimation. Therefore, in this case, it seems to be reasonable to use the degrees of freedom of the entire system. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \subsection{Goodness of fit} The goodness of fit of each single equation can be measured by the traditional $R^2$ values \begin{equation} R_i^2 = 1 - \frac{ \uHat_i^\top \uHat_i } { ( y_i - \overline{y_i} )^\top ( y_i - \overline{y_i} ) } \; , \end{equation} where $R_i^2$ is the $R^2$ value of the $i$th equation and $\overline{y_i}$ is the mean value of $y_i$. The goodness of fit of the whole system can be measured by the McElroy's $R^2$ value % also: \citep[p.~345]{greene03} \begin{equation} R_*^2 = 1 - \frac{ \uHat^\top \OHat^{-1} \uHat } { y^\top \left( \SHat^{-1} \otimes \left( I_T - \frac{\iota \iota^\top}{T} \right) \right) y } , \end{equation} where $\iota$ is a column vector of $T$ ones \citep{mcelroy77}. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \subsection{Testing linear restrictions} \label{sec:testingRestrictions} Linear restrictions can be tested by an $F$ test, two Wald tests and a likelihood ratio (LR) test. The $F$ statistic for systems of equations is \begin{equation} F = \frac{ ( R \bHat - q )^\top ( R ( X^\top ( \Sigma \otimes I )^{-1} X )^{-1} R^\top )^{-1} ( R \bHat - q ) / j }{ \uHat^\top ( \Sigma \otimes I )^{-1} \uHat / ( G \cdot T - K ) } \; , \label{eq:f-test} \end{equation} where $j$ is the number of restrictions, $K$ is the total number of estimated coefficients, and all other variables are as defined before \citep[p.~314]{theil71}. Under the null hypothesis, $F$ is $F$ distributed with $j$ and $G \cdot T - K$ degrees of freedom. However, $F$ in Equation~\ref{eq:f-test} cannot be computed, because $\Sigma$ is generally unknown. As a solution, \citet[p.~314]{theil71} proposes to replace the unknown $\Sigma$ in Equation~\ref{eq:f-test} by the estimated covariance matrix $\SHat$. \begin{equation} \hat{F} = \frac{ ( R \bHat - q )^\top ( R ( X^\top ( \SHat \otimes I )^{-1} X )^{-1} R^\top )^{-1} ( R \bHat - q ) / j }{ \uHat^\top ( \SHat \otimes I )^{-1} \uHat / ( G \cdot T - K ) } \label{eq:f-test-theil} \end{equation} Asymptotically, $\hat{F}$ has the same distribution as $F$ in Equation~\ref{eq:f-test}, because the numerator of Equation~\ref{eq:f-test-theil} converges in probability to the numerator of Equation~\ref{eq:f-test} and the denominator of Equation~\ref{eq:f-test-theil} converges in probability to the denominator of Equation~\ref{eq:f-test} \citep[p.~402]{theil71}. Furthermore, the denominators of both Equations~\ref{eq:f-test} and~\ref{eq:f-test-theil} converge in probability to~$1$. Taking this into account and applying Equation~\ref{eq:cov-ols-wls-sur}, we obtain the usual $F$~statistic of the Wald test. \begin{equation} \hat{\hat{F}} = \frac{ ( R \bHat - q )^\top ( R \, \COVHat \left[ \bHat \right] R^\top )^{-1} ( R \bHat - q ) }{ j } \label{eq:f-test-wald} \end{equation} Under the null hypotheses, also $\hat{\hat{F}}$ is asymptotically $F$ distributed with $j$ and $G \cdot T - K$ degrees of freedom. Multiplying Equation~\ref{eq:f-test-wald} with $j$, we obtain the usual $\chi^2$ statistic for the Wald test \begin{equation} W = ( R \bHat - q )^\top ( R \, \COVHat [ \bHat ] \, R^\top )^{-1} ( R \bHat - q ) . \label{eq:chi2-test-wald} \end{equation} Asymptotically, $W$ has a $\chi^2$ distribution with $j$ degrees of freedom under the null hypothesis \citep[p.~347]{greene03}. The likelihood-ratio (LR) statistic for systems of equations is \begin{equation} \LR = T \cdot \left( \log \left| \SHat_r \right| - \log \left| \SHat_u \right| \right) , \label{eq:lr-test} \end{equation} where $T$ is the number of observations per equation, and $\SHat_r$ and $\SHat_u$ are the residual covariance matrices calculated by Equation~\ref{eq:rcovNoDfCor} of the restricted and unrestricted estimation, respectively. Asymptotically, $\LR$ has a $\chi^2$ distribution with $j$ degrees of freedom under the null hypothesis \citep[p.~349]{greene03}. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \subsection{Hausman test} \label{sec:hausman} \citet{hausman78} developed a test for misspecification. The null hypothesis of the test is that the instrumental variables of each equation are uncorrelated with the disturbance terms of all other equations ($\E \left[ u_i^\top Z_j \right] = 0 \, \forall \, i \neq j$). Under this null hypothesis, both the 2SLS and the 3SLS estimator are consistent, but the 3SLS estimator is (asymptotically) more efficient. Under the alternative hypothesis, the 2SLS estimator is consistent but the 3SLS estimator is inconsistent, i.e., the instrumental variables of each equation are uncorrelated with the disturbances of the same equation ($\E \left[ u_i^\top Z_i \right] = 0 \, \forall \, i$), but the instrumental variables of at least one equation are correlated with the disturbances of another equation ($\E \left[ u_i^\top Z_j \right] \neq 0 \, \exists \, i \neq j$). The Hausman test statistic is \begin{equation} m = \left( \bHat_\text{2SLS} - \bHat_\text{3SLS} \right)^\top \left( \COVHat \left[ \bHat_\text{2SLS} \right] - \COVHat \left[ \bHat_\text{3SLS} \right] \right) \left( \bHat_\text{2SLS} - \bHat_\text{3SLS} \right) , \label{eq:hausman} \end{equation} where $\bHat_\text{2SLS}$ and $\COVHat \left[ \bHat_\text{2SLS} \right]$ are the estimated coefficient and covariance matrix from a 2SLS estimation, and $\bHat_\text{3SLS}$ and $\COVHat \left[ \bHat_\text{3SLS} \right]$ are the estimated coefficients and covariance matrix from a 3SLS estimation. Under the null hypothesis, this test statistic has a $\chi^2$ distribution with degrees of freedom equal to the number of estimated coefficients. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \section{Source code}\label{sec:code} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% The source code of the \pkg{systemfit} package is publicly available for download from the Comprehensive \proglang{R} Archive Network (CRAN, \url{http://CRAN.R-project.org/}). The basic functionality of this package is provided by the function \code{systemfit}. Moreover, this package provides tools for statistical tests, functions (methods) to show, extract or calculate results, some convenience functions, and internal helper functions. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \subsection[The basic function systemfit]{The basic function \code{systemfit}} The \code{systemfit} function estimates systems of linear equations by different estimation methods. Where possible, the user interface and the returned object of this function follow the function \code{lm} --- the basic tool for linear regressions in \proglang{R} --- to make the usage of \code{systemfit} as easy as possible for \proglang{R} users. The econometric estimation is done by applying the formulas in Sections~\ref{sec:Estimation-ols-wls-sur} and~\ref{sec:Estimation-2sls-w2sls-3sls} or --- if the coefficients are estimate under linear restrictions --- by the formulas in Section~\ref{sec:Restrictions}. If the restrictions on the coefficients are specified symbolically, function \code{makeHypothesis} of the \pkg{car} package \citep{r-car-1.2-1, fox02a} is used to create the restriction matrix. The \code{systemfit} function returns a list of class \code{systemfit} that contains the results that belong to the entire system of equations. One special element of this list is called \code{eq}, which is a list that contains one object for each estimated equation. These objects are lists of class \codeD{systemfit}{equation} and contain the results that belong only to the regarding equation. A complete description is available in the documentation of this function that is included in the package. A comparison of the elements returned by \code{lm} and by \code{systemfit} is available in appendix~\ref{sec:returned-object}. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \subsection{Statistical tests} The \code{linearHypothesis} and \code{lrtest} methods for \code{systemfit} objects as well as the function \codeD{hausman}{systemfit} apply the statistical tests described in Sections~\ref{sec:testingRestrictions} and~\ref{sec:hausman}. The \code{linearHypothesis} method for {systemfit} objects can be used to test linear restrictions on the estimated coefficients by \citeauthor{theil71}'s $F$ test or by usual Wald tests. Internally, \citeauthor{theil71}'s $F$ statistic is computed by the hidden function \codeD{.ftest}{systemfit} and the Wald tests are computed by the default \code{linearHypothesis} method of the \pkg{car} package \citep{r-car-1.2-1, fox02a}. The \code{lrtest} method for \code{systemfit} objects is a wrapper function to the default \code{lrtest} method of the \pkg{lmtest} package \citep{r-lmtest}, which computes the likelihood-ratio (LR) test statistic. All these functions return an object of class \code{anova} that contains --- amongst others --- the empirical test statistic, the degrees of freedom, and the corresponding $P$ value. The function \codeD{hausman}{systemfit} tests the consistency of the 3SLS estimator. It returns an object of class \code{htest}, which contains --- amongst others --- the empirical test statistic, the degrees of freedom, and the $P$ value. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \subsection{Other methods and functions} The \pkg{systemfit} package provides several methods for objects both of classes \code{systemfit} and \codeD{systemfit}{equation}: \code{print} methods print the estimation results, \code{summary} methods calculate summary results, \code{confint} methods compute confidence intervals for the coefficients, \code{predict} methods calculate predicted values, \code{coef} methods extract the estimated coefficients, \code{vcov} methods extract their covariance matrix, \code{fitted} methods extract the fitted values, \code{residuals} methods extract the residuals, \code{formula} methods extract the formula(s), \code{terms} methods extract the model terms, \codeD{model}{frame} methods extract the model frame, and \codeD{model}{matrix} methods extract the model matrix. Some methods can be applied to objects of class \code{systemfit} only: a \code{correlation} method calculates the correlations between the predictions of two equations, an \code{se.ratio} method computes the ratios of the standard errors of the predictions between two models, and a \code{logLik} method extracts the log likelihood value. The package provides \code{print} methods to print objects of classes \codeD{summary}{systemfit}, \codeDD{summary}{systemfit}{equation}, and \codeD{confint}{systemfit} that are returned by the above mentioned \code{summary} and \code{confint} methods. There exist also two \code{coef} methods to extract the estimated coefficients, their standard errors, $t$ values, and $P$ values from objects of classes \codeD{summary}{systemfit} and \codeDD{summary}{systemfit}{equation}.% \footnote{% There does not exist a special method to extract the degrees of freedom of the residuals from \code{systemfit} objects, because the default method of \code{df.residual} works for these objects. } The convenience function \code{createSystemfitModel} creates a model for \code{systemfit} by random numbers; \codeD{systemfit}{control} sets suitable default values for the technical control parameters for \code{systemfit}. Finally, the package includes some internal (hidden) helper functions: \codeD{.prepareData}{systemfit}, \code{.stackMatList}, and \code{.prepareWmatrix} for preparing the data matrices; \code{.calcXtOmegaInv} and \code{.calcGLS} for calculating the GLS estimator; \code{.calcResidCov} and \code{.calcSigma2} for calculating the (co)variances of the residuals; and \codeD{.ftest}{systemfit} for calculating \citeauthor{theil71}'s $F$ statistic. If \code{systemfit} is applied to a (classical) ``seemingly unrelated regression'' analysis with panel data, it calls the hidden internal function \code{.systemfitPanel}, which reshapes the data, creates the formulas to be estimated, and --- if requested --- specifies restrictions to ensure that the coefficients of all individuals are equal. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \subsection{Efficiency of computations} \label{sec:code-efficiency} We have followed \cite{bates04} to make the code of \pkg{systemfit} faster and more stable. First, if a formula contains an inverse of a matrix that is post-multiplied by a vector or matrix, we use \code{solve(A,b)} instead of \code{solve(A) \%*\% b}. Second, we calculate crossproducts by \code{crossprod(X)} or \code{crossprod(X,y)} instead of \code{t(X) \%*\% X} or \code{t(X) \%*\% y}, respectively. The matrix $\Omega^{-1}$ that is used to compute the estimated coefficients and their covariance matrix is of size $( G \cdot T ) \times ( G \cdot T )$ (see Sections~\ref{sec:Estimation-ols-wls-sur}, \ref{sec:Estimation-2sls-w2sls-3sls}, and~\ref{sec:Restrictions}). In case of large data sets, $\Omega^{-1}$ becomes computationally infeasible. Therefore, we use the following transformation and compute $X^\top \Omega^{-1}$ by dividing the $X$ matrix into submatrices, doing some calculations with these submatrices, adding up some of these submatrices, and finally putting the submatrices together, so that \begin{equation} X^\top \Omega^{-1} %= X^\top \left( \Sigma^{-1} \otimes I \right) = \sum_{i=1} \left[ \begin{array}{c} \sigma^{1i} {X^1} \\ \sigma^{2i} {X^2} \\ \vdots \\ \sigma^{Gi} {X^G} \\ \end{array} \right]^\top , \label{eq:omegaInv} \end{equation} where $\sigma^{ij}$ are the elements of the matrix $\Sigma^{-1}$, and $X^i$ is a submatrix of $X$ that contains the rows that belong to the $i$'s equation. This computation is done inside the internal (hidden) function \code{.calcXtOmegaInv}. Since version 1.0, the \code{systemfit} function by default uses the \pkg{Matrix} package \citep{r-matrix-07} for all computations where matrices are involved. The \pkg{Matrix} package provides classes for different types of matrices. For instance, we choose class \code{dgeMatrix} (``real matrices in general storage mode''), for matrices $X_i$ in Equation~\ref{eq:model-array}, class \code{dgCMatrix} (``general, numeric, sparse matrices in the (sorted) compressed sparse column format'') for matrix $X$ in Equation~\ref{eq:model-matrices}, and class \code{dspMatrix} (``symmetric real matrices in packed storage (one triangle only)'') for the residual covariance matrix $\SHat$. If the \pkg{Matrix} package is used, the possibly huge matrix $\Omega^{-1}$ is no longer a problem, because it is a sparse matrix that can be stored in a compressed format (class \code{dgCMatrix}). Hence, we no longer need the algorithm in Equation~\ref{eq:omegaInv}. We have tested different ways to calculate a GLS estimator like in Equation~\ref{eq:ols-wls-sur} and we found that the following code is the fastest: <>= sigmaInv <- solve( residCov ) xtOmegaInv <- crossprod( xMat, kronecker( sigmaInv, Diagonal( nObs ) ) ) coef <- solve( xtOmegaInv %*% xMat, xtOmegaInv %*% yVec ) @ In this code snippet, \code{residCov} is the residual covariance matrix $\SHat$, \code{nObs} is the number of observations in each equation $T$, \code{xMat} is the matrix $X$ and \code{yVec} is the vector $y$ in Equation~\ref{eq:ols-wls-sur}. By default, the \code{systemfit} function uses the \pkg{Matrix} package to perform GLS estimations, because using this package considerably decreases the computation time for many common models. However, the estimation of small models with small data sets gets slower by using the \pkg{Matrix} package (see appendix~\ref{sec:timings}). While this increase in computation time is often imperceptible to human beings, it might matter in some cases such as iterated estimations or Monte Carlo studies. Therefore, the user can opt for not using the \pkg{Matrix} package, but Equation~\ref{eq:omegaInv} with standard \proglang{R} matrices. \subsection[Overlap with other functions and packages in R] {Overlap with other functions and packages in \proglang{R}} Single-equation models can be fitted in \proglang{R} by OLS with function \code{lm} (package \pkg{stats}) and by 2SLS with function \code{tsls} (package \pkg{sem}, \citealp{r-sem-2.0}). This is also possible with the \code{systemfit} function, but \code{systemfit} is specialized in estimating systems of equation, i.e., more than one equation. Its capability to estimate single-equation models is just a side-effect. Function \code{sem} (package \pkg{sem}, \citealp{r-sem-2.0}) can be used to estimate structural equation models in \proglang{R} by limited information maximum likelihood (LIML) and full information maximum likelihood (FIML) assuming normal or multinormal errors, respectively. A special feature of this function is the estimation of models with unobserved (``latent'') variables, which is not possible with \code{systemfit}. While \code{sem} cannot be used to consistently estimate systems of simultaneous equations with some endogenous regressors, it can be used to estimate systems of equations, where all regressors are exogenous. However, the latter is rather cumbersome (see appendix~\ref{sec:sem}). Hence, \code{systemfit} is the only function in \proglang{R} that can be used to estimate systems of simultaneous equations and it is the most convenient function to estimate systems of equations with purely exogenous regressors. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \section[Using systemfit]{Using \pkg{systemfit}}\label{sec:Usage} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% In this section we demonstrate how to use the \pkg{systemfit} package. First, we show the standard usage of \code{systemfit} by a simple example. Second, several options that can be specified by the user are presented. Then, the usage of \code{systemfit} for a (classical) ``seemingly unrelated regression'' analysis with panel data is described. Finally, we demonstrate how to apply some statistical tests. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \subsection[Standard usage of systemfit]{Standard usage of \code{systemfit}} \label{sec:standard-usage} As described in the previous section, systems of equations can be econometrically estimated with the function \code{systemfit}. The only mandatory argument is \code{formula}. Typically, it is a list of formulas to be estimated, but it may also be a single formula for estimating a single-equation model. Each formula is a standard regression formula in \proglang{R} (see documentation of \code{formula}). The following demonstration uses an example taken from \citet[p.~685]{kmenta86}. We want to estimate a small model of the US food market: \begin{align} \texttt{consump} & = \beta_1 + \beta_2 \cdot \texttt{price} + \beta_3 \cdot \texttt{income} \\ \texttt{consump} & = \beta_4 + \beta_5 \cdot \texttt{price} + \beta_6 \cdot \texttt{farmPrice} + \beta_7 \cdot \texttt{trend} \end{align} The first equation represents the demand side of the food market. Variable \code{consump} (food consumption per capita) is the dependent variable. The regressors are \code{price} (ratio of food prices to general consumer prices) and \code{income} (disposable income) as well as a constant. The second equation specifies the supply side of the food market. Variable \code{consump} is the dependent variable of this equation as well. The regressors are again \code{price} (ratio of food prices to general consumer prices) and a constant as well as \code{farmPrice} (ratio of preceding year's prices received by farmers to general consumer prices) and \code{trend} (a time trend in years). These equations can be estimated by OLS in \proglang{R} by <>= library( "systemfit" ) data( "Kmenta" ) attach( Kmenta ) eqDemand <- consump ~ price + income eqSupply <- consump ~ price + farmPrice + trend eqSystem <- list( demand = eqDemand, supply = eqSupply ) fitols <- systemfit( eqSystem ) print( fitols ) @ The first line loads the \pkg{systemfit} package. The second line loads example data that are included with the package. They are attached to the \proglang{R} search path in line three. In the fourth and fifth line, the demand and supply equations are specified, respectively.% \footnote{ A regression constant is always implied if not explicitly omitted. } In the sixth line, these equations are concatenated into a list and are labeled \code{demand} and \code{supply}, respectively.% \footnote{ If no labels are provided, the equations are numbered consecutively ( \code{eq1}, \code{eq2}, \ldots ). } Finally, in the last two lines, the regression is performed and the estimation results are printed. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \subsection[User options of systemfit]{User options of \code{systemfit}} \label{sec:user-options} The user can modify the default estimation method by providing additional optional arguments, e.g., to specify instrumental variables or restrictions on the coefficients. All optional arguments are described in the following: %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \subsubsection{Estimation method} The optional argument \code{method} is a string that determines the estimation method. It must be either \code{"OLS"}, \code{"WLS"}, \code{"SUR"}, \code{"2SLS"}, \code{"W2SLS"}, or \code{"3SLS"}. These methods correspond to the estimation methods described in Sections~\ref{sec:Estimation-ols-wls-sur}, \ref{sec:Estimation-2sls-w2sls-3sls}, and~\ref{sec:Restrictions}. The following command estimates the model described above as ``seemingly unrelated regression''. <<>>= fitsur <- systemfit( eqSystem, method = "SUR" ) @ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \subsubsection{Instrumental variables} The instruments for a 2SLS, W2SLS or 3SLS estimation can be specified by the argument \code{inst}. If the same instruments should be used for all equations, \code{inst} must be a one-sided formula.% \footnote{ A one-sided formula is a standard formula in \proglang{R} without a dependent variable.} If different instruments should be used for each equation, \code{inst} must be a list that contains a one-sided formula for each equation. The following example uses instrumental variables to estimate the model described above by ``three-stage least squares'' (3SLS). While the first command specifies the same instruments for all equations, the second uses different instruments: <<>>= fit3sls <- systemfit( eqSystem, method = "3SLS", inst = ~ income + farmPrice + trend ) fit3sls2 <- systemfit( eqSystem, method = "3SLS", inst = list( ~ farmPrice + trend, ~ income + farmPrice + trend ) ) @ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \subsubsection{Data} Having all data in the global environment or attached to the search path is often inconvenient. Therefore, \code{systemfit} has the argument \code{data} to specify a data frame that contains the variables of the model. In the following example, we use this argument to specify that the data for the estimation should be taken from the data frame \code{Kmenta}. Hence, we no longer need to attach this data frame before calling \code{systemfit}: <<>>= fitsur <- systemfit( eqSystem, method = "SUR", data = Kmenta ) @ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \subsubsection{Restrictions on the coefficients} As outlined in Section~\ref{sec:Restrictions}, restrictions on the coefficients can be specified in two ways. One way is to use the matrix $R$ and the vector $q$ (see Section~\ref{sec:Restrictions}). These restrictions can be specified symbolically by argument \codeD{restrict}{matrix} as in the generic function \code{linearHypothesis} of the \pkg{car} package \citep{r-car-1.2-1, fox02a}. This argument must be a vector of character strings, where each element represents one linear restriction, and each element must be either a linear combination of coefficients, or a linear equation in the coefficients (see documentation of function \code{linearHypothesis} in the \pkg{car} package, \citealp{r-car-1.2-1, fox02a}). We illustrate this by estimating the model under the restriction $\beta_2 + \beta_6 = 0$. Since the name of $\beta_2$ (coefficient of variable \code{price} in equation \code{demand}) is \code{demand\_price} and the name of $\beta_6$ (coefficient of variable \code{farmPrice} in equation \code{supply}) is \code{supply\_farmPrice}, this restriction can be specified by <>= restrict <- "demand_price + supply_farmPrice = 0" fitsurRmat <- systemfit(eqSystem, method = "SUR", restrict.matrix = restrict) @ \label{code:Rmat} Alternatively, the restrictions via matrix $R$ and vector $q$ can be specified numerically. The matrix $R$ can be specified with argument \codeD{restrict}{matrix} and the vector $q$ with argument \codeD{restrict}{rhs}. <>= Rmat <- matrix(0, nrow = 1, ncol = 7) Rmat[1, 2] <- 1 Rmat[1, 6] <- 1 qvec <- c(0) fitsurRmatNum <- systemfit(eqSystem, method = "SUR", restrict.matrix = Rmat, restrict.rhs = qvec) @ The first line creates a $1 \times 7$ matrix of zeros, where 1 is the number of restrictions and 7 is the number of unrestricted coefficients. The following two lines specify this matrix in a way that the multiplication with the coefficient vector results in $ \beta_2 + \beta_6 $. The fourth line creates a vector with a single element that contains the right hand side of the restriction, i.e., zero. Finally the coefficients are estimated under the restriction $\beta_2 + \beta_6 = 0$. The other way to specify restrictions on the coefficients is to modify the regressor matrix by post-multiplying it with a matrix, say $M$ (see Section~\ref{sec:Restrictions}). This kind of restriction can be specified by setting argument \codeD{restrict}{regMat} equal to the matrix $M$. We convert the restriction specified above to $\beta_2 = - \beta_6$, and set $\beta_1 = \beta^\text{M}_1$, \ldots, $\beta_5 = \beta^\text{M}_5$, $\beta_6 = - \beta^\text{M}_2$, and $\beta_7 = \beta^\text{M}_6$. We can do this in \proglang{R} by <>= modRegMat <- matrix(0, nrow = 7, ncol = 6) modRegMat[1:5, 1:5] <- diag(5) modRegMat[6, 2] <- -1 modRegMat[7, 6] <- 1 fitsurRegMat <- systemfit(eqSystem, method = "SUR", restrict.regMat = modRegMat) @ The first line creates a $7 \times 6$ matrix of zeros, where 7 is the number of unrestricted coefficients and 6 is the number of restricted coefficients. The following three lines specify the matrix $M$ (\code{modRegMat}) as described before. Finally the coefficients are estimated under the restriction $\beta^\text{M}_2 = \beta_2 = - \beta_6$. Of course, the estimation results do not depend on the method that was used to specify this restriction: <<>>= all.equal( coef( fitsurRmat ), coef( fitsurRmatNum ) ) all.equal( coef( fitsurRmat ), coef( fitsurRegMat ) ) @ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \subsubsection{Iteration control} The estimation methods WLS, SUR, W2SLS and 3SLS need a covariance matrix of the residuals that can be calculated from a first-step OLS or 2SLS estimation (see Section~\ref{sec:residcov}). This procedure can be iterated and at each iteration the covariance matrix is calculated from the previous step estimation. This iteration is repeated until the maximum number of iterations is reached or the coefficient estimates have converged. The maximum number of iterations is specified by argument \code{maxiter}. Its default value is one, which means no iteration. The convergence criterion is \begin{equation} \sqrt{ \frac{ \sum_i (\beta_{i,g} - \beta_{i,g-1})^2 } { \sum_i \beta_{i,g-1}^2 }} < \texttt{tol} , \end{equation} where $\beta_{i,g}$ is the $i$th coefficient of the $g$th iteration. The default value of the convergence criterion (argument \code{tol}) is $10^{-5}$. In the following example, we estimate the model described above by iterated SUR: <<>>= fitsurit <- systemfit( eqSystem, method = "SUR", maxiter = 500 ) @ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \subsubsection{Residual covariance matrix} It was explained in Section~\ref{sec:residcov} that several different methods have been proposed to calculate the residual covariance matrix. The user can specify, which method \code{systemfit} should use. Possible values of the argument \code{methodResidCov} are presented in Table~\ref{tab:methodResidCov}. By default, \code{systemfit} uses Equation~\ref{eq:rcovGeomean}. \begin{table}[H] \centering \begin{tabular}{|c|c|} \hline argument & equation \\ \code{methodResidCov} & \\ \hline \code{"noDfCor"} & \ref{eq:rcovNoDfCor} \\ \hline \code{"geomean"} & \ref{eq:rcovGeomean} \\ \hline \code{"max"} & \ref{eq:rcovMax} \\ \hline \code{"Theil"} & \ref{eq:rcovTheil} \\ \hline \end{tabular} \caption{Possible values of argument \code{methodResidCov}} \label{tab:methodResidCov} \end{table} Furthermore, the user can specify whether the means should be subtracted from the residuals before Equations~\ref{eq:rcovNoDfCor}, \ref{eq:rcovGeomean}, \ref{eq:rcovMax}, or~\ref{eq:rcovTheil} are applied to calculate the residual covariance matrix (see Section~\ref{sec:residcov}). The corresponding argument is called \code{centerResiduals}. It must be either \code{TRUE} (subtract the means) or \code{FALSE} (take the unmodified residuals). The default value of \code{centerResiduals} is \code{FALSE}. Moreover, if the coefficients are estimated under restrictions, the user can use argument \code{residCovRestricted} to specify whether the residual covariance matrix for a WLS, SUR, W2SLS, or 3SLS estimation should be obtained from a restricted or from an unrestricted first-step estimation (see Section~\ref{sec:residcov}). If this argument is \code{TRUE} (the default), the residual covariance matrix is obtained from a restricted OLS or 2SLS estimation. If it is \code{FALSE}, the residual covariance matrix is obtained from an unrestricted first-step estimation. Finally, argument \code{residCovWeighted} can be used to decide, whether the residual covariance matrix for a SUR (3SLS) estimation should be obtained from a WLS (W2SLS) estimation instead of from an OLS (2SLS) estimation (see Section~\ref{sec:residcov}). By default, \code{residCovWeighted} is \code{FALSE}, which means that the residuals of an OLS (2SLS) estimation are used to compute the residual covariance matrix. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \subsubsection{3SLS formula} As discussed in Sections~\ref{sec:Estimation-2sls-w2sls-3sls} and~\ref{sec:Restrictions}, there exist several different methods to perform a 3SLS estimation. The user can specify the method by argument \code{method3sls}. Possible values are presented in Table~\ref{tab:method3sls}. The default value is \code{"GLS"}. \begin{table}[H] \centering \begin{tabular}{|c|c|c|} \hline argument & equation & equation \\ \code{method3sls} & (unrestricted) & (restricted) \\ \hline \code{"GLS"} & \ref{eq:2sls-w2sls-3sls} & \ref{eq:2sls-w2sls-3sls-r} \\ \hline \code{"IV"} & \ref{eq:3slsIv} & \ref{eq:3slsIvR} \\ \hline \code{"GMM"} & \ref{eq:3slsGmm} & \ref{eq:3slsGmmR} \\ \hline \code{"Schmidt"} & \ref{eq:3slsSchmidt} & \ref{eq:3slsSchmidtR} \\ \hline \code{"EViews"} & \ref{eq:3slsEViews} & \ref{eq:3slsEViewsR} \\ \hline \end{tabular} \caption{Possible values of argument \code{method3sls}} \label{tab:method3sls} \end{table} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \subsubsection{Sigma squared} In case of OLS or 2SLS estimations, argument \code{singleEqSigma} can be used to specify, whether different $\sigma^2$s for each single equation or the same $\sigma^2$ for all equations should be used. If argument \code{singleEqSigma} is \code{TRUE}, $\OHat$ in Equation~\ref{eq:cov-ols-wls-sur} or~\ref{eq:cov-2sls-w2sls-3sls} is set to $\SHat \otimes I_T$. In contrast, if argument \code{singleEqSigma} is \code{FALSE}, $\OHat$ in Equation~\ref{eq:cov-ols-wls-sur} or~\ref{eq:cov-2sls-w2sls-3sls} is set to $\sHat^2 I_{G \cdot T}$. In case of an unrestricted regression, argument \code{singleEqSigma} is \code{TRUE} by default. However, if the coefficients are estimated under restrictions, this argument is \code{FALSE} by default. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \subsubsection{System options} Furthermore, two options regarding some internal calculations are available. First, argument \code{solvetol} specifies the tolerance level for detecting linear dependencies when inverting a matrix or calculating a determinant (using functions \code{solve} and \code{det}). The default value depends on the used computer system and is equal to the default tolerance level of \code{solve} and \code{det}. Second, argument \code{useMatrix} specifies whether the \pkg{Matrix} package \citep{r-matrix-07} should be used for all computations where matrices are involved (see Section~\ref{sec:code-efficiency}). %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \subsubsection{Returned data objects} Finally, the user can decide whether \code{systemfit} should return some data objects. Argument \code{model} indicates whether a data frame with the data of the model should be returned. Its default value is \code{TRUE}, i.e., the model frame is returned. Arguments \code{x}, \code{y}, and \code{z} specify whether the model matrices ($X_i$), the responses ($y_i$), and the matrices of instrumental variables ($Z_i$), respectively, should be returned. These three arguments are \code{FALSE} by default, i.e., these data objects are not returned. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \subsection[Summary results with summary.systemfit] {Summary results with \code{summary.systemfit}} The \code{summary} method can be used to compute and print summary results of objects returned by \code{systemfit}. <<>>= summary( fitsur ) @ First, the estimation method is reported and a few summary statistics for the entire system and for each equation are given. Then, the covariance matrix used for estimation and the covariance matrix as well as the correlation matrix of the (final) residuals are printed. Finally, the estimation results of each equation are reported: the formula of the estimated equation, the estimated coefficients, their standard errors, $t$ values, $P$ values and codes indicating their statistical significance, as well as some other statistics like the standard error of the residuals and the $R^2$ value of the equation. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \subsubsection[Degrees of freedom for t tests] {Degrees of freedom for $t$ tests} The \code{summary} method for \code{systemfit} objects has an optional argument \code{useDfSys}. It selects the approach that is applied by \code{systemfit} to determine the degrees of freedom of $t$ tests of the estimated coefficients (Section~\ref{sec:degreesOfFreedom}). If argument \code{useDfSys} is \code{TRUE}, the degrees of freedom of the whole system are taken. In contrast, if \code{useDfSys} is \code{FALSE}, the degrees of freedom of the single equation are taken. If the coefficients are estimated under restrictions, argument \code{useDfSys} is \code{TRUE} by default. However, if no restrictions on the coefficient are specified, the default value of \code{useDfSys} is \code{FALSE}. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \subsubsection{Reduce amount of printed output} The optional arguments \code{residCov} and \code{equations} can be used reduce the amount of the printed output. Argument \code{residCov} specifies whether the covariance matrix and the correlation matrix of the residuals are printed. Argument \code{equations} specifies whether summary results of each equation are printed. By default, both arguments are \code{TRUE}. The following command returns a sparse summary output: <<>>= summary( fitsur, residCov = FALSE, equations = FALSE ) @ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \subsection{Panel data} The \code{systemfit} function can also be used for a (classical) ``seemingly unrelated regression'' analysis with panel data. For this type of analysis, the data must be provided in a transformed data frame of class \codeD{pdata}{frame}% \footnote{ Generally, panel data can be either in ``long format'' (different individuals are arranged below each other) or in ``wide format'' (different individuals are arranged next to each other). For this analysis, the data must be in ``long format''. } which can be created with the function \codeD{pdata}{frame} from the \proglang{R} package \pkg{plm} \citep{r-plm-0.3-1}. In contrast to the previously described usage of \code{systemfit}, argument \code{formula} must be a single equation (object of class \code{formula}). This formula is estimated for all individuals. We demonstrate the application of \code{systemfit} to panel data using an example taken from \citet[p.~340]{greene03} that is based on \citet{grunfeld58}. We want to estimate a model for gross investment of 5 US firms in the years 1935--1954: \begin{equation} \texttt{invest}_{it} = \beta_1 + \beta_2 \cdot \texttt{value}_{it} + \beta_3 \cdot \texttt{capital}_{it} \end{equation} where \code{invest} is the gross investment of firm $i$ in year $t$, \code{value} is the market value of the firm at the end of the previous year, and \code{capital} is the capital stock of the firm at the end of the previous year. This model can be estimated by <>= ### this code chunk is evaluated only if the 'plm' package is available data( "GrunfeldGreene" ) library( "plm" ) GGPanel <- pdata.frame( GrunfeldGreene, c( "firm", "year" ) ) greeneSur <- systemfit( invest ~ value + capital, method = "SUR", data = GGPanel ) @ The first line loads the example data set \code{GrunfeldGreene} that is included in the \pkg{systemfit} package. The second line loads the \pkg{plm} package and the following line specifies a data frame of class \codeD{pdata}{frame}, where the variables \code{firm} and \code{year} indicate the individual (cross-section) and time identifier, respectively. Finally, a seemingly unrelated regression is performed. The optional argument \code{pooled} is a logical variable indicating whether the coefficients are restricted to be equal for all individuals. By default, this argument is set to \code{FALSE}. The following command does a seemingly unrelated regression of the same model as before, but with coefficients restricted to be equal for all individuals. <>= ### this code chunk is evaluated only if the 'plm' package is available greeneSurPooled <- systemfit( invest ~ value + capital, method = "SUR", data = GGPanel, pooled = TRUE ) @ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \subsection{Testing linear restrictions} As described in Section~\ref{sec:testingRestrictions}, linear restrictions can be tested by an $F$ test, two Wald tests and an LR test. The \pkg{systemfit} package provides the method \code{linearHypothesis} for the $F$ and Wald tests as well as the method \code{lrtest} for LR tests. We will now test the restriction $\beta_2 = -\beta_6$ that was specified by the matrix \code{Rmat} and the vector \code{qvec} in the example above (p.~\pageref{code:Rmat}). <<>>= linearHypothesis( fitsur, Rmat, qvec, test = "FT" ) linearHypothesis( fitsur, Rmat, qvec, test = "F" ) linearHypothesis( fitsur, Rmat, qvec, test = "Chisq" ) lrtest( fitsurRmat, fitsur ) @ The linear restrictions are tested by \citeauthor{theil71}'s $F$ test (Equation~\ref{eq:f-test-theil}) first, second by the $F$ statistic of a Wald test (Equation~\ref{eq:f-test-wald}), third by the $\chi^2$ statistic of a Wald test (Equation~\ref{eq:chi2-test-wald}), and finally by an LR test (Equation~\ref{eq:lr-test}). The first argument of the \code{linearHypothesis} method for \code{systemfit} objects must be an unrestricted regression returned by \code{systemfit}. The second and third arguments are the restriction matrix $R$ and the optional vector $q$, as described in Section~\ref{sec:Restrictions}. Analogously to the argument \codeD{restrict}{matrix} of the \code{systemfit} function, the restrictions can be specified either in matrix form or symbolically. The optional argument \code{test} must be a character string, \code{"FT"}, \code{"F"}, or \code{"Chisq"}, specifying whether to compute \citeauthor{theil71}'s finite-sample $F$ test (with approximate $F$ distribution) the finite-sample Wald test (with approximate $F$ distribution) or the large-sample Wald test (with asymptotic $\chi^2$ distribution). All arguments of the \code{lrtest} method for \code{systemfit} objects must be fitted model objects returned by \code{systemfit}. It consecutively compares all provided fitted model objects. All tests print a short description of the test and the tested model objects first. Then, a small table is printed, where each row belongs to one (unrestricted or restricted) model. The second row reports (amongst others) the degree(s) of freedom of the test, the empirical test statistic, and the marginal level of significance ($P$ value). Although all tests check the same hypothesis, there is some variation of the $P$ values. However, all tests suggest the same decision: The null hypothesis $\beta_2 = -\beta_6$ cannot be rejected at any reasonable level of significance. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \subsection{Hausman test} A Hausman test, which is described in Section~\ref{sec:hausman}, can be carried out with following commands: <<>>= fit2sls <- systemfit( eqSystem, method = "2SLS", inst = ~ income + farmPrice + trend, data = Kmenta ) fit3sls <- systemfit( eqSystem, method = "3SLS", inst = ~ income + farmPrice + trend, data = Kmenta ) hausman.systemfit( fit2sls, fit3sls ) @ <>= hausmantest <- hausman.systemfit( fit2sls, fit3sls ) @ First of all, the model is estimated by 2SLS and then by 3SLS. Finally, in the last line the test is carried out by the command \codeD{hausman}{systemfit}. This function requires two arguments: the result of a 2SLS estimation and the result of a 3SLS estimation. The Hausman test statistic is \Sexpr{round( hausmantest$statistic, digits = 3)}, which has a $\chi^2$ distribution with \Sexpr{hausmantest$parameter} degrees of freedom under the null hypothesis. The corresponding $P$ value is \Sexpr{round( hausmantest$p.value, digits = 3 )}. This shows that the null hypothesis is not rejected at any reasonable level of significance. Hence, we can assume that the 3SLS estimator is consistent. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \section{Replication of textbook results}\label{sec:reliability} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% In this section, we reproduce results from several textbook examples using the \pkg{systemfit} package for several reasons. First, a comparison of \pkg{systemfit}'s results with results published in the literature confirms the reliability of the \pkg{systemfit} package. Second, this section helps teachers and students become familiar with using the \pkg{systemfit} package. Third, the section encourages reproducible research, which should be a general goal in scientific analysis \citep{buckheit95,schwab00}. For instance, by preparing this section, the exact estimation methods of the replicated analyses have been discovered and a few errors in \citet{greene03} have been found \citep[see][]{greene06a}. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \subsection[Kmenta (1986): Example on p. 685 (food market)] {Kmenta (1986): Example on p.~685 (food market)} First, we reproduce an example taken from \citet[p.~685]{kmenta86}. The data are available from Table~13-1 (p.~687), and the results are presented in Table~13-2 (p.~712) of this book. Before starting the estimation, we load the data and specify the two formulas of the model as well as the instrumental variables. Then the equation system is estimated by OLS, 2SLS, 3SLS, and iterated 3SLS. After each estimation, we provide the commands to print the estimated coefficients. <>= library( "systemfit" ) @ <>= data( "Kmenta" ) eqDemand <- consump ~ price + income eqSupply <- consump ~ price + farmPrice + trend inst <- ~ income + farmPrice + trend system <- list( demand = eqDemand, supply = eqSupply ) @ OLS estimation: <>= fitOls <- systemfit( system, data = Kmenta ) round( coef( summary( fitOls ) ), digits = 4 ) @ 2SLS estimation: <>= fit2sls <- systemfit( system, method = "2SLS", inst = inst, data = Kmenta ) round( coef( summary( fit2sls ) ), digits = 4 ) @ 3SLS estimation: <>= fit3sls <- systemfit( system, method = "3SLS", inst = inst, data = Kmenta ) round( coef( summary( fit3sls ) ), digits = 4 ) @ Iterated 3SLS estimation: <>= fitI3sls <- systemfit( system, method = "3SLS", inst = inst, data = Kmenta, maxit = 250 ) round( coef( summary( fitI3sls ) ), digits = 4 ) @ The above commands return exactly the same coefficients and standard errors as published in \citet[p.~712]{kmenta86} except for two minor exceptions: two standard errors of the 2SLS estimation deviate by $0.0001$. However, this difference is likely due to rounding errors in \code{systemfit} or \citet{kmenta86} and is so small that it empirically does not matter. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \subsection{Greene (2003): Example 15.1 (Klein's model I)} \label{sec:KleinsModel} Second, we try to replicate Klein's ``Model I'' \citep{klein50} that is described in \citet[p.~381]{greene03}. The data are available from the online complements to \citet{greene03}, Table~F15.1 (\url{http://pages.stern.nyu.edu/~wgreene/Text/tables/TableF15-1.txt}), and the estimation results are presented in Table~15.3 (p.~412). Initially, the data are loaded and three equations as well as the instrumental variables are specified. As in the example before, the equation system is estimated by OLS, 2SLS, 3SLS, and iterated 3SLS, and commands to print the estimated coefficients are presented. <<>>= data( "KleinI" ) eqConsump <- consump ~ corpProf + corpProfLag + wages eqInvest <- invest ~ corpProf + corpProfLag + capitalLag eqPrivWage <- privWage ~ gnp + gnpLag + trend inst <- ~ govExp + taxes + govWage + trend + capitalLag + corpProfLag + gnpLag system <- list( Consumption = eqConsump, Investment = eqInvest, PrivateWages = eqPrivWage ) @ OLS estimation: <>= kleinOls <- systemfit( system, data = KleinI ) round( coef( summary( kleinOls ) ), digits = 3 ) @ 2SLS estimation: <>= klein2sls <- systemfit( system, method = "2SLS", inst = inst, data = KleinI, methodResidCov = "noDfCor" ) round( coef( summary( klein2sls ) ), digits = 3 ) @ 3SLS estimation: <>= klein3sls <- systemfit( system, method = "3SLS", inst = inst, data = KleinI, methodResidCov = "noDfCor" ) round( coef( summary( klein3sls ) ), digits = 3 ) @ iterated 3SLS estimation: <>= kleinI3sls <- systemfit( system, method = "3SLS", inst = inst, data = KleinI, methodResidCov = "noDfCor", maxit = 500 ) round( coef( summary( kleinI3sls ) ), digits = 3 ) @ Again, these commands return almost the same results as published in \citet{greene03}.% \footnote{ There are two typos in Table~15.3 (p.~412). Please take a look at the errata \citep{greene06a}. } There are only two minor deviations, where these values differ merely in the last digit. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \subsection{Greene (2003): Example 14.1 (Grunfeld's investment data)} \label{sec:grunfeld-greene} Third, we reproduce Example~14.1 of \citet[p.~340]{greene03} that is based on \citet{grunfeld58}. The data are available from the online complements to \citet{greene03}, Table~F13.1 (\url{http://pages.stern.nyu.edu/~wgreene/Text/tables/TableF13-1.txt}). Several different versions of the ``Grunfeld'' data set can be found, whereas the version of \citet{greene03} is considered incorrect \citep{cummins01}. However, we use this incorrect version to replicate the results in \citet{greene03}, Tables~14.1 and~14.2 (p.~351).% \footnote{ A correct version of this data set with five additional firms is available as data set \code{Grunfeld} in the \pkg{Ecdat} package \citep{r-Ecdat-0.1-5}. } First, we load the data and the \pkg{plm} package, indicate the individual (cross-section) and time identifiers, and specify the formula to be estimated. Then, the system is estimated by OLS, pooled OLS, SUR, and pooled SUR. After each estimation, we show the commands to print the estimated coefficients, the $\sigma^2$ values of the OLS estimations, and the residual covariance matrix as well as the residual correlation matrix of the SUR estimations. <>= ### this code chunk is evaluated only if the 'plm' package is available data( "GrunfeldGreene" ) library( "plm" ) GGPanel <- pdata.frame( GrunfeldGreene, c( "firm", "year" ) ) formulaGrunfeld <- invest ~ value + capital @ OLS estimation (Table 14.2): <>= ### this code chunk is evaluated only if the 'plm' package is available greeneOls <- systemfit( formulaGrunfeld, data = GGPanel ) round( coef( summary( greeneOls ) ), digits = 4 ) round( sapply( greeneOls$eq, function(x){return(summary(x)$ssr/20)} ), digits = 3 ) @ pooled OLS (Table 14.2): <>= ### this code chunk is evaluated only if the 'plm' package is available greeneOlsPooled <- systemfit( formulaGrunfeld, data = GGPanel, pooled = TRUE ) round( coef( summary( greeneOlsPooled$eq[[1]] ) ), digits = 4 ) #$ sum( sapply( greeneOlsPooled$eq, function(x){return(summary(x)$ssr)}) )/100 @ SUR estimation (Table~14.1): <>= ### this code chunk is evaluated only if the 'plm' package is available greeneSur <- systemfit( formulaGrunfeld, method = "SUR", data = GGPanel, methodResidCov = "noDfCor" ) round( coef( summary( greeneSur ) ), digits = 4 ) round( greeneSur$residCov, digits = 3 ) #$ round( summary( greeneSur )$residCor, digits = 3 ) #$ @ pooled SUR estimation (Table~14.1): <>= ### this code chunk is evaluated only if the 'plm' package is available greeneSurPooled <- systemfit( formulaGrunfeld, method = "SUR", data = GGPanel, pooled = TRUE, methodResidCov = "noDfCor", residCovWeighted = TRUE ) round( coef( summary( greeneSurPooled$eq[[1]] ) ), digits = 4 ) #$ round( greeneSurPooled$residCov, digits = 3 ) #$ round( cov( residuals( greeneSurPooled ) ), digits = 3 ) round( summary( greeneSurPooled )$residCor, digits = 3 ) #$ @ These commands return nearly the same results as published in \citet{greene03}.% \footnote{ There are several typos and errors in Table~14.1 (p.~412). Please take a look at the errata of this book \citep{greene06a}. } We present two different commands to print the residual covariance matrix of the pooled SUR estimation. The first calculates the covariance matrix without centering the residuals (see Section~\ref{sec:residcov}); the returned values are equal to those published in \citet[p.~351]{greene03}. The second command calculates the residual covariance matrix after centering the residuals; these returned values are equal to those published in the errata \citep{greene06a}. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \subsection[Theil (1971): Example on p. 295ff (Grunfeld's investment data)] {Theil (1971): Example on p.~295ff (Grunfeld's investment data)} Finally, we estimate an example taken from \citet[p.~295ff]{theil71} that is also based on \citet{grunfeld58}. The data are available in Table~7.1 of \citet[p.~296]{theil71}. They are a subset of the data set published by \citet{greene03} (see Section~\ref{sec:grunfeld-greene}). After extracting the data from the \code{GrunfeldGreene} data set, the individual (cross-section) and time identifiers are indicated. Then, the formula is specified, and the model is estimated by OLS and SUR. Commands to print the estimated coefficients are reported after each estimation. <>= ### this code chunk is evaluated only if the 'plm' package is available GrunfeldTheil <- subset( GrunfeldGreene, firm %in% c( "General Electric", "Westinghouse" ) ) GTPanel <- pdata.frame( GrunfeldTheil, c( "firm", "year" ) ) formulaGrunfeld <- invest ~ value + capital @ OLS estimation (page 295) <>= ### this code chunk is evaluated only if the 'plm' package is available theilOls <- systemfit( formulaGrunfeld, data = GTPanel ) round( coef( summary( theilOls ) ), digits = 3 ) @ SUR estimation (page 300) <>= ### this code chunk is evaluated only if the 'plm' package is available theilSur <- systemfit( formulaGrunfeld, method = "SUR", data = GTPanel, methodResidCov = "noDfCor" ) round( coef( summary( theilSur ) ), digits = 3 ) @ These commands return exactly the same results as published in \citet[pp.~295, 300]{theil71}. Now, we apply an $F$ test to check whether the slope parameters are equal for General Electric and Westinghouse (pages~313--315). Then we re-estimate the model under these restrictions on the coefficients. $F$ test (page 313--315)% \footnote{% The same restriction can be specified also symbolically by \code{RMatrix <- c("General.Electric\_value = Westinghouse\_value", "General.Electric\_capital = Westinghouse\_capital")} } <>= ### this code chunk is evaluated only if the 'plm' package is available RMatrix <- rbind( c( 0, 1, 0, 0, -1, 0 ), c( 0, 0, 1, 0, 0, -1 ) ) linearHypothesis( theilSur, RMatrix ) @ Restricted SUR estimation (page~316) <>= ### this code chunk is evaluated only if the 'plm' package is available theilSurRestr <- systemfit(formulaGrunfeld, method = "SUR", data = GTPanel, methodResidCov = "noDfCor", restrict.matrix = RMatrix, residCovRestricted = FALSE) round(coef(summary(theilSurRestr)), digits = 3) @ The method \code{linearHypothesis} returns the same value of the $F$ statistic as published in \citet[p.~315]{theil71}. Hence, we arrive at the the same conclusion: we accept the null hypothesis (restrictions on the coefficients are true) at the 5~percent significance level. Also the results of the restricted SUR estimation are identical to the results published in \citet[p.~316]{theil71}. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \section{Summary and outlook}\label{sec:Summmary} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \nopagebreak In this article, we have described some of the basic features of the \pkg{systemfit} package for estimating systems of linear equations. Many details of the estimation can be controlled by the user. Furthermore, the package provides some statistical tests for restrictions on the coefficients and consistency of 3SLS estimation. It has been tested on a variety of datasets and has produced satisfactory for a few years. While the \pkg{systemfit} package performs the basic fitting methods, more sophisticated tools exist. We hope to implement missing functionalities in the near future. % Some of these are discussed in the following. \subsubsection*{Unbalanced datasets} Currently, the \pkg{systemfit} package requires that all equations have the same number of observations. However, many data sets have unbalanced observations.% \footnote{ For instance, forestry datasets typically contain many observations of inexpensive variables (stem diameter, tree count) and few expensive variables such as stem height or volume. } Simply dropping data points that do not contain observations for all equations may reduce the number of observations considerably, and thus, the information utilized in the estimation. Hence, it is our intention to include the capability for estimations with unbalanced data sets as described in \citet{schmidt77} in future releases of \pkg{systemfit}. \subsubsection*{Serial correlation and heteroscedasticity} For all of the methods developed in the package, the disturbances of the individual equations are assumed to be independent and identically distributed (iid). The package could be enhanced by the inclusion of methods to fit equations with serially correlated and heteroscedastic disturbances \citep{parks67}. \subsubsection*{Estimation methods} In the future, we wish to include more sophisticated estimation methods such as limited information maximum likelihood (LIML), full information maximum likelihood (FIML), generalized methods of moments (GMM) and spatial econometric methods \citep{paelinck79,anselin88}. \subsubsection*{Non-linear estimation} Finally, the \pkg{systemfit} package provides a function to estimate systems of non-linear equations. However, the function \code{nlsystemfit} is currently under development and the results are not yet always reliable due to convergence difficulties. \section*{Acknowledgments} We thank Achim Zeileis, John Fox, Ott Toomet, William H.\ Greene, two anonymous referees and several users of \pkg{systemfit} for their comments and suggestions that helped us to improve the \pkg{systemfit} package as well as this paper. Of course, any remaining errors are the authors'. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \bibliography{systemfit} % a subset of my big bibtex file %\bibliography{agrarpol} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \clearpage \begin{appendix} \section[Object returned by systemfit]{Object returned by \code{systemfit}} \label{sec:returned-object} \code{systemfit} returns a list of class \code{systemfit} that contains the results that belong to the entire system of equations. One special element of this list is called \code{eq}. It is a list that contains one object for each estimated equation. These objects are of the class \codeD{systemfit}{equation} and contain the results that belong only to the regarding equation. \begin{table}[htbp] \centering \setlength{\tabcolsep}{4mm} {\ttfamily \begin{tabular}{|l|l|l|} \hline \textbf{\code{lm}} & \textbf{\code{systemfit}} & \textbf{\code{systemfit.equation}} \\ \hline coefficients & coefficients & coefficients \\ & coefCov & coefCov \\ fitted.values & & fitted.values \\ residuals & & residuals \\ & residCov & \\ & residCovEst & \\ rank & rank & rank \\ & & rank.sys \\ & & nCoef.sys \\ df.residual & df.residual & df.residual \\ & & df.residual.sys \\ call & call & \\ terms & & terms \\ & & inst \\ weights & & \\ contrasts & & \\ xlevels & & \\ offset & & \\ model\textnormal{*} & & model\textnormal{*} \\ x\textnormal{**} & & x\textnormal{**} \\ y\textnormal{**} & & y\textnormal{**} \\ & & z\textnormal{**} \\ & iter & \\ & eq & \\ & & eqnLabel \\ & & eqnNo \\ & method & method \\ & panelLike & \\ & restrict.matrix& \\ & restrict.rhs & \\ & restrict.regMat& \\ & control & \\ \hline \end{tabular} } \caption{Elements returned by \code{systemfit} and \code{lm} (* if requested by the user with default \code{TRUE}, ** if requested by the user with default \code{FALSE}).} \label{tab:compare-lm} \end{table} The elements returned by \code{systemfit} are similar to those returned by \code{lm}, the basic tool for linear regressions in \proglang{R}. While some counterparts of elements returned by \code{lm} can be found directly in objects of class \code{systemfit}, other counterparts are available for each equation in objects of class \codeD{systemfit}{equation}. This is demonstrated in Table~\ref{tab:compare-lm}. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \section{Computation times}\label{sec:timings} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Theoretically, one would expect that the calculations with the \pkg{Matrix} package are faster and more robust than calculations with the traditional method. To test this hypothesis, we use function \code{createSystemfitModel} to create a medium-sized multi-equation model with 8~equations, 10~regressors in each equation (without constant), and 750~observations. Then, we estimated this model with and without using the \pkg{Matrix} package. Finally, the results are compared. <>= library( "systemfit" ) set.seed( 1 ) systemfitModel <- createSystemfitModel( nEq = 8, nReg = 10, nObs = 750 ) system.time( fitMatrix <- systemfit( systemfitModel$formula, method = "SUR", data = systemfitModel$data ) ) system.time( fitTrad <- systemfit( systemfitModel$formula, method = "SUR", data = systemfitModel$data, useMatrix = FALSE ) ) all.equal( fitMatrix, fitTrad ) @ The returned computation times clearly show that using the \pkg{Matrix} package makes the estimation faster. The comparison of the estimation results shows that both methods return the same results. The only differences between the returned objects are --- as expected --- the \code{call} and the stored control variable \code{useMatrix}. However, the estimation of rather small models is much slower with the \pkg{Matrix} package than without this package. Moreover, the differences in computation time accumulate, if the estimation is iterated. <<>>= smallModel <- createSystemfitModel( nEq = 3, nReg = 4, nObs = 50 ) system.time( fitSmallMatrix <- systemfit( smallModel$formula, method = "SUR", data = smallModel$data, maxit = 500 ) ) system.time( fitSmallTrad <- systemfit( smallModel$formula, method = "SUR", data = smallModel$data, maxit = 500, useMatrix = FALSE ) ) all.equal( fitSmallMatrix, fitSmallTrad ) @ As mentioned above, the usage of the \pkg{Matrix} package clearly increases the computation times for iterated (SUR) estimations of small models with small data sets. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \section[Estimating systems of equations with sem] {Estimating systems of equations with \code{sem}} \label{sec:sem} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% <>= options( width = 75 ) @ This section compares the commands to estimate a system of equations by \code{sem} and \code{systemfit}. This comparison uses Klein's ``Model I'' (see Section~\ref{sec:KleinsModel}). Before starting the estimation, we load the \pkg{sem} and \pkg{systemfit} package as well as the required data set. <>= ### this code chunk is evaluated only if the 'sem' package is available library( "sem" ) library( "systemfit" ) data( "KleinI" ) @ First, we estimate the system by limited information maximum likelihood (LIML) with \code{sem}: <>= ### this code chunk is evaluated only if the 'sem' package is available limlRam <- matrix(c( "consump <- corpProf", "consump_corpProf", NA, "consump <- corpProfLag", "consump_corpProfLag", NA, "consump <- wages", "consump_wages", NA, "invest <- corpProf", "invest_corpProf", NA, "invest <- corpProfLag", "invest_corpProfLag", NA, "invest <- capitalLag", "invest_capitalLag", NA, "privWage <- gnp", "privWage_gnp", NA, "privWage <- gnpLag", "privWage_gnpLag", NA, "privWage <- trend", "privWage_trend", NA, "consump <-> consump", "s11", NA, "privWage <-> privWage", "s22", NA, "invest <-> invest", "s33", NA), ncol = 3, byrow = TRUE) class(limlRam) <- "mod" exogVar <- c("corpProf", "corpProfLag", "wages", "capitalLag", "trend", "gnp", "gnpLag") endogVar <- c("consump", "invest", "privWage") allVar <- c(exogVar, endogVar) limlResult <- sem(model = limlRam, S = cov(KleinI[ -1, allVar ]), N = (nrow(KleinI) - 1), fixed.x = exogVar) print(limlResult) @ Theoretically, the LIML results should be identical to OLS results. Therefore, we re-estimate this model by OLS with \code{systemfit}. <>= eqConsump <- consump ~ corpProf + corpProfLag + wages eqInvest <- invest ~ corpProf + corpProfLag + capitalLag eqPrivWage <- privWage ~ gnp + gnpLag + trend system <- list(consump = eqConsump, invest = eqInvest, privWage = eqPrivWage) olsResult <- systemfit(system, data = KleinI) print(olsResult) @ As expected, the results are identical. Now, we estimate the system by full information maximum likelihood (FIML) with \code{sem}: <>= ### this code chunk is evaluated only if the 'sem' package is available fimlRam <- rbind(limlRam, c("consump <-> invest", "s12", NA), c("consump <-> privWage", "s13", NA), c("privWage <-> invest", "s23", NA)) class(fimlRam) <- "mod" fimlResult <- sem(model = fimlRam, S = cov(KleinI[ -1, allVar ]), N = (nrow(KleinI) - 1), fixed.x = exogVar) print(fimlResult) @ Theoretically, results of an iterated SUR estimation should converge to FIML results. Therefore, we re-estimate this model by iterated SUR with \code{systemfit}. <<>>= surResult <- systemfit( system, method = "SUR", data = KleinI, methodResidCov = "noDfCor", maxit = 500 ) print( surResult ) @ As expected, the results are rather similar. \end{appendix} \end{document} %%% Local Variables: %%% mode: latex %%% TeX-master: t %%% End: systemfit/inst/doc/systemfit.pdf0000644000176200001440000106511514406577567016603 0ustar liggesusers%PDF-1.5 % 1 0 obj << /Type /ObjStm /Length 5569 /Filter /FlateDecode /N 96 /First 821 >> stream x\Ys8~oSS!/S]Jl=Eꖥ$w;MVݒi$xpdfl2.t ɸ2(,\&3τh2ZLX)\&A]fg\eRJqI#P7bщr 3-˸ϴ# ,3\ MBd2+JNuf50&͜и2g!ye^zB&FL nW0Ixb)zI3: 1(0&ʀ ((FG',diYtYq@V 4{<&3 ZZcXѹ4 kk@6 j@,Ӏl$@6ʻz1 hұ4 9qbE nSl- ȭsXZH)}VbDb5, ;wi5!2=|K 8)N$&9ޠ/a]$Jd>E2|b044 qul z@KD{:@0VQb DD8јv4AYL$0+^_lE)**V~\f#/O*<9aLH-YC3FpJ'SIf)e 14}`*'rq0ٔLH&&k)S;Ëce90ժe‡v"K&,R눵,"o>*rC+Rߊ2=*hؔ <]i:<\~8uxe*i9crXB zVr@ś'ۃjd/&kڪ֖Ƀr˯9e:X|Nxޕs Hv[UR)I@*QܦE("$c2QKi%KLXKe"%"H!g09RH"=q?|O/׳+R@QB04%cT)5q'U $YS:f`rOf&n":&c*ēI4p.+.WkVDMCKuUO)wz_CVC8ڈM cs+0I r[DFixZ+LV"8dq%+i\c943vO3#Mfd]NjWo}/^.' .=\ΧYxqY҂|t6YQx#t LZx]IڐL" wzyFl9 7AB0_ݟQZdPHb[7?q@%RAb!1s^5c :4!3XR BuYa<9:K2Qa5—J:~ |}Lہ|YU29P<(qxV8P^O!P끞x'tm׎f˺knshmImιi7`%jY*yAO< +)2L!4enIX;*sa|ٵtYvk6z1[QaKu)~;n 3I5>z˓LJ'͠OPk`+J0 AUtx]i*|)"׸gȿz%2(ȷPO}*7 Y"w~/OI1/k~M0ghY(rA`]b+qb2ۇ^}tbՆ}xڭh;!vf{ a]H?97} UX`udɧhl$dڣ$u2W":Roќ٦I`eI!?,n+ƨɭ,}6+*ҜWE c^i~v1kڅޮUFDs5hDC!R<GA&N.HV'kQy1ɞH`,i~&bo;p8 mh'-B>| 9[xʠR۾t\(8XrF-!,MU=7wA0sQ8{+(u&'hSʯhGp(w R(@Wkp6KaW91-0KSONϙ2w܃8x|z2W[(r&o#sJV8;p2,ҎDÇtPٚB"g0d=yzϥOr Ǡڭ7HAda,LRa1v𸮒ŷnv73.z:Tk}g[Nv}ӮAju߂\ջ>.tzde6-ri꭮|ڪlaCvZ&dNb}[snJb)cx.'WcزNБV 0_?ݳE4 ^5 Sl#;-靓D1 929Ϊ֛Bz&'Ϭ15ŶwXn|8zA"o矖x|vVt7)v֊:u~U "fy(d>@D<~(#\b['.aximGN ENZX:|7h&Gvԍ6!0w?+ZTQx]﬚\~hTO 6:œO%X_.m D4ЗH1\וߠa U90 Ίd$ߢQ!6uW,h5G[Z1'1$s|gLvA?zCꖠE܆~"d2ĄdZ ?JK CzU:չdM]b IJVQفx򥱺-xY1 Ya[Y`pN 觵hlw9g:z񺝴8Ud*f\Τ\.> stream GPL Ghostscript 9.55.0 R, system of simultaneous equations, seemingly unrelated regression, two-stage least squares, three-stage least squares, instrumental variables 2023-03-22T14:15:33+01:00 2023-03-22T14:15:33+01:00 LaTeX with hyperref systemfit: A Package for Estimating Systems of Simultaneous Equations in RArne Henningsen, Jeff D. Hamann endstream endobj 99 0 obj << /Type /ObjStm /Length 4226 /Filter /FlateDecode /N 96 /First 906 >> stream x\rȵ}W1SSTɲ=/)L*fbx$%٠X̮bW-.q>}((ū$XD,Y֠mEmAjж뽭j8H8/ |(ѻyv0N_c?gW<^NG,7xX&$(r9G[VWH 5=?Od16`l`> EĿ~ v.o^Rl=Q uW܀b18lpv8/Wede6f$+q6&EvͳE~~KdO&ó0YFS˛ƓVSJnxQd<:M </E`+O& w Q5T Kp ?dz0]WV8жqm#iVd_(bzNS;xM|OyU^]Ky1dO@Ych(ѱNT';E"ވ؄.B%B6;#DRpFzm$^ Nxqح>vܗ΂]oqjQ]ݤ7Otw 4SbS_`b (^df٢ߠȖȖfٷ_|Xq`W}J 9u}za^{[n N|Ooֆuj>ݒoKc'C "'Jx*媄^>U.W$_|KUWʹcb2_}:_l_Vsa3-]ڡhv:_gìj8)jAܮ~xi{Dh)h{6 mQ  !LL JL&#BtȴS&ݥ N`x.κ#Y+^eTҤY(4צBJGQ<ŜUF.OD˭Ydmjp@T[xaET2'ҫ@R:5ѭM%Ƞv(4)(raKNu&ͅZd C4]( 5.$0sdi4U.jR3< QZr\lB(WdD݀4'jk}H5=J(Cig4NtMtk61tUaujv:Pt%5YǕP0P>OsUIji MJosE*R.KSk+S+(*u=8Ê(R'UW7[Lcc:Yv9.J0ȳ\4rVa{08e!ʑCzDSf,sZA+H'”t%oGT[=kgDthڸfoWv5Kʃa F)`>p,U{PWTjgAU7s%u&_Ȯ\B6erpQ%4 vO9 %%RkA z*[v:ޛ;/ ]scशQ 0zJg~&U!e+Ӟd"WAAK5 ԩy\ƞCEBmSĉXnivh4VCyj߉%mdO废͞,kPyELh8 cYw* ! ~}jY^NS%J`Ii5A>^+HõB3pL,ۼZ,v'O9d5], Y~sժ%dku P (w:G 3h,VԸhKp^\hQ4ϭFK㩈,p+)tBN"N(&ܟ.d QN#%K*dnb"({a=i-X8R[{2áp^E@ %~HOMr<|\^oޥg?t6?Ieim%,FX:b ?eHVA}@ѩLf \kɕ Mm(emWMbȂPzz?3HV\RY.PDjV*mVUj]/߾}KUd W^MOIz̋%p_ħҴy\O   Gr Z11n-;;.Dfg*Uԝ0קPu=%Q/*y/CR}pwP;Xnr󅟒@+).Hx2`D ]z䈒jeZMb|zZ̡E 8坺C?W4׿}L6?~Cvzm S^XQ:CHJendstream endobj 196 0 obj << /Type /ObjStm /Length 3319 /Filter /FlateDecode /N 96 /First 896 >> stream x[ioG?bើ #޵c.XTD*ǿzz&{NvzUݣsJ蜄U,v(%b8joXW8qBq'AQ:”5.E;Z zh=[  ѿ5/j/zt6Do2l0 c(AF g#\dbP1Nxx -CB_h'Ѝo"hPx?-[#)e-*͓ U56`%LF|>.?ow/tգ' |5=]Ly?>''7ófrUмE@ ~r@EDzm9h<]{<]U?DþB{WKHփ,?Y5?OOƸQCRx4^,FW˫1;z=!̑b{PաHeC_/h)vv!&v0=$]Z?*ag0J_B)80Y@xoSoF͸4f4f6h󑦦[Z0([]S]W.IRCul`2wF"ђYD/}5Z =RV!K<|J2oYl<@@%yw*f|&P !f TRRBؗ$%$~ʪ(˟ piAB2&lʹ,OMJЁ|!ptCvSE>#>-$s.p2۴JRy3ʌVeXzҁ[N2%Ӄ"iAYǬ2UP@ꌕ+Q3鎑L_eV`+ʌX/XY^Ay} Z:–_{RVafWS`fo߾ gY~t6ڏY̌YgfLtjoI{'jg-zko_e ||yݜ5o`Qs9vt\6^OA@||,Lt675/=5\b|U%g SfcYc)'̤ۖN%e{٤!t?СӡL'""2m߰DIIt#r^4`;o)#ҏ-%=5|:YM 4 A8%!zhC=(0G%xF PzW-"d׃-:wHЁvDI#=7*JZ yOB:L;HAIVΪ`s8(t( lfBGOlOLO;LX0m(.1rIΘȯ %n$x hҜh#s’|'zLKʻ!0}r!,D~}آY"ᚼ6A6Mb䂠.O8&6*#+K$Pms>*bmsU$?CgtT bpN]$Nrc6KT~TKpYm) ٜweS)+(Pg,A@qHu|ZTu pEع}JSڴ0Nz1ZbP!" ܱR2āԄ[j,\Jm6땓D c5-KT\D=<ځ(-c`b2VjݤRRhŕ:pa}GsBR5kVktylȚ,/G䠶p@눂G7ASKH!Xt|wïYQ44qvCn@'4@z80;zdށ.L \JYܠI`@I!P}¥EHL9Ƅg9-`UL;Y7k&(` X}Ɉ<%,k%w\u7j_<̜HY9$+kd*Y;s.yЭF |}L^#&}-d6Cb2j%)qf*YVJʒ/&w:pT$Ѭ%5>@3,) h~c*%⟍Z_ mRduvj7[%sfVvɜo9%F 5}:ڭF.ΗjM`Y'Y g%ndKqXG_Rv@C"AGAo7RJQ;`jM*C)\Pӛpfs_vįj\*6HVLZqvt|am0IY Wp= ,*BďNb,su _`ʊY| pfη(4ׂT,9&۩P2أb> stream x[[s~c2cqpG'_&+u$u-eNhR!~ow ).P{|8܀ %trD 1d#IV$R8!ANyhAYAύRH8UN@8 SDcIn 1 Ɣ:hat?›6ޢSEwp,nSy+ s$ILC ,ik-l?‘GN8xl~+(\0NňW O-ɏ+@h DtD,t\[)nTxfсm:㷼Q[A$Ų 'HE* IH&rL9y8,PpS-Ex( YD.C# ((ECCp>f~y-ǣ"zvЇe A }@43}|>@ 0 !xhB&Y T7Yǘ!7^D"5>G."=G&EUvwz:O3KVt%.7GWC9rLu9zӅ.t =]虆;Q=iީ3r+ђĠƫ/ꢞMWLH@-OtruYAzLTsP{~M5&2([e/"W"W$D\/7 ڗ28_|/ ep .f¬`7 65l( ep .2Xb\,̊ c96/ ުas1 /p&zZ:U.hq1!x2$3UoߍF↎tpF-S${?0^ǿ. eɯa~y T +j5Ivw)arʀf UJ*L|$3!,ً/_>fE}s7LEz85;Ng1k_M4J#!&oCЭ -H^?'wL]{zxqqXiF|xU'fW73rDE&yr6&˷~|K?ͨ·x!8ج.r:=(*ʊإ8#B y~]yc*Kr\KZrMO_zT]RD)C)I`PJsPfMs##(3 MűQ 1i qTtl00 P6@]B^P,  >^A٨Eb]Msx雿c_L> Ƥ4S{UjRVt8~լWw߫՗/(}ݭ{w̽, _cǺWVXО^{%^:u]arLd@4xtdÑ},d` o"1[XmͶ%(:c=ň@`8Q?[T~zq,b<"g;Bn*"^OFta}z_OgÛF. QED6Qܢ!;Fф^=W):V1uѩ5uF-XٹUAsrM5eTv[6.m_:ˣ-z :z9,f׼*zlWS7'ze~z҅^S!5 C֜%EUkLxyG5\n1M}`zSΟ# l9?5K?vQY=B9DExFfL!NmZL _:# 9askjL_-&(3+ %. M=)^չܨ yz?N-娔T˞NymU^27U1+8Ѽ~PO1KHkk1DVLLendstream endobj 390 0 obj << /Type /ObjStm /Length 3271 /Filter /FlateDecode /N 96 /First 891 >> stream x[s~_d:ůN&3vO3w\9idȌͩB"5M^[D$4blŷ/d ֛^L6m4>HPj18g(82H/+'ްa`8'pz ҟ.z\ >.xȂ|}O@a:^D/z/%4zg^ >w&ф)D23&qu@g"& 2Q?C¼71%}"&)`S>TpIe,>"Ť=8N ͬoA%!”hrֱ$\T)M!")Pr;t:L0)9Oކ1&!jŠ@\ϊ KopEa D4`(R"Ơ ω2ƠRa &K:HX E`j0T c c*1̞-X3gu]umrk}k?jQZ}ZnK}3{98 8Pg!~ l^]_]FgbP|fxaf۠>9no GtMMMM [[ n*x>H8' p4!M4!M4!M O6|dY4A&$cxlM~l$SKKKK˭|Z?d-=_]_A]o!g*'R_;_kLb)ۜ8% xϛ _=B7| 6&ށF(|DLk[P! I  L!d 0r9Tb`Ql#,(e쿁%>dMphUJJ 1"(}JTt"qaevÒlw?,ep!X::.Vi, ֪cX|>4Ek0P@1cð f`[_Cb5ag xuȆna{G> .XX";!q%(xz@:UoT@iYTcWT9; 4a0I݅"cÎ6-Lɧc`tӀ h69?E ^+~󘮦 hvFf+gJ{Z7ar{}>Rɸ]D49EchT]}`Ƥ "F'ʤ& [X>984m7:?^UT  NAI%`AP0ߴ{[P K&PM{^P T@mˉ$cS2&xp*i黚.0 rA-AE 0 V8㛠 $[vsqW[eB;_5ռM-gt V]WgW,B}RPY+`IpF子jN\aˀJX>-*񮆃q?T* |mfߞ}5pYݣm62[f~߯y{5/'6?_׳oyA6WKg~'f3|2!_1*9Ů&?ȱP y*Tc-Z4$5専T&PBP~IQ.Uc>YQƆsA1hFN4x|8տbAya?t|IE0qX(<(OQ]zS(dى@ TN<(UhC'I XAoNZ=,tˀIl{=@핦ܩڢQNg!? [)w /ܓaBgB{G0;Z<-iƀ4 G?fZУXgzH-/̡#Uʏ>jty5endstream endobj 487 0 obj << /Type /ObjStm /Length 3601 /Filter /FlateDecode /N 92 /First 866 >> stream x\[o~c5I(zAxvw&DJEi<ޱ/ք΄i:egUQu^EuHR/N)_qDN+0Ә[Y);##aB+MGA=XObQ+Hy;C=f{+nVx-Ffe\ ĔI7i}=\C3/fպēipcvxAI~wa9t2J7\xbk >F'E<,UbFKvQ,bI#$qk$FAQ,54FXt[Qj,f~{VJp1 `-Z\uV5Ey5װYAجkBh 5aBP: ĠK!Yր>a5l1W ZP0?5 \R60 N$?5x55f^aN刱x^lp캯wFJ1H𛻔RKu:q/_\v3o7oJ i0:%gD!;BB.c+:42^4yB3t!D;ϧo~X(ݫyiUfEp~Vu%rhԑhfMM?ʮK#,Qr^?OILFl$Q8~XpYIp)TTL"ɩAž~ɖ2|nhZh(4L+G`%)_êI{`x#h-X89խx VP[́x:NYjEsh*K$lWXKm|XL q욞gsb,ҧ1ZEbiU6u p pNZ0HjvZ&P۔U6v$Lzpa6Td&W ajZy;>*s9Zڅ6bPP.Qahlx43qԶ3lm] ӈmBf[+hDX<èC`-yF5fpW<4bt"Up:$E %&QkV*蒲,aV}NSz[Kr;MB^*TbrHkl2Zn#Ll͹)^ ~f U?a\1{%~K^pOy]˧ eguY '# 6R|¨EQ6Dm43a^'۪'zRCFkٹf?| Xgᨕgdy"UDN%&ZUBZe+jA}a-7 m8Yr] 83/kڀ1F_U`U/W^. R.XWkZoѣ[AY;9psi>si>7t(ϻooNF+ TD}~wُ}~n`_v<]epSPQU3[, ^ ^#4gQ`^q[S5y:>eM(_狔'{]}h5P܀|9b֙έ56YFnlg0fon-`%Lܓ{DOYe`%V s{{wK^O?QIKQ/X%V3A@NZ8Tv=ww?b% kAiT;Rڊ(͂S. ܭ~Wĩp0&Ct>(Orě0E$?D:h!^)`tB?9PIney9T=<r<~yq߉wn{..o?xݩY_Fʂk1"/~WPQe *h@cU'›8~Ǐ7O4WĈ| Ի9DVspLQ XV{fendstream endobj 580 0 obj << /Filter /FlateDecode /Length 4578 >> stream x[w6r=Gv!9d=ewFCV9%Yø![(@ [ma(Tկ~U@44/{j6W݄nw^l0zswW[e7N6xj1mk2ڨ:nY՗ }9U:mF{ ^,LTlwSqP Vɺid3ͧU^?܇־~!qN?mekJW=J$.u|IQ{wGXpޟy7SAYuG&# VUQIlrӲFymoO'XH*Qs7`8<[f'TmP;4'ꪜh|:!M7^=T؝K+']iP̓gY{eg{m!y&6mj ٴ ~I?^z6oF #,؈۶23QToӥ5nJW_~.I7WR'_V8h7+#e_{9{|mZAkX=sISw\׬8#3`;n4 <`Xbu+B1{1SP:g*D0& #i HW*@qZ. [?/l?hs4t*Τ<"3Ky2Yy6y0]lj`KC`Sldclt/Dî0Vzy|;"# DbځeۍqηD #$З6?b@F%To.a|H>%ɂ_R٨ځk(V7iej åʦq,Ne3yLLЍOVgZ%Ҷ JGNe_g ZT5ZBxP6B@qw}j#', b?B̈Ь(l7)GB/W`>ٗ%IOҔFn@әc&NLl7ap__!9].ZЗ:}F-+va b4εȜalW%4*8""/s瞿6ڬ[KBCrܖ0]~҃`lh<SDN"snZ\? -M쪂2 M M+,@)3 /jƇܥ?O4X4V2=yJt1 ƒ9<>!=+ZFE2dɆw_z?D w'}u\a?-)'S1yi%E/5dZ!vPehhFQv;[C1z6. HM>û,ėeT{ia!Dh(: $fQ.l a}1'ʟ1Ŝ1 G4)csK-(KN*ϞTZeeIGi7 @jeIQ!plY"-Y4NZyNRNQ`Rsȶ`,"FN %Q6itETe]3?s'ս !.U|̩0]Xyf±AuhSGHLʴub} MC>D̕ Hg~̅b,//w8RM1\:HTGA:8CcUg40r|ĆOH&@˱?r5.vX F|3F$ yܿԚ>Z6Șmwn(hq^VՊh Px^nS!xdCa 8@rhmxɾmŴxNzk$=.&J/E.NK4 ^,LU,_ Btn̳fud8jQ*bB 9QNY}೐a68Рi,`Nihg* /IIS\2 =y@=P0obfACj}LYﯲ #^ȚeLK«)_>S>D1lcmPu4_)zk%X o˾D#(grdE:B{^foEC,WZryPVX~;#e9DI6y!M~3}RKs  )xi ֡נ~AgtW:|U0͘ zS\(]&Y% Ӽ-!\HD-2Uz]NKqm/Q$S5e8爵 4m)Fel,vS *^Ӯ-Yq֙`q1śtGtGkǗ;8WNqB:H7be)` -`HD #>lIcìfrЬw$ݷ~]T [8EE˨l,+a0Y IY r~wWS6X@8R9XNOs_bi"okhZ? `lVhd+>>& G,$[X\"k,K0sdT2^7lT"sHgڠǘdj8Cecis4.{:x!mVĠ^o "b K90ybCRfHs!.\1/ > }82p~ 0"=ֶ=`|/YԞMs!ėމGBXm4"}+xⱛ %% tg+e{KMWC(Oa٩pV; 36Jwe=]ָ5մ!zYk㲢螅i,z@b&C|8-4`o݉Xj Rõ8^ghN_3إgi&,aK`B~@W}.}P k? 'ɮ,> stream x\IGvw |XcM+QA%z&Fl[!}ح&,~Kf!_VUwhl|_]K^tۋ_.}H.⟾|]W?]pj\h{WۋF_^UZo;mŋpk;gxWnfM Kkmur t N5z:x&on/F~^|bE}llfhOwo^j] }k*ʆ kƯ]ocl~)wohC=N}rSB}{jg˃ZhK=rCgIl>9#Қ*iώLWf<W7&7@fu8O(q > exV~xyR? IivvbidNep`w*??yKy9.{Hi?7ki@>EؽHk@tqwg n>0K^7)Ki:eE$Jrs$:$,lHʠc֙KJLh:4<)ln ͇<ћX^pX`PЅA@$\~Ps(nD 󛫋?_r&A]޶}Ph^4KlfgtblzbW:7wh݆`mq[TK Z[*VW ,FW҆ f6>O g-WmckM?%#%m ̶"'w sé%y%[C͚Y uS# )1L4 9wo}Yyku˓>i0SH ̉SЮ8nϘ'}hm{ZyC%djhʳf xPS~Ce4\C"yFw]8G:3Zns}]^*ӴҴ+r:Cb݁$b஀ٶ[ 18 7[dphr/kWjʂ Ar@0W@d_67}ygY5V25S-Xūq 鰺X+E.D?$|8mlW3mVG3 [V?Hy UCόANI" n1SB!* KsՌN}*v9@KcBkY@`1o఼)D KذGzP;4+J[AcƈGv언c9ǘ7_*IA{!hh$B;F8+x/RKo'$"J_c#@J2IV au8E4>6ZljЃ^ӈX e4hPɈމ_OқSB/p#Mj Y 4hvzO,n/(sO] ]ua&0$*0=h#oSg'[e㽑 O.Gmٯ svqZП-&v'Ap}F-L9k9{ _U; FjwδԠSy;/[ؒP +q΋Ѥ%iﶒ,#xh(nl(ݷVl$!xtL22?X3נ (adp|.)j5oNɹc"8$ZZWY͢Hg FFJĬ)jdƠ'?\75?Ȍ\H/j󄱽ImepKt+F_6q|ܓTLvu_b^Sк^o[ϫrtAr*0 c2,&?JIq-Oi߁-N/쁡lo'&T| )6Ͽz>f[|=IC9PhfPZaRc=#k0lPTȖM:kr\2+R~}b東OLsWJ38v N=s*bW1f #Z0d]' a2|S|+ڠ.)T0y\֤wSDZ0s=~rilLc}H#lV'onig#j!iheY44ĝ ӆ\ySu,%~'7ADh*a|:0i1(6ka)=oY^@Ca,k# OU`cMLJ`m"EwsTNБr48b2@![i)@[3EY"rWp0kTT+`3vX6]Nւ~ʨݫP %o^L:aP}CsJV]^nϋN``K# D}n-ӱT!ER\} F0џ0B6Cf찮b;4~H8`oJ_JJE,7'XRaU ̀1ʼGhtsY̯*5akw^Mz*eώN*kܥED\#MM)6Vc(ʌc8>piw42RX n.yrb$trNU]-v*uA]Oom*'v[S`<*U`ĿM0Owf͒ χ*,XR5t5K Og; 't{8{<}*HP] }C[OXo[ %7 3󽱏x/C2iQy)G(9ZqtK1u0R8'YR| 5LlF]َ 0=xA۔8hj3 I֠^v V^ =_CBk<i|=˅ҜjS#Ս~T'K+B q2C:YR ?!B!)(f]4pATN˓/L RknTĿq3J7)ބ=70"cM.AYB@Jf;oa7E ?t` 0Z@BD-@oh +v&KZfѮ_qRG" qz5t &>4)=SBcDJVBR y:irmLs~7DዯW΃(b]l,} `Z-4.5i؉;q]},mf|m!Ղe ?J6mSƥ,IA{o;49tr̜e1r_+L ~\Фj1kd:O籽R 7PT)нڟ=7d \M Ȑ.r\oΩcV2v1գ+`r\uN*_MPIlׯ BTKN¨(ImB.}=:cЏ%Bݿ7tBC,g[g6ݟ0$g8Yq}Lx>uSq- fA+nImql9)o(ᨈU1 fbT)nesTJ\pORd2)̮cF˜"C.fI. ўͦιPJb= Ch[mtT'ϵ wC/1!D J^o3_Ă_hZԴ^ӵXκ(犊BXk8KQΗK23#Ց= ~z?DjW9t+d2&8M\Pr|1$Y_?&ӪocrA1w74?pQD`Nt ԧN0ϡ)LgӨq8rD'TpGU{?/Z@(Q|`ʅ"d̂D^} 4Wx}ڥMY]U9ojYmpMI.%QrT.F8o,5^Ue.W+[dw2nOlDT :_031v;FOq-U-4kP\&1Y}dԳ7#g7OKi5OF )`Ŵ2#CH_wgPRL\ ,7*;9IJ2 QaL>׈58CavT.Gćg7 {/tDYYHOd38`HC:?S&9s|JAyکP ;`$SwCffv+KhSE .et[Ծ0 NTN,+B,Ljd,&X|iTk,%9AUWeDTڷ*[!))Zl.sy{"݉WWD6R([ԘY¦(Пi+NO-ZnEwER)O%|J^=vugl+u_N 7/z]k;a2幼շ痧O9=}96dI{٨ 6C/~.0Pc/?= SÌcYzANm/S)]Tx`WDɋA ly]Oo68~=J,iV`}@' TQ2XPs\5Ĭ,o [) *˔_I)*9 WJfq-YWqZ5;N=A+0&,g%}'x,mHq.E-t/GeⲏHNu>V9/;][w`FHn"nLaUB,:}x~a)/j2-  B9)^QIe{\X:UXcS}O^ mw\А %{7md4xpWk ?cTgȺ4&Fir_WCWt <{9uTؿ8|~XLTf .Z*Ii|M Kt`U"S[-`qLhnVoH/wt!zuO~̀Lq4P8E/íO]u*Iy]@B)@ :7\/bZf i؟L:QU! C]c!1+7yxIx~i9Sx~<%M v:CAWd1P '(DUsT~߶S"+?gendstream endobj 582 0 obj << /Filter /FlateDecode /Length 4026 >> stream x[Yo#_ ~6-X}p 1`VbpWI\s(OU3`3J، ]xg'qGpa3BΌ2 5;=9SB0jBjO%~W>>c3$b'u'lƻOˉ#?8t&gPPNI'gNRB(bsvnݓ@@OGb^lV۫H4})QHu9y*J}/3NKW e?l2g85Q[L r@g_tzE{ KxTqb43 }"`Oq-rJW[.Ƶ8ݑFkCK\R RWL{ ۥJC5`(8 ,2`\Hu[YI?H(sl4LmR>W s6Z EsI!#(P/g] Vef]r6efU|/iK], 3io= /et Í~aa+KMOXWlHlsV\T }9x߭ FTta$\2Pѫ/ 5 b4u{^r0m (-0pM 3!h׮ʟ{6.`GAqmfV:iVAެ,/JsUsUq)?kVIkgV0%U]tb>oz(R"z ݮ7 dW3@~*n:cSHh‹J KA z6 p734CRiڛw K?lYX5Y[RXZ}&ۡXe}FiSS8U&=uꓶʲq6bR z)JvN՛z(ݲ6A^mq(D *:te%MP-g63X4W U\4u:IhΆ j4G 2,ydqeHЫms;s_K{6_(TmWY7:mrMΚ,ĘE >=CRH8nQL =8[CEgZt܃jmݪ,Q^^˺SChN$"wؾ:m_4 /[?RWJ1 N^ N} S1Z+D)!0(ϤsB7ƉJe.LZvl8鲔d9yaARBhըITp-=H3SB  ShV#dF0p`ˈ2GSYI8/he.&4_y^\m*77c;&4P[JݧF6^WRiY[}9MDTO&S~6Uvd- B/5|*#ԁ{c[wP<x;YnCA&IaHY0wGkB$|"P%L-rqʝz6 2!\0CacQe8!@OKA륪j"RJ}8>I]) ڦʅFQR{JeCYM=J_bw2W0@x[q֐7W+'`1*yő@3`P4azu &{ O9!Txi1{ /?_s=0R4>e =}tvIRLVq$K9g sv/|k*&3 gʾCPNF!~J!@hCzդBpX!Bi_f.stoöXK&T*6wwCkPEd+/ *K[]? v<mޔ+mچ%};ASuE'*"nE8_%jPpÂ\B7ztJƁ-Mv?tYDZGPdV(X\qqO_E.j7-W{P+|Tw  ٠@}oUy+wLUE8 !,,US(|d0?¶sU龻},VFtύ%0/ȴd{-91X$u8⸏:7 U R۩(bs (6?l{IM/MPX94/2>Hڛ5|+F<`IJn3d\;5v+rd#D9 bIy [&Lc5ODCCwo_qLV8cSlOlUԆؚK |xjog(T3C `Pon }xeI_<cca?ʣL&j n^mVnULBq N?~l;>e/%4\X@SF2OA#ΌKkR4bxFFzGI_6lt>'P.wLEi`AC:~_]L ֡[vVFli#ǕMh 6uȆ^ $J=B/) eҌJ(5o(Z\ |i$A[/ue0uOZ`s [80\R7;^=D wu^ӓ7}DVr߿l"EN3]D@`PU[U-\@)XKLܼpDPc$ŏqnFo'gHI(!\SW'ŠJendstream endobj 583 0 obj << /Filter /FlateDecode /Length 5972 >> stream x\[o9vF^]),&p&0H boI{FR]:>U$IVWC\s!?--:~w.=]ru?8OZ9z?a F zh'h8Kv\@M>|NI˝k?_>gRr%lN4+hƭQ~H :-WBzL],6=6I}yXr5<߯ni>Rf|⷏4!37M:B*]!.]+?ߨжrZ`4NsXc/7O vu N5o;ɥ9. j݇/nŊsWn D^Y`/\4״zZZ˅h9WXd b-3ZXŤڂ3m\ 8 WҩsVDsGi^gNז 9o;ꃜ'aRVס騑n50;u~y3_ҦǦ.Z:ݹ즶#Yh -MT ojV(xhrUA'd+YP)

HaVZ8`\pT:8 P||l`d /orj*%œoc:VTʨfj t (m `K,g Vm &މҊ T8;)=7?[ׂSIӷ`IV`^HAP5򵥹IeqvF:o6EkAۅ3сl~TSwCej6hSA怆jp iyC kfGRgV&hFO9Y(fд`!BKT\EЍFiow} XY ^,;o䄔Lze@XqhV L5j!mPSCPIȚ+= ]?@&{础g#g&ݲ> #۾,vwlwG?:5 8/wձ ֮&q/ GM'p0g-AѬ+1%X>mkzdJsi)X`TfC |/dU(0C5!Cdbo"5o6gBb40zX/~FkeӧqqhwbRV4W%+БZJP^suHmsAA;cS>݁OYTQ؎SE}uޮ}ʜԻTOm(e*XRبB!}c;^S?RHۨI=ؑۈloAvsؒmj0,;Q4U+RcªW\fzo1Dg0}f<'̵ϕ.&؎4\& [S R4ZSED9C(zBehar/"6:Nм!. 0>`&ozig"L!#ܙC!gd9ГD8^GWV#x< ?J=ݒSSzY펧*}E Ȏe6='(0CQ(26R/!Dy5ZڤR2P雇"e?驐;>B4*! .4ip?ILc@E4b J:>G30v2!ߦ&G=\ṇ\ң_g$6VTa"6Zp3g. @/gTyxI* 1NblF =5ω3tz/DF2Rf31-sݐ Ŵ飠vRpVAT̓EI 7kE4hzw,&f+DjLnBXOMH_871N=7Λn; ct%^ͤ' 4=Ap"_'  ~P;3CJOR+QnNԩ)UDvILdܼ:"o>1JRʎ4BLIg ui)@R *%*2}V"72h|n[e>,{2no7fN5]fA^BXawNy֓X='l96nP‘J7E23Ey*$k-!HB5(.yH5P0S! dpȾ BaGB6(R_ Cӆ7%̆uȗ=h%2TtkBDEDACgENL  B]qr"Zׄ3SȠ>Җ:6ԹP]iZ1R gFQ`V'@r~?1C}LjJ0jN)ДRX+MԀ89F#0Ėp\QcH!AL_DGdTbR?,UަVԐ4PMxNF@gtLӢxy#Az~Zu%N_Ƥސ(ZR07Y ӣLҼ?3 Օ2LRə ]DA)kGBVPղ Ψ9J& ل0fMj1񃜈x0e"lDw6ogބ,B#o_eqU5ߥ(2DG@H˴}Q'T#0LT0d'["I^*Fщi:Fl}-<<U)~Ud5P8^ఱ2o`K2RͭFZ &Lو_Mq"t449&H4"^s>0wsw;.?@% JJt^"sIQ`x":~^q K9C9!WJt<)ΔTbɌЊ7C\H`c=4*$% MNɡ@?ŒP!1o9-mmf@6M&̃l|`?<äp4l~0/ +_2p' //us͞|Bjzp,K]V ۩03!-ʐb6Fz`NI##f16\OYvOi< !qXr=|@#IU.+t1I I EZnN;N`nTnd9WWȋ,u-8/,RiEąޙab=FlEDqTq68 9pժ+ sGJNyɐ#Xd&HK,X|OL*NL"d>]IڞZ| ]V%?.*{Φ (‰/B]،$*SћI<4TW[Lnq9b&&[ Љ[,qآ^kHtLWƤCͅ/ Z.2z B MߢJ\;ꇱ15(51L}H aU;6e}G~N~uXN5ȁ#ᇹ[~WKq>-f磗;qrJc;qķ,Wr%jaa,q4T.qUWWa1#_?;6:5XNfpj씲JUtz U˘(· *=8CG5G$U4N kşaa52OlEt'N s LeTJȒGM՜$8L@Fōm˙XU(E`]ESDX8=f6+=,~#hoBK5`[isCBsz8&))MaZl(@S\P'|@xmK4f_ju2gsIR_qj<\39NͿw$gm7&\-\j@O'"M$07: ;"hE"Bzl~sfΗI({pYs 6m\W!dR+!-kWL,|nw <µ8zr0 GS#ks"o6:#.>ލ#vq48V;.dsendstream endobj 584 0 obj << /Filter /FlateDecode /Length 5056 >> stream x\[#u^0,[SKŖa{`wG;YJ$Wͯ9IE4K ⿯+N.??s!3oBRնR/nogZZ|r%~+纼M&;>;Sy㪞qh qn.߯3S`LU]⋕Խכ;E9q^Rru'5|?|| vBK3m_ݱmR8nu8ノ+0ׇc|尉p,&BK܄Ga_]/ ܮv0gu.ǁ4F#lWY]=zX"abq_o`2LդX,aEٽ 0 l,yp竺8i-G& iz%s\[J5gXpోdFv%ׯ6Igy٤(d$b d E! %+`l0eJ+SMhY+Yd o99t/^7VOcEL.t'E}jq NCǿA6se߼.HMee=mi&*,) f07d=++_j3P(5"'t .N36a7ZT]ݾPFT9ǿf8hh' ne%rQ<#ZC/Z6gPIZ+quNBx+*UeWPQTb!:f5tqdۼw@MsB{+s9S,^˅5 1*Y c{`EAY.t_6-zKSNZ^ۤysa=aO 'xeqGcG,nJ^ם%@9L$sNquH22j -s=; x.@t[ M3pIKaथ”;U6U5נ!̈8asW}4#m8ZX]僥]0D5ƨV@KK:K8bT<+'S 0`hq%te't6B:{yx#3$Zݠ/?ڮ05v`b6 쎟O7a06ؐ[rWrҠx`)0}QWZW+8>C/@Kʜ4,!}$À&50(;‰\R@@Vt0~qnLc s_DĔ p شgujӈ+!.̉r4+iVC߁Be*go%>2%:i3࠴ȥ$=҂Ux7:ݻ,x~X:N`7f(E|r!sW]؎/2Pٰ3R$b#ȻmAA9iAP ?n_ۺPRTE; C6&."EK |6cyf!Cg˰)-)9\-"9xo&G;(錕0VWF5fzeRt2s |P w}x%@g7XJ/0qg U2:&9LQ,LV,`l  .LX,CƆf2dv 2NE0bpж;NA1q}n銡մ8h[paW[AiMS'*f:dc V6sBY#⅔L Tq0Cش5FjYj1*Y.57c[CcLi0FmRc8{l ښ7r̀搄Ϩzâ?v3g%o`@w-Mg!h6݀nKV@wn(@E(p|Ëݤg^ LJ- (>Y}{{(o&&k3}#9IR#-R"Ai9áT+q6r?he;ݱMmv*]t\(Gjeb &LwtPf @ ,'[c5-<&sd&~>U&BvA'2k WcE;ŧ,~)mzJQ!T & [*O JHyWZ+l΋aPZ|;s@\`,+-۱'=zSkþ\Z4Zݷ`x1"Dq&0u|J_»2E|`l pLJb,LUޠI0r6%*F:NTh݉ :Xh^I٦O8ei{s{h3.$h(-ǹ2_Y"] MxT*C,m~5 rrLmUy2+Ws3_xMuubHEJ`&p$]HvOWpB=@䰘jsez-&94XGhz Sa/~~h @Ba-< Rud/;"kIpC2Y$(ⁿŸ[kA4cCrQpgzm8s8(z'3]i7~r~yܪ]ɯ9lQZqz~Uu=vêdԕum RTt!Unڙ e(H4^;#:R>q{\KGȾne/cM}T[NbX1xyD{6{$'6!=Se12})ۯg:E8jnI~%}PEa*yTERjc$~;}ῃsn.cUCxIPH=4fѵI91ygSt~0v m*h\)o O݁Mݛ:lt`kpډ1v<>,B;nƏ:z\b ٹY8  Z jm>ƅm`2]x< jO*.$B'iN"fܴ qW`^Cm-|~ T2a!miL"/HβoL?KnfcE_iR3E=>K0~W XG2`{yx3Vhuw5B[k I6H/L:|: a>N7~т!-\<"Мt[1/u/j82˟>9!yLuR ];Ie*-Hp<Il-O~zl)c#lO*P\$H ̅8}@, l= Չ)oL=vh??r2˥<ȋ9!W>%}[vthJC ? aT"&By?jb' ,?lN~83t#lV#T; ?Ki'endstream endobj 585 0 obj << /Filter /FlateDecode /Length 3693 >> stream x\InѰ A $$`xfRf4Vwێ}RMV$8A=U\}#˯gOn3?Onf<38Yf͌2 59k?Pq6P.ӳsJ;l&jRhzRJBh>/FfY\m|{0@SQeնYc1}~;Ɋ:˛9Yכۼ:Yf|yo_iAR qv:Ps&\ЖX9[Ea*/_f7RUvY#> N P_ )g0: >`"+Yptƛ=,7$K4ng ܮ#XXrHKaA)h[iMtTWҋWcW频ޓ1ց:RBRټ,gWEC?.۵3Ӱ4]~`k/DDIǷ (QJ x7<ڵͶM/|~yY@A5[~pbj zOlu,a˚;H+慑cD y4'B.A 9QJÎ(HA%\/jr9߇]*՜[ps@MtD(߆ee~ m☩!D((/wHu,QJQ;[e߯a&/J(A~=H.2bU6Ak .K8N;wC&t\i\αa,MsZZQzt*d$î%uЩ:Z. /iς@pãB0Ass ۆ ?~*`PC43,;ĂKg &p.ڴ1%lnlQ+28N 1nwz 3 ȓbbe>z[;k ]:kpPvJe49hkC@cD$OU *ْ4W~@X/ q~] pAdDZ C2g ɚp Vi;( jz4r& X)'W'˛e^Ȳ6)IR y btV|ݼ}\m+fs;6@¨7XBÓ~vg`.I$yBjW#R1@߇5FRgx&t@ MNAH4SD hq~L$V1U%LS@j)}3GU ǝ,鉗$xXST}в|"rXY3۠i1koe=H&k ͚a|`v sVt\B t>;03ﮰQP[?&EO_&PjbپusUVO(#0{d\3٫&bnoXOeF :l AT=^8o97sasY}E^0U$$hhu52 9ǵ)R(S1͑IV}XHpO2j4ocfxݍyk?aa 1w'cDitS"ޮƟ >CAxO*'x8pp풳ݫ&gsN1O (xFcȩ,9eA=7J:wWD˗ѦbU(m/"#6!93gzIG8َ( a[9PƽӒ8f6*Zw]Jx}aQےi pv$w` i 34?I+^ 9ߑs3i5A\mh6x%Q_ZWnDS)Zl'Oy e[(ҀO‘@&V.&(½FúS-%,*p}~Lpb;N8*O95)q4`:0oD8+ ;a|;.T2l);58Aแ ̰t[Ze;-ϒx%4u_ǿb^xK$Y߀3<4H V0-aoJǗlamk9,'rɏփ5BX.ltx/EIu_a C1}M%Gt!iDž!8sNTatǡ7[fNB LF☓fyx t=# }8.Yr}$5tNP0Ҫ.I q*v+粐}G,p&$B { $p ^': xHΧgR5)~?x7^D3doF/:yIx m'v$KRZ'znVؒrO2q4xm%v`!w2RW-r* B;AE.݇C;.vWI2, //]j׵XnR&N׈w5#ڴx=ﴮduG9Ywuxiσ&nwy> stream x\ݏGr{]!yȓ=d;\|]|8 ,'-]")W=&9#f_} _/D+O>7o$H<_?~!GmA.nsBjmڠiϻWK ;)BrnE|G}ɟ7/iޕs>&6-}D_6ڴTg%a jZ6y nVJs|yy.4>SUކJV["牆g"q޿~|+2񈰐]:{;iYjkuhJG[h}E+ n}xk;'O:DdϜp(Zcu.:-%1Vr"n} EI H*"EE$~~ӘODFK4?ȤZ4X*^|U~aòUDe)!eI*0dy!ZeQQ_W'-PP իv₉ӻwWMNY)݌K*[Rڻ` BsV!(X@+,Csd`W{<9 $֐Ѹ"ҵ,0Kvyý\<`+eZ:9?Re w튇 ߎJgͳC8/;Irk7#zaי[ پJm/+vM_DRNexHȹfmO?Mv;+JB[h\8G%T$Ru oge|f ptۘP` 2Q~0It@>}tʸuҮ mC2`ABr1(x KX-\al`[0w"F0 2}}]G}z~paj!<牽OΗ,8-%:f$/ . K(tB%|cfwu)QI tz6Z YAc[C ¸h0x cg.2ga _`ͮ_ \ID=x&o3(b#wcAC +&f!.!W!'1ge٫, T@qT¦tWlxĺ>j0m 5kֻ' ( nIOO)iQc0p},Փf(?o*C2 GJ 7,%mћOIWHi :4 Lkzm*HaIBq'|>(k"TW5C+נO;;?@J,8JcX\[\gM ӲILMuUicZIsgs$2$fOJΎU̓D*5y~b{l`ԫ!6mPInз!$y;Ije4YrdY1Qnɫ|8CzJ>?G|~y\/#Iv7or*+|."7pe,S qqK#d;e-wFC8k qڅ7drwwi2~1ᜭGUG Vr*Fq)$* [>ųͤԺ=pݧ/+^HG2UTgȫn-Fۢ!-i50d $S1ܔp _Y@U6ܬ@w2"#x(C'松"-7nOX٠3NwulЅ|yDB%"Ʒkݓ'ܵM`xފ\l{N*QYa-IҲ)^ZBC\E{(`!qnd%UfW ^eKj;顀YT؜\`GA-l`~ 6Ubb\ cY \S͋5_㶇 M?-x;~_7 JB2QHMU%hbQ?7A $+an{\UgœsH#R qG:=mG0FPv*-(U9`p"8KdzD7;vZ-}o0Y4~m s@0Je=٧*45C0یuO1jV;Mp£`̶>ϩw$jeǰN^7V,O`#9>p`gJz':\ɘH3*4mo?,7I>冈\7{F|/~#'f_*UK%ڬ"~:LPRiI܍67ؐ% }b'|C] Lg=ʨDi9&(~o}l St:NrfOje2Np:NOAfZ '"8WЏ072#3[fxpfόea!< 3艋;ېB,xśq9_;D KN Peb]2&ZEoLR؃DU3 3ȣWs6H{&֦NyV7dw_O'6HR %oF+*'g~ Z ݙXxew-v3OU$ޱ"Më ȕ<#vmE߄>%12MKbWTp4G)ℱv%($1!S0o8' Q)>vEEH_z*~XV;J9;zA#ޯK6);qLJDlĺtf_i E:5Q=y6q@$-N@s̼&GɖC#ća\0Qe+Ӆj-0jJbЧ*D<)1p'%'8,5LrcPQR{bTy~20eV6女ySʛT*U](3]S'#{i+cnH'(vn pǰ%n^qx] RGYw4;S2戍] g ~57e ٘½ Q3r0ʘ(ow8hޱJ,UHxI5/ySNPbH~T +ut6G7讴ho'u2 %]s27MּKjK&unN& Y=Ic|_PRT&XKaoV$|΄ VO[u G (AQI\@! B4V)r1NP\H҇`'gÃBa ㊝,bAz Hj+BYV;7{vZ e([UQT0y[Gس*5n>i1 ?rN bpBbTC5&gbEl:OWC87 kendstream endobj 587 0 obj << /Filter /FlateDecode /Length 5114 >> stream x\Ksɑb͛wocb1%n8b%Z$%b$ ffUuWUW ؍9T#+/ϗ].;/{.?\|`ef}o_1.u]^ϰK\+4ʴNśUvJֹj!h;|IktL2eV|ʶc[67ok҆o̒Йy}{0quBJv|yOHaf :8\rXX6u2aMشf_r1 WK6xm܀lncsv!ZoUfS7.[*,.waCN4;kv<]@p~M؊M:W"e ]ew] Ý h֙ru)Z4a.{&;t||sA@>e_.hte ڪ~f+N4a.ar͜6FKAӳ`w OX3U8;ePLۉ\@k1]nP&TP<2 SncN& )~ZXCvwmP8 ([!5'Զu[Hڨ$Cm^o7d{z%sR5wW5Y9-On hkZ4Cz7-a>xyۉњ-جNiY:J7(w&h B97L)T)'ϟq778{ ռwʫev0(]OKX_F\M\ů907D4p  : y KV6<0m0HZS͟75ךfA]0Z\>˵F^>h*(TXi0}UV4\˭K3k:<ҞI|l\ϯ^_/yѵXvΫ,GVJulrHjq(two7&K`V⒲cȖ|{"jQQmT3QýDZIxjOAL4^h^l@ e!dyb*;U~'Lf?&# +nB-=VE"/ o7 ;?|u#t-& y -@ U\y곀} -Ndtzfq<9Pԏso#ɾõR&ߍx&#[fռPb ^U J,RbJNL>}80p| DygJ!7f,-C71 VbڌA 8  >.{L״\pʢЯVWl=1jA?%bIM&TE0>)0?mw;php,zҵ։,$:d=<7T`DlUhĐ0!SILIc+8=}7,fsd6"kL>'J]M'1iax@ڭ΅9M_ V1)"gwL(nfͧx0#c=d˔&v8Xi'fxzЏ9l,qtԟpM|u\Η1h]Ճ 8 ӧ۲cgMZI@_NæՍp8dGy[5 * ;:lMӥΈM۩)SE $O~:N')j@Dz@47:F{sι>(3gN Vdʏ]YX tg: DF;!q 2#bJ9@4zpTB6|8%BOWvp))*b P_)I=fIܽ HeIZ ;Fm>?S8rZrT@- ^W(rUsIR08; gNL!V՞*wEgWlz\Lқ6zL`:M+j{EܓdSDP]nF7 2.lU j ]$w>'X\3E"3Ez+t3#5u 'gY,J]a$#.g'Z=$1arNJĄMɃ2㲨xS"SccT2 ).x֎)+}b Tj*asYgO(WіOCX4X91[Xpå@i_Cow*'} LjhA\ Ր`7\BI3 Im_ NSHׯ`cuRҗD({ a[Pvy:ҁ|!\nAn}2z|] ft]=M?MPc-ĮysVWV!;PˏIN(*RZY4kiQRRgp],!r_q `98$>-3jO>*QU+T<4nlʊ%0y+&Dy1 ise2! j[J#&W+\ʴ&sNR@|F慰9'wJ44I~*zuMCZc(szR!RI*r"-܅ ν_Wh)LϘnص0*dkiq ^`4BRNMLe2h$%BwUs @Rrc#PU΁AGhruNC|*HkLx{&6~֙[ :%[CvEc-}C+TmT68!7&ʞ'|Uk\bɝrd86~ktcgˎ)F|27,$91gW5hz6:ifU6VϸXlj#>FhR΅Y={H4bS6M|2=:x\ *gH*-LRRec|_j7$L,4r Q1kzעZ} >A5^$ɏ<{?]ylY*eul[!z~UhUCe+a+?KJ)OIL<'FVvfNp! 4~kOO%gcY>ˇ[EQ_*$֎ŔLC6 >ҸJOO!:/ B`^)2 #nZZM,eo{(cyS^ gy!OE!X\> stream xX\׺uٝ1.E,Xc4MT@DQ tPP",H[>K&AT[K4jl$M,7 ;3sWc҅d=]{y{A>ҩL|OdԚ39x_9S{^\&s_2#t]t۷ƎIN`\Ձ^!>sG04 ^6t5f-tuZ8Qԯ~3\?+,is"Fz͋^fZW_n;y{wO8io?32 f!3qc1bf(Ƹ3f,cf2GƁqb09Xf.3Ǽ83C7cLFX0celʘ2LO.4c$0/dkd-]M<&]sesL妱ݺtvlwI=z|S^Ы4ln=}}UU1,YNFp/a%Uae\u԰k{pḒ ç 揗pէp?6`Q'~o[7 xtŁ5ф[d6YFPPxW5g*Xs˧.U"U +gKKLR ۃfXfrCUh3)C&@,壑8')V׾xvȥnm>YCh P4Y_[FDA#=A0L(RIwޡgk*j`t%yD{' YB`=6(}r%XC>wNZeeea' *C^.no J"Ж\}ܒZ [9 dϣO bA[nmr.VbesOKW' FeΕz ] u[lfBFR^8$YM# eUtN@XIgX;;:3i/xV/IqFuddeR!}e] H ]`^K-UP*O-s:C%A;7b<.fwmyCYb|[e]>fz5K&cWrW8شC{?feyT;vUpd V(oXױ!e[|!6+L@9a*5lT6SrM`kH>53R`aQa@n{EqK9ߞsWh]h TGY9N=n=vW4.O0,WpYt %1q"{ޥOؖ Q?CʉK_DZ5.nrv(wߒ~VDyrx}SȖh^rR{zM Z">`-$~t{;uA(D|*o郻% R𹶃.m㶄$YGx:΂m>}w4pM^gѴC@+03XS)v E?JZߜ,$F=-Τ%Zf%CNNM0kG6k1qEK~41{:O49DXsů?odxV:ҵKlɀ2~;Oل#׆/RXѠsLV%h*dl[-g0GȒBH,iIs"Ӆ)5PRʂ݉7WQ{5m_ 9}q%h" JeuU) riJ;&W}#vJN~D$~d%hKp=l)1 ĮPډKiRgדNӧ^nz 5!g5̽RnCd񟪃3| AknWad^H=g_\,6tYBL|&VEﬨ/jiwME a31^̈d6"|)&vs`-5ZaS|@Vۏnᦺн{,|̺cs(TUEyi##ޜ!¢fy77EEQjT-OI.ul6:{'n~6@X^5BtMv\e؜Gן" 'R-,ѧ&Q/(ڹ\ kV8aÇʃRMeoZb{y(RRyjc+6^o z _zfse Fgv;ӉӮ,ֿ=Rl͈JKMEA, +_5!+ Jz]EP4DoJ!#wyB~~OVމkJ'"E+J;qgoTk#jt "<:bAXzݕnMJ͐JPZ,0x1%3R'8/PW=d\P3T#TOD }rA9mۻQScxѪ_KA81)pS<.˹7IM(}Sb:8_\AqADw~L"Z$qp qEm:<Y 6fKppdpj÷GUo.p!xkPb 'zds! H]G!#O PxK4eʏ%v5,.+:FSF)FW#RF$oM 1VV򻗛k4XŰy#c*ԗn *n,QS֨I0OD[o'94i7J6ۏ]'D+棓 }OF|S99SP` {L|@^5P#P7a"^TitpOCtqeeZ7<EI>U \oR&y>-|w =:WLj__68 zŸ&`7?^כGb8GUTFޒE Ba7Hy0~PRvn׉QQZ&es(|k644]iқLJ g)B'hKU>]eS ;"l1-g3Oac?GhZGK&9V+U&-Nq^iWKsI9Jjb7.a ,f7CNula{1rG8 r(!^^v%Q;eSK&"#3 [\3@Kܨ?ԛ*, _YEVY_yL5eJ {:|F@]C1<_ MO+~؇V wTD:nѬvgS!fCW2p}UNz<ujV{x ow pcȩ 6osP -&:q=;NUŀnV--tS\<Q'gxwcdSī-#hJ QM48p< =29:UCz $qB[ q۹Qym+>m;; q)+fL~.# Qŵo;|@s^Fg\9~efײCBQtNV)d3Ny!r9ښٰ')'ՃxPO*[p[&7,?WvܶM[훕Vy+hQJ2a*)K?2Ҽ_MP+4EOE?ښ#^W=Wi_Y5ż3IXմi 2dZ6VUpBL /"'Lˍ{xsﭒ:]t#@tU; FSuLMunff s3fW_)endstream endobj 589 0 obj << /Filter /FlateDecode /Subtype /Type1C /Length 7915 >> stream xzw| ڥ deJzIlLc1nrUF{rgmlclz $Z!7$$9~}geC 7?=3<3+eщDV+V97#9X:/tbKUk%tC7S'[{hM/J, j;aܸcƐm]"m獵]evؕcmWD^m]<}mm׺mutXh`qÈ9 E?/`M / Y$li;]VDܵcjO{/>֏wI{O:m 5|ȶFul{YDQj .eO aZj8HQ#(j5MmScMj,ZHG-Qj)5ZFMSj%5ZEMzSVR}(՗)9eCS(:S]=jGuYT*Iuu( *z!J=[tAi^#1KZAu:݊)܋޳zX ZIS/]n&T~&~KmyN;êfﶱ_> A6~4b;duC2޵: hMmV\$m1:j)OզGAhT1صyhGKlDƒ7WTYzD 9m Wa/0ʔ0 @7-{Np%4YNWki _ۗC0v3ȁ6zye{JWZzTZW36)p)M K.҈,-QAZAKk~᥋َ,y.a3dotل8+>ZzU_`q+snl['r CVN{h_~Dl>Bwe7Mbt:CaHoŽ%[u TVR-c(ze?$v>[ {#Ʋ_FΨOO!p s Sip N:tta+pcnq"t5VѾZW] `( vF(UjOǥx):H)H9rfܗ[D ʂ 44h.jR G9OR 6kӨ0u '9[:Ȳ =V xN"`V {qtsCKSR !]VC\"q{Æcx"ގ]<BS bL84p1V/;^|!ȧbSX{>Cn]KW9)<_ˆ, :Njq'Hw_8u[Is S z(aP-shOĖI\P T" $b1x% i^οL& m[+Q0 I:5F6/iiIJAͮT(eyg YKux}&n]Ȑ=op' X4V XcSD m*6\ ;`0!< Ց=wP1_:Pτnb].~@ ޏ"j/~\K_tK>a!1>[Q׫w>2i].9>#<@*Ш ceyxѦ#Jҏ}(*PQdw$;%uL@`*$(̲k|J_9AV^'_ܷ[V[}ǒ1,$$%ےĸ> Nf7(XZ:i˃/ 3]D1ѦZ?'zCHnW+ ki#Yf>졿V"oBSf޴~4+>c+ {b'4tD;$h$T8`U &C1?تr9zZ: >28;.ǻvGsC\8W6GRX}B60ZZe5ƭkz-q, SU>aMQmt9̽&WL,$E*I٩z}q1k0A])'^{&Ip2偸5%WFZQXNc ,MX7՛ƺs}7+a&:N( O3vFDdVG{a\Ʉ|G7~L|(JRV"P"VDXrxKt ^Kss_C9:~O{U|[^e撾01!Z#Lѓ6/7U}+oofg84j4Ak734b+fv eW4lpș૎S$οlj1! BaPu١j]!V )6MPD#iUg/B* HcHrgfJF7e/-ERa&@"ćsVb9$:c&nb=m[6:cT<2!'rvW6( ¼bR{ׯ~3H<ȶ^bDEsŭfSÈa0V0AgP69vΔG X:X6B6+6U헾s2NF%9dǔWTƒNM¿Sc"ԼPgܘ.Q@3Z^t˭'(MdšGLV7$xb5*`*M;6lf-KJvUVT$m+fs̎ wzffH?xоŬtkJVˤmr?vF w>ZC !<B47#6@ާK OL— 9 4bP'%dB|vNl8^o-Վi\{Wr 9O~'ǖږj3b&VΔ)Ai6YgӔ&Z\S,okVkÁTiFNfL}9L̍"KH1R t6 2vCx%3obU]SKtÅЖ+[#0RmQHBC1 >~ewcJ_@'kM=[I5aVaE9l* &މ*Kڑ#NWtG:mrPc12)$*bP'&[h9Ho$IiE\J ʝa~Z<]l>sE ٕ .:$GfʲACrJ]̺d4v̋:zFLPQDueIOg7½<Nۯu*{T(-~)~K]3%AHvN3 & |-4t l"ȮFYCpoH?RcS mtkWh|Be, b]dG<;a.2I/7"Y|HD\܈:"ڶ JBML:q#R~ȡӄB$_j% --xؗo^(l=haHr RTHfUbMmO]7Ysp`)CK4-{9Uj~z5wshM|ABN=˷F%|]FL[NMRT8.t-ꁺrf} 5$퐤I 砖諲’fM10_r11LѰ!mk%@:uJu]qYe,^)|B\ʪ %eNFYPU`㈡V\jJϖޞZp;N7&:R}WxɍL6˓C!7O)Ƀ*2$ 2"hgp;Vڧu "J*D (ʨ7v $i(uhA%diKՠP0 bfp|C3+=8;(%PEy<;O~-8L$D͋_\n"3! Nb)Z,ӈJv.+C <5@JC ֿ=DFu\=/1"mvRdbjt5DL&qp{:T\̛Sw|37{Aѷ'0aZQp 5pVE/C^Hi}u~@|KLDWMZy& 5E'mpwJ3RzKR0-cE\[&͝~t0zάyV`uãe+_W!Ev 0鄵"mg]:v8rqkv92j (KNC2n @>ɦy$}2 F8B"=\Xulon=;u^)Cگt@/D_Z&?$߿<7-rA<'9F҉h?w|ETt}!#H&%An!ci~,}Ǿ@Cn- UR:V',KME#6w+߶R%82etY1dDv4мhzv6/)Ɩp˲IK1+:"˷ n*Qq<0*Zmq3x"`RgVmLNz)~Gr G>-"~ 2r\96$- "|42?6+6JYØl-&JLI,LTKbuԱh<2:7> ;'FPѩ&l syD-w0MsK.0RK%÷}#ÂKC2-kQ`r>O2Qoяw~>h^w/Qȧͳv,UBNVa ,%Ҷ]ZºhUxWhmܱ,b7PzIw"Ć^v)UeeT:́Wf4Kͅ F=~èitz'υt_ ,rww>g;2 Qх*~J0e4~G /V:R(Q Ek guZhkSѯb{R;ל& CZ۵˲21x XH&Tf&ddeYRIg߉,?PIpYʴ5xqXNfR>1#}jdQKU郫Hq nhN`蝐QId;|;4ylc߲xkt$Z\13#ڄdXE?*G_L˕lkun]MzPl n*i4јҭ;Eރgendstream endobj 590 0 obj << /Filter /FlateDecode /Subtype /Type1C /Length 1908 >> stream xUT{PT+W+w53֤>&kt S`qXQUD"fL456wq^ifϙ9OFd2ĵ6R ^ߓ8:!NcĩnH9x?s ^D\Id;RSMvJ̟;wApt.ě4B4u zCzn.%Q:d]&Ro5AM$ݞNM8MLT(MĦ1f?_nE)K'̝`ᇋ>(*Q˩Q>DDI!NePdF1Qcƭ}/62ؽ$*D$q06as sZpO_|rMs#FKێ!j(s0Z *nDFOemxl!eY]/ߐVZ]GWyx+3nűӊMGB-4<[qDl0;/1[ӕ#>Ѕw3+,^dFOWO 'y.llOf5ي;;{NHlcrNljG}}T\8J X%ŐcC ͈5k`;y6gj3 5?!q1˙֎!`QdBo%[ʼn].:^KŽX8hik?3KԀ}W'bUsѦ~s)a+7\#XJ?\tYZ!>w[NYш>n)|b!1 *%YhƢ2<'>GsbsB]u2w`~!xwyvCa[NY EWqK|%6|_>  KH =gY?H{[x?idBy]'/ fWا}a+wDB%<(ĥv8ކS8>LlUJJyJf8|CoJ?Yd{{qZL͡RŶwVnVǗX%rj8s."2b|>[,7H&o%YJP18V  EM씪 e#,q1ZRof_o~+b7w-𮨾{WTp@|=|D{喝~Jd>~AR6[> stream xy xSeICAiP) 0 3ld+[-]H[if;ɛ=MҽMBӅJ7((XWqPg\:w2zE𔧤9o{_xĔڶ}wfFeKˍOOK }>>BafLyYHsx1) 촔܈˖XdDBa[ř9ⴈxIRĖۗF/E,̔D$IOOL{d_D{"6펊޹g|$stcVd9yɶo-V=iǑ)Gg<|O-XD &|b3b7Cb=O,!D$ Yb8xXAl!V$b51#\b*q71$!VSF !+CLBAթ;OǴ̻3g3޴{ߜ3{l_؁~ɜMsO%2|h.%PK'}7!DG|a1H&* Z`_R*d̥Vhƴi/Z4fZgN޲pT pO(TJ(Pzu T'`:tx6";"@;;|W*c.֌#B%`,6Pt. eʊFw]wMK{{}<UPBiϦA 3 Kv3`/7}vڳ~ @39;oԙT:oIB+>G'*?x>Klan".IcJAFnI9iZdf~ɃWU>@~vX _> Q*拣${2)P]Fδl4.5+,?6l$jЂڶ.Ʈ 81)(x.N ǭfm] +.6A!' ȯO<2K/c5W&=G'z u¿E:&bwPnȵ4'դk$CBk;1Z6`;L^5(p6٪h1aD2B6 qܥe5[-.zru\}EwtVzf l~b#O} )@˜tA04)MN ?2څ4GN 7? |A:Xu: 7orslwC(ru+:-vB nQ¨RR3xVA 9>w[j 򍞮:Qř [Md >fquZnǼj(" 5; !!?Vsn4j2r 1:y\?'_=J`0sK][5{ZB?:RX#anpx"N^ͫC 02U )  }bh&6MJ*̶ Հ"M:h,EP']M)PLss76GPfcnX%yM~-C|yM>`o}6eRO=?ԎVq*~$Dvh:E,)+hWĔ 1_ zЏe^İY]\SpA2/&N)i`=m`U/#{e"ب5&]kݱ`\bb TFy65k{;?0I]cpEuw! Cq!|&,ӑ^X;]$%6h&UcMށquES!K~NNCnCmI,7(vǥϻ́go7 cqG[(T & PlB?T{&k -UȮV˰$q+BW n`B=q?M~Hb"tM<S- ,hQŁkmy4ZH`,-dJ2[>QUoZr?ni*P7CKrt HQKItVd:!W^\8zB7VkW&Zn NVI.W*lHg N8k8҈Bshj6HV *d) A8Ye#Ѵ!T%ٹ%NCK˲flhP_U;A(8D.&@Dd}ya~g_!2Us44*Yq4dy㖏FtgJO߄g#?A>!QpQB^8 {Ny} l㨑h5mIJ_|$BQZk? d\iM9mL5AgySpN:z-_5GQ8%֦MTAJnv)sKP65O3"c5pćcDB)bV:~n<mCKjG_C2PM: v,\*Xu%P*3 W (,*pF\1ʠƣh$0D'B5iFwX$} z8k!6{ ݉#Mks$H NBՊSq.Az xo!`uCܟd;|;C/ PHT\~tnW5w+G9snp$d:w|(1EF$dlѤӹgڻ[gUM@~yͭ !۽b/SI41ZJ<#eH< Sp "d{"[A`M$}hmγ"`o F2;,?TA$1j'2M*VUYqm}yJu˟fKM[][˯?!oey>>4"^UR>:^PE{2ĘLs[6.W>1|7YW# KM`x<-:5䏡: E|)UU ( z֍_Z& AgX!ٟ eqZDNKy/dj 辋/ =H(M]5kq #KҸE q$:cuB&(Xg6*,M2tq^x[Zx(:܉Jp\ۓՖWZʢ6!|ֲi]IkȣL6](qb& &ݓFs>{8{v0>]"|Tz_{uWuҙ1ž3g`gN|Gy9dž9eKqgo?mxl~@-f 4Sؐ M77VL׀4+|>Y} .,(ppPCg˩Ίk?~er\ /wĿPÇ3(͍XG^?]P@bVb,p?7?&Y`FV <,<.apQ餫M:lJ}N9ƒXU(jGu3l,XtI $1u}ڦ+fuNuFSſAa75bULL4nd?hrteN8]pߘ\`q}-걪36V}_rJ#("s9Ϫ3cpX̶ nҥt&SHQUDb UutR]cX^"̈́:|o^{C^:˓h='qvIHڼ2!%Ayh4 } Zѭ$n\|G\ۧь f#PJ@IJP-@;̞Ajg+XD>8 Młޡ%Пh4uLށ['Cu~>v=T:,0Bm@oCφG3+ٔcf2tYE*{j}SO-Ja9PJLY/CD+RGY9Fˈ@N%.G\ePuЩ-2Z-48.arD-˫nw? #u>; =0^;5觲eG#:%Yrz d&+Po 9W"rU!SsmVtZ(w5 U %5đ$2oN(eO^)>q4J62iܪ? Ryo6&:zŏkQFׄp%o(u7("\UQULTg89""H;6k(rˊZ*l< >yt0ēO g~։qCeeA TeQeShBzr7YGjF/<1ƊRI[k7Gn-AO"sOf5.Z}{Z+C_p |;(lW4S%u}]fD%&Hƪu֠{hzp .>D>΃6rާl,=jB-A5>n|1yy>vX|]SwMٻi0cϊ#s1Tq7A7n@1endstream endobj 592 0 obj << /Filter /FlateDecode /Length 4070 >> stream x[Ks79&R FSdZjHz9V~H]Mq簙 订$: D_fBNꊟ/Y'Gޞ?7˓ﮏ_z o*_{~r(t'Xm+/I5 s֎W:s}{O}궳_'uUkl;y?%+.j};*{ꬽru)gvይ[6v50Jp|2RTivEݤglUkǝn4Mx}Dnz^lUv7R(v! `kMy!5N6$KWƛ /v΢<^L1AO7wi{y0ADv9*,ZjY[ <:W-x`g^!PVhfkPw|Ma7BlRW g5-k;5&) uD`8Ѱ~+S00z+S:dd΅ .av @:s]rm#]^@,- .,܌$I*x۬`:AQLj ӂ|H7T]l PؤfAV>dBv9 E&ȄéǪF/Z~|NkGum)bC)/+iԉQJzݾW8U5' gWu $U7|1 +j6' N pp㴒V-/øȕ6ZiNz+&ڌԠDt!%G޲gbActɁ9Q4=wu*iÞ#Ore=^&\z$8A4c)}sXZ̦c-WtGHѥ2p CΪQkƐGXU<5&ҨD5E80eAmTfQJK/m0wDˈX;2>t֑`.MAיG)xA?q Po\)e/GthR*>跔P}8giL?()>.b\PIir: ZN1#r OqAX]3f[%2ڻ% rLJi m{;ny(.ƜY/.CKg7>a_sXnPSt;GZ ɻ?*^@9>IQ4aTx tԜ>W6@!!!,pcm~u%.ŲBB@}a<4!C ~*ÝaMA.ϙ(cpx 0v7`Kӈ- U$b9w;/@u KL'˃#NG}q[NuOV>"x&6EFA=]!G Ku];Jݦ,P$}/ieش⠔ ():-!NZ"2m<.*~,T8T4* j47&D6`ҲnKg9W_(B*+ٻH@^Q FZ#h '=,,cG[Q9> ܶx$bF Ì\{ ܿL:w0qs8~ A*_3/R$,?;DO .'sB_%<$X0Ap*rXN@,4:ʴzH}lp:N6izjޗEA[& ȅ:)?L7y}sk*Aoa =8Ɣsҹ~`KȦ Z{``IA" IDR,3ָ as=%Uk1 \;&3ψ rFV5 )x Phdm7fmBsmnC_b4.% uDKLIgZtZ;& ?4=.KrfPP#~B҆/s=Sj-XP2PQrWuh1fO ag9V>^QE(6 sH괈z)yUU#ΊO%pXYCgYnAY`MsasyE QfuPc5 ajEi3;]0uR)zCqw/ԋOk;iTOOJb:Tr!'ϐ I)bb7f7!MyX+9SV+RWNá.\cPMWȉg  5 r]`0E4"&QLȨ޷i#l1D8atb/Y@*iŗ4@XZOw">N4!8,ݤGyYaCOEKJ$ۘd[Ty>H&+E TFcY!`+|4t S &Dq]lfoz)\ʄjv>i6"$ŮO*u:hxܶČe?Jֻ,b]B +XC9 @VTBTJ}UT]Ww,*Q;n@/}6Hvb]Ҳ45d?5>à |ѐ󈛈&^х! ؜p^zywPr7On)}VMpژCS}P#<,s 혮Q5fqU!37T\s=luWDfeKi[Gjl &]o,e0B݅Cv :h}x)aӂEʏunL00v ZZoò}f@l,u wqѰr2e3 J<)VjƮ5#cj{ aGz7Wʽ)C_p %{A1읳baD^"+b/!c&1 oD)w]&MT}j0KAʂ"Y49R$o>#]b}Qx.9V喑*ĿȈ/k {T f6E|@ױKQzjGOf^ 1uѲRw|#I+zUecw-y0I-! )!> stream x Tgǫi,Qt 3m5hu$ƀNTy}S A訣ѐj܍Qqv6'g3|g_ 8gϜ;u]߽<ߏxnΕb$i•+Egd)$ir߫l|5wT!gBG(ur9YمWXl^׉×-*8#No]mx{n/ʕfdI2Ź،]⸘1qQ1u~K&};0R58#3+'F"]tyAL B"%D<N$D$XMl#!,b6o#, OTH/7{R2i-KԱfD$gF HtC8/eټbrT8t@dh4:JZM9we+QԲ8N"ւHͻzl X,u&?`[z֨gtl=`  9֣^e^;;N$Gs+gͲ֝qInCNdR8WU "IiA|W$s+rk`SGE-l-d *chЅ^Z7n.p8An>z M4 Ќo\Y8Y49QR!uW ޓGO:'aPLuVfP#|q=A[ǭhT؃9ZmjI6kDHWTo#֢E^E:v$'E\B2 {c8cD1vonMś>f_!x/Zfxx7@7l/Tq@AƯPwImD*[( CvvK{-vtO=/(-Ka3DZ_܂{йZ;ntziqz|O'%]p.(I*zL~ HRyȓE 'הJ<4wfDˠ%VH!碮pP[dw<4}#i1zSu"N'#?H;]\7r 5t;rQ/ 8 fP-enh{Vg'Tn=C\HeC^OFޚuG{?+J]h9-?iPj(S*ΰk/16EW~F[yrSծ7Z y_JPD"CQS60ڜf9v4 .}ϚGʃ6*/z(mQX14GX{ Lj>Uefd M57A^zqئl{EzB%>gשI>}E} x8LkS}* z*3EĶwiǟ2A0 92`W!AT0e80/a-0Ƙ6aȈa2;"cjw*;Ez%'ȧ GY nqf-X S4u}. e3rnIśe+R`.ٮVQG ?+AoLb?r`dZ007P]8$*yTLb[s *פP!ѐ/o6׀w9k@x.C :Ս k/0c*wkq)%'샲IM:x+IE'm..p: л{\}s^ ͆)>''j}BF3nhM;k+ŭ:'UKII5h -ͦx߰ >Rc!0kp.x%z9S]i(9(V2pNϐLR3sod3(Il;A!X&[GIS!AANJa~h>½K}EΙWag}&upܜBFl)4UuP`%Tn>R:uzH7Xj}׾&[^ht ._R#*q .~oAɅh]9Օ5##ʑ-`:`g x MA[LLcH2Mlq ) ND~tq$08 4 \_X jm% E_>ԆMtxۻn#aس"Y۳kMKӉ̽ErXN[JҔ:XVV_82-IOզ ߤ|C \Fڏ%uQt뽝=D$zm=&/ {7}~R5j^urX(.#<"y2/7X MOmm4:=NO]CW1x% Bu܆݋a!8W{|$nPF0JN X8?9[`s 2WY{V%2ɜ(ŷ>#Cf vwH!z.ϙeLMEh=g;vav^pջ6Eu25j'[Xcn6zjeJHޝsuhU_W?Cӭqg6k޶i-`-,xqoT3ᒦӗDY'iA~K'3 e4g$@5!eGͅfHx l8;~ZQaz>m/[My<) j,a,j@]-tւn\]n*;]Ѓ(n($^r<0OoDž~X|#c{BFk4Zc۠s 1>s,s+/ #||lb\CX/`WN_8k˃xO(9)hӘ#s.;I*s/tSMs3HZc3naAQ 5j Z]!H ⯛FO|r>47MHVow32?66%`:tLfl5[xwX5f" HFendstream endobj 594 0 obj << /Filter /FlateDecode /Length 336 >> stream x]Mn0 9En@0fEB#,z>N]> stream xW tSe>!4s Iϩ8ū00:("oMӦMWI9'G۴%m链)T^fzEgt38W̺wfZwe?뜽oS2l/7mJlԥ/_dKfvYAjIwS{51k$!ys5]FwLd4ƒ]O-[d ~4%͘vi3}i~nJjQF3K7-MyNLJ)5E)i9Y)mRo}j֔[߾yKq4='7-SS 2RKs S gӥue5nڜ%7o[ΕW=F'UM-Ŀۈvbăb)@ !%"#~N&!fw<22NƏ*K1S2&7N];XRv{'5ӦM;<=6cce3g3kdl1~gڝWBg}'_m$kL%+jTF,`6nbHR7 nhh9GY1P@eA& vЂ 6جZ#Ega:ĆX0iHJ`_7yLt[ʖp[X 89y.> h XlP_W~odUPR=VT0x)4o L+hg}7[ T$(}.q۩҂IkWgƒX/Zp_(aAv&KdQh+h$%+ZeWVzxY^%]$.*(U-P" QhET|tiXZtM׎6͵գ>Xw/cB]*Jpl4J٭@>;сda#@^Ҟ@6 B/ D =ɷ95 =a.p;?dpV Sxxt?$`hu+/D 譻8wEv0 i k!|ԫatQLq^{ H@pC:ys(a~_;ߝ)'J3"EBv0=#dG˅[O3(G_edPGy\Re-ur H)z gk'͕rma-go_> Uw02Q2tQR dMD fc},4E˜ Ϣ%]!W._\#_[#,s=  &xf5ڗޕ䠖J2I+UI+\z؈PGlj<$ ap^9.4;xCbXxβ/&G)N Slz:pߎ\ --\I)BЄmW(B_ɘ)Th<9V*CZ$*)b#} gя)Aq r\Jĵcza}dxxnG_֩}͡ѩڨ'Wi?CoёN_-fI@}TG@ RsZ\ UrJHk28=Uι hةol Bc .K5M6'VZ{ϚXpω&ǣLRpR/<a3X4FU.DݪvB7^&`++aʆM |܍:s|4z]5P $8-YL,Dz|'Ø=I s˞82c [?Ch9bulwai&~[0o Ix[#0KJQJO:FP29vc7 M m uA~Ek7^ ۩=;E/aXj#!!*Zty{v˺?pGMm(;P fa*0AZ0.Cxiv= ?wܯWĢX1ZL<3NoaM LJqX*nL,&: / .;տ?G#Od.l$%Iء4n_|$F"Tzi2edm?6{oV㏂FN}1Aȇ7¸;r4AfBY.؟s(G!!H?Z|a;h֓'\yF‡Son,.7|.VVWRfP E@:5=xz+tۯ yvvx\ #Feqh#vysO*! vGrT‡yvCWH6~@/v7U y`o7rP 76tnьysDzAp"ɰ2mN$,4wBW$4Ci֜*[CG5,Гs!aڄEM<{珞$eSuX[lhilII.{_|*\Ml/g\n/wYhvDVhkۓs~HH$UF'D~"ߡKr^XcuTW+V6jRוj'Ϧ^vPeT녗/ dm+Uǘ]i_ܲ;'Ao~ p(56x@R'4?51 KPyJA3b}~4ɡAE;lah\.l'Pg;pnk砍vP8-]xS[]h# ore>H^\^L.>޺'W#nOhtaLݳO: Gù[R%~m-ua{"\ZS>pLrLulJ\&)YO ٪|Uh4]c1H|v?GJ_au*7kWZ|g'` :Nv<0=PzmZ6h?R2/7iG^!D&2Sdyy4{߻QDF2SNJvPҟ݄q͂51?>f vF>-HL((}n?^G\T`GβȊTቍKrdhU767\ ڝ8?}]7ٿ n5f*=~.+dlUG ?Sфgp9ќ_#%h U|]ᬰf3 lvuRȆT{܉ʐG+RQK&PIYܫ+g܄rU*/wm0 ,3 ҦJ: evag,y6-P=fA!8v{dSX%nMSɴ3H6y8!1V8Q%쨳7I+׶GN&>8Z!dr8F]Qk¡ Ғz,m@Xb8ު\|+k\,>l)#%\zTSHf18QpFS>补m<%?+cvm{{9z&#U 0O??>u۶ yFxl6cs3 1 endstream endobj 596 0 obj << /Filter /FlateDecode /Subtype /Type1C /Length 1761 >> stream xmylTؓp&ʴqKpHT;&mK 1^۬7a<2faMĶVҴ(-JQ RHc=MRTqw~pq|55BeJa{[z֢8imaJ9PZF F$ڄ[]Z~T++?ܻG{"`_Z)Q+:aiAuyMVf/ł]* [ 7oT>԰KD)0l\Qmw4VXQ 6 Э,幼ʓ*R},rKy|܄5 'hh_hPޫujl.!_%C٩09tL{CtdF3Ƨ~S V7'Y90KsYmɿ^Љ,>;o%IK9KTgj _8ʪڔ{2m_[ tH4}:P@_> -@L:-}h"S%!].O𕇜E]Ġt3¡!s`h8nCf,U!˟Nm=~2h\Z0Q^?nFxՙJ3Ft1ZmbJ+ TsD?^05P62Ñx"ka75>GbVIc2Ҿ/A](Cg? A.zFl2]̆\Eu[rk;uW+_@eqgQBcutmN.9 LAiE@(l*2PFg`$ů@Ȩ&CUa'3N̥kާ__3qr)3}4ɈE*픰mΏepzO}v|(LOӔEe,~NUD[wZ)(^'=?֊yCJYnxt|dL?Em>cIeH  $&ɻw#IHk>Kŗ;QgtSץoGz;Mp8>׶h N}#IR>jJӊnDIjF&F !zve5i}9qsi= -juյׁ'1|CG*h@Estg1 r5Q7@K>ǕZ-rc@*H @N}6K碘--nsﴀF__iwI8 R 2_"~~|Kd.qU<>3a10+0{~,ux*.ӮH%iH2 ՆxIŽP?' 5; W՛cn8 .R'a#8BjmJBՖc|Y1,m &,t.M//\%.YTX Iuד%OBQwt2tOJ°wendstream endobj 597 0 obj << /Filter /FlateDecode /Subtype /Type1C /Length 2470 >> stream xuU TT>0Q4g޺\@3HAC- y<K3@ E3)+fj,-i+}prݻnwZVH$nJIVp_TYvE3V1`nz|zl`k=MQ\m!ޑ&%5K#]taRDe)|+SԻʝ)LQ ʤXEJ"$f"4`źM''1qd%AOҕ㒒=<h lHD/F'7 {BJ0H,1!^!lWEe" 1k" Z,:aU(\򜤉\Hrd0uv7fE;^i ΫU1d詅l={Bs~1jAhFDFx0a^C#fc1ݯ&^b&\s`<˺"}GȊb\#I>.|G[p g(DrfɔIʑŸbL]itJk`{]7+~MhJ5gB{Sv4݁yBdB(pE& ?6R2Y敬XTBgP+E<d6ݗPԧ^>FvJL4 %+XAָh/[;:tlzXj5!f4/V}49lifC3c2F&>#'N^E^;N M90Zil ,}z|=:ah&*4, -}NEkiu~|ٓ_\C44oL„6RNBz@W6p@֠-J3A@ЛtQ_7CWϙ]\Xρ"ػ77fBV .uQFtшX`0Jg.ꈢ(%`MRe8aiϔf%H1#!^s'!{cmd 7A%Tk.<PƦm3MM]SVqTW))@]_X\edZL ,1W =%epxH.gjꪍf0]ffB׆-zoG8CB},yHftz\@x[xdaSp LIyM -Dd] _Oߧ/_mYk%cq~T{Hf Z-S\)¶[^Jߴ(DboX =V{S(֡*.:u7r]a;ljϺoC8 hgۡ&]jalfA>Y^/=mJ<}r4thzxI:qhCtIzHP+SɅ{r m zp W3pMG::v+2-k<7w^3`e+!8'8j4P h"-u5^in@>7Rn8036)C-,^ymP%;6Xo`s!<-xxD{+SpnAI${(` e%l+NkQKHl%ʹLQvkQ}]UeE{z`,9a8^ÎQp;Y=^n䘰 9Ytjzx:ݕ o?r]-0Z_A9AzѮ.ugδZn1JZI]9}@$O;>9r~`J0ZgdjIІ-@V73w փK dhr$S>h Y}|փ5}uꪝ^l2L,ZJ`$f:%H#ĘWKHT@%TTh˱:yÉVI)(C2>~Ǐ^ܶ_S0kJiXD^zmW8vAXFmendstream endobj 598 0 obj << /Filter /FlateDecode /Length 978 >> stream xVKo7r*PqX-EFZ${XȲ&F}K.D*2Z:C }}8Ê__fz=pܭzWpBcEz&K]vxkθMR2nᒖa_{:ͅ>8tqpU(}^t7 lv3W \0c %B)R3G}T9Ǽ%CGe\{9ɭ2N@ F֔!y ߼l[7|.✂!a g5vrOB:sb9OK߯s1N09rq?f8t}JTJrG(a+ѵ}~("J]f(>u=#:*[9!YҏE^RSQ>BGæۏmț:c1t{]Mv:-KKyx>!6gC*>W1/mİbKaZS* oy*Cԛ )$,!O5`( ϡNZ .2$ "~N3Lb!h6ɭ7^ӏl14aXLG;H6Lwc;4R?} fE=7BAd4 #et ׂ#Ok,_A;|;1endstream endobj 599 0 obj << /Filter /FlateDecode /Length 207 >> stream x]=0 F"7"U^BAF ۥ /ʋIvx8?&{Y;,>ԃ䴣*N&55[lF̮~+OӀh,&<9PRz,qAe 鎴k%Z@=Ҝu iZ@YǺF[Gyu9m_)aKdeZ"4>0(lendstream endobj 600 0 obj << /Filter /FlateDecode /Subtype /Type1C /Length 1869 >> stream xuT{PSW'K,ݴ`!uhn!KKeFݭ&& ogIx$`+(ݺQvHWFq3>2,PGf~~|}"N"B^OKStFCAիv%SH"!V܀ 'pH b\6, Ho0#vqk⺸?sgMK[DO(P=jEG t ZPxؠ6)_\zU왤PnMPs JuV|-+ ]:7KYVfܶc2e+~r(Vk չ[ zqL,ӜrZ\6Mɤ+3u!0Bk0dMnh;tsYYeօ$k|}nV!ENVz3?[&k=6KMNi.|MUM*wߎ| Jx0i?S [!az&l!>,&pz>X1$}_韌@Sb+97dLqnGS^vD J@>>XSB#7N@A%j;4aE]fˌ%0*`Z+iw=rKM6L^' 2o-4Vfn(ũT4%Oꑗ޸Ҿ"O>ǒ|?¦>t 37,l1^himcc5@s7X-2cPy=}W )YTP<KbwqM35pKN:O׵c$(rfٰK#2-StK1(`PiOb "AAb+D5HK֛qX;统uScr *2D=u-vZFww"B0f PZdAS}n&z{ mſoOQ?Cb{z ~;(&>&IT8 g,'3};@:LNDҾ\'c$|p߾}NpɼuPUeJA0 *I+鯚Sj'@kNE_L'fkG'@PgmtܶsF6k< E+uT55bYjo_u(#D:L,?-&[ra$ z%PZUt+B_@"H6ElXA/jhUy&):4A۱o ,m RH#aZ&!vңS;T_Q]I1D?߸QsBg|Aƅ} $Lv1PߟO#"F:R#m̺mjjk/$)i\2Fh"M@iYC+ўTx}mu룝&3Su>Dz~D\~eOlh O-xǎve-&QTu (lsnXqTendstream endobj 601 0 obj << /Filter /FlateDecode /Subtype /Type1C /Length 1229 >> stream x]LSW_)}}`uoc='fjn'Dtn8%"R P)2RkA"E Dsns8D8vy.vor{99Gyz`"HId.+);,0*5m6)w*+ypo!1&d<+F^C>X$Kӭ榧iLhp@}I.dV1R2ut&){'>(2٠3tf.IN$iՌNlNDfF}1zq]M1 #BBλ0FbcJSa~y -a&얨@GxN^yIGh_V# 0t܀ܚC%!m m+Tm6P tC&`'cBkZl(j,4?\4@3޺)r#/[zmc&3:qxԷbقU7?tMP;=Db"Eqqqq{P45&pȥME- M':2kw[wl@R5I{,|CYUpoz&/`u戆A u긋ɋ'ݞG># osfdsg-/S$0i% %^\AߗFJށ#'L=trA[36zlTECئDIJmE);S o;ep3zgq16BS[Sb7L4+-c]`qvo5hZE%FXq*AlwS}{GCafɎ_&||iЂ^=Ӣz, ҏSSKT"բQ^zGBl//K\BxZ)=dS /hUH4J&B,dt=נxz֝]cTÖ LX`, ZknEAK|pV_W󔄼|@bN $= =5T3>w-A~UPMBAr5f形˓qI┮<(‹@o'=)ǝ y0b5Oi^Yf7rHwgfPޞu2/p[n$mV!n?$a&"@,endstream endobj 602 0 obj << /Filter /FlateDecode /Length 199 >> stream x]A! E SuӍn\hza!Cp\x{1. 6.Yv<3҇2ݧG$G(z.mڛIM<r|QwZ Vd'Gd,e$J{Ѳf,cC˪ X 2CU@FiB֦jOi9SyF cJSU ^fFendstream endobj 603 0 obj << /Filter /FlateDecode /Subtype /Type1C /Length 845 >> stream xukuߤM.[ rHh ɐef]7k{knKVHfLri:J £oec×j}#߻~J y~CBhKǖL'Ցq~nQR4ND>E'<:<;8w3I1{'JͧFF^yvzb#dV`9q!J2kl )<'bk v"vq<ƾ;+Y?a҉( 4?HE!XtDOI~ Mp"z`?WLfDzMi ZOK۹BZb $ӟh+ͺ54Ƽ~ƖT{ԉ2ՑZ(Iؒ:VxCꆒmt]QP֋, > e хB1ʵO`L %Tb(xknTkd؀V1}Wn e;7]tmmo( D$@$B8HC,Ef Ox<_tdM2F6H_czSp3f>6u=\UOZnf̋Ckj+r 3D%߹^NޏʪMDo#b4D>16{Q?je~oyN!ݲV++-=r (V3˗endstream endobj 604 0 obj << /Filter /FlateDecode /Subtype /Type1C /Length 593 >> stream x]mHSaǟg/5o#aM%,GQ W͵ BrӽqZRb BFi/($eBν;.Kf6EW8w#s'íY:> stream x]M h.6uӅƨ04, ҅k1f4x'6VX$ fceX?r5EN D&^H΀zBx5G`_Itf'IyL,[^H,[DWcxX*sZc{w>pڭ]endstream endobj 606 0 obj << /Filter /FlateDecode /Subtype /Type1C /Length 549 >> stream xm=laGkXj=b AhRcL6B=G))׆DSԂxN{Ǯ;B a0&.@³ N'+ɰŮX]x9(Oƽrϡ4iW3N2H$Y=lIF倀.sVW7m.D,!v)r؜6tO(C lȏx?z{ݷ]ntu{)|Q. +, @ u(h xIQ?̀x"OHЉH<\+H6P$'(}3EP+Ʊ Hf5 7M> stream xXy|uNlMSQnTQ!Gwz3W'tH!&$H(1*Vfg~2,O>TRUz#&<uřY[8}>Y~rTA|tG^ߏE#<ޖ삜䔼 >5o44 t5binzjhlVBnKиĔ،PqRhdbthT7Fm3˺;AOdgzNn^j4V >aCƤԈȨ-=yAl$6Ӊ0bN$"H"L%2b+Gl#V BbxXCYw&*u%2n@WFЉe^gBFFk1At *F+stJf ͱP~PpU&iۯrTlx/< FSh&[rȸ9)@Ʀv;؈ v9Դ#$.+v43f }ЀRMy!dtq1\ )Q<4 \_|PF3*T 7| .=mqWGC} ,6i]J;;ML >.7:'u[֪prCZ+ &DrT6Cyt+|@Z+֥P`lhٓ2㡻|4&s)lj3\̌dQ}kAY9"_K%z&@o Q` q7$(PLa=-PACs;LѨ6hvѠGa(W&YD/DNNdd7hDVh;\:K1gVo &· 2 Q΢U%fQr_n6 9wŃuvz:iƘ=YFQD'XZMnvމҫѰP0 7.WiCSjz馑@@ܝ w;>ԅ 2 kSJGrDžssp%'RE^g/ _Hc4o? SDOI_)] s8:lL۠6AZR 0ךF:YRA!5EPxc"AЃ{d&<0/QVf r↢̹gi¡U6-IZaEUtg *h()Ɋ!Ԩk+;1$ܙRǗ|@_ʶ&alj8wuOnuLБr[m?߽ J+NPP:PDٹOq[!KU 'RG FfSSnȩhk9kU[jTvb*~QЋ1&u,GE8[DpW˹Z)l=4<;Q7gn1OCIMCeFNuTYa"ilRN cNu|=C۽!{s-Lfi~0* eomm +\nI4E'suxz(W^IWswT%On]: gU۝S C.)It"$0jP $*]]dzJl1A vUF柨F\2ᐴ@#Sxlswr޷ۿw܃xK19bQz so/*>D=&cr 5Sd )1*P@bWBkP̱9d rѓ"G$ǩM;X_+49NgKG[NOT-ފ`Әr1GIe--r(es\mBT5@<qށ㳋Ս%vy>:T,bi0дAv^=b5e!UF|DU:PSC),NNI@6+]LxZ^%U¢{҆~q䡑 M|v m*Fo4*U寊8y#r:~peK4h.`l׆v鍟d?[eyFgO12M-ǷNiͅb>z~i *4@ , D˔v2z JU4ܤn ۬62\VJt472 "X`ik{,tЙR  aQO2F_gV uHqO0xK~>+mg)@MH8GV^DdrC:%Z {T[(%xh562 KP Gq;79%WM( ŢbTF#p4[8 >E]EwQj ?={FG ‡O˾_ {qOp) \w+'+e ʢ "ylَdASZe}\ _k3{t>/Az:"3jYZ rRVp{vաu: ]F! `7yBe(98e#G=:pfӹ/?HevTʚ~ɲbv|zхMX %lEMNlϘjhHڢ ܺ|$5I4aeB(bL2,'&DBl-rJL>{}fe*Z_DU\c&\ Oa8ǿTSL@24Cf=>_x-m?v}Dn.O ڔ$$IhJ3gR Eܔ @>+5YL kBf-^cBLFN ,z]^Ypco(1ƠqS{-UTultDq̝ܚLin0ؖ_XQcبh}yA:& A./Wsn|-^z;W8HF~rMkXG!ӄ 6{eNUHXcs9hZ蕹5Vv Miu*Aĩ6HY.#r:'P>~>m [\n3)]5*dW6R?fede/~eilKθ<ڃpl~yЌwgг7!uDǮ߀Qȵ9qKABT5| !ܬ7פU;{;{:N3k)[1S-N5>Baށ E/vy~bnPJ;`92,ڠI6Z L @~i#zxkMشO/Y-\y#,ʢl%LTq6HJ\$Cs6xf_.K/?4ZKM_ӡpy%˶ɥ[Spe5djWh:zA" _SS'nHtH$Y;w~]>H9mBPm*$r'5)wSS&E&CuA[`1nKC*endstream endobj 608 0 obj << /Filter /FlateDecode /Length 4526 >> stream x\Y_yW9!I 8d.l:hpE(>U}tpK >dMU}U/g3^ٳ}; .Rџ&3Я&NRA²5a$i3A83~TjB(c`l{Uiƹ0h\0W0W(~>_HXj?$8ANhUZƂLyd34x^򮹉?BW_^x\TY "^Wٞm$a'vnpa v[ &ʯ5]j-IZ>I@>)Y,\Lk-~/P[VwšD8G@U#qO"(44x)S?sn]90s K;+UׄCV+$8ԑj^IcѡKMp5.Ht$ *kA]:s)eMZQ] G@P3}]8Bfr WiA%esa0YAEPil *à¡i$IPTa{Ta#"ߏCjjcxJf41:3U yS;KrZ}I2AP>ok=+i˅MhۀO0XV au/u;䰨K|CB6*~S CF+`@^A| 02@g'&4b#KhAkh[0p-~%?*<0#%H4trJ!1Ĩnݤ(Id68Fsx%ꦒمkգPѫy!R: ?d󆆺\qybTk ϙl鋡~@7zܹD5DYO?-67)Ӗ%8>@ G>DqQ:< K۾GKI&] .=71Pt:DhTNe(2RlM-SJqD,QCtGQJs'Ó1*+ӣno-ne q҄pOwAnZ6õ%-ȒQ3hcVt/h9mEa La.Q7k:H)k ;@mWi@|tI2;I;v~1P B,Շh&ҿ mWR:b<[/bB˳ŲAk%IlSu$5Px"ʕ=GnX"m r%Ѧδk˻[dp'"jH>-3jPUkc5D /0H"XJ9%ޚS_)<)↗z;5M;)lڒ57 s3tf46m]$Exgζ՝m;Vw,m[voDrX1-[ǧOژ(!;#Tڰd8GHBL9Uy_ԂHzѯ#RPq * 5g.x:`1=ÒH<&<d~)r`hjb#! s$1ѡrL@;cGxl [)ek #to=\k66W:۴ոSMm'ZzRM 6"mmM056cI(ǙhŝwVwNCR TU Tm|&">> M:mAA\Ι0V?)avRSs㎄1 DhBS1|s8#"1k؉G-~Sw:ZX*1,&;A !K'qv4wyY "=W0d/"Bjj*@b^PrCd\e,Xy\JEbj ``n ]q!2bqlm6?$K ;iWz~ {_ڻ?g(Lşl|ΧZ]2)&~18xzؖD-:r¤Yarak{Z+ǑR|\$\mU8x]xտMpƟdLU_M| 6]wH4!khf/ߍ{մ.6Aq3f U{7l_ }A?{ ,Z c$0#Q $]Aph m"=rpttqcr7y[Ԅu ޻i P"oo}:7d(/m Er/g][y u-ZFr6 xs&β{qV5)w^y5oAԚPh&5Gb>`IHQy[eT0kRO>DhnE9|A&~K4EJ,lgyKz Y]xx!_PpA%7aV΀K;Hmfߦ8jA3c&T~ZxM>j}Z_ +_soZU)#Lnng=KW}4_sGOUaF1vТG`aj*nOeBq o:!)'8=xrvFoMv Hvf Ni7'4j^||&_4t.YnѕStoF]]ֽ_~JuTC[endstream endobj 609 0 obj << /Filter /FlateDecode /Length 5015 >> stream x\s#9/^SW~y}KPWNZۤm}!W8l;?e~/x\6xz:nPtZ&JJX ZxO_7Ƿ4>m'U_Lg0'`q~sJJk q7C ; 7nrŁj||HVpI3UVi`fV~̆ 3C"Kt,___˗Z* VV yioK1Ӥ)aQV5̹.]S#mzn ^F 4osCBF7g[F@f%iX39\knH) `ŵhtKrOG:Er+e1NTƩ.ipuOW>]~Fdbݬ1J2nOc>7gYifmk RE9$ͱ+U%Qg֨O}J06QBBt|dܦ昭w=W YX)]Id02{ Yy#sͅV8aRIBv7w ToǜP`zDl& B<#?.zllGl幱Y *2jcڲVr>;}Z 6<[s0F|=U3揑,$on r?ou<.uEЦNMm<7܈F$seͫWaMP'9)n%)%}&+1dET뎻\ CHN8MÒSrJn:hQHLZ,6`)a M.L {*A_6q \oM|'sNEgswf:3aq[&]N+8r*xpw_u;C3X%tհL;/X B7_KʘEsJtA~A8+ yag%/Ʉ%68Ec/AY&;t 1HOnfG\fž _KX{?Z%N}X]HGfUhl մ4`X.^i}33d̍<@*zh% fq`v6mw$C0JlghCʎCtHЧm $ۖ&:̤{nMΟ&dC̦XoAo@Kt rl: S2-:f_1I17qwEˬQ_#L{4qpEFJCx|jȆ(iTk 㶔/ܡyn}#`NiTƺM.%b#tmf}i4Vrel9#ʴ9!ʉxIFć=U,i6ހ3Z%\uez/Do &_V$|(B3GpT0]F'sфn;?p+p5E'DH (-2RBhF}<žg߻~CU͠xl<_!`Us}~(.[ā?uqr)y+@;r#Ҟ~Җ5FЦ4L묉l3"Qu \tjt153:lNf[8LJ6@ZYogb8Y˟N꓁WUI5٠^ Ξ65-_h1i+-*h}t?2?=m j9d"3E"r8Hʸ V1 5N1(P"s'03Űx:RN:4N6@0VK7r"rm0x$R@'XLChDv:#+H=԰s鞾tp_BW0ca쩺լЧPE} .M ^IB9Gx{AT6l3G=<G>-^n?"c3<)^4KPy+XO=#P^9Hsr Y WbhSj ,ND kXy]fljQșz `]RFǡ<^i6dTSgx"`Awn_5lY'DlB܀6F`ϻ @2"W :(1HRiȎ%KMrD h1|Z @^dc&XN+f72yqH35_ϙ곓Γ 256UxζL){|\-S&,%nΕO.yuLT-,&CX~܅j=jsK},a )h 3ض&4XYtq#ɧ,0XQX0(GO.L v NzI fX4*u$):>#iZ!@`"''@;cT\d|(P&Xډ\"XËGiUcTL !EϋTs.)*)//P,Uj147Q ߚj8YʶҸ|_y \a]GE8RRqi. GBoc; IJG NOpJꌚCՄpC1qԧѼV-׈Z|rWB;a;Ҭ`qCM pbh5 *vf#)84?M\.8T{?u_%z>PRE36(ud|*߇]hbL)X (é$ %&I E)~x(T$)΃}5dEQqY=P9@ɊFrO-N,gsqY-5jLhaEJLxr@. 1_7K*>ԴbH%F*#9.TbD, bCqXXa;QOJX%ʸq*nt(xh}rR#JUtWI8),v ZQ#::j=qq]0~ o$=0{MKTiN8f7ˁٛQ&z'>5T \v*UseCSRqŠ#T |Lш nCTBWԠg# w4pZ%F˙|=(;;K`wN4-U7h 82;o/WM]>\g+\톏&qzy׹Zk?i+P堂.IvTx֮ 1CUG^n_ԗ_B+tpOc5K8Mg-4Vӄ谝I,E:R|v)Sl;_#_TT2)9#3"r+>+QdڹzVatLQ\*-1pQMq"v /\POCyX-[Dl:K5֕S+Y@qG3OL rW',ɄIY;ӋxQ 3KM-[i[on? K܄:5h~hGohbCUT@t= N~5@\u/1Jᴨ_?^ ޼`ڶяF4=ʢZd:A=P!z1z {ϩx„ߜ ت!&u.vF%.1KssMaqau%1BZIG<ӚsE*y"a(ě"uOĢVWGUD†:p4qu͇Qr6D&63,UJR%Ad[ <̐@20V;! R޵е$ڽ *iyFf-. b PrEcB i+'PZ\YPVwz;3<\DJ,N՚nm15rL`@ŭ%)iE[iV٩5o}Tz!,;Im{IGbs * 9:^k:NVmUV`kJXXoxu 3~3koek7Ex}'*Z|B Tcwx}1>B'w fL2Av|35"/5ɑcRp3B ӭNtqLPZeIW5äC mkx3yO8*] +l.Y--S> K"8mz6%۱W>>endstream endobj 610 0 obj << /Filter /FlateDecode /Length 5361 >> stream x\[$qyGƼ'4$P`Y-64wzV*$=3؇.uwe_\u7W Yտ=e\O[]ϰgB2ju}spN :׼Zomgo#IǤ˛!?ֹmva-Йt6yal}FJZ^[I ${"--%w:50؅;;h^j&Oߕh޽0m^fzQJV%YaSŽ7h8d&=f2>iqv27k?x3hm֨KLJ:_5/#A{/ ~Jܒ$2)b1UTg*CRB TM?w:3=Dz>[2*%aJ1? }3LH- Ua(D H^%|llx|9lKJߍX3oroJf%]+ 锵^|/+&OZ4Wˀ7 }V*ypVOS ߙH.' {!8H5!g~sp=.NjA0 ƫvMt9`e3>ՠV3VfKĤևE`.ΒO.]D, z2}'Ef\!RӼP?T^O⺂F&D6<_ fKjk3Իw}a920Vޯ=آ?:QNa2h+>7~E6cTR1&e^cm$Mqq[ t ϐm4 XQTHIDh0 Pf8|h[6t:Ycf+ao3y)i/ H&k n{6c(Ʉ'vGjNfO LDeVXWO|=4O`tgg31R)p-"GLiд8F͘[}V'e ,^YD!X42+& sq@!k%~ I&Z-cԖ~Al\2 IHaT^U$IJoa'~qcXh:u,P,MV`vBljYKĄ葋\>g'~y™; C~?*HK!cZ(UCFq8SP9|@QU9 B&L҇~8# Cwb26Ih!Q % fcewy{ T;{p˾ $Ѱ@CN"+nVh9WAJ`iƿa-3 I>Uk6V%@_%~u}+_STr-<VvRbcqS5)gpݎDJ_ט/b7uo<:[/ ]&5jmV¦!5Nwnsk:P65qVw}rI9̔~k2X,9D̥⑲|sF0*B)kP!PFFn xa9 gxH? a Pb"Č 3")2LI6z)`VWa0afM(fs Lԁe)&)VRH&T-o}JiX!Yr@C]?i2T5' oO'"8LHvX#@ˆfdwv4Յ3q MG9.8p/ ۬hZ~့L)c \IT\wRlt-K3ޱ6m/&ƭlZwDV5YwW#@He1IG:< V`WJ%\C$ DU |&D@h!bFz?ۢhwGb-%(r*c2 61Kc};$KBAIK5;|(+ԋTT)kws@g@[PO<ZBi@Ӣ CZiX8_)ZZP8K=[w$vtO g䈎!xU. F:{!5ȯHeS+gvjx+aY`#`,;I>pVr!JPB :j9M !3tg$dpfx70{1/|eKܰa[AƔ,U`f(KO=պ~*Mei^TX4 JȚ90CϺw%{o,JU4fSE>ZA֮?3o!9b i&o5B qz"fPvV-& !t2 H!i'/'=/oĢ=UĈ621(%g2mKDF$3 Tm:EjO2lc˱_# k(j*m_fc-i-H34YC46\J,@2#v~U`5ԂHژw](5UdZ+1i9p~G_-9z6 I4I`i‚`OC gz<u&12!--lڞ웝[x^,8A6q&쾾)fZB<5՟O[{O[졤ⒻVH۩Nf XSPӑL{lR@r)>ɭzSyջ"dPӑ5o32+tS2~y7?\&ՁV*'ZdrVH8^L:HA2? ,h8߫yH)n$v:ѡt=̰_=?3T<4R&I*nD~juܵs3uQtL֣f i$<]SJ_gX<|Y}DH= I:4d>6 Q ] :?MRjRTh3s{\pC:%' @Dj#Q[0$Px^k]g)1{ *gyFZ|9-4ؑ;ߣ"/{Pth/ѽ. YBܝ>^qtΣ{ ^e%areRصFPL]Vg>?Ij!:cZ)!ةK\KTða(Gb QY52^(`,!B4_M8h EXѴE!υk8,ѫQokOaU;e]AbH2nNl~R{.V 8MlbJNsȭ\ʌaΧ0(\W.d܂k!lzZ8 xc%&ica$_au9*/~Q?ٜϤԻ#po|l[@2 fɀn .瑳OK:0% sۂYK xe;C *B씑h%Tm0gXV9aȇIZPgVuN .a`b~ PMjUXžykj7h*Mlf߾vQtpU)^tN69T+5UKC{z5zd1HvTj8i4"}KyY8 n"*o8 .gj~KW$ř?'ޅc\;(( q,h ?C2B>돳$8`:f7=OH7 s3Se4>P3c!7 M{(褜QLva1z7lzdiqnW ~!!QVtce4~M|9q#,g饉?? *Ϝr9.C^@?>,='w(,wzKxJI1Q <anhux\ 7:rQ"!vl2Wm%ڭ=FFOW {endstream endobj 611 0 obj << /Filter /FlateDecode /Length 3379 >> stream x[Ks#7"7ڤr청Tv\h%ko~}A]M n3O}7nx|w;/nn _82/vI୴LYtno~ϗO˞Z9}wYQOzJ2.z[\Re&*k.%ue{X1JpJJݏQMZ.8z3vr2>#~)o]և%z/ X{fߗ%&v!iWTIpOdlJUfң8~dIk*T8w֑B.7N3O: e TD5~OMiC,b1!Ř2c %q}Gj^2Ttw-q$!kenKloxB- JO{aCLi{ӛwS̡k%K2WekuqNGJWB"tq6ac>J%r>y\?,FaʊBUFWr zCp%[7ԮV3$-'й6K H?z`/N]Q{껏e{pfKcj^^ק# IzQYV|8a.!Z,҂ vA3;)  @A,ɣJ0*8euF]3^1kK(4\(8N@Gf Eym3q́ 㽤p'qp -7'`Z]&ZIT4H 9HQ&oдY(jsh>|\6xXR"Q!{N=Z%X<"R*D`#URitZӶfU!U5(pڬ̐?oO9 v1*P0p 3SQ;|N>\NjbGPV){T{)zs‘na3qT Sj*EP DΖf@ 0LJ2B:إ["(vJ -zsZl71#c.gE聳WhDG"pڂj-*DQI]3rZx;T"f@5L#ֵ)uADhE0&YCƜ1dUp|n-Q "$ w2/yx?J("p]UAė+OQBU)J4aNI7_7ciJe[ŎJǙn?ER~s9m.l!W( r$ Bַ砢 W)Jam:eRoF=Jaq o0 r$`܇v*z-A0rh>8?R-Ab'Hls#Uy ó܆An.ޚn6 ۫8n>CwJ; )y0 OѢWi0rT/T㧎ZiӤ[x͟Z;6L xt9<7o 6bAi>?g8fgd}Hz#$#IN n\uB%A;ڝ0=%N,J47Rg!q0Yc0jE jxlxk*_35'|l _a0 J~܇߾ie.]A Ɂcz6& ڄNwI~kB9PūxbI6 y}ʄLzr"m9dc@U3}KSna%sߤphEv!A/ntggy1w$}.`_)>EUXGZxeNOj]C͂ zh c]?~XBHP.qZG=MIbompiɵrGb](g3Ns c Y:ϭ鞉u˞`_ގnvw wi=fx4g˙!Zx ϽEb܉y\}-y>)endstream endobj 612 0 obj << /Filter /FlateDecode /Subtype /Type1C /Length 1966 >> stream xuUmPT{E,XƴSQEzல.Dkٳ ȇ-U*j5N$8v62Q'se& ʹ?s9 JC)6vWfY!Py/+>ҏ@?g>M}&T(60.1d_Y%ЧG2rMsn>͘N֯5YQCoڡߘE!IzúĤG됢i⌄̬])j=5J6RrVj%MQx*ZKe蔊V$(S*ϫ橮7?XOZg"DH 1w4ҸLMT)i;w+WT8J`0ȅA6 㘓fw0s\#!DyԼV.gL5$@'WP@DMbn#+ZE-s{5]DB,/Ew7֥ͩ.׉8$܋51|!6=Uh}X*Dhn GaR_%Js%۶U\Yy2ua#xlaOp VĘ>`=T[(o>zS}; BSre/_;:k:=GueZWX+K&Sc+GlRxh2H`S0JvX3T舂'uջFMMD'dիQ|ɂ"&Y@Z&+k.L L&Bϯa 1 u}ǼN((NאVJ4йY\ ],1IN]t(hyرV k#m0٣[OtE!lc:fI|10`hq\Odg 1D\<&2b ylGǽ )"M|mYap  &k#ȼ}֝ @tuS[5; GS.dSЈL~ўY`>2]uOIBGrQ'"* eEamG6brLFk0rs7v 8>0JAY54}ou+3loT ݸ{$tI ѓ_)ݏfE<4&yԂZЋ1JzH$LÁ|4$Iv5jp%oBm,Wn+,peRs8C eAґtҐ{j+Z[DzKs#p6vǪZ[)^nMKjU2|*K:t=  8J4M3Ot, YGs.dy+g?1\Dr="&H ܋ҿ_=Ls:!7+#mxWtx/w@ŞqptM ο26[A8]_ʫO}~S~m-5\-snzMW.-u =&~Z#Y *?^̓ɌS0iMG;&v!+5g߻s3j5cw7o}F̼DAX>rp<%> stream x]SLSW}cXVh7-t f P3PP=KfvTAdQ.Ze"38PF,J6pↄFYyͅ-sߡX(Zi*.FsˊL%KP/q_7JrRZ[`DSTvuuK~n6N]-Y^v] 3Z^šv\(Z(k1k-0<֐fe&3Y\ҘO5#'&rzKa3Bed@9(ŢHVWJ$!1ң#A EFaZJ'p.詨>>j~E(i$4a~z(Y .%cH!<%c꫎N hY^w_ ! jmXFr 2qbg ;MaR,dԹaWbwÎmv{넡qk,u:X5Nov.!m9;Zk/ܰͲ5x_|fsƖY鶎c'؍/vvt㋁;xjG~-)1i#Q]t*u`Q%1z ,DZ#<TJw6$`` 'cnG.%eԩ.BvuC]Oq`Unomlc#F|jozvjn^F!n%ɻ׮opŵ,@⃩/܀>}=Nc]$hH=qx|T"ՐDm|-\@@_1e6lǟ;Տ Y!ճ0 q pdXRUnH< Y.X€l GSI >ŨohX<0IC'@eC4Q}c&%]*k{Je75Uq1Y+~sKE]{suXMW,26M=&4j/eT9adf_^ VjOhuci./,dRtZK/H 6uV7gܹQ~֯Se<4'[|m6T1 6j *kn=x4_3Ol0+w7 !Upr!??s#mendstream endobj 614 0 obj << /Filter /FlateDecode /Subtype /Type1C /Length 3533 >> stream xV TS־!{9E Z 8jS눶Uő1@2@$;0yJAEQ@q񩭨hO}xZϪ=?rֹ}Q,(H4l5mYk|4oFQGb}rZK(G aZ5D}T_vM2e#m=n݊m;U!~v۔v+V9} ~vTJ^Tvkֹ,^bt7uOQԨ!KCGܱwkӦϘgf;R8j-5ZGM(G+ʉZL-Sө 3kj%X/NYS6ʖL}DQjd]OĻŏ[Y"!z$}Z-z6`,4d?x`7~kC&<:ãZ^v#:TfYrd`<)|^ (Цg:T 8Ԓ)G94FBsBlI(²TҕZ<.L!K2ܖWOēbE2(JR\! }S djK~٪NI&ҋO|ȊM@t4٣ M6)MIv7nhP4eW銁gq\rL4$DP:sBh4ۏi+Aο/TS<9/x%l|e~SeY&ůmvC9o~7x16U]#!5+Մ6eG: 9[*#xv}at=>͚E FQJ~6ksBj|\T'|M{b *4P $]K W̪i-hq3=ɡETT^XZX`$EUY |~0z`!ŕ Ih5Qxw%3`v`8S͆cPI1h0<=Z*B5#c/N#ˆ0fQFFЗyʏⅡȋW1Ci. r%Ֆ jFоדZœ y1I;Zy9dۏP;av裐f><րi,I{'z\ +ak7öx>T3^Z9Ȱs1$P72x'I{ΝS(@"x@.P4ǙA(=ZA0<ȁsPaX5s\T*e+kT}Z+금~(*<\hl98m:+g/>D ^F.EO7!wFը9_ ֒r0}EʿADRW;u#v${bw)CΥfV7]t{4a{GvQ.<pU7u$xwZ$ؽ7{ ,m*ʚv V4! #9(|/dE6!#-%wlzQO!WwUKQ[HiZ=I?+\5+`x, bt?Koq]^lr[/' R=VբCP#7eť-S<cT>`=,7k:=onxi2ƹY?XZ} ߛNUڮ)ka?_N_;be8K;h% n UI8[fޚ8W!9dxd=C}]/[^O*!-%=J!.ro|&DFyM|~ g:N?4`|ƱsLs?[R(g'6@WyE$R<ܒMSv fm'_]*7^{JLHC)a/{o-Sq~dXS|l7g|ʺҚ0=tPHi{m1Pɑ21PI#gORxWޮkrUrԂ}eA];^B4/>̑5/$_)4h-ŐszKE&FJހ쉑4 xNtҲ/'GMeEH㳻k dWlaS9̅{yDC$CnuDKyF$Ă:Jd0f4TydFx'x֩Dp|(2ö tºeND֩ Z١aoء`g(22 "C˭K|mCՔn& ,U^XcjG*6l ⵃ?ܾ亘+8c?kh='}=[-2 ّ`rwWr0}[#pr.l[Pı,Ђ(k#4B nܭ<% a˄6@q[v8t@Sա+PܐT"O(|Yr]+%—yHQ"n U TQqfjC^!-ݐb4 DQ`L-endstream endobj 615 0 obj << /Filter /FlateDecode /Subtype /Type1C /Length 1516 >> stream x]mPTe%iYhw7E0eP)4V`Eyi].;""ۺ b4t-FM{a4rug:EgbJ$)^OJ64ٺI2*⧉g$P_{'? &c@4% ˊru7gώ|uV:!RB!߸8?W)ЪWD&EW\,c:+{F6fSS&WIy>EM=':fKS dPTLP(j#EWPLrgYLK!*u?ExzT!2#a ; hbÛX 3.ّHl+)? <|>ݫ]p./nyӒo[D%SLy(4{T1v0;" 8Vye33a01?!u !MI.\˷W]@2G;î`$\QAIaF}VG;N?^Y; KWH51TWՁ>OQ~iO@$WrLt]wx=}#b6ǡ֮%6ة8RAZ3ki孪Bs꺪:N}Y0"^PzgymY(NA%uWv2*8^ES#~̼%cI](hemh+σ=8!N:/x=5]Nhܺе|iHsuiWX]EZ xR﫶&+\EN˷AekcmO{9 4y!_+%/K^W `ّ-9x>TڡѼu;O{xOpA*L:MUvRH宱tz5਩ØS[ M%.Y5~p݉0ETKL( Y~gNe ņ YxVwOJ;TN-7gDTWm:MZ} Z*h 7L\ͬS5AM`'7q›߇}'"loښԵ]!S3z2>-b{Kˋ"Sf_T4J,c Rz̖4ѐ/ _ˌg;3/GeŲʀȗyFߙ6-8cqewy^` !P(^&"L& HPSӭc{3?tnñ~;wVi3_͐Zot)wCcGYU7lݪ_6F ՘ faLRa{9 2?qvzZO YA5/iAc02 ~bmX }lf5Xl&(o7xendstream endobj 616 0 obj << /Filter /FlateDecode /Subtype /Type1C /Length 6570 >> stream xXXTWھܫ"*בAͽĂ]QcX )AP>3л􁁋^[YѬF-Řx.{ nS݋H$Vq 3/Jn^&ߐ?w&Z,{ne-Z Bh@J*l q ?nI9v;-l;0$:"pWNL[M>e76$n.n&;7e.vN.ܜ]Mm?EQ8- _hx\ek@7eFӦ5cY ;nIq5ZG9Sw)ʞrP멱Om6QK͔#5BM-P)ʉJޡS+U j55ZCfS(kSrjMP ʖNP} ?eE Td$BWLHOzX hId[em&>}-+nfyZ x{ 5k\ku9` 4X!sܷY`l'f>4j=l3÷/2 \:hWi/ {3r^XMJJ,z_e!C 4P+EWRg3ڑ\egRm\!SҭS V<9VP_tJYhzD7mXfop ZO] i4lɰ}FL* %}-'y m*xӮ/cP=ah%٩lY:꯽$)IoCMb %G6#_Ãc#ȑ/m[l/c{a-px䉢&8GvUz6yNT9I.H;}\ɉZ. OĖKF3sDhϬq`!GqȉOVSMs`7x;\< GsBo><oD#0 {M/o{6X Rʑp_Q;|45z=3e;oaCW5| z=E6!X4}OucWz(eP(lY˰/.LO@B(ْ8dp[BbWl䯦υ>ӷv'G% fE}ZN={6Ǫ4XN68=jx,Z{ m_hv ,Y @h޼c̿ ,u<(#[2Ɇs*aj,O sċsd[5Y <*}DPIlFr7%Y*c(&blǘd!(ʢ놲RvKJi_j!Y[e/a>@y}P:/5}GNbIEKy<OCcml QCZ>YKCgy3{P MEPI`t-a$חR̈+$ 'QI(C]U_֒°plyzN)셐U?z8&11%UYe *䓉'+&cnG}}&Sj3I{x< :]i WѲMm$$pU (QY!LCi+*;ae=˯qsqoMo47BsɃb-g\%17h_n.43 zχK~~+աVYƫp>_F^W\7˂EhH[xxiyԣg8ի4a%xFI> xeF7S"HפcN7bݤϿl' `;x?•#kp<ьA"H0[ =G 4H2TdBmur]? N*V/H΁g@їWrݳjOj o$G ulPأql}5Ytz)Jhy|=i A_1GMD)ED(mk&][%ML /xCBAz^zstP>*"0 BQqHzu)3F7"?#fͻyCLy ?Vf??8V!GԨ#݋63k*eҲT˩y|Y"?j#x3jγЫw5rRZÌx)9k8sgÉMzbHTPGh$d 2a4WC@ x-44T]ԑ2%PFHSDЎMTX}rFO y>0vzMOXl^ Z\jRnP\¢*Xw^QHUB\tGɼ{$m豱و|[$/## ݅tV]{hwu=2!goR')¼w(7TE4/hz҄↶ŇHޮw@stPck[=uJ$K?aK%#+FW5x^UuI_۰nLkӀ*-!-'*poTBBb@nRM~(E+6;p[3:Sv=->:*#˫.9rEoKt%{aIB#竀ȱfo 5l0BcÝ g4̄EWW.-;4`aqPahl Q5WnOu.Cl~ ]tj xߧGKU4;B6 {v3ar[]vT!!a{GwǂbƼ'ȂXvvڑhiia \x|"U,IWC )*&ٱd໚PpM Y}8oE3fҏc5X@ ^fg@Cv)/5p칹\hFݿ -k=gf&&Ӵܮ4vD6^Ud@OOY46?AVJ 4YQlpKOo:6sV)h&^G)xĞȁxڵq@Ӑ'7H0?ߠͣOC<s9< Ux24|h>QV_SkkE܊;j8g4qtB+vz3i:}FO4bW_}u߻hϧoy߷sm|& $}pfL pqFQN1VGڻ'7>Wnj|HU'FSYX[ᕘGKM*j "00>G.FcǮT[~8{z4@;2Wi]c?W+EOe_r6M{5$$8<IORW+#0UYҁĊk)Ibi㓚/>/q/1v 0/F~dI߀z:_oyiy|Ut4 x8+j}NizʁXc$ozDQ5e(WeNjR=G񺒓B5 rPLD븚a򺈪:FBbB{HS昬_ vņ\FwQGʢyeaW}+_! !F FAv|V-ظlI*g|gI*eL.},vXIE Dl ѐgq% qO]Zw;8%#%2A/̕: vq4v0y7x:8m: #\0A&SS':c?9O}˳:޿Ǭr`I^$&ٟiY40 ќZ4؃ZB%iA2`nRd@3DHE f պ\} ,a^2THzrƒcحxrlڟ`_;qedqcb𛸟B YfTm*~ymam:^iBVmSNnsmE@fy[48n*ڕ(6pKc{Mġ1_7~P]ݵ;/H5 y}+g_JHq0H7v+~eæu4_}043쀪ۆ9 z7͂yem;k?x#Ζ\סVm7k?CYT :7 A 4M2vSbkMWgC : z3q!֘]Iĕ9Z7+,qySzëw?ݻ |WW"cFJ>d&.-3ha!s>l!#3m(ZknF{X xQջExN\:Jg~MS˷uW3?;̌|9ճwcْp8 ie4!]:9o=,կV'I,\[R!B =Y̋hVέY5 KY L5UH'sGaWA_<$'_o$ؔb3xh6q4SQWTBmWuJ`7N\>zl<^ۆH[tQhDu 1?\2ZE$ EXPߜPO #G.p^PS[[^^˱oPEꖋeDp5(=܇Wzk5 {&\IIZP1qpk?l")f|M)d`xypx>i# zaPA"8_iӝ#F[H)Ɋj'r._ %AU-梔ˆ?~&neQbG/dDk wF#[mB+~a9 V9?{,qKL% ƃTF&[c%yvV&IC^Ӭ*]w: 9u-ǪNd?% CbvwEsM=CA&I* $XŨOߡqFnuFh"k/Ƃ7@Z71#pZc3H#HM*G/&.vQz&sژV](f75\)2R;G+I ֩c [@]ʄ 2oC!|g=;Ybvx;NS7rU_ksQr2ْcŪU/ǓN1gB`@Lfӽ͟Wd#E>WF@3%e\E`yZz!NZ۞wdo6/*Xc-g#7wQAfegdr1)ti݁Vw7m}Y pde~B&wť%8F5sHqc^o0@̱ 3cU^-55 HLcu eƠ-qcw .J '#HO0DW $AMz(Ak>TZsQKu{}puU>`0C_NN > Ĕ&1D-` з׷}_NOL.KKeO7OQ"q1endstream endobj 617 0 obj << /Filter /FlateDecode /Subtype /Type1C /Length 1254 >> stream xSkLW2âʮ:h6FiM6(/%PA(˲epYQʣP%-vRmb4?֦?%iΐkbM4{{ιso/0}M9I;r2ݸ>29;38m.󶼜7TGa(T}5 `bL@blvS 3=HxoM+GBY*%dJ 2T!,4"ic#b On ByE`BI,# d '$*7d0#^x z=Uyp: ˌ5@n3rq. kX5[Qo0ʤܦou[tbSw[j.vg5FDM]>ypqϏNM,-Bā8 +FS\%4@'alx6`= g<-o0)m{{nuv4uW8ϴ=҉] f@qu'ߝ!<Ēp:Su.khExUuxMԡ #Cd8bB^dQ MZ].q 廭&\UV cJ59tB &&8#Fh%v}:\Ĺ%.0Flj-]ǟ93%KnLy&( B uqo裒[*p> 9-ਲQZ^Sh@-v~RUVQO?tR_iwtr d >/Z 1x7%'<bMS}NAx;ˠʡRQiqqE/۟E_VnRLP@W.?pFrWΠ4{8Zzw<> stream xcd`ab`dd N+64O,,M f!CgO/nnC }_1<=9(3=DXWHZ*$U*8)x%&ggg*$(x)34R3sBR#B]܃C53000103012_*ÂO|qwaW[ߙV޽4w~+wsne׋!۹Y}} 5.v*T];G҅?|_8{! 'r\,!!<<܇zl^}?20lendstream endobj 619 0 obj << /Filter /FlateDecode /Length 3631 >> stream xZwܶzJ_ފro 7VrJRzw%3ҿ3pvvtof~3QYQluT.q;fѷG3.$*|(GBJ5^;n(l1H)Ҳ'pWαtLz]?.|=}D={Tĵ`OUu`?znP0&GL+F^k&JDH@j۬'zkSz˪QlvzoqQVO}UMUA% נm2(*KPJ\+hShC+֦~u_u{Vd?UB5 w%%"lp|If_)5H,=$56xabd^^۶zqvʂ9۲kwWMoXH.LLh h6`J2A^%EHІJ~+c(Ve]I`F8o# ys@Dspn˃f;JXւTfaEB!B*CC(QA:dyPXrlx6%jNw4`D|XnjWW ',Ѫ/)8YXFA C88,KYp&+wS0ȧ0WVK)߅  F ǮS|%z ʲMq]\T^K ɋ[RIqV{ 'Lw$7ۨ TS *Ֆݮ6)<PAZEw{s(`TmG S,>H!ɝm(A:$)ea|a 8@XL8]Mɨ<ЬrPQUcw90}#)PH@Ϊr #)1l8'XxEcC:Q>}R>0pWq{2l]Urw*kbIѓ0ã@ᙱ|hC(R!`/ NwC z[ zO]2,lݎ@AS}oc.=9́m6i`3*gZLb=[ܛ!XiaVUT\H'2)/{88q/8/A-1jѕ%r=:'; rI(6kH`]SoZc>[to74CDUkR([FR kB͆|*㐤N+bPtgiBB8mvY- rX" / ) Qp,i3V]@e*k& e '6p!",/TfW{X-[zGo1Zx_4am0Yi?q-MoFQBlqs8Pa'X'g>w!|K z \ϢjްNI󣟎BS9ܰVaF^av7(Dp*<7Mώ(&jwuŦ7zqN?Jհ~օE$w ]Yvأ=jY@i) ‰,sRcٳx X#WG"1Y7LcF$>OWb u "oߟ X-jU8- %}g Cz_bDž㲨0{J q2f-uh*YIFO18 VSp`D,GcHS.X C\f<,RxJbГ1&ػCIVcD̀~A$Z=:/{KYk %z@marQg Mϐ} 0<ȓ&4g~38ڲU5r^Q51NS]`aφ*߯1u H ҡ9 !`Ygx?hrL 凌o,"®'UDTlV1KVOǢ$p-üMݶ=MB^RV(6ñs6:'B7:{> p[)~abxdHHeiX+v :i!V~, >јKG2L *mYX DXj&]'0e_0EO~V/8>wȫ`({\"07͒8-4SbJ(GVyHu8yB&x'TD[qL!Q{VG` d(Xte͊:. u떎C_tzR-Dyǃ8$#5Mdhۃʀb͠s\r㓨R6e;Wft!2 t -;RZ؇;Z77OB[~d?Vvցjt> ! !t ";p(}UC ϒbC43Cz0Ш'0xϸGIaÁ;иV)Wx5;/&7x˓~pioYb YEr|qXPAOKOXpsqvE\h&Yw݄@Cٿ^8'pWzmE߁T(8D%_ O# $9hBR4@~ ӣɡ~!4q(#}eH;62/O Xbʃ(c(;Pbn¾Nj趭]a{%&Arpz{(kzZ.&?4~W>A!1T_ 4I&*Uڭ^RCS?ic+Ot$~В$ ddϭm7hlbHh &|N #VHix<~Ou/c1 bMOGendstream endobj 620 0 obj << /Filter /FlateDecode /Subtype /Type1C /Length 782 >> stream x]PkHSa.Y\#*; Fj҅,St*]fK6\-`tFV֏ (O4|g|R /{aN"V[Yi -.P2JFűXZ0nd -X#lubM*:aIFҴ45g tau]tګs>0]$UJHBy~R+ҊBYID(l.+*YV !_lբ8LȌ8ddZVA:BLSI.0o"/0s *$,ME G ?}$d[MW422E'sϹd?-ǸCRj~rv-<@|pf+&wb +!&dvv:=[ZG8pR g_'98tB;<CXbsW7우&`}O-S,0wb9X=j%8M~LJ$\C+?p x[򀗛d_cE&"d(fAQ< \^Q֫Bix29>O}G)N'މ*+LWc 5G~osC +quyړ/ፁp#zK \Ҥes򸛫l=;ZSN1Mg "6.zMBO_>qI%矿}˦)kjk7ql{3|v9)^S!pܻ\tq Px6x3lk0NCo`endstream endobj 621 0 obj << /Filter /FlateDecode /Subtype /Type1C /Length 552 >> stream xmOqܥF}̕O|Z53O9` (4"|9gQ0eV=;V'׋f;q9]>~<!Zk5^Q~l ڊl&MĶp{)-M_uB=dc v6"7fvĹld4Q0SvtLp~s!a Yo9gA._78{9h)M*H񷦧ROO B OWցR&:)#x+lF䔜z&iD6P^jPvUF{TIU{6|/o~\0gRuߠn9{ӷr2wd%#8로[Al,(#|w蝻qzaJ A5qŢ$3o=1-)OL sq7YHF_^IDV v7B\ZJacٵ圔'pb%g(}endstream endobj 622 0 obj << /Filter /FlateDecode /Subtype /Type1C /Length 442 >> stream xcd`ab`dd M3 JM/I, f!CǺ<<,~( }G1<=9(3=DXWHZ*$U*8)x%&ggg*$(x)34R3sBR#B]܃C53000101g <} d)M?o:]}CbUg}e{wjwz7G ǗseSKHa;0>5lb?}Mcmihi]eONZ)r}ݗ8 f[귨nĶiKV]nuܢ}'6^r%[wƮl|e ~8?uM\XBy8yWN|gCI=Sz20Ǵ=endstream endobj 623 0 obj << /Filter /FlateDecode /Subtype /Type1C /Length 7308 >> stream xYXWמ̎ b,آFQ"&K/K]]z#b-X5Z(F4?c.y.-_v{{"JODmlmZ83M9S"Mő¡W@]:㕡`=Ö HnHW颅 ϟO^W4]mo`x[S LަL{yz:4ntXf ^Seo3݃6H-7l w&rmԁ-[=yzy8n0EűK.{{ي+_jo=yޞ. \ߤ(3j+FNG͠쨙=5rfS۩7ʑIQwZ@6PoRBj#Sj3Qj95r =r^\)DQƔ KM)>ES8FQije@RkqZj?eJn4͞6qZGfv2tӋcP(i&l[YTRb+T')PFxl 7 '#O}XFM G~hD<^ ;YlLkV^{8$VM9Wyb&NjGeutL׈JSu ӥdv'yW@KZ^;rbiVk5׌5+ 2au` HrWP BiP _K'wtա:~=fWסVQyԈ: p(6&:X@K~!ɂQ vK^`:0bj#RtY *]Xz fX<oC2]`knaa{7o޾sz!G&W JQ\%D*#'tN}Y7o<{VYQѭD5֚AVSA4aD^$ķ?¯Dח5t)8PTg*JPb>ෞ]h.#nSWo^NbW{6ȔZ^3KN؁HFR邒;~W]0#{8}=HXIUҳSs328b A01 Ԋ쉫V\6Xfic@MCW/1`B?Q`eCCD8apHlH鐖O`)0[(]4Ԣ&bk 5lQFx^4 ݇QZ|!?+߇jLSRDY.I`|ϥQj_+?T^C]+ +Z,z^6 ]2+,8B ]na#›%2Loi.Hd)U5 7nl N@i $};VH1 )(% RNr`Tdۡ/OqQ6o [GЙUAp"9%G'˹g ,{gIOy% *Y=bk*ZNG.|+|3 ?CV(\ixgo=0Il0 2q:!%K`IM%m.q$,܄z)!^)^B뗉}ը䨝=Fv h R#M*T_o-(hZQpDuA1ʰdrǵb 5Պ,Tar(Ep9퓔 F㛸;,<# Exע*NOjT rjH,"ED"iWTc\yIto=ǛZ9O$; f%.׬z[7ow!BAT i#b`mdr.CWBFdZur C>) % LJs;'"sd~.+5U ?IxYxGM$j^paۆ'` 6Mp,`-Z=>(lZ5qΣԋ>.:]r!:e[AXD6 V%;(5{p;f q~Dτ^7"ǝ|ZԂuF iK'[ O!Mx;? ݧ k9iߝܡ!k`qk5Ö+*;lR]IUwH2rc.m{SN2*3eze{+|"xN Jqu&X^~7'0E]v6վ tEI1(ŕ2ҌZ4egff F̳wx"sԚ\S\]=X'/DLE]q 7a]qۙf'/\: c|Y'NVWs .b@-Hqߟ%8(h{C"ZTnj":&?KJ D/^Gu\\KHaW>ģ9'[})݊a(m2FUчs#kY'rZCw!x\G$k Zl6³Z-!Ÿ́Z96004406y0Mk*F?V}G歮\YiVމ0ކerТXED'q:J5_li/yԗ5'dmsnM3*3*2*}*ljsK D#0w nB8/7z`a㡌Ii܃2c2IDyLsHEXHhT'I\:3 NBo%T?]!eD#;E[i W`/sq0`1%V-!vk@h U,!th Ӈ_XW~ӈViD[=Ԟi5zHs<x @ʎ : mjpMZj,Ө4͗/?hM9.Iu0ĞDz&v"H\* +OF-5ukk{3"k`b,Y3`d Z|`aBrԂLP*cp͠=0Fk$J4ɓM^/@ s("Yp(#5=ENbϰfz-bIw߱3J9,G ? !<E$#sP-+Y5hWUcF qO gpM A G s)D*%Gt]m'QWK>ʩGS *ʻGIr G*(t(Pm\49"H>DZ(lFXҜGn 轄`Yx5z50S[oYtZsx9-RE"fèbԐv̡xCY!Ѭ#O2;[[OvbGh d#O+#1|c23x# C>E q>N EBl2Bʈ丸}c|DztFX:YHZRVu,IBp9=҅s쫵b兼?֊Wg',4B} ULz9"Éd?qVP7HnPfT4-)|q~{[m_St&#SQ- ]{:*56r0e;BlNm[ hkc)m*EOTAvk~\8cZG*q$ i)ڏU^!:[ܜA q^~q^KHyX6L|t"tzA4o R?s$=#v}X1j W ӾyB9)'832B'X@o ND?<"˗Zٽk}[%g֣RڹOB~apE):QN.DIFۀj栂DX!Ί.`>S^$+ U {RU ߗUϛNuelvw}Inmf>y0 =[GY;[uc =g?{py#_g-sV=*_?lEC&_ 7ج3(g`WcELVX3aƜJEȊ^"QA$d!aݙˉ'@…cZˢxFd;RP,C$nSM}qקwBK#4sck cp%w_m|T4W'zY~e 0ZrU bp,lc wFٳG{ XoĢ.Λ{Tcy/BZ/LuMMT.\fvrleLEx2(NLHq!ޟ"LY(qibVUutrH ND>yttq:}>'1@aa꺬 ɑIxldLDQr hcQI* 8;AV($tt9G-L2Pz5$) Sr2t7(J[;,M8āհ %R+A!FCw COf!3<R0JRc7S rWS *Bã?6$G"겊J^K[jʚ /X]H;ry\st\jBZd 1eQ?]nx2WzvM?y#;$vnCYHf^Uxބ֝1*L޿rx5KUd"Gg dYU]WV,囌/-EErj 7Z!`2s> stream x} LwǯWo NpNaa]t"X`΁"G--*SA -jP..2zsud:Y2-SU^dr~};  ^Tk(P1㇋7Ϗ/M\g ?7'ALJAC1@9^KJMZ/Z,zR;VY*_'v|\͒'({GZyfZU#soRPIi)5c MRT, { [l#aX L`|W!/>O+`rׂFͬv3\1\}˛”qycEC-+@6u~d/Bx[/\EP![qr! {uV!v?n$E_,`l8P~CGJjDY(p 7ˮڡ.*js+_6d:#&`.t7+unFXVBUն2@([( ~8q:}vHB(#6PB')+@N#z5s? <ЗR1 ݔ5V\G?=-ApRոEL4O_Gc Vf?o\:aWsA] KC2y\$hiVt]9Gu&夙e p 4h6$υ8?u"N/E z(4LO| ś,b%'o '#"Ku'׃ӱJ~eǫkZ+~oz~FrP ,@QT9]Ud[ 2::v2}aB҆f˚;Qmc<`%FPp6ҦSվ*ٔPmy ƻ:( s|0/y %%W1ex]1[a(hTȽ]^\ Wn"}Y2c}[ _ 7A [?54zOspKy&\8hgaƞzwr"Ɵp 血Bun@jUup,Avy{J# '#|ÔyyйWT6-˧'eV D_uNm>v6n jk0lO 5?q@b6vXvx?bia?1endstream endobj 625 0 obj << /Filter /FlateDecode /Length 5836 >> stream x<]qK'e`w>9$> ۥ<N 6zrz/Z,ho._z]-~sy_O|}S‹3,..*,/B|v\^_OaseS7F{BuX~{{yZB6.Jk]7>&hva5[o+pz\)%M)'P!81^x Z5(lva6YۈJR*b"^&ԡ2,ʃ[)kbLeFt4zQ/Wkj0 Qadt * ~GnwX"+ܴ7? ёykJ4t7>0[+yc]7 !XD//p|r 8P ǵPF{r{bV%qudd2 T:|7s &[Q:TMiik8)޴~$nF~ XX Xxd|jXX;r_k@T] O~9%4&RJeW.VRX:ǛL&U> L4ʟ"MpB.v_d{C][yб,~ ?DS77dCwFTRzB#[IAme4 7϶[͢' %98FFB'+_}2Z^Gs$+2_ez-=pZO>PZ`\O[k5'uhЈ tȲl:ʂQfh=_U0-\՛"=VimpP9ZT RX@ wgZYQYrvC/L-:A_'|ȼ}fy+eslɻM\MA8Kn7wy&M$>u*6ANz, dPK i[(b&n,~C`mtxu@8鸃=ypGk;8bO%wѣ^XiL$8d݃̽]UZ/)IfA;^UObH BSIf\0"?# l 'qxt==q3ʗ pF6Z 55U;tV6AHNJfC(Ԝ Sl;Eevj?e-(xʉv1>qh&wfRܴq:*gΣ#.|&!AMr|AH9 AUOfA@`_lrhgr::!޷$y<( ~B"8$Mg!d%kOR$iUke]n0r!ۏh+WJE (jef;&eFy]m:hOiG>h' :ymѨZ}\%J'b4?S1NphV^@f5fջ:yR7Mu>,d|l׳>ϓ@GOoq *0jv1R<߹BJ8bu[k1L\dY*JRX-;r̬޾;<0"z'7@0RHa[5fI aFp07fV5#yriM٧f#E]7k-MI٦ubr,۞%<~W[`b,4|NtȻg eSiunM+e z1RbJ[ 7+4~7Z8Ldﻔ+f+ m@yI |D:|߃RWԩuybNZG-2z)hm%v"]k <2$|4*Z, 2`*O:ىǜ=q:ZNW2Z e ) $J4`7ˉl)2O"8 #Rri,:Q -la$ c/[TA)GwTk෴hhqڪQ:j u2pw}{cU5#~v@%cO,,y6uMQ={thۛ+<f VA=SuBOvmX ~0iX=`mW%1ݏ-@Ub_J+SUMԵCO204u!$rxtKA]0p\TY>Sdu psGeXDcvl[ *u9|T˙'!7+c VI9۾sF0wHL[d1PLox1މIHi{gnKKp@B( אzhOZɨ/8YNq0~I=Կf9O(hNDȻќ(̉rY̓zh:rf\U&p1vL ‚gvB {u*LbA@ڙ> Ok-mˤ23:=m}h94 ]0".iZOLElb엽(s{IQL3gq}&&La3:{ >r273RA綛 R̂wrX)#(*4U#s1f6.WP싂wd N6ƾ x= #P۟P03 z:^ z7' Gm7h#Ie,=^љ~&7p%FTRztk\ʄV += =LhP03&=;( Ð΢dhV`ux;f2X((&[nX"Qh_۵T.f@PiaD1:F@mWV1<3xЧ f8 NU6J9Ufn7QI8YQL8[_Skܔ[>@@ygʠϻ%h]TӤ:I9#^ì/t 5|NjWE ltܑJA )=<6] ^v8ĠK1{|DQ3t,AP +M)IJp$9ڙBz$ΛA{ǑqV!5Akfdb u"׻k+7˻ĤCW{[Va?urF+^ fߕ2pczĚ*6.S1WFʝҦ/ICE Jsa4~۰k3؁yϤ(2:ks *n(ЌO仿?@vc=m gkԉk`ÔD9p+Y3~8ҁR70?3  JWipwJtSV[mBFqMM$hh3\EH &nqO="| 3G͈p Z!]LDW_K]h\ma ntM V{pԠy@gZHП=[DZ7"ĻIqWmR8BFobec]Y˦k^t`ϣlzӇĨIzk*g]͇9<^%5zܧޝxy73ʚD{[t<] /ώ@R[0_n3x)=x5^ROl\݅ hDO}|\]\u+e1w>A! L OvZPCLrƮ{1XS"9HCrb?- aP\xkEYkm 2ג\ZW߸v=.5[>%OvTO14ń1 L _N/8bl%;{@Wz" O;ݫf-a&^ :dzܹlSpR!QS=Fl Q!-Gem\FVݼo6m,@‡[).Q7@ΆxPBʫ4N䨧и} *6>@ }N lV«-x+\lUkRp? I۷]7TIk0-w] , ĹMla° qBħ =Mb+ VM#d\U뀽1ղI[n^S1x)P"d|{}`AbQV8iO_=~_S+[O?PKX?~ D1]V,uAR CKrb 6z7q SYR2KjYvW[NzוuJuD'ptAKtIn7 qLХ\~-^tDmZW KN[JiMTm~endstream endobj 626 0 obj << /Filter /FlateDecode /Length 5703 >> stream x\o#GrO%OCFdKlÁwg 8U3]=3 a_}|Zq|{BOCp ]we.W׿@c!EڋV;}o/~njUvF{Bs~U+drZT5u6A{9qojh)\h^-m)'"UgwwwЂYo$Paԇ渼/dʆ cVt4iUf]LeJ~IZlWC܋,m0Fbr\.iUt0|'߭W2xlWw;+on0𦹋k Rqi\/" d nyU `C/R%_-ȢƗ] K臢\˷.,eJ%}/|+iQdi}[l1 `0 ́=t%==/7iwX)l:(Aao+c_$&9%V4;XO$ B'2m`YV?3JdLv*1:T#z[jR_.jsNL*:P!!ؤ~->CYd s k[>*=ͅF=(=oU ZTvb dxbfA[M`8MvhDk:)o'@먕@s#B!=7H/F(ΠݶrՑp\ݥ R)O BCf_3{:Ҫ@^׿JvlW8ڻZlNҒN9f^ڱ=疩Hƴ?y0n^rBik:oPN, g_(?$)NؐCzb;[Kf-s)̗a>l3JdrySͅBp㷽Hj:T~;0l-1qA;!')gWXi& 8MxI텬vVl] nWnZ'b˄3)b 驍 C~CJ!fpH~$ƣŋi >G=VuV?mFFқgR/8xY:瀁q"&ikUiiS<l-EmfM`t*3MR)}Ab x2: `GO- F1٧ByZ[e(g{Z;8pzcϡ\1%`mkǸz-IWş,_:,Pޢ#K?ɀkBcɋӒI[ Cƥ9r|J\zrMEgZ^ro>sQ l@du2 ]c㯢-!JDI "W1|ߊq{;jQܧf| .=—=ƛCȧp$0yf&## ?Seo? gc <44[$PrS8:\cP <T +,z"u\.dpA:}xجzmV0|m}8W,7]j $knxRU e7Ez+.N˞ !wD纊NvJ;e4=Au((!YCU_n]Ptމ^v)HpDpl>_'XEkWS"YJ}fc$GsOzY Ti`cfCrl|OC ֯.SME,Z2b%.+)K@+b(}Xbhq Ux2nQv d 4Ofr@/)پ,NT,~*ǼkBsS"1o Bݓ1|r ar:,&' ^?KjEc^,Ogt=M[ :3*s8?LӥmE+%^aVZL*/X nV>{+D`o ] q柞*2g訰SXEuu A:88Wو3JW[W.U^lfCTdZU}bILg`̩ ShWsm^H9E~]TM;B` [p?/ߣ01Zj%E,0$+2>hC GV)㶄@DzR%ѸUE0.ԅ î%nٮ., ņ`!@}3Gb36Pe>#=R3t|ښ43 .*Pb~¹6$,b.2F/Ga;Nv)'qȈ,P$(9{2 #w1Yo|0ZiU.L[ ppwHq36.ǾNNC,qy|`!Q!E:s:: i+;,VqgJ ;NOA" #'hqSL{W!!H'h;s\6uTBx!զif0A. ht!_m>^7 שl`%%-eƧ@"aV:HM~&QNZELT{>Y3m: EC홺t*u8tw8TcT0XOW) .9-8ǏsEZ~wiZV[(qbU\z֫V`}^p310&L?zgyb GW{=v>?6S$1im:OTu0>JT,C1S FKk9:{z( RC5CAI#Pbǘ^h4~@I +w]ؾ'KSu* eĴDY2NoU"L_jAәSxqDՈ-b|hmwϒAWhH1 msV$P 4󥡯H(]t"b |9Y#aos<:KDʪ̶`L&XYkgH_:{FrH3w/z݌B2Oh=<o0u0&^ulW/w[|2n- ]f_H ލ*JK(`C>3{ξiMaPIoNdBWfV2',*tC#EE`?E=@^LŹtَeƢ@ݜ Xo!6e`:F[Ζ6+ӸKl,/ 3Q ]>pufe^vQ|х-N6az+C$t?M 0L8cG:cyT4(\b!z'CJ U^\|+U*[Їh}2]Zf124WRqS ܳ#zq@\} zMG#JbKPs|`s"80ZV%c8 LN2S͔qI\V%e,]~NQ &Hϧ%,`W ^x ^n/?\x]J% ;KOG-L<Y\[Q`r<=2: w/s:2F( @fMYcIflsKGl' 6(~1K\ݯ"[7AIQ|&b.&$. -[0Fv0C#k~YXaNf0 ~#Q |cE*:+L|g]3L 4BnL%'>k3s/`r`ӝEOTXvO"pXvTendstream endobj 627 0 obj << /Filter /FlateDecode /Length 5829 >> stream x\KǑޓs.5Do데dY "f΋ C3U iTWUV|OX' /V'lrsIb5?΅GgONO;|"oTm륞NΚ?mneZZ|s5I)[f#>^9cϋm|qgw^༪e\7-}_m\j>(6'P2c˓'3d&u x|7qi/af$|Eڕhu& |7 { װeam*iK?`e8zhoW\MTwaāSږ9d=Զ:8Шliަ3Y|lb[o!ypxb.OюKg[`T_pضךnE.|p0'&J0qܶZ*x1/O4jA Cgдno,a5c' &jE}1|F iWiaVH%5%P~Z4Ŝ3Z.u3<'J%q@7-2HkCUfvpxwAa2A8- ŔCd~;"`|9H(Ebn+1ǿIm%:JaNRřHrKUtٷ 7CkQ\8dyΧb0  &a&7ڃXYBI`e]8owЕwHύ(]˲kUu;e:n|Y_ϊ\VX7n%҈sZp94Sx(I\guN/>뗵_',UC'*l-}tCxґ;ӁAjP$V\<+ (#i.rҢnvmXk11#PUi܀oS8t7q"F>"z:Wb.avNeTXV;nM9(wQl@(|lsɉQV!0oX_:%f]co >*\8#Xy+n ?eW "d\y0!W;Lv~k57'; lCʢLj[Yr%'Vq5 ~7Τ4WOπj] *>d>>PJk Lu0Ze6ttR&8 p!8tSF@($fHZxdXT71g.xz\UЫAW9&[q?H4A,Xp- ]t%ߟ'.o{--DiH_\!sB( 8im Ks"ƏQrL+:AteGmj1-`\| Cj81Q}%GNcMtfMu tHZոi ^$Fo73FWHj>@#ތD[77wcA^ez#֨_ p0q z5&- ƕCXοx7=e$/ jx|s/.C=̧0g^'q<*>Q :7EZNkϯ+%hS"`.z5RnWBSM o>niwH|7b(b`e0{9ꖡF6EJX44 a$gAIU]|tCA'(XZwaHTƷL܎غ:E5%HK 7͢v:’0d8,%ӑFevk ih,zc C}SPB/N*Ԍʹ*ӐpR;2Feɝ6EJS=ʌcBw9;},ϥAX^2]dt)It`h|Ǵ ۥm|dIR!g%eSVi@'HBfy>YՍDěSPeS~05l -[~NPoP]X2T)*ۼbs5Z I^ш&J6E8VfjPLgD|'{J- vI=Rv8'g(A*^JK\CKVz㰒VXgZVGX~luUg^}SO <@7W%6km 4{i44DZ!\aOMu.ceY]TzٷG!T 8B&o앸;䇡fTBXp,<թ{r4/0E-SG.!qƀ  Of:؅NEXSh63p7[`6Kpl$_޽ڤ/MqA^ /[mAK;$I6oæ9 +7 +塣13I)wS^Ke|BnK.) p5ޘJ3хWh`C\QT߿zi8`K7`DP:&M4_QJ4,rթ5U+*z= 7[@JJ̟xK<\Ah6?ۻDZv׉g u"q-@6qta1q:* X^cu0ϴ79o+CHcK0DۦwtK?u')7"J.K5T<(B">DCrEh;WyXS*>əgߕW=:1z;>"1_.ynS:4 r`_ r\O]g*s;+Sy0W@06@=Y=~`=="8&`LA^Pj~3 bI0f\ xTCp<(? 4]8m>LDŽ0_[p4w]0RA3Y/zR\co6-x߀K4V,.]P'FXe{> RTg.m2rw<>v^~ E)[caLӻL ј % =5֮Z'kITKCHKZb&حjﭤ'V$ek0pK*ʜ6l6 &4 UMB2HgR-N'S-eeD>F/ҶQVryCIG|EBѯ-^~b^<ryCWRT}ez9Y9xu-(RC*y׉UmæPש~2S螪=չFBJCR0a I7[yTW!<HHa;ԭv$h(/!Tu\Ta Vr!Ԟ{D.%:ӕ 7lѧ+3gW=!TzG&DiC á [w,ɿDkendstream endobj 628 0 obj << /Filter /FlateDecode /Length 4155 >> stream x[Ks>ەڲM ⃓8]r,ѥJKj].5K~{,0ܝ~|]V%[Vrv2;-|3<*]b%gB.2jy[,iVUY)aXTQV>s夵E:&ܤ_.029'HWS٠/+Zތջz?~:.PTZ"֋ٿߞ-~ZmZ cA[j^-Ԯ4Q*l7 .t7k_p>}˖Rސru,E[w.C|vl @$؅~(P(~|pʓp|_\'4w8bXUaӞoVY m||DT\_odJG`0i<2Fڱ:PFI2b ʞ^ArXO||h7W\^+2!ү`D-ޚrb.ze!^* c牗!`Ŷ5=Wv_~8 8'ODZLJ%N q/ѥ˾]{} 9X:p@:>_qW>rJ V+G;k4e捏U1smJdH0{FK{ b2W9 _1o+RnLa5'= )Cًi=$ Ե )NK}KԇY=xk.0rc_Wm,3x-/7C e[tYHQJ±S1YRR!y ^p 7BİC x<һT(tGQ<@Vƥ<}i]*]:oL ab2; H*7JNYLgi%T-& `S(դ2DE*Sd/[ڡz5]PZlrE{˧V_ꕜ wf7HA `AihB64VҜ؆! qTXz}˹XHɒrQ(ؚ;/] ynQ*Squ1RR"8-S> \}Y=ۧa)Gcb+iXgZ!n"](chn{ D|jR[ Ʃ0|Vnav%lse2 D-ZFW} aˎhɢ;D<~ȂҬYC_. #h^4Uo΍=eөK þt4$WӸϨcP 0`4TԨ7w׺CJ|`Q) 릕"؋_V:u9KcjT郈qh wdUHPKŸVJ Fu iF h@YD+]Oai}$X. m3G:_)(Ogƚ ޣX$Dbfx"ɑm uWExS= G2-$#)C98vJj4#Ѱ .}s1u<ӣfܩ/ؼ <#\U RNR;A% # aC`D#z0{&^Oߢp6`LR3Mo/x/~|݅hEGtium??Xbd3a(;IlLKJ.M@*%0c   S/rL%{hX FzF1e}bT-*mU!Fӣя2XJkNcP&neEE;5v`͕kPIj_ti\e* +i @a؅'m|.9ȟ'c0$g QEG)>!Ӧ0?)/+8b+C%Vɥ?ſ]&f1& ;rVL UWc1H4ށdLPr%]3GN斋-t>ţEĠf=y%fCG9pK(Tr"A%`҂>6 @-miˊC:ѷ;q|pַ[.hC! 3}\`P.f*,y8#AM]ۇxT #Hi}]]W,w@G;:1,7`Ҏ7ӗ`tӊؘ{l(^rѕA?JK]MI! >0j8&9 :}vt>&8b*Ú^*Y;÷4.nB gr3bDW92gP|2un|>tѫd!禘>P _Džd]E*_q81$2., ˏ͕&N?L_fG;E h< !tH"YVQBrط8&M(q{\KݘʓQ&8Rɽ2 י2s8mh2vԗ)G@ 0@"}^cU~dee4v\fI2,xf+SjܔImTM5?B2?Sn_g:׾R#-Ez*2xH+㩇.ķge!BDDQ4bwVL0VZ-Ÿvge̗D)!R q- %CrGbSmM5l|J&\X{pК3t6t @ LE[|%/]~`b#Ӧ6d7ʫ}d_ays& =pج\Q CBHQ<cn]+ɃTU\{Ro.n'G|xw&]>bT]Bjʷ9UHڨHlnmo q^uH WX`n [6%jfd7Hr:DSI2"?G,i&7Z0fxmhA 7*Rm[AATA|uF$̎RTFγ59<h]zs !hmO[UÊM'%Ikcendstream endobj 629 0 obj << /Filter /FlateDecode /Length 4898 >> stream x\Y8OX,?Vd$@{<؋vfl+FvKyoOUl}{ZlbW-X ^ٻ3Nog|-i=|q,|/zq;k[s֎:Est8^Ziq;d_-WJ1>^9+7KX^%JJzv$u7Rl>{=?nyC ޅ6zS^HQy'MF$K(oz5p/~~3haՋ3`_U+B)[™;^R)oaG},ie/1JFop `\bїVt//[^eOO)68Z0EkL Rޭah4@Y{^m׽8&Hk-@a^#֤"Ш*;ģ y'n^v$50e_uUY^.`nq4 :$"u?0FX\{ FXjgo?f- Q 1>/>,q9w|rekxԣ)>m~vlq:iˏ)d2}n{`;abr0mH ofEBW|}X B2Q_Rj{NLM)np~M)$ػj~ ax߳[w p>9詃Ӛd 4Bt}4)[ NZ *i_7'9^1j.c,Ϝ^5\ *8Zyd$sΫ|5r;LA_<%g/ U8@LTgVSt|J2l@]_>>8`7eB2< "Ky,`j~MzJa)V5.#wx13K'E]g)RfPt(3 90)v@38/^qB(]v Ȕ/31^71Lmb\P[aRʌ%F=(}iS0YEip -[A"䚷)Wnd*.&sD`6} &Ŀ|, ڭ/g#ת1.x$ ))0]0;S@ulߣܺ>aVNwq"#IhȏБ@`0,hPGe|# Ay<f8@2obr@FM+"Du{ӊuo&&$!6z#vu`76\nQ0SbrN2:jpJq3smy9 4XRerNK~aR͐9xi ְKo+"0_f 9-[iZRqs!6Hk% }E-ij4&rw2ROkM+i4-r*+}=INУkbD${ R3zy=#U3Z2gjzF> uA%Qy2ΨU R6UX-)3'_*1N< 9]q,^ ZHBU\Z>xPNOJ2sru}?Uq|FɯVG,5~ZKҐ@pMUv9`rmrlGyH9ea},C7ѬL\s\m1cJBYq[ũVj}&%blFmѰq3^źTʩo>7PUĢ[`moO5L'z"'8'nOk׷%:@|C`8ڛ =:Mq&O^9A*eHΌ*i)di W<5 q9C5ʃߚ]҄m :; #-dgӄK nE,8wD+FU;te9OYie 2 TpTq*4RZpQdWKJ aGEg%1 [45}i^0mMzoSe"YPjKs\fXDD/z5ڈI]b5ie曶ܶLgwR?pbtHaڥJ.*4S޵+Iz0_BE|:]u2WtIia-XtISrI[w/2#Ӱ66.sRk[ ?!ݞeendstream endobj 630 0 obj << /Filter /FlateDecode /Length 4427 >> stream xɒՕ*TJe_T7}CRqb8i=>hz%5#i<|}{$$ՋW"Aƛ)P">Mno/"7 T!Vem{%vMEEO|EIXE |F>ǂhVMssLx2l|`BMzO7TW(ưS'a*L;uL{~Hc]YA'݀og[:YhNȖ@Ïo݋$H# i#?)f_]?0FXb$ Hp9 K`yJ$A `ܢ'ӋwPv" $F<4RđDlC풏s`I#reUNzw,LJRdf^"敯ʶV(qoAjgzqX.at*ID.Y`P"s+:R0F3T\rPKs'X܀ׅEí(DE@L/iSٚ^8q+`%rS=X]aCxf8iE3P@o>r8ؓVq] o:D$QHS4fSDy2  !06ξ$iE؟(;sP?nFژ4%y$z -:aGx:< ,+iu^)0xZIrXfmI8ΘQHRHEA=W񻊦!Y*fx+GKt XL+H=a 1T #Y3tXh`].7#[ ,w6-a!0GԷ(do1ݘg ) h*i iKXe**4dӞ30U[AQt$(3 QrP#Q> WlDw^o7RwG!vw]tJ X`Es9A˕uڽZ_ Krw{]}奃ua@5Aw>i_ƒ-A`ܩ8I;=ʝjiҁUUDܷrQr$Dˌl4f8oR*X"]s_gYV _)PmLkH d323ДхrJ(РkV-YF}=q%w=5]qv w:!T:W;ڍ2N 4Ov(]^"cOV( yKl_)iw鱼*xT1㥄eM vcRa3q8SB%Ve^ Uzm)+#.7KM%e-+Σ9UӵJP`)'Kͫp3QN3/٥x4-9BBE x0UUがXlR)y{tH@b̾34MxD0ZBHY." \c"*\NJ[ K^͵PTbvc(h$`e]nє]vh.!cTGE9ٜ0}H8 ˟R,rcEg|Ƞi6b``?TkC i /%b't/fj3S1Lm` =hۅQ^z.6&:zn{ $gIhBf6ʛN}Q4}$7ߋ a>4j}4 VRO3,]Tr0o|p]#-Ej/Ѡ3ʂRdA} ]0Vhghq% .܇ެW455ؙY⦧]mH iA@MB7A ثt LNVi^'$-׈GG4& /\aw1#Q答l};K Ѽ.Fm2U0Sp ӬVux*TQhwQrِ\*Ќeݣ? &bFͫ8\hAYl3N5} !Ph!MUM +݄!V{It)Tm ʔ,QEo\ٖ "JK/Wr NIn?i7DCIlK/|Hj>K*d7/qH,Y0?/V!,UkߓX,P5mM1yH$%="~ PzuEmD5`>2+|xz⣞!h&DDñF "pD&JC4uB0Y 9(4V9+ip E+1ʕeҧ0|+McoWꁎ۬a`sMy @/}OԳ}/vjCי4/eg2PUh\0k`J lI9EUU"p6]]dut{<\vdTlѺԧ-&o*w׽}BkY8:~}LW ӔMK x!Y[ 5&ADfD(rx5~?,'χh9+%|8X&p 2yJ;HBBH*`efTِVHC,Pd6mp1O_ oγ" bmgKYQ Rý>䀈eC"6aDnaA/Ц:Z w6 iRoݲw^x;&-hyQ}Hzosck-٣Fw-4_T)cn0+>½3Be'eJn@nqV ىl |W-Dc_dDU_ZvTVO//lT|K9' e_dFP7Sˣz)pNR8<_*}.汥>|s`Z3C- (qˁe O4ə]+2ner{Fj@*ʐ{-v?-Wendstream endobj 631 0 obj << /Filter /FlateDecode /Length 3254 >> stream x[[s~K^8Jg/!idf<%1!E|9 p%;j X~VlN_j~yϿ_q*G.g6UBȹQrBW9YЊ*audX !*j ֒tL{^\ˬyʊ2E~}xw'/}}Տ 3Jk B.fDWJ%w dP0|Fnn)m#3w!/dVnRԄYW-i94 >/paQeL)u'KC>.n "M2]zXr4uz۪rpؠ8?$U>Q[.t >h[= I3A`0Qmf)B/0K\/&WA0\.1.Ks!^+1`MJ:WKn$`'l {xEioszk KFŰV\*CFh0#A(k4wQ$Fe)q W$ SqJV ij<.+ґcn{ "&cqxXU>Ŝ^h8ֵvi9IƗ' : I^ !ump ԠQh2 صE9C*~n擜}9sOiJVlA;W4dQصGߧF?Tt"nK8 I?:h"X*/m{h[IK FARXC,y3RA_Mhґ䙣Xf1HV/z413k^,Oʋ$_A-{թ:1jCU}ЖV  VG 0)fÆEP(0Bx+̋*5qV^z,!˹ Ic֡B$$"V]XP)Yۗó2r*nD."z\)G+i7]n6,lYN[$~E* Y.Y ;dry-'"+SN*=&T25cYƉvp+:9g+-tyNpKz}`? E ,JfXH ҳԳBl76W %>t`6\ 50X.޶S j6JdECs}7KYisM {zJeK!%XCPB2T{`bܾw$~ST S\(MAtfK![07Puf,=(5^U]QH<+d3)4$+EEC?zqBqH$+j\σApe)|6IfqվvRrnŒQEΨ!]-!'<Δ?# KT5\RKDqT<]Lﯜ+<~)S7q~WnLgMJL}K@TIe,U37*\3-E,Z4*+U4~**Y4! cp&'( ғTEsB6PpcAelge?l ~zhB .~GYM:+Ho$*xz)) ݮڼ } G4*LK/?~ xv<>g}+p(y՛PU+9 )^Mto 3{tusַM 7.#ľ׽9x駅6\,vu êp5aO!G$BZIQnOSdm$gi>>mY\ژǔ8 Z.=mFտi&?{o[#.Y49ɓV @{돭5|8WqyV呼H?|$KHo^ҁG4S}Iϼ]3vyqif+r@Vnm;@)r(8Y j3)i#w bXNfd%:i2IfFibDkk\4bD:SR퐾=L'6gbLL&0tm9=Pĕpqd!#R8W9 Mv/w=$1;cyK-|E))ӑ^zqH7,]2jBI`q^eȸZ#OlO(6%Dawv;b\NM $T#BrNki7CN7d묅w8ahSXPK1}8 ՌvÂ#̎n7PmލJZ/$OhAq,ҵd"Ms-G~.\ h(fJ $CE X[2٩(nhz:^ivAײ?\ю_Xsˈ6s3m j͢}EaQԓ[_ىAk~~ַ>v+| Oy}2K@YG>vU?ĕ,-.cR~Ge\z%g eD-,ʷFuF78jT4>҆^$~AR%eWxd-dZu&#ků)XZ;̍ɤP ;q-m'0h3,YH,+=a)r\ { [7qjEZ Q䕔SI?T׾lE2:Q>ϰJ?+2rt|^s_~bIJX [SRg"lR\/$ R~1%6ԙ3x ~;+ԙOU.ןe~D1u֟6Ky _endstream endobj 632 0 obj << /Filter /FlateDecode /Subtype /Type1C /Length 371 >> stream xcd`ab`dd N+64uIf!CO/nnC/ }S1<%9(3=DXWHZ*$U*8)x%&ggg*$(x)34R3sBR#B]܃C5P0000103012_i eO_^Pw*ˋ T\)S^m. =wnw6/ i^O mӺvKc?{oi~}/.cA<_qsg.a][9\Ğ{z{&>&20endstream endobj 633 0 obj << /Filter /FlateDecode /Subtype /Type1C /Length 1689 >> stream x{L[Əm0'IڦN;UBHBh-m䢤`1 67l B1W.i@S5YFmW[MߩΤdIl.?}::}yYX cXTH_H:R-)}AE=Φ~8uۗb^qGa ?qX4eE]DZ-|6%幤$|AXP'LMʕ\&!x]*uz}}Tji5.(_M杹87QMՇF_eb7J?AH~76ڂE "5i-;$ɕK~:35r|,s%ɍ߱nas|_34B v@?&>&;ZBVt"sۊxmia۵"%*hj:lLw|- sZVFFP:?A4kc1CgH2Qܐ8D"C Nb shӗ h4*m*h5Má`5xE`~m̡Q FÚ@p+ϭ(逳x_ύ/G`nh z idOiGĢ~^xj?ͪXl ]0|5|,_q.8췄Qxs(6DL>v]M }>=4~SЫ6T4ԛ7s뛡Ncz&j§.s %x{w|Ysrgj5GK5 ݫzo\>QRf3Ɗ 0]z;oIw-xt \~It e=^KeUXK7 uC0; ag:{}>kh:;uJoo4^] ⊓{my\w;Ae&a)8w>K>;L"Yk(Pt5-Jf TNƄ* UTeՕs~қ?Y:AS&C"F;B_9wqU^cXziPY[E*N"ߋV{B\C!fc>޲XUoz1G"H˶VY sn!.ڀvDw-G"OH׀g1  ϷӸDH>2o kC|VhhLWs &;a}M/bE I:ʑEo칀Bq4#A[V[7Bmyä콳s_2jsIirաA?fa*Tɔ%`C(<12El Ri^Tm r֯m LjDu0lvxgl6e{.^<ƫendstream endobj 634 0 obj << /Filter /FlateDecode /Subtype /Type1C /Length 3795 >> stream xW TWT5:Qc+,4KM\v}eGe .!fFROEm1-qywλݍA>V0Dx<ϜeRٺ%|^{Q uu PA>5pG =$\A>&P,mTuPt[v|mPF$  wd\B`ZJEoC%Pm (=<,ʗF6)72 M ڒ2Q4(#!ڴ ˸XU%_ct@x 'Է~|+)bZBW7CΖ4&$ś,dX9ksSh#-eSKʼvvt"QG@ $yjBr[u`vE'1#S? k*E2@a(2 7__XdR7 Dޑ lȤOw5O/C}m,bTYm ^*ާ<4Bί-RQz6ZWY8Mi~ss"љ0UeĊ@m}:F1wٮ_+ AzxT;u\ c U'4w٘4аV3r%7mBrA족NT X siJ4LUJ=9 k^?AN'(]IԀU(> 'MdXs10=k*pJ\y/Q4| ;>lF[+P.atdPB-Cgmu " b%%l;Nvn}uZgU`,pbM!3"p^.,MҁSΥ_pV#:tn#1⢟ڜ6wb2E1.&U⺃-Ba2|!$T=% b>GkkD6lz3/z ),o`?.~ľ@ 5h7D};la?ȑיtvhMl KMj|gxp;_s(>D rUjfǕF€W,+}WPQ+uBh)>Rz+)ARv,8 헀s M USef$⃯R 'yz>sR+Dm8vv_ʡ֎xF7f< zEyzw}p *0NIS Oۤu')_nkY7YhxӍ("Gpx>He4Qغx{@`e%|T{f= Zy,C[]'ƺgלgɢy{v&8sԇN@dʄ|F(rNXW8n{/¼A\0\/NE~9'΂sTŋ7lixRQ0&>$vrst[0hNSv+6[eYT\ɆfL QON>R?$ ^ZV$G n Lbu%~#EP茴$&Os,.AYڄ:0g(J~9w7Q-sE:^4Y_ZjfRpOWc!$u2PRMA*|lӴPeu-w;ǟGE> F/8+9 ȑEgA;58R$/NaJ(<(y|d5akw v_lӂ"0:Tf1+Vt-=yՅ1WxUχ+"p#nx;ðJU$&kSh`.ptR;vNJIMJPʓ?_mM 1hχ?ՋHz}C% Yt"p&-:((UYtU/_A3C5F鐀 վvPdQ ; B>|p]$ 7q7-EpCiv&N[ғȬ,eGy!fVNfEVU{]VvnNVyVStFendstream endobj 635 0 obj << /Filter /FlateDecode /Subtype /Type1C /Length 692 >> stream x]_HSqw۽[z'3ӬD|J6Gth4уKڽNE,+|_D$衇`00"#ƹ߆UO8s{!FH7[ݽG{_'HG)K%U (@ZN.Na$Am2R%* O[\XXRPrVr,ot6WD{Ͷ::]NdͬZm5 Fk>NR\umтqNġ"Tt-H]4VNUi}oKj,B36AdlY *ᢑ3*fqHQ ֨\5H؀QxnH- yZ0L8lY0-iPQ^ܖX;X 2*kR!KS@?&2ԕ9s){A!s4}X^TL{ 33R@;Q>(EDJ?=V_H/#7b?}^gbw*F cϛj)$ l?!X2 L{a :cp6,C6Z_]E1O(~L(Ma3M *|!{skk̟XcX?R`~r@M8y0y*cbߌ8 3/.iZCW869IF'QǽtBDendstream endobj 636 0 obj << /Filter /FlateDecode /Length 5564 >> stream x]K$q.: t7Uۥ|?d۠([kM2gS3;dw̬ꮞ%-}o _]۫o8=]^-7_x Oz<_\ m^\]u\,\㽲߹~uu>~d= J=%{.MvRJ3zY{\[x,92ݭt{\I)zt^3$ӎ;߄;:~>>oSXMxfO)/⬼&$K(o~u_(n%׋Խ3&lUFv0>w⼵^K}ng[:2xL7b{o!钾V,d/VU,YH֊CC,'kmQ,+?(Nm; uW8 m{kvy'O 0]s 8/%-ONxME6EÈc[W GI?t/ *y,{kÆC73#?4`\/ZV]ZA W\9E` Ϛ ?^n\uw^Ó۫v^Cp](acSIk u)8.yғ-94-pGMI ŬikTg|Lyș3^7逕)m,hloAPHaRgv:to+.$.{$tA@_~ I=୔{y7 ۦ ;T|@xb:3`arqگIq`He6CbAmHXi+r} U/;0۔_v~BoyObk2:̉[X3|S29A~0zb?9'jl:]CO?|`2,{A}:WQx:se(͜&y2f_MD)2sT 3S2cas !Ald+0Ó Q Bp< n:/z㶀Hy pFViG0[3{E wC\i6+|Y`*`{mSc9}N@L3'x ~=D#P8Dc#Mnx)x~Wq>l#i&`a,񒏏:FPFpq>_2cnY*D \f:v[Z)fP/HuorZ^NURthv]]Mo9ÿoTˁD8瀂r &(śuxs{1mP{s%iǶD@ Xmt'Zgu Jm,k-S3E74iF"a4`&hD:,`QfJ΁Y 9Nsr npF@Ө [ ybsPE9-x#yȗ)=T.ў$)Qm}Mtʎ08..*@i`}‬FMvl())Vp|vh1 8@/Dm0)'<`4vcLoHie3nC9ّ>>hҰ1W9zSo"ft~ܚӨufbϛT}xh %6Tϥ*$4&T (\ R1l H4an*MEo7\)ȅdE`.Eh8g_Q7bM{ WY4 z(wZwՃQo?Q `_A`((%D:ѴC!NKkG%#!zό;ic$Y(y8CwUpcQEZ&ɒjAWepWV#vxG*&0\L 5o1$=FpB+U)Qhu|2A)4!ӾB MC;(?p * >S1@rsOzm>~ ԰sW@;x_3F߯ۅD"@jcH/!?AS)D@…{MyJȯmv~FzarG Q%'1r}T+%lgc~Tnei`1rp dmvT@wn~9j_BGE4$cP^v>%eg`I$+`@fKkEU\/^U8D'.{ inuVR*V+~I;J:GS 9T2l2L >q&Mae7j2)1](0.T+GK,hJ MbMjf1(q,Ju0DRult*ئtJϞGr'\1ϳ4`IK[L,9NMiY7U!^q#x$mXO 6\@NI^ $k ))s:fS q9b>^N=}ktIѯ02}_]`%+[SN$y$=;}pQ4 }:>#2o^ ӷ 雉$,NlO^%Rh) h%=iɛhӟl; eVwp^d87]u Q:Ls١R]gtQ/@uEt4#Gk+tr /6@^p2R6"~~3$}JRwS0X8Ӱ}N*i0qcŊIfT1iz%4i)Y>N+/ BQ Cmm$pA Esϯ;!M\Hr$:c[$Ԭc *2x9 S~y&FhUi·eAw+Z'Nf,4tې%Yd>U0=!R" M:Inϒ LY?.\IOa\T ؟g|U_ פu}Ɋc$?E')ʓLeUG!Fp3E Ja&NƷe[ux:X Cwp Y2R͊ ujF1*JT$Ӆ–[A0f4Q"wH#S ]ާ=ߎܓ6m@S] ݖZч8G9M1-o =jwN,o]3jlmڠ:?^/3endstream endobj 637 0 obj << /Filter /FlateDecode /Length 4462 >> stream x[K\rH>C8W|.'vUbk9%rERߞ0`]-A3׍ISI˳fr{Ir9sԮqlr~s槰eL턚/*te4_Xm6GӦnܹj;iHIQ3ޘ8LJY7Iktƪ|ill WNgBYUi°U (ˬi'hՍves)n-6yضwɟٲt&l7~_jq+gE5ODyT^\Z;U}"?0NMfBVp"1s_p\t>M:,$Az?߾ 8:,t.TWv ຌUlmfZo^j ۳L¾Uj:C)jV%Ϩ{k oWQ qY-<[i@AHoCN0Q+P7g+5hw` T_ln$"W1`im |THLY W)(E[OB˾#Ew +!,@v|0|w +QٙTF)CˎL@U/'|aY ZSHk3gߞ&dž *5T0A}z6BuT|#=ytP'@L,FͳÎqU5Z K~6rFm~*@ѿ0;΋/ F*C"DQzK_TZ @ 2.C yh#c%<{ore-dR:t_bLl`>=$An",]X8%:i<\T(2$=/'b̸ Pa^¤!ђ6ǔ W]i4Y'ׁګNӲJ-ˣ p0Ո08ҕy|`O`;PCW6yS53RUn/IxUF"(@|پ@lH3ߓ7tsg:9™ Զ|f2"!mPGC)\i< -3]|EZ!n>z6Z|d!'Sez8#ft㲄 2:eX5tg#Ȁ>d WϑV {V 6i@ v뫰!9WsX2߃;QF nR}3D>Sȕ^9LWd_9bsu:Q3IS!M0wQ3#D+a$AW/rX<ט4ʛU7/S[RhRFN) & LY<ss-zTF;@exxlGx< sウȴe^t*GF;C&zTb\Fѐ2;v`|GQ} i{1F렽1Z4Dk̆1$hfa]/sQ6UZ8jn#^VM>`:<7\ 3TW5 8x v㋂`B@dt۰mX@nY;TqO"~PyQ҇ZzVz芑XWi kW;QiI1QP>>Hd$9"2hÏVȷBdr;<: V% 0ٞ<)5U#k#.#4-ÈmlnRa;j0uZ@ln2^C[J0({Yj|hǸ@I ~a~48Jbh`I kȑb,y3^ƂЏ\i!VD|[CWzOP_z5%Ҟm͂3"ArX,V ,*y uD9pp3NEIiGOxunZ>݌ЬBN$7)_/^mJﱄdʠmOt7zecj _O%]KAᑓMϮG~\[EOJ$_So=_zI! UHPbɽo9godCFr3AI[$w9 /yuCŷ!j!h"jY.Ww`EDI6ҡcKJ@CMC#t a!FQx9#8YzH]5ʏ,Djd(W\2"5},< .>.1nb. aMCWyJ"zf9]Q,,ܴ?wE|819f'v}}w5fN:@]H o"JpW(ۢ63fU<_Jpȇ;-QeI(`%̣ B쓚 ؤ?@b5>kkbr>f&tYi2*9S-cEK: ~ƪ.5߶ts@@_**pb%^J=0#c;P/J"\?$f)Âw D(Uu@a ˇBF@Qr0 ~Jœ.G8 ::&(X`W2:Qz(L,(OW'B3 {ކh^v"="DZc”ǽaӷTw=_]$qM?h{{|jFd1_)`78Uد\rfPG.p7#}I;;$sDxU>Trv;lvׁ!d`M{r+"2ۇwN>]qyHT'= p1%k}8'ۯ6AʔNZhݶ=ё1ܝȘȴm{DlA&0Lg./wC-\0Vozl} {I1ȣIJTՄYYDbNߓJ)K,塚L@|d^a?=@N)ũ@R e'/}J< ZzJYAlxNφMB%f\61k+"sb+RЌ1vfТ:HP98&ݛ'Hк*#s%OX}A4yyF~R~7Nb!Iepbs"C 9p4֐t%5̟'Mp8.S.ݝyғ˹5@[(~]}Io%endstream endobj 638 0 obj << /Filter /FlateDecode /Length 4690 >> stream x<]sFryV$|&"qs.U՛6(Ԯ%==pzJJڪ {{{ӢŢYܝt&",8 V g"J3,.6gv˦nr rW}x}ɯ][9ΫFOl?YPNk7{'XapU#kk-,ny񷳕bRn_Vw42B v`ᷨ>]7귛 4tUk Hqu!BZ5F Y{-j׏]{Ej6n|1^)GXJ~{lB\:-jϡG\6@hqa\I/mշQ80zda˕x%+aAZ2H3YIV+$9AfeZ:D Z[ vGAO#`Jo9-+Qadwi Gk5 ]&%fz k?Fj[1+-H^0h\xdT>Y%#dU4k{&sُttm}0dOww3ⱅ$ ެiNMm=2 k 4 Zˏ=`*H`P%e_j pv/vP'qD" okl9/q~R.IŸ+^/^]$%$.r}Y$W'4.,/J&3J3^V#DMJmDrn͒R^Nb7BUHpVo-2kXBop͊Dq%F+}!5I'X/ypMXh'! m_WZtᓋ'Xz4)/VHKl_֣j&XAF! SVI+a; K`Vl`W$lx^V`!1 apf[.ذ| ,!4 Vp |@`ڀMς$Dro~xՉVf csPǴkAh@xFO$2X2-cr߉@j r]ūhzJK v6uW/_4~8 _HYrYB.A]F{`ߍ.Sp`Y*'׫|/VsP_­NV3hĭ'i}v\EѾ@sxG1vI4DT0JIui78fHh4n)Fia檻Rb:Lu j{w@Ob1a4:a"nA,oGtۊk|G#Wˑ}s2:6=w~ЮofSUjNimk5ĕvHo 0U^VÃ$1f]̙xvr&~b63e+]VV? 0̳ꈸ)auUݏc @ %iUZ ,5 zi4)()z\XS_0M }"DQqcs1R0KpF 张6On&V=7o\~{\SS6+ZR *-- +@XcEɣ%h"dQP)O w;ΚU--5Wy6ܢXҾnN#ܸKnV(ZH$KK: m$ &UQ;TUT?5Xd Ҥˡ>3`\(e66TBvtz^;(Cs{ps< ɧ7Q^ rIz$VdhTU;_ § }UR/ E%+p+rF^22Up ( z:Z5h)@B1ጣz;3 p 7+:kӾ\-5:iɆXI) ?Js3= 0zqb9n2qŽ ˨n0H/ @|.;:QבU)6q9ʓƶ%e8@[1#$n*DU=d$w0R2t BuK<C ]K=[Kfh_ ͻyX;/g2cQD.m6Ŏ*0}qV?V$Ϭ#L.0=ދL!l9OH=d/~ Þ.?>!qVtE܍ė]d,D:s:f~F^*2w*Qn& bBe'ƈS!5k^S6:9ޭMn4vܧEc}"-xH{w%q*(Ö\d!}CC.PŬ1Ұ1uJ /cW(vo39 8GhZH1vmׂH!h %ʑ=H֌G,Uw̆v OQbsqϷa_E{OpyZw 6b2uxkʫIExRK5\oy 1鈣m9]bEY toF OX&Øꨀu3[=pљv}*Z+U(#K`PѧAhX)=Cn( `e}>&2"4xh&'u!L6IBfft=5|,4 ͑FY~gGIq ܺSAPɠfx obgu>e}}h&x!xw3OUwpp6OB`w)aa*/4z _Dח}c`R 1Yu1^&1Yy6o[A%񕀘%a` y=sh'0Y/JBԸIa{|6"L,LU13@b &9?-a;[L6M`;S]1bNbD2@oe0If9{)⹬{ڤZ |(% ɄC)G lQt]V<;:ռ{4LƒF,(BIVe 8SGh>Au<;4AfE8wFc2m߄<뇹%H tɔk0{*u 2ǚtpS#_).5,)jq~xPzsBXH6/X>s8HLrj]'xQ*zp\dӉI>SOa4K?md4m~y_〓}PGfv% `EȫZBt ?Bq,?B,;B0KVBߦl)2o!h!z?Č+%PA7٧Ԭb6[=וfaaۘXzl/E#tݽ' Z}jY:~oO]ttq, 㮤9* :XUke6O撓$%Y];%QnȪ`TU̜Ҹl^֗7탷Se%~XؐpShTv0-4d>2ڷzrt>p#4nHobI1 'BxQ[s`|8= M. YtPDƨ';Cr<$_Af GTՊҚUao'ℌ1~X"Q + !sg75F[|ItrR'y+'cRKhw}l܀5m{ '5@D Cl{Ȣv31g'm7tb^hRmSR=Ɉ\GAŽ&pGvSC,g'LVó؍цwlGkשdvݜ]>A V[mK*+6/ox3wB~>3M¦/z>NWAP*G!o] ﹉#fh+ wyoT`ĐQ>lwSH̴oG=W4~֯xFPQK=dxg E_Qt5y?+qrlFXO> stream x\Kw{ծӣ3PmDo`Nc<;O$Ec{P 失bd wAfUf_Ϊٻ3׫_.οwrlv,Ta3fF 5\/ge4\ޜ]Onl^;Wt_%=/eUⅯ97Ū|HΌ+n !x*^j° ,U)ˬj[,'|7ᷓ,Ӭy|kgƮ8H. ߚt\"YQ4/ENjKWjx\< Jhkl{{f,fZ[>RؙXi$˳7P-BqJ?2̔0^en&R:f?! V |.s: a+-h}S2zjgz,V7 &J/aoU!I%~>Pj%h 3Zd@w)f}X}'H~ܷhdAI$%xY_oV^3̿ZxWwjvЈh!:Ҷ3j!9Җ3k!zSoO"ghAg0:e .+6ze ]%=UEͤLؒ@qRSMΤOFv:/W6h7k73fv2i7[۱v`5ݞh TP2n{3#Lu3䘧T!!ZwU|9_(ʊ璧c IL𨼑K D)vQ̴W "%ՎF7/m>JR\5nƣPYiw92F[Öm Z9ԑh+81=9i{Dʞ!z3?f˕O \pU=@h?qZ!*rS.wZAH 5IZAGiEWMWeH+/F+Wn=2ȃ.ߒ$2/<0؄x?綬*.w%,ij]i!ah|{ 56ӊ뀤+!p{<Ǒ@h24{?\R'/,ob4kfnwg2vn{TQohzrzܳپK\@Yݤ4w5^]?'lԭL~Jm+SC-8pj^%R W:bo02JSe`yiY}xcNpLn * a&AM-M^і:>.ސǛE->h+zw_u_oOL[`QVc_r?kG8@#y85g8R{Y N&dafkAIgo*gT1|ꏛ:?ʞRX,wf6qg]_SKB(R(kf)Bp0 * 6]OS P{]PsoBs Oh.}<ǃV>_6v8E$~0`E?3|/L:tu9׊%p!aWn|!mb~ms,PMH/V9n0!X7j{=h$qg8̑̑[]tPHKta@t:z!rF7'EHvWJFs@usW' __^ݬbjx}:Ҫe mN"JjBdw= ؇ Nj,!A%9.KNɒi.2s/"Oo?~bhARljKYNTOj‘PR]w]nK`\z(7?~r;Kޡ* $Q]c~4UaR 9^EJhR.@sdJ2WU bP_A9xhҬj{|5p.YE 0: !;'"x ՞&~ (=@.CR]Sl3W/N-V [$_ZtwS?obeF$?,{H:6X"oHL\1&q*ZnCRZڃC\iCm3F8ۡ,=n Ĺ}6~^5ʞ~ͫt,xWc[Xœ/ 5zk+}j7^*: ftfHo j Y(މ(O'Xw`t-O~y)S\qM"Ǿ]0.&J>hsl"6^6E{'l }'j$ K:SYd8N2rG`7$;Rܗ;Rg~i"厉t.w]s'ݱ'Avf@e;"u;;nTSo͛e0UpnC2oT/~n@$(l¥zpb~b=4JiL`5lIoMg&PY#9rYT'9~Q(} 仳jlendstream endobj 640 0 obj << /Filter /FlateDecode /Length 5040 >> stream x\KsH7LL0 nXXԻjvw3:`)kPPl̬X%>뙕/,UUIz rϳx ]wa+VF :۝d3֖Xs9yu]a]䅒;9q?)r 3TJ~Ikn}ʲZ36ە}u>a$geקBYn°elU(ˬn4|s埝dIj[ F뾼>&6q.,d6ѤBeaUΊ&byqrWƟEzpȜ;:*Z{ɾlY׷eAPNl6!&,ԙ,iw*;nm`|M?N`mߟ [ [I]nJ;KV kcQY,>h48!]Pv\n/(_*.p@?T]TvlѧFeۻ-fh5[uoH`#ٿ3l@A gԻ*Y@ Y 7MyNv,ޝʻˋzY8 Ӱ:"귷-/.>̨-h(PNpʁ<~FI(/\Fh#Rzq.cs-ͫdiwus{{}7/⹅( ܮi<~n̻q) j_c%NXb4:껷8;LH欟ɀ﵂fڔ}y}1sDlȂg/|:L Φ "{$E濮~l#)vcyUvn 9|$eٛ4w0Rr(l4MHNa{<_LsjV(yH^OGږ4>vD^= @#J˟\s{}kγ#df{uFLnw?Y"&K@|}$:hM# Ⱥx,MGږyŇy1҇y/)zjET џ m|`eMZUd6Am”%^ ^XHpaGDv UvV*$;x%<踛 ;jYRq ^xIva9lL쫮G6e`AI?nh# PL1Tuj57HH袠SCʺZ9SzUuiƅBO7)c2ɔfn"&fp0h<7 2aS("ˋY$0mGZÁ=8[hoC& (.8MxF7{נ=Gs$L/9)Zrq_HoTjXiۧ޿N\HA:NJB;u@HI HSQv%Յw‚` 7~$'y5a\;ʹ6`Su}uhUe,&'e]R|z.u8n E͙,0\RȼH!|Ynz B~ V|-{LXXkI|nϘtB3б"=@9,;^!eUwaTib6`e$ޏbк%P6u퍀bfqF@|ğfEHPS `/זSEۥT4t5_Xzn ~b#Fm ]c䯃eIWLIׇNĿ;u&JT9g2Q28*9 V$&i8J 2'!ޫ)jݯF.Djh1_3 "TL|7#m[qx٦L?^͹Yi\,K{wq32+Zb kEČNN1 Mۡ=]VA\CEЄ{ ß=`b-K?c1TdHJ~LK3 %&<?:5҄3h*]7HYHIT~9-'Arn9RAf |oɹAc uMC$չ(i!49K7դqHBU ^% 6e:z!Zx,^TCiA DJ%@LO\fhQD /A0鍌N]g'zzyeԈvcZ|ؙlpd:$xЇɢ PָU^ąM,3$fYԉB-^'u@k8QD"ӡ`: 0Z A&;(__ҊĠ`>,@%")x>E&!B^\ ?bb t~xrPo#߃ܒZ Go:h_'8&|b3 !_ 2TOBrfqV>]vhOғ!(y|,,E 0kRf&%AhWī*Tqpq39*Hs `DXM51}Hur҂(4afd m_1r|a;~m2B֐*6mK $:m=zBe>ö32NvIa_xdsAhFP%/\z@|9҅h ]~g1J;D,Ӳȓ1+nhz07>X =D|HB\xL Pu`Q&ʓ x{ #y5$[GBꛉ%Z6Oa$< %$|E24,+#'nlo>9 IK@! Lĕ!$ܳ~Wr"ҟeFþ~Hđ?P%kØ"#S4"' 22zo32 ![bedTnGmnթk+ Eaw#H2ڗO91 2\pS]D|~%P)}@1A~^jEj "w>]zՙg;2Qpخ;i}Qn'}/0P˜lүof x <5FAI}z}esS<1u7Õial?7-99l~s\_- rdw'%]=RP?43%޿"+ݰ`pE5endstream endobj 641 0 obj << /Filter /FlateDecode /Length 2902 >> stream x[o{ v).[Arɕ̆KJ+;c3K\z)t>f{{z 2/_<\O{: ۳ɟO ]L2d* ӳzJњ\i;l59GmUkj ?c< B=/8 tZv [ QX(. ha@462aGa0[~w 'ɜu= UoǛFɲx`X14ڏ[ \:"KH/ Zs9QT) ɦKS(=BiSM.`>(0Es1c!`j9M[5`J,p@|!FEզjC ӳד?D(JEe-L#VcDPbQme Se/0SB yD(dt_t뺊J$'#KgE . .ݻlΚr1#=P#( QS)_GT4Ɖ9rR1spNPkf6c c,ň8Ůo6峘"c[I4PjHTW* &"E zCnnlfFv,d\ LF#&A[VeWfk{J`n3Jh%Reg8P`&{QAa[\]9jA&IŒz|Hov 0_Bhg"Z"|F1_tA2|1#!# _~2od0YܥG W>?2GՐ*gNJw&XJJ̗ N\{M亡1)"ItHD=NAIYVLVhpӡ,:'?7;Wmz~hW6Ul-o&V~UnOǞQ>0*@,=mf70s0ԎE$ũ6U'Pn$8~A *z{r*&P G[[7czm(Cls uahkn>rN#RmQ1]۲9bݶ$eE |Ǯ$ޗ&hJ{zb1HK'_Ov2nlZ'l6{݀tN4 6 XH:] TxYj760% Ostj]bۦq-8 .F L QF}^GilFנj 6yGq0 g,df{B3 X/[GSLBomF, aqt(B#H[V^5R:rڏKf|Slm{dH 4x/-l孛5kM ;; T Qnኚ`ڡ@Xve-uՁ20`lzn3lZU^ʓot/?9v0Wl䴹) %ոA9"@5S'md\ܗ=/ooY'9 s0!n-ZP.7юփM&_$ݛ: e'\GϨB~8֫ OɘmXa_(T^wwJc>=[$ !30e,^ya}vɼk"eu IMR}ngv,gl} ,N8G] +psW6i)j}DHI)$]v'w SjE6Niw 0똍<̙>fc;7\z zWD\o0aEi5OQRq!k{ }$foj >Bb[UǛ/ @ pO{f~l H'iڻFHsV"tj!B rA7{8*?MaS嫴]o!lTgbھ ,S[۞A.z""}nZ`q/.tCwG B$Q>9!lz,dOI34 /;H @'ufqʿK nbhpWo^fڧ+,%7J8>g"Fkk!!͒P *|a~Pz3}MŚ.!&k:u#72,GJ#$V X%v6Έ '!,r\]2m JK)# Ovk1^r9.q%cZx !.OGe6rĞ :Q sSG$͂V^L)?CfîKnLjn2j9wߎ1jcZQQE!]o?UmF2DNbRA'̂܈V #}^!'H";݈9vR,he ȉ~˫uWn—6kSv ^S'̂ވVv~=z!2avլ?+t|+2*pKNvFv2,޶GD̂وVv7]Y^b6 }8ʞ.Df}{D,ȍhe[G.QCnTUžH̄[> stream x]O10 @b C 8QC_Ct;,ڱ ":= EY7' ޔOK^k+x QESb'ml5Uٿ+)J7cnw>`cSendstream endobj 643 0 obj << /Filter /FlateDecode /Subtype /Type1C /Length 324 >> stream xcd`ab`ddM,M)6 JM/I,If!Cϟ^<<,o/={ #cxnus~AeQfzF.THTpSJL//THKQS/ f*h)$f$))F(+kawhNbIIfrjI~c##5|}aXPSl?@?.-ꮕVW]X{޳u.]ڽd܏߯\ҽTq ?oZȶk?s=g7 ==3zz&L?guO}20yendstream endobj 644 0 obj << /Filter /FlateDecode /Subtype /Type1C /Length 607 >> stream xcd`ab`dd M34,IL f!CgO{nnC? }W1<9(3=DXWHZ*$U*8)x%&ggg*$(x)34R3sBR#B]܃C5300010230=X} bsU?W1q'.]-rF 9~tsXtM7gw[8NT9ӺMon莕ONKh뮨=oղZ67g6wKV7%tϖg߳%YP{ _%;ڧs~?9C*87;#c}-{Aጭs+? - ~aۅVf[Ӻ6n({KǦnIӻh.<Y3m_\T,^]!D+N&ڮY͡5iIzWw8[Wtiߋ{g/d[u[%$${a_O?n?g {R̞ ~,e` endstream endobj 645 0 obj << /Filter /FlateDecode /Subtype /Type1C /Length 3033 >> stream xWiXSWarXBڎUp/V!la I @Pr"B ; ZLQQJԩ֎ܙÏ97mg~Lx<Ϲ;}{acEoؠT(',XR)- yY{k`osi 7HX "T*]|,2Aǒ 2IN]VԨc$REdwF?(Hʄ|EN7-ktWv>vOugfDjnv59,3?2;R\ISiґPAskϲ|YasI2W&;/g;"j01tt* Z&.#_k3oQTP;&xoXy37[sP!dl\f?)zi/_zi[4,“C#QMS32P#z @a/PcV]]YM@|g3,Yq-MQ{=̀ C[䤬 3Ry1Z]3vPH&Wp ##H4O0ΰ{G! ;UTV(BR/WBij$ dU} Ѭ\u Z*)r## oYшw9{+o~e1M`3 ]G4nzonF )IGVi(-! GP7Se`Y"֠c^$I~ |孮T4ӣj*Y,a\#ȱ&pAS~Ԉ(IMsz(S'4N :faT6F&ffdRS(9Z%[\mӓEQeK}٥r ѫB֠(1փttnNW?N)$+!3 :Zi^[vd$/=D&h`q1&GOW+O#L}{cTKY ?.X&sR9N4i9CЯWo-؄Fɓ+(ܕISdg(5%8~AR.qG!dGfi=:PI~tBD&]nwvWTJ_9wl4t8+ˣxIN(tCnv*FrU- ݃58Nh:N1%qʼ$ِ*|F"HeD Gb`h" qy I272*E4X*H> OWvBie8(( &HcNa_RqOAHϤTxsC`WDL%' 4h/9F MD{_y~ _Uw2snkm.޵O@ ѩ"0%J 2F4|q)d=^ecA#Id]yË&cc˳jwj "pĹ]$wv <$D鸟ƛ '7]sXg>K4~ɟ3VBgX3Zf)>縆( gI%1(3Tutg֗ySm(XcO%3/TlwՑPsғV':k Z`((D)BMR>4t6Е[g[;psaoc9R?qQE{st^t-~b('zChujpnlen1?{Hm?&[` knUSCsRaKUa+/1& ؗOi1l۠2@KGWe0#Ra&;8܄_eXχtF~{B=|Za?GjgF2-RqKH&Ck"Jqr-Ѭ]9UUHSyӻyhށKTwWm:=;vui9fׇ `YW z rD ЋhWR߷\ F FOx c_~=wJ|<ݲ;Ix=*EXڹiynhCx9x9t-l *[Ճp@ th5T0~MGj64Ӄ]] Do\r(搆(%3($8MD}fKu؜g5{Ջh I٩F}% ߰?,e߲3RCEeƼ,#U51(aA4UJ ?~S] f,-ca"c*bp~+ƌ"rwe`?\¥Bes#ߍҒ @_1#\3LDi3ԍLhG-)e(Ds%xyL]|KK]] /t,3wn)SwǚSwŠ_vb+ศ&OE!]w0vllbaILˤCvmO^jڨ?ׁ?; ݺ*>ZF7tUaxxjܣĖ饺>w!6鷾zJЉ{YZnܒl=2-4^6 [S e |GHUY@#0I1"L5/ytΪ4]x< YǢ#VE6t# $;lGO TOv}5SXYFPWUņb0!endstream endobj 646 0 obj << /Filter /FlateDecode /Subtype /Type1C /Length 2833 >> stream xViTSgJm%J7nVֱպ0 a',! d,$&d#$a1D"UNA[[9gZuu:=/돹HN_{<<2 `/6=/fޖm/PðQJ4p:?#3+'7ۃEc>l?m6b &l3ۊEa۰Nl1y4wO4?:?dm9<#e}0;fݞs-1tcX58rLmY:'2J-vkm&m( Ww%I|B6+L(Ir1&qgGg%j\cnRZW&7Q]:9T+v)>sI˞c=CgovRYR+O׋"\#=#r}M͢PdO@h1ȡ+(Kxi]1Ý&4kMvaA%Ey$Gʧ(>aiu8 E*Iy cf-DY ^ @A&N8CUW0p=Zxf׌;Y3AOKIImC[ǂRw7&b|+t@t Zd*J{pb Ԣ)Bw+ J9Y I>  ܸKٖ'T-G ⤷ħ]b:|-8ź %&$.Y|0+yoGz0B IV/>VX[nf+(:&+(˅ZR,-\w9j35/0q6@#T jћR{;;m'L 6p#|_Zd*MgrLR.դU*uR2}A>8vvCԉۅ}vOc,P <=j21TAԨ r4Xhw`7{ev6EƿGMiYDVMJ#!ҸĈUq N'B<5bĀ[-6#% p˜beJO62RjE.`ݓv;iVzl׏ ֠Y2 jiQ'篱\ŗg'iEe>UEc2BD`LmׇkǎyX7c0yЗ=g-Ɇ|*4zeWlCڏ8Ќ_HHY~[tDÐT^^WW%x9gtb4%_ eh< % %×n˴<; qK5ZKT]5OĸFN 5j( NOsNl8T EF{Һri =0dw~ Ќ@b%+tjŔ%KD014`- `h"k~mO/nԢTo!1xp~}-rp~N*Q[K )1/,څ-T&)Ʒd4w/=^ꖘQpPiPMc 4|Qa~Ҁ:}6x~xtƙ}&} pZU7GyO}R#: LKT&ꈜTk1QĒK{>:ۺI)sޠ-r(5j 5t1˚ %Z|p8 ^ dbܦֳ4rk݉jyZWH* +l:0::ISs!ĞRtxYT--=v!=$Ie66k*咈橯NaH1 (~F:tOZNrdfkQs%W?>ttߢd fw3RNU'P E6/9 悒"6vN i>>qo؞_F:dpUV\퍀+z&>zBU!)^Trt}P}0)(j'q0^()Q~F§NGGUwԐe{*#v:sG(_񏐋*r7n3L$bגO{ Ԡn^01Q(W9J-@Z\M#-,>KIfnXH\#;X*!?x[fmt!e~aCJ=M(FK,h=qFw]w5JZWh:NՎ`G71<JRsQfQc`͚M ΄ك ɏPg3^0Fආ>aO^endstream endobj 647 0 obj << /Filter /FlateDecode /Length 163 >> stream x]O0 >B?eB%:t컓ϲ^Gֱ49"AOcQ`m*Bv7ޟ@Ȯ]$󡬪54R> stream xcd`ab`dd74,ILf!CGO&nnW }O=J1<-9(3=DXWHZ*$U*8)x%&ggg*$(x)34R3sBR#B]܃C5旤g200030v1012|_cew3qEt"깥rmlٝ%-Y%:;8j&,YٿcD9f{orߔ)| ~xNn;n9.|nz@g <<{'}=s&20$xendstream endobj 649 0 obj << /Filter /FlateDecode /Length 4180 >> stream x\Ys~_V SJv7[r*YI[ 偖(($ߧs JA@7}|)j=aӷNOzO“3ϧ70OZmk/|=sю:s~=v_vVNx_g>;͓<%k.M<+jdM^9Wfs^W3Xba%\JQ{3&-gB&pӎ;v8N+^Ygv`~q}-w/|c~C)/"WjIҹ&ȫ:ų|Fgwvb?S Sr n/a;1R1ᶆ'Yw>c8DZ2a|b.(eѲHIKAZ } K䴂{AY kaEN򢺬fs-t͸Έ2Āឍμyr-blX3VkF{<ҡ!|;=yu髯1 wL$'rg& 4->ٛb@HS3Nk.{种B;|VҌ})^.]ZZSVyh0OgT rj[]/n![]@e Xjq]-h𵌣 @0ܮ>ZpT"ד?^T?a>acLT]|KŰ%S}ow FӢJ m̋Eآ:a"vS',z҉YkxQe[$zV?)[[m錭 _wmn&| o88|Hf6  xXVhu }OY"Wo`1TyUﳥ001lvŔ(8Dr")HK(9l8\sR9ׂjtHyFPx>((uzn|#렔`ٔptoJ=IsVd00%khk n=4tsgO)04ڽeuA'?ܭfyyPORKes ΫュVLPY]Sպ6"vwh Ƀ0=?RxFQU`]n&wxb̘\n0jGt!+ϚU״mzK#J W7(ԀN1|8$YD&[lͩ .v< ׋W~XwNJ .G=>NZ1SHjC`GD e|F]ƅbB9ӸZ:[, |{y^O4D^`r`vt@HV"'S[vUI/g8&?㷯@-^VCTGx猈lBێtM 7N7$%G[[vcIFGêq63i(_;I"d'Jcnj38#èR:q7$>A*N~: ( kIϕ'Wl/@\{FF:YA V]\PqŖۯWQN TTs.շquS tWM!.c. 8 f0jU`w]]ڝMBqdb 8$z~$+ɡ {~`&aaIuL5#zI=`E{›HRj8ΓM "}~{}ĕ ӓQMz\Oe ?P@֓,?a$gҴDt7EM*g9lFh/62퀒+ƒaA`Zd-"w|ejj݌ͨ5ބ "elHSxaH9,zLJ ](aݪK޲mOA/\*= 95i"f_ނ M}I# 8dwEdev!$n&(D7Lvq>tBTh-d2h ?(JB?Dج–zW;X4#@dz< =A2ҹZtkԜ'gFqM*ھ`hendstream endobj 650 0 obj << /Filter /FlateDecode /Length 4373 >> stream x\[s!'yc;зd$8&R3 -Q2Rw9-郥wsü&t^¿WY=}QuͿG8|"t~y3sQK8s-5\/wW՗ݢ&ֶZ/sR[K+1ϛ61Ԩr3\WbgFBlʪoWՄ]~':? QJ!/gw痳fX3fFi avEmM ʦ8hJ妒kIk A>;ޮ7O- <; SIm,}8cUb'M}^ǢDng;Y83f,\pO;}DjM Zymw&&=+aSeY.UĒPj{h6WCl׋1z.q呪<̷ m'=-—|Tsߩ%M'6$ 9oĄYp!;L g'쭴 \$3Id4P'23"hPd6_QZf0#6i7E4`UO#fK3CfjL>C%!3͖lIdf$23 \f _Q+b XuBY!ܾ~nItfLSmʡݒ̒IvDr6[YXDs/(a5о070b(=e&@rQxf$Le.J,F,"—bwBn8a9|AOvnIzfLS 큍d$=3e~2\ -DfL"3|J_2b YյP#R0(Ҷ@Tb^,ELCdo͛)U,E,YIxkT !7+ާbš^0+%KRP" &kPv IKi~_5 #O5W;JTVm_]UndV*rX-VXC30f"XogU3X"3O$tT4pͮW&U-LYд}v5Enݮr .u5a Шz-8** eQɄvbJ1 z:P"_EpZU>ys>4ZXTߖm%8u-*a!F:bfLT%SVbIʂ? > c;Zv3SDxk|d2@i\N0"(H6^( BQoT-{E ZK{G_B ];0QBk+( Si)&Zv6Z^1瓶A`e8i=8N Y,^ܔ- du: gM! RDB uU@w0rXg?zл]c+1?AϢE)oZ>& 4_kI uCwcrAw5B@ :zeē[ga~ ^"Ou Ԁ-~NfYj VE+EquklF2mf`+R89*D-*f{զ 5=o5>NoX@ap2~p{=H (FcS{XBϧ=*;<_/ s fF\2ؽK@`CpP)31&Bgla(2U &wMQ8;jhb }ڸm{ߓ6wTP<0ronJ[@Ep]}ibi!oF $ Gf0xe}og V+M_<-k~6+ ٬md{M bհa@ރM-jش̨e;BG&OkSj.tc.荻Cw]~xKWJjɣ3p&Qz0rR+GzifW *+ҽE =qXgMy2y`yI#q;y8ѵ51nW3.<0Zip{p,Hp~_Y.>=yY¥T+.cBH,p]Xe | ,^gu.~#]w$ YiKWgΒ0&i~fAA;#mΨ8l7yxM>*x#9v5 ݯqQ>j_ гBm)^SBxXOK|cj(ߔp~ 0 "댻<3/vAh4c+6ԥW[([.#=K@)Ӂ<vΡ5d`i;x/a0TU_=w'reB8Uw谹b@5# bUt8Eڜg\*zn&QDdnZ:λU9\`T :糺P-8Ƴ dBe0=An ;(Wm| -*'%(VD3B`Dž RW}s+ U]MoQ#:V \ܥJBWti7ob]L_anc1px7#(f3G i8䌾I$:ALw~ c+~17r /Gavh01 mx_g-ν } B_^ t cq)L@nb L6 ?5q[RM6M@kZYߥE?.fgޢXOFa'>^"r%<):/*2K+wq+eB&J &O1" =K77:#X8@]C$YPb75ː쫐슼׸{~%urg[Av~4;wAFhM-qxj(LWi8"^?tIbi[ ِ~6xY=4j'u,= $5Y"z8JpxOz63mj/vKH@Aڬg70_s09sϾ!J0Աjee i_gx1ᘬl _6 :'Pyfh_&SHapH:ۄOZOwmendstream endobj 651 0 obj << /Filter /FlateDecode /Length 3823 >> stream x[s6pfP*co 3^i;M'KvL d&.$ 7jvwا3f72xTʐCf1>SBxϫL1VV>saEL_Z?F-18//+" ZSs~a3Jsd.5whV<40 I K9/H%*^Ι ~)H)~0fxZBmvՓQQ« =?Q2ɒjj֋JQuX8OP0G(ՄyRgR%fBO& ٹ`1I5*/2d(T^&KiA<)#E_$`D- 4/ŏfHsѬ1}a\0)lxNn7renzA*YPrgR9|^T};Wzw/4]%+^wv2ic@RWowrЉ-S)?[σo} R "nH^3pڱY;Ew&fBRcL(JIU/Ax% 2Tc-dAY\7B"d@ Uy l @!n_`Ӌ @v߽aC7;qN7ыتױeJa50kd!qf/|+x`9Evl*\SmDHx#h>=Aw]♰Ƶc]ӈ`I(^Ol~__L}O afHv\ =,usV6pgiif'mDZ do&}mK6w6 &Ds[k1nwu&y7gnIolh<9U2B H;[g}HW;5qCrkB`k:NXv'hU[3͚UyRLtukeB`aH@ !c6H&͡tK}nȬ32&$z$!*!ok@sحo"s x&"@ip0"gGGj'^t|HU.3XSv}ܖC:C(i(lmZvBTpۖx4^!f(( "(J10N9f ]3cv!MCqm$1] kl?&tD" T1Ҁ9XfȘ}A qA98E NwSG&}Ւ֊`{\dXzInIo| vw(\ĝu P0H?j  y>hP!TV a]Rf Gef K.C۷緗.E]#ZچO`XӦpyE8S.]>D]hJ2 Ù+_ග=8/(9y|cpiMM bxd(9zl!ZJ0^ꭶ\N"FRQ2My z^l/B悲ǍAW%H!DJ(Hc@}hMvaZЊRtqO% }w<[}{HBFgT{؇16 j p)q4nupZRmU]U*.Tmʹ/͗ٓd&.Y {j$0q!HrLoDw]f<0TsqNFMK򈺅-\3%埓(?sŘ ?|t Ewb2ǻ^GeNAr KAI.SqҪ:9dnkZyJ(F͏znܥhwxH-hm!r&MʡDw$_[(X/|/N&eA5U%c6_oͨVIn1_hXMEcc{=wW+f_ҚEWޏe8foÎo}57&߭*j~Dž%D{r@Ou _Jl9[n_\..p͋mSg9yx^ > œĿw3E/$o+ ^#*JӛfN͌=s3~5c5itaA*l.ȥ *tendstream endobj 652 0 obj << /Filter /FlateDecode /Length 4045 >> stream x[KFCNa #k~?8 di w8p%/`䷧Ivs8V4$^_Uт(_loggz )ulv: S̲QpB7g/0q+ݷ9-;Gtt/<֒|H[|1ԒMG. !x"/4auQTYf5L8߭o'Y69Hka՛-c.8I6 _M:.\9+HKť+a `F7gƂ).dZRR\Ϛl΀~4-Fp~d- +K6v I81zM#Z 'djaJ-RnAofzc[?Ι\_o0T@A &x<+͘6J @؎+k=9GyXJ5-3a^6 #EdN*oXـsW c34Ӛjg:-5H_q`RM?nJ6{fB%iL8I!@EeU6g%$VGI8`@ i᎚V6AJ!zmmE|5}Į䮼/ֿ-+KӘi9G1s|(+ADLQv-$V{JE<වM)Ih~ZcB#B aSOcɒzK6cIi8p792oj:܅G)B(S),Br|.zmpl Jma.g`̪v(H-,ɤRл۰a9[oD_J@b#ƅMU%I^{A~O灟!`xPJ̨3ޭA8~ιX}Ɯg:Ki o  NPL3 N8|te{` ~{E.O "!m& x#Fs qGBl8wg$FYS0?yI %|S^3gFJ2 ,fjXպg5;6Kf 3(w:+zhHg tGh'JG2@GY#VHuf6f}mx}]%FdH9Is"t9I6{ h!v`$.E{%&}gu> #TLJ+"ޭ>#(frY̐ z(,® @=!:;^L_^u m-Y&ۙ^;7sk$N|@ua a*~֤ g}bϼY? 1f=턇ϓұ*[xxeP+X)z⋬̴  ԗQnSbPtf!~ X]WBʇ2Z-!1)DsYN2 `R}v\`ٺ lB@(7 ׹G<^dž9B K (}pJ,+BbAke<q*$/oCZZyr`u$܄8G*<\&{e39@%;~_/[ȓ_t8{  Q +~ & wA)gyP9޾mwE/o0*RmҡwӊJ}eBXCNMNM`4'#&K~뽩nAKh‰Nw4Ě[wON{eQ z/-Sb#ʅq |h%XB(DII0z!:6adQEr)Q_ޣc>!&_Ňa$U} zg{&J;';4&#R+M`wĦ7c?+GT:h)VX6 :Q0E6e撉v 7SKD8fB1,TcR|HP0fxLI¢}$NO@]*E0}Y>:U6:bpMD8n`v7Gd&2c҉6'{{6鵙w4@OZф-дMl&K옰NVATw8?>?)'y;H~Gb2|O]b+64?|GTJwG–xGLcD oC*UJTHʡBww;=f7~Zc_mÕ0^ c۫#i֯R0}1ȏЯכ8*_ߑw.S$)ߕy]4BC‹zJPƞǴ V|Z2h0ZZ!Bn`wNXXX'bxHfAm]U峦գHvI9Oh}^1PSusS6'N|< )3ZN2@03ڶ ȬL={o hG>kt-,ϋ23yY΄+2[ONJ,4 AcMc|nDFѪnN2:ӐSzON$!Ves"Ѱk;p-ފx iN zFiLIeg8'=<8ľD5ʆ2HIchJ>VQk=er)X~ Ş_q7RXM^'rsja4 `=z^ҌDfI ԥCzb@[18"h#f㞝Y_V6X7ӿY0Ax8h08`xL%Dr'ſǐl)O~_=lєk(WjZ#}/ .V${,ax%&vp夂hM=%WUC'[n{9L0B1mH~ Cm|397zyʦ MSn/bD: 嚼(Z|}5AIt9i<,E(Q]~K_>%Bs03ơhPo3aJ|/r=Eǿ:݃y[vO<(Ղ^kA6Je0vʯUbC3ZHEc!cv5tPewợBrߞ;,ovf?f(?endstream endobj 653 0 obj << /Filter /FlateDecode /Length 3284 >> stream xZ[oFga>V\}H:EEEXíd9/3#IܨX8ߧ?FRJt5+Xg̗L/ז 8A5AiIĨwFb7$)z=J)^f@zs(d]RN X"%IwsuѬWOjP'4/X׭6Eu>7Y7Tkp#TGZqנo5IВW&칏MlڠTKfT/ +7ԑX/( X[}\!(]r039,2N>0LkJQ3!rWz偢+mpRR0A'n&uDR 5 Ucw$dDoZ.֒ՄoS"k#.zWi?6qޓ" ~`: sG7a# =B.$"ĝg#umQRݾ^ o"% B܅aCNRt@ ~gBU\#'JS\fjT!3J 95u6zAdlXWF^Wr@RF؛H*YNm~v]9-Tqui^l:s}uok?92ʺdK8O2H1ux뻅$D4O밈 p0`+'rK c0F%+k& q{p=ZЭ,2֬@uI0%Pmv|VZg @4=?}:;~V .˛hf;d%&wB^of5̔6dWm/0]{Y*}E?q@T95a[ CYdUp6`>X,ϦDE3hȜrE8K0g׺x6+˹&k,m5pN?}䱧Kp~5MV0eO{51ՐQ1ŭ|m7s$V~]Vli8 c.F-[CA]!?Ru+41f`%ٵ :jp z1FP:6S#yGW_S\; i;K޶ O#r[;@Yvi8@8*)1(- aŮ[L|VYJZrJʦ+<eh̥G,)0ƒ &Zy)]\H@ TBa]3ץR8B3=Z¡zm\@Lq>lԅ59߮ox+aخ7[JaZ{1ݽnք:gkSg) /BntzoJh iRK* A6veguhqRiXŷv_:} [d {Ҡ"o2dhJ',Z QOcklS((D/}too$iQ2‡1j2<0t5Hi2p1C1^m WE(7lZcuRҔ"k`%Ђ$9!~BeC4ѱ2g6[q豣qвo̿2%'@3Fu4NY){3lz 0g}hH׺ C1vլ0|55`18ĥH"4"bپLyϛb:^3?֝ߜx3ܣjIlz9 Jf010>(qCX-GۑQ8fh L8pe}\>޵]anѫ~pL1mC1T[wT0>endstream endobj 654 0 obj << /Filter /FlateDecode /Length 4506 >> stream x\KJ| мȎUM /+D|uoO*K3_3/sR9¿~QCx=-^U]X!ijl:@O.MT{\hփmףgcqI<5H$zdJJ*,۪y0MqH$a:قՅKfbU]tXޗ K)pm!YK0)IefX:3%daI^Vš:WaO} gL!s}|/W(t/8uF|/%|| ߳Xd%=XEݮL3GbˋZj,6PyGJC6{ =gy1$yŃ#iE:4̒$%J埂+_IW lb43(ZuƸp%b,7SH2J%>yo2E%̵cqf?31KQX\n K!.bU#Y#Pt) 1X;F3BpFpYlANd@p;λ }BP?LGYVaC,27e]?D~ [{ bQ!?ĢE/bK^?Kb.bC,B!?R!?IJXէHEC$g"7e!q`ĕ/O?3Ȋ Bсj8/4B|e>l"|wQn`eVNr ȃXbr (l_uC JWCMm#Bsct] UnW:X3^%>ď*?+ɂ,]hXVt f7?UCBn[v yUyE^Q;(T0HcHzCo OT?IyIs/`cu0—!C̄"]!;?=+dKׄ cz4>yL7oœnn%(8n+~lmjw mU"^?qu݀Ok$vp8<1N)~gY9Jju\;>J/w8 6SW$l2-LeWlU +7~(eC`4(N~j(9#΂dԐt!T'Y +HeYHbu 6I+؟жZ!_b;IPpZ1 @>FL0 ǜh0]ݺٕwգu5ˣQWYu e Qв{۝Դ@4UER5ʟ: <>E B̺(TSm@9U' 60:i%lHSJ∹G466uaI9u7iP68R.ob~Ƣq7[غ^AbP ?`\B bܫi^EJP "R<{8cWI|A2[ͪ/ W̽KyKKemypB#NEIuU¿+Ňe>D`/  79ID'bU] L^D/PoI0̌5-Z2 l_S1Q|q%]aшzpǚ eXG߫Q۠_|"׻#~wk4,ZrcLSqn>5 S+]nb<2A{}mmi]7ݏ ĀvT ,'8 n3#c`+M2(nt|a=#s贲5sA' |^c*v|}Pu%8劗[w"Qw} yJ<̱`ISu7 '6HY7@1x3ZZ4Q^RQL|&ѿ=-uᤀ/ BT\ `87jZ '^ޙO*X'mi>jc-$ȉOKQo %t\;YIc}zo DLU)IMt3v>ƅu,>)-?4IG Y>q@1ʻXfU X:mF,17Kr#IWXt+s]s*0u,K=|IVzƐB}w9,vTbIωaE~rsQza WFg_ .nDz"\"u("1-~Qפ6^/lA#wu@^n|ᱩ}(_2O##瓧+~ MCbcV2vp /}J(> kpJrBt/%A)hm9BևKn2ww ?tz{yǫD{$^_B6FK| 40x-k^D3< >-okApokRqq@byӻ;&%Awe9-07ۈt^:h=U6>YN/zOW~فKUYqu,?2,/uI}ל_)_;yh`ғPh.Qҽ|h9~9uw7ubй5AUAQɧPgF*}H/SҙIcEPB}}#M E}{֛ձxS0H:HO~oQ#/k.B5Ÿ9Jm);hoHx붭\yc`t/pDR_GQ?;endstream endobj 655 0 obj << /Filter /FlateDecode /Length 1452 >> stream xXIo770@\ }@8@8M$h(GFcόY8%\$9C`]#܎G4&"O~~X ;Kr԰DK-,!Ƴ@LR6g>KU1D ìEǔ]S!&,0U㔢z5pA^m)jn) [#4qMEOEF[x_,tgxk@vbHXX}C0E&,VYjKbbeUޏB-v ?5DDe6baAҍυ.Ѣ<1c!C p2ЋT2<].Ąr4kBr bٛgx6]4"f8zz2>t:@yz[R i:a-'Qzq./~WmPWgnF3zLn !ČH(Å,  O9ʩ$+$LW K}/37Y :$lc&qBIŇ8h) C4SԚzy`M++, W2@a;6)J1C$\ {t>xfYS'ƛ/6 =!sUm+EAˢĮWyS;AJ0i{es>#0Pcλ"!?D82&8=g"tX􎔢=ҭC0TQәzaAŷcoG0.̓p{^idǐo$26RS؝tLl曽 -M D YO 0,IK7o[S)!I{z]dn@E2߮6o\ޕ&m0cjR4I&eW/_vHaلߞ!= "! RBqfX5*xf2;ΗAɣЕ4ݭ3w[:W { GYL۷+}rC3 ^Yq|)NŏJtr+L2 ,[x  *4):v,Mu[$B-]6-o>Rv}iGoauY]w֥뙆NyI ONgEpm {KV\F?hZw*endstream endobj 656 0 obj << /Filter /FlateDecode /Length 162 >> stream x]O10 t@,tЪj8(NߗNN>zK X&었EUq0N:txj w=|MYU[9hy$*յvI{`nVC\ HJ$pLg9+6yS>endstream endobj 657 0 obj << /Filter /FlateDecode /Subtype /Type1C /Length 335 >> stream xcd`ab`dd74 JM/I, f!CL<<,o$={ #cxz~s~AeQfzF.THTpSJL//THKQS/ f*h)$f$))F(+k꡻ /,/I-KI+)6d```Tg`b`bdd ˾*p?nv.WVUUY!> stream xcd`ab`ddM,,IL64 JM/I,If!C=<<<,.={3#cxns~AeQfzF.THTpSJL//THKQS/ f*h)$f$))F(+kaw(c C(##K5|2L+a{X9ߏ|W)R]͑۹daw7e}6ojil$9nJ]sIGv\ocV]I䟰yӜ]'&&-> stream x[[o~ !;-61G@6XK+i]4s93\Veyj<$s~Y|Yߋ\^/.?~-<)|jKm^Lٯ0 vPᜳϬy/VeQjٿhL)YpQv׫R(Kɾ+XZsvVұXݮ F n=^wHӤg Ujǝi $p~{ų9~%IL!ĭx> `]y'Y,S&^.;[Y[_/~)V6K/[J+tR K~#3n Pʑ灵ֲj-`OhS'yI{MoaA-_ q kӚcuюl[Oe.u㸹F{=./wuuEO7ovà m|ܮ}h_k8>niTJDHpMTPm]NANAV%5|QUWhGQ|s]Hb F-v_KxK9#;mAbv?*g_$'a.{s;ga]x?^k^8$JJ`=Ĕ?NKa y`?g7 IP,l҃9ZYA&<0 8郖dĔdé65-p()1_q^ zZ*nX]S4 0Fb) ZU>]}մUL>EsV#/h@ d|,,8xc 1Q ?6pNgU*EaUEWD0FXvLeF&}fdqɎc2 )86^=g[+Д]cg0PD#cO+'L;bzU jkRВI P4H@s<;Hx̀flR@]Bݖ4jdPƁ8LL) Pz2rBeu*TyhMPߧOs q>A`D  %%[wa%, t[ f!4lǎf/ ?8"[-Z5Va/_@'1V_%Ap,}Ve`1VC!* a7pz'!WA'Q/a"=0i'65li`o#sܶw/:4L #xw.QQCCg(UnR,aSo2Vs.0ӧf={qlF qPƔ+?{1)3GʻY*$%[-P,e+i$y4Dw͹XꀩGpX|ߍXa|bcLC,R@m9[q.]쫦#I^ӮM'{_ D L@V-29{W  `ÔK8)<*;k޿OFR>VۿN3()`-oEQ2Vaa&BFJ䦿W y^$a|ؾҝvSGKq$zP`v 3&r2eG8%Q"}'iO"P:˦ce!$MI ] |GJ&¥P7~^%BIHA W[N6RV+X;znJv~ȶDڈhx8ABm9n*MWt~\ +ؕ@FV15vL&(֏V_3u<'A۽>An'YfPTŶx ]q9 x[]&Eߨ@L(A2!b O?ʂbhO%0pcefP$H WQP% V N&QYaE1{w.iӣ"I>ߜN-m] H>2݉s;[@WOAAxEU mԗabkůk,xG `،:sĩi9^ʂ&TX\݄! }A|Oԑ&N(}pxd3i\M;4nF67O S?RƸC:?2pQE& N34 "̒S@}suB0"ŔNCc|΍V7笓OA EAJM扄1MLxh{R:g⧾ZKM,} wM ou%ϫSߒ/|wJI m f]fG"x;=($AoL박:f7> stream x]Ko/$^ CĚcdcזۇHIIk#T?SMΊb|0tuuWUW}]0d5lx10aw6t o3χԅZmk/t>$sqkke]s:֟כ#V3ڌޞ35̶~(jd4v^9WG'LGUf3]N2Jp뫋щNW/c7i9UDhŴ@uh'W3H٦Ye:ŋBM_ƫ)/򨼓| kMEX_8W`P)kZ>\MXk^I V6ߧ.J}]-yPǏG'Z(rNΖ zwyxjj]7ɸmY-]yvs9Z +f ؊e__C uns5V啸_Sҷ*}՜o.fKc35fiy%4R8X%  !ٷLըͦA*#oq&gڛ aq]Zylu-*=[]/'dK@凞)-7&*f!Z\7jx%ȋhϞ=oqkoM [mm p `Oq:hPvz* YXk$|JRYDXY`=:LF^i 'DYY]S^Ռ1\h}|_ϚV<i9C5:taM'M O^]DnG `3N/qW+.ŕꬹnA9;ѢMaZoȃ7;y9U |aTU-ތ~!Z G?`^-9,9jhy!D A/b lMG{&$iVV"@ΧX FU[`݌ipV[2Guc+؆I9I^-0gAz1ʩ}0\cSsΖs" 7E2z>KTRc@lvϠT*bYs` 77ȇzBp1"ISHHh I_N;nfTؚ;,pU}G;2Pd9,)k&ca_/b@#]TnB+{0i,;eK2\LjvC#Hrå~0Rاp?g$63'c"HsåO+S#/-SXl߻|.VSJxT>eKNFd:M p5: j /WY3dB)PkkJj Qk1kA7~הl(KH LƲ EͲţ!iS6~' ƴQɺ]f$ծ 5J'Ujk0WO$@"* ꋫp\Ƣ%D{*3"B`>u"&3XD*"&jk*Trg.+NƒQ.۷]kݖ`)3<Qm frWy6I/< (eAIK;G2^f a9vrQRa:,j@H:*yRAHrHEhYpN ¢bsc!K.] 0)Kw^܈?G8/˻x(=l.DS[pw;0z {:` M3%ia'U'=SMbZ~um HI0ԣ?-i 0$!s-e_uFZwHu;z w#B)fxC.퐈 w:xOޛKi꽓Fp^ j1y7% YDCҸ7#;pnoETm՞a(3|7"9nnfT'Pd XҖJhۙ d9 D?EbB['ҡ{QOCIe y}tZ/uyB(uP=J5^gIYed %^NI!io@? pOaAA]*hrzygf1n[jZ_3ecU,&ڶ b֛}Dp٤YoYL<Ü%Tl>7h6X.CC8N $lRŽZ(#n A؟|ĺ.sp{k4iz,x6C7=~!!§2` Zendstream endobj 661 0 obj << /Filter /FlateDecode /Length 4352 >> stream x\sS33@@=f3ivp%yͮdyEy7o{H-Q!E~x_xoyF9(QwwM㿟>N[-_;t̨8c-uf/G$r5-O8Y7K+!qw_;s,|4#>`,Ц|S,$}-phu Y&g#3!}Aί\/0eB|ZW| 2k4Z%"Zyr}޴hIzJݮ&\wOp OAfQ#?$2:VNdAdT /6]WGlFLT@tT3,3*`~*&ZI3qN  0)Moα3e2 d}u~5/qmf/ _@Y,?; SR,oȍ~W,70+$PX9FַחbY^W bW7̫rx@ɤfy5.p/&-|PH;Ɍd4p, IЎݱ)N qxdmL3L\G)LƩ]z<at`hv(} .7f`p"v1l)IquP쀿#[NRVuJb%cQ%Zb3V5 pKAQZ XVJr# GsPfIJL䙱sFnm$=ؚ#NCks_h̷iʮhCyUW``@t]q>q^zT !qť4x/`S{pp3y:{Itԍ \+%bu~7^|y5:B8E =Pm[gwlMxLl Arl&fv[FrUkf 01 NLhtP)z2b&P2L+́UQiD?Tgg o6A.ZjdYIlZtew={-c3tڟ?x64d~F?Xs$bh= Xl8l9θp`+}ɹ5)i$}땏x]U= [X\3& %8F<PQ9.8DaT0/hWu:,دfݙj,6ɛ*-n\duꞺP팠Qq^x2-Ʋ mTltPG=oζtc6ނ`˯!FQB ҳ֢%bO畛7(6'"\p`ɉYDg?>%`%NϪP{1q"UPLog-g恴 zKhU&wdF 4%tm 2^ rL5h=&cYsNiy@ 6"6fkŤb(ܫ0 lkZP2G-Vf йr], \S12υ1 ܉( %78NǴNP{:OA:͋@ ЧN$0mmr`8 \x(j($"P`HLm qHy (ZR;{ Y SB;~? l;@,Z4-nM#|QpO;'Ŷe'B<SouxU< {z\I xr#&TL"_1)Kc>{z(lqY}z7 !@0-/WC2\NHA8arbrCA1aݠpܠQܠ`ů3q 7(7 JiBZ糑FuA:,s~5n)dw+Be.St(ARԫb v:MUE'}PD+B!d'j|)y{l3s3g:K̫^BnaҰ4/\bDL.%Q\QLRh嗀Czƹ+?h%uz;u?O;XRIʵCzte9?MK[F mұ*C"JW$s/r]o .}=wYZ}WXZKu5v4eߕּJ?TQ2E DviܫZ+\޻QI2yv U69Ni϶ MHUEi/n". ;n{ Lګ[9nlbXg&J'Fр%40&8daLg,.ҢbryXl5*8vuHчyB,.4&s:KԸ XL :GaK*~ tGaK2@= [PrQ$Mz=j\. Nz l+ 63$# fdu4#|Q$Q}yBdw-rDzG1\=JJy x.T̡2*<߲QscV rƊ2.;,yftUt`8U5s=[ Ч,gS%L7wZd~0dXQ_cY#cQƚXx/dU,1`cYck."\X+>XƗδC$M]Mo VwJǽ};0?V|(0x y_tׄ3J/ Ӭ.,/mrMZH0a`vkNNkJp%t.,a8&endstream endobj 662 0 obj << /Filter /FlateDecode /Length 2348 >> stream x[Ys~_ K~,7UU#_k&y\..EJLߞ)W҃ o{8d%lx7xxw J<N>ܗRնR'un3b%rh,,-?}s~wUU%>{Oa@ߔ-6w &Co1ADiA!h/x8߻u Lj^r=TҺ$`sϝ/*/1fxJRcN -wҿx-gz2BӅ+(n9Is@IZwBBE%;%3gΘè޳Q',&k^[gX tѪVaw*m e5 ꢒZY`vze"f1Xolu5J4XvEÌ SB^VfXR Rq%c7wDgY,bM^["7#e",Ԑ%k񏰴9X[)VӪ"Z/ca% \ѷy Pi9 hn(ΫH0GMݒP|M$v ɒ+󶧬4{_;9Q).^E%2^dQM qj#b!JT_SfwD|\m2j\^==gt%A aʼn xW65Z< @Ȓ7MbPEc)s7t56hpIДb,"?UJHLl0-?P ylW}26M"hKB)dp7(K9xN?s2_|ƺ`pv`S?#HxuNw<+8sJ.YxnWq>/8cE=UAOz{0r5ň-L-lqwyA8l0Qq6>g4\7MI&hRw MYô9^\;`i桙uvW}i- Q^h,FisZ9]HyLKo~4cBZ7K{4t"ɐP2r a4ercx^,,KU<tQ _]p^vى-:*{4 O^ SzTmOcl"<5U|)tk$E7SBɢ ozlћ~ j-9H'C+#X#\8Q"U>;H>4=IsƷ:[")]`*s-8IQ~oFa.}=Z}_?6@l7ͩcU׋e @}]q!GO9^3~w>PLR|i۴WMIyTu㦦!JA1c>+qyhhcg0_I!v~Z u դD1 9Hڌ^U!Xg.`s^e|1lJT6՚1'))A#nFcG22>8NJ‰#5SU[sX̞m2 Ϧl:RYT= 0t ,y D- 4di¸Ry!Z-+ Q\Fjb|Ày/:Y@d㴝ם&#n_ ~" $s`؇׮!< oWi;by[Fm)RQݴT݂B k$u \ wY)K~]o`YTy}r/Pڗul9՗Y8{Sl5ÆB&-370&Gc#;)ouT?m  {enendstream endobj 663 0 obj << /Filter /FlateDecode /Length 2465 >> stream xZYo~ߐ@>uwp5l -9琧[}dь +=hWEV}dlL_㈅l=tQ(vacF 5GD?Иq[[VHc}|tNOuXiB Αf(|r&,(Y9i-'g4ՄC-YM03L^8ȻMFBVTYf5t};.o'YҧZO8hkazՔ V >6H IDž"T R!n/.]Ei:u-5jw92֟LŒԮ0Mw ){cw`,BJŜg&gZPPZ9frQZmN`⠍FB`2 4O_1eoXmnuln|]p龕US',='׻ j,vus1%10=iRAn`p5_naᙢɫ QC[la؇IRIMs+AT<-1L[q]a2D HfI>͑2E+! AsK:7ժ|jR`Tc>Of PAURn%l'܂Ҁ{$.thM*V? P"&,J7oVneB*In("Hz 2\>IޛUuGF@Jwy;`yU>f,:nG{k fb_Ò\b=K hRc gms4)=N`7g-UUONv@OW7H2-W7`c%nVnrh\-"_`7ݏwqrPB;{#5 NV1oZzF e^-pu GPpNP}ЂۯR fmd@zc;` 0ys6XҺ:B2)G@]# ?NqX.NuNNfM}}göL{i5IIu>lQf-62Vc?@֏݈}k<˴w p2,X,Ӝٹמּ\U&mhҪPչ'4SRu{7uwԄ b)+I,Gp#}Z=% NxlY/}@1}AKp6a, +4AW6M3@>sMϞor/4/MDvꋮ%Ղ[ڊ4[]]<ҥay:,)Ӕ+_T3\8* ~g,eFpw8u0TW P%crHɪwZ |-MslLw>o/,ԹDib<{dt_w2f ĩђ|wpUja]f =p8<-3̈'K-s395ДM e T/+pg$)Mʍm#UZ+y22('m_$c1BHVdʧy+7ڲM#g| 4NMlV.xbXF;ZsGLDSMO҆B.[u-DYbSwZXde+uZ ԗJ`6 UsBhJveהY8MeN+`p_FeN#fQ*Brx2 Ah>O:ՇӺ^4WL m1{zS00ɻfބh2E-%7/2NL+1|% 宭aT'ð 9'w@:l\r-Whn1{wGIo;TM+cZ C|;}H^| bo~]؏cH2Bt~ZI`8V,endstream endobj 664 0 obj << /Filter /FlateDecode /Length 1251 >> stream xWK6/(P|?g $:aS-{X#iwߡ$ʤ[IQ`C㛙/)4%3}KBtZUervI-lrwhʨŜTK-JӶ&kJ,*^K+Ap]?tP;^ Mt'`ZO)C*7a0  -?%/(eznmLbS4R!ڤTQH"}.E0Sjj#&`̘ty,r !Ѫov[ԫmJLC,n?&Pp/IޗMe6gK:KOiN~M*·%ºlsM#z]U?fق)&g٪ifnIro"FF` `iFۢR ]]2$='`q(j$ |fAn&B̪>r*eȨ}AӼo hB4 p26 Ga e:SC6gKz?n ^q53 x5L+Fb,ڢFHFc `eDu0 OBZ(B`lD}$Zح@F6S &8뻉By)X"똛NB]YD[)BBա+:8Ɗ K? A ѳ0qec~;hnov}هHъ[[~ɌC*@ G/(կ' 8=MX ӣ@Fg*#a7Ňl:.~n]T!QXKУ<ٕu)utӄ3ىXP+K[أY`T~PvR_kc*> /W [ 1 3 1 ] /Info 3 0 R /Root 2 0 R /Size 666 /ID [<6bb141796094f797eb94f3f10989abda>] >> stream x?(q?q?Ur2H,Jf&eR6%$7\EIX ue$}?Qnç<ޯcsl 7Q647Do{rxɰz/ ݼV̤\tj\dXKrQڸȰzE{."ÿ2/Vhܒn 1CGb3 ԭ!Jl,-ND{UfŚ~ofNSnv2aNDg%x>p/ ,s|^i^m0P9AfĖ=!&Cbd ;͹dwBm^/j:(7 ή.{q;51I) 2ځwK>pF_PI[?jJc endstream endobj startxref 288706 %%EOF systemfit/inst/doc/systemfit.bib0000755000176200001440000002025111657237035016544 0ustar liggesusers% BibTeX bibliography file @Book{anselin88, author = {Luc Anselin}, title = {Spatial Econometrics: Methods and Models}, year = {1988}, publisher = {Kluwer Academic}, address = {Dordrecht} } @Article{bates04, author = {Douglas Bates}, title = {Least Squares Calculations in {R}}, journal = {R News}, year = {2004}, month = {June}, volume = {4}, number = {1}, pages = {17-20}, URL = {http://CRAN.R-project.org/doc/Rnews/} } @InCollection{buckheit95, author = {Buckheit, J. and Donoho, D. L.}, title = {Wavelab and Reproducible Research}, booktitle = {Wavelets and Statistics}, editor = {Antoniadis, A}, year = {1995}, publisher = {Springer} } @Misc{cummins01, author = {Clint Cummins}, title = {Different Versions of {Grunfeld} Dataset}, year = {2001}, URL = {http://www.stanford.edu/~clint/bench/grunfeld.htm} } @Book{fox02a, author = {John Fox}, title = {An {R} and {S-Plus} Companion to Applied Regression}, year = {2002}, publisher = {SAGE Publications Ltd}, address = {Thousand Oaks} } @Book{greene03, author = {William H. Greene}, title = {Econometric Analysis}, edition = {5th}, year = {2003}, publisher = {Prentice Hall} } @Misc{greene06, author = {William H. Greene}, title = {Information about {SUR} Estimation in {LIMDEP}}, year = {2006}, howpublished = {Personal email on 2006/02/16} } @Misc{greene06a, author = {William H. Greene}, title = {Errata and Discussion to Econometric Analysis, 5th edition}, year = {2006}, URL = {http://pages.stern.nyu.edu/~wgreene/Text/Errata/ERRATA5.htm} } @PhdThesis{grunfeld58, author = {Y. Grunfeld}, title = {The Determinants of Corporate Investment}, year = {1958}, school = {University of Chicago} } @Article{hausman78, author = {Jerry A. Hausman}, title = {Specification Test in Econometrics}, journal = {Econometrica}, year = {1978}, volume = {46}, number = {6}, pages = {1251-1272} } @Article{henningsen07a, author = {Arne Henningsen and Jeff D. Hamann}, title = {{systemfit}: A Package for Estimating Systems of Simultaneous Equations in {R}}, journal = {Journal of Statistical Software}, year = {2007}, volume = {23}, number = {4}, pages = {1-40}, URL = {http://www.jstatsoft.org/v23/i04/} } @Book{judge82, author = {Judge, George G. and Hill, R. Carter and Griffiths, William and L{\"u}tkepohl, Helmut and Lee, Tsoung-Chao}, title = {Introduction to the Theory and Practice of Econometrics}, year = {1982}, publisher = {John Wiley and Sons}, address = {New York} } @Book{judge85, author = {George G. Judge and W. E. Griffiths and R. Carter Hill and Helmut L{\"u}tkepohl and Tsoung-Chao Lee}, title = {The Theory and Practice of Econometrics}, edition = {2nd}, year = {1985}, publisher = {John Wiley and Sons}, address = {New York} } @Book{klein50, author = {L. Klein}, title = {Economic Fluctuations in the United States, 1921--1941}, year = {1950}, publisher = {John Wiley}, address = {New York} } @Book{kmenta86, author = {Jan Kmenta}, title = {Elements of Econometrics}, edition = {2}, year = {1986}, publisher = {Macmillan}, address = {New York} } @Article{mcelroy77, author = {Marjorie B. McElroy}, title = {Goodness of Fit for Seemingly Unrelated Regressions}, journal = {Journal of Econometrics}, year = {1977}, volume = {6}, pages = {381-387} } @Book{paelinck79, author = {Jean H. P. Paelinck and Leo H. Klaassen}, title = {Spatial Econometrics}, year = {1979}, publisher = {Saxon House}, address = {Farnborough} } @Article{parks67, author = {Richard W. Parks}, title = {Efficient Estimation of a System of Regression Equations when Disturbances are both Serially and Contemporaneously Correlated}, journal = {Journal of the American Statistical Association}, year = {1967}, volume = {62}, number = {318}, pages = {500-509}, abstract = {This paper considers the problem of obtaining efficient estimates for the parameters of a system of M regression equations. The disturbance terms of this system are assumed to be related by both serial and contemporaneous correlation. Under the further assumption that the serial correlation is a first order autoregressive process, the paper develops an estimator that is consistent and has the same asymptotic normal distribution as the Aitken estimator which assumes the covariance matrix to be known. The paper concludes with a discussion of some alternative covariance specifications and points out certain difficulties with the standard single equation procedures for handling autoregressive schemes.} } @Manual{r-car-1.2-1, author = {John Fox}, title = {{car}: Companion to Applied Regression}, year = {2006}, note = {{R} package version 1.2-1}, URL = {http://CRAN.R-project.org/} } @Manual{r-Ecdat-0.1-5, author = {Yves Croissant}, title = {{Ecdat}: Data Sets for Econometrics}, year = {2006}, note = {{R} package version 0.1-5}, URL = {http://CRAN.R-project.org/} } @Article{r-lmtest, author = {Achim Zeileis and Torsten Hothorn}, title = {Diagnostic Checking in Regression Relationships}, journal = {R News}, year = {2002}, volume = {2}, number = {3}, pages = {7--10}, URL = {http://CRAN.R-project.org/doc/Rnews/} } @Manual{r-matrix-07, author = {Douglas Bates and Martin Maechler}, title = {Matrix: A Matrix Package for {R}}, year = {2007}, note = {{R} package version 0.99875-2}, URL = {http://CRAN.R-project.org/} } @Manual{r-plm-0.3-1, author = {Yves Croissant and Giovanni Millo}, title = {\pkg{plm}: Linear Models for Panel Data}, year = {2007}, note = {\proglang{R} package version 0.3-1}, URL = {http://CRAN.R-project.org/} } @Manual{r-project-07, author = {{R~Development Core Team}}, title = {R:~A Language and Environment for Statistical Computing}, year = {2007}, organization = {R~Foundation for Statistical Computing}, address = {Vienna, Austria}, note = {{ISBN} 3-900051-07-0}, URL = {http://www.R-project.org/} } @Manual{r-sem-2.0, author = {John Fox}, title = {{sem}: Structural Equation Models}, year = {2011}, note = {{R} package version 2.0}, URL = {http://CRAN.R-project.org/} } @Article{schmidt77, author = {Peter Schmidt}, title = {Estimation of Seemingly Unrelated Regressions with Unequal Numbers of Observations}, journal = {Journal of Econometrics}, year = {1977}, volume = {5}, pages = {365-377} } @Article{schmidt90, author = {Peter Schmidt}, title = {Three-Stage Least Squares with Different Instruments for Different Equations}, journal = {Journal of Econometrics}, year = {1990}, volume = {43}, pages = {389-394} } @Article{schwab00, author = {Matthias Schwab and Martin Karrenbach and Jon Claerbout}, title = {Making Scientific Computations Reproducible}, journal = {Computing in Science \& Engineering}, year = {2000}, volume = {2}, number = {6}, pages = {61-67} } @Book{srivastava87, author = {Virenda K. Srivastava and David E. A. Giles}, title = {Seemingly Unrelated Regression Equations Models}, year = {1987}, publisher = {Marcel Dekker, Inc.}, address = {New York} } @Book{theil71, author = {H. Theil}, title = {Principles of Econometrics}, year = {1971}, publisher = {Wiley, New York} } @Article{zellner62, author = {Arnold Zellner}, title = {An Efficient Method of Estimating Seemingly Unrelated Regressions and Tests for Aggregation Bias}, journal = {Journal of the American Statistical Association}, year = {1962}, volume = {57}, pages = {348-368} } @Article{zellner62b, author = {Arnold Zellner and H. Theil}, title = {Three-Stage Least Squares: Simultaneous Estimation of Simultaneous Equations}, journal = {Econometrica}, year = {1962}, volume = {30}, number = {1}, pages = {54-78} } @Article{zellner62c, author = {Arnold Zellner and D. S. Huang}, title = {Further Properties of Efficient Estimators for Seemingly Unrelated Regression Equations}, journal = {International Economic Review}, year = {1962}, volume = {3}, number = {3}, pages = {300-313} } @Book{zivot06, author = {Eric Zivot and Jiahui Wang}, title = {Modeling Financial Time Series with {S-PLUS}}, edition = {2nd}, year = {2006}, publisher = {Springer}, address = {New York} } systemfit/inst/doc/systemfit.R0000644000176200001440000003244314406577560016221 0ustar liggesusers## ----include=FALSE------------------------------------------------------------ library(knitr) opts_chunk$set( engine='R' ) ## ----echo=FALSE--------------------------------------------------------------- options( prompt = "R> ", ctinue = "+ " ) ## ----eval=FALSE--------------------------------------------------------------- # sigmaInv <- solve( residCov ) # xtOmegaInv <- crossprod( xMat, kronecker( sigmaInv, Diagonal( nObs ) ) ) # coef <- solve( xtOmegaInv %*% xMat, xtOmegaInv %*% yVec ) ## ----message=FALSE------------------------------------------------------------ library( "systemfit" ) data( "Kmenta" ) attach( Kmenta ) eqDemand <- consump ~ price + income eqSupply <- consump ~ price + farmPrice + trend eqSystem <- list( demand = eqDemand, supply = eqSupply ) fitols <- systemfit( eqSystem ) print( fitols ) ## ----------------------------------------------------------------------------- fitsur <- systemfit( eqSystem, method = "SUR" ) ## ----------------------------------------------------------------------------- fit3sls <- systemfit( eqSystem, method = "3SLS", inst = ~ income + farmPrice + trend ) fit3sls2 <- systemfit( eqSystem, method = "3SLS", inst = list( ~ farmPrice + trend, ~ income + farmPrice + trend ) ) ## ----------------------------------------------------------------------------- fitsur <- systemfit( eqSystem, method = "SUR", data = Kmenta ) ## ----tidy=FALSE--------------------------------------------------------------- restrict <- "demand_price + supply_farmPrice = 0" fitsurRmat <- systemfit(eqSystem, method = "SUR", restrict.matrix = restrict) ## ----tidy=FALSE--------------------------------------------------------------- Rmat <- matrix(0, nrow = 1, ncol = 7) Rmat[1, 2] <- 1 Rmat[1, 6] <- 1 qvec <- c(0) fitsurRmatNum <- systemfit(eqSystem, method = "SUR", restrict.matrix = Rmat, restrict.rhs = qvec) ## ----tidy=FALSE--------------------------------------------------------------- modRegMat <- matrix(0, nrow = 7, ncol = 6) modRegMat[1:5, 1:5] <- diag(5) modRegMat[6, 2] <- -1 modRegMat[7, 6] <- 1 fitsurRegMat <- systemfit(eqSystem, method = "SUR", restrict.regMat = modRegMat) ## ----------------------------------------------------------------------------- all.equal( coef( fitsurRmat ), coef( fitsurRmatNum ) ) all.equal( coef( fitsurRmat ), coef( fitsurRegMat ) ) ## ----------------------------------------------------------------------------- fitsurit <- systemfit( eqSystem, method = "SUR", maxiter = 500 ) ## ----------------------------------------------------------------------------- summary( fitsur ) ## ----------------------------------------------------------------------------- summary( fitsur, residCov = FALSE, equations = FALSE ) ## ----message=FALSE,eval = requireNamespace("plm", quietly = TRUE)------------- ### this code chunk is evaluated only if the 'plm' package is available data( "GrunfeldGreene" ) library( "plm" ) GGPanel <- pdata.frame( GrunfeldGreene, c( "firm", "year" ) ) greeneSur <- systemfit( invest ~ value + capital, method = "SUR", data = GGPanel ) ## ----eval = requireNamespace("plm", quietly = TRUE)--------------------------- ### this code chunk is evaluated only if the 'plm' package is available greeneSurPooled <- systemfit( invest ~ value + capital, method = "SUR", data = GGPanel, pooled = TRUE ) ## ----------------------------------------------------------------------------- linearHypothesis( fitsur, Rmat, qvec, test = "FT" ) linearHypothesis( fitsur, Rmat, qvec, test = "F" ) linearHypothesis( fitsur, Rmat, qvec, test = "Chisq" ) lrtest( fitsurRmat, fitsur ) ## ----------------------------------------------------------------------------- fit2sls <- systemfit( eqSystem, method = "2SLS", inst = ~ income + farmPrice + trend, data = Kmenta ) fit3sls <- systemfit( eqSystem, method = "3SLS", inst = ~ income + farmPrice + trend, data = Kmenta ) hausman.systemfit( fit2sls, fit3sls ) ## ----echo=FALSE--------------------------------------------------------------- hausmantest <- hausman.systemfit( fit2sls, fit3sls ) ## ----echo=FALSE--------------------------------------------------------------- library( "systemfit" ) ## ----results='hide'----------------------------------------------------------- data( "Kmenta" ) eqDemand <- consump ~ price + income eqSupply <- consump ~ price + farmPrice + trend inst <- ~ income + farmPrice + trend system <- list( demand = eqDemand, supply = eqSupply ) ## ----results='hide'----------------------------------------------------------- fitOls <- systemfit( system, data = Kmenta ) round( coef( summary( fitOls ) ), digits = 4 ) ## ----results='hide'----------------------------------------------------------- fit2sls <- systemfit( system, method = "2SLS", inst = inst, data = Kmenta ) round( coef( summary( fit2sls ) ), digits = 4 ) ## ----results='hide'----------------------------------------------------------- fit3sls <- systemfit( system, method = "3SLS", inst = inst, data = Kmenta ) round( coef( summary( fit3sls ) ), digits = 4 ) ## ----results='hide'----------------------------------------------------------- fitI3sls <- systemfit( system, method = "3SLS", inst = inst, data = Kmenta, maxit = 250 ) round( coef( summary( fitI3sls ) ), digits = 4 ) ## ----------------------------------------------------------------------------- data( "KleinI" ) eqConsump <- consump ~ corpProf + corpProfLag + wages eqInvest <- invest ~ corpProf + corpProfLag + capitalLag eqPrivWage <- privWage ~ gnp + gnpLag + trend inst <- ~ govExp + taxes + govWage + trend + capitalLag + corpProfLag + gnpLag system <- list( Consumption = eqConsump, Investment = eqInvest, PrivateWages = eqPrivWage ) ## ----results='hide'----------------------------------------------------------- kleinOls <- systemfit( system, data = KleinI ) round( coef( summary( kleinOls ) ), digits = 3 ) ## ----results='hide'----------------------------------------------------------- klein2sls <- systemfit( system, method = "2SLS", inst = inst, data = KleinI, methodResidCov = "noDfCor" ) round( coef( summary( klein2sls ) ), digits = 3 ) ## ----results='hide'----------------------------------------------------------- klein3sls <- systemfit( system, method = "3SLS", inst = inst, data = KleinI, methodResidCov = "noDfCor" ) round( coef( summary( klein3sls ) ), digits = 3 ) ## ----results='hide'----------------------------------------------------------- kleinI3sls <- systemfit( system, method = "3SLS", inst = inst, data = KleinI, methodResidCov = "noDfCor", maxit = 500 ) round( coef( summary( kleinI3sls ) ), digits = 3 ) ## ----message=FALSE,eval = requireNamespace("plm", quietly = TRUE)------------- ### this code chunk is evaluated only if the 'plm' package is available data( "GrunfeldGreene" ) library( "plm" ) GGPanel <- pdata.frame( GrunfeldGreene, c( "firm", "year" ) ) formulaGrunfeld <- invest ~ value + capital ## ----results='hide',eval = requireNamespace("plm", quietly = TRUE)------------ ### this code chunk is evaluated only if the 'plm' package is available greeneOls <- systemfit( formulaGrunfeld, data = GGPanel ) round( coef( summary( greeneOls ) ), digits = 4 ) round( sapply( greeneOls$eq, function(x){return(summary(x)$ssr/20)} ), digits = 3 ) ## ----results='hide',eval = requireNamespace("plm", quietly = TRUE)------------ ### this code chunk is evaluated only if the 'plm' package is available greeneOlsPooled <- systemfit( formulaGrunfeld, data = GGPanel, pooled = TRUE ) round( coef( summary( greeneOlsPooled$eq[[1]] ) ), digits = 4 ) #$ sum( sapply( greeneOlsPooled$eq, function(x){return(summary(x)$ssr)}) )/100 ## ----results='hide',eval = requireNamespace("plm", quietly = TRUE)------------ ### this code chunk is evaluated only if the 'plm' package is available greeneSur <- systemfit( formulaGrunfeld, method = "SUR", data = GGPanel, methodResidCov = "noDfCor" ) round( coef( summary( greeneSur ) ), digits = 4 ) round( greeneSur$residCov, digits = 3 ) #$ round( summary( greeneSur )$residCor, digits = 3 ) #$ ## ----results='hide',eval = requireNamespace("plm", quietly = TRUE)------------ ### this code chunk is evaluated only if the 'plm' package is available greeneSurPooled <- systemfit( formulaGrunfeld, method = "SUR", data = GGPanel, pooled = TRUE, methodResidCov = "noDfCor", residCovWeighted = TRUE ) round( coef( summary( greeneSurPooled$eq[[1]] ) ), digits = 4 ) #$ round( greeneSurPooled$residCov, digits = 3 ) #$ round( cov( residuals( greeneSurPooled ) ), digits = 3 ) round( summary( greeneSurPooled )$residCor, digits = 3 ) #$ ## ----eval = requireNamespace("plm", quietly = TRUE)--------------------------- ### this code chunk is evaluated only if the 'plm' package is available GrunfeldTheil <- subset( GrunfeldGreene, firm %in% c( "General Electric", "Westinghouse" ) ) GTPanel <- pdata.frame( GrunfeldTheil, c( "firm", "year" ) ) formulaGrunfeld <- invest ~ value + capital ## ----results='hide',eval = requireNamespace("plm", quietly = TRUE)------------ ### this code chunk is evaluated only if the 'plm' package is available theilOls <- systemfit( formulaGrunfeld, data = GTPanel ) round( coef( summary( theilOls ) ), digits = 3 ) ## ----results='hide',eval = requireNamespace("plm", quietly = TRUE)------------ ### this code chunk is evaluated only if the 'plm' package is available theilSur <- systemfit( formulaGrunfeld, method = "SUR", data = GTPanel, methodResidCov = "noDfCor" ) round( coef( summary( theilSur ) ), digits = 3 ) ## ----results='hide',eval = requireNamespace("plm", quietly = TRUE)------------ ### this code chunk is evaluated only if the 'plm' package is available RMatrix <- rbind( c( 0, 1, 0, 0, -1, 0 ), c( 0, 0, 1, 0, 0, -1 ) ) linearHypothesis( theilSur, RMatrix ) ## ----results='hide',tidy=FALSE,eval = requireNamespace("plm", quietly = TRUE)---- ### this code chunk is evaluated only if the 'plm' package is available theilSurRestr <- systemfit(formulaGrunfeld, method = "SUR", data = GTPanel, methodResidCov = "noDfCor", restrict.matrix = RMatrix, residCovRestricted = FALSE) round(coef(summary(theilSurRestr)), digits = 3) ## ----message=FALSE------------------------------------------------------------ library( "systemfit" ) set.seed( 1 ) systemfitModel <- createSystemfitModel( nEq = 8, nReg = 10, nObs = 750 ) system.time( fitMatrix <- systemfit( systemfitModel$formula, method = "SUR", data = systemfitModel$data ) ) system.time( fitTrad <- systemfit( systemfitModel$formula, method = "SUR", data = systemfitModel$data, useMatrix = FALSE ) ) all.equal( fitMatrix, fitTrad ) ## ----------------------------------------------------------------------------- smallModel <- createSystemfitModel( nEq = 3, nReg = 4, nObs = 50 ) system.time( fitSmallMatrix <- systemfit( smallModel$formula, method = "SUR", data = smallModel$data, maxit = 500 ) ) system.time( fitSmallTrad <- systemfit( smallModel$formula, method = "SUR", data = smallModel$data, maxit = 500, useMatrix = FALSE ) ) all.equal( fitSmallMatrix, fitSmallTrad ) ## ----echo=FALSE---------------------------------------------------------- options( width = 75 ) ## ----message=FALSE,eval = requireNamespace("sem", quietly = TRUE)-------- ### this code chunk is evaluated only if the 'sem' package is available library( "sem" ) library( "systemfit" ) data( "KleinI" ) ## ----tidy=FALSE,eval = requireNamespace("sem", quietly = TRUE)----------- ### this code chunk is evaluated only if the 'sem' package is available limlRam <- matrix(c( "consump <- corpProf", "consump_corpProf", NA, "consump <- corpProfLag", "consump_corpProfLag", NA, "consump <- wages", "consump_wages", NA, "invest <- corpProf", "invest_corpProf", NA, "invest <- corpProfLag", "invest_corpProfLag", NA, "invest <- capitalLag", "invest_capitalLag", NA, "privWage <- gnp", "privWage_gnp", NA, "privWage <- gnpLag", "privWage_gnpLag", NA, "privWage <- trend", "privWage_trend", NA, "consump <-> consump", "s11", NA, "privWage <-> privWage", "s22", NA, "invest <-> invest", "s33", NA), ncol = 3, byrow = TRUE) class(limlRam) <- "mod" exogVar <- c("corpProf", "corpProfLag", "wages", "capitalLag", "trend", "gnp", "gnpLag") endogVar <- c("consump", "invest", "privWage") allVar <- c(exogVar, endogVar) limlResult <- sem(model = limlRam, S = cov(KleinI[ -1, allVar ]), N = (nrow(KleinI) - 1), fixed.x = exogVar) print(limlResult) ## ----tidy=FALSE---------------------------------------------------------- eqConsump <- consump ~ corpProf + corpProfLag + wages eqInvest <- invest ~ corpProf + corpProfLag + capitalLag eqPrivWage <- privWage ~ gnp + gnpLag + trend system <- list(consump = eqConsump, invest = eqInvest, privWage = eqPrivWage) olsResult <- systemfit(system, data = KleinI) print(olsResult) ## ----tidy=FALSE,eval = requireNamespace("sem", quietly = TRUE)----------- ### this code chunk is evaluated only if the 'sem' package is available fimlRam <- rbind(limlRam, c("consump <-> invest", "s12", NA), c("consump <-> privWage", "s13", NA), c("privWage <-> invest", "s23", NA)) class(fimlRam) <- "mod" fimlResult <- sem(model = fimlRam, S = cov(KleinI[ -1, allVar ]), N = (nrow(KleinI) - 1), fixed.x = exogVar) print(fimlResult) ## ------------------------------------------------------------------------ surResult <- systemfit( system, method = "SUR", data = KleinI, methodResidCov = "noDfCor", maxit = 500 ) print( surResult ) systemfit/inst/CITATION0000644000176200001440000000157014406573740014430 0ustar liggesuserscitHeader("To cite systemfit in publications use:") bibentry( bibtype = "Article", title = paste( "systemfit: A Package for Estimating Systems", "of Simultaneous Equations in R" ), author = c( person( "Arne", "Henningsen" ), person( c( "Jeff", "D." ), "Hamann" ) ), journal = "Journal of Statistical Software", year = "2007", volume = "23", number = "4", pages = "1--40", url = "https://www.jstatsoft.org/v23/i04/", textVersion = paste( "Arne Henningsen and Jeff D. Hamann (2007).", "systemfit: A Package for Estimating Systems", "of Simultaneous Equations in R.", "Journal of Statistical Software 23(4), 1-40.", "URL https://www.jstatsoft.org/v23/i04/." ) )