Question

For this exercise we will run a regression using Swiss demographic data from around 1888. The sample is a cross-section of Fr
5 Now estimate the model the model relating Fertility Rate to Education using the Im() function in Rs base code. Typically,
0 0
Add a comment Improve this question Transcribed image text
Answer #1

AS FOR GIVEN DATA..

1. Code used:

a<-read.csv("swiss.csv")
summary(a)

Output:

Mean Median
Fertility 70.14 70.4
Education 10.98 8
Catholic 41.14 15.14

2. a) Code used:

x<-cor(a$Education,a$Fertility)
y<-sd(a$Education)
z<-sd(a$Fertility)

Output:
Correlation, r = -0.66

Sx (education) = 9.62

Sy(Fertility) = 12.49

b) Code:

beta_hat <- x*z/y
Output:

Beta estimate is -0.862

c) Code:

alpha_hat <- mean(a$Fertility) - mean(a$Education)*beta_hat
alpha_hat

Alpha = 79.60

3. Code: pred<- alpha_hat + beta_hat*40

Output: 45.11

4. Code:

plot(a$Education, a$Fertility, xlab="Education", ylab="Fertility")

Add a comment
Know the answer?
Add Answer to:
For this exercise we will run a regression using Swiss demographic data from around 1888. The...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • For Questions 4-11, use the swiss dataset, which is built into R. Fit a multiple linear regression model with Fertility...

    For Questions 4-11, use the swiss dataset, which is built into R. Fit a multiple linear regression model with Fertility as the response and the remaining variables as predictors. You should use ?swiss to learn about the background of this dataset. 7. 1 Run Reset Create a 95% confidence interval for the average Fertility for a Swiss province in 1888 with: 40% of males involved in agriculture as occupation 28% of draftees receiving highest mark on army examination 10% of...

  • For Questions 4-11, use the swiss dataset, which is built into R. Fit a multiple linear regression model with Fertility...

    For Questions 4-11, use the swiss dataset, which is built into R. Fit a multiple linear regression model with Fertility as the response and the remaining variables as predictors. You should use ?swiss to learn about the background of this dataset. 9. 1 Run Reset Report the value of the F statistic for the significance of regression test. Enter answer here point 10. 1 Run Reset 0.01. What decision do Carry out the significance of regression test using a you...

  • all data is built in in R 4. For Questions 4-11, use the swiss dataset, which is built into R. Fit a multiple linear re...

    all data is built in in R 4. For Questions 4-11, use the swiss dataset, which is built into R. Fit a multiple linear regression model with Fertility as the response and the remaining variables as predictors. You should use ?swiss to learn about the background of this dataset 1 Run Reset Use your fitted model to make a prediction for a Swiss province in 1888 with: 54% of males involved in agriculture as occupation 23% of draftees receiving highest...

  • X Part I. Derive Bivariate Regression by hand. Again, we are using the same data set that we used in the in-cl...

    X Part I. Derive Bivariate Regression by hand. Again, we are using the same data set that we used in the in-class assessment. Case Dietary Fat Body Fat 22 9.8 22 11.7 14 8.0 21 9.7 32 10.9 26 7.8 30 21 17 1. Step 1: Find the mean of dietary fat x = 2. Step 2: Find the mean of body fat y = 3. Step 3: Find the sum of (x1 - x)y- y) = 3316 4. Step...

  • I need to know the code to do this question in R thanks 10. (8 marks) (using dataset: "meap93", in R: data(meap9...

    I need to know the code to do this question in R thanks 10. (8 marks) (using dataset: "meap93", in R: data(meap93, package-'wooldridge)) We want to explore the relationship between the math pass rate (scil/) and average teachers' compensation (salary + benefits) in the school (totcomp) In the population model: scill,-β0 + βι log(totcompi-u, prove that β/ 10 is the percentage point change in scill given a 10% increase in totcom. ii Use the data in MEAP93 to estimate the...

  • For the following exercises you can use the 'Wooldridge' package in R to load the data 9. (7 marks) (using data...

    For the following exercises you can use the 'Wooldridge' package in R to load the data 9. (7 marks) (using dataset: "k401k") The data in 401K are a subset of data analyzed by Papke (1995) to study the relationship between participation in a 401(k) pension plan and the generosity of the plan. The variable prate is the percentage of eligible workers with an active account; this is the variable we would like to explain. The dummy variable sole represents whether...

  • 5.Correlation and Simple Regression by Hand Hourly Earnings in Dollars) $35 $15 $40 $30 $55 (Years...

    5.Correlation and Simple Regression by Hand Hourly Earnings in Dollars) $35 $15 $40 $30 $55 (Years of Education) 16 14 18 12 20 Be sure to show all of your calculations and to interpret your findings. That is, while you can use R to check your work, you must show all of the calculations below "by hand." Assume that the populations are normal. Compute the sample correlation coefficient (r) between hourly earnings and vears of education for this random sample...

  • Problem 3 The USDA collects data on commodity prices and consumption. Use their data to explain...

    Problem 3 The USDA collects data on commodity prices and consumption. Use their data to explain per-capita chicken consumption as a function of the price of chicken. (Note that economic theory suggests that an increase in a commodity price is generally associated with a decrease in demand.) Q capita chicken consumption PCHICKconsumer price index for chicken We estimated a linear regression model usng annual data for 1950-2001 ( N = 52 ). Dependent variable: coefficient d. error const 0.05 R-squared:...

  • Exercise 2. [Data analysis, requires R] For this questions use the bac data set from the...

    Exercise 2. [Data analysis, requires R] For this questions use the bac data set from the openintro library. To access this data set first install the package using install.packages ("openintro") (this only needs to be done once). Then load the pack- age into R with the command library(openintro). You can read about this data set in the help menu by entering the command ?openintro or help(openintro). Many people believe that gender, weight, drinking habits, and many other factors are much...

  • Problem 3 The USDA collects data on commodity prices and consumption. Use their data to explain...

    Problem 3 The USDA collects data on commodity prices and consumption. Use their data to explain per-capita chicken consumption as a function of the price of chicken. (Note that economic theory suggests that an increase in a commodity price is generally associated with a decrease in demand.) 0per capita chicken consumption PCHICK consumer price index for chicken Collapse Al We estimated a linear regression model using annual data for 1950-2001 (N 52) Dependent variable: coeffidient std. error const PCHICK -0.1...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT