Nothing Special   »   [go: up one dir, main page]

PDF Advanced R Statistical Programming and Data Models Analysis Machine Learning and Visualization 1St Edition Matt Wiley Ebook Full Chapter

Download as pdf or txt
Download as pdf or txt
You are on page 1of 54

Advanced R Statistical Programming

and Data Models: Analysis, Machine


Learning, and Visualization 1st Edition
Matt Wiley
Visit to download the full and correct content document:
https://textbookfull.com/product/advanced-r-statistical-programming-and-data-models-
analysis-machine-learning-and-visualization-1st-edition-matt-wiley/
More products digital (pdf, epub, mobi) instant
download maybe you interests ...

Advanced R: Data Programming and the Cloud 1st Edition


Matt Wiley

https://textbookfull.com/product/advanced-r-data-programming-and-
the-cloud-1st-edition-matt-wiley/

Biota Grow 2C gather 2C cook Loucas

https://textbookfull.com/product/biota-grow-2c-gather-2c-cook-
loucas/

Functional Programming in R: Advanced Statistical


Programming for Data Science, Analysis and Finance 1st
Edition Thomas Mailund

https://textbookfull.com/product/functional-programming-in-r-
advanced-statistical-programming-for-data-science-analysis-and-
finance-1st-edition-thomas-mailund/

Advanced Object-Oriented Programming in R: Statistical


Programming for Data Science, Analysis and Finance 1st
Edition Thomas Mailund

https://textbookfull.com/product/advanced-object-oriented-
programming-in-r-statistical-programming-for-data-science-
analysis-and-finance-1st-edition-thomas-mailund/
Metaprogramming in R: Advanced Statistical Programming
for Data Science, Analysis and Finance 1st Edition
Thomas Mailund

https://textbookfull.com/product/metaprogramming-in-r-advanced-
statistical-programming-for-data-science-analysis-and-
finance-1st-edition-thomas-mailund/

Functional Data Structures in R: Advanced Statistical


Programming in R Mailund

https://textbookfull.com/product/functional-data-structures-in-r-
advanced-statistical-programming-in-r-mailund/

Advanced linear modeling statistical learning and


dependent data 3rd Edition Christensen R

https://textbookfull.com/product/advanced-linear-modeling-
statistical-learning-and-dependent-data-3rd-edition-
christensen-r/

Functional Data Structures in R: Advanced Statistical


Programming in R Thomas Mailund

https://textbookfull.com/product/functional-data-structures-in-r-
advanced-statistical-programming-in-r-thomas-mailund/

Machine Learning with R Cookbook Second Edition Analyze


data and build predictive models Bhatia

https://textbookfull.com/product/machine-learning-with-r-
cookbook-second-edition-analyze-data-and-build-predictive-models-
bhatia/
Matt Wiley and Joshua F. Wiley

Advanced R Statistical Programming


and Data Models
Analysis, Machine Learning, and Visualization
Matt Wiley
Columbia City, IN, USA

Joshua F. Wiley
Columbia City, IN, USA

Any source code or other supplementary material referenced by the


author in this book is available to readers on GitHub via the book’s
product page, located at www.​apress.​com/​9781484228715 . For more
detailed information, please visit http://​www.​apress.​com/​source-code
.

ISBN 978-1-4842-2871-5 e-ISBN 978-1-4842-2872-2


https://doi.org/10.1007/978-1-4842-2872-2

Library of Congress Control Number: 2019932986

© Matt Wiley and Joshua F. Wiley 2019

This work is subject to copyright. All rights are reserved by the


Publisher, whether the whole or part of the material is concerned,
specifically the rights of translation, reprinting, reuse of illustrations,
recitation, broadcasting, reproduction on microfilms or in any other
physical way, and transmission or information storage and retrieval,
electronic adaptation, computer software, or by similar or dissimilar
methodology now known or hereafter developed.

Trademarked names, logos, and images may appear in this book. Rather
than use a trademark symbol with every occurrence of a trademarked
name, logo, or image we use the names, logos, and images only in an
editorial fashion and to the benefit of the trademark owner, with no
intention of infringement of the trademark. The use in this publication
of trade names, trademarks, service marks, and similar terms, even if
they are not identified as such, is not to be taken as an expression of
opinion as to whether or not they are subject to proprietary rights.

While the advice and information in this book are believed to be true
and accurate at the date of publication, neither the authors nor the
editors nor the publisher can accept any legal responsibility for any
errors or omissions that may be made. The publisher makes no
warranty, express or implied, with respect to the material contained
herein.

Distributed to the book trade worldwide by Springer Science+Business


Media New York, 233 Spring Street, 6th Floor, New York, NY 10013.
Phone 1-800-SPRINGER, fax (201) 348-4505, e-mail orders-
ny@springer-sbm.com, or visit www.springeronline.com. Apress Media,
LLC is a California LLC and the sole member (owner) is Springer
Science + Business Media Finance Inc (SSBM Finance Inc). SSBM
Finance Inc is a Delaware corporation.
Introduction
This book shows how to conduct data analysis using the popular R
language. Our goal is to provide a practical resource for conducting
advanced statistical analyses using R . As this is an advanced book, the
reader is assumed to have some background in using R , including
familiarity with general data management and the use of functions.
Because the book is primarily practical, we do not provide in-depth
theoretical or conceptual introductions to the various statistical models
discussed. However, to aid understanding and their appropriate
application, we do provide some conceptual background on each
analytic technique discussed.

Conventions
Bold lowercase letters are used to refer to a vector, for example, x . Bold
uppercase letters are used to refer to a matrix, for example, X .
Generally, the Latin alphabet is used for data and the Greek alphabet is
used for parameters. Mathematical functions are indicated with
parentheses, for example, f (·).
In the text, reference to R code or function will be in monospaced
font like this. R function names have parentheses included to
help indicate it is a function, such as mean() to indicate the mean
function in R .

Package Setup
Throughout the book, we will make use of many different R packages
that make tasks easier or provide more robust or sophisticated
graphing and analysis options.
Although not required for readers, we make use of the
checkpoint package to help ensure the book is reproducible [23]. If
you do not care about reproducibility and are happy to take your
chances that our code that worked with one version of R and packages
also works with whatever versions you have, then you can just skip
reading this section. If you want reproducibility, but do not care why or
how it works, then just create R scripts for the code for each chapter,
save them, and then run the checkpoint package at the beginning. If
you care and want to know why and how it all works, read on the next
few paragraphs.
Details on Reproducibility
The many additional packages available for R are one of its greatest
strengths. However, they also create some challenges. For example, as a
reader, suppose that on your computer, you have R v3.4.3 installed
and as part of that in January you had installed the ggplot2 package
for graphs. By default, you will have whatever version of ggplot2 was
available in January when you installed it. Now in one chapter, we tell
you that you need both the ggplot2 and cowplot packages. Because
you already had ggplot2 installed, you do not need to install it again.
However, suppose that you did not have the cowplot package
installed. So, whenever you happen to be reading that chapter, you
attempt to install the cowplot package, let’s say it’s in April. You will
now by default get the latest version of cowplot available for that
version of R as of April.
Now imagine a second reader comes along and also had R v3.4.3
but had neither the ggplot2 nor the cowplot package installed. They
also read the chapter in April, but they install both packages in April, so
they get the latest version of both packages available in April for R
v3.4.3 .
Even though both you and the other reader had the same version of
R installed, you will end up with different package versions from each
other, and likely different versions yet from whatever versions we used
to write the book.
The end result is that different people, even with the same version
of R, very likely are using different versions of different packages. This
can pose a major challenge for reproducibility. If you are reading a
book, it can be a frustration because code does not seem to work as we
said it would. If you are using code in production or for scientific
research or decision-making, nonreproducibility can pose an even
bigger challenge.
The solution to standardize versions across people and ensure
results are fully reproducible is to control not only the version of R but
also the version of all packages. This requires a different approach to
package installation and management than the default system, which
uses the latest package versions from CRAN. The checkpoint
package is designed to solve this challenge. It does require some extra
steps and processes to use, and at first may seem a nuisance, but the
payoff is that you can be guaranteed that you are not only using the
same version of R but also the same version of all packages.
To understand how the checkpoint package works, we need a bit
more background regarding how R ’s libraries and package system
work.
Mainstream R packages are distributed through CRAN. Package
authors can submit new versions of their packages to CRAN, and CRAN
updates nightly. For some operating systems, CRAN just stores the
package source code, such as for Linux machines. For others, such as
Windows operating systems, CRAN builds precompiled package
binaries and hosts those. CRAN keeps old source code but generally not
old binary packages for long. On a local machine, when
install.packages is run, R goes online to a repository, by default
CRAN, finds the package name, downloads it, and installs it into a local
library . The local library is basically just a directory on your own
machine. R has a default location it likes to use as its local library, and
by default when you install packages, they are added to the default
library. Once a package is installed, when it is loaded or opened using
library(), R goes to its default library, finds a package with the
same name, and opens it.
The checkpoint package works by creating a new library on the
local machine, for a particular version of R for a particular date. Then it
scans all the R script files in R ’s current working directory—you can
identify this using the getwd() function—and identifies any calls to
the library() or require() functions. Then it goes and checks
whether those packages are installed in the local library. If they are not,
it goes to a snapshot of CRAN taken by another server setup to support
the checkpoint package. That way, checkpoint can install the
version of the package available from a specific date. In that way, the
checkpoint package can ensure that you have the same specific
version of R and specific version of all packages that we used when
writing the book. Or if you are trying to re-run some analysis from a
year ago, you can get the same version of those packages on a new
computer.
Assuming that you have the following code in an R script, you can
use the checkpoint package to read the R script and find the call to
library(data.table), and it will install the data.table
package, which is a great package for data management [29]. If you do
not want checkpoint to look in the current working directory, you
can specify the project path, as we do to the book in this example. You
can also change where checkpoint sets its library to another folder
location, instead of the default location, which we also do. We
accomplish both of these using variables set as part of our R project,
book_directory and checkpoint_directory . If you are using
checkpoint on your own machine, set those variables to the relevant
directories, for example, as book_directory <-
"path/to/your/directory" . Note that whatever folder you
choose, R will need read and write privileges for that folder.

library(checkpoint)
checkpoint("2018-09-28", R. version = "3.5.1",
project = book_directory,
checkpointLocation = checkpoint_directory,
scanForPackages = FALSE,
scan.rnw.with.knitr = TRUE, use.knitr = TRUE)

library(data.table)

options(
width = 70,
stringsAsFactors = FALSE,
digits = 2)

Data Setup
One of the datasets we will use throughout this book is a longitudinal
study, the Americans’ Changing Lives (ACL) [45]. This is publicly
available data and can be downloaded by going to
http://doi.org/10.3886/ICPSR04690.v7 .
The Americans’ Changing Lives (ACL) is a longitudinal study with
five waves of data, shown in Table I-1 .

Table I-1 ACL Study Collection Waves

Wave Year
W1 1986
W2 1989
W3 1994
W4 2002
W5 2011

All we need is the data file in R format, which should be called


04690-0001-Data.rda . You may also find it helpful to download
the PDF documentation of the dataset for more details about the study.
After you have downloaded the data, you should extract the zip folder.
After setting up our R session and necessary libraries, we load the
data. You will need to adjust the path to wherever you saved the data
file after extracting it from the zip folder. Because it is a RDA file,
loading it loads an R object into the workspace. Next we convert to a
data table, select just the variables we are going to use for this book,
and change the variable names to be a bit more intuitive. The suffix
(e.g., “W1”) indicates which wave the variable comes from. Finally, we
convert some variables to factor class and then save the dataset using
the saveRDS() function with compression. This will allow us to read
our cleaned dataset back into R in later chapters with ease and to
assign it to any object name we wish, rather than being stuck with the
object name in the RDA file.

load ("../ICPSR_04690/DS0001/04690-0001-
Data.rda")
ls ()
## [1]
"book_directory" "checkpoint_directory"
## [3]
"da04690.0001" "render_apress"

acl <- as.data.table(da04690.0001)


acl <- acl[, .(
V2, V1801, V2101, V2064,
V3007, V2623, V2636, V2640,
V2000,
V2200, V2201, V2202,
V2613, V2614, V2616,
V2618, V2681,
V7007, V6623, V6636, V6640,
V6201, V6202,
V6613, V6614, V6616,
V6618, V6681
)]

setnames(acl, names(acl), c(
"ID", "Sex", "RaceEthnicity", "SESCategory",
"Employment_W1", "BMI_W1", "Smoke_W1",
"PhysActCat_W1",
"AGE_W1",
"SWL_W1", "InformalSI_W1", "FormalSI_W1",
"SelfEsteem_W1", "Mastery_W1",
"SelfEfficacy_W1",
"CESD11_W1", "NChronic12_W1",
"Employment_W2", "BMI_W2", "Smoke_W2",
"PhysActCat_W2",
"InformalSI_W2", "FormalSI_W2",
"SelfEsteem_W2", "Mastery_W2",
"SelfEfficacy_W2",
"CESD11_W2", "NChronic12_W2"
))

acl[, ID := factor(ID)]
acl[, SESCategory := factor(SESCategory)]
acl[, SWL_W1 := SWL_W1 * -1]

saveRDS(acl, "advancedr_acl_data.RDS", compress


= "xz")
Acknowledgments
To our dear family, who may not always understand everything we
write, yet are nevertheless content to place our books on fireside
mantels and coffee tables.
Table of Contents
Chapter 1:​Univariate Data Visualization
1.​1 Distribution
Visualizing the Observed Distribution
Stacked Dot Plots and Histograms
Density Plots
Comparing the Observed Distribution with Expected
Distributions
Q-Q Plots
Density Plots
Fitting More Distributions
1.​2 Anomalous Values
1.​3 Summary
Chapter 2:​Multivariate Data Visualization
2.​1 Distribution
2.​2 Anomalous Values
2.​3 Relations Between Variables
Assessing Homogeneity of Variance
2.​4 Summary
Chapter 3:​GLM 1
3.​1 Conceptual Background
3.​2 Categorical Predictors and Dummy Coding
Two-Level Categorical Predictors
Three- or More Level Categorical Predictors
3.​3 Interactions and Moderated Effects
3.​4 Formula Interface
3.​5 Analysis of Variance
Conceptual Background
ANOVA in R
3.​6 Linear Regression
Conceptual Background
Linear Regression in R
High-Performance Linear Regression
3.​7 Controlling for Confounds
3.​8 Case Study:​Multiple Linear Regression with Interactions
3.​9 Summary
Chapter 4:​GLM 2
4.​1 Conceptual Background
Logistic Regression
Count Regression
4.2 R Examples
Binary Logistic Regression
Ordered Logistic Regression
Multinomial Logistic Regression
Poisson and Negative Binomial Regression
4.​3 Case Study:​Multinomial Logistic Regression
4.​4 Summary
Chapter 5:​GAMs
5.​1 Conceptual Overview
Smoothing Splines
5.2 GAMs in R
Gaussian Outcomes
Binary Outcomes
Unordered Outcomes
Count Outcomes
5.​3 Summary
Chapter 6:​ML:​Introduction
6.​1 Training and Validation Data
6.​2 Resampling and Cross-Validation
6.​3 Bootstrapping
6.​4 Parallel Processing and Random Numbers
foreach
6.​5 Summary
Chapter 7:​ML:​Unsupervised
7.​1 Data Background and Exploratory Analysis
7.​2 kmeans
7.​3 Hierarchical Clusters
7.​4 Principal Component Analysis
7.​5 Non-linear Cluster Analysis
7.​6 Summary
Chapter 8:​ML:​Supervised
8.​1 Data Preparation
One Hot Encoding
Scale and Center
Transformations
Train vs.​Validation Data
Principal Component Analysis
8.​2 Supervised Learning Models
Support Vector Machines
Classification and Regression Trees
Random Forests
Stochastic Gradient Boosting
Multilayer Perceptron
8.​3 Summary
Chapter 9:​Missing Data
9.​1 Conceptual Background
Multiple Imputation
9.2 R Examples
Multiple Imputation with Regression
Multiple Imputation with Parallel Processing
Multiple Imputation Using Random Forests
9.​3 Case Study:​Multiple Imputation with RFs
9.​4 Summary
Chapter 10:​GLMMs:​Introduction
10.​1 Multilevel Data
Reshaping Data
Daily Dataset
10.​2 Descriptive Statistics
Basic Descriptives
Intraclass Correlation Coefficient (ICC)
10.​3 Exploration and Assumptions
Distribution and Outliers
Time Trends
Autocorrelation
Assumptions
10.​4 Summary
Chapter 11:​GLMMs:​Linear
11.​1 Theory
Generalized Linear Mixed Models
Mixed Effects vs.​Multilevel Model Terminology
Statistical Inference
Effect Sizes
Random Intercept Model
Visualizing Random Effects
Interpreting Random Intercept Models
Random Intercept and Slope Model
Intercepts and Slopes as Outcomes
11.2 R Examples
Linear Mixed Model with Random Intercept
Linear Mixed Model with Random Intercept and Slope
11.​3 Summary
Chapter 12:​GLMMs:​Advanced
12.​1 Conceptual Background
12.​2 Logistic GLMM
Random Intercept
Random Intercept and Slope
12.​3 Poisson and Negative Binomial GLMMs
Random Intercept
Random Intercept and Slope
12.​4 Summary
Chapter 13:​Modelling IIV
13.​1 Conceptual Background
Bayesian Inference
What Is IIV?​
Intra-individual Variability as a Predictor
Software Implementation:​VARIAN
13.​2 R Examples
IIV Predicting a Continuous Outcome
13.​3 Summary
Bibliography
Index
About the Authors and About the Technical
Reviewer

About the Authors


Matt Wiley
is a tenured, associate professor of
mathematics with awards in both
mathematics education and honors
student works. He earned degrees in
pure mathematics, computer science,
and business administration through the
University of California and Texas A&M
University Systems. He serves as director
of quality enhancement at Victoria
College, facilitating comprehensive
assessment programs, key performance
indicator dashboards and one-click
reports, and data consultation for
campus stakeholders. Outside academia, he is managing partner at
Elkhart Group LLC, a statistical consultancy. With experience in
programming R , SQL , C++ , Ruby , Fortran , and JavaScript , he
has always found ways to meld his passion for writing with his joy of
logical problem solving and data science. From the boardroom to the
classroom, Matt enjoys finding dynamic ways to partner with
interdisciplinary and diverse teams to make complex ideas and projects
understandable and solvable.

Joshua F. Wiley
is a lecturer in the Monash Institute of Cognitive and Clinical
Neurosciences and School of Psychological Sciences at Monash
University. He earned his PhD from the University of California, Los
Angeles, and completed his postdoctoral training in primary care and
prevention. His research uses advanced quantitative methods to
understand the dynamics between
psychosocial factors, sleep, and other
health behaviors in relation to
psychological and physical health. He
develops or codevelops a number of R
packages including varian , a package
to conduct Bayesian scale-location
structural equation models, and
MplusAutomation , a popular package
that links R to the commercial Mplus
software, and miscellaneous functions to
explore data or speed up analysis in
JWileymisc .

About the Technical Reviewer


Andrew Moskowitz
is an analytics and data science
professional in the entertainment
industry focused on understanding user
behavior, marketing attribution and
efficacy, and using advanced data science
concepts to address business problems.
He earned his PhD in quantitative
psychology at the University of
California, Los Angeles, where he
focused on hypothesis testing and mixed
effects models.
© Matt Wiley and Joshua F. Wiley 2019
Matt Wiley and Joshua F. Wiley, Advanced R Statistical Programming and Data Models
https://doi.org/10.1007/978-1-4842-2872-2_1

1. Univariate Data Visualization


Matt Wiley1 and Joshua F. Wiley1

(1) Columbia City, IN, USA

Most statistical models discussed in the rest of the book make


assumptions about the data and the best model to use for them. As data
analysts, we often must specify the distribution that we assume the
data come from. Anomalous values, also called extreme values or
outliers, may also have undue influence on the results from many
statistical models. In this chapter, we examine visual and graphical
approaches to exploring the distributions and anomalous values for
one variable at a time (i.e., univariate). The goal of this chapter is not
specifically to create beautiful or publication quality graphs nor to
show results, but rather to use graphs to understand the distribution of
a variable and identify anomalous values. This chapter focuses on
univariate data visualization, and the next chapter will employ some of
the same concepts but applied to multivariate distributions and cover
how to assess the relations between variables.

library(checkpoint)
checkpoint("2018-09-28", R.version = "3.5.1",
project = book_directory,
checkpointLocation = checkpoint_directory,
scanForPackages = FALSE,
scan.rnw.with.knitr = TRUE, use.knitr = TRUE)

library(knitr)
library(ggplot2)
library(cowplot)
library(MASS)
library(JWileymisc)
library(data.table)

options(width = 70, digits = 2)


The ggplot2 package [109] creates elegant graphs, and the
cowplot package is an add-on that makes graphs cleaner [117]. The
MASS package provides functions to test how well different
distributions fit data [98]. The JWileymisc package is maintained by
one of this text’s authors and provides miscellaneous functions that
allow us to focus on the graphics in this chapter [114]. The
data.table package will be used a lot for data management [29].

1.1 Distribution
Visualizing the Observed Distribution
Many statistical models require that the distribution of a variable be
specified. Histograms use bars to graph a distribution and are probably
the most common graph used to visualize the distribution of a single
variable. Although relatively rare, stacked dot plots are another
approach and provide a precise way to visualize the distribution of data
that shows the individual data points. Finally, density plots are also
quite common and are graphed by using a line that shows the
approximate density or amount of data falling at any given value.

Stacked Dot Plots and Histograms


Dot plots work by plotting a dot for each observed data value, and if
two dots would fall on top of each other, they are stacked up [118].
Compared to histograms or density plots, dot plots are unique in that
they actually plot the raw individual data points, rather than
aggregating or summarizing them. This makes dot plots a nice place to
start looking at the distribution or spread of a variable, particularly if
you have a relatively small number of observations.
The granular approach, plotting individual data points, is also dot
plots limitation. With even moderately large datasets (e.g., several
hundred), it becomes impractical to plot individual values. With
thousands or millions of observations, dot plots are even less effective
at visualizing the overall distribution.
We can create a plot easily using ggplot2, and the results are
shown in Figure 1-1.

ggplot(mtcars, aes(mpg)) +
geom_dotplot()

## 'stat_bindot()' using 'bins = 30'. Pick


better value with 'binwidth'.

Figure 1-1 Stacked dot plot of miles per gallon from old cars

As a brief aside, much of the code for ggplot2 follows the format
shown in the following code snippet. In our case, we wanted a dot plot,
so the geometric object, or “geom”, is a dot plot (geom_dotplot() ).
Many excellent online tutorials and books exist to learn how to use the
ggplot2 package for graphs, so we will not provide a greater
introduction to ggplot2 here. In particular, Hadley Wickham, who
develops ggplot2, has a recently updated book on the package,
ggplot2: Elegant Graphics for Data Analysis [109], which is an excellent
guide. For those who prefer less conceptual background and more of a
cookbook, we recommend the R Graphics Cookbook by Winston Chang
[20].

ggplot(the-data, aes(variable-to-plot)) +
geom_type-of-graph()
Unlike a dot plot that plots the raw data, a histogram is a bar graph
where the height of the bar is the count of the number of values falling
within the range specified by the width of the bar. You can vary the
width of bars to control how many nearby values are aggregated and
counted in one bar. Narrower bars aggregate fewer data points and
provide a more granular view. Wider bars aggregate more and provide
a broader view. A histogram showing the distribution of sepal lengths
of flowers from the famous iris dataset is shown in Figure 1-2.

ggplot(iris, aes(Sepal.Length)) +
geom_histogram()

## 'stat_bin()' using 'bins = 30'. Pick better


value with 'binwidth'.

Figure 1-2 Histogram of sepal length from the iris data


If you know the shape of a distribution (e.g., a normal distribution),
you can examine whether the histogram for a variable looks like the
shape of a distribution you recognize. In the case of the sepal length
data, they appear approximately normally distributed, although they
are clearly not perfect.
If data do not appear to follow the distribution we hoped for (e.g.,
normal), it is common to apply a transformation to the raw data. Again,
histograms are a useful way to examine how the distribution looks after
transformation. Figure 1-3 shows a histogram of annual Canadian lynx
trappings. From the graph we can see the variable is positively skewed
(has a long right tail).

ggplot(data.table(lynx = as.vector(lynx)),
aes(lynx)) +
geom_histogram()

## 'stat_bin()' using 'bins = 30'. Pick better


value with 'binwidth'.
Figure 1-3 Histogram of annual Canadian lynx trappings
For positive skew, a square root or log transformation can help to
reduce positive skew and make variables closer to a normal
distribution, assuming that there are no negative values. This histogram
of lynx trappings after a natural log transformation is shown in Figure
1-4.

ggplot(data.table(lynx = as.vector(lynx)),
aes(log(lynx))) +
geom_histogram()

## 'stat_bin()' using 'bins = 30'. Pick better


value with 'binwidth'.
Figure 1-4 Histogram of annual Canadian lynx trappings after a natural log
transformation

Density Plots
Another common tool to visualize the observed distribution of data is
by plotting the empirical density. The code for ggplot2 is identical to
that for histograms except that geom_histogram() is replaced with
geom_density() . The code follows and the result is shown in Figure
1-5.

ggplot(iris, aes(Sepal.Length)) +
geom_density()
Figure 1-5 This is the density plot for our sepal lengths
Empirical density plots include some degree of smoothing, because
with continuous variables, there is never going to be many observations
at any specific value (e.g., it may be that no observation has a value of
3.286, even though there are values of 3.281 and 3.292). Empirical
density plots show the overall shape of the distribution by applying
some degree of smoothing. At times it can be helpful to adjust the
degree of smooth to see a coarser (closer to the raw data) or smoother
(closer to the “distribution”) graph. Smoothing is controlled in
ggplot2 using the adjust argument. The default, which we saw in
Figure 1-5, is adjust = 1. Values less than 1 are “noisier” or have less
smoothing, while values greater than 1 increase the smoothness. We
compare and contrast noisier in Figure 1-6 vs. very smooth in Figure 1-
7.

ggplot(iris, aes(Sepal.Length)) +
geom_density(adjust = .5)
ggplot(iris, aes(Sepal.Length)) +
geom_density(adjust = 5)

Figure 1-6 A noisy density plot


Another random document with
no related content on Scribd:
[1039] Ames (to Dwight), I, 173-75.
[1040] Argus, August 13, 1795.
[1041] Centinel, July 15, 1795.
[1042] Pickering, III, 177.
[1043] King’s Works, II, 18-20.
[1044] Lodge, Cabot, 84.
[1045] Pellew, 282.
[1046] Federalist Party in Massachusetts, 154-55.
[1047] Ibid.
[1048] Gibbs, I, 229.
[1049] August 15, 1795.
[1050] Lodge, Cabot, 84.
[1051] Aurora, July 29, 1795.
[1052] Charleston City Gazette, August 1, 1795.
[1053] Thomas, Reminiscences, I, 35.
[1054] Independent Chronicle, August 17, 1795.
[1055] August 26, 1795.
[1056] Article IX.
[1057] Giles, 42.
[1058] McRee, Iredell, II, 450.
[1059] Ibid., II, 459.
[1060] Madison’s Writings, II, 43.
[1061] Giles, 38.
[1062] Henry, Henry, II, 568-71; letter to Mrs. Aylett.
[1063] Argus, July 30, 1795; Gazette of the United States, August 14, 1795.
[1064] Argus, July 24, 1795.
[1065] New Hampshire Gazette, July 21, 1795.
[1066] Spooner’s Vermont Journal, September 11, 1795.
[1067] Gibbs, I, 215.
[1068] Independent Chronicle, August 13 and 27, 1795.
[1069] Ibid., September 3, 1795.
[1070] Argus, July 15, 1795.
[1071] Aurora, July 13, 1795.
[1072] Argus, August 14, 1795.
[1073] Ibid., August 8, 1795.
[1074] Gibbs, I, 249.
[1075] Steiner, 194-95.
[1076] Weld, I, 102-03.
[1077] Liancourt, II, 79.
[1078] Argus, July 16, 1795.
[1079] September 3, 1795.
[1080] Gibbs, I, 219-20.
[1081] Pickering, III, 185.
[1082] King’s Works, II, 20-21.
[1083] Brown, Ellsworth, 219-20.
[1084] Hiltzheimer, 215.
[1085] For Randolph incident, Pickering, III, 213-14 and 216-19; Lodge, Cabot,
91-94.
[1086] Pickering, III, 196.
[1087] Ibid., 197.
[1088] King’s Works, II, 24.
[1089] August 14.
[1090] Brown, Ellsworth, 220-21.
[1091] Pickering, III, 199.
[1092] Aurora, August 21, 1795.
[1093] Ibid., August 22, 1795.
[1094] Gibbs, I, 222.
[1095] King’s story.
[1096] Aurora, November 17, 1795.
[1097] Pickering, III, 231-39.
[1098] Ibid., III, 239.
[1099] Argus, August 15, 1795.
[1100] Ibid., August 27, 1795.
[1101] Hamilton’s Works, X, 113-14.
[1102] Jefferson’s Works, IX, 309-11.
[1103] McRee, Iredell, II, 459.
[1104] Jefferson’s Works (to Giles), IX, 314-18.
[1105] Adams, Gallatin, 152.
[1106] Gibbs (to Goodrich), I, 303.
[1107] The second phase of his remarkable career is treated in the author’s Party
Battles of the Jackson Period.
[1108] Adams, Gallatin, 17.
[1109] Adams, Gallatin, 80.
[1110] Ibid., 81.
[1111] Ibid., 103-04.
[1112] Ibid., 111.
[1113] Ibid., 113.
[1114] Adams, Gallatin, 88; Writings, I, 3-4.
[1115] Annals, April 27, 1796.
[1116] Jefferson’s Works, IX, 328-29; to Monroe.
[1117] Judge Jonathan Elmer, Cumberland, New Jersey, Gazette of the United
States, March 12, 1796.
[1118] Gazette of the United States, March 26, 1796.
[1119] Melville, Cobbett, I, 101-02.
[1120] Annals, March 11, 1796.
[1121] Familiar Letters, 108; Twining, Travels, 51-52.
[1122] Aurora, March 28, 1796.
[1123] Hamilton’s Works (to Wolcott), X, 145.
[1124] Ibid., 145-46.
[1125] Ibid., 151.
[1126] Ibid., 152.
[1127] Ibid., 152-54.
[1128] Annals, March 30, 1796.
[1129] Annals, April 6, 1796. The vote was 57 to 36.
[1130] Jefferson’s Works, IX, 330-31.
[1131] Madison’s Writings, II, 89-91.
[1132] Hamilton’s Works, X, 157.
[1133] Hamilton’s Works, X, 160.
[1134] Ibid., 161.
[1135] Ibid., 161-62.
[1136] Madison’s Writings, II, 95.
[1137] Ibid., 98.
[1138] Morison, Otis, I, 56-57.
[1139] April 21, 1796.
[1140] Gibbs, I, 327.
[1141] Ibid., 325-26.
[1142] Ibid. (Wolcott to his father), I, 331.
[1143] Thomas, Reminiscences, 53.
[1144] Kirkland, Life of Ames; Thomas, Reminiscences; Familiar Letters, 24-25.
[1145] Ames (to Dwight), I, 173-75.
[1146] Ames (to Dwight), I, 175-76.
[1147] Ibid., 177.
[1148] Ibid., 180-81.
[1149] Ibid., 183-84.
[1150] Ibid. (to Jeremiah Smith), 184-85.
[1151] Aurora, February 2, 1796.
[1152] Ibid., February 8, 1796.
[1153] Ames (to Dwight).
[1154] Ibid. (to Minor), I, 190-91.
[1155] Ames, I, 199-200, note.
[1156] Madison’s Writings (to Jefferson), II, 100-01.
[1157] Ibid., 103-05.
[1158] Jefferson’s Works, IX, 330-31.
[1159] Randall, II, 273.
[1160] Jefferson’s Works, IX, 335-37.
[1161] Ibid., 339-43.
[1162] Ibid. (letter to Williams), 346-48.
[1163] Jefferson’s Works (Mazzei letter), IX, 335-37.
[1164] Beveridge, Marshall, II, 156.
[1165] King’s Works, II, 46.
[1166] Henry, Henry, II, 515.
[1167] Beveridge, II, 157.
[1168] King’s Works, II, 48; Beveridge, II, 158.
[1169] Hamilton’s Works, X, 163; King’s Works, II, 47.
[1170] King’s Works (to Hamilton), II, 46.
[1171] Gazette of the United States, November 3, 1796.
[1172] Aurora, September 1, 1796.
[1173] Gibbs, I, 332; (Wolcott to his father), I, 350-52.
[1174] Ibid. (Wolcott to his wife), I, 209.
[1175] Hamilton’s Works (to Washington), X, 198-200; 200-01.
[1176] Madison’s Writings (to Jefferson), II, 103-05.
[1177] Steiner, McHenry, 203.
[1178] Aurora, November 24, 1796.
[1179] Ibid., December 27, 1796.
[1180] Gibbs, II, 386-88.
[1181] Ibid., I, 408-09.
[1182] Ibid., I, 400-03.
[1183] Gibbs, I, 411-13.
[1184] Ames (to Dwight), I, 208.
[1185] King’s Works, II, 148.
[1186] Madison’s Writings, II, 108.
[1187] Jefferson’s Works, IX, 352-55.
[1188] Ibid., 355-57.
[1189] Ibid., 355-57.
[1190] Ibid., 367-69.
[1191] Aurora, March 6, 1797.
[1192] Gibbs, II, 213.
[1193] Twining, 38.
[1194] Maclay, 30.
[1195] Twining, 37.
[1196] Twining, 37.
[1197] Familiar Letters, 116.
[1198] Maclay, 44.
[1199] Diary, II, 25.
[1200] Twining, 37.
[1201] Maclay, 14.
[1202] Ibid., 30.
[1203] Ibid., 206.
[1204] Ibid., 145, 206.
[1205] Diary, II, 57.
[1206] Ibid., 25.
[1207] Gibbs, I, 455-57; Wolcott, Sr.
[1208] Hamilton’s Works, VII, 734.
[1209] Morse, 242.
[1210] Maclay, 86.
[1211] Jefferson’s Works (to Madison), VI, 63-67.
[1212] Lodge, Cabot, 65.
[1213] Liancourt, II, 124.
[1214] Madison’s Writings (to Jefferson), II, 111.
[1215] Gibbs, I, 468.
[1216] Ibid., II, 215.
[1217] Ibid. (McHenry to Wolcott), 395.
[1218] Steiner, 477.
[1219] Diary, III, 392.
[1220] Ibid., III, 393.
[1221] Adams, Works (to James Lovell), VIII, 493-94.
[1222] Autobiography, II, 438.
[1223] Adams, Works, IV, 420.
[1224] Ibid., VI, 462.
[1225] Morse, 247.
[1226] Maclay, May 28, 1789.
[1227] Written by Samuel Adams.
[1228] Autobiography, II, 310.
[1229] Ibid., 508.
[1230] Adams, Adams, I, 404.
[1231] Adams, Works, VI, 484.
[1232] Autobiography, II, 210.
[1233] Ibid., 214.
[1234] Ibid., 215.
[1235] Ibid., 232, 311.
[1236] Jefferson’s tribute.
[1237] Morse, 59.
[1238] Ibid., 60.
[1239] Ibid., 61.
[1240] Hamilton’s Works (to John Steele), V, 25.
[1241] Jefferson’s Works (to Madison), VI, 63-71.
[1242] Hamilton’s Works, VII, 314.
[1243] Gibbs, I, 475-77.
[1244] Steiner, 569.
[1245] Autobiography, II, 230-32.
[1246] Adams, Adams, I, 446.
[1247] Diary, II, 62.
[1248] Vol. II, 145.
[1249] Morse, 79.
[1250] Diary, II, 179.
[1251] Ibid., 381.
[1252] Lodge, Studies in History, 201.
[1253] Pickering, IV, 386, 391.
[1254] Pickering, II, 156.
[1255] Ibid., III, 170.
[1256] Ibid., III, 171.
[1257] Louis Philippe; Pickering, III, 284-85.
[1258] Pickering, I, 215.
[1259] Ibid., 351.
[1260] Studies in History, 219.
[1261] Pickering, I, 5.
[1262] Ibid., I, 23-30.
[1263] Pickering, II, 381-90.
[1264] Ibid., I, 14.
[1265] Ibid., II, 66.
[1266] Lodge, Studies in History, 221.
[1267] Pickering, II, 71.
[1268] Ibid., II, 74.
[1269] Ibid., 78.
[1270] Ibid., 80.
[1271] Ibid., 81-85.
[1272] Pickering, I, 483-84.
[1273] Ibid., 487.
[1274] Ibid., II, 442 and 445.
[1275] Ibid., 451.
[1276] Ibid., 452.
[1277] Ibid., 488.
[1278] Gibbs, I, 18.
[1279] Ibid., 21.
[1280] Ibid., 20; Wadsworth to Wolcott.
[1281] Noah Webster’s impression, Gibbs, II, 11.
[1282] Gibbs, I, 65.
[1283] Gibbs I, 449.
[1284] Steiner, 2.
[1285] Steiner, 97.
[1286] Ibid., 100.
[1287] Ibid., 99.
[1288] Ibid., 107.
[1289] Ibid., 124.
[1290] Ibid., 129, 132.
[1291] Ibid., 140-41.
[1292] Ibid., 156.
[1293] Ibid., 51.
[1294] Steiner, 123.
[1295] Ibid., 145.
[1296] Hamilton’s Works, X, 129-31.
[1297] Steiner, 30.
[1298] Life of Hamilton, by his son, II, 241.
[1299] Steiner, 159; letter to Hamilton.
[1300] Roosevelt, Morris, 127.
[1301] Morris, Diary, I, 14.
[1302] Diary, I, 35.
[1303] Ibid., 133.
[1304] Ibid., 181.
[1305] La Belle Pamela, 217, note.
[1306] Diary, I, 75.
[1307] Ibid., 572.
[1308] Ibid., 556.
[1309] Roosevelt, Morris, 221-23.
[1310] Ames (to Gore), I, 134.
[1311] Familiar Letters, 356-57.
[1312] Madison’s Writings, II, 91-92.
[1313] Gibbs, I, 359.
[1314] Ibid.
[1315] Ibid., 366-68.
[1316] Hamilton’s Works, X, 234.
[1317] Ibid., 241.
[1318] Ibid., 243-46.
[1319] Ibid., 246-47.
[1320] Gibbs, I, 484-85.
[1321] Ibid., 486-87.
[1322] Ibid., 489-90; Hamilton’s Works, X, 251-52.
[1323] Hamilton’s Works, X, 253.
[1324] Gibbs, I, 537.
[1325] Lodge, Cabot, 129.
[1326] Ibid., 130-31.
[1327] Ibid., 137.
[1328] Hamilton’s Works, X, 261-65.
[1329] Steiner, 208-09.
[1330] Ibid., 213.
[1331] Adams, Works, VIII, 532-34; 535-36.
[1332] Gibbs, I, 463.
[1333] Lodge, Cabot, from Adams’s letters in the Boston Patriot.
[1334] Gibbs, I, 483.
[1335] Thomas, Reminiscences. The Aurora, March 21, 1797, printed his
application for membership.
[1336] The Aurora, June 17, 1797, asked whether he was ‘spy or parasite’ while
dining with the French Consul.
[1337] Familiar Letters, 107.
[1338] Annals, May 22, 1797.
[1339] Ibid.
[1340] Ibid., May 23, 1797.
[1341] Annals, May 24, 1797.
[1342] Ibid., May 25, 1797.
[1343] Steiner, 301; Murray to McHenry boasting that Harper’s pamphlet had gone
through several editions in England.
[1344] June 1, 1797.
[1345] Aurora, May 31, 1797.
[1346] Gazette of the United States, May 30, 1797.
[1347] Adams, Gallatin (to Nicholson), 183-84.
[1348] Annals, May 30, 1797.
[1349] Porcupine’s Gazette, June 3, 1797.
[1350] Annals, June 3, 1797.
[1351] Porcupine’s Gazette, June 6, 1797.
[1352] Jefferson’s Works, IX, 335-37.
[1353] Gazette of the United States, May 19, 1797.
[1354] Ibid., May 30, 1797.
[1355] Madison’s Writings, II, 118.
[1356] Porcupine’s Gazette, July 17, 1797.
[1357] Porcupine’s Gazette, December 14, 1797, January 13, 1798. It was this
Luther Martin who assailed Jefferson so bitterly in connection with his defense of
Aaron Burr in the trial for treason.
[1358] Ibid., January 29, 1798.
[1359] Gazette of the United States, March 6, 1798.
[1360] Ibid., April 18, 1798.
[1361] Porcupine’s Gazette, July 5, 1797.
[1362] Ibid., October 23, 1797.
[1363] Jefferson’s Works, IX, 408-11.
[1364] Domestic Life, 245.
[1365] Ibid., 249.
[1366] Porcupine’s Gazette, December 4, 1797.
[1367] Ibid., June 14, 1797.
[1368] Ibid., July 11, 1797.
[1369] Porcupine’s Gazette, November 8, 1797.
[1370] Ibid., November 10, 1797.
[1371] Ibid., August 8, 1797.
[1372] Ibid., July 5, 1797.
[1373] Ibid., August 8, 1797.
[1374] Gazette of the United States, April 5, 1797.
[1375] Aurora, July 19, 1797.
[1376] Aurora, October 10, 1797.
[1377] Pinckney, Life of Pinckney, 179.
[1378] Porcupine’s Gazette, March 10, 1798, has a letter quoting some of the filthy
lines.
[1379] Adams, Gallatin, 185-86.
[1380] Ibid., 184-85.
[1381] Melville, I, 108.
[1382] Porcupine’s Gazette, August 4, 1797.
[1383] Aurora, April 14, July 11 and 13, 1797.
[1384] Gazette of the United States, April 23, 1797.
[1385] Ibid., May 1, 1797.
[1386] Porcupine’s Gazette, July 1, 1797.
[1387] Adams, Gallatin (to his wife), 186-87.
[1388] Adams, Gallatin, 187; description of banquet, Aurora, July 17, 1797.
[1389] Porcupine’s Gazette, July 3, 1797.
[1390] Jefferson’s Works (to Mercer), IX, 421; (to Madison), IX, 405-07.
[1391] Gibbs, II, 12.
[1392] Porcupine’s Gazette, November 6, 1797.
[1393] Aurora, November 15, 1797.
[1394] Jefferson’s Works, X, 19-22.
[1395] Adams, Gallatin (to Mrs. Gallatin), 191.
[1396] Porcupine’s Gazette, February 16, 1798.
[1397] Ibid., February 9, 1798.
[1398] Ibid., February 15, 1798.
[1399] Ibid., February 14, 1798.
[1400] Henry Adams says: ‘Lyon, though a very rough specimen of democracy,
was by no means a contemptible man, and, politics aside, showed energy and
character in his subsequent career.’ (Adams, Gallatin, 192.)
[1401] Steiner, 291, 295.
[1402] Adams, Works, I, 515-17.
[1403] Coit, Annals, February 28, 1798.
[1404] Annals, March 2, 1798.
[1405] Ibid., March 13, 1798.
[1406] Jefferson’s Works, IX, 437-39.
[1407] April 14, 1798.
[1408] Jefferson’s Works, IX, 405-07.
[1409] Annals, March 27, 1798.
[1410] Hamilton’s Works, X, 279.
[1411] Independent Chronicle, March 26, 1798.
[1412] New York Time Piece, April 13, 1798.
[1413] Jefferson’s Works, X, 22-24.
[1414] Ibid., X, 24-26.
[1415] Madison’s Writings, II, 133.
[1416] Ibid. (to Jefferson), II, 138.
[1417] Centinel, May 30, 1798.
[1418] Independent Chronicle, November 22, 1798.
[1419] Porcupine’s Gazette, May 7, 1798.
[1420] Ibid., May 7, 1798.
[1421] Madison’s Writings (to Jefferson), II, 142.
[1422] Bache in a statement ascribed the incident to the intoxicated condition of
the youths. Time Piece, May 14, 1798.
[1423] Hamilton’s Works, X, 275-79.
[1424] Independent Chronicle, May 10, 1798.
[1425] Gazette of the United States, May 10; Porcupine’s Gazette, May 10, 1798.
[1426] Aurora, April 27, 1798.
[1427] Independent Chronicle, May 21, 1798.
[1428] New York Commercial Advertiser, October 19, 1798.
[1429] Ames, I, 232-35.
[1430] Gibbs (to Wolcott), II, 49.
[1431] Ibid., II, 117-20.
[1432] Porcupine’s Gazette, June 20, 1798.
[1433] Jefferson’s Works, X, 45-53.
[1434] Beveridge, II, 346-47.
[1435] Jefferson’s Works, X, 45-53.
[1436] Beveridge, II, 348.
[1437] New York Commercial Advertiser, October 31, November 5, 1798.
[1438] ‘Titus Manlius,’ Hamilton’s Works, V, 259-301.
[1439] Jefferson’s Works, X, 22-24.
[1440] Porcupine’s Gazette, May 23, 1798.
[1441] Ibid., May 24, 1798.
[1442] Ibid., May 26, 1798.
[1443] Porcupine’s Gazette, June 7, 1798.
[1444] Ibid., June 8, 1798.
[1445] Ibid., June 12, 1798.
[1446] Lodge, Cabot (to Wolcott), 153-54.
[1447] Independent Chronicle, April 9, 1798.
[1448] Gibbs, II, 46.
[1449] Independent Chronicle, August 9, 1798.
[1450] Ibid., December 6, 1798.
[1451] Centinel, September 29, 1798.
[1452] Centinel, December 15, 1798.
[1453] Porcupine’s Gazette, April 11, 1798.
[1454] Jefferson’s Works (to Madison), X, 33-36.
[1455] Ibid., X, 47-49.
[1456] Ibid. (to Samuel Smith), X, 55.
[1457] Porcupine’s Gazette, June 1, 1798.
[1458] Gazette of the United States, August 9, 1798.
[1459] Independent Chronicle, May 21, 1798.
[1460] Time Piece, May 25, 1798.
[1461] Ibid., May 28, 1798.
[1462] Ibid., June 11, 1798.
[1463] Jefferson’s Works (to Madison), X, 16-19.
[1464] Time Piece, May 18, 1798.
[1465] May 24, 1798.
[1466] October 15, 1798.
[1467] Jefferson’s Works (to Lewis), X, 36-37.
[1468] Ibid.
[1469] Jefferson’s Works (to Madison), X, 22-24; (to John Taylor), X, 63-67.
[1470] Ibid. (to S. Smith), X, 53-59.
[1471] King’s Works (Troup to King), II, 431-32.
[1472] August 20, 1798.
[1473] New York Commercial Advertiser, November 20, 1798.
[1474] Centinel, July 18, 1798.
[1475] Ibid., July 14, 1798.
[1476] Jefferson’s Works, X, 13-14.
[1477] Ibid., 15-16.
[1478] Ibid., 53-54.
[1479] Porcupine’s Gazette, July 21, 1798, makes a sneering comment.
[1480] Porcupine’s Gazette, July 23, 1798.
[1481] Time Piece, July 30, 1798.
[1482] Time Piece, June 13, July 2, 11, 13, 1798; Aurora, November 7, 1798.
[1483] Porcupine’s Gazette, December 22, 1798.
[1484] Ibid., May 8, 1798.
[1485] King’s Works, II, 376.
[1486] Randall, Jefferson, 400, note.
[1487] Volume II, 75, 77.
[1488] Time Piece, June 1, 1798.
[1489] Jefferson’s Works (to Madison), X, 33-36; 40-43.
[1490] Porcupine’s Gazette, July 11, 1798.
[1491] Jefferson’s Works (to Madison), X, 40.
[1492] Madison’s Writings (to Jefferson), II, 142.
[1493] Hamilton’s Works, X, 293.
[1494] Porcupine’s Gazette, April 30, 1798.
[1495] Ibid., May 1, 1798.
[1496] Hamilton’s Works, X, 295.
[1497] A reference to Hopkinson’s song.
[1498] Annals, June 21, 1798.
[1499] Annals, July 10, 1798.
[1500] July 28, 1798.
[1501] July 19, 1798.
[1502] Jefferson’s Works, X, 59-61.
[1503] King’s Works (Troup to King), II, 431-32.
[1504] Davis, 46-48.
[1505] King’s Works (Troup to King), II, 431-32.
[1506] Gazette of the United States, September 1, 1798.
[1507] Gibbs, II, 55.
[1508] Gazette of the United States, September 6, 1798.
[1509] Ames (to Dwight), I, 240.
[1510] September 17, 1798.
[1511] Henry, Henry, II, 612.
[1512] Ames (to Gore), I, 246.
[1513] Commercial Advertiser, October 17, 1798.
[1514] Porcupine’s Gazette, November 30, 1798.
[1515] Lodge, Cabot, 179-81.
[1516] Lodge, Cabot, 147.
[1517] Ibid. (to Pickering), 179.
[1518] Ibid., 172.
[1519] Aurora, February 12, 1800.
[1520] Aurora, February 22, 1800.
[1521] In Porcupine’s Gazette, February 2, 1799, Strubling attempts to explain his
failure to fight when resistance was offered.
[1522] Aurora, May 20, 1799.
[1523] Gazette of the United States, April 15, 1799.
[1524] April 29, 1800.
[1525] Judge Alexander Addison, Gazette of the United States, February 15, 1799;
Judge Iredell, April 9, 1799.
[1526] Gazette of the United States, May 10, 1799.
[1527] New York Commercial Advertiser, December 29, 1798.
[1528] Gazette of the United States, January 2, 1799.
[1529] Commercial Advertiser, December 28, 1799.
[1530] McLaughlin, Lyon; Wharton, State Trials, 333-44.
[1531] Centinel, February 27, 1799.
[1532] Aurora, June 20, 1799.
[1533] This connection was real.
[1534] Ames, I, 247.
[1535] Independent Chronicle, June 17, 1799; Gazette of the United States, June
17, 1799; ‘Enforcement of the Alien and Sedition Laws,’ by Anderson, American
Historical Association Report, 1912.
[1536] Independent Chronicle, February 18, 1799.
[1537] Ibid., October 25, 1798.
[1538] Ibid., October 29, 1798.
[1539] Ibid., November 5, 1798.
[1540] Independent Chronicle, February 25, 1799.
[1541] Ibid., April 11, 1799.
[1542] March 28, 1799, from ‘A Friend.’
[1543] Ibid., March 7, 1799.
[1544] Independent Chronicle, March 28, 1799.
[1545] Ibid., April 25, 1799.
[1546] Ibid.
[1547] Hudson, Journalism, 211-13.
[1548] Wharton, State Trials, 345-91; Hudson, Journalism, 213-14.
[1549] Aurora, October 22, 1799.
[1550] It was true, of course.
[1551] Wharton, State Trials, 658-81.
[1552] Aurora, April 25, 1800.
[1553] Adams’s answer in the case of Lyon.
[1554] Aurora, May 17, 1800.
[1555] Scharf, I, 505.
[1556] Robbins was turned over to the British, who claimed him as a national, and
was executed for murder on the seas. Even Gallatin thought this an outrage until
Marshall made his memorable speech in Congress in defense of the President’s
action.
[1557] Wharton, State Trials.
[1558] Hammond, I, 123-24.
[1559] Ibid., 131-32; Alexander, 89.
[1560] Carey’s Diary; Aurora, January 17, 1800.
[1561] Commercial Advertiser, April 23, 1800.
[1562] Aurora, April 9, 1800.
[1563] Independent Chronicle, August 9, 1798.
[1564] Ibid., November 1, 1798.
[1565] Ibid., November 26, 1798.
[1566] ‘Enforcement of the Alien and Sedition Laws,’ by Anderson, American
Historical Association Report, 1912.
[1567] Steiner, 436.
[1568] Thomas, Reminiscences.
[1569] The Nation, July 18, 1912; Moreau’s Journal.
[1570] Gazette of the United States, July 10, 1799.
[1571] Aurora, November 4, 1799.
[1572] Independent Chronicle, September 27, 1798.
[1573] Ibid.
[1574] Ibid.
[1575] Jefferson’s Works (to Madison), X, 119-21.
[1576] Ibid. (to Senator Mason), X, 61-62.
[1577] Warfield, The Kentucky Resolutions, 133-65.
[1578] Ibid., 55.
[1579] Ibid., 70.
[1580] Frank M. Anderson, ‘Contemporary Opinion of the Kentucky and Virginia
Resolutions,’ American Historical Review, October, 1899; January, 1900.
[1581] Professor Anderson calls attention to the fact that in Maryland the
endorsement of the Alien and Sedition Laws was made more prominent than the
condemnation of the proposed remedy.
[1582] Independent Chronicle, February 14, 1799.
[1583] Centinel, February 27, 1799.
[1584] Professor Anderson comments on this unfairness.
[1585] Anderson, op. cit.
[1586] Professor Anderson says: ‘The imprisonment of Adams indicates that the
Federalists were ready on the slightest provocation to treat opposition to the policy of
the Administration, whether federal or state, as crime. That case certainly does much
to explain why Jefferson and other Republican leaders could fear that Republican
institutions were about to be overthrown.’ American Historical Review, January,
1900, p. 229.
[1587] Anderson, op. cit.
[1588] Intimate Life, 323-24.
[1589] Hamilton’s Works, X, 287.
[1590] Hamilton’s Works, X, 301.
[1591] Ibid., 297-98.
[1592] Ibid., 310.
[1593] Ibid., 311.
[1594] Hamilton’s Works (to McHenry), X, 307.
[1595] Gibbs, II, 93-99.
[1596] Ibid.
[1597] Lodge, Cabot, 165-67.
[1598] Lodge, Cabot, 170-71.
[1599] Pickering, III, 432.
[1600] Gibbs, II, 99.
[1601] Ibid., 100.
[1602] Beveridge, II, 420.
[1603] Steiner, 354. Here, however, he qualifies.
[1604] Hamilton’s Works, X, 286.
[1605] Parton, Burr, I, 235-36.
[1606] Gibbs (Pickering to Wolcott), II, 71.
[1607] Ibid. (from Goodrich), 105.
[1608] Steiner (McHenry to Tracy), 328.
[1609] Ibid. (from James Ash), 333.
[1610] Ibid., 368.
[1611] Adams, Works, X, 120-23.
[1612] July 12, 1798.
[1613] September 17, 1798.
[1614] July 30, 1798.
[1615] King’s Works (from Troup), III, 35.
[1616] Hamilton’s Works, X, 354.
[1617] Jefferson’s Works (to Pendleton), X, 104-10.
[1618] Gibbs (Higginson to Wolcott), II, 177.
[1619] Adams, Works, X, 126-31.
[1620] Ibid.
[1621] January 28, 1799.
[1622] McMaster (II, 435) makes the statement that ‘Republicans were fully
determined that the direct tax should not be gathered.’ There is abundant evidence,
including the letter from Jefferson, previously quoted, that the Republicans thought
an insurrection against the collection the worse possible thing for the party.
[1623] March 22, 1799. This refers to Hamilton’s efforts to involve Gallatin in the
Whiskey Rebellion.
[1624] Aurora, April 14 and April 27, 1799; McMaster, II, 438-39.
[1625] Ibid., May 16, 1799; Hudson, 214; McMaster, II, 439.

You might also like