R : Copyright 2005, The R Foundation for Statistical Computing Version 2.1.1 (2005-06-20), ISBN 3-900051-07-0 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 a HTML browser interface to help. Type 'q()' to quit R. > ### *
> ### > attach(NULL, name = "CheckExEnv") > assign(".CheckExEnv", as.environment(2), pos = length(search())) # base > ## add some hooks to label plot pages for base and grid graphics > setHook("plot.new", ".newplot.hook") > setHook("persp", ".newplot.hook") > setHook("grid.newpage", ".gridplot.hook") > > assign("cleanEx", + function(env = .GlobalEnv) { + rm(list = ls(envir = env, all.names = TRUE), envir = env) + RNGkind("default", "default") + set.seed(1) + options(warn = 1) + delayedAssign("T", stop("T used instead of TRUE"), + assign.env = .CheckExEnv) + delayedAssign("F", stop("F used instead of FALSE"), + assign.env = .CheckExEnv) + sch <- search() + newitems <- sch[! sch %in% .oldSearch] + for(item in rev(newitems)) + eval(substitute(detach(item), list(item=item))) + missitems <- .oldSearch[! .oldSearch %in% sch] + if(length(missitems)) + warning("items ", paste(missitems, collapse=", "), + " have been removed from the search path") + }, + env = .CheckExEnv) > assign("..nameEx", "__{must remake R-ex/*.R}__", env = .CheckExEnv) # for now > assign("ptime", proc.time(), env = .CheckExEnv) > grDevices::postscript("systemfit-Examples.ps") > assign("par.postscript", graphics::par(no.readonly = TRUE), env = .CheckExEnv) > options(contrasts = c(unordered = "contr.treatment", ordered = "contr.poly")) > options(warn = 1) > library('systemfit') > > assign(".oldSearch", search(), env = .CheckExEnv) > assign(".oldNS", loadedNamespaces(), env = .CheckExEnv) > cleanEx(); ..nameEx <- "coef.systemfit" > > ### * coef.systemfit > > flush(stderr()); flush(stdout()) > > ### Name: coef.systemfit > ### Title: Coefficients of systemfit object > ### Aliases: coef.systemfit > ### Keywords: models > > ### ** Examples > > ## Not run: library( systemfit ) > > data( kmenta ) > attach( kmenta ) > demand <- q ~ p + d > supply <- q ~ p + f + a > labels <- list( "demand", "supply" ) > system <- list( demand, supply ) > > ## perform OLS on each of the equations in the system > fitols <- systemfit( "OLS", system, labels ) > > ## print the coefficients > coef( fitols ) eq 1 (Intercept) eq 1 p eq 1 d eq 2 (Intercept) 99.8954229 -0.3162988 0.3346356 58.2754312 eq 2 p eq 2 f eq 2 a 0.1603666 0.2481333 0.2483023 > > > > cleanEx(); ..nameEx <- "coef.systemfit.equation" > > ### * coef.systemfit.equation > > flush(stderr()); flush(stdout()) > > ### Name: coef.systemfit.equation > ### Title: Coefficients of systemfit equation > ### Aliases: coef.systemfit.equation > ### Keywords: models > > ### ** Examples > > ## Not run: library( systemfit ) > > data( kmenta ) > attach( kmenta ) > demand <- q ~ p + d > supply <- q ~ p + f + a > labels <- list( "demand", "supply" ) > system <- list( demand, supply ) > > ## perform OLS on each of the equations in the system > fitols <- systemfit( "OLS", system, labels ) > > ## print the coefficients of the first equation > coef( fitols$eq[[1]] ) (Intercept) p d 99.8954229 -0.3162988 0.3346356 > > ## print the coefficients of the second equation > coef( fitols$eq[[2]] ) (Intercept) p f a 58.2754312 0.1603666 0.2481333 0.2483023 > > > > cleanEx(); ..nameEx <- "confint.systemfit" > > ### * confint.systemfit > > flush(stderr()); flush(stdout()) > > ### Name: confint.systemfit > ### Title: Confidence intervals of coefficients > ### Aliases: confint.systemfit > ### Keywords: models regression > > ### ** Examples > > ## Not run: library( systemfit ) > > data( kmenta ) > attach( kmenta ) > demand <- q ~ p + d > supply <- q ~ p + f + a > labels <- list( "demand", "supply" ) > system <- list( demand, supply ) > > ## perform OLS on each of the equations in the system > fitols <- systemfit( "OLS", system, labels ) > > ## print the confidence interval of the coefficients > confint( fitols ) 2.5 % 97.5 % eq 1 (Intercept) 84.031 115.760 eq 1 p -0.508 -0.125 eq 1 d 0.239 0.430 eq 2 (Intercept) 33.975 82.576 eq 2 p -0.041 0.362 eq 2 f 0.150 0.346 eq 2 a 0.042 0.455 > > > > cleanEx(); ..nameEx <- "confint.systemfit.equation" > > ### * confint.systemfit.equation > > flush(stderr()); flush(stdout()) > > ### Name: confint.systemfit.equation > ### Title: Confidence intervals of coefficients > ### Aliases: confint.systemfit.equation > ### Keywords: models regression > > ### ** Examples > > ## Not run: library( systemfit ) > > data( kmenta ) > attach( kmenta ) > demand <- q ~ p + d > supply <- q ~ p + f + a > labels <- list( "demand", "supply" ) > system <- list( demand, supply ) > > ## perform OLS on each of the equations in the system > fitols <- systemfit( "OLS", system, labels ) > > ## print the confidence interval of the coefficients of the first equation > confint( fitols$eq[[1]] ) 2.5 % 97.5 % (Intercept) 84.031 115.760 p -0.508 -0.125 d 0.239 0.430 > > ## print the confidence interval of the coefficients of the second equation > confint( fitols$eq[[2]] ) 2.5 % 97.5 % (Intercept) 33.975 82.576 p -0.041 0.362 f 0.150 0.346 a 0.042 0.455 > > > > cleanEx(); ..nameEx <- "correlation.systemfit" > > ### * correlation.systemfit > > flush(stderr()); flush(stdout()) > > ### Name: correlation.systemfit > ### Title: Correlation between Predictions from Equation i and j > ### Aliases: correlation.systemfit > ### Keywords: models > > ### ** Examples > > ## Not run: library( systemfit ) > > data( kmenta ) > attach( kmenta ) > demand <- q ~ p + d > supply <- q ~ p + f + a > inst <- ~ d + f + a > labels <- list( "demand", "supply" ) > system <- list( demand, supply ) > > ## perform 2SLS on each of the equations in the system > fit2sls <- systemfit( "2SLS", system, labels, inst) > print( fit2sls ) systemfit results method: 2SLS N DF SSR MSE RMSE R2 Adj R2 demand 20 17 65.7291 3.86642 1.96632 0.754847 0.726005 supply 20 16 96.6332 6.03958 2.45756 0.639582 0.572004 The covariance matrix of the residuals demand supply demand 3.86642 4.35744 supply 4.35744 6.03958 The correlations of the residuals demand supply demand 1.000000 0.901724 supply 0.901724 1.000000 The determinant of the residual covariance matrix: 4.36424 OLS R-squared value of the system: 0.697214 2SLS estimates for demand (equation 1 ) Model Formula: q ~ p + d Instruments: ~d + f + a Estimate Std. Error t value Pr(>|t|) (Intercept) 94.633304 7.920838 11.947385 0 *** p -0.243557 0.096484 -2.524313 0.021832 * d 0.313992 0.046944 6.688695 4e-06 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.966321 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 65.729088 MSE: 3.866417 Root MSE: 1.966321 Multiple R-Squared: 0.754847 Adjusted R-Squared: 0.726005 2SLS estimates for supply (equation 2 ) Model Formula: q ~ p + f + a Instruments: ~d + f + a Estimate Std. Error t value Pr(>|t|) (Intercept) 49.532442 12.010526 4.124086 0.000795 *** p 0.240076 0.099934 2.402347 0.028785 * f 0.255606 0.04725 5.409637 5.8e-05 *** a 0.252924 0.099655 2.537996 0.021929 * --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.457555 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 96.633244 MSE: 6.039578 Root MSE: 2.457555 Multiple R-Squared: 0.639582 Adjusted R-Squared: 0.572004 > print( fit2sls$rcov ) [,1] [,2] [1,] 3.866417 4.357440 [2,] 4.357440 6.039578 > > ## perform the 3SLS > fit3sls <- systemfit( "3SLS", system, labels, inst ) > print( fit3sls ) systemfit results method: 3SLS N DF SSR MSE RMSE R2 Adj R2 demand 20 17 65.7291 3.86642 1.96632 0.754847 0.726005 supply 20 16 107.9138 6.74461 2.59704 0.597508 0.522041 The covariance matrix of the residuals used for estimation demand supply demand 3.86642 4.35744 supply 4.35744 6.03958 The covariance matrix of the residuals demand supply demand 3.86642 5.00443 supply 5.00443 6.74461 The correlations of the residuals demand supply demand 1.00000 0.97999 supply 0.97999 1.00000 The determinant of the residual covariance matrix: 1.03320 OLS R-squared value of the system: 0.676177 McElroy's R-squared value for the system: 0.786468 3SLS estimates for demand (equation 1 ) Model Formula: q ~ p + d Instruments: ~d + f + a Estimate Std. Error t value Pr(>|t|) (Intercept) 94.633304 7.920838 11.947385 0 *** p -0.243557 0.096484 -2.524313 0.021832 * d 0.313992 0.046944 6.688695 4e-06 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.966321 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 65.729088 MSE: 3.866417 Root MSE: 1.966321 Multiple R-Squared: 0.754847 Adjusted R-Squared: 0.726005 3SLS estimates for supply (equation 2 ) Model Formula: q ~ p + f + a Instruments: ~d + f + a Estimate Std. Error t value Pr(>|t|) (Intercept) 52.197204 11.893372 4.388764 0.000458 *** p 0.228589 0.099673 2.293388 0.035706 * f 0.228158 0.043994 5.186139 9e-05 *** a 0.361138 0.072889 4.954608 0.000143 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.597039 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 107.913821 MSE: 6.744614 Root MSE: 2.597039 Multiple R-Squared: 0.597508 Adjusted R-Squared: 0.522041 > print( "covariance of residuals used for estimation (from 2sls)" ) [1] "covariance of residuals used for estimation (from 2sls)" > print( fit3sls$rcovest ) [,1] [,2] [1,] 3.866417 4.357440 [2,] 4.357440 6.039578 > print( "covariance of residuals" ) [1] "covariance of residuals" > print( fit3sls$rcov ) [,1] [,2] [1,] 3.866417 5.004427 [2,] 5.004427 6.744614 > > ## 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( q, r12, main="correlation between predictions from supply and demand" ) > > > > cleanEx(); ..nameEx <- "fitted.systemfit" > > ### * fitted.systemfit > > flush(stderr()); flush(stdout()) > > ### Name: fitted.systemfit > ### Title: Fitted values > ### Aliases: fitted.systemfit > ### Keywords: models > > ### ** Examples > > ## Not run: library( systemfit ) > > data( kmenta ) > attach( kmenta ) > demand <- q ~ p + d > supply <- q ~ p + f + a > labels <- list( "demand", "supply" ) > system <- list( demand, supply ) > > ## perform OLS on each of the equations in the system > fitols <- systemfit( "OLS", system, labels ) > > ## print the fitted values > fitted( fitols ) eq1 eq2 [1,] 97.41053 98.92925 [2,] 99.57728 100.08251 [3,] 99.53832 100.19787 [4,] 99.70152 100.36979 [5,] 102.29446 102.72620 [6,] 102.06849 102.56269 [7,] 102.46276 102.42403 [8,] 102.83273 104.30737 [9,] 101.71547 102.94896 [10,] 100.78922 100.35059 [11,] 95.58388 96.03328 [12,] 94.37826 94.12138 [13,] 95.65592 95.59902 [14,] 98.97700 97.78688 [15,] 104.31033 102.63791 [16,] 103.92569 104.09052 [17,] 104.79508 103.78669 [18,] 101.93124 102.37790 [19,] 103.48498 102.11329 [20,] 106.53086 104.51788 > > > > cleanEx(); ..nameEx <- "fitted.systemfit.equation" > > ### * fitted.systemfit.equation > > flush(stderr()); flush(stdout()) > > ### Name: fitted.systemfit.equation > ### Title: Fitted values > ### Aliases: fitted.systemfit.equation > ### Keywords: models > > ### ** Examples > > ## Not run: library( systemfit ) > > data( kmenta ) > attach( kmenta ) > demand <- q ~ p + d > supply <- q ~ p + f + a > labels <- list( "demand", "supply" ) > system <- list( demand, supply ) > > ## perform OLS on each of the equations in the system > fitols <- systemfit( "OLS", system, labels ) > > ## print the fitted values of the first equation > fitted( fitols$eq[[1]] ) 1 2 3 4 5 6 7 8 97.41053 99.57728 99.53832 99.70152 102.29446 102.06849 102.46276 102.83273 9 10 11 12 13 14 15 16 101.71547 100.78922 95.58388 94.37826 95.65592 98.97700 104.31033 103.92569 17 18 19 20 104.79508 101.93124 103.48498 106.53086 > > ## print the fitted values of the second equation > fitted( fitols$eq[[2]] ) 1 2 3 4 5 6 7 8 98.92925 100.08251 100.19787 100.36979 102.72620 102.56269 102.42403 104.30737 9 10 11 12 13 14 15 16 102.94896 100.35059 96.03328 94.12138 95.59902 97.78688 102.63791 104.09052 17 18 19 20 103.78669 102.37790 102.11329 104.51788 > > > > cleanEx(); ..nameEx <- "hausman.systemfit" > > ### * hausman.systemfit > > flush(stderr()); flush(stdout()) > > ### Name: hausman.systemfit > ### Title: Hausman's Test > ### Aliases: hausman.systemfit > ### Keywords: models > > ### ** Examples > > ## Not run: library( systemfit ) > > data( kmenta ) > attach( kmenta ) > demand <- q ~ p + d > supply <- q ~ p + f + a > inst <- ~ d + f + a > labels <- list( "demand", "supply" ) > system <- list( demand, supply ) > > ## perform the estimation and report the results for the whole system > fit2sls <- systemfit( "2SLS", system, labels, inst) > fit3sls <- systemfit( "3SLS", system, labels, inst) > > ## perform the hausman test on the first equation > h <- hausman.systemfit( fit2sls, fit3sls ) > pval <- 1 - pchisq( h, dim( fit3sls$bcov )[1] ) > > print( h ) [,1] [1,] 2.535651 > print( pval ) [,1] [1,] 0.9243886 > > > > > cleanEx(); ..nameEx <- "kmenta" > > ### * kmenta > > flush(stderr()); flush(stdout()) > > ### Name: kmenta > ### Title: Partly Artificial Data on the U. S. Economy > ### Aliases: kmenta > ### Keywords: datasets datasets > > ### ** Examples > > data(kmenta) > > > > cleanEx(); ..nameEx <- "lrtest.systemfit" > > ### * lrtest.systemfit > > flush(stderr()); flush(stdout()) > > ### Name: lrtest.systemfit > ### Title: Likelihood Ratio test for Equation Systems > ### Aliases: lrtest.systemfit > ### Keywords: models > > ### ** Examples > > ## Not run: library( systemfit ) > data( kmenta ) > demand <- q ~ p + d > supply <- q ~ p + f + a > labels <- list( "demand", "supply" ) > system <- list( demand, supply ) > > ## unconstrained SUR estimation > fitsur <- systemfit("SUR", system, labels, data=kmenta ) > print( fitsur ) systemfit results method: SUR N DF SSR MSE RMSE R2 Adj R2 demand 20 17 65.6829 3.86370 1.96563 0.755019 0.726198 supply 20 16 104.0584 6.50365 2.55023 0.611888 0.539117 The covariance matrix of the residuals used for estimation demand supply demand 3.72539 4.13696 supply 4.13696 5.78444 The covariance matrix of the residuals demand supply demand 3.86370 4.92431 supply 4.92431 6.50365 The correlations of the residuals demand supply demand 1.000000 0.982348 supply 0.982348 1.000000 The determinant of the residual covariance matrix: 0.879285 OLS R-squared value of the system: 0.683453 McElroy's R-squared value for the system: 0.788722 SUR estimates for demand (equation 1 ) Model Formula: q ~ p + d Estimate Std. Error t value Pr(>|t|) (Intercept) 99.332894 7.514452 13.218913 0 *** p -0.275486 0.088509 -3.112513 0.006332 ** d 0.29855 0.041945 7.117605 2e-06 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.96563 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 65.682902 MSE: 3.8637 Root MSE: 1.96563 Multiple R-Squared: 0.755019 Adjusted R-Squared: 0.726198 SUR estimates for supply (equation 2 ) Model Formula: q ~ p + f + a Estimate Std. Error t value Pr(>|t|) (Intercept) 61.966166 11.08079 5.592215 4e-05 *** p 0.146884 0.094435 1.555397 0.139408 f 0.214004 0.039868 5.367761 6.3e-05 *** a 0.339304 0.067911 4.996283 0.000132 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.550226 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 104.05843 MSE: 6.503652 Root MSE: 2.550226 Multiple R-Squared: 0.611888 Adjusted R-Squared: 0.539117 > > ## SUR estimation with 2 restrictions > Rrestr <- matrix(0,2,7) > qrestr <- matrix(0,2,1) > Rrestr[1,3] <- 1 > Rrestr[1,7] <- -1 > Rrestr[2,2] <- -1 > Rrestr[2,5] <- 1 > qrestr[2,1] <- 0.5 > fitsur2 <- systemfit("SUR", system, labels, data=kmenta, + R.restr=Rrestr, q.restr=qrestr ) > print( fitsur2 ) systemfit results method: SUR N DF SSR MSE RMSE R2 Adj R2 demand 20 17 63.9868 3.76393 1.94008 0.761345 0.733268 supply 20 16 101.4731 6.34207 2.51835 0.621530 0.550567 The covariance matrix of the residuals used for estimation demand supply demand 3.76491 4.45579 supply 4.45579 5.98832 The covariance matrix of the residuals demand supply demand 3.76393 4.70247 supply 4.70247 6.34207 The correlations of the residuals demand supply demand 1.000000 0.962476 supply 0.962476 1.000000 The determinant of the residual covariance matrix: 1.75786 OLS R-squared value of the system: 0.691438 McElroy's R-squared value for the system: 0.689596 SUR estimates for demand (equation 1 ) Model Formula: q ~ p + d Estimate Std. Error t value Pr(>|t|) (Intercept) 96.827525 7.466548 12.968179 0 *** p -0.279771 0.083971 -3.331764 0.002046 ** d 0.328631 0.020632 15.928109 0 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.940085 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 63.986801 MSE: 3.763929 Root MSE: 1.940085 Multiple R-Squared: 0.761345 Adjusted R-Squared: 0.733268 SUR estimates for supply (equation 2 ) Model Formula: q ~ p + f + a Estimate Std. Error t value Pr(>|t|) (Intercept) 52.938648 7.665482 6.906108 0 *** p 0.220229 0.083971 2.622692 0.012832 * f 0.232671 0.021215 10.967325 0 *** a 0.328631 0.020632 15.928109 0 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.518346 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 101.473089 MSE: 6.342068 Root MSE: 2.518346 Multiple R-Squared: 0.62153 Adjusted R-Squared: 0.550567 > > ## perform LR-test > lrtest.systemfit( fitsur2, fitsur ) $df [1] 2 $lr [1] 13.85483 $p [1] 0.0009805345 > > > > cleanEx(); ..nameEx <- "nlsystemfit" > > ### * nlsystemfit > > flush(stderr()); flush(stdout()) > > ### Name: nlsystemfit > ### Title: Nonlinear Equation System Estimation > ### Aliases: nlsystemfit > ### Keywords: models regression nonlinear > > ### ** 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 ) Warning: NA/Inf replaced by maximum positive value Warning: NA/Inf replaced by maximum positive value > print( model.ols ) nlsystemfit results method: OLS convergence achieved after 104 iterations nlsystemfit objective function value: 271.151618810351 N DF SSR MSE RMSE R2 Adj R2 height.growth 166 161 259.4263 1.611343 1.269387 0.405302 0.390527 diameter.growth 166 161 11.7253 0.072828 0.269867 0.753083 0.746949 The covariance matrix of the residuals height.growth diameter.growth height.growth 1.611343 -0.0518970 diameter.growth -0.051897 0.0728282 The correlations of the residuals height.growth diameter.growth height.growth 1.000000 -0.151500 diameter.growth -0.151500 1.000000 The determinant of the residual covariance matrix: 0.114658 OLS estimates for height.growth (equation 1) Model Formula: hg ~ exp(h0 + h1 * log(tht) + h2 * tht^2 + h3 * elev + h4 * cr) Estimate Std. Error t value Pr(>|t|) h0 -0.512559 0.470294 -1.089869 0.277399 h1 0.420753 0.208105 2.021835 0.044849 * h2 -0.000112 0.000301 -0.37318 0.709506 h3 0.000154 2.2e-05 6.90088 0 *** h4 0.084599 0.014649 5.774931 0 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.269387 on 161 degrees of freedom Number of observations: 166 Degrees of Freedom: 161 SSR: 259.426272 MSE: 1.611343 Root MSE: 1.269387 Multiple R-Squared: 0.405302 Adjusted R-Squared: 0.390527 OLS estimates for diameter.growth (equation 2) Model Formula: dg ~ exp(d0 + d1 * log(dbh) + d2 * hg + d3 * cr + d4 * ba) Estimate Std. Error t value Pr(>|t|) d0 -0.266069 0.11046 -2.408747 0.017137 * d1 0.170404 0.055619 3.063776 0.002563 ** d2 0.124853 0.012866 9.704127 0 *** d3 0.019871 0.014038 1.415515 0.158849 d4 -0.014953 0.001012 -14.780279 0 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 0.269867 on 161 degrees of freedom Number of observations: 166 Degrees of Freedom: 161 SSR: 11.725347 MSE: 0.072828 Root MSE: 0.269867 Multiple R-Squared: 0.753083 Adjusted R-Squared: 0.746949 > > model.sur <- nlsystemfit( "SUR", model, start.values, data=ppine, eqnlabels=labels ) Warning: NA/Inf replaced by maximum positive value Warning: NA/Inf replaced by maximum positive value > print( model.sur ) nlsystemfit results method: SUR convergence achieved after 68 iterations nlsystemfit objective function value: 319.440887464005 N DF SSR MSE RMSE R2 Adj R2 height.growth 166 161 259.7675 1.61346 1.270221 0.40452 0.389726 diameter.growth 166 161 11.8850 0.07382 0.271699 0.74972 0.743502 The covariance matrix of the residuals used for estimation height.growth diameter.growth height.growth 1.611343 -0.0518970 diameter.growth -0.051897 0.0728282 The covariance matrix of the residuals height.growth diameter.growth height.growth 1.613463 -0.0863410 diameter.growth -0.086341 0.0738201 The correlations of the residuals height.growth diameter.growth height.growth 1.000000 -0.250175 diameter.growth -0.250175 1.000000 The determinant of the residual covariance matrix: 0.111651 SUR estimates for height.growth (equation 1) Model Formula: hg ~ exp(h0 + h1 * log(tht) + h2 * tht^2 + h3 * elev + h4 * cr) Estimate Std. Error t value Pr(>|t|) h0 -0.471577 0.462561 -1.019492 0.309499 h1 0.385882 0.204106 1.890597 0.060475 . h2 -5.6e-05 0.000294 -0.191342 0.848498 h3 0.000164 2.2e-05 7.432781 0 *** h4 0.085797 0.01472 5.828495 0 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.270221 on 161 degrees of freedom Number of observations: 166 Degrees of Freedom: 161 SSR: 259.767467 MSE: 1.613463 Root MSE: 1.270221 Multiple R-Squared: 0.40452 Adjusted R-Squared: 0.389726 SUR estimates for diameter.growth (equation 2) Model Formula: dg ~ exp(d0 + d1 * log(dbh) + d2 * hg + d3 * cr + d4 * ba) Estimate Std. Error t value Pr(>|t|) d0 -0.302906 0.111744 -2.710711 0.007442 ** d1 0.13194 0.055714 2.368151 0.019064 * d2 0.143449 0.012657 11.333291 0 *** d3 0.017366 0.014151 1.227122 0.221568 d4 -0.014986 0.001 -14.991626 0 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 0.271699 on 161 degrees of freedom Number of observations: 166 Degrees of Freedom: 161 SSR: 11.885037 MSE: 0.07382 Root MSE: 0.271699 Multiple R-Squared: 0.74972 Adjusted R-Squared: 0.743502 > > model.2sls <- nlsystemfit( "2SLS", model, start.values, data=ppine, + eqnlabels=labels, inst=inst ) Warning: NA/Inf replaced by maximum positive value Warning: NA/Inf replaced by maximum positive value > print( model.2sls ) nlsystemfit results method: 2SLS convergence achieved after 74 iterations nlsystemfit objective function value: 9.99962954935783e-06 N DF SSR MSE RMSE R2 Adj R2 height.growth 166 161 273.3067 1.697557 1.302903 0.373483 0.357918 diameter.growth 166 161 17.2811 0.107336 0.327621 0.636089 0.627048 The covariance matrix of the residuals height.growth diameter.growth height.growth 1.697557 -0.221047 diameter.growth -0.221047 0.107336 The correlations of the residuals height.growth diameter.growth height.growth 1.000000 -0.517918 diameter.growth -0.517918 1.000000 The determinant of the residual covariance matrix: 0.133347 2SLS estimates for height.growth (equation 1) Model Formula: hg ~ exp(h0 + h1 * log(tht) + h2 * tht^2 + h3 * elev + h4 * cr) Instruments: ~tht + dbh + elev + cr + ba Estimate Std. Error t value Pr(>|t|) h0 -1.934212 1.395188 -1.386345 0.167558 h1 1.039302 0.651917 1.594225 0.112847 h2 -0.001006 0.000969 -1.037716 0.300959 h3 0.000139 2.9e-05 4.709071 5e-06 *** h4 0.089886 0.015815 5.683735 0 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.302903 on 161 degrees of freedom Number of observations: 166 Degrees of Freedom: 161 SSR: 273.306739 MSE: 1.697557 Root MSE: 1.302903 Multiple R-Squared: 0.373483 Adjusted R-Squared: 0.357918 2SLS estimates for diameter.growth (equation 2) Model Formula: dg ~ exp(d0 + d1 * log(dbh) + d2 * hg + d3 * cr + d4 * ba) Instruments: ~tht + dbh + elev + cr + ba Estimate Std. Error t value Pr(>|t|) d0 -0.62896 0.142345 -4.418566 1.8e-05 *** d1 0.009037 0.081199 0.111295 0.911521 d2 0.230997 0.02898 7.971021 0 *** d3 0.004896 0.017024 0.287578 0.77404 d4 -0.013305 0.001201 -11.076569 0 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 0.327621 on 161 degrees of freedom Number of observations: 166 Degrees of Freedom: 161 SSR: 17.281057 MSE: 0.107336 Root MSE: 0.327621 Multiple R-Squared: 0.636089 Adjusted R-Squared: 0.627048 > > model.3sls <- nlsystemfit( "3SLS", model, start.values, data=ppine, + eqnlabels=labels, inst=inst ) Warning: NA/Inf replaced by maximum positive value Warning: NA/Inf replaced by maximum positive value > print( model.3sls ) nlsystemfit results method: 3SLS convergence achieved after 98 iterations nlsystemfit objective function value: 1.02447662459866e-15 N DF SSR MSE RMSE R2 Adj R2 height.growth 166 161 273.3067 1.697557 1.302903 0.373483 0.357918 diameter.growth 166 161 17.2589 0.107198 0.327411 0.636557 0.627527 The covariance matrix of the residuals used for estimation height.growth diameter.growth height.growth 1.697557 -0.221047 diameter.growth -0.221047 0.107336 The covariance matrix of the residuals height.growth diameter.growth height.growth 1.697557 -0.220725 diameter.growth -0.220725 0.107198 The correlations of the residuals height.growth diameter.growth height.growth 1.000000 -0.517496 diameter.growth -0.517496 1.000000 The determinant of the residual covariance matrix: 0.133255 3SLS estimates for height.growth (equation 1) Model Formula: hg ~ exp(h0 + h1 * log(tht) + h2 * tht^2 + h3 * elev + h4 * cr) Instruments: ~tht + dbh + elev + cr + ba Estimate Std. Error t value Pr(>|t|) h0 -1.934213 1.630889 -1.185987 0.237375 h1 1.039303 0.762051 1.363822 0.174527 h2 -0.001006 0.001132 -0.888047 0.37584 h3 0.000139 3.4e-05 4.050146 7.9e-05 *** h4 0.089886 0.018485 4.862684 3e-06 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.302903 on 161 degrees of freedom Number of observations: 166 Degrees of Freedom: 161 SSR: 273.306743 MSE: 1.697557 Root MSE: 1.302903 Multiple R-Squared: 0.373483 Adjusted R-Squared: 0.357918 3SLS estimates for diameter.growth (equation 2) Model Formula: dg ~ exp(d0 + d1 * log(dbh) + d2 * hg + d3 * cr + d4 * ba) Instruments: ~tht + dbh + elev + cr + ba Estimate Std. Error t value Pr(>|t|) d0 -0.626883 0.166212 -3.771585 0.000227 *** d1 0.009485 0.090192 0.105166 0.916375 d2 0.230775 0.032921 7.009984 0 *** d3 0.004688 0.019878 0.235859 0.813842 d4 -0.013309 0.0014 -9.503644 0 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 0.327411 on 161 degrees of freedom Number of observations: 166 Degrees of Freedom: 161 SSR: 17.258855 MSE: 0.107198 Root MSE: 0.327411 Multiple R-Squared: 0.636557 Adjusted R-Squared: 0.627527 > > > > cleanEx(); ..nameEx <- "ppine" > > ### * ppine > > flush(stderr()); flush(stdout()) > > ### Name: ppine > ### Title: Tree Growth Data for Ponderosa Pine > ### Aliases: ppine > ### Keywords: datasets datasets > > ### ** Examples > > data(ppine) > > > > cleanEx(); ..nameEx <- "predict.systemfit" > > ### * predict.systemfit > > flush(stderr()); flush(stdout()) > > ### Name: predict.systemfit > ### Title: Predictions from Equation System Estimation > ### Aliases: predict.systemfit > ### Keywords: models > > ### ** Examples > > ## Not run: library( systemfit ) > data( kmenta ) > demand <- q ~ p + d > supply <- q ~ p + f + a > labels <- list( "demand", "supply" ) > system <- list( demand, supply ) > > ## OLS estimation > fitols <- systemfit("OLS", system, labels, data=kmenta ) > > ## calculate predicted values and limits > predict( fitols ) eq1.pred eq2.pred 1 97.41053 98.92925 2 99.57728 100.08251 3 99.53832 100.19787 4 99.70152 100.36979 5 102.29446 102.72620 6 102.06849 102.56269 7 102.46276 102.42403 8 102.83273 104.30737 9 101.71547 102.94896 10 100.78922 100.35059 11 95.58388 96.03328 12 94.37826 94.12138 13 95.65592 95.59902 14 98.97700 97.78688 15 104.31033 102.63791 16 103.92569 104.09052 17 104.79508 103.78669 18 101.93124 102.37790 19 103.48498 102.11329 20 106.53086 104.51788 > > > > cleanEx(); ..nameEx <- "predict.systemfit.equation" > > ### * predict.systemfit.equation > > flush(stderr()); flush(stdout()) > > ### Name: predict.systemfit.equation > ### Title: Predictions from Equation System Estimation > ### Aliases: predict.systemfit.equation > ### Keywords: models > > ### ** Examples > > ## Not run: library( systemfit ) > data( kmenta ) > demand <- q ~ p + d > supply <- q ~ p + f + a > labels <- list( "demand", "supply" ) > system <- list( demand, supply ) > > ## OLS estimation > fitols <- systemfit("OLS", system, labels, data=kmenta ) > > ## print the predicted values of the first equation > predict( fitols$eq[[1]] ) 1 2 3 4 5 6 7 8 97.41053 99.57728 99.53832 99.70152 102.29446 102.06849 102.46276 102.83273 9 10 11 12 13 14 15 16 101.71547 100.78922 95.58388 94.37826 95.65592 98.97700 104.31033 103.92569 17 18 19 20 104.79508 101.93124 103.48498 106.53086 > > ## print the predicted values of the second equation > predict( fitols$eq[[2]] ) 1 2 3 4 5 6 7 8 98.92925 100.08251 100.19787 100.36979 102.72620 102.56269 102.42403 104.30737 9 10 11 12 13 14 15 16 102.94896 100.35059 96.03328 94.12138 95.59902 97.78688 102.63791 104.09052 17 18 19 20 103.78669 102.37790 102.11329 104.51788 > > > > cleanEx(); ..nameEx <- "print.confint.systemfit" > > ### * print.confint.systemfit > > flush(stderr()); flush(stdout()) > > ### Name: print.confint.systemfit > ### Title: Print confidence intervals of coefficients > ### Aliases: print.confint.systemfit > ### Keywords: models regression > > ### ** Examples > > ## Not run: library( systemfit ) > > data( kmenta ) > attach( kmenta ) > demand <- q ~ p + d > supply <- q ~ p + f + a > labels <- list( "demand", "supply" ) > system <- list( demand, supply ) > > ## perform OLS on each of the equations in the system > fitols <- systemfit( "OLS", system, labels ) > > ## calculate and print the confidence intervals > ## of all coefficients > ci <- confint( fitols ) > print( ci, digits=4 ) 2.5 % 97.5 % eq 1 (Intercept) 84.0310 115.7599 eq 1 p -0.5076 -0.1250 eq 1 d 0.2388 0.4305 eq 2 (Intercept) 33.9751 82.5757 eq 2 p -0.0408 0.3615 eq 2 f 0.1502 0.3460 eq 2 a 0.0416 0.4550 > > ## calculate and print the confidence intervals > ## of the coefficients of the second equation > ci2 <- confint( fitols$eq[[2]] ) > print( ci2, digits=4 ) 2.5 % 97.5 % (Intercept) 33.9751 82.5757 p -0.0408 0.3615 f 0.1502 0.3460 a 0.0416 0.4550 > > > > cleanEx(); ..nameEx <- "print.nlsystemfit.equation" > > ### * print.nlsystemfit.equation > > flush(stderr()); flush(stdout()) > > ### Name: print.nlsystemfit.equation > ### Title: print.nlsystemfit.equation > ### Aliases: print.nlsystemfit.equation > ### Keywords: models regression nonlinear > > ### ** 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 ) Warning: NA/Inf replaced by maximum positive value Warning: NA/Inf replaced by maximum positive value > print( model.ols ) nlsystemfit results method: OLS convergence achieved after 104 iterations nlsystemfit objective function value: 271.151618810351 N DF SSR MSE RMSE R2 Adj R2 height.growth 166 161 259.4263 1.611343 1.269387 0.405302 0.390527 diameter.growth 166 161 11.7253 0.072828 0.269867 0.753083 0.746949 The covariance matrix of the residuals height.growth diameter.growth height.growth 1.611343 -0.0518970 diameter.growth -0.051897 0.0728282 The correlations of the residuals height.growth diameter.growth height.growth 1.000000 -0.151500 diameter.growth -0.151500 1.000000 The determinant of the residual covariance matrix: 0.114658 OLS estimates for height.growth (equation 1) Model Formula: hg ~ exp(h0 + h1 * log(tht) + h2 * tht^2 + h3 * elev + h4 * cr) Estimate Std. Error t value Pr(>|t|) h0 -0.512559 0.470294 -1.089869 0.277399 h1 0.420753 0.208105 2.021835 0.044849 * h2 -0.000112 0.000301 -0.37318 0.709506 h3 0.000154 2.2e-05 6.90088 0 *** h4 0.084599 0.014649 5.774931 0 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.269387 on 161 degrees of freedom Number of observations: 166 Degrees of Freedom: 161 SSR: 259.426272 MSE: 1.611343 Root MSE: 1.269387 Multiple R-Squared: 0.405302 Adjusted R-Squared: 0.390527 OLS estimates for diameter.growth (equation 2) Model Formula: dg ~ exp(d0 + d1 * log(dbh) + d2 * hg + d3 * cr + d4 * ba) Estimate Std. Error t value Pr(>|t|) d0 -0.266069 0.11046 -2.408747 0.017137 * d1 0.170404 0.055619 3.063776 0.002563 ** d2 0.124853 0.012866 9.704127 0 *** d3 0.019871 0.014038 1.415515 0.158849 d4 -0.014953 0.001012 -14.780279 0 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 0.269867 on 161 degrees of freedom Number of observations: 166 Degrees of Freedom: 161 SSR: 11.725347 MSE: 0.072828 Root MSE: 0.269867 Multiple R-Squared: 0.753083 Adjusted R-Squared: 0.746949 > > model.3sls <- nlsystemfit( "3SLS", model, start.values, data=ppine, + eqnlabels=labels, inst=inst ) Warning: NA/Inf replaced by maximum positive value Warning: NA/Inf replaced by maximum positive value > print( model.3sls ) nlsystemfit results method: 3SLS convergence achieved after 98 iterations nlsystemfit objective function value: 1.02447662459866e-15 N DF SSR MSE RMSE R2 Adj R2 height.growth 166 161 273.3067 1.697557 1.302903 0.373483 0.357918 diameter.growth 166 161 17.2589 0.107198 0.327411 0.636557 0.627527 The covariance matrix of the residuals used for estimation height.growth diameter.growth height.growth 1.697557 -0.221047 diameter.growth -0.221047 0.107336 The covariance matrix of the residuals height.growth diameter.growth height.growth 1.697557 -0.220725 diameter.growth -0.220725 0.107198 The correlations of the residuals height.growth diameter.growth height.growth 1.000000 -0.517496 diameter.growth -0.517496 1.000000 The determinant of the residual covariance matrix: 0.133255 3SLS estimates for height.growth (equation 1) Model Formula: hg ~ exp(h0 + h1 * log(tht) + h2 * tht^2 + h3 * elev + h4 * cr) Instruments: ~tht + dbh + elev + cr + ba Estimate Std. Error t value Pr(>|t|) h0 -1.934213 1.630889 -1.185987 0.237375 h1 1.039303 0.762051 1.363822 0.174527 h2 -0.001006 0.001132 -0.888047 0.37584 h3 0.000139 3.4e-05 4.050146 7.9e-05 *** h4 0.089886 0.018485 4.862684 3e-06 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.302903 on 161 degrees of freedom Number of observations: 166 Degrees of Freedom: 161 SSR: 273.306743 MSE: 1.697557 Root MSE: 1.302903 Multiple R-Squared: 0.373483 Adjusted R-Squared: 0.357918 3SLS estimates for diameter.growth (equation 2) Model Formula: dg ~ exp(d0 + d1 * log(dbh) + d2 * hg + d3 * cr + d4 * ba) Instruments: ~tht + dbh + elev + cr + ba Estimate Std. Error t value Pr(>|t|) d0 -0.626883 0.166212 -3.771585 0.000227 *** d1 0.009485 0.090192 0.105166 0.916375 d2 0.230775 0.032921 7.009984 0 *** d3 0.004688 0.019878 0.235859 0.813842 d4 -0.013309 0.0014 -9.503644 0 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 0.327411 on 161 degrees of freedom Number of observations: 166 Degrees of Freedom: 161 SSR: 17.258855 MSE: 0.107198 Root MSE: 0.327411 Multiple R-Squared: 0.636557 Adjusted R-Squared: 0.627527 > > > > cleanEx(); ..nameEx <- "print.nlsystemfit.system" > > ### * print.nlsystemfit.system > > flush(stderr()); flush(stdout()) > > ### Name: print.nlsystemfit.system > ### Title: print.nlsystemfit.system > ### Aliases: print.nlsystemfit.system > ### Keywords: models regression nonlinear > > ### ** 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 ) Warning: NA/Inf replaced by maximum positive value Warning: NA/Inf replaced by maximum positive value > print( model.ols ) nlsystemfit results method: OLS convergence achieved after 104 iterations nlsystemfit objective function value: 271.151618810351 N DF SSR MSE RMSE R2 Adj R2 height.growth 166 161 259.4263 1.611343 1.269387 0.405302 0.390527 diameter.growth 166 161 11.7253 0.072828 0.269867 0.753083 0.746949 The covariance matrix of the residuals height.growth diameter.growth height.growth 1.611343 -0.0518970 diameter.growth -0.051897 0.0728282 The correlations of the residuals height.growth diameter.growth height.growth 1.000000 -0.151500 diameter.growth -0.151500 1.000000 The determinant of the residual covariance matrix: 0.114658 OLS estimates for height.growth (equation 1) Model Formula: hg ~ exp(h0 + h1 * log(tht) + h2 * tht^2 + h3 * elev + h4 * cr) Estimate Std. Error t value Pr(>|t|) h0 -0.512559 0.470294 -1.089869 0.277399 h1 0.420753 0.208105 2.021835 0.044849 * h2 -0.000112 0.000301 -0.37318 0.709506 h3 0.000154 2.2e-05 6.90088 0 *** h4 0.084599 0.014649 5.774931 0 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.269387 on 161 degrees of freedom Number of observations: 166 Degrees of Freedom: 161 SSR: 259.426272 MSE: 1.611343 Root MSE: 1.269387 Multiple R-Squared: 0.405302 Adjusted R-Squared: 0.390527 OLS estimates for diameter.growth (equation 2) Model Formula: dg ~ exp(d0 + d1 * log(dbh) + d2 * hg + d3 * cr + d4 * ba) Estimate Std. Error t value Pr(>|t|) d0 -0.266069 0.11046 -2.408747 0.017137 * d1 0.170404 0.055619 3.063776 0.002563 ** d2 0.124853 0.012866 9.704127 0 *** d3 0.019871 0.014038 1.415515 0.158849 d4 -0.014953 0.001012 -14.780279 0 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 0.269867 on 161 degrees of freedom Number of observations: 166 Degrees of Freedom: 161 SSR: 11.725347 MSE: 0.072828 Root MSE: 0.269867 Multiple R-Squared: 0.753083 Adjusted R-Squared: 0.746949 > > model.3sls <- nlsystemfit( "3SLS", model, start.values, data=ppine, + eqnlabels=labels, inst=inst ) Warning: NA/Inf replaced by maximum positive value Warning: NA/Inf replaced by maximum positive value > print( model.3sls ) nlsystemfit results method: 3SLS convergence achieved after 98 iterations nlsystemfit objective function value: 1.02447662459866e-15 N DF SSR MSE RMSE R2 Adj R2 height.growth 166 161 273.3067 1.697557 1.302903 0.373483 0.357918 diameter.growth 166 161 17.2589 0.107198 0.327411 0.636557 0.627527 The covariance matrix of the residuals used for estimation height.growth diameter.growth height.growth 1.697557 -0.221047 diameter.growth -0.221047 0.107336 The covariance matrix of the residuals height.growth diameter.growth height.growth 1.697557 -0.220725 diameter.growth -0.220725 0.107198 The correlations of the residuals height.growth diameter.growth height.growth 1.000000 -0.517496 diameter.growth -0.517496 1.000000 The determinant of the residual covariance matrix: 0.133255 3SLS estimates for height.growth (equation 1) Model Formula: hg ~ exp(h0 + h1 * log(tht) + h2 * tht^2 + h3 * elev + h4 * cr) Instruments: ~tht + dbh + elev + cr + ba Estimate Std. Error t value Pr(>|t|) h0 -1.934213 1.630889 -1.185987 0.237375 h1 1.039303 0.762051 1.363822 0.174527 h2 -0.001006 0.001132 -0.888047 0.37584 h3 0.000139 3.4e-05 4.050146 7.9e-05 *** h4 0.089886 0.018485 4.862684 3e-06 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.302903 on 161 degrees of freedom Number of observations: 166 Degrees of Freedom: 161 SSR: 273.306743 MSE: 1.697557 Root MSE: 1.302903 Multiple R-Squared: 0.373483 Adjusted R-Squared: 0.357918 3SLS estimates for diameter.growth (equation 2) Model Formula: dg ~ exp(d0 + d1 * log(dbh) + d2 * hg + d3 * cr + d4 * ba) Instruments: ~tht + dbh + elev + cr + ba Estimate Std. Error t value Pr(>|t|) d0 -0.626883 0.166212 -3.771585 0.000227 *** d1 0.009485 0.090192 0.105166 0.916375 d2 0.230775 0.032921 7.009984 0 *** d3 0.004688 0.019878 0.235859 0.813842 d4 -0.013309 0.0014 -9.503644 0 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 0.327411 on 161 degrees of freedom Number of observations: 166 Degrees of Freedom: 161 SSR: 17.258855 MSE: 0.107198 Root MSE: 0.327411 Multiple R-Squared: 0.636557 Adjusted R-Squared: 0.627527 > > > > cleanEx(); ..nameEx <- "print.systemfit" > > ### * print.systemfit > > flush(stderr()); flush(stdout()) > > ### Name: print.systemfit > ### Title: Print output of systemfit estimation > ### Aliases: print.systemfit > ### Keywords: models > > ### ** Examples > > ## Not run: library( systemfit ) > > data( kmenta ) > attach( kmenta ) > demand <- q ~ p + d > supply <- q ~ p + f + a > labels <- list( "demand", "supply" ) > system <- list( demand, supply ) > > ## perform OLS on each of the equations in the system > fitols <- systemfit( "OLS", system, labels ) > > ## print the results > print( fitols ) systemfit results method: OLS N DF SSR MSE RMSE R2 Adj R2 demand 20 17 63.3317 3.72539 1.93013 0.763789 0.735999 supply 20 16 92.5511 5.78444 2.40509 0.654807 0.590084 The covariance matrix of the residuals demand supply demand 3.72539 4.13696 supply 4.13696 5.78444 The correlations of the residuals demand supply demand 1.000000 0.891179 supply 0.891179 1.000000 The determinant of the residual covariance matrix: 4.43485 OLS R-squared value of the system: 0.709298 OLS estimates for demand (equation 1 ) Model Formula: q ~ p + d Estimate Std. Error t value Pr(>|t|) (Intercept) 99.895423 7.519362 13.285093 0 *** p -0.316299 0.090677 -3.488177 0.002815 ** d 0.334636 0.045422 7.367285 1e-06 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.930127 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 63.33165 MSE: 3.725391 Root MSE: 1.930127 Multiple R-Squared: 0.763789 Adjusted R-Squared: 0.735999 OLS estimates for supply (equation 2 ) Model Formula: q ~ p + f + a Estimate Std. Error t value Pr(>|t|) (Intercept) 58.275431 11.46291 5.083825 0.000111 *** p 0.160367 0.094884 1.690134 0.110388 f 0.248133 0.046188 5.372263 6.2e-05 *** a 0.248302 0.097518 2.546227 0.021567 * --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.405087 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 92.551058 MSE: 5.784441 Root MSE: 2.405087 Multiple R-Squared: 0.654807 Adjusted R-Squared: 0.590084 > > > > cleanEx(); ..nameEx <- "print.systemfit.equation" > > ### * print.systemfit.equation > > flush(stderr()); flush(stdout()) > > ### Name: print.systemfit.equation > ### Title: Print output of systemfit estimation > ### Aliases: print.systemfit.equation > ### Keywords: models > > ### ** Examples > > ## Not run: library( systemfit ) > > data( kmenta ) > attach( kmenta ) > demand <- q ~ p + d > supply <- q ~ p + f + a > labels <- list( "demand", "supply" ) > system <- list( demand, supply ) > > ## perform OLS on each of the equations in the system > fitols <- systemfit( "OLS", system, labels ) > > ## print the results > print( fitols$eq[[1]] ) OLS estimates for demand (equation 1 ) Model Formula: q ~ p + d Estimate Std. Error t value Pr(>|t|) (Intercept) 99.895423 7.519362 13.285093 0 *** p -0.316299 0.090677 -3.488177 0.002815 ** d 0.334636 0.045422 7.367285 1e-06 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.930127 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 63.33165 MSE: 3.725391 Root MSE: 1.930127 Multiple R-Squared: 0.763789 Adjusted R-Squared: 0.735999 > > > > cleanEx(); ..nameEx <- "residuals.systemfit" > > ### * residuals.systemfit > > flush(stderr()); flush(stdout()) > > ### Name: residuals.systemfit > ### Title: Residuals of systemfit object > ### Aliases: residuals.systemfit > ### Keywords: models > > ### ** Examples > > ## Not run: library( systemfit ) > > data( kmenta ) > attach( kmenta ) > demand <- q ~ p + d > supply <- q ~ p + f + a > labels <- list( "demand", "supply" ) > system <- list( demand, supply ) > > ## perform OLS on each of the equations in the system > fitols <- systemfit( "OLS", system, labels ) > > ## print the residuals > residuals( fitols ) eq1 eq2 1 1.0744708 -0.4442544 2 -0.3902787 -0.8955081 3 2.6246816 1.9651334 4 1.8024842 1.1342118 5 1.9455436 1.5138013 6 1.1745134 0.6803121 7 1.5302384 1.5689661 8 -2.9327287 -4.4073714 9 -1.3654672 -2.5989581 10 2.0307798 2.4694121 11 -0.1488821 -0.5982785 12 -1.9542622 -1.6973834 13 -1.1209171 -1.0640179 14 -0.2200033 0.9701222 15 1.4866729 3.1590873 16 -3.7006906 -3.8655164 17 -1.2730806 -0.2646900 18 -2.0022429 -2.4488950 19 1.7380247 3.1097065 20 -0.2988561 1.7141205 > > > > > cleanEx(); ..nameEx <- "residuals.systemfit.equation" > > ### * residuals.systemfit.equation > > flush(stderr()); flush(stdout()) > > ### Name: residuals.systemfit.equation > ### Title: Residuals of systemfit equation > ### Aliases: residuals.systemfit.equation > ### Keywords: models > > ### ** Examples > > ## Not run: library( systemfit ) > > data( kmenta ) > attach( kmenta ) > demand <- q ~ p + d > supply <- q ~ p + f + a > labels <- list( "demand", "supply" ) > system <- list( demand, supply ) > > ## perform OLS on each of the equations in the system > fitols <- systemfit( "OLS", system, labels ) > > ## print the residuals of the first equation > residuals( fitols$eq[[1]] ) 1 2 3 4 5 6 7 1.0744708 -0.3902787 2.6246816 1.8024842 1.9455436 1.1745134 1.5302384 8 9 10 11 12 13 14 -2.9327287 -1.3654672 2.0307798 -0.1488821 -1.9542622 -1.1209171 -0.2200033 15 16 17 18 19 20 1.4866729 -3.7006906 -1.2730806 -2.0022429 1.7380247 -0.2988561 > > ## print the residuals of the second equation > residuals( fitols$eq[[2]] ) 1 2 3 4 5 6 7 -0.4442544 -0.8955081 1.9651334 1.1342118 1.5138013 0.6803121 1.5689661 8 9 10 11 12 13 14 -4.4073714 -2.5989581 2.4694121 -0.5982785 -1.6973834 -1.0640179 0.9701222 15 16 17 18 19 20 3.1590873 -3.8655164 -0.2646900 -2.4488950 3.1097065 1.7141205 > > > > cleanEx(); ..nameEx <- "se.ratio.systemfit" > > ### * se.ratio.systemfit > > flush(stderr()); flush(stdout()) > > ### Name: se.ratio.systemfit > ### Title: Ratio of the Standard Errors > ### Aliases: se.ratio.systemfit > ### Keywords: models > > ### ** Examples > > ## Not run: library( systemfit ) > > data( kmenta ) > attach( kmenta ) > demand <- q ~ p + d > supply <- q ~ p + f + a > inst <- ~ d + f + a > labels <- list( "demand", "supply" ) > system <- list( demand, supply ) > > ## perform 2SLS on each of the equations in the system > fit2sls <- systemfit( "2SLS", system, labels, inst ) > fit3sls <- systemfit( "3SLS", system, labels, inst ) > > ## print the results from the fits > print( fit2sls ) systemfit results method: 2SLS N DF SSR MSE RMSE R2 Adj R2 demand 20 17 65.7291 3.86642 1.96632 0.754847 0.726005 supply 20 16 96.6332 6.03958 2.45756 0.639582 0.572004 The covariance matrix of the residuals demand supply demand 3.86642 4.35744 supply 4.35744 6.03958 The correlations of the residuals demand supply demand 1.000000 0.901724 supply 0.901724 1.000000 The determinant of the residual covariance matrix: 4.36424 OLS R-squared value of the system: 0.697214 2SLS estimates for demand (equation 1 ) Model Formula: q ~ p + d Instruments: ~d + f + a Estimate Std. Error t value Pr(>|t|) (Intercept) 94.633304 7.920838 11.947385 0 *** p -0.243557 0.096484 -2.524313 0.021832 * d 0.313992 0.046944 6.688695 4e-06 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.966321 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 65.729088 MSE: 3.866417 Root MSE: 1.966321 Multiple R-Squared: 0.754847 Adjusted R-Squared: 0.726005 2SLS estimates for supply (equation 2 ) Model Formula: q ~ p + f + a Instruments: ~d + f + a Estimate Std. Error t value Pr(>|t|) (Intercept) 49.532442 12.010526 4.124086 0.000795 *** p 0.240076 0.099934 2.402347 0.028785 * f 0.255606 0.04725 5.409637 5.8e-05 *** a 0.252924 0.099655 2.537996 0.021929 * --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.457555 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 96.633244 MSE: 6.039578 Root MSE: 2.457555 Multiple R-Squared: 0.639582 Adjusted R-Squared: 0.572004 > print( fit3sls ) systemfit results method: 3SLS N DF SSR MSE RMSE R2 Adj R2 demand 20 17 65.7291 3.86642 1.96632 0.754847 0.726005 supply 20 16 107.9138 6.74461 2.59704 0.597508 0.522041 The covariance matrix of the residuals used for estimation demand supply demand 3.86642 4.35744 supply 4.35744 6.03958 The covariance matrix of the residuals demand supply demand 3.86642 5.00443 supply 5.00443 6.74461 The correlations of the residuals demand supply demand 1.00000 0.97999 supply 0.97999 1.00000 The determinant of the residual covariance matrix: 1.03320 OLS R-squared value of the system: 0.676177 McElroy's R-squared value for the system: 0.786468 3SLS estimates for demand (equation 1 ) Model Formula: q ~ p + d Instruments: ~d + f + a Estimate Std. Error t value Pr(>|t|) (Intercept) 94.633304 7.920838 11.947385 0 *** p -0.243557 0.096484 -2.524313 0.021832 * d 0.313992 0.046944 6.688695 4e-06 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.966321 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 65.729088 MSE: 3.866417 Root MSE: 1.966321 Multiple R-Squared: 0.754847 Adjusted R-Squared: 0.726005 3SLS estimates for supply (equation 2 ) Model Formula: q ~ p + f + a Instruments: ~d + f + a Estimate Std. Error t value Pr(>|t|) (Intercept) 52.197204 11.893372 4.388764 0.000458 *** p 0.228589 0.099673 2.293388 0.035706 * f 0.228158 0.043994 5.186139 9e-05 *** a 0.361138 0.072889 4.954608 0.000143 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.597039 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 107.913821 MSE: 6.744614 Root MSE: 2.597039 Multiple R-Squared: 0.597508 Adjusted R-Squared: 0.522041 > print( "covariance of residuals used for estimation (from 2sls)" ) [1] "covariance of residuals used for estimation (from 2sls)" > print( fit3sls$rcovest ) [,1] [,2] [1,] 3.866417 4.357440 [2,] 4.357440 6.039578 > print( "covariance of residuals" ) [1] "covariance of residuals" > print( fit3sls$rcov ) [,1] [,2] [1,] 3.866417 5.004427 [2,] 5.004427 6.744614 > > ## 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" ) [1] "summary values for the ratio in the std. err. for the predictions" > print( summary( improve.ratio ) ) object Min. :1.001 1st Qu.:1.062 Median :1.156 Mean :1.151 3rd Qu.:1.238 Max. :1.331 > > > > cleanEx(); ..nameEx <- "summary.nlsystemfit.equation" > > ### * summary.nlsystemfit.equation > > flush(stderr()); flush(stdout()) > > ### Name: summary.nlsystemfit.equation > ### Title: summary.nlsystemfit.equation > ### Aliases: summary.nlsystemfit.equation > ### Keywords: models regression nonlinear > > ### ** 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 ) Warning: NA/Inf replaced by maximum positive value Warning: NA/Inf replaced by maximum positive value > print( model.ols ) nlsystemfit results method: OLS convergence achieved after 104 iterations nlsystemfit objective function value: 271.151618810351 N DF SSR MSE RMSE R2 Adj R2 height.growth 166 161 259.4263 1.611343 1.269387 0.405302 0.390527 diameter.growth 166 161 11.7253 0.072828 0.269867 0.753083 0.746949 The covariance matrix of the residuals height.growth diameter.growth height.growth 1.611343 -0.0518970 diameter.growth -0.051897 0.0728282 The correlations of the residuals height.growth diameter.growth height.growth 1.000000 -0.151500 diameter.growth -0.151500 1.000000 The determinant of the residual covariance matrix: 0.114658 OLS estimates for height.growth (equation 1) Model Formula: hg ~ exp(h0 + h1 * log(tht) + h2 * tht^2 + h3 * elev + h4 * cr) Estimate Std. Error t value Pr(>|t|) h0 -0.512559 0.470294 -1.089869 0.277399 h1 0.420753 0.208105 2.021835 0.044849 * h2 -0.000112 0.000301 -0.37318 0.709506 h3 0.000154 2.2e-05 6.90088 0 *** h4 0.084599 0.014649 5.774931 0 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.269387 on 161 degrees of freedom Number of observations: 166 Degrees of Freedom: 161 SSR: 259.426272 MSE: 1.611343 Root MSE: 1.269387 Multiple R-Squared: 0.405302 Adjusted R-Squared: 0.390527 OLS estimates for diameter.growth (equation 2) Model Formula: dg ~ exp(d0 + d1 * log(dbh) + d2 * hg + d3 * cr + d4 * ba) Estimate Std. Error t value Pr(>|t|) d0 -0.266069 0.11046 -2.408747 0.017137 * d1 0.170404 0.055619 3.063776 0.002563 ** d2 0.124853 0.012866 9.704127 0 *** d3 0.019871 0.014038 1.415515 0.158849 d4 -0.014953 0.001012 -14.780279 0 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 0.269867 on 161 degrees of freedom Number of observations: 166 Degrees of Freedom: 161 SSR: 11.725347 MSE: 0.072828 Root MSE: 0.269867 Multiple R-Squared: 0.753083 Adjusted R-Squared: 0.746949 > > model.3sls <- nlsystemfit( "3SLS", model, start.values, data=ppine, + eqnlabels=labels, inst=inst ) Warning: NA/Inf replaced by maximum positive value Warning: NA/Inf replaced by maximum positive value > print( model.3sls ) nlsystemfit results method: 3SLS convergence achieved after 98 iterations nlsystemfit objective function value: 1.02447662459866e-15 N DF SSR MSE RMSE R2 Adj R2 height.growth 166 161 273.3067 1.697557 1.302903 0.373483 0.357918 diameter.growth 166 161 17.2589 0.107198 0.327411 0.636557 0.627527 The covariance matrix of the residuals used for estimation height.growth diameter.growth height.growth 1.697557 -0.221047 diameter.growth -0.221047 0.107336 The covariance matrix of the residuals height.growth diameter.growth height.growth 1.697557 -0.220725 diameter.growth -0.220725 0.107198 The correlations of the residuals height.growth diameter.growth height.growth 1.000000 -0.517496 diameter.growth -0.517496 1.000000 The determinant of the residual covariance matrix: 0.133255 3SLS estimates for height.growth (equation 1) Model Formula: hg ~ exp(h0 + h1 * log(tht) + h2 * tht^2 + h3 * elev + h4 * cr) Instruments: ~tht + dbh + elev + cr + ba Estimate Std. Error t value Pr(>|t|) h0 -1.934213 1.630889 -1.185987 0.237375 h1 1.039303 0.762051 1.363822 0.174527 h2 -0.001006 0.001132 -0.888047 0.37584 h3 0.000139 3.4e-05 4.050146 7.9e-05 *** h4 0.089886 0.018485 4.862684 3e-06 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.302903 on 161 degrees of freedom Number of observations: 166 Degrees of Freedom: 161 SSR: 273.306743 MSE: 1.697557 Root MSE: 1.302903 Multiple R-Squared: 0.373483 Adjusted R-Squared: 0.357918 3SLS estimates for diameter.growth (equation 2) Model Formula: dg ~ exp(d0 + d1 * log(dbh) + d2 * hg + d3 * cr + d4 * ba) Instruments: ~tht + dbh + elev + cr + ba Estimate Std. Error t value Pr(>|t|) d0 -0.626883 0.166212 -3.771585 0.000227 *** d1 0.009485 0.090192 0.105166 0.916375 d2 0.230775 0.032921 7.009984 0 *** d3 0.004688 0.019878 0.235859 0.813842 d4 -0.013309 0.0014 -9.503644 0 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 0.327411 on 161 degrees of freedom Number of observations: 166 Degrees of Freedom: 161 SSR: 17.258855 MSE: 0.107198 Root MSE: 0.327411 Multiple R-Squared: 0.636557 Adjusted R-Squared: 0.627527 > > > > cleanEx(); ..nameEx <- "summary.nlsystemfit.system" > > ### * summary.nlsystemfit.system > > flush(stderr()); flush(stdout()) > > ### Name: summary.nlsystemfit.system > ### Title: summary.nlsystemfit.system > ### Aliases: summary.nlsystemfit.system > ### Keywords: models regression nonlinear > > ### ** 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 ) Warning: NA/Inf replaced by maximum positive value Warning: NA/Inf replaced by maximum positive value > print( model.ols ) nlsystemfit results method: OLS convergence achieved after 104 iterations nlsystemfit objective function value: 271.151618810351 N DF SSR MSE RMSE R2 Adj R2 height.growth 166 161 259.4263 1.611343 1.269387 0.405302 0.390527 diameter.growth 166 161 11.7253 0.072828 0.269867 0.753083 0.746949 The covariance matrix of the residuals height.growth diameter.growth height.growth 1.611343 -0.0518970 diameter.growth -0.051897 0.0728282 The correlations of the residuals height.growth diameter.growth height.growth 1.000000 -0.151500 diameter.growth -0.151500 1.000000 The determinant of the residual covariance matrix: 0.114658 OLS estimates for height.growth (equation 1) Model Formula: hg ~ exp(h0 + h1 * log(tht) + h2 * tht^2 + h3 * elev + h4 * cr) Estimate Std. Error t value Pr(>|t|) h0 -0.512559 0.470294 -1.089869 0.277399 h1 0.420753 0.208105 2.021835 0.044849 * h2 -0.000112 0.000301 -0.37318 0.709506 h3 0.000154 2.2e-05 6.90088 0 *** h4 0.084599 0.014649 5.774931 0 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.269387 on 161 degrees of freedom Number of observations: 166 Degrees of Freedom: 161 SSR: 259.426272 MSE: 1.611343 Root MSE: 1.269387 Multiple R-Squared: 0.405302 Adjusted R-Squared: 0.390527 OLS estimates for diameter.growth (equation 2) Model Formula: dg ~ exp(d0 + d1 * log(dbh) + d2 * hg + d3 * cr + d4 * ba) Estimate Std. Error t value Pr(>|t|) d0 -0.266069 0.11046 -2.408747 0.017137 * d1 0.170404 0.055619 3.063776 0.002563 ** d2 0.124853 0.012866 9.704127 0 *** d3 0.019871 0.014038 1.415515 0.158849 d4 -0.014953 0.001012 -14.780279 0 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 0.269867 on 161 degrees of freedom Number of observations: 166 Degrees of Freedom: 161 SSR: 11.725347 MSE: 0.072828 Root MSE: 0.269867 Multiple R-Squared: 0.753083 Adjusted R-Squared: 0.746949 > > model.3sls <- nlsystemfit( "3SLS", model, start.values, data=ppine, + eqnlabels=labels, inst=inst ) Warning: NA/Inf replaced by maximum positive value Warning: NA/Inf replaced by maximum positive value > print( model.3sls ) nlsystemfit results method: 3SLS convergence achieved after 98 iterations nlsystemfit objective function value: 1.02447662459866e-15 N DF SSR MSE RMSE R2 Adj R2 height.growth 166 161 273.3067 1.697557 1.302903 0.373483 0.357918 diameter.growth 166 161 17.2589 0.107198 0.327411 0.636557 0.627527 The covariance matrix of the residuals used for estimation height.growth diameter.growth height.growth 1.697557 -0.221047 diameter.growth -0.221047 0.107336 The covariance matrix of the residuals height.growth diameter.growth height.growth 1.697557 -0.220725 diameter.growth -0.220725 0.107198 The correlations of the residuals height.growth diameter.growth height.growth 1.000000 -0.517496 diameter.growth -0.517496 1.000000 The determinant of the residual covariance matrix: 0.133255 3SLS estimates for height.growth (equation 1) Model Formula: hg ~ exp(h0 + h1 * log(tht) + h2 * tht^2 + h3 * elev + h4 * cr) Instruments: ~tht + dbh + elev + cr + ba Estimate Std. Error t value Pr(>|t|) h0 -1.934213 1.630889 -1.185987 0.237375 h1 1.039303 0.762051 1.363822 0.174527 h2 -0.001006 0.001132 -0.888047 0.37584 h3 0.000139 3.4e-05 4.050146 7.9e-05 *** h4 0.089886 0.018485 4.862684 3e-06 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.302903 on 161 degrees of freedom Number of observations: 166 Degrees of Freedom: 161 SSR: 273.306743 MSE: 1.697557 Root MSE: 1.302903 Multiple R-Squared: 0.373483 Adjusted R-Squared: 0.357918 3SLS estimates for diameter.growth (equation 2) Model Formula: dg ~ exp(d0 + d1 * log(dbh) + d2 * hg + d3 * cr + d4 * ba) Instruments: ~tht + dbh + elev + cr + ba Estimate Std. Error t value Pr(>|t|) d0 -0.626883 0.166212 -3.771585 0.000227 *** d1 0.009485 0.090192 0.105166 0.916375 d2 0.230775 0.032921 7.009984 0 *** d3 0.004688 0.019878 0.235859 0.813842 d4 -0.013309 0.0014 -9.503644 0 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 0.327411 on 161 degrees of freedom Number of observations: 166 Degrees of Freedom: 161 SSR: 17.258855 MSE: 0.107198 Root MSE: 0.327411 Multiple R-Squared: 0.636557 Adjusted R-Squared: 0.627527 > > > > cleanEx(); ..nameEx <- "summary.systemfit" > > ### * summary.systemfit > > flush(stderr()); flush(stdout()) > > ### Name: summary.systemfit > ### Title: Print output of systemfit estimation > ### Aliases: summary.systemfit > ### Keywords: models > > ### ** Examples > > ## Not run: library( systemfit ) > > data( kmenta ) > attach( kmenta ) > demand <- q ~ p + d > supply <- q ~ p + f + a > inst <- ~ d + f + a > labels <- list( "demand", "supply" ) > system <- list( demand, supply ) > > ## perform OLS on each of the equations in the system > fitols <- systemfit( "OLS", system, labels ) > > ## print the results > summary.systemfit( fitols ) systemfit results method: OLS N DF SSR MSE RMSE R2 Adj R2 demand 20 17 63.3317 3.72539 1.93013 0.763789 0.735999 supply 20 16 92.5511 5.78444 2.40509 0.654807 0.590084 The covariance matrix of the residuals demand supply demand 3.72539 4.13696 supply 4.13696 5.78444 The correlations of the residuals demand supply demand 1.000000 0.891179 supply 0.891179 1.000000 The determinant of the residual covariance matrix: 4.43485 OLS R-squared value of the system: 0.709298 OLS estimates for demand (equation 1 ) Model Formula: q ~ p + d Estimate Std. Error t value Pr(>|t|) (Intercept) 99.895423 7.519362 13.285093 0 *** p -0.316299 0.090677 -3.488177 0.002815 ** d 0.334636 0.045422 7.367285 1e-06 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.930127 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 63.33165 MSE: 3.725391 Root MSE: 1.930127 Multiple R-Squared: 0.763789 Adjusted R-Squared: 0.735999 OLS estimates for supply (equation 2 ) Model Formula: q ~ p + f + a Estimate Std. Error t value Pr(>|t|) (Intercept) 58.275431 11.46291 5.083825 0.000111 *** p 0.160367 0.094884 1.690134 0.110388 f 0.248133 0.046188 5.372263 6.2e-05 *** a 0.248302 0.097518 2.546227 0.021567 * --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.405087 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 92.551058 MSE: 5.784441 Root MSE: 2.405087 Multiple R-Squared: 0.654807 Adjusted R-Squared: 0.590084 > > > > cleanEx(); ..nameEx <- "summary.systemfit.equation" > > ### * summary.systemfit.equation > > flush(stderr()); flush(stdout()) > > ### Name: summary.systemfit.equation > ### Title: Print output of systemfit estimation > ### Aliases: summary.systemfit.equation > ### Keywords: models > > ### ** Examples > > ## Not run: library( systemfit ) > > data( kmenta ) > attach( kmenta ) > demand <- q ~ p + d > supply <- q ~ p + f + a > inst <- ~ d + f + a > labels <- list( "demand", "supply" ) > system <- list( demand, supply ) > > ## perform OLS on each of the equations in the system > fitols <- systemfit( "OLS", system, labels ) > > ## print the results > summary.systemfit.equation( fitols$eq[[1]] ) OLS estimates for demand (equation 1 ) Model Formula: q ~ p + d Estimate Std. Error t value Pr(>|t|) (Intercept) 99.895423 7.519362 13.285093 0 *** p -0.316299 0.090677 -3.488177 0.002815 ** d 0.334636 0.045422 7.367285 1e-06 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.930127 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 63.33165 MSE: 3.725391 Root MSE: 1.930127 Multiple R-Squared: 0.763789 Adjusted R-Squared: 0.735999 > > > > cleanEx(); ..nameEx <- "systemfit" > > ### * systemfit > > flush(stderr()); flush(stdout()) > > ### Name: systemfit > ### Title: Equation System Estimation > ### Aliases: systemfit > ### Keywords: models regression > > ### ** Examples > > ## Not run: library( systemfit ) > data( kmenta ) > demand <- q ~ p + d > supply <- q ~ p + f + a > labels <- list( "demand", "supply" ) > system <- list( demand, supply ) > > ## OLS estimation > fitols <- systemfit("OLS", system, labels, data=kmenta ) > print( fitols ) systemfit results method: OLS N DF SSR MSE RMSE R2 Adj R2 demand 20 17 63.3317 3.72539 1.93013 0.763789 0.735999 supply 20 16 92.5511 5.78444 2.40509 0.654807 0.590084 The covariance matrix of the residuals demand supply demand 3.72539 4.13696 supply 4.13696 5.78444 The correlations of the residuals demand supply demand 1.000000 0.891179 supply 0.891179 1.000000 The determinant of the residual covariance matrix: 4.43485 OLS R-squared value of the system: 0.709298 OLS estimates for demand (equation 1 ) Model Formula: q ~ p + d Estimate Std. Error t value Pr(>|t|) (Intercept) 99.895423 7.519362 13.285093 0 *** p -0.316299 0.090677 -3.488177 0.002815 ** d 0.334636 0.045422 7.367285 1e-06 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.930127 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 63.33165 MSE: 3.725391 Root MSE: 1.930127 Multiple R-Squared: 0.763789 Adjusted R-Squared: 0.735999 OLS estimates for supply (equation 2 ) Model Formula: q ~ p + f + a Estimate Std. Error t value Pr(>|t|) (Intercept) 58.275431 11.46291 5.083825 0.000111 *** p 0.160367 0.094884 1.690134 0.110388 f 0.248133 0.046188 5.372263 6.2e-05 *** a 0.248302 0.097518 2.546227 0.021567 * --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.405087 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 92.551058 MSE: 5.784441 Root MSE: 2.405087 Multiple R-Squared: 0.654807 Adjusted R-Squared: 0.590084 > > ## OLS estimation with 2 restrictions > Rrestr <- matrix(0,2,7) > qrestr <- matrix(0,2,1) > Rrestr[1,3] <- 1 > Rrestr[1,7] <- -1 > Rrestr[2,2] <- -1 > Rrestr[2,5] <- 1 > qrestr[2,1] <- 0.5 > fitols2 <- systemfit("OLS", system, labels, data=kmenta, + R.restr=Rrestr, q.restr=qrestr ) > print( fitols2 ) systemfit results method: OLS N DF SSR MSE RMSE R2 Adj R2 demand 20 17 64.0034 3.76491 1.94034 0.761283 0.733199 supply 20 16 95.8131 5.98832 2.44710 0.642641 0.575636 The covariance matrix of the residuals demand supply demand 3.76491 4.45579 supply 4.45579 5.98832 The correlations of the residuals demand supply demand 1.000000 0.938415 supply 0.938415 1.000000 The determinant of the residual covariance matrix: 2.69142 OLS R-squared value of the system: 0.701962 OLS estimates for demand (equation 1 ) Model Formula: q ~ p + d Estimate Std. Error t value Pr(>|t|) (Intercept) 101.481708 6.159922 16.474512 0 *** p -0.316799 0.062915 -5.035322 1.4e-05 *** d 0.318885 0.039852 8.001656 0 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.940337 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 64.00342 MSE: 3.764907 Root MSE: 1.940337 Multiple R-Squared: 0.761283 Adjusted R-Squared: 0.733199 OLS estimates for supply (equation 2 ) Model Formula: q ~ p + f + a Estimate Std. Error t value Pr(>|t|) (Intercept) 54.14942 7.551514 7.17067 0 *** p 0.183201 0.062915 2.911859 0.006215 ** f 0.259528 0.039059 6.644583 0 *** a 0.318885 0.039852 8.001656 0 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.447104 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 95.813088 MSE: 5.988318 Root MSE: 2.447104 Multiple R-Squared: 0.642641 Adjusted R-Squared: 0.575636 > > ## iterated SUR estimation > fitsur <- systemfit("SUR", system, labels, data=kmenta, maxit=100 ) > print( fitsur ) systemfit results method: iterated SUR convergence achieved after 35 iterations N DF SSR MSE RMSE R2 Adj R2 demand 20 17 105.389 6.19935 2.48985 0.606925 0.560681 supply 20 16 146.061 9.12884 3.02140 0.455227 0.353082 The covariance matrix of the residuals used for estimation demand supply demand 6.19907 7.49338 supply 7.49338 9.12855 The covariance matrix of the residuals demand supply demand 6.19935 7.49367 supply 7.49367 9.12884 The correlations of the residuals demand supply demand 1.000000 0.996125 supply 0.996125 1.000000 The determinant of the residual covariance matrix: 0.437694 OLS R-squared value of the system: 0.531076 McElroy's R-squared value for the system: 0.832629 SUR estimates for demand (equation 1 ) Model Formula: q ~ p + d Estimate Std. Error t value Pr(>|t|) (Intercept) 97.516307 9.663008 10.091713 0 *** p -0.143687 0.09971 -1.44104 0.16774 d 0.18202 0.022572 8.064129 0 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.489849 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 105.388914 MSE: 6.199348 Root MSE: 2.489849 Multiple R-Squared: 0.606925 Adjusted R-Squared: 0.560681 SUR estimates for supply (equation 2 ) Model Formula: q ~ p + f + a Estimate Std. Error t value Pr(>|t|) (Intercept) 77.900537 12.12427 6.425173 8e-06 *** p 0.105094 0.117246 0.896349 0.383355 f 0.10841 0.020513 5.284965 7.4e-05 *** a 0.191543 0.032047 5.976971 1.9e-05 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 3.021397 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 146.06139 MSE: 9.128837 Root MSE: 3.021397 Multiple R-Squared: 0.455227 Adjusted R-Squared: 0.353082 > > ## 2SLS estimation > inst <- ~ d + f + a > fit2sls <- systemfit( "2SLS", system, labels, inst, kmenta ) > print( fit2sls ) systemfit results method: 2SLS N DF SSR MSE RMSE R2 Adj R2 demand 20 17 65.7291 3.86642 1.96632 0.754847 0.726005 supply 20 16 96.6332 6.03958 2.45756 0.639582 0.572004 The covariance matrix of the residuals demand supply demand 3.86642 4.35744 supply 4.35744 6.03958 The correlations of the residuals demand supply demand 1.000000 0.901724 supply 0.901724 1.000000 The determinant of the residual covariance matrix: 4.36424 OLS R-squared value of the system: 0.697214 2SLS estimates for demand (equation 1 ) Model Formula: q ~ p + d Instruments: ~d + f + a Estimate Std. Error t value Pr(>|t|) (Intercept) 94.633304 7.920838 11.947385 0 *** p -0.243557 0.096484 -2.524313 0.021832 * d 0.313992 0.046944 6.688695 4e-06 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.966321 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 65.729088 MSE: 3.866417 Root MSE: 1.966321 Multiple R-Squared: 0.754847 Adjusted R-Squared: 0.726005 2SLS estimates for supply (equation 2 ) Model Formula: q ~ p + f + a Instruments: ~d + f + a Estimate Std. Error t value Pr(>|t|) (Intercept) 49.532442 12.010526 4.124086 0.000795 *** p 0.240076 0.099934 2.402347 0.028785 * f 0.255606 0.04725 5.409637 5.8e-05 *** a 0.252924 0.099655 2.537996 0.021929 * --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.457555 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 96.633244 MSE: 6.039578 Root MSE: 2.457555 Multiple R-Squared: 0.639582 Adjusted R-Squared: 0.572004 > > ## 2SLS estimation with different instruments in each equation > inst1 <- ~ d + f > inst2 <- ~ d + f + a > instlist <- list( inst1, inst2 ) > fit2sls2 <- systemfit( "2SLS", system, labels, instlist, kmenta ) > print( fit2sls2 ) systemfit results method: 2SLS N DF SSR MSE RMSE R2 Adj R2 demand 20 17 67.4466 3.96745 1.99185 0.748441 0.718846 supply 20 16 96.6332 6.03958 2.45756 0.639582 0.572004 The covariance matrix of the residuals demand supply demand 3.96744 3.83562 supply 3.83562 6.03958 The correlations of the residuals demand supply demand 1.000000 0.783569 supply 0.783569 1.000000 The determinant of the residual covariance matrix: 9.24969 OLS R-squared value of the system: 0.694011 2SLS estimates for demand (equation 1 ) Model Formula: q ~ p + d Instruments: ~d + f Estimate Std. Error t value Pr(>|t|) (Intercept) 106.789358 11.143545 9.583069 0 *** p -0.411599 0.144845 -2.84166 0.011271 * d 0.361681 0.056406 6.412096 6e-06 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.991845 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 67.446561 MSE: 3.967445 Root MSE: 1.991845 Multiple R-Squared: 0.748441 Adjusted R-Squared: 0.718846 2SLS estimates for supply (equation 2 ) Model Formula: q ~ p + f + a Instruments: ~d + f + a Estimate Std. Error t value Pr(>|t|) (Intercept) 49.532442 12.010526 4.124086 0.000795 *** p 0.240076 0.099934 2.402347 0.028785 * f 0.255606 0.04725 5.409637 5.8e-05 *** a 0.252924 0.099655 2.537996 0.021929 * --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.457555 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 96.633244 MSE: 6.039578 Root MSE: 2.457555 Multiple R-Squared: 0.639582 Adjusted R-Squared: 0.572004 > > ## 3SLS estimation with GMM-3SLS formula > inst <- ~ d + f + a > fit3sls <- systemfit( "3SLS", system, labels, inst, kmenta, formula3sls="GMM" ) > print( fit3sls ) systemfit results method: 3SLS N DF SSR MSE RMSE R2 Adj R2 demand 20 17 65.7291 3.86642 1.96632 0.754847 0.726005 supply 20 16 107.9138 6.74461 2.59704 0.597508 0.522041 The covariance matrix of the residuals used for estimation demand supply demand 3.86642 4.35744 supply 4.35744 6.03958 The covariance matrix of the residuals demand supply demand 3.86642 5.00443 supply 5.00443 6.74461 The correlations of the residuals demand supply demand 1.00000 0.97999 supply 0.97999 1.00000 The determinant of the residual covariance matrix: 1.03320 OLS R-squared value of the system: 0.676177 McElroy's R-squared value for the system: 0.786468 3SLS estimates for demand (equation 1 ) Model Formula: q ~ p + d Instruments: ~d + f + a Estimate Std. Error t value Pr(>|t|) (Intercept) 94.633304 7.920838 11.947385 0 *** p -0.243557 0.096484 -2.524313 0.021832 * d 0.313992 0.046944 6.688695 4e-06 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.966321 on 17 degrees of freedom Number of observations: 20 Degrees of Freedom: 17 SSR: 65.729088 MSE: 3.866417 Root MSE: 1.966321 Multiple R-Squared: 0.754847 Adjusted R-Squared: 0.726005 3SLS estimates for supply (equation 2 ) Model Formula: q ~ p + f + a Instruments: ~d + f + a Estimate Std. Error t value Pr(>|t|) (Intercept) 52.197204 11.893372 4.388764 0.000458 *** p 0.228589 0.099673 2.293388 0.035706 * f 0.228158 0.043994 5.186139 9e-05 *** a 0.361138 0.072889 4.954608 0.000143 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.597039 on 16 degrees of freedom Number of observations: 20 Degrees of Freedom: 16 SSR: 107.913821 MSE: 6.744614 Root MSE: 2.597039 Multiple R-Squared: 0.597508 Adjusted R-Squared: 0.522041 > > > > cleanEx(); ..nameEx <- "vcov.systemfit" > > ### * vcov.systemfit > > flush(stderr()); flush(stdout()) > > ### Name: vcov.systemfit > ### Title: Variance covariance matrix of coefficients > ### Aliases: vcov.systemfit > ### Keywords: models > > ### ** Examples > > ## Not run: library( systemfit ) > > data( kmenta ) > attach( kmenta ) > demand <- q ~ p + d > supply <- q ~ p + f + a > labels <- list( "demand", "supply" ) > system <- list( demand, supply ) > > ## perform OLS on each of the equations in the system > fitols <- systemfit( "OLS", system, labels ) > > ## print the coefficients > vcov( fitols ) (Intercept) p d (Intercept) 56.54080696 -0.594801461 0.032162194 0.0000000 0.0000000000 p -0.59480146 0.008222392 -0.002333464 0.0000000 0.0000000000 d 0.03216219 -0.002333464 0.002063143 0.0000000 0.0000000000 0.00000000 0.000000000 0.000000000 131.3983031 -0.9874997306 0.00000000 0.000000000 0.000000000 -0.9874997 0.0090029614 0.00000000 0.000000000 0.000000000 -0.3043609 0.0008439930 0.00000000 0.000000000 0.000000000 -0.2791832 0.0005220243 (Intercept) 0.000000000 0.0000000000 p 0.000000000 0.0000000000 d 0.000000000 0.0000000000 -0.304360904 -0.2791832170 0.000843993 0.0005220243 0.002133318 0.0013155895 0.001315589 0.0095097150 > > > > cleanEx(); ..nameEx <- "vcov.systemfit.equation" > > ### * vcov.systemfit.equation > > flush(stderr()); flush(stdout()) > > ### Name: vcov.systemfit.equation > ### Title: Variance covariance matrix of coefficients > ### Aliases: vcov.systemfit.equation > ### Keywords: models > > ### ** Examples > > ## Not run: library( systemfit ) > > data( kmenta ) > attach( kmenta ) > demand <- q ~ p + d > supply <- q ~ p + f + a > labels <- list( "demand", "supply" ) > system <- list( demand, supply ) > > ## perform OLS on each of the equations in the system > fitols <- systemfit( "OLS", system, labels ) > > ## print the coefficients of the first equation > vcov( fitols$eq[[1]] ) (Intercept) p d (Intercept) 56.54080696 -0.594801461 0.032162194 p -0.59480146 0.008222392 -0.002333464 d 0.03216219 -0.002333464 0.002063143 > > ## print the coefficients of the second equation > vcov( fitols$eq[[2]] ) 131.3983031 -0.9874997306 -0.304360904 -0.2791832170 -0.9874997 0.0090029614 0.000843993 0.0005220243 -0.3043609 0.0008439930 0.002133318 0.0013155895 -0.2791832 0.0005220243 0.001315589 0.0095097150 > > > > ### *