I have some data on mean kinship values of a single population for a number of consecutive years. After plotting this data, I saw that the kinship coefficient is decreases a bit until 1994/1995, after which it starts to increase.
`years <- 1980:2019
kinship <- c(0.0178, 0.0182, 0.0175,0.0173, 0.0177, 0.0174, 0.0171, 0.0177, 0.0174, 0.0177, 0.0169, 0.0173, 0.0176, 0.0181, 0.0191,
0.0194, 0.0201, 0.0209,0.0215, 0.0222, 0.0229, 0.0239, 0.0245, 0.0257, 0.0263, 0.0263, 0.0268, 0.0273, 0.0276, 0.028,
0.0292, 0.0299,0.031, 0.032, 0.032, 0.032, 0.0335, 0.0345, 0.0349, 0.0343)
data <- data.frame(years, kinship)
plot(years, kinship)
I am interested in whether the kinship increases at a different rate between 1980 and 1994 compared to between 1995-2019. But I am struggling to choose a method for statistical testing.
period1 <- data[1:15,]
period2 <- data[16:40,]
At first, I thought I could use a paired t-test but I do not have equal observations in each period. I could make period2 smaller, so that there are equal observations to period1. But would a paired t-test still test for a difference between the slopes in each period? I know that I can also test the slopes with linear regression, but I am not familiar with linear regression on dependent data. Or would it be better to not separate the data, but add another variable 'Period' in a column with values 1 and 2 to specify the period, and then run regression analysis or ANOVA test?
I am just looking for some direction as I am not too familiar with statistics. Thanks in advance!