I have been trying to find ways to predict the future literacy rate[2021 literacy rate] using literacy data from year 1951 to 2011.. I tried fitting Linear Regression as well as Logistic Regression.. But nothing seems to yield anything close to what i want.
The literacy.csv file used is present here. I have tried these codes.
litrcy <- read.csv("C:/Users/Shivam/Desktop/IND_adm_shp/litrcy.csv"
a=lm(litrcy$X2011~litrcy$X2001)
summary(a)
b=data.frame(litrcy$X2011)
predict(a,b)
OutPut ->
1 2 3 4 5 6 7
85.14027 72.98587 71.94011 76.68595 70.21817 87.15200 72.49449
8 9 10 11 12 13 14
71.57052 84.37589 86.18603 80.21383 77.92911 81.29320 54.47290
15 16 17 18 19 20 21
71.85611 78.00891 92.19183 88.81934 73.23367 81.71738 79.62585
22 23 24 25 26 27 28
75.09420 89.02094 80.36503 86.09363 75.09000 85.86264 79.04627
29 30 31 32 33 34 35
70.66335 78.38689 80.78921 72.98587 79.85684 71.57052 78.72708
36
78.70608
b=data.frame(litrcy$X1991)
output ->
1 2 3 4 5 6 7
85.14027 72.98587 71.94011 76.68595 70.21817 87.15200 72.49449
8 9 10 11 12 13 14
71.57052 84.37589 86.18603 80.21383 77.92911 81.29320 54.47290
15 16 17 18 19 20 21
71.85611 78.00891 92.19183 88.81934 73.23367 81.71738 79.62585
22 23 24 25 26 27 28
75.09420 89.02094 80.36503 86.09363 75.09000 85.86264 79.04627
29 30 31 32 33 34 35
70.66335 78.38689 80.78921 72.98587 79.85684 71.57052 78.72708
36
78.70608
I dont know much about regression.. Fitting this regression models leads to prediction of only the 2011 data even if the data used for prediction is different. Please help me with the prediction part.
