Hello everyone, I'm very new to R and I'm having a bit of difficulty with my data. I have 11 Economic variables a single country over a 21 year time span (from 1992 to 2013). I'm reading the data from csv file and then trying to define it as time series data using the ts() function. For some reason my figures are completely converted when I do so and I can't seem to figure out why. Below is a sample of my data before time series and after. If anyone can shed some light into this, I would appreciate it.
Thank you
countrydata<-read.csv("C:....Grad.csv", header = T)
model<-countrydata[,c(1:10)]
names(model)<-c("Year","fdi","rates","inflation","exports","imports","rd","electric","ggdp","gdp")
regmodel<-ts(model,start = 1992,end = 2013,frequency = 1)
#before time series
print(model)
ï..Year FDI Rates Inflation Exp Imp RD Elec GDP.G
1 1991 0.03 3.62 13.75 8.35 8.35 . 0.01 1.06
2 1992 0.09 9.13 8.97 8.69 9.42 . 0.03 5.48
3 1993 0.19 5.81 9.86 9.66 9.65 . 0.03 4.75
4 1994 0.29 4.34 9.98 9.72 10.01 . 0.05 6.66
5 1995 0.58 5.86 9.06 10.66 11.82 . 0.13 7.57
6 1996 0.61 7.79 7.58 10.21 11.35 0.63 0.21 7.55
#After time series
> print(regmodel)
Time Series:
Start = 1992
End = 2013
Frequency = 1
Year fdi rates inflation exports imports rd electric ggdp gdp
1992 1991 2 6 2 21 22 1 2 2 8
1993 1992 3 23 20 22 23 1 3 12 10
1994 1993 4 13 23 23 24 1 3 9 9
1995 1994 5 8 24 24 2 1 4 15 11
1996 1995 7 14 22 4 5 1 5 17 12
1997 1996 8 19 16 2 3 2 6 16 13