Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Need R code for this please! In October 1979, the Federal Reserve changed its po

ID: 1125820 • Letter: N

Question

Need R code for this please!

In October 1979, the Federal Reserve changed its policy of using finely tuned interet rate adjustents and instead began targeting the money supply. Using the data in INTDEF.TXT, the following model was estimated:

where i3 is the three- month T-bill rate, inf is the annual inflation rate based on the consumer prie index (CPI), and def is the federal budget deficit as a percentage of GDP. Define a dummmy variable equal to 1 for years after 1979. Include this dummy in equation above to see if there is a shift in the interest rate equation after 1979. What do you conclude?

3. -1.73 + .606 inft .513 def (0.43) (.082)(.118) 56, R2-.602 n 2-.587,

Explanation / Answer

Well for this you can use the lm function. Define data for the inflation rate given by "inf" as one of the data columns. We can have "def" as the federal budget deficit as another data column. Additionally we include a (1,0) variable as the 1979 dummy as another column given by "d1". Apart from this we have the interest rate column "i3" as the dependent variable. Given this we can run the regression as with the following R code:

install.packages("psych")

library(psych)

reg1<-lm(i3 ~ inf +def +d1, data=dataset)

summary (reg1)

pred<-predict(reg1,dataset1)

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote