MATLAB Econometrics Toolbox User S Guide The Mathworks All Chapter Instant Download
MATLAB Econometrics Toolbox User S Guide The Mathworks All Chapter Instant Download
com
https://textbookfull.com/product/matlab-
econometrics-toolbox-user-s-guide-the-
mathworks/
textbookfull
More products digital (pdf, epub, mobi) instant
download maybe you interests ...
https://textbookfull.com/product/matlab-bioinformatics-toolbox-
user-s-guide-the-mathworks/
https://textbookfull.com/product/matlab-mapping-toolbox-user-s-
guide-the-mathworks/
https://textbookfull.com/product/matlab-optimization-toolbox-
user-s-guide-the-mathworks/
https://textbookfull.com/product/matlab-trading-toolbox-user-s-
guide-the-mathworks/
MATLAB Computer Vision Toolbox User s Guide The
Mathworks
https://textbookfull.com/product/matlab-computer-vision-toolbox-
user-s-guide-the-mathworks/
https://textbookfull.com/product/matlab-curve-fitting-toolbox-
user-s-guide-the-mathworks/
https://textbookfull.com/product/matlab-fuzzy-logic-toolbox-user-
s-guide-the-mathworks/
https://textbookfull.com/product/matlab-global-optimization-
toolbox-user-s-guide-the-mathworks/
https://textbookfull.com/product/matlab-image-processing-toolbox-
user-s-guide-the-mathworks/
Econometrics Toolbox™
User's Guide
R2020a
How to Contact MathWorks
Phone: 508-647-7000
Getting Started
1
Econometrics Toolbox Product Description . . . . . . . . . . . . . . . . . . . . . . . . 1-2
Bibliography . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-22
Data Preprocessing
2
Data Transformations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-2
Why Transform? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-2
Common Data Transformations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-2
iii
Nonseasonal Differencing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-13
Model Selection
3
Box-Jenkins Methodology . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-2
iv Contents
Detect ARCH Effects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-22
Test Autocorrelation of Squared Residuals . . . . . . . . . . . . . . . . . . . . . . . 3-22
Conduct Engle's ARCH Test . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-24
v
Econometric Modeler
4
Econometric Modeler App Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-2
Prepare Data for Econometric Modeler App . . . . . . . . . . . . . . . . . . . . . . . 4-3
Import Time Series Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-3
Perform Exploratory Data Analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-5
Fitting Models to Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-15
Conducting Goodness-of-Fit Checks . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-23
Finding Model with Best In-Sample Fit . . . . . . . . . . . . . . . . . . . . . . . . . . 4-29
Export Session Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-30
vi Contents
Select ARCH Lags for GARCH Model Using Econometric Modeler App
........................................................ 4-109
vii
Known Parameter Values for a Regression Model with AR Errors . . . . . . 5-28
Regression Model with AR Errors and t Innovations . . . . . . . . . . . . . . . . 5-29
viii Contents
Optimization Settings for regARIMA Model Estimation . . . . . . . . . . . . 5-113
Optimization Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-113
Constraints on Regression Models with ARIMA Errors . . . . . . . . . . . . . 5-115
ix
Forecast Error . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-202
x Contents
Specify Nonseasonal Models Using Name-Value Pairs . . . . . . . . . . . . . . . . 7-7
Specify Multiplicative Models Using Name-Value Pairs . . . . . . . . . . . . . . 7-11
Specify Conditional Mean Model Using Econometric Modeler App . . . . . 7-14
xi
ARIMA Model Including Exogenous Covariates . . . . . . . . . . . . . . . . . . . . 7-62
ARIMAX(p,D,q) Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-62
Conventions and Extensions of the ARIMAX Model . . . . . . . . . . . . . . . . . 7-62
xii Contents
Infer Residuals for Diagnostic Checking . . . . . . . . . . . . . . . . . . . . . . . . . 7-123
xiii
Specify GARCH Models . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-6
Default GARCH Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-6
Specify Default GARCH Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-7
Using Name-Value Pair Arguments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-8
Specify GARCH Model Using Econometric Modeler App . . . . . . . . . . . . . 8-11
Specify GARCH Model with Mean Offset . . . . . . . . . . . . . . . . . . . . . . . . . 8-13
Specify GARCH Model with Known Parameter Values . . . . . . . . . . . . . . . 8-14
Specify GARCH Model with t Innovation Distribution . . . . . . . . . . . . . . . 8-14
Specify GARCH Model with Nonconsecutive Lags . . . . . . . . . . . . . . . . . . 8-15
xiv Contents
Compare Conditional Variance Models Using Information Criteria . . . . 8-69
xv
Partially Specified Model Object for Restricted Estimation . . . . . . . . . . . 9-23
Display and Change Model Objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-23
Select Appropriate Lag Order . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-26
xvi Contents
Determine Cointegration Rank of VEC Model . . . . . . . . . . . . . . . . . . . . 9-111
xvii
Compare Markov Chain Mixing Times . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-50
State-Space Models
11
What Are State-Space Models? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-3
Definitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-3
State-Space Model Creation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-5
xviii Contents
Estimate Time-Varying Diffuse State-Space Model . . . . . . . . . . . . . . . . . 11-39
xix
Assess Stability of Implicitly Created State-Space Model . . . . . . . . . . 11-134
Functions
12
Appendices
A
Data Sets and Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A-2
Glossary
xx Contents
1
Getting Started
Econometrics Toolbox provides functions for modeling and analyzing time series data. It offers a wide
range of diagnostic tests for model selection, including tests for impulse analysis, unit roots and
stationarity, cointegration, and structural change. You can estimate, simulate, and forecast economic
systems using a variety of models, including, regression, ARIMA, state space, GARCH, multivariate
VAR and VEC, and switching models representing dynamic shifts in data. The toolbox also provides
Bayesian and Markov-based tools for developing time-varying models that learn from new data.
1-2
Econometric Modeling
Econometric Modeling
In this section...
“Model Selection” on page 1-3
“Econometrics Toolbox Features” on page 1-3
Model Selection
A probabilistic time series model is necessary for a wide variety of analysis goals, including
regression inference, forecasting, and Monte Carlo simulation. When selecting a model, aim to find
the most parsimonious model that adequately describes your data. A simple model is easier to
estimate, forecast, and interpret.
• Specification tests help you identify one or more model families that could plausibly describe the
data generating process.
• Model comparisons help you compare the fit of competing models, with penalties for complexity.
• Goodness-of-fit checks help you assess the in-sample adequacy of your model, verify that all model
assumptions hold, and evaluate out-of-sample forecast performance.
Model selection is an iterative process. When goodness-of-fit checks suggest model assumptions are
not satisfied—or the predictive performance of the model is not satisfactory—consider making model
adjustments. Additional specification tests, model comparisons, and goodness-of-fit checks help guide
this process.
1-3
1 Getting Started
1-4
Econometric Modeling
See Also
Related Examples
• “Box-Jenkins Model Selection” on page 3-4
• “Detect Autocorrelation” on page 3-15
• “Detect ARCH Effects” on page 3-22
• “Unit Root Tests” on page 3-32
• “Time Series Regression I: Linear Models”
1-5
1 Getting Started
More About
• “Trend-Stationary vs. Difference-Stationary Processes” on page 2-6
• “Box-Jenkins Methodology” on page 3-2
• “Goodness of Fit” on page 3-63
• “Regression Models with Time Series Errors” on page 5-5
• “Nonspherical Models” on page 3-67
• “Conditional Mean Models” on page 7-3
• “Conditional Variance Models” on page 8-2
• “Vector Autoregression (VAR) Models” on page 9-3
• “Cointegration and Error Correction Analysis” on page 9-107
1-6
Econometrics Toolbox Model Objects, Properties, and Object Functions
Model Objects
After you have a potential model for your data, you must specify the model to MATLAB® to proceed
with your analysis. Econometrics Toolbox has model objects for storing discrete-time econometric
models.
• arima — for integrated, autoregressive, moving average (ARIMA) models optionally containing
exogenous predictor variables
• garch — for generalized autoregressive conditional heteroscedasticity models (GARCH)
• egarch — for exponential GARCH models
• gjr — for Glosten-Jagannathan-Runkle models
• regARIMA — for regression models with ARIMA errors
• varm — for vector autoregression models optionally containing exogenous predictor variables
• vecm — for vector error-correction (cointegrated VARM) models optionally containing exogenous
predictor variables
Econometrics Toolbox supports univariate Bayesian linear regression analysis. Bayesian linear
regression model objects specify the joint prior distribution of the regression coefficients and
disturbance variance. The available prior model objects are:
1-7
1 Getting Started
• mixconjugateblm — for performing stochastic search variable selection (SSVS). The regression
coefficients and disturbance variance are dependent random variables (the prior and posterior
distributions are conjugate).
• mixsemiconjugateblm — for performing SSVS. The regression coefficients and disturbance
variance are independent random variables (the prior and posterior distributions are
semiconjugate).
• lassoblm — for performing Bayesian lasso regression.
Econometrics Toolbox supports modelling and analyzing discrete or continuous state Markov models.
Available model objects are:
To create a model object, specify the form of your model to one of the model functions (e.g., arima or
garch). The function creates the model object of the corresponding type in the MATLAB workspace,
as shown in the figure.
You can work with model objects as you would with any other variable in MATLAB. For example, you
can assign the object variable a name, view it in the MATLAB Workspace, and display its value in the
Command Window by typing its name.
Model Properties
A model object holds all the information necessary to estimate, simulate, and forecast econometric
models. This information includes the:
1-8
Econometrics Toolbox Model Objects, Properties, and Object Functions
Such pieces of information are properties of the model, which are stored as fields within the model
object. In this way, a model object resembles a MATLAB data structure (struct array).
The five model types—arima, garch, egarch, gjr, and regARIMA—have properties according to the
econometric models they support. Each property has a predefined name, which you cannot change.
For example, arima supports conditional mean models (multiplicative and additive AR, MA, ARMA,
ARIMA, and ARIMAX processes). Every arima model object has these properties, shown with their
corresponding names.
When a model object exists in the workspace, double-click its name in the Workspace window to open
the Variable Editor. The Variable Editor shows all model properties and their names.
1-9
Another random document with
no related content on Scribd:
CHAPTER XVII
A NEW HOME
“Look a-here, Dan Hardy!” sputtered Mr. Savage, “don’t ye talk that
way t’ me. I say ye’re goin’ back t’ th’ farm, an’ back ye shall go. Th’
idea! After all I done fer ye, now ye’re out on bail, an’ ye won’t come
an’ work fer me.”
“Why didn’t you offer to go his bond, if you are so anxious to have
him come and work for you?” asked Mr. Harrison.
“Wa’al, I—er—that is I was—What’s that your business, anyhow?”
burst out Mr. Savage, for the question confused him. “I say he’s
comin’ back with me. Come here, young man, step lively.”
“I’m not going with you, Mr. Savage,” answered Dan firmly.
“I say ye be! Squire, make him come. I’ve got a claim on him.”
“What sort of a claim?” inquired the blacksmith.
“Wa’al, its a good claim.”
“Are you his guardian, legally appointed by the court?”
“No, I ain’t his guardian, but I’ve got a claim on him.”
“Have you legally adopted him?”
“Course not. Think I’d adopt sech a lazy boy?”
“It’s rather strange that you should be so insistent on having a ‘lazy’
boy, as you call him, work for you. But can you produce any papers,
showing that you have a legal claim on him?”
“I ain’t got no papers, an’ I don’t want none. I’ve got a claim on him,
an’ I’m goin’ t’ have him. Didn’t I save him from goin’ t’ th’ poorhouse,
an’ ain’t I fed an’ clothed him since?”
“If you have, he has more than earned what he got. Dan,” went on
the aged veteran, “you need not go back to the farm unless you want
to. Squire Perkfell will tell you that Mr. Savage has no legal claim on
you.”
“I guess that’s right,” ventured the Justice though he rather disliked
to side with the boy who had been a prisoner before him.
“All right then!” exclaimed the angry farmer, “go t’ th’ poorhouse!
That’s th’ place fer ye! But mind ye, don’t ye come around me, askin’
t’ be took back. I’ll never let ye set foot in my place ag’in. Now who’s
goin’ t’ look after ye?”
“I am!” exclaimed Mr. Harrison. “Dan shall come and live with me. I
have enough for both of us.”
“Humph!” sneered Mr. Savage. “He’ll make a fine blacksmith.”
“I intend giving up the blacksmithing business,” said the old soldier.
“Fortunately this legacy of ten thousand dollars makes me
independent. But I do not intend to be idle. I am going into business,
and Dan can help. Come, Dan.”
There were more murmurs of surprise from the crowd in the
courtroom. So many surprises had never before occurred in one day.
There was enough to talk about for a month.
“Good riddance t’ ye!” exclaimed Peter Savage, giving Dan an ugly
look.
The boy stepped forward.
“I have a case of books at your house, Mr. Savage,” he said. “I want
to get them. May I?”
“No, ye can’t have ’em!”
“But they are mine. They were given to me by my father, and I want
them.”
“Wa’al, ye can’t have ’em.”
“What right have you to retain books belonging to Dan?” asked the
blacksmith.
“I’ll keep ’em t’ make up fer all th’ trouble he made me. I may have t’
pay damages fer what th’ bull done, an’ it was his fault.”
“It was not!” exclaimed Dan.
“Hush! Never mind,” advised Mr. Harrison. “Don’t dispute with him
now, Dan,” he added in a whisper. “I’ll find a way to get the books.”
Mr. Savage left the courtroom, with a leer on his hard looking face.
He felt that he had the best of Dan, though he was somewhat put out
that the boy was not coming back with him. It meant that the old
farmer would have to do more work himself, and he knew his wife
would miss Dan around the house.
“I can’t thank you enough for all you did for me, Mr. Harrison,” said
the boy, as he and his friend went out of the Justice’s room, part of
the crowd following them.
“Then don’t try, Dan. I only did my duty by you. I am glad I had the
opportunity of going on your bond. I could not have done it a week
ago.”
“And have you really fallen heir to ten thousand dollars?”
“Yes, strange as it may seem, I have. I was the most surprised man
in the world when the lawyer sent me the papers, and the deeds to
the property, which is located in the northern part of this township.”
“I’m afraid you have undertaken too big a contract, to take me home
with you,” went on Dan. “I don’t want to be a bother to you.”
“Never fear, you and I will get along nicely together. It is true I have
not a very fine home now, but I intend soon to have a better one. If
you will not mind putting up with a few inconveniences we shall do
very well.”
“I’m sure it is very kind of you. Nothing could be more inconvenient
than where I was. I slept in the attic, and in the winter the snow used
to come in on my bed through a crack in the roof. It was not so bad
in the summer time.”
“Well, there is nothing much at my house, but, as I say, we will soon
have a better one. I intend to sell out my business as soon as I can,
and start a small machine shop in the village. I think one is needed.
Part of the property I inherited is near the river, and I can build a
shop run by water power, which will be economical. I will hire several
men, and if you wish, you can work for me.”
“I should not ask anything better,” said Dan. “I did not like farm work,
but I did it because there was nothing else to do. I am fond of
machinery.”
“Perhaps we shall make an engineer of you.”
“That would be fine. But I wish I had my books from the farm house. I
want to keep on with my studies.”
“Never mind. I’ll find a way to secure them for you.”
Thus Dan found a new home, and a much better one than he had
had since his mother died.
CHAPTER XVIII
DAN’S MIDNIGHT VISIT
Next door to the blacksmith shop was a small house where Mr.
Harrison lived alone. He did his own cooking, and, once or twice a
week, he hired a woman from the village to come in and do some
cleaning. It was to this rather humble home that the old soldier took
Dan.
“The first thing we’ll do will be to have dinner,” said Mr. Harrison. “I
suppose you are hungry.”
“Yes, for I had very little breakfast, and I have been kept pretty busy
since.”
“Well, I’ll cook something, and then we can discuss some plans.”
The blacksmith proved that he knew how to get a meal, for he had
often served as camp cook in the army.
“Can’t I wash up the dishes for you?” asked Dan, when they were
through eating. “I often did for Mrs. Savage.”
“Yes, if you like. Then you can come to the smithy. I have some work
I promised to finish for a man, and it is rather a difficult job.”
“I’m afraid you were delayed by coming to my trial,” said Dan.
“It was a delay I was glad of, since I could be of service to you.”
When Dan went into the smithy, after washing and drying the dishes,
he found Mr. Harrison hard at work.
“No one would think you had just fallen heir to a large sum,” said the
boy, for to him ten thousand dollars was a great deal of money.
“I do not intend to let the money make any difference to me, except
that I shall do work on a larger scale,” remarked the blacksmith. “I
intend to keep the shop going until I can sell it, for I have several
contracts to complete, and it would not be right to drop them. There
is no other blacksmith in the village to whom people can go. Besides,
I like to work.”
It would seem so, from the way the sturdy old man rained blow after
blow on a glowing piece of iron, hammering it into shape, while the
red sparks flew all around.
When the iron cooled he thrust it into the forge fire, and, with bared
arms he worked the bellows handle causing the flames and sparks
to shoot up the chimney, and lighting the smithy with a yellow glow.
“Can’t I help at something?” asked Dan.
“Yes, if you like. There is a box of nails and screws that are all mixed
up. I wish you would sort them according to sizes, and put them into
small boxes. It is something I have often tried in vain to get time to
do.”
Dan set to work with a will. Even in the smithy, which naturally was
not a very clean place, he liked it better than on the farm.
Dan and the blacksmith continued to live together, the boy helping
with odd jobs around the shop, and learning much that was
afterward to prove useful to him. The excitement caused by the trial
had somewhat died away, and during the next two weeks though the
two constables spent part of every day looking for clues to the
robbers, they found none.
“The town ought to hire a detective from the city,” said Mr. Harrison
one evening, when, after the day’s work was done, he and Dan were
talking the matter over.
“Yes, I wish they would find out who robbed the place. My trial will
come off in the fall, and unless there is some evidence discovered
they may find me guilty.”
“No jury would ever convict you on such flimsy testimony.”
“Perhaps not, but I don’t even want to go to trial. I want the real
robbers discovered.”
“I hope they will be. By the way, did Mr. Savage answer your letter
which you wrote him, making a formal demand for your books?”
“Yes. He said he would not give them up.”
“Then I shall compel him to by legal means. The books are yours,
and you shall have them.”
It was several days after this that Dan was thinking over the matter
of the books. He did not want his friend, the blacksmith, to have to
go to the expense of a lawsuit to recover the volumes.
“I’ve been bother enough to him,” thought Dan. “I believe I can get
those books myself. I have a right to them, and I’m going to get
them.”
He was alone in the smithy, doing a simple job of repairing with
which Mr. Harrison had entrusted him. The blacksmith was away
from home, having gone to a distant town to see a man in reference
to selling him the shop. After finishing the work Dan sat down and
did some thinking.
“I believe I’ll do it,” he said to himself, coming to a sudden decision.
“Mr. Harrison will not be at home to-night, and, if there is any trouble
over it, he will not be involved. I can stay out as late as I like and he
will ask no questions. I’ll do it to-night.”
What Dan had resolved upon was rather a rash thing, but he did not
think so at the time. Boys, when they feel that they are in the right,
often go ahead regardless of consequences. It was so in Dan’s case.
He had decided to get the books that belonged to him, and this was
how he was going to do it. He knew they were in the attic room, and
he also knew, from experience, that he could get into the room from
the old apple tree, as he had done that day when the constables
caught him as he was coming down.
About ten o’clock that night Dan left the little cottage where he and
Mr. Harrison lived. He wore an old coat, and had his cap pulled down
over his face. Though he was doing what he felt he had a right to,
still he did not want any one to see him.
By a roundabout way Dan reached the apple orchard back of Peter
Savage’s home. The house was all in darkness, as he knew it would
be, for the family went to bed early, to save kerosene oil. Still Dan
waited until midnight, to be sure every one was sound asleep.
Then the boy cautiously climbed the tree. He went slowly, made no
noise, and soon reached the limb which was outside the window of
his former room.
Making his way along this he found the window open and stepped
inside. Even in the dark he knew where to find his books. He took
them from the case and began to tie them up in two bundles with
some strong cord he had bought. He intended lowering them from
the window with a rope, and then climb down the tree.
Just as he was ready to lower the books, the door of the room
suddenly opened and standing there, with a lamp in his hand, was
Mr. Savage. Behind him was his wife. They were in their night
dresses and Mrs. Savage held a poker.
“So, Dan Hardy, we’ve caught ye!” she exclaimed. “Not content with
robbin’ th’ doctor’s house, ye’ve turned regular burglar, an’ are tryin’
t’ rob us! Catch him, Peter, he’ll not git off so easy this time!”
CHAPTER XIX
THE FALLING CHIMNEY
For a moment Dan did not know what to do. He was too surprised
to speak, and, though he had been caught, almost like a burglar, he
knew he morally had the right to do what he had done.
“So it was you, makin’ th’ noise that woke us up, was it, Dan Hardy?”
asked Mr. Savage, advancing into the room. “Ye’re goin’ t’ th’ bad
fast. Now ye’ll have t’ deliver up whatever ye stole from my house,
an’ then I’ll send fer th’ constables.”
“I haven’t stolen anything from your house, Mr. Savage!”
“Then what did ye come sneakin’ in here fer, like a thief in th’ night?”
“I came after my books, which you refused to let me have. Now that I
have them I am going to leave.”
“Ye be, eh? Wa’al, I guess I’ll have suthin’ t’ say about that. Likely
story! Come here t’ git a few wuthless books! More like ye come here
t’ git th’ money ye heard I drawed out th’ bank!”
“I didn’t know you drew any money out of the bank.”
“Ye’re a thief, Dan Hardy, an’ ye know it!” exclaimed Mrs. Savage.
“Catch him, Peter. I’ll hold him while ye’ go over t’ Mr. Lane’s an’
telephone fer th’ constables.”
“I tell you I only came here for my books, and you have no right to
molest me,” declared Dan.
“We’ll see how much of that th’ judge will believe,” sneered Mr.
Savage. “Ye’d better come along with me, an’ make no trouble.”
“I’ll not come with you.”
Dan formed a sudden resolution. With a quick motion he threw his
books from the window. Then he turned and made for it himself. It
did not take long to get out on the limb, and, a few seconds later he
was climbing down to the ground.
“Catch him! Stop him! Hold him!” cried Mrs. Savage. “Why don’t ye
hold him, Peter?”
“Hold him, Susan? Might as well try t’ hold an eel after it’s got away
from ye. Can’t ye see he’s gone?”
“Thieves! Robbers!” cried the woman. “Dan Hardy tried to rob th’
house!”
Her cries awakened the hired men, but, by the time they had slipped
on their trousers and come out, Dan was far away. He had grabbed
up his books and run across the fields to the road. Then he walked
to Mr. Harrison’s house.
“Well, I got my books,” said the boy as he undressed and went to
bed, “but I suppose there’ll be a row over it.”
The blacksmith came back early the next day, and Dan told him all
about it.
“I am a little sorry you did that,” said Mr. Harrison, “yet I don’t know
as I blame you. Mr. Savage was a mean man to retain the books,
and, though you were not proceeding strictly according to law, you
were morally in the right. I think whatever violation of law there was,
is so slight that it need cause you no worry. Still I will go and see
Squire Perkfell, as Mr. Savage will probably try to have a warrant
issued for your arrest.”
Nor was the old soldier mistaken in his surmise. When he got to the
Squire’s office he found the angry farmer there.
“Ah, good morning,” remarked the Justice pleasantly, when he saw
the blacksmith. It was quite a different greeting than the one he had
given when Mr. Harrison wanted to represent Dan at the trial. But
then matters were different now. Mr. Harrison was quite wealthy,
according to the Hayden standard, and the justice thought perhaps
he might be given some legal work to do for the rich blacksmith.
“Good morning,” returned Mr. Harrison. “I came in to see you about a
certain matter, when you have finished with Mr. Savage.”
“Wa’al, my business has got t’ be attended to, an’ I don’t care who
knows it,” said the farmer. “I want a warrant fer th’ arrest of that
Hardy boy.”
“Then my business is the same as yours,” said the blacksmith. “We
will discuss it together.”
“No, we won’t discuss nothin’. I want him arrested, that’s all.”
“Yes, yes. Of course,” said the Squire. “Certainly. I will attend to it.
Now what do you charge him with Mr. Savage?”
The truth was Squire Perkfell was between two fires. He wanted to
please the blacksmith, because he knew he had money, and he
wanted to keep on friendly terms with Mr. Savage, who was also
wealthy and a power in the community, and who was to be reckoned
with on election day.
“I charge him with bein’ a burglar, an’ with comin’ inter my house at
midnight t’ rob an’ steal,” declared Mr. Savage.
“Perhaps we can simplify matters” interposed Mr. Harrison. “Did he
break into your house, Mr. Savage?”
“No, he come in a winder that was left open.”
“Then I think I am right, Squire, in saying there can be no charge of
breaking entered against Dan.”
“No, no. You’re right. If he didn’t break any doors or windows to get
in, he can’t be charged with breaking,” agreed the Justice. “To arrest
a burglar, charged with breaking, entering and stealing, he must be
guilty of all three things.”
“So, then, Dan broke nothing,” resumed the blacksmith. “Did he steal
anything, Mr. Savage?”
“He took some books.”
“Whose were they?”
“Wa’al, his own, I s’pose, but I was holdin’ em.”
“Which you had no legal right to do. Then Dan did not steal
anything.”
“Guess you’re right,” agreed the Justice. “You can’t properly charge
him with stealing, Mr. Savage.”
“Wa’al, he entered, didn’t he?” asked the farmer, satisfied that he
could have Dan arrested on this charge.
“He entered, through a window, which was not fastened, and took
property that belonged to him, which you unlawfully retained,” said
Mr. Harrison. “I admit there might have been a technical violation of
the law on Dan’s part, but there was also a violation on the part of
Mr. Savage. If he insists on having a warrant for Dan on the charge
of entering, I shall ask for one, on Dan’s behalf, for the arrest of Mr.
Savage.”
“On what charge?” asked the Justice nervously, for he did not want
to have to arrest such an influential and rich man as Mr. Savage.
“On the charge of unlawfully converting to his own use the property
of another,” answered the blacksmith. “Now you can take your
choice, Mr. Savage. Either drop this silly charge, or I will make one
against you.”
“I—I think Mr. Harrison is right,” said Squire Perkfell, nervously
rubbing his hands together.
“Humph! I’ll git even with him, an’ Dan too,” growled the farmer as he
left the office of the Justice. He had decided that discretion was the
better part of valor, and he was not sure but that he had acted
unlawfully, as indeed he had, in keeping Dan’s books.
“Well, it’s all settled,” said the blacksmith to Dan, when he came
back home. “Now you can rest easy.”
“No, not exactly,” answered Dan. “I have still to find the rascals who
robbed the doctor’s house.”
“Perhaps we may in time. Don’t worry.”
But Dan did, though it did no good. The weeks passed, and there
was no clue to those who had burglarized the doctor’s house. Of
course Dan had, with the aid of Mr. Harrison, made a search in the
woods, where he had seen the mysterious men, but nothing was
found. Either it was well hidden, or the robbers, if such they were,
had taken their booty away again.
The summer began to wane. Mr. Harrison had not yet found a
purchaser for his smithy, and he continued to work there, as the
machine shop he had started to build was not ready for operations. It
might seem queer for a man with ten thousand dollars to be working
at the forge, like a common blacksmith, but Mr. Harrison liked the
exercise, and he knew if he stopped, the people in the neighborhood
would have to go a long distance to get any work of that nature
done. Besides he had some special machinery to put in his new
shop, and part of it he could build better himself than he could hire
done.
So he and Dan continued to live together, working in the smithy from
day to day. The boy was acquiring valuable information, and he had
plenty of time to study.
One day, Dan and his friend were working on a large iron frame that
needed welding. It was so large that Mr. Harrison had to stand inside
it, while it rested on the anvil. Dan stood in front to steady it.
It had just been taken from the fire, where one part was heated white
hot, for welding, and Mr. Harrison was raining blows on it with a
small sledge hammer when Dan, looking up, uttered an exclamation
of fear.
The big brick chimney, in which the forge was constructed was
cracking, for it was quite old. As Dan watched he saw it start to
topple over, right on Mr. Harrison, who could not get out of the way
because he was inside the frame, which was like a big cage.
“Look out!” cried Dan. “The chimney is falling!”
Nearer and nearer to Mr. Harrison, who was trying in vain to extricate
himself from the framework, came the heavy mass of bricks and
mortar. He was in danger of being crushed to death.
Then Dan did a risky thing. Dropping his end of the frame he ran
around in behind the anvil, and, exerting all his strength, he raised
the mass of iron rods, holding the frame up so Mr. Harrison could
crawl to one side.
“Quick! Come out!” cried the boy.
The blacksmith saw his opportunity and made a rapid move to
safety. Then Dan leaped out of the way, and not an instant too soon,
for, a second later the bricks toppled down, burying the anvil and
frame out of sight.
“QUICK—COME OUT!” CRIED THE BOY.—Page 156.
CHAPTER XX
ANOTHER ROBBERY
When the dust cleared away the blacksmith, who was rather pale,
stepped forward and clasped Dan by the hand.
“I owe my life to you,” he said, his voice trembling in spite of himself.
“I could not have gotten out of the way if you had not helped me.”
“Oh, I guess you might have managed somehow,” replied Dan, for
he did not like to hear himself praised so highly.
“No, I could not. The frame would have held me, and I would now be
lying dead under those bricks, Dan.”
“I am glad I was here to help you.”
“I meant to have the forge chimney repaired some time ago,” went
on the blacksmith. “I noticed a large crack in it, but I kept putting it off
from time to time. This has taught me a lesson, that delay is
dangerous.”
“It will need quite some repairing now.”
“Yes, it will have to be rebuilt. And this decides me. I shall now give
up the blacksmith work for ever. I have finished all the contracts I
had, except this frame, and that can be done elsewhere.”
“What are you going to do then, Mr. Harrison?”
“I shall close up the shop until I find a purchaser for it. Then I will
repair the chimney. In the meanwhile I shall proceed with the work of
erecting my little machine shop. I have the arrangements all made,
and there is no need of delaying further. How would you like to learn
to be a machinist?”
“Very much, I think. Would I get a chance to study?”
“That would be part of your work. I should expect you to devote
some of your time to your books. My plans are not all made yet, and
I may have something to say to you, later, on this point. But the more
you can study, the better machinist you will make, and, in time, you
may become a mechanical engineer, which, I believe, you told me
you would like to be.”
“Indeed I would.”
“Very well then, now we’ll close up this shop. It seems strange to do
so, for I have made my living out of it for a number of years, and I
feel attached to it.”
“You are not going to move out of the house, are you?”
“Not at present. It is rather small, but, if you do not complain about
the cramped quarters, I’m sure I shall not.”
“I am only too glad to live there with you,” said Dan. “It is very good
of you to keep me.”
“I am not going to lose sight of you after this,” remarked Mr. Harrison
with a smile. “I may want you to save my life again,” and, though he
smiled, there was a serious note in his voice, for his escape had
been a narrow one.
“I am going to build a house near my machine shop,” the blacksmith
went on, “but it will be some time before it is done. Meanwhile we will
continue to live in the cottage. Now, Dan, come on, we will lock up
the old shop, and I do not expect to enter it again until I bring a
purchaser for it.”
The door was locked, not without a feeling of regret on the part of the
old soldier, for in spite of his hard work, there were many pleasant
associations connected with the forge that now lay in ruins.
As the two were closing up the blacksmith shop, Silas Martin, the
hired man of Dr. Maxwell’s, drove past.
“What’s th’ matter?” he asked. “Takin’ a holiday an’ goin’ fishin’, Mr.
Harrison?”
“Well, we’re taking a holiday because we have to. The forge has
fallen apart.”
“Bless my pitchfork!” exclaimed Silas, who was given to odd
expressions. “Ye don’t say so! Why that forge was built nearly fifty
years ago, I’ve heard my father say.”
“Yes, it was quite an old shop when I bought it, and that is twenty
years ago. It has seen its best days, like some of us, Silas. I suppose
you haven’t had any more robbers out your way?”
“No, an’ we don’t want ’em.”
“Have they discovered any more clues?” asked Dan anxiously, for as
the weeks went by, without any new evidence being brought out, he
began to worry about the results of his trial.
“No more clues,” replied Silas. “Doc was talkin’ th’ other day of hirin’
a city detective, ef them constables didn’t do suthin’ pretty soon.
Between you an’ me an’ the hitchin’ post,” he went on in a whisper, “I
don’t believe them constables know beans about catchin’ burglars.”
“I agree with you,” said Mr. Harrison with a laugh.
“G’lang!” exclaimed Silas to his horse. “Got t’ hurry back,” he added,
as he drove off. “Doc’s waitin’ fer me.”
“I wonder if those robbers will ever be caught, so that I will be
cleared of suspicion?” spoke Dan, with something of a sigh.
“Don’t you worry,” advised the old soldier. “It will all come right in
time.”
Dan and his friend went to the small cottage where they lived. It was
a humble home, but neat and clean, for Dan took pride in keeping it
in order. Mr. Harrison said it was more like a home to him than it had
ever been before, for Dan had learned many housekeeping ways
from Mrs. Savage, mean as she had been to him.
Mr. Harrison lost no time in arranging to have his machine shop
finished. This necessitated him going away from home quite often
during the next few weeks, and Dan was left alone. He did not mind
this as it gave him time for studying, which he had to neglect while
he was working for Mr. Savage.
One morning as the two were at the partly completed shop, watching
the workmen, Constable Wolff came along.
“Wa’al, I s’pose ye heard th’ news?” he said in a questioning tone.
“No. What news?” asked Mr. Harrison.
“Why, Hank Lee’s store was robbed last night.”
“Mr. Lee’s store robbed!” exclaimed Dan.
“Yep,” went on the constable, as if he was delighted at it, as, indeed,
he was secretly, as it gave him a chance to do something, even if it
was not very much. “They bursted open a winder, same as they
done at Dr. Maxwell’s an’ cleaned out th’ cash drawer, besides takin’
a lot of cigars.”
“Have you any clues?” asked the old soldier. “Do you suspect Dan of
this crime?” and he smiled a little bitterly.
“No, sir, Dan ain’t suspicioned of this. We know he didn’t have
nothin’ t’ do with it, ’cause Dr. Maxwell seen th’ two men what did th’
robbing!”
“He did? Then maybe they are the same persons who robbed his
place!” exclaimed Dan. “Tell me about it, Mr. Wolff.”
CHAPTER XXI
EXCITEMENT IN TOWN