A Computational Investigation into the Authorship of Sister Peg

Abstract:This article engages with the longstanding debate over the authorship of the Scottish Militia pamphlet Sister Peg (1761). While previous evidence is born out of rigorous historical research, a debate remains between whether Adam Ferguson or David Hume was the author. This article uses computational stylometry to statistically investigate this question, with the aim of complementing existing historical evidence rather than overturning it. In doing this it concludes that the work was not written solely by David Hume and, instead, Adam Ferguson is likely to be the sole author or there was a more complicated history of co-authorship.

example, in the case of Adam Ferguson, acknowledging authorship may have been detrimental both financially and politically). Second, the question directly engages with the nature of authorship and anonymous publishing in the eighteenth-century, a time when the boundaries with respect to intellectual property and plagiarism differed from our own (witnessed not least of all in Hume's rather lavish borrowing for his History of England). 2 That is, the historical conception of who an author of a work was may not always converge with our own, and because of this one must remain open to various authors and forms of authorship.
In making its contribution to this discussion, this article turns to computer assisted stylometric methods to statistically investigate authorship. This is, unsurprisingly, a type of analysis that differs from earlier contributions. While previous, crucial, evidence is born out of rigorous historical research, as we have learned over the past 40 years, it remains inconclusive. This is not to say that the claims made in this article are of a superior sort; as Holmes has noted, stylometry "does not seek to overturn traditional scholarship by literary experts and historians" but instead "complement their work by providing an alternative means of investigating works of doubtful provenance." 3 It is with this point in mind that we aim to contribute to existing historical scholarship; we do not aim to add hypothetical speculation based on limited historical evidence, but instead complement existing research by providing new types of evidence-both with regard to the history of Sister Peg, and more generally as an example of how these techniques may be used in other historical cases. In doing this, this article concludes that the work was not written solely by David Hume and, instead, Adam Ferguson is likely to be the sole author or there was a more complicated history of co-authorship (although there is less evidence for this latter position). Before presenting our evidence for this position, however, it is necessary to layout the historical debates in both the primary and secondary literature.

HISTORY OF SISTER PEG
Alexander Carlyle claimed that Ferguson started writing Sister Peg in August 1760, a position supported by the latter part of the pamphlet recounting a speech delivered in April 1760. It was printed in London by William Strahan in November 1760, and published soon afterwards in association with the London bookseller William Owen. Early in 1761 an almost identical second edition was produced in the same way, and another variant of the second edition was printed by the Edinburgh printer Patrick Neill in association with Strahan. The imprint in all three of these editions mentioned only Owen: "printed for W. Owen, near Temple Bar," 4 and Neill's Edinburgh edition gave London as the place of publication. 5 Strahan was tied to members of the Edinburgh circle to various degrees, which included Ferguson and Hume. Other members of the circle include (at least) Carlyle, John Jardine, Hugh Blair, John Home, Henry Home (Lord Kames), and William Robertson. This group formed the core of the Edinburgh debating and socialising clubs known as the Select Society and the Poker Club, the latter of which was established especially to agitate for a Scots militia, and of which John Lee wrote: "Ferguson may almost be considered as the founder." 6 During the 1750s the group took part in a number of controversies in print-together they defended Hume and Kames against accusations of infidelity from the Kirk; came to Home's aid following the controversies around Douglas (1756); and had previously written in favour of the establishment of a Scottish militia. 7 There was, then, a clear intellectual kinship allowing for Sister Peg to have been authored by many members of the group.
The pamphlet's anonymity should not be taken as unusual. Carlyle notes that "since the Days of the Faction about the Tragedy of Douglas, 3 or 4 of us were supposed to be the authors of all the Pamphlets which rais'd publick attention, we shelter'd ourselves in the Crowd, and it was a Good While before the Real Writers were found out." Ferguson's Reflections previous to the establishment of a militia (1756), and Carlyle's The Question Relating to a Scots Militia (1760) were also published anonymously-the latter, Carlyle claimed, to avoid the "Spirit of Envy and Jealousy of the Clergy, which it would not be Easy to stand." 8 The necessity for anonymity is perhaps evident in the fact that the authorship of Sister Peg was a secret even amongst many in the Edinburgh circle. Carlyle claimed that only "ten or Dozen Males and Females" knew of the author. 9 In fact, it would seem that no-one attributed authorship in print until the second edition of the Memoirs of the Life and Writings of the Honourable Henry Home (1814), Alexander Fraser Tytler's biography of Kames, in which he wrote: "This ingenious satire is well known to have proceeded from the pen of one of the ablest of the Scottish writers of that era; I mean Dr Adam Ferguson." 10 This was followed by John Lee's 1824 entry for Ferguson in the Supplement to the Encyclopedia Britannica. 11 However, there was, at least, one claim to authorship soon after the pamphlet was printed: by Hume.
In a letter to Carlyle, Hume wrote that he had come to learn that Carlyle knew that a manuscript of Sister Peg, with Hume's corrections, had been traced to a London printer, and therefore his authorship discovered. He writes: "I had no other Reason for concealing myself but in order to try the Taste of the Public, whom, tho I [ . . . ] set in some degree at Defiance, I cannot sometimes forbear paying a little regard to." 12 This was not the only time that Hume made this claim. Jardine also reported that Hume took credit for the work, albeit after having first accused Jardine of being the author. During this exchange Hume asked that Jardine "Mention him as the author everywhere, that it might not fall on some of us who were not so able to bear it." 13 If one reads these claims in isolation it is reasonable to take Hume at his word. The case, however, is not so simple: Carlyle dismissed Hume's claim and instead identified Ferguson as the author, and Jardine's response is unknown.
Our record for Carlyle's claim comes from his autobiography, in which he wrote that he was first asked to write a satirical piece on the topic of the Scottish militia, but instead suggested Ferguson. Carlyle also notes that Hume was not part of the inner-circle who knew of Ferguson's authorship. 14 What is more, Hume's relationship to the militia question was mixed. 15 He had no real interest in efforts to preserve the military spirit among his countrymen, unlike Ferguson whose An Essay on Civil Society (1767) explicitly made a case for the ancient virtues of simplicity and martial valour as antidotes to modern corruption-a position which disappointed Hume. 16 A sympathetic interpretation of this story, then, is that Hume's claims were jokes aimed at those who he thought were the actual authors, in an attempt to tease out confessions. Additionally, when the group's relationship with the more conservative members of the clergy, and the support Hume's friends had previously provided him, are taken into account, it is entirely possible that his concern over Sister Peg's authorship was a concern that it not be attributed to someone unable to "bear it." 17 Hume was independently wealthy, and, having lived a life of religious controversy, had little to lose in public discussions when compared to his moderate Whig friends. He wrote himself that he was not concerned with the repercussions: "I am very indifferent about Princes or Preside[nts, Minist]ers of the Gospel or Ministers of State, Kings or Keysars, and set at Defiance all Powers, hum[an and] infernal." 18 However, for Ferguson, less well-off and both pro-Scotland and pro-British, this was dangerous territory.
In this light it may be difficult to see why Hume would have written the work, but easy to understand why he would have taken credit for it. It is also worth noting that after these two events in 1761-in the immediate aftermath of the publication of Sister Peg-we have no further records of Hume claiming authorship (although, and importantly, George Murray attributed the work to Hume in a letter to his brother on 3 March, 1761). 19 Carlyle and Jardine were not the only contemporaries of Ferguson to point to him as author. Ferguson's biographer John Lee has already been mentioned, to which we can also add Sir John Dalrymple, and perhaps most importantly, Adam Ferguson's son. 20 In the latter case, we have a copy of Sister Peg given to Walter Scott by the young Adam Ferguson. On the reverse of the title page it reads: "This excellent satire was written on occasion of Scotland being denied the advantage of a militia to protect the country. The eminent author Professor Adam Ferguson no less a warm patriot than an ardent investigator of historical and philosophical truth corrected this copy with his own hand." 21 Many, therefore, took Ferguson's authorship to be uncontroversial until Raynor's intervention in 1982. Importantly, some early reviewers, such as Robert McRae, were thoroughly convinced by Raynor's historical evidence ("Professor Raynor argues very convincingly that [ . . . ] it was Hume, not Ferguson, who was the author"), and others, such as Duncan Forbes, noted the strength of his historical arguments ("a nice piece of detective work and a very ingenious and entertaining display of learning"). However, a number of intellectual historians of the Scottish Enlightenment, such as Roger Emerson, Richard Sher, and John Robertson, questioned the attribution, with Emerson concluding that Raynor was only able to establish the "possibility" of Hume's authorship, and Sher arguing that, if Hume's letter to Carlyle is discarded, there is no reason to think that Hume was involved in Sister Peg. 22 The debate, therefore, remains open, with scholars both accepting Raynor's attribution and continuing to take the position that Ferguson was the sole author; 23 as Raynor states: the "jury remains out." 24 This, then, is a brief overview of the history of Sister Peg and its attribution. 25 With this in mind, there are at least four possibilities: First, that Ferguson was the sole author; second, that Hume was the sole author; third, that there were multiple authors, which could include Hume and/or Ferguson; and fourth, neither were involved. We do not engage with the final option for two reasons: first, historical evidence points to, at least, one of the two being the author, and thus it seems like a particularly imprudent argument based on historical evidence. Second, one cannot use the methods we have deployed to prove a negative. 26 We do, however, test the other three hypotheses.
To do this the article uses multiple stylometric methods to extract statistical results that support one author over others (that is, when there is a probability greater than pure chance of an author being identified), or provide strong evidence for collaboration between multiple authors. If our tests were unable to identify an author, this would indicate either the analysis itself was flawed, or another hypothesis was necessary with regards to authorship. As noted, however, our tests support the first hypothesis (Ferguson as sole author), reject the second hypothesis (Hume as sole author), and provide some evidence for the third hypothesis (collaboration), which we do not, therefore, reject. We do not claim that these results in themselves identify the author of Sister Peg-it is possible that the work was written by someone else for whom we have no historical evidence. Instead, these findings should be considered in combination with existing historical evidence and research.

STYLOMETRY INTRODUCTION
Stylometric authorship attribution has a history that can be traced back to the scholastics attempting to verify manuscripts. 27 The most well-known example, however, is Mosteller and Wallace's 1964 work attributing authorship of issues of The Federalist. More recently, with the proliferation of digital collections of texts, and the emergence of new statistical methods, techniques, and tools, traditional historians (rather than statisticians with a historical interest) are becoming increasingly interested in stylometry. 28 It is, therefore, a method which has been connected to historical research from its inception, and with regard to Sister Peg, Roger Emerson perceptively pointed out that "no real attempt has been made to show from stylistic evidence" whether Sister Peg resembles more Hume or Ferguson-something he wrote "could and should have been done." 29 It is, of course, true that judgements based on a particular author's style are, in many cases, subjective. What is more, 'style' can often be unstable-Sher notes that Ferguson was well aware of "the need for varying one's style to suit each particular genre." 30 However, the type of stylometry that we conduct is of the statistical sort: the counting of features within a text that are statistically indicative of a particular author in spite of topic or genre. That is, while an author switching from one genre to another certainly results in noticeable change from a reader's perspective, the underlying structure of the writing remains built upon the use of particular features-in most cases function words such as "the," "a," "if," "then," "well," "however," "thus," etc. Mike Kestemont, whose research represents the methodological state-of-the-art in authorship attribution, offers four reasons why function words are particularly powerful statistically: first, they are comparable: "authors writing in the same language and period are bound to use the very same function words"; second, they make up the most frequently used words in language, and are therefore more quantitatively robust; third, they are less likely to be topic or genre dependent; forth, their use is less consciously controlled by an author (and, we should add, due to their sheer numbers, less likely to be a point of intervention from an editor). 31 Thus, similarities and differences between these very frequent features are ideal in terms of units to measure and test for statistical significance.
It should be noted, however, that while stylometry is a method that is built upon the statistical sciences, it is not a technique that follows the straightforward application of codified methods onto texts that have been turned into some form of numerical data (as is the case with some other forms of natural language processing and quantitative text analysis). Instead, as Holmes discusses, a "methodology successful for one attributional problem does not necessarily 'work' for another." 32 The upshot of this, however, should not be that it disqualifies the application of statistical models to text, but instead, that we must emphasize the importance of robust and meticulous testing and verification in their application. That is, one must apply various methods, to various variables, making use of various parameters, to find, not the result that satisfies a hypothesis, but the result which demonstrates the methods used are the best fit for the data. 33 In our case, these variations include: types and number of independent variables (features), multiple statistical models, further fine-tuning based on the model being applied, and supervised and unsupervised testing. With the aim of being as robust as possible, we have run multiple tests making use of thousands of combinations of these variables, which were then examined for accuracy. The details and results of these tests follow.

ANALYSIS: DATA
The corpus used for these tests was constructed out of digitized versions of texts by Scottish intellectuals who were either suspected of authorship of Sister Peg (Adam Ferguson, David Hume, and Alexander Carlyle) or peers of theirs (Hugh Blair, Henry Home, and Adam Smith). Additional authors included to test the robustness of our methods were John Arbuthnot, Joseph Addison, Edmund Burke, Charlotte Lennox, and James Macpherson. Works not written in English were not included. 34 The total size of the Ferguson corpus is over 280 thousand words, and the Hume corpus is over 560 thousand words. A list of the titles included can be found in the appendix. The edition of Sister Peg used is a hand verified version of Raynor's Cambridge University Press edition, which is based on the London second edition (T122565), and which had a "few obvious typographical errors" corrected, "but no attempt [was] made to standardize or modernize spelling, punctuation or capitalization." 35 One additional concern was the potential for non-authorial choices to impact texts in a way that would make identification more difficult. Specifically, in the hand-press printing era, the compositor was "usually responsible for spelling and punctuation. Although occasionally authors were involved in the printing process and insisted on particular details, typically a compositor spelled words according to his custom, not as they were spelled in the copy text." 36 For this reason we created two versions of all texts to test against the possibility of a third party's hand influencing tests. In doing this we normalized variants in spelling such as "tho"/"though" and "suppos'd"/"supposed" to see if this had an impact on who was more statistically likely to be identified as the author. While there were some small variations with specific tests-in some cases attribution of validation data was higher, and in others it was lower-on the whole there is no impact on our results. 37

UNSUPERVISED TESTS
We then ran a number of unsupervised tests on all the authors in our dataset. These are methods that do not require intervention from the researcher when computing or comparing works (beyond choosing models and model-specific parameters). One simply provides texts, runs a statistical model on them, and interprets the outputs. We began with some proof of concept tests.
As Sister Peg is a work written in a style which had a history of use, it seemed appropriate to ensure it was distinguishable from the texts that it imitated, thus ensuring the authorship attribution techniques were able to focus on the specifics of the author, and ensure genre played a minimal role. To this end, we ran a number of tests looking at three sets of works: Sister Peg, John Arbuthnot's John Bull, and four anonymous Whig sequels. The tests were able to clearly distinguish the three sets of works as distinct (figure 1).
What is key in these plots is the hierarchical location of a text within the plot. The greater the distance of the links between works, the larger the statistical difference between them. Therefore, we can see that the Whig pamphlets and the Arbuthnot works are least similar, and that, while it is more similar to Arbuthnot than the Whig pamphlets, Sister Peg remains more dissimilar than any of the Arbuthnot works are themselves. Again, the point here is to clearly identify distinctions between the works, not to begin to attribute authorship.
We next ran a series of tests in which Sister Peg was examined amongst all of the collected texts. The aim was to see how well the tests were able to differentiate the authors (as in figure 1), as well as to begin looking for potential authorship candidates. With regard to the latter aim, these initial unsupervised results were, unsurprisingly, inconclusive. Figure 2 shows an example of Sister Peg However, there are two important results from these tests: First, there is clear evidence of author clustering, indicating that the method is able to distinguish between the authors we are interested in. Second, clustering changed radically depending on the variables and tests deployed, making it clear that extensive and continued refinement and testing was necessary to find the best fitting models.
However, as there is little evidence, and even less debate, with regard to anyone other than Hume or Ferguson as author of Sister Peg, we focused further unsupervised tests on them-both to refine our parameters, and examine the unsupervised classification. This had the advantage of simplifying the analysis in each case (computationally and in terms of outputs that needed to be assessed), while still remaining robust by examining all combinations of potential models and parameters-including different distance measurements; looking at results for unigrams, bigrams, and trigrams of words and character collocations ranging from three to seven; and testing the 100 to 1000 most frequent features extracted in increments of 100. 38 It should be noted that, at this stage, these investigations were exploratory. The aim was to develop a better understanding of how the methods could converge and diverge around different authors. Statistical testing on clustering does take place at a later stage, but at this point we noted that best clustering was, in general, achieved using the Wurzburg distance measurement, with one and two tokens, and four, five, and seven characters. This seems to be due to the character tests replicating tokens. Seven-gram character sets, in particular, were able to capture both longer single tokens (e.g., "which", "their", "other", "these") and shorter bigrams (e.g., "of the", "in the", "to the", "and the"). 39 Figure 3 shows three examples that were amongst the best in terms of the clustering of Ferguson and Hume's known works. There are two important things worth noting: First, in many of the tests looking at Hume and Ferguson's works, we see a set of outliers: both authors' historical works often form their own cluster. This is a good indication that context or genre may be playing a role in the attribution process in these cases. Second, while Sister Peg generally appears to be most similar to Ferguson's texts in these tests (it clustered amongst Ferguson's texts most frequently, and in the instances when it did not, many of Ferguson's texts would be found clustered with Hume's works), three Hume texts were often found clustered with Sister Peg: A True Account of the Behaviour and Conduct of Archibald Stewart, The Petition of the Grave and Venerable Bellmen, and The Life of David Hume, Esq. (with the Adam Smith letter removed). While this could be seen as problematic, there are both reasons why this could be happening and ways in which this information (regardless of the cause) can be used to make the tests attributing Sister Peg more robust.
With regard to the cause: the Petition and Life of Hume are the two shortest texts in the Hume corpus (971 and 3076 words). While Eder has noted that, with regard to the minimum sample size for reliable authorship attribution, "a sufficient amount of textual data may be as little as 2,000 words in many cases . . . [S]ometimes the authorial fingerprint is so vague, that one needs to use substantially longer samples to make the attribution feasible." 41 As more data provides more reliable results, their inclusion in the analysis is potentially problematic for the statistical tests, and false positives with such short documents is not unprecedented. Additionally, while A True Account is itself not particularly long, there appears to be a lack of certainty with regard to its editorial provenance that could also be playing a role. 42 In both cases, however, we are able to overcome these issues by turning to methods which specifically make use of this information in their models. Thus, while the unsupervised tests were promising, they were also inconclusive. Instead, they highlighted important issues that needed to be foregrounded in the next step of the analysis: supervised machine learning.

SUPERVISED TESTS
Supervised authorial attribution requires the researcher to provide training material-in this case, works known to be written by a given author-from which a model representative of that given author can be constructed. These author-specific models are then used to predict authorship of unknown texts fed to a classifier. That is, first the classifier is provided with the identity and numerous works by a given author. With this material it extracts extensive information about each authors' style. When unknown texts are then fed to the classifier it can use this information to predict which author that unknown text was written by. Importantly, to ensure that the classifier is functioning in a meaningful way, one also includes a set of validation texts of which the researcher knows the author, but which the classifier does not. If the classifier fails to correctly attribute authorship in the known (to the researcher) cases, one should abandon or refine the model being used. 43 This means that, when one is attributing authorship, it is not the outcome of the unknown work which a researcher focuses their attention on, but the success the classifier has when attributing the known works-especially in cases where doing so by chance is nearly impossible (i.e., there is a statistically significant relationship).
It is with regard to the training material that the previous, unsupervised, test results are of particular use. Again, as Hume's True Account of the Behaviour and Conduct of Archibald Stewart frequently clustered within Ferguson's texts, and the two authors' historical works were, at times, difficult to distinguish, they need to be treated with care. There are two possible ways of doing this: first, the models can be constructed so that they explicitly know that these problematic texts were written by their respective authors, and thus, create a more finely tuned predictive model; or, the model can be left unaware of the authorship of the problematic texts, and be expected to correctly identify their given authors by including them in the validation set. In the case of the histories, this is an easy issue to solve: we include some of the volumes in the training set, and some in the validation set. However, when it comes to A True Account, it was decided to run two sets of tests: one with the text treated as test data and one as verification data.
When comparing the results from the two sets of tests there is only a marginal difference in the total number of 100% correct attributions of validation texts (578 for dataset 1; 596 for dataset 2), and no meaningful impact on the overall attribution of Sister Peg. That is, both models were able to successfully attribute authorship of the known Hume and Ferguson texts, although the dataset which included A True Account as part of the validation step was the set with more correct attributions (regardless of whom Sister Peg was attributed to). Importantly, when the model knew that Hume was the author of A True Account there were fewer attributions of Sister Peg to Hume, indicating that the stylistic similarities in genre were not a factor in attribution.
Additionally, to deal with the number of texts (Hume has more) and individual text length, we created datasets made up of the merged corpora of each author, split into samples of roughly 2,000 and 8,000 words in length. 44 This, therefore, resulted in a further three sets of tests. 45 On all of these sets we, again, ran a number of tests using various parameters to check model fit and variable selection. This resulted in, at a minimum, 3,360 tests per set of texts.
Before fine tuning the parameters of the test, we calculated the total number of attributions for Ferguson and Hume for every test that resulted in 100% accurate validation results-that is, with no fine tuning of models, feature selection, or feature frequency, and only in cases where the classifier made no errors when classifying the known texts. In these cases the most frequently attributed author was Ferguson (figure 4).

When Ferguson and
Hume were compared to their peers (in this case: Carlyle, Kames, and Blair), Hume's results dropped further, while Ferguson continued to be reported most frequently as the author of Sister Peg ( figure 5). This is likely due to the additional data allowing for the model to better tune its parameters and distinguish between Hume and Ferguson. To put it another way, distinctly Humelike features found in Sister Peg turn out to be, in fact, less Hume-specific when other authors are included in the analysis. Thus, potential overfitting for Hume diminishes, as would be expected were he not to be the author.
On the whole, however, the results differed quite heavily depending on parameters and features being used. Due to the sheer number of tests being conducted, it was entirely possible to get results which would predict either Hume or Ferguson as the author of Sister Peg (albeit, with fewer results for Hume). One reason for this, as previously noted, is authorship attribution is a process of fine tuning. In addition to simply running tests, one should also identify the models and parameters that achieve the highest predictive accuracy with regard to validation texts. 46 To do this we ran tests measuring the independence of each parameter in terms of its ability to predict correct results, and used those that proved to have a statistically positive association with correct attributions. 47 When only taking into account these parameters the results favour Ferguson further, with almost three times as many attributions for him than Hume when looking at all five datasets (figure 6). Overall, the supervised analysis-building upon the previous unsupervised tests-strongly favours Ferguson as the author of Sister Peg. 48 We did, however, test for one further possibility: co-authorship between Hume and Ferguson (a possibility suggested by Raynor). 49

ROLLING TESTS
According to Carlyle, co-authorship was suspected from the beginning, with many thinking the text could be a "joint work." 50 Similar suspicions re-emerged with Raynor's attribution. For example, Forbes, in his review of Raynor's edition, noted a shift in tone towards the end, and writes "I am led to speculate whether perhaps Ferguson wrote the final chapter [ . . .] himself, and then handed over to Hume, or something of the sort." 51 It is known that Hume was a keen editor and supporter of his friends' works, so this is historically plausible. The shift in tone is also noted by Sher, who points to "Fergusonian motifs expressed in the pamphlet's closing speech" as evidence for Ferguson's authorship, and Jack A. Hill notes that the text moves away from satire as "the pamphlet concludes with a non-satirical plea for civic-virtue, which is straight-forward polemic." 52 Additionally, a close reading of the text reveals shifts in punctuation norms, imprecision with character cases after question and exclamation marks, as well as variation in spellings-all within the body of the same text ("antient" and "ancient"; "desirable" and "desireable"; "surprized" and "surprised"; and "expense" and "expence"). 53 None of this can be taken on its own as evidence for multiple authors, however-especially when we take the complexity of the print trade during the eighteenth-century into account. Compositors played an important role in these cases, and we can note that press figures point to multiple printers having worked on the same editions of Sister Peg (although this does not imply a necessary connection in textual matters). 54 Similar shifts in spelling and punctuation can be found in other texts-including those by Hume and Ferguson-from the era. However, to investigate the possibility of collaboration further, we turned to a rolling classifier.
The rolling classifier used is similar to the supervised tests above. However, rather than testing entire documents or samples, the rolling classifier splits the text into smaller overlapping segments that are individually tested. As each test provides a unique result, one is able to examine changes throughout a text, and thus estimate changes in authorship within a single document.
Due to the length of Sister Peg we ran tests that made use of smaller samples, despite the previous analysis showing that they generally perform the poorest. There is an important reason for this: large samples quickly become longer than some of the individual sections of the text. If one were to suspect that the division of labour was split between chapters, it is worth noting that the average chapter length of Sister Peg is 1326 words, thus, samples longer than this will include data from adjacent chapters which may be authored by other hands. Thus, depending on the actual length of the chapter, overlaps of samples can weaken, or even block out, the signal of a different author. We therefore looked at samples of 1000, 1500, 2000, and 2500 words. 55 We first ran tests using all previous parameters (resulting in 80 visualizations per sample size), with results varying between 100% attribu-tions to Ferguson to small chunks being attributed to Hume. Because parsing this much visual information is difficult, we layered the results for each sample-size test-set (n = 80) into a single image, and one image which included every test (n = 400). We then "meaned" the shades with graphics editing software which allows one to more easily identify areas of the text which are frequently attributed to each author (figure 7).
Darker sections are being attributed to Ferguson; lighter sections are being attributed to Hume; the muddy sections are being attributed to both authors by different tests. In examining these images it become clear that some sections of the text are more frequently attributed to Hume than others. To further investigate this we made use of the previous features and parameters reported as being best at identifying authorship of validation texts (figure 8). 56 It is worth noting a couple of things. First, the section of Sister Peg that has been most strongly pointed to as evidence of Ferguson's hand-the final speech-is the section which the tests most strongly identify as being authored by him. Second, a number of tests returned results that showed particular sections of Sister Peg as being more Hume-like. These are the sections around chapters III and XII. When looking at the content of these two sections one thing is striking: both deal with Robert Dundas, or as he is referred to in the text, "one great dolt of a fellow, called Bumbo." 57 Dundas' inclusion in the text is not surprising. He was an enemy of the militia movement, and was the only Scot who spoke against the bill in the House of Commons. He was also an enemy of the Edinburgh circle more generally, being, in 1757, a part of the "High Flyers" who attacked moderates in the Kirk generally, and Home in particular, after the performance of Douglas. 58 Perhaps most important, however, is that he was an enemy of Hume specifically.
During the election for the librarianship of the Advocates' Library in 1752, Hume's candidacy was opposed by the Dundas family (the younger of whom was Dean of the Faculty of Advocates) as he did not represent their Squadrone party. Although Hume persevered, his position was undermined two years later when three books he had ordered were removed from the library's shelves by its curators for being indecent. In response, Hume wrote to Dundas, who either supported the curators and their position, or encouraged them further in the hope of forcing Hume to resign. 59 While Hume backed down, and thus did not resign, these interactions seem to have left an impression-the moniker "Bumbo" was used while making a passing (and disparaging) reference to Dundas in a December 1763 letter to William Robertson-three years after the publication of Sister Peg, and over ten years after the incident with the Faculty of Advocates. 60 Thus, while many in the circle had reasons-both personal and political-to satirise Dundas, Hume's reasons were perhaps more personal than Ferguson's.
A final note on both the references to "Bumbo," and the potential for collaboration: John Ramsay of Ochtertyre notes, in his manuscripts, that "[i]n the history of Margaret, or Sister Peg, the Lord Advocate was satirized by the name of Bumbo. Though written by Dr Ferguson, it was supposed he got many hints from Lord Elibank and his set." 61 There are two things to note here: first, while not a direct claim to collaboration, it is a reference to others being involved. Second, the fact that this comes immediately after a reference to Bumbo is, while circumstantial, worth noting.
In any case, because of this anomaly, we decided to create additional subsets of Sister Peg made up of: 1) all chapters that mention "Bumbo" (chapters 3, 12, 13, and 16); 2) all mentions of "Bumbo" that were flagged as Hume-like previously (chapters 3 and 12); 3) those chapters without any mention of Bumbo (without 3, 12, 13, and 16); 4) those chapters that were not flagged as being most Hume-like previously (without 3 and 12). We then re-ran the previous supervised tests. The results are found in figure 9.
There are a few things to note in these results: First, the numbers of attributions with 100% accuracy on the testing data drops when the corpus is split. In other words, the classifier struggles to predict as many verification texts correctly. Second, the tests in which the True Account of the Behaviour and Conduct of Archibald Stewart is included in the training data are more likely to recognize the Bumbo chapters as Hume's. Third, the tests with more features being tested favour Ferguson, but the Bumbo chapters themselves are quite short, and thus are not particularly well suited for high feature count tests. Overall, however, when looking at subsets of Sister Peg, we do find some evidence for Hume's hand in Sister Peg, albeit inconclusive.

CONCLUSION
This article has examined a historical question-the authorship of Sister Peg-and turned to novel methods-computational stylometry-to develop further evidence. Though Ferguson appears to be the most likely author from the very start of the unsupervised tests, it was through the careful application of specific methods and the refinement of their parameters that the most striking evidence Figure 9. Authorship attribution to entire Sister Peg, with "Bumbo" chapters, without "Bumbo" chapters for this conclusion emerges. Additionally, the case for attributing sole authorship of the text to Hume becomes increasingly questionable, and we therefore cannot support this position. However, our aim in this article has been to be both robust with our methods and transparent with our results, and in this way engage with a longstanding debate, rather than impose on it. To this end, we do not claim to have solved the mystery of Sister Peg's authorship, but instead offer further evidence that may lead to a solution. Having said that, our particular intervention in this debate may be this: we do see evidence-both historically and computationally-for the possibility of co-authorship of the work, and this is a possibility that should be further investigated.
While this analysis may stand in contrast with some archival evidence, our point has been to bring stylometric evidence into the historical discussion. That evidence, rather than our conjecture, leaves open the possibility that Hume contributed to the work (with particular respect to the sections discussing Bumbo). From a historical perspective, it is entirely possible that Hume engaged in the project for personal reasons despite his (lack of) concern for the militia issue. It is well known that Hume was a prolific editor of his friend's works, and it is possible he took on this role for Ferguson. 62 Additionally, this role, and the more fluid conception of authorship which existed in the eighteenth-century, may have allowed him to claim the work as his own in an act of support for his friend Ferguson, whose struggle for patronage throughout his career was a real concern of Hume's.
Finally, there was a second aim in this article: to offer an example in which these methods-and digital methods more generally-can be used to engage with traditional historical questions. Stylometry is a method like any other methodimperfect when used poorly, powerful when used well, but ultimately just a tool available to a researcher. However, if we, as historians, are to make use of these tools we must make it clear that they are both valid and valuable to the field. 63 To achieve this, the underlying principles of the techniques being used must be clear and the methods themselves must not be a form of obfuscation. When this aim is met the results form the basis from which future research in this area can be built.

APPENDIX
The following is a list of works included in the analysis. In the case of Hume, who re-published many of his essays in different forms, effort was made to remove duplicate essays. Additionally, in the case of A True Account, the edition with and without the preface were tested. Works prepended with an asterisk note OCRrather than human keyed-versions of texts.