The data you describe is what might be considered summary statistics. Whether somebody likes apples can be considered a binary outcome (1 = likes apples, 0 = doesn't like apples). Therefore, if you survey 10,000 people over 6 years then you have 60,000 responses measuring the binary outcome of whether each individual likes apples.
The probability that somebody likes apples is actually the mean value of the binomial outcome. This is important for two primary reasons:
The sample size is much larger than summary statistics you have presented, and therefore you should have much higher confidence in your results than linear regression of summary statistics would indicate
The binary nature of your data should lead you to consider logistic regression.
I don't have the complete data since you only provided summary statistics. To illustrate the approach I will simulate some data assuming your probabilities of liking apples are in fact the "true" probabilities.
library(dplyr)
library(ggplot2)
library(tidyr)
# Simulate some data ------------------------------------------------------
# Number of individuals
n.individuals <- 1e4
# Years of study
years <- 2013:2018
# Numbre of years
n.years <- length(years)
# Probability of liking apples
pLikeApples = c(0.044, 0.041, 0.055, 0.063, 0.054, 0.060)
# Matrix of data
# Rows = individuals
# Columns = years
likesApples <- matrix(rep(NA_integer_, n.individuals*n.years), nrow = n.individuals)
for (j in 1:n.years) {
for (i in 1:n.individuals) {
likesApples[i,j] <- rbinom(1, 1, pLikeApples[j])
}
}
# Name columns
colnames(likesApples) <- years
# Convert to data frame
appleData <- as_tibble(likesApples) %>%
mutate(ID = row_number()) %>%
gather(year, likesApples, -ID) %>%
mutate(year = as.integer(year))
If we perform simple linear regression on summary statistics then we obtain results as shown below
# Summary data ------------------------------------------------------------
summaryAppleData <-
appleData %>%
group_by(year) %>%
summarize(pLikeApples = mean(likesApples))
# Plot data ---------------------------------------------------------------
ggplot(summaryAppleData,
aes(x = year, y = pLikeApples)) +
geom_point() +
geom_smooth(method = "lm") +
labs(title = "Standard linear regression \nof summary data",
y = "probability of liking apples") +
ylim(0, 0.1)
If we use the complete data and apply logistic regression then we obtain results as shown below
# Logistic regression -----------------------------------------------------
# Fit logistic regression model
myMod <- glm(data = appleData,
formula = likesApples ~ year,
family = "binomial")
# Summarize model
summary(myMod)
# Inverse link function
linkInv <- myMod$family$linkinv
# Predict response on linear scale
predLink <- predict.glm(myMod, newdata = summaryAppleData, type = "link", se.fit = TRUE)
# Backtransform predictions
pred <-
summaryAppleData %>%
mutate(pred = linkInv(predLink$fit),
LL = linkInv(predLink$fit - 1.96*predLink$se.fit),
UU = linkInv(predLink$fit + 1.96*predLink$se.fit))
# Plot logistic regression
ggplot() +
geom_point(data = summaryAppleData, aes(x = year, y = pLikeApples)) +
geom_line(data = pred, aes(x = year, y = pred)) +
geom_ribbon(data = pred, aes(x = year, y = pred, ymin = LL, ymax = UU), alpha = 0.3) +
labs(title = "Logistic regression",
y = "probability of liking apples") +
ylim(0, 0.1)
Finally to address your first question, based on the summary of the logistic regression model we see that the year variable is significant with a significant code of *** indicating a confidence level of basically 100%. You need to run the analysis on your data and not simulated data as I have done. Also, as discussed by @orcmor you should use caution when interpreting the confidence level. However, this indicates a significant increase in the probability of liking apples over time.
Your second question is slightly more complicated. You are interested in how much the response Y has changed for a range of X values. A ballpark estimate might be to take the upper end of the 95% confidence interval for the mean probability in 2013 and take the lower end of the confidence interval for 2018 to get an approximate lower bound on the total change. From the data I simulated, this is about a 1.4 percentage point increase.