---
title: "Week 3 Homework"
output: html_document
---

The following five observations were selected from among the 20 households in Sahlins dataset on Mazulu village:

| Household | Consumers (X) | Acres (Y)|
|:---------:|:---------:|:-----:|
|     1     |    1.00   |  1.71 |
|     5     |    1.20   |  2.21 |
|     10    |    1.46   |  2.09 |
|     15    |    1.65   |  2.41 |
|     20    |    2.30   |  2.36 |

1. Do the following:
    * Construct the Scatterplot for Y and X.
```{r}

```

    * Find A and B for the least squares regression of Y on X and draw the least-squares line on the scatterplot.  Interpret A and B.
```{r}

```

    * Calculate the standard error of the regression and the correlation coefficient.  Interpret these statistics. 
```{r}

```


2.  Analyze the Sahlins's data frame (car package), by regressing Acres/Gardener on Consumers/Gardener. In a society characterized by 'primitive communism,' the social product of the village would be redistributed according to need, while each household would work in proportion to its capacity, implying a regression slope of zero. In contrast, in a society in which redistribution is purely through the market, each household should have to work in proportion to its consumption needs, suggesting a positive regression slope and an intercept of zero. Interpret the results of the regression in light of these observations. Examine and interpret the values of A;B;SE; and r (or r2). Do the results change if the fourth household is deleted? Plot the regression lines calculated with and without the fourth household on a scatterplot of the data. Does either regression do a good job of summarizing the relationship between Acres/Gardener and Consumers/Gardener? 
```{r}

```

The following nine Southeastern cities are selected from Angell's data on U. S. cities (Angell in the car package).

| City | Moral Integration | Heterogeneity|Mobility|
|---------|:---------:|:-----:|:-----:|
|Richmond  |    10.4   |  65.3 |  24.9|
|Chattanooga  |    9.3    |  57.7 |  27.2|
|Nashville  |    8.6    |  57.4 |  25.4|
|Birmingham  |    8.2    |  83.1 |  25.9|
|Louisville  |    7.7    |  31.5 |  19.4|
|Jacksonville |    6.0    |  73.7 |  27.7|
|Memphis  |    5.4    |  84.5 |  26.7|
|Miami  |    5.1    |  50.2 |  41.8|
|Atlanta |    4.2    |  70.6 |  32.6|

3.  Employing the Data for these 9 cities: 

	* Find A, B1 and B2 for the least squares regression of Moral Integration on Heterogeneity and Mobility. 

```{r}

```

	* Calculate the standard error of the regression and the multiple correlation coefficient (R). 

```{r}

```

4.  The data sets for the book include many that are suitable for examining the regression of one quantitative variable on another (e.g., Angell, Anscombe, Chirot, Duncan, Ericksen, Freedman, Leinhardt, States, and UnitedNations, all in the car package). Pick one of these data sets, or any data set from another source of interest to you, and select one quantitative variables to treat as explanatory variable and two other quantitative variables to treat as explanatory variables. Compute the least saures regression of the response on the explanatory variables, interpreting the values that you obtain for the regression intercept (A) and Slopes (B1 and B2), along with the standard error of the regression and multiple correlation coefficient.  
```{r}

```



5.  Compute the standardized partial regression coefficients for the multiple regression you performed in the previous exercies  Explain how these coefficients are to be interpreted. 
```{r}

```
