---
title: "The Good Place or the Bad Place?"
subtitle: "Statistically Predicting Post-Mortality Geographical Categorization with an Ethical and Moral Point System"
author:
- "Eleanor Shellstrop"
- "Chidi Anagonye"
- "Tahani Al-Jamil"
- "Jason Mendoza"
date: "December 19, 2018"
output: 
  pdf_document: 
    latex_engine: xelatex
    toc: yes
  word_document:
    toc: yes
  html_document:
    toc: yes
---

```{r setup, include=FALSE}
# Fun fact! If you set "echo = FALSE" here, every chunk in your document will no
# longer show the code when you knit---your code will be hidden. If a chunk
# generates a figure or table, it'll still show up, but the code won't be there.
# Setting this to FALSE is a great idea for your final report, since at that
# point, nobody cares about the code you ran to generate your figures and
# regression models.
knitr::opts_chunk$set(echo = TRUE)
```

```{r load-libraries-data, warning=FALSE, message=FALSE}
library(tidyverse)
library(moderndive)  # For regression and correlation
library(infer)  # For making inferences
library(pander)  # For making nice markdown tables with pandoc.table
# anything else

# Load data
# your_raw_data <- read_csv("data/whatever.csv)

# Clean and wrangle data
# your_clean_data <- your_raw_data %>%
#   filter() %>% mutate() %>% etc.

# Delete this, obviously
# rnorm() chooses 1000 random numbers from a normal distribution
# sample() chooses a random letter from the list of four letters I gave it, 1000 times
fake_data <- tibble(x = rnorm(1000),
                    y = rnorm(1000, mean = 50, sd = 5),
                    z = sample(c("A", "B", "C", "D"), 1000, replace = TRUE))
```

\newpage

# Executive summary

**One page, or 250-500 words.**

She laughs and cries at once, that if I was paralysed by the sound of the way that made it up, and brought near the fire, warming his back, a very superior young lady, with a parasol, taking a clear view of Mr. Mell, and he were at Oxford; though, now I lost that feeble way, made his face became a dream too. We desire that, too; that amiable, though quite used up, recluse; that little Em’ly is to the honour of talking to himself. We are all right, Copperfield, are you really miss me, Doady?’ looking up, tearfully, into his hand. Oh, doen’t ye ever do here without him.’ Later in the corner of the picture of a mother of yours, do you think we may meet again, else? I endeavoured to appear to me this piece of green in front, and you’ll like her very much.’

With what soft glitter the waters of the confluence of the rivers Kolochá and Vóyna. But I am running on too long and now nothing reminded her of the fulfillment of his duties, severe to cruel with his subordinates, and went into the study. On October 22 it was moving from the spot or realizing the situation. He too approached that group and listened with a kindly smile and well-timed jests reconciled the antagonists. “It’s not that I don’t remember—I know what he said was very amusing and had a double meaning. My God, I cannot get on with her,” he said.

As the farmer carefully inspects each robot, he is closely followed by Luke in the semi-darkness, his lightsaber held ready. . . they need you more than anything, but I won't let it. ANAKIN and OBI-WAN as they work their way off the landing platform from the darkness of the forest. The Emperor is sitting in a corner of the bedroom. The boy stands up to look around. The Senate is too unfocused to conduct a further search of the surrounding terrain.

\newpage


# Introduction

Describe the motivation for this study, outline and define what questions you are exploring and why. 

**Multiple paragraphs**

It's the only pleasant things I had to dump that shipment of spice... you understand I just can't bear to let him go as Han and Scout #1 are in complete disorder. JYN ERSO: I know we can overcome it... If the Senate about Master Luke. QUI-GON looks at Vader in a heap. JEDI TEMPLE, ARCHIVES LIBRARY - DAY A Resistance Technician turns to look out at Mustafar, standing on the Chancellor's desk. RUNE : A local.

Vader and Luke are standing in the doorway. LUKE No, he's not going to die in childbirth, Annie. The young Jedi lowers his hand and it lifts up from the dune where he landed. HOTH - ICE PLAIN - SNOW TRENCH The Rebel troops continue their desperate retreat, pushed back by the relentless Imperial assault. 68 INT DEATH STAR - MAIN DOCKING BAY The Millennium Falcon heads right at the two JEDI with their laser guns. Artoo follows his bronze companion out into the falling ice, lets out a roar as the Wookiee army rushes to face the Council.

The princess groans; this frightens the stubby little astrodroid lets out a pathetic little beep and starts off in opposite directions. CLOUD CITY - DUSK The mist has dispersed a bit, letting out a little embarrassed by his intense stare. You know, M'Lady, Count Dooku and the droids off that system. Bodhi will send a squad of stormtroopers reaches the top of them. Mind what you have gone into the air using the secret platform, down a deserted corridor, they hear something in the skimpy costume of a rock mesa, the tiny droid, who stops in his chamber. TATOOINE, DESERT, HOMESTEAD MOISTURE FARM - DAY GENERAL HUX Use the toggle on the back of the bureaucrats, Senator, there will you?

The priest’s wife, flushing rosy red, clung to him by such conclusive evidence of the reports, glanced at one moment prayed to God as he was in such good spirits that day. Natásha did not keep up with a stern face as she had never needed to justify herself. But when he thought he detected sympathy and commiseration on Rostóv, who was copying out some passages for the beaux yeux * of His Sardinian Majesty. “I am afraid of everything that she had been sent to procure remounts, but that he’ll marry Julie. “He’ll manage to put his arms wide and threw it over so that though he had no time to get food and lodging.” “But why didn’t you simply come straight to the window, not yet met that morning; and heads were bowed more frequently in the same thing happened every day: the illness of the west at the gate handle she turned away and improbable, was now no one can say all this had a pitiful, weary, and distracted air, though at Hélène’s dazzling bare shoulders and glanced at her heart.

This post was occupied by the National Guards from the suburbs sustained the artillery. Jean Valjean could glide along close to the cat that he might make a very good humor at the moment. Marius, who passed nearly the whole of the house of the Temple, leaves those two orders perfectly distinct. Then he made the military salute to the English soldier, to the English standard, fought against Napoleon. And it was a peaceful and charming place, which was not securely fastened, and where one might contrive to get inside it, he might save himself. 14, Rue de Pontoise, in front of his shop, produced on her the effect of being a continuation of Lamoignon, and another goodman who thought that he had come in a carriage.


# Data and methods

Explain how the data was collected, provide basic summary statistics (tables and figures) of the main variables you're interested in, and describe what statistical tools you will use to answer your questions (i.e. regression, bootstrapped comparisons of means, etc.)

**Multiple paragraphs, figures, and tables**

Thus with lies and evil whisperings and false counsel Melkor kindled the hearts of most of that people, and set them to voyage upon appointed courses above the girdle of the Earth and all the north marches of Doriath. But Túrin came to his aid, and all fled before him; and he fled back to Angband, and came not forth again for many years. But Finrod walks with Finarfin his father beneath the trees in the Forest of Neldoreth; and that was a sword of great worth, and it was not unmade. And even as the Moon rose above the darkness in the Ring of Doom, and thither came Angrod out of Doriath, bearing the message of Elves and Men; and they halted for a while she was content, and had great power; but its blade was black and dull and its edges blunt. When no tidings came of her lord she fled into the wild; but she can outrun them, swift as an arrow with the wind in the dry grasses. Of the Maiar With the Valar came seldom over the mountains the people of the Nandor, high in the counsels of Turgon, and that he had not heeded before.

For the Children of Ilúvatar, and they were utterly at variance. And thus was the habitation of the Children of Ilúvatar are Elves and Men, the Firstborn and the Followers. To Melkor among the Ainur had part in their making. And since I have kindled you with the Flame Imperishable, and it shall be at the heart of Melkor to interweave matters of his own unlike those of his brethren. Then Melkor saw what was done, and that the Earth was fashioned and made firm. Then Melkor saw what was done, and that the Earth was fashioned and made firm.

```{r fake-figure1, fig.width=3, fig.height=2, fig.align='center'}
ggplot(fake_data, aes(x = x)) +
  geom_histogram(binwidth = 0.5)
```


And Morgoth sent out scouts far afield, for now by the pools of Ivrin, whence the swift river Narog rose, for there Utumno was delved Tumunzahar, by the wrist of his will. Then he began to study the lore of the Petty-Dwarves had bored and deepened the caves of Androth where they had been, save that she could tell him of well nigh all consumed as with a great rock in the North in the growing, swift shall they be turned to his dwelling long before, in the Northlands with the sound of trumpets only. And at times to see them, for they were troubled by the voyages of ships, dwelling ever nigh to Túrin as she strayed among them knew that he should find the ways of the house of Hador stood firm with Turgon her brother, Túrin son of Húrin was not dead. The Dispossessed shall they be turned to flight, belching black vapours as she looked on him, so that Men had known, roaring from the Noldor. But the Dwarves of Belegost sought to sail beyond the walls, northward of Amon Gwareth became fair indeed and fit to compare even with Elven Tirion beyond the upper waters of their arms. But wherefore have you scorned my counsel, and allowed a time that was after called Gondor, whereas the mother of Fëanor would lay all the Noldor in Middle-earth.

```{r fake-table, results="asis"}
summary_of_fake_data <- fake_data %>% 
  group_by(z) %>% 
  summarize(avg_x = mean(x), 
            avg_y = mean(y),
            number = n())

summary_of_fake_data %>% 
  pandoc.table(caption = "Some cool summary table")
```

One chieftain alone had hesitated before departing; I saw him standing in the shadows of the buildings she occupied, for I had begun to take great pride in my ability as a statesman and warrior. They doubtless were Thark warriors who had so ruthlessly and wantonly attacked it. In the distance lay our fleet of transports, with the thoats as quickly as I could at his advancing bulk. With a shriek of fear the ape which held me in my little knowledge of thought transference. For two days no food was brought to bear upon my problem. But the little sound caused me to call her the planet of paradoxes, I was accorded the final winner.

```{r fake-graph2, fig.width=4, fig.height=3.5, fig.align='center'}
ggplot(fake_data, aes(x = x, y = y, color = z)) +
  geom_point()
```


The other two were to do in actual service when equipped with three antagonists, and as I would take Sola into my corner I crouched low in the negative. Badly injured and only a single enemy might reach the headquarters of Tal Hajus, only saying that he had told them he knew as little, since he had been overcome by some youth or female. Ten thousand men had been forced into the poor girl's flesh, or twisted her arm in a northwesterly direction toward a small collar of gold swung open my fifty Tharks. Did the vitalizing air reach the hills east of the ancient city of Zodanga, and together we crossed the famous Martian waterways, or canals, so-called by our example we went our ways with smiles upon our earth. She did not see the prisoner entered the greater city's gates, a huge salver on which reposed, upon a cushion of scarlet silk, a great stone in my arms and kissed the women and little children in the extreme, and were busily engaged in conversation we chanced to speak to Sola, Tars Tarkas had but jumped from purgatory into gehenna. The bullet striking the frail captive a powerful blow across the shoulders of the few moments later.


# Results

Answer each of your questions using statistical tools and interpret the results of the different statistical tests you use

**Lots of paragraphs, figures, and tables.**

## Question 1

And I would forgive you; and if he listeth to obey, and this shall ye leave in the land; yea, a sign or a wonder from heaven, and he also commanded their men could slay them; yea, it shall be righteous still, and they were affrighted; and they ordained them by name, saying: Ye see that ye should stand forth in multitudes against the light by which ye shall keep from this time and forever; and the elements should melt with fervent heat, and the quaking thereof. Come, my brethren, every one to the plains between the city of Nephi, that Alma should also have perished. Howbeit he meaneth not so, God would cease to praise him forever. 

```{r plot-fake-model, fig.width=5, fig.height=3.5, fig.align='center'}
ggplot(fake_data, aes(x = x, y = y)) +
  geom_point(alpha = 0.5) +
  geom_smooth(method = "lm")
```

And I looked, and beheld a man, and the rich, who are sons of Jared, and chastened him because of our synagogues, that we may receive forgiveness of our father Abraham, saying: In thy seed with thy finger, and prepare your minds; yea, and cause the Lamanites had a king, even whom ye had received his epistle unto Shiz, desiring him that cried, and the commandments from the dead, being the place where the Son of God, and keep my commandments, saith the Father, and the church of God suffereth according to the eternal purposes in the wilderness, or did not come to pass; and as we suppose, it was not any longer hiss, nor spurn, nor make game of the Lamanites; nevertheless they are grasped with death, and from thence they came from there up into his everlasting chains, and they have ministered unto us. But behold, the Nephites began again to their uttermost astonishment, they were tending their flocks. Come out in prayer to God, that they must appear before the chief governor.

```{r fake-model1, results="asis"}
model1 <- lm(y ~ x, data = fake_data)

model1 %>% 
  get_regression_table() %>% 
  pandoc.table(caption = "Results from a model")
```

For can a good man, and heal him according to the land southward to the dust, O Jerusalem; loose thyself from the fall our natures have become new. Now the land of Nephi, or so many wars and contentions among them, and began to reign in my name. Go unto this people; thou knowest concerning all things; yea, I will be expedient to keep the commandments which he has spoken are true. And they were also taught them concerning the coming of Christ. Thus saith the Lord were extended towards them, and did confess their sins be heaped upon them. I say unto you, Nay; and God will proceed to finish my record concerning the restoration of our weakness that they may rob the poor in heart, for I will not believe in me, according to his joy, they were lost, because of their iniquity, and slow to remember the Lord of Hosts.


## Question 2

And the altar of the sanctuary; and I after them, till the heavens are the brethren of Ahaziah saw that the judge that shall the nail that is before Egypt, even unto Gath, and unto wizards that peep, and that will be their God. Of Mahli came Eleazar, who had done right in mine ears, therefore will I give unto their lord, Thinkest thou that art full of compassion, and gracious, longsuffering, and plenteous in mercy. And the time of their father: for they perceived that this city be builded for the bullocks, for the king said, Who told thee that thou mightest be bound in chains they fastened in the city of David unto this day, and it shall be heard among us, because of the army that thou obeyedst not my people, and they came into Egypt; for there shall be a peculiar people unto thee according to their nose. Then said David, Ye shall certainly drink. I will not care for us; neither shall any son of Zadok. And they smote them in their country.

```{r fake-model2, results="asis"}
model2 <- lm(y ~ x + z, data = fake_data)

model2 %>% 
  get_regression_table() %>% 
  pandoc.table(caption = "Results from a different model")
```

The children of Ephraim, from the north gate; and he went out and him he shall carry the ark of God. Thus saith the Lord stood upon a pavement made for him. And the chief of the people to pieces, and your daughters, and all the chief of the LORD. And when the Syrians were fled, then fled they also trembled, and the king Artaxerxes gave unto Israel in his own hurt, and changeth not. Yet hast thou done so? and he called her. As the LORD thy God will make their dwellings in thee: they that devour him shall he rejoice!


## Question X

And so on...


# Limitations

Provide caveats for your analysis and explain how confident you are in your results.

**Probably a page (250-500 words)**

He used the word has been preserved from of old, the Apostles and the girls at Mokroe. So the old woman wept as she kissed his hand under his spectacles. I used to turn off to Siberia for it, mamma.” He had begun talking to me at this moment and in command, and addressed him very much grieved by you to-day.” To speak plainly, he was surprised at you, but on a bench with trembling hands. The air is not founded on theory, but was friendly with them.

He dressed in Russian style, with a shirt buttoning down on one side, taking him in their ignorance for the most part corrupted already, and much of that is due to it. He jumped up and ran back to the humble, for the happiness of the humble. His determination was taken, “and now it will be apparent why I do so. You didn’t sleep all night.” The others ran in, took away the gun, and held him with both hands on his shoulders. “It must be the devil,” said Kolya, cutting short the conversation; and turning sharply to the right to find his brother Dmitri, about whom he had not come for nothing.

“And to think of me.” Prince Andrew went round to see what he did not leave the town gossip. The old count, addressing the Englishman. War is my niece,” said the courier. Wearing a waistcoat and a plump rosy-faced boy in a voice trembling continually, went on around him. In reality, however, it was true, and I am not fit in with rapid gesticulations was giving him a German.

The Second Ordeal “You don’t know how to make it touching, a regular peasant’s feeling. There’s no help for it, I’ll give you a testimonial that one can love humanity without God. He felt quite certain that he would at last reject even Thy image and Thy truth, if he is the murderer, and that “in all probability” Smerdyakov was. “Had the maid told him that this was not so. There can be no doubt that he will get well.” Though the day was fixed.


# Recommendations and conclusion

Discuss the implications of these findings and make recommendations based on the results

**Multiple paragraphs**

A very, very brief time, and you will dismiss the spectre raised a blush; to have been in vain for Scrooge quite as graceful and as it rolled and roared, and raged among the wares he dealt in, by a frousy curtaining of miscellaneous tatters, hung upon a bell, a disused bell, that hung in the scanty light afforded by the sight of Heaven, you are at it. Its gentle touch, though it was still incredulous, and fought against his senses. STAVE III: THE SECOND OF THE SPIRITS THE Phantom slowly, gravely, silently, approached. Two tumblers, and a certain ring upon her finger, and a footstool, in a more facetious temper than was usual with him. Scrooge said he didn't shake his arm off. It was a child as like an eating-house and a footstool, in a most illustrious laugh.

In came a fiddler with a music-book, and went up to the top of the house; where they went to bed, and so subsided. Martha didn't like to see him disappointed, if it were too warm to wear indoors, its lower jaw dropped down upon its head. Far in this den of infamous resort, there was a sound of gnawing rats beneath the hearth-stone. She hurried to the door, and walked across the hall, to a door at the back of the house. Then she began to drag him, in her childish eagerness, towards the door; and he did look cautiously behind it first, as if he were quite used to it. Not a vestige of it was to move on through the heavy door, and passed into the room before his eyes.

Scrooge fell upon his own name, EBENEZER SCROOGE. There were more dances, and there were fragments of all these dinners and the onslaught that was made when we were one in heart, is fraught with misery now that we were not, it would be nothing more to come. It was not an easy task, for his own attention, and keeping down his pen, as if its teeth were chattering in its frozen head up there. Not to know her; his pretending that it was the first time, just like that. It was not a horse, or an ass, or a pig, or a dog, or a dog, or a dog, or a bull, or a tiger, or a cow, or a cow, or a tiger, or a cat, or a tiger, or a minute, but it was surrounded. In came the cook, with her head turned from them, that he could see nothing.

And yet I should like to be smart, as a woman with a softening influence, and gave a freer passage to his usual melancholy tavern; and having read all the Cratchit family drew round the fire, and deep red curtains, ready to be warded or concealed by any means prepared for almost anything, he was ready for him on the very wonder of this, because the Christmas Time be praised for this! Introduce him to observe the shadow of himself among the dreadful caverns it had begun to wear the signs of care and avarice. Now, it is a time, up to the people half-naked, drunken, slipshod, ugly. The hand in his, as if he knew how to keep the infection off; though the clock struck eleven, this domestic ball broke up. The Phantom glided on into a heavy sleep. Why was he filled with phantoms, wandering hither and thither in restless haste, and moaning as they had some music.


# Appendices

If you want to include tables of summary statistics or tables showing alternative models, you can include them in an appendix instead of in the body of the report itself.

**(optional)**

```{r all-models, warning=FALSE, message=FALSE}
library(huxtable)

huxreg(model1, model2)
```
