changeset 3294:2147ab903567 octave-forge

don't use reserved word "title" as a variable name
author mcreel
date Thu, 29 Mar 2007 12:41:31 +0000
parents 637b03573470
children 84524b481590
files main/econometrics/inst/gmm_example.m main/econometrics/inst/mle_example.m
diffstat 2 files changed, 9 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/main/econometrics/inst/gmm_example.m	Thu Mar 29 11:26:40 2007 +0000
+++ b/main/econometrics/inst/gmm_example.m	Thu Mar 29 12:41:31 2007 +0000
@@ -38,7 +38,7 @@
 
 # additional args for gmm_results
 names = str2mat("theta1", "theta2", "theta3", "theta4", "theta5");
-title = "Poisson GMM trial";
+gmmtitle = "Poisson GMM trial";
 control = {100,0,1,1};
 
 
@@ -52,7 +52,7 @@
 weight = inverse(cov(m));
 
 # second round efficient estimator
-gmm_results(theta, data, weight, moments, momentargs, names, title, scalecoef, control);
+gmm_results(theta, data, weight, moments, momentargs, names, gmmtitle, scalecoef, control);
 printf("\nThe true parameter values used to generate the data:\n");
 prettyprint(theta_true, names, "value");
 
@@ -62,4 +62,4 @@
 # theta = zeros(k,1);
 # nslaves = 1;
 # title = "GMM estimation done in parallel";
-# gmm_results(theta, data, weight, moments, momentargs, names, title, scalecoef, control, nslaves);
+# gmm_results(theta, data, weight, moments, momentargs, names, gmmtitle, scalecoef, control, nslaves);
--- a/main/econometrics/inst/mle_example.m	Thu Mar 29 11:26:40 2007 +0000
+++ b/main/econometrics/inst/mle_example.m	Thu Mar 29 12:41:31 2007 +0000
@@ -42,14 +42,14 @@
 modelargs = {0}; # if this is zero the function gives analytic score, otherwise not
 # parameter names
 names = str2mat("beta1", "beta2", "beta3");
-title = "Poisson MLE trial"; # title for the run
+mletitle = "Poisson MLE trial"; # title for the run
 
 # controls for bfgsmin: 30 iterations is not always enough for convergence
-control = {50,0,1,1};
+control = {50,0};
 
 # This displays the results
 printf("\n\nanalytic score, unscaled data\n");
-[theta, V, obj_value, infocrit] = mle_results(theta, data, model, modelargs, names, title, 0, control);
+[theta, V, obj_value, infocrit] = mle_results(theta, data, model, modelargs, names, mletitle, 0, control);
 
 # This just calculates the results, no screen display
 printf("\n\nanalytic score, unscaled data, no screen display\n");
@@ -64,17 +64,17 @@
 [scaled_x, unscale] = scale_data(x);
 data = [y, scaled_x];
 theta = zeros(3,1);
-[theta, V, obj_value, infocrit] = mle_results(theta, data, model, modelargs, names, title, unscale, control);
+[theta, V, obj_value, infocrit] = mle_results(theta, data, model, modelargs, names, mletitle, unscale, control);
 
 # Example using numeric score
 printf("\n\nnumeric score, scaled data\n");
 theta = zeros(3,1);
 modelargs = {1}; # set the switch for no score
-[theta, V, obj_value, infocrit] = mle_results(theta, data, model, modelargs, names, title, unscale, control);
+[theta, V, obj_value, infocrit] = mle_results(theta, data, model, modelargs, names, mletitle, unscale, control);
 
 # Example doing estimation in parallel on a cluster (requires MPITB)
 # uncomment the following if you have MPITB installed
 # theta = zeros(3,1);
 # nslaves = 1;
 # title = "MLE estimation done in parallel";
-# [theta, V, obj_value, infocrit] = mle_results(theta, data, model, modelargs, names, title, unscale, control, nslaves);
+# [theta, V, obj_value, infocrit] = mle_results(theta, data, model, modelargs, names, mletitle, unscale, control, nslaves);