Good Morning,
I am having difficulty interpolating an education percentage variable. The snapshot that I am showing below is for the state of Alabama which a small subset of a larger data set. My dataset is looking at the education percentage of college graduates between ages 18-25 with a bachelors degree from 1960 through 2013 across all 50 states. However, I only have the education percentage for every 10 years when the census was taken (1960, 1970, 1980, 1990, 2000, and 2010). I need to fill in the missing values by linear interpolation. The first step I do is:
list, sep(0)
+-------------+
| year y |
|-------------|
1. | 1960 5.7 |
2. | 1961 . |
3. | 1962 . |
4. | 1963 . |
5. | 1964 . |
6. | 1965 . |
7. | 1966 . |
8. | 1967 . |
9. | 1968 . |
10. | 1969 . |
11. | 1970 7.8 |
12. | 1971 . |
13. | 1972 . |
14. | 1973 . |
15. | 1974 . |
16. | 1975 . |
17. | 1976 . |
18. | 1977 . |
19. | 1978 . |
20. | 1979 . |
21. | 1980 12.2 |
22. | 1981 . |
23. | 1982 . |
24. | 1983 . |
25. | 1984 . |
26. | 1985 . |
27. | 1986 . |
28. | 1987 . |
29. | 1988 . |
30. | 1989 . |
31. | 1990 15.7 |
32. | 1991 . |
33. | 1992 . |
34. | 1993 . |
35. | 1994 . |
36. | 1995 . |
37. | 1996 . |
38. | 1997 . |
39. | 1998 . |
40. | 1999 . |
41. | 2000 19 |
42. | 2001 . |
43. | 2002 . |
44. | 2003 . |
45. | 2004 . |
46. | 2005 . |
47. | 2006 . |
48. | 2007 . |
49. | 2008 . |
50. | 2009 . |
51. | 2010 21.9 |
52. | 2011 . |
53. | 2012 . |
54. | 2013 . |
+-------------+
Then I use this command:
ipolate y year, gen(y1)
and I get the following error: type mismatch. I'm not sure what I am doing wrong and I would appreciate any helpful hints on how to correct my error. Thank you, Andrea.
I am having difficulty interpolating an education percentage variable. The snapshot that I am showing below is for the state of Alabama which a small subset of a larger data set. My dataset is looking at the education percentage of college graduates between ages 18-25 with a bachelors degree from 1960 through 2013 across all 50 states. However, I only have the education percentage for every 10 years when the census was taken (1960, 1970, 1980, 1990, 2000, and 2010). I need to fill in the missing values by linear interpolation. The first step I do is:
list, sep(0)
+-------------+
| year y |
|-------------|
1. | 1960 5.7 |
2. | 1961 . |
3. | 1962 . |
4. | 1963 . |
5. | 1964 . |
6. | 1965 . |
7. | 1966 . |
8. | 1967 . |
9. | 1968 . |
10. | 1969 . |
11. | 1970 7.8 |
12. | 1971 . |
13. | 1972 . |
14. | 1973 . |
15. | 1974 . |
16. | 1975 . |
17. | 1976 . |
18. | 1977 . |
19. | 1978 . |
20. | 1979 . |
21. | 1980 12.2 |
22. | 1981 . |
23. | 1982 . |
24. | 1983 . |
25. | 1984 . |
26. | 1985 . |
27. | 1986 . |
28. | 1987 . |
29. | 1988 . |
30. | 1989 . |
31. | 1990 15.7 |
32. | 1991 . |
33. | 1992 . |
34. | 1993 . |
35. | 1994 . |
36. | 1995 . |
37. | 1996 . |
38. | 1997 . |
39. | 1998 . |
40. | 1999 . |
41. | 2000 19 |
42. | 2001 . |
43. | 2002 . |
44. | 2003 . |
45. | 2004 . |
46. | 2005 . |
47. | 2006 . |
48. | 2007 . |
49. | 2008 . |
50. | 2009 . |
51. | 2010 21.9 |
52. | 2011 . |
53. | 2012 . |
54. | 2013 . |
+-------------+
Then I use this command:
ipolate y year, gen(y1)
and I get the following error: type mismatch. I'm not sure what I am doing wrong and I would appreciate any helpful hints on how to correct my error. Thank you, Andrea.
Comment