My data doesn't appear to be giving me accurate results

As a new user of Rstudio I am quite lost and my data I have entered does not seem to be bringing up accurate empirical results or strong correlation. Help would be so greatly appreciated!!
I have used GDP as my dependent variable for an assignment with CPI, unemployment rate and LT Interest rate in Ireland between 1993-2012 in percentage change units. It is giving me very uncorrelated data and not much to work with. Please help!!! All commands are posted below.

Data <- read.csv("~/aaaaa 4th year sem 2/Monetary Economics EC4018/Data.csv")

View(Data)
head(Data)
str(Data)
as.data.frame(Data)
getwd()

names(Data) <- c("years", "GDP", "CPI", "LTIR", "unemp")
View(Data)

nrow(Data)
ncol(Data)

Observation of key variables:

summary(Data)

Correlation:

cormatrix = cor(Data[1:80, 2:5])
library(corrplot)
corrplot(cormatrix, method = "number")

Relationships between variables:

ggplot(Data,aes(x = Data$GDP,y = Data$CPI))+

  • geom_point(colour = "red")+
  • geom_smooth(method = "lm", se = FALSE)+
  • ggtitle("Relationship between GDP and CPI from 1993-2012")+
  • xlab("GDP")+
  • ylab("CPI")+
  • theme_bw()

ggplot(Data,aes(x = Data$GDP,y = Data$years))+

  • geom_point(colour = "red")+
  • geom_smooth(method = "lm", se = FALSE)+
  • ggtitle("GDP percentage change from 1993-2012")+
  • xlab("GDP")+
  • ylab("Year")+
  • theme_bw()
    **edit the variables and title for each variable

Regression:
ModCPI <- lm(GDP ~ CPI, data = data)
print(ModCPI)

ModLTIR <- lm(GDP ~ LTIR, data = data)
print(ModLTIR)

Modunemp <- lm(GDP ~ unemp, data = data)
print(Modunemp)

ModE <- lm(GDP ~ CPI + LTIR + unemp, data = data)
print(ModT)

View(ModCPI)
View(ModLTIR)
View(Modunemp)
View(ModT)
summary(ModE)
pander(summary(ModE))

Hi, and welcome!

Please see the FAQ: What's a reproducible example (`reprex`) and how do I do one? Using a reprex, complete with representative data will attract quicker and more answers.

The two key elements of a reprex are

  1. It can be copied into an R session
  2. It will only run if fed the data

Helping to evaluate the model can't be done without the data. Could you edit to include a full reprex? Thanks.

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.