Dear R-Users, I put a small sample data set and script.
Aim: combine two partly overlapping series to one by prediction. Problem: only overlapping data points are predicted. Question: How do I predict data for rows 1-9 and 14-16? Thanks in advance for your advince, Tim ### CODE ### x <- read.csv('Buch1.csv') x year A B 1 1960 2 NA 2 1961 3 NA 3 1962 4 NA 4 1963 54 NA 5 1964 3 NA 6 1965 324 NA 7 1966 546 NA 8 1967 455 NA 9 1968 456 NA 10 1969 456 67 11 1970 8987 34 12 1971 78 34 13 1972 65 3 14 1973 NA 123 15 1974 NA 7688 16 1975 NA 324 predict(lm(a~b)) 10 11 12 13 2527.198 2394.489 2394.489 2269.824 ### DATA ### year,A,B 1960,2, 1961,3, 1962,4, 1963,54, 1964,3, 1965,324, 1966,546, 1967,455, 1968,456, 1969,456,67 1970,8987,34 1971,78,34 1972,65,3 1973,,123 1974,,7688 1975,,324 ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.