library(tidyverse)
## Warning: package 'dplyr' was built under R version 4.4.1
## ── Attaching core tidyverse packages ──────────────────────── tidyverse 2.0.0 ──
## ✔ dplyr 1.1.4 ✔ readr 2.1.5
## ✔ forcats 1.0.0 ✔ stringr 1.5.1
## ✔ ggplot2 3.5.1 ✔ tibble 3.2.1
## ✔ lubridate 1.9.3 ✔ tidyr 1.3.1
## ✔ purrr 1.0.2
## ── Conflicts ────────────────────────────────────────── tidyverse_conflicts() ──
## ✖ dplyr::filter() masks stats::filter()
## ✖ dplyr::lag() masks stats::lag()
## ℹ Use the conflicted package (<http://conflicted.r-lib.org/>) to force all conflicts to become errors
In this lab we will go over
Please knit your final report as a PDF file. Submit both the PDF file and your RMD file in your Google drive homework folder.
We begin with a simulated example, to give you an orientation to the functions and their outputs, which you will use for subsequent exercises in the labe.
To do regression of \(y\) on \(x\) as a predictor, we can call the
lm function:
# These two commands are equivalent
fit <- lm(y ~ x, data=dat)
#fit <- lm(dat$y ~ dat$x)
To get detailed information about the fit, such as coefficient estimates, \(t\)-statistics and \(p\)-values:
summary(fit)
##
## Call:
## lm(formula = y ~ x, data = dat)
##
## Residuals:
## Min 1Q Median 3Q Max
## -8.2041 -2.1343 0.6057 2.1197 9.7063
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 2.3445 2.0164 1.163 0.26
## x -2.0669 0.1683 -12.279 3.48e-10 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 4.341 on 18 degrees of freedom
## Multiple R-squared: 0.8933, Adjusted R-squared: 0.8874
## F-statistic: 150.8 on 1 and 18 DF, p-value: 3.483e-10
The coefficients estimation can be accessed:
fit$coefficients
## (Intercept) x
## 2.344487 -2.066860
To get the estimated intercept term:
fit$coefficients[1]
## (Intercept)
## 2.344487
To get the estimated slope term:
fit$coefficients[2]
## x
## -2.06686
Exercise 1 a. What are the values of different parameters \(\beta_0\) and \(\beta_1\)?
# beta_0: 2.344487 and beta_1: 2.06686
# beta_0 is the Intercept (The b is slope intercept form) and beta_1 is the slope (The m is slope intercept form). The slope is negative indicating a downward regression.
The Multiple R-squared value is 0.8933, the Adjusted R-squared is 0.8874, and the F-Statistic value is 150.8 with a p value of 3.483e-10. With the R-Squared values being high and close to one and the F-Statistic being high with a corresponding p value less than 0.05, they indicate that this linear model is a good fit.
e1b Answer:
Google Trends is a
Google web tool providing equally-spaced time series data on the search
volume. You may compare different topics to discover how peoples’
interests change over time. You already code in at least one of the two
most widely-used programming languages for data science (R
and Python). Which language is more popular over time?
The following picture shows how to retrieve the Google Trends data. You may download and analyze your topics of interests as well. The dataset we obtained contains the following variables:

Read the data. You may wish to view the dataset contents with additional code.
data_science <- read.csv("data_science.csv")
# convert string to date object
data_science$week <- as.Date(data_science$week, "%Y-%m-%d")
# create a numeric column representing the time
data_science$time <- as.numeric(data_science$week)
data_science$time <- data_science$time - data_science$time[1] + 1
Exercise 2 The plot in the Google Trend page looks
somewhat linear. So we will try linear model first. Note that in the
lm function for the model \(y =
\beta_0 + \beta_1x + e\), you don’t need to add the intercept
term explicitly. Fitting the model with an intercept term is the default
when you pass the formula as y ~ x. If you would like to
fit a model without an intercept(\(y =
\beta_1x + e\), ), you need the formula
y ~ x - 1.
Run a regression of the r index on the predictor
time. Get the estimate of the slope.
# Insert your code here and save the estimated slope as
# `r.slope`. Then print the r.slope.
r.slope <- lm(r~time, data=data_science)
r.slope
##
## Call:
## lm(formula = r ~ time, data = data_science)
##
## Coefficients:
## (Intercept) time
## -10.03418 0.03842
Exercise 3. Let’s expand the analysis to include R and python
python.lm <- lm(python ~ time, data = data_science)
r.lm <- lm(r ~ time, data = data_science)
Get detailed information about the fit for both models.
summary(r.lm)
##
## Call:
## lm(formula = r ~ time, data = data_science)
##
## Residuals:
## Min 1Q Median 3Q Max
## -19.348 -7.076 -0.648 5.873 40.142
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -10.034179 1.116414 -8.988 <2e-16 ***
## time 0.038423 0.001065 36.089 <2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 9.019 on 258 degrees of freedom
## Multiple R-squared: 0.8347, Adjusted R-squared: 0.834
## F-statistic: 1302 on 1 and 258 DF, p-value: < 2.2e-16
summary(python.lm)
##
## Call:
## lm(formula = python ~ time, data = data_science)
##
## Residuals:
## Min 1Q Median 3Q Max
## -19.228 -8.692 -1.255 7.857 43.781
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -13.051606 1.350453 -9.665 <2e-16 ***
## time 0.038785 0.001288 30.116 <2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 10.91 on 258 degrees of freedom
## Multiple R-squared: 0.7785, Adjusted R-squared: 0.7777
## F-statistic: 907 on 1 and 258 DF, p-value: < 2.2e-16
Read the output of summary(r.lm).
data science r at time t.A. -10.034179 + 0.038423 t
B. 1.116414 + 0.001065 t
C. -10.034179 + 1.116414 t
D. 0.038423 + 0.001065 t
e3a Answer: Answer A because the F-Statistic is fairly large and the R-squared values
r index as a function of time, with the
regression line drawn through the scatterplot. The second plot will
contain the python index as a function of
time, with the appropriate regression line drawn through
the scatterplot. Present both plots side-by-side (1 row, 2 columns). Be
sure to appropriately label each plot.plot(data_science$time, data_science$r, main = "R Index as a Function of Time", xlab = "Time", ylab = "R Index", col = "blue", pch = 1)
abline(lm(r ~ time, data = data_science), col = "red", lwd = 2)
plot(data_science$time, data_science$python, main = "Python Index as a Function of Time", xlab = "Time", ylab = "Python Index", col = "green", pch = 1)
abline(lm(python ~ time, data = data_science), col = "orange", lwd = 2)
r model and the python model, using the model
output from (a). What are the null hypotheses in each case and what are
your conclusions?e3c Answer: For the R model the p-value is 0.038423 and the slope is 2.2e-16 and for the Python model the p-value is 0.038785 and the slope is 2.2e-16. In each case the null hypothesis is that there is no correlation between time as R or Python. Since the P values for both are less than 0.05 and the slopes are positive and roughly fit the shape of the scatter plots we will reject the null hypothesis and say that there is a correlation between time and R/Python more specifically the time spent using that programming language and your proficiency.
summary function.) Will you accept or reject the null given
the confidence interval you calculated?summary_r <- summary(r.lm)
summary_python <- summary(python.lm)
intercept_r <- summary_r$coefficients["(Intercept)", "Estimate"]
slope_r <- summary_r$coefficients["time", "Estimate"]
se_intercept_r <- summary_r$coefficients["(Intercept)", "Std. Error"]
se_slope_r <- summary_r$coefficients["time", "Std. Error"]
intercept_python <- summary_python$coefficients["(Intercept)", "Estimate"]
slope_python <- summary_python$coefficients["time", "Estimate"]
se_intercept_python <- summary_python$coefficients["(Intercept)", "Std. Error"]
se_slope_python <- summary_python$coefficients["time", "Std. Error"]
confidence_level <- 0.95
t_critical <- qt(1 - (1 - confidence_level) / 2, df = summary_r$df[2])
ci_intercept_r <- c(intercept_r - t_critical * se_intercept_r, intercept_r + t_critical * se_intercept_r)
ci_slope_r <- c(slope_r - t_critical * se_slope_r, slope_r + t_critical * se_slope_r)
ci_intercept_python <- c(intercept_python - t_critical * se_intercept_python, intercept_python + t_critical * se_intercept_python)
ci_slope_python <- c(slope_python - t_critical * se_slope_python, slope_python + t_critical * se_slope_python)
cat("Confidence Intervals for model_r:\n")
## Confidence Intervals for model_r:
cat("Intercept:", ci_intercept_r, "\n")
## Intercept: -12.23262 -7.835736
cat("Slope:", ci_slope_r, "\n\n")
## Slope: 0.03632639 0.04051944
cat("Confidence Intervals for model_python:\n")
## Confidence Intervals for model_python:
cat("Intercept:", ci_intercept_python, "\n")
## Intercept: -15.71092 -10.39229
cat("Slope:", ci_slope_python, "\n\n")
## Slope: 0.03624938 0.04132144
Since the confidence intervals are not 0 we will reject the null hypothesis which means there is a significant relationship between time and python as well as time and r.
Exercise 4.
summary(r.lm)
##
## Call:
## lm(formula = r ~ time, data = data_science)
##
## Residuals:
## Min 1Q Median 3Q Max
## -19.348 -7.076 -0.648 5.873 40.142
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -10.034179 1.116414 -8.988 <2e-16 ***
## time 0.038423 0.001065 36.089 <2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 9.019 on 258 degrees of freedom
## Multiple R-squared: 0.8347, Adjusted R-squared: 0.834
## F-statistic: 1302 on 1 and 258 DF, p-value: < 2.2e-16
data science r search index using function
coef. (This is equivalent to the dollar sign plus
“coefficients”)r_coef <- coef(r.lm)
print(r_coef)
## (Intercept) time
## -10.03417888 0.03842291
data science r search index using function
confint.r_confint <- confint(r.lm)
print(r_confint)
## 2.5 % 97.5 %
## (Intercept) -12.23262190 -7.83573586
## time 0.03632639 0.04051944
bootOnce <- function() {
boot.index <- sample(1:nrow(data_science), replace = TRUE)
y.sample <- data_science$r[boot.index]
x.sample <- data_science$time[boot.index]
if (is.null(y.sample) || is.null(x.sample) || length(y.sample) == 0 || length(x.sample) == 0) {
stop("Error: y.sample or x.sample is NULL or has no values.")
}
fit.model <- lm(y.sample ~ x.sample)
coef <- coef(fit.model)
return(coef)
}
bootOnce()
## (Intercept) x.sample
## -10.24290236 0.03866879
Replicate the function bootOnce 1000 times to get 1000
bootstrapped statistics.
set.seed(123)
boot.stats <- replicate(1000, bootOnce())
boot.stats
## [,1] [,2] [,3] [,4] [,5]
## (Intercept) -10.02108545 -11.29019263 -8.38941060 -11.1482317 -10.17283024
## x.sample 0.03827453 0.03953005 0.03646955 0.0403691 0.03807406
## [,6] [,7] [,8] [,9] [,10]
## (Intercept) -9.39104244 -8.39042543 -10.95282771 -10.37452567 -10.14999779
## x.sample 0.03774117 0.03705863 0.03930295 0.03939158 0.03879551
## [,11] [,12] [,13] [,14] [,15]
## (Intercept) -7.54252233 -10.69940813 -9.02989518 -9.08556479 -11.90514746
## x.sample 0.03603308 0.03818519 0.03727637 0.03835258 0.03978824
## [,16] [,17] [,18] [,19] [,20]
## (Intercept) -11.22663108 -9.00647917 -8.51185420 -8.77859247 -10.53731451
## x.sample 0.03972246 0.03716788 0.03655941 0.03650342 0.03887678
## [,21] [,22] [,23] [,24] [,25]
## (Intercept) -8.40302115 -12.02766263 -10.9582235 -7.12941788 -9.33212287
## x.sample 0.03641585 0.04050755 0.0400864 0.03588521 0.03730435
## [,26] [,27] [,28] [,29] [,30]
## (Intercept) -10.12224952 -9.05226010 -9.05152581 -9.5802980 -8.97917902
## x.sample 0.03746297 0.03756405 0.03787047 0.0380922 0.03728508
## [,31] [,32] [,33] [,34] [,35]
## (Intercept) -10.39980925 -13.67939482 -9.28647814 -10.83473308 -8.51096593
## x.sample 0.03940366 0.04373999 0.03950912 0.04047855 0.03706926
## [,36] [,37] [,38] [,39] [,40]
## (Intercept) -10.59837876 -12.28873035 -10.43429861 -10.37861519 -9.91967322
## x.sample 0.03788151 0.04059562 0.03791727 0.03897576 0.03869267
## [,41] [,42] [,43] [,44] [,45]
## (Intercept) -10.29839957 -10.22356452 -11.02449312 -10.9159024 -9.55112517
## x.sample 0.03802117 0.03794552 0.04012558 0.0392903 0.03739899
## [,46] [,47] [,48] [,49] [,50]
## (Intercept) -8.1889672 -9.66307945 -8.28000952 -11.04143031 -8.85000888
## x.sample 0.0382464 0.03838179 0.03568605 0.04003715 0.03639371
## [,51] [,52] [,53] [,54] [,55]
## (Intercept) -9.55476868 -10.54412796 -11.60531813 -11.21104068 -8.00960684
## x.sample 0.03749935 0.03892733 0.04098594 0.03943718 0.03657279
## [,56] [,57] [,58] [,59] [,60]
## (Intercept) -9.96972556 -10.08957551 -9.71054920 -11.49938771 -10.47691256
## x.sample 0.03750182 0.03847896 0.03911888 0.04078256 0.03784993
## [,61] [,62] [,63] [,64] [,65]
## (Intercept) -11.35337662 -9.63986893 -10.04241963 -8.01661737 -10.46101747
## x.sample 0.03925545 0.03795028 0.03842846 0.03620157 0.03918173
## [,66] [,67] [,68] [,69] [,70]
## (Intercept) -11.54248432 -10.56264251 -9.45734492 -9.75004475 -7.96510053
## x.sample 0.03962177 0.04026023 0.03820042 0.03922781 0.03655538
## [,71] [,72] [,73] [,74] [,75]
## (Intercept) -10.40435081 -9.63109963 -8.19178646 -10.45122010 -8.76565836
## x.sample 0.03778881 0.03895613 0.03609877 0.03916005 0.03682366
## [,76] [,77] [,78] [,79] [,80]
## (Intercept) -9.23147841 -9.25215176 -9.03135264 -9.01829939 -10.63910296
## x.sample 0.03770935 0.03777571 0.03777476 0.03720226 0.03860589
## [,81] [,82] [,83] [,84] [,85]
## (Intercept) -10.97682867 -9.52193073 -8.25942924 -9.44038438 -9.88120861
## x.sample 0.03951394 0.03748007 0.03723827 0.03847785 0.03764325
## [,86] [,87] [,88] [,89] [,90]
## (Intercept) -10.73876414 -10.80197922 -8.812584 -9.64352723 -9.52262899
## x.sample 0.03878724 0.03975191 0.036683 0.03776376 0.03736944
## [,91] [,92] [,93] [,94] [,95]
## (Intercept) -10.24841268 -9.95011406 -9.07087280 -10.02921883 -8.51868704
## x.sample 0.03901906 0.03825774 0.03696603 0.03881615 0.03704565
## [,96] [,97] [,98] [,99] [,100]
## (Intercept) -8.66876388 -10.53114305 -11.54004068 -9.45033274 -11.9115095
## x.sample 0.03673863 0.03931538 0.03988059 0.03770374 0.0405483
## [,101] [,102] [,103] [,104] [,105]
## (Intercept) -12.81041679 -8.77474037 -9.65859072 -11.21055287 -12.68854403
## x.sample 0.04093322 0.03650766 0.03737065 0.03791467 0.04200735
## [,106] [,107] [,108] [,109] [,110]
## (Intercept) -9.15907059 -9.37229926 -12.44891891 -10.91859385 -11.5337271
## x.sample 0.03763137 0.03742225 0.04074459 0.03904968 0.0409947
## [,111] [,112] [,113] [,114] [,115]
## (Intercept) -9.08743459 -11.22660006 -9.98159256 -11.63519190 -14.3634491
## x.sample 0.03871611 0.03919838 0.03862204 0.03960813 0.0427051
## [,116] [,117] [,118] [,119] [,120]
## (Intercept) -10.86648174 -10.93508234 -10.36371854 -8.67579047 -9.70258546
## x.sample 0.03899075 0.03873465 0.03846665 0.03646438 0.03903636
## [,121] [,122] [,123] [,124] [,125]
## (Intercept) -10.46015944 -9.59675129 -11.22080500 -10.23763158 -10.40132015
## x.sample 0.03913996 0.03853708 0.03875779 0.03852348 0.03874946
## [,126] [,127] [,128] [,129] [,130]
## (Intercept) -10.72561276 -9.26135980 -8.21410901 -9.61150363 -10.67987648
## x.sample 0.03811989 0.03688966 0.03732382 0.03721225 0.03889808
## [,131] [,132] [,133] [,134] [,135]
## (Intercept) -8.97607354 -11.67839168 -11.29489459 -10.51295820 -10.86378636
## x.sample 0.03675076 0.03946029 0.03904815 0.03829467 0.03946262
## [,136] [,137] [,138] [,139] [,140]
## (Intercept) -9.88365698 -8.63320131 -8.62660978 -11.73828599 -9.76732337
## x.sample 0.03774585 0.03753689 0.03699966 0.04066611 0.03864601
## [,141] [,142] [,143] [,144] [,145]
## (Intercept) -8.70477852 -13.2275574 -10.08391451 -8.04418897 -10.47463074
## x.sample 0.03731025 0.0416344 0.03772177 0.03603405 0.03868195
## [,146] [,147] [,148] [,149] [,150]
## (Intercept) -10.57146554 -10.03809765 -8.80670439 -11.20187916 -10.39396258
## x.sample 0.03928802 0.03833044 0.03763124 0.03928196 0.03802625
## [,151] [,152] [,153] [,154] [,155]
## (Intercept) -8.99281082 -9.21304761 -10.414492 -11.06048533 -10.28029392
## x.sample 0.03592365 0.03743215 0.040035 0.03905121 0.03765418
## [,156] [,157] [,158] [,159] [,160]
## (Intercept) -10.31208063 -10.31937854 -9.34147789 -9.26123805 -10.74262535
## x.sample 0.03854769 0.03907861 0.03895466 0.03805119 0.03810978
## [,161] [,162] [,163] [,164] [,165]
## (Intercept) -11.6959709 -10.46797336 -9.35948736 -11.25836152 -11.60695238
## x.sample 0.0399744 0.03877529 0.03878713 0.03899382 0.03997486
## [,166] [,167] [,168] [,169] [,170]
## (Intercept) -11.50631861 -10.08686291 -8.91262419 -9.43863651 -11.92633410
## x.sample 0.04025949 0.03797948 0.03844404 0.03789807 0.04014183
## [,171] [,172] [,173] [,174] [,175]
## (Intercept) -8.7111753 -10.83523459 -9.98175590 -9.07161336 -9.06346972
## x.sample 0.0366561 0.03910248 0.03773978 0.03736937 0.03678466
## [,176] [,177] [,178] [,179] [,180]
## (Intercept) -10.43443330 -11.28189203 -8.11782290 -11.82475606 -8.27634673
## x.sample 0.03920696 0.04010871 0.03646063 0.04001233 0.03710143
## [,181] [,182] [,183] [,184] [,185]
## (Intercept) -9.51733499 -8.71460954 -10.43974764 -10.7032796 -10.08556361
## x.sample 0.03801281 0.03728208 0.03861807 0.0396463 0.03744301
## [,186] [,187] [,188] [,189] [,190]
## (Intercept) -8.50603474 -8.87749296 -10.35009044 -12.33273084 -11.01722879
## x.sample 0.03763627 0.03778038 0.03864999 0.04009506 0.03987845
## [,191] [,192] [,193] [,194] [,195]
## (Intercept) -10.7448741 -11.81002899 -10.63835341 -9.37550699 -10.23512650
## x.sample 0.0396112 0.04116682 0.03832373 0.03824323 0.03880492
## [,196] [,197] [,198] [,199] [,200]
## (Intercept) -9.68572718 -9.82569630 -7.19062748 -10.55578223 -10.28337137
## x.sample 0.03847887 0.03857169 0.03569126 0.03783307 0.03776626
## [,201] [,202] [,203] [,204] [,205]
## (Intercept) -9.65242583 -8.94605879 -9.61268684 -10.60222198 -10.19632051
## x.sample 0.03811199 0.03870498 0.03820926 0.03896544 0.03766529
## [,206] [,207] [,208] [,209] [,210]
## (Intercept) -9.1480748 -9.82121210 -10.06428952 -11.02025562 -8.48025707
## x.sample 0.0371777 0.03785733 0.03765947 0.04007808 0.03736521
## [,211] [,212] [,213] [,214] [,215]
## (Intercept) -11.112027 -11.44189754 -10.01939197 -9.04769864 -11.28973687
## x.sample 0.040246 0.03997929 0.03881486 0.03761502 0.04005887
## [,216] [,217] [,218] [,219] [,220]
## (Intercept) -9.55432451 -9.37505106 -9.0581988 -9.08572536 -10.29793701
## x.sample 0.03685657 0.03930385 0.0371795 0.03750369 0.03856109
## [,221] [,222] [,223] [,224] [,225]
## (Intercept) -8.66698866 -9.23928953 -12.01457925 -10.43234762 -7.9512687
## x.sample 0.03605126 0.03820056 0.04061878 0.03888102 0.0361578
## [,226] [,227] [,228] [,229] [,230]
## (Intercept) -10.80551072 -10.65693823 -9.87904539 -8.28995733 -8.95149628
## x.sample 0.03961342 0.03945988 0.03814204 0.03492449 0.03723929
## [,231] [,232] [,233] [,234] [,235]
## (Intercept) -9.5860005 -12.532950 -10.29722280 -12.23879281 -8.43911013
## x.sample 0.0375625 0.039964 0.03833091 0.04164969 0.03594094
## [,236] [,237] [,238] [,239] [,240]
## (Intercept) -10.58666679 -9.59067900 -11.33970366 -10.38363967 -8.22959051
## x.sample 0.03903405 0.03836814 0.03998053 0.03914522 0.03684451
## [,241] [,242] [,243] [,244] [,245]
## (Intercept) -7.69600553 -10.10623784 -9.9382081 -8.77692921 -10.27745615
## x.sample 0.03530975 0.03724921 0.0381038 0.03868724 0.03957054
## [,246] [,247] [,248] [,249] [,250]
## (Intercept) -11.28322173 -9.10846452 -12.84035876 -8.64065917 -11.2946131
## x.sample 0.04013664 0.03792081 0.04050427 0.03661296 0.0390589
## [,251] [,252] [,253] [,254] [,255]
## (Intercept) -8.96856305 -9.22748975 -9.59744092 -9.0186461 -9.35027123
## x.sample 0.03773884 0.03757938 0.03851437 0.0371457 0.03810424
## [,256] [,257] [,258] [,259] [,260]
## (Intercept) -7.8754379 -8.77284195 -9.86244485 -9.88024084 -9.04530013
## x.sample 0.0370368 0.03784188 0.03760813 0.03869455 0.03708203
## [,261] [,262] [,263] [,264] [,265]
## (Intercept) -9.69623640 -10.96572488 -8.35990266 -9.31761778 -9.45241230
## x.sample 0.03855271 0.03849385 0.03711012 0.03798105 0.03830771
## [,266] [,267] [,268] [,269] [,270]
## (Intercept) -10.15643885 -10.20525393 -9.95528795 -8.58493515 -9.29185061
## x.sample 0.03784719 0.03885069 0.03864326 0.03809711 0.03838706
## [,271] [,272] [,273] [,274] [,275]
## (Intercept) -9.76713376 -9.07482294 -11.43359587 -9.14866978 -7.77690023
## x.sample 0.03870165 0.03742597 0.03981862 0.03752127 0.03598963
## [,276] [,277] [,278] [,279] [,280]
## (Intercept) -10.02777714 -9.05688746 -8.17005792 -8.49116816 -10.27766703
## x.sample 0.03808091 0.03759218 0.03799833 0.03759342 0.03873496
## [,281] [,282] [,283] [,284] [,285]
## (Intercept) -8.95077767 -10.21388063 -11.64319150 -8.4028160 -10.31639695
## x.sample 0.03753221 0.03908214 0.03905751 0.0362804 0.04019808
## [,286] [,287] [,288] [,289] [,290]
## (Intercept) -9.98454007 -7.97076041 -11.81571714 -9.79911940 -10.63150919
## x.sample 0.03794497 0.03563034 0.04054022 0.03818271 0.03885449
## [,291] [,292] [,293] [,294] [,295]
## (Intercept) -10.52891133 -8.05180566 -9.52122335 -9.6311493 -10.95002214
## x.sample 0.03823742 0.03678627 0.03799287 0.0389684 0.04037781
## [,296] [,297] [,298] [,299] [,300]
## (Intercept) -9.93482124 -11.1116503 -8.65375595 -9.3602253 -10.08833419
## x.sample 0.03823793 0.0403845 0.03828536 0.0374725 0.03787018
## [,301] [,302] [,303] [,304] [,305]
## (Intercept) -9.35744813 -11.74563553 -9.3652721 -10.5611873 -9.65884020
## x.sample 0.03775424 0.03976137 0.0373441 0.0381117 0.03855448
## [,306] [,307] [,308] [,309] [,310]
## (Intercept) -10.40332345 -10.71959173 -9.40893140 -9.82124921 -9.15253607
## x.sample 0.03897498 0.03772416 0.03806305 0.03791537 0.03721417
## [,311] [,312] [,313] [,314] [,315]
## (Intercept) -11.4929413 -9.74128588 -11.20873951 -10.27192397 -10.04080774
## x.sample 0.0402759 0.03699373 0.03971901 0.03782939 0.03844792
## [,316] [,317] [,318] [,319] [,320]
## (Intercept) -10.34370771 -9.33649860 -9.96169164 -10.5418386 -10.81029544
## x.sample 0.03808314 0.03741953 0.03894867 0.0392403 0.03971357
## [,321] [,322] [,323] [,324] [,325]
## (Intercept) -7.65104316 -9.45902983 -8.61578693 -10.47672004 -10.19484137
## x.sample 0.03648428 0.03831942 0.03665268 0.03782628 0.03937934
## [,326] [,327] [,328] [,329] [,330]
## (Intercept) -12.91204173 -9.65113089 -10.40333206 -11.64214556 -8.45087238
## x.sample 0.04128255 0.03847144 0.03842321 0.03920917 0.03622707
## [,331] [,332] [,333] [,334] [,335]
## (Intercept) -9.91942612 -10.3060528 -10.46053821 -10.000417 -10.70872259
## x.sample 0.03713913 0.0390338 0.03867795 0.038122 0.03828913
## [,336] [,337] [,338] [,339] [,340]
## (Intercept) -10.77001120 -10.17417263 -9.48140627 -8.68054412 -11.11135099
## x.sample 0.03940178 0.03824428 0.03801445 0.03727173 0.03978096
## [,341] [,342] [,343] [,344] [,345]
## (Intercept) -9.14541155 -8.73806781 -9.10841121 -9.88153511 -9.78679031
## x.sample 0.03737911 0.03672852 0.03864812 0.03755174 0.03884751
## [,346] [,347] [,348] [,349] [,350]
## (Intercept) -10.41668120 -9.79451292 -11.397797 -9.26674233 -10.67566584
## x.sample 0.04007531 0.03774413 0.039838 0.03781755 0.03883244
## [,351] [,352] [,353] [,354] [,355]
## (Intercept) -9.46862155 -11.34997827 -11.13782370 -8.92018483 -11.89854724
## x.sample 0.03781059 0.04001072 0.03914967 0.03592963 0.04014518
## [,356] [,357] [,358] [,359] [,360]
## (Intercept) -9.91630090 -10.68083047 -8.92279451 -10.57150783 -8.37285366
## x.sample 0.03863178 0.03899501 0.03779705 0.03931221 0.03587715
## [,361] [,362] [,363] [,364] [,365]
## (Intercept) -10.91449748 -9.54574197 -13.02994472 -10.24969264 -11.1655758
## x.sample 0.03926871 0.03775752 0.04172335 0.03777065 0.0394131
## [,366] [,367] [,368] [,369] [,370]
## (Intercept) -10.68730454 -11.1318820 -9.33473599 -10.15061471 -10.54695153
## x.sample 0.03957578 0.0386215 0.03718373 0.03783199 0.03877732
## [,371] [,372] [,373] [,374] [,375]
## (Intercept) -10.46660731 -11.17750417 -9.8268736 -10.20468091 -9.12853606
## x.sample 0.03860974 0.03960928 0.0380997 0.03861743 0.03679655
## [,376] [,377] [,378] [,379] [,380]
## (Intercept) -10.93843289 -12.38773175 -9.90255268 -10.35079603 -10.57896269
## x.sample 0.03880284 0.04065144 0.03902357 0.03779628 0.03979491
## [,381] [,382] [,383] [,384] [,385]
## (Intercept) -11.14244949 -10.13203125 -10.79304595 -10.27866012 -11.89430461
## x.sample 0.04025321 0.04022374 0.03917986 0.03894804 0.04085942
## [,386] [,387] [,388] [,389] [,390]
## (Intercept) -11.68571434 -9.36203054 -8.98179036 -9.79146810 -10.2160741
## x.sample 0.03884908 0.03722484 0.03649956 0.03756326 0.0386312
## [,391] [,392] [,393] [,394] [,395]
## (Intercept) -9.29233082 -10.42238657 -10.60260390 -10.99810740 -12.5683668
## x.sample 0.03772586 0.03825361 0.03862099 0.04008688 0.0403459
## [,396] [,397] [,398] [,399] [,400]
## (Intercept) -10.39968780 -10.8503451 -10.12535043 -9.33274733 -11.05353985
## x.sample 0.03884441 0.0396581 0.03933214 0.03536145 0.03823189
## [,401] [,402] [,403] [,404] [,405]
## (Intercept) -9.56686507 -10.48367749 -10.04931378 -9.43705341 -9.76398859
## x.sample 0.03834456 0.03858071 0.03797313 0.03711998 0.03836356
## [,406] [,407] [,408] [,409] [,410]
## (Intercept) -9.62798988 -10.43182551 -10.60249261 -8.85540722 -9.78059731
## x.sample 0.03822204 0.03878773 0.03775592 0.03796518 0.03710004
## [,411] [,412] [,413] [,414] [,415]
## (Intercept) -10.0283041 -11.10876503 -8.32283629 -9.16922798 -10.25516699
## x.sample 0.0386923 0.04067242 0.03647169 0.03755501 0.03886941
## [,416] [,417] [,418] [,419] [,420]
## (Intercept) -10.88516871 -11.71240807 -8.27773458 -10.10964537 -8.46615377
## x.sample 0.03908868 0.03953858 0.03749486 0.03869619 0.03619088
## [,421] [,422] [,423] [,424] [,425]
## (Intercept) -11.64385740 -11.71026454 -11.97827467 -10.64370016 -8.87771754
## x.sample 0.03951182 0.04046802 0.04055037 0.03922637 0.03760899
## [,426] [,427] [,428] [,429] [,430]
## (Intercept) -7.431230 -13.94052617 -8.19170701 -10.09737820 -8.43020183
## x.sample 0.035777 0.04176583 0.03569963 0.03883811 0.03692192
## [,431] [,432] [,433] [,434] [,435]
## (Intercept) -8.91697257 -8.997011 -10.56224676 -10.61262597 -9.60577275
## x.sample 0.03639184 0.037308 0.03912265 0.03912073 0.03798526
## [,436] [,437] [,438] [,439] [,440]
## (Intercept) -8.53132032 -9.89173262 -9.62950843 -9.7980440 -11.29687193
## x.sample 0.03649663 0.03781898 0.03754842 0.0392223 0.04000028
## [,441] [,442] [,443] [,444] [,445]
## (Intercept) -9.53539918 -9.40213437 -9.96352591 -11.54190238 -7.13549322
## x.sample 0.03870838 0.03817683 0.03759827 0.03956167 0.03645167
## [,446] [,447] [,448] [,449] [,450]
## (Intercept) -10.53276493 -9.55495403 -8.51707465 -12.21201521 -10.02603145
## x.sample 0.03780608 0.03855039 0.03750526 0.04091401 0.03894641
## [,451] [,452] [,453] [,454] [,455]
## (Intercept) -9.09391436 -12.24679523 -8.85124550 -9.26313489 -9.50650251
## x.sample 0.03744637 0.04121995 0.03583319 0.03736668 0.03779831
## [,456] [,457] [,458] [,459] [,460]
## (Intercept) -11.38822967 -9.42661140 -12.45635090 -9.05658109 -8.78387104
## x.sample 0.03898729 0.03821715 0.04116803 0.03808103 0.03751767
## [,461] [,462] [,463] [,464] [,465]
## (Intercept) -11.013176 -9.35777621 -10.26692088 -10.42370264 -11.30153160
## x.sample 0.039808 0.03771802 0.03877022 0.03871482 0.03992795
## [,466] [,467] [,468] [,469] [,470]
## (Intercept) -10.3840820 -8.23381208 -10.33741358 -9.37291261 -9.55340507
## x.sample 0.0387252 0.03623594 0.03969548 0.03743895 0.03685438
## [,471] [,472] [,473] [,474] [,475]
## (Intercept) -10.30780719 -10.14309460 -12.47555697 -10.14129725 -9.33653817
## x.sample 0.03831982 0.03872355 0.03955822 0.03917501 0.03718146
## [,476] [,477] [,478] [,479] [,480]
## (Intercept) -10.2266768 -10.88418691 -9.7268591 -8.51992622 -11.25429318
## x.sample 0.0378184 0.03956836 0.0387558 0.03629624 0.03881255
## [,481] [,482] [,483] [,484] [,485]
## (Intercept) -10.03681583 -11.22163658 -11.92437891 -10.78699242 -12.15315392
## x.sample 0.03834286 0.03935247 0.04030157 0.03996148 0.04123564
## [,486] [,487] [,488] [,489] [,490]
## (Intercept) -8.30344788 -9.05254511 -11.52108102 -10.22262508 -9.44143785
## x.sample 0.03664301 0.03655528 0.03949223 0.03937339 0.03792715
## [,491] [,492] [,493] [,494] [,495]
## (Intercept) -11.05274803 -11.88089906 -9.5907736 -7.73853280 -8.45521705
## x.sample 0.04015853 0.03991594 0.0379465 0.03636533 0.03800849
## [,496] [,497] [,498] [,499] [,500]
## (Intercept) -6.79394109 -8.51630565 -10.61813397 -9.27304180 -9.18229152
## x.sample 0.03576686 0.03721745 0.03783971 0.03733388 0.03680209
## [,501] [,502] [,503] [,504] [,505]
## (Intercept) -8.72680769 -9.63689471 -9.78933746 -7.21638562 -9.75125096
## x.sample 0.03628286 0.03758297 0.03933132 0.03577997 0.03802011
## [,506] [,507] [,508] [,509] [,510]
## (Intercept) -11.04532215 -9.7936076 -10.43934301 -9.9854266 -9.68583066
## x.sample 0.03983591 0.0373031 0.03780225 0.0389279 0.03786379
## [,511] [,512] [,513] [,514] [,515]
## (Intercept) -11.61103684 -8.70514683 -8.66814751 -9.25650534 -9.18143402
## x.sample 0.03933964 0.03706052 0.03618709 0.03811993 0.03772389
## [,516] [,517] [,518] [,519] [,520]
## (Intercept) -12.43802878 -11.15908135 -8.33017785 -11.85659052 -8.89352252
## x.sample 0.04041524 0.03875451 0.03637847 0.03977082 0.03707149
## [,521] [,522] [,523] [,524] [,525]
## (Intercept) -10.86528319 -11.28435481 -11.46566734 -9.7414237 -10.73537586
## x.sample 0.03894485 0.03971064 0.03884697 0.0374677 0.03923873
## [,526] [,527] [,528] [,529] [,530]
## (Intercept) -9.63455783 -9.97405051 -9.43893592 -9.70735003 -9.59563364
## x.sample 0.03752832 0.03824975 0.03787246 0.03759757 0.03928976
## [,531] [,532] [,533] [,534] [,535]
## (Intercept) -10.27807016 -10.07411096 -10.06869753 -11.60561400 -10.41292623
## x.sample 0.03904625 0.03873645 0.03826882 0.04070181 0.03860844
## [,536] [,537] [,538] [,539] [,540]
## (Intercept) -8.22581011 -8.73329974 -9.74204051 -8.902277 -11.2923700
## x.sample 0.03691937 0.03798749 0.03761287 0.037063 0.0396806
## [,541] [,542] [,543] [,544] [,545]
## (Intercept) -8.59090026 -9.00357471 -10.42192375 -10.30784481 -12.01694450
## x.sample 0.03735767 0.03835146 0.04010163 0.03969228 0.03960084
## [,546] [,547] [,548] [,549] [,550]
## (Intercept) -9.35768885 -9.99548192 -9.89489925 -9.07395632 -10.18995367
## x.sample 0.03786688 0.03861585 0.03870892 0.03830024 0.03731948
## [,551] [,552] [,553] [,554] [,555]
## (Intercept) -10.56226514 -10.20669090 -10.86213151 -9.43030043 -9.67388483
## x.sample 0.03871398 0.03923185 0.03969419 0.03846055 0.03845166
## [,556] [,557] [,558] [,559] [,560]
## (Intercept) -10.49803962 -9.20857683 -8.85132623 -10.04130813 -9.57076302
## x.sample 0.03910275 0.03842854 0.03761823 0.03868214 0.03761795
## [,561] [,562] [,563] [,564] [,565]
## (Intercept) -9.72862539 -9.96524873 -11.41407359 -8.71487854 -9.64826282
## x.sample 0.03792845 0.03748163 0.04005067 0.03744278 0.03684436
## [,566] [,567] [,568] [,569] [,570]
## (Intercept) -9.4373079 -10.11817912 -9.53539194 -9.20921762 -12.2436238
## x.sample 0.0377538 0.03820053 0.03791152 0.03829853 0.0410206
## [,571] [,572] [,573] [,574] [,575]
## (Intercept) -9.73586255 -8.97173382 -10.26923604 -9.53914997 -8.49223515
## x.sample 0.03791085 0.03772334 0.03866161 0.03684985 0.03665715
## [,576] [,577] [,578] [,579] [,580]
## (Intercept) -9.86559091 -8.26642999 -8.62980952 -8.98486452 -8.68191320
## x.sample 0.03698607 0.03582941 0.03706255 0.03735679 0.03649509
## [,581] [,582] [,583] [,584] [,585]
## (Intercept) -9.93693339 -8.85494787 -10.1655595 -10.38590366 -11.40578432
## x.sample 0.03882703 0.03704533 0.0380627 0.03865532 0.03901694
## [,586] [,587] [,588] [,589] [,590]
## (Intercept) -9.7787881 -9.80949647 -9.63291556 -10.58388386 -9.6147774
## x.sample 0.0385622 0.03815217 0.03747123 0.03907436 0.0380554
## [,591] [,592] [,593] [,594] [,595]
## (Intercept) -8.44614397 -9.92906692 -8.98870575 -11.96340047 -9.13085157
## x.sample 0.03634265 0.03902394 0.03710899 0.04041594 0.03683661
## [,596] [,597] [,598] [,599] [,600]
## (Intercept) -9.87894778 -8.19718097 -9.75877774 -9.0588197 -9.47248371
## x.sample 0.03777465 0.03623293 0.03892885 0.0382309 0.03666814
## [,601] [,602] [,603] [,604] [,605]
## (Intercept) -9.46285313 -11.55457891 -11.20463313 -9.40959497 -10.7071872
## x.sample 0.03851549 0.04012316 0.04013944 0.03723802 0.0394841
## [,606] [,607] [,608] [,609] [,610]
## (Intercept) -8.47244955 -11.01903606 -12.13538142 -7.77235090 -8.24737785
## x.sample 0.03664516 0.04065269 0.03979401 0.03577784 0.03699839
## [,611] [,612] [,613] [,614] [,615]
## (Intercept) -10.62928072 -9.37324777 -9.13764707 -9.65279888 -9.35887780
## x.sample 0.03931866 0.03798042 0.03732897 0.03831217 0.03750897
## [,616] [,617] [,618] [,619] [,620]
## (Intercept) -10.16261965 -8.8224562 -10.5701425 -10.67948945 -11.81942184
## x.sample 0.03785733 0.0372938 0.0387711 0.03850157 0.04002906
## [,621] [,622] [,623] [,624] [,625]
## (Intercept) -9.76165557 -12.64511485 -10.48633172 -10.23890314 -10.54659153
## x.sample 0.03825864 0.04033484 0.03820304 0.03895334 0.03819199
## [,626] [,627] [,628] [,629] [,630]
## (Intercept) -10.2630225 -11.83740714 -10.63504547 -9.57077268 -7.45618157
## x.sample 0.0382189 0.03996448 0.03873826 0.03778587 0.03692324
## [,631] [,632] [,633] [,634] [,635]
## (Intercept) -9.91082311 -8.48837889 -7.59187289 -10.37301897 -9.62598221
## x.sample 0.03822938 0.03669771 0.03576611 0.03848771 0.03770273
## [,636] [,637] [,638] [,639] [,640]
## (Intercept) -10.18025179 -11.49133025 -8.33053439 -8.69903344 -11.85745137
## x.sample 0.03803448 0.04047357 0.03633372 0.03704039 0.04003488
## [,641] [,642] [,643] [,644] [,645]
## (Intercept) -9.9734563 -9.14523520 -8.57862327 -10.2614656 -9.06102278
## x.sample 0.0387469 0.03702681 0.03692212 0.0384828 0.03784683
## [,646] [,647] [,648] [,649] [,650]
## (Intercept) -12.17936770 -11.08747827 -11.79265933 -11.641349 -9.98510996
## x.sample 0.04016185 0.03779539 0.03991385 0.040394 0.03874241
## [,651] [,652] [,653] [,654] [,655]
## (Intercept) -8.65761526 -9.73718430 -10.87271310 -8.38506038 -9.83396086
## x.sample 0.03738945 0.03825885 0.04014826 0.03655832 0.03763171
## [,656] [,657] [,658] [,659] [,660]
## (Intercept) -9.70286714 -9.80571360 -11.00708661 -10.36734846 -10.26659721
## x.sample 0.03719357 0.03855578 0.03976743 0.03811819 0.04024592
## [,661] [,662] [,663] [,664] [,665]
## (Intercept) -10.82916882 -9.84199235 -12.02916814 -12.21546060 -12.29458615
## x.sample 0.03826431 0.03738742 0.04072738 0.04066144 0.04086226
## [,666] [,667] [,668] [,669] [,670]
## (Intercept) -10.12375367 -7.34776919 -9.770366 -9.51586324 -9.00145401
## x.sample 0.03900021 0.03482534 0.037548 0.03749537 0.03650621
## [,671] [,672] [,673] [,674] [,675]
## (Intercept) -12.54335556 -8.22651932 -10.29310335 -10.48854320 -9.48138546
## x.sample 0.03989172 0.03702825 0.03910698 0.03899683 0.03784524
## [,676] [,677] [,678] [,679] [,680]
## (Intercept) -10.79487254 -10.72337540 -9.60362720 -11.42387236 -9.04215083
## x.sample 0.03787993 0.03851129 0.03811109 0.04043697 0.03768045
## [,681] [,682] [,683] [,684] [,685]
## (Intercept) -9.91466932 -9.63042391 -11.91840472 -8.43518024 -11.19339402
## x.sample 0.03812701 0.03872669 0.03985581 0.03661779 0.03895941
## [,686] [,687] [,688] [,689] [,690]
## (Intercept) -10.40560271 -8.96667664 -10.10680266 -8.83250587 -9.81636164
## x.sample 0.03899295 0.03595911 0.03802561 0.03681043 0.03812351
## [,691] [,692] [,693] [,694] [,695]
## (Intercept) -9.61908324 -9.66884840 -10.49939754 -10.97517127 -9.76754310
## x.sample 0.03870834 0.03804342 0.03918083 0.03976099 0.03841659
## [,696] [,697] [,698] [,699] [,700]
## (Intercept) -10.21554500 -9.16415228 -8.75794530 -9.9844441 -11.58689755
## x.sample 0.03866245 0.03724865 0.03736275 0.0391717 0.03994568
## [,701] [,702] [,703] [,704] [,705]
## (Intercept) -9.28401797 -9.47889848 -9.5601394 -9.61678624 -10.95827908
## x.sample 0.03761926 0.03736136 0.0371519 0.03835075 0.03850595
## [,706] [,707] [,708] [,709] [,710]
## (Intercept) -10.73752593 -8.76627955 -11.60607473 -10.57122554 -10.08308025
## x.sample 0.03898671 0.03696591 0.04002247 0.03931252 0.03821543
## [,711] [,712] [,713] [,714] [,715]
## (Intercept) -11.48710887 -12.02067721 -10.88426799 -9.10256709 -10.63264052
## x.sample 0.03940133 0.04089176 0.03913062 0.03695821 0.03857232
## [,716] [,717] [,718] [,719] [,720]
## (Intercept) -8.34750031 -10.76269650 -10.37010511 -11.8989870 -9.61533279
## x.sample 0.03708714 0.03895283 0.03880591 0.0402032 0.03771611
## [,721] [,722] [,723] [,724] [,725]
## (Intercept) -10.24968445 -8.18347912 -9.84752324 -9.42707612 -9.09790022
## x.sample 0.03859227 0.03682177 0.03883374 0.03760156 0.03654624
## [,726] [,727] [,728] [,729] [,730]
## (Intercept) -10.0824580 -10.22436399 -10.44148988 -10.11467650 -8.91917056
## x.sample 0.0381232 0.03857166 0.03928314 0.03792466 0.03837842
## [,731] [,732] [,733] [,734] [,735]
## (Intercept) -8.85403174 -9.63948732 -12.45418039 -9.21435877 -9.65248733
## x.sample 0.03815515 0.03771867 0.04072569 0.03741489 0.03746682
## [,736] [,737] [,738] [,739] [,740]
## (Intercept) -9.07372091 -10.3290940 -9.08643192 -9.95719290 -8.5315799
## x.sample 0.03677348 0.0390799 0.03747667 0.03831914 0.0365718
## [,741] [,742] [,743] [,744] [,745]
## (Intercept) -9.1612230 -10.21998203 -8.85818391 -12.31542070 -9.92688600
## x.sample 0.0355457 0.03950014 0.03691108 0.04075822 0.03814994
## [,746] [,747] [,748] [,749] [,750]
## (Intercept) -9.73976005 -10.32306300 -10.5814398 -9.08977127 -9.11423741
## x.sample 0.03775343 0.03945699 0.0395386 0.03758916 0.03815406
## [,751] [,752] [,753] [,754] [,755]
## (Intercept) -10.77289368 -8.75638432 -13.07107653 -12.412283 -10.81991068
## x.sample 0.03953666 0.03778033 0.04114252 0.040798 0.04107788
## [,756] [,757] [,758] [,759] [,760]
## (Intercept) -11.88066366 -11.48025685 -10.58114929 -10.65185890 -10.84407985
## x.sample 0.03998563 0.04010707 0.03945013 0.03881619 0.03995323
## [,761] [,762] [,763] [,764] [,765]
## (Intercept) -10.23791874 -9.96188194 -9.26652147 -9.84510771 -10.52469447
## x.sample 0.03801653 0.03820305 0.03689652 0.03788234 0.03885717
## [,766] [,767] [,768] [,769] [,770]
## (Intercept) -10.89507007 -9.57443880 -8.5225976 -9.50802149 -8.84835900
## x.sample 0.04035022 0.03845696 0.0362374 0.03762742 0.03713859
## [,771] [,772] [,773] [,774] [,775]
## (Intercept) -10.37627120 -10.30543651 -12.1384682 -10.69141532 -10.44013648
## x.sample 0.03822373 0.03848126 0.0396244 0.04028108 0.03798476
## [,776] [,777] [,778] [,779] [,780]
## (Intercept) -10.37885484 -11.88443251 -10.61099601 -11.55127713 -8.23658894
## x.sample 0.03897207 0.04034181 0.03865981 0.03890412 0.03576168
## [,781] [,782] [,783] [,784] [,785]
## (Intercept) -9.85682666 -11.60274912 -10.28698341 -8.36288316 -11.63494414
## x.sample 0.03806777 0.03954974 0.03897825 0.03749659 0.03968055
## [,786] [,787] [,788] [,789] [,790]
## (Intercept) -10.52255735 -8.26895458 -9.0265209 -10.84278581 -8.96661059
## x.sample 0.03825296 0.03775623 0.0380608 0.03978058 0.03711046
## [,791] [,792] [,793] [,794] [,795]
## (Intercept) -9.74293722 -11.16438282 -8.08597945 -11.68438560 -8.75120744
## x.sample 0.03749541 0.04058593 0.03622114 0.04014578 0.03800533
## [,796] [,797] [,798] [,799] [,800]
## (Intercept) -10.24635988 -10.65753628 -11.44126632 -9.49602482 -11.48662494
## x.sample 0.03943061 0.03900928 0.03955173 0.03730155 0.04011634
## [,801] [,802] [,803] [,804] [,805]
## (Intercept) -9.13244459 -12.53322624 -10.39857825 -10.95543941 -9.74048132
## x.sample 0.03734256 0.04024616 0.03807559 0.04031017 0.03965618
## [,806] [,807] [,808] [,809] [,810]
## (Intercept) -8.79935512 -9.95290279 -12.65893095 -9.79534720 -11.63091404
## x.sample 0.03643312 0.03863752 0.04025136 0.03799998 0.03928121
## [,811] [,812] [,813] [,814] [,815]
## (Intercept) -10.28845801 -11.53759993 -11.93047123 -10.25051389 -11.53083875
## x.sample 0.03820514 0.03966974 0.04045162 0.03800349 0.03964385
## [,816] [,817] [,818] [,819] [,820]
## (Intercept) -12.03526518 -8.72103398 -11.30587317 -9.54887225 -12.97646220
## x.sample 0.04065644 0.03667752 0.03959166 0.03815319 0.04169882
## [,821] [,822] [,823] [,824] [,825]
## (Intercept) -8.29063119 -9.66008148 -8.7692535 -9.29313369 -9.74810537
## x.sample 0.03713801 0.03773145 0.0378088 0.03764181 0.03796148
## [,826] [,827] [,828] [,829] [,830]
## (Intercept) -9.25905003 -11.17458929 -11.26231313 -9.63888864 -9.43363858
## x.sample 0.03733549 0.03899336 0.03932368 0.03811176 0.03790975
## [,831] [,832] [,833] [,834] [,835]
## (Intercept) -10.39041855 -7.27908943 -9.78154939 -9.85656799 -10.6590278
## x.sample 0.03848318 0.03550326 0.03847144 0.03875843 0.0398548
## [,836] [,837] [,838] [,839] [,840]
## (Intercept) -9.36268846 -10.36824971 -10.17133390 -10.51428841 -10.52482400
## x.sample 0.03764914 0.03827251 0.03811649 0.03932216 0.03780583
## [,841] [,842] [,843] [,844] [,845]
## (Intercept) -7.42003440 -8.99697613 -9.80194984 -9.53182601 -10.56001917
## x.sample 0.03532539 0.03732017 0.03731598 0.03792006 0.03886906
## [,846] [,847] [,848] [,849] [,850]
## (Intercept) -11.221673 -11.06744799 -8.86253231 -10.77089684 -11.75121541
## x.sample 0.039716 0.03917399 0.03684358 0.03920789 0.03976759
## [,851] [,852] [,853] [,854] [,855]
## (Intercept) -9.41136356 -9.3888488 -8.06660001 -9.41898063 -11.30539636
## x.sample 0.03768306 0.0370879 0.03619258 0.03820759 0.03991557
## [,856] [,857] [,858] [,859] [,860]
## (Intercept) -10.63473454 -10.75971843 -10.11734078 -9.31796619 -9.39413642
## x.sample 0.03888297 0.03923334 0.03746751 0.03755003 0.03834428
## [,861] [,862] [,863] [,864] [,865]
## (Intercept) -9.63089295 -11.92749613 -10.90979209 -10.95083354 -11.37689551
## x.sample 0.03824473 0.04074565 0.03939459 0.03933468 0.03952894
## [,866] [,867] [,868] [,869] [,870]
## (Intercept) -10.59584328 -9.3405544 -8.87381400 -8.22916350 -11.00208325
## x.sample 0.03922931 0.0373627 0.03735308 0.03639701 0.03978708
## [,871] [,872] [,873] [,874] [,875]
## (Intercept) -9.44821347 -10.50778927 -11.78031051 -8.07432893 -11.3526995
## x.sample 0.03797448 0.03763488 0.03917168 0.03687525 0.0400046
## [,876] [,877] [,878] [,879] [,880]
## (Intercept) -12.25156240 -10.47940917 -11.37243285 -8.98342631 -10.86311646
## x.sample 0.04073753 0.03885565 0.03992714 0.03623459 0.03850037
## [,881] [,882] [,883] [,884] [,885]
## (Intercept) -10.47460005 -9.10335686 -9.89878933 -10.29936532 -8.45082427
## x.sample 0.03885322 0.03707047 0.03802376 0.03909195 0.03626467
## [,886] [,887] [,888] [,889] [,890]
## (Intercept) -9.85965821 -9.41376493 -10.66212984 -8.501425 -9.85234494
## x.sample 0.03781615 0.03697933 0.03934696 0.036855 0.03873959
## [,891] [,892] [,893] [,894] [,895]
## (Intercept) -10.97367169 -11.40400373 -10.65623323 -10.04565824 -10.26154517
## x.sample 0.03994576 0.03944695 0.03861141 0.03826627 0.03885696
## [,896] [,897] [,898] [,899] [,900]
## (Intercept) -9.0419996 -11.32359819 -10.20589995 -9.28861130 -9.67641757
## x.sample 0.0362003 0.03935336 0.03782628 0.03903392 0.03873443
## [,901] [,902] [,903] [,904] [,905]
## (Intercept) -12.88124018 -8.79846950 -10.85200166 -9.16700005 -11.00242487
## x.sample 0.04071429 0.03691312 0.03928647 0.03735804 0.03973887
## [,906] [,907] [,908] [,909] [,910]
## (Intercept) -12.40990480 -9.57105538 -10.19637790 -10.8211930 -11.35885190
## x.sample 0.04013782 0.03808758 0.03851886 0.0391178 0.03990779
## [,911] [,912] [,913] [,914] [,915]
## (Intercept) -11.3157689 -9.43853108 -9.56809436 -9.66615949 -9.13243333
## x.sample 0.0399407 0.03708767 0.03737505 0.03838561 0.03679293
## [,916] [,917] [,918] [,919] [,920]
## (Intercept) -9.86726579 -10.35988933 -9.09108879 -10.32011255 -9.9975429
## x.sample 0.03748156 0.03878926 0.03616169 0.03981575 0.0384166
## [,921] [,922] [,923] [,924] [,925]
## (Intercept) -8.70980269 -11.5481947 -9.18688148 -8.93448237 -10.0460458
## x.sample 0.03800273 0.0400112 0.03832074 0.03643175 0.0387131
## [,926] [,927] [,928] [,929] [,930]
## (Intercept) -10.13723278 -11.25275215 -10.87331728 -7.74784352 -9.20888020
## x.sample 0.03795993 0.04053378 0.03965747 0.03678866 0.03778628
## [,931] [,932] [,933] [,934] [,935]
## (Intercept) -9.21122201 -9.65158344 -7.94567661 -8.62270546 -9.23210429
## x.sample 0.03704992 0.03828738 0.03678672 0.03720302 0.03666649
## [,936] [,937] [,938] [,939] [,940]
## (Intercept) -9.42338879 -9.41986869 -11.07677871 -11.37004163 -10.35122935
## x.sample 0.03630805 0.03833355 0.03972569 0.03929823 0.03924555
## [,941] [,942] [,943] [,944] [,945]
## (Intercept) -9.35201841 -7.97994109 -12.45404580 -8.95404640 -9.16990976
## x.sample 0.03876337 0.03503001 0.04009174 0.03797237 0.03701906
## [,946] [,947] [,948] [,949] [,950]
## (Intercept) -8.43262567 -10.43196006 -12.89639489 -11.05115099 -10.96272867
## x.sample 0.03664065 0.03996493 0.04243351 0.03935257 0.03919931
## [,951] [,952] [,953] [,954] [,955]
## (Intercept) -10.26658675 -9.04797952 -9.93209496 -10.21120384 -9.93458291
## x.sample 0.03811463 0.03910575 0.03737736 0.03875568 0.03716848
## [,956] [,957] [,958] [,959] [,960]
## (Intercept) -11.41280458 -9.5358692 -9.54694152 -13.35465578 -9.59919157
## x.sample 0.03981283 0.0385542 0.03860573 0.04106156 0.03873873
## [,961] [,962] [,963] [,964] [,965]
## (Intercept) -9.87976723 -11.1025934 -10.28759980 -7.6287752 -7.65043174
## x.sample 0.03778319 0.0387776 0.03917644 0.0359981 0.03649226
## [,966] [,967] [,968] [,969] [,970]
## (Intercept) -10.1237163 -9.27515327 -9.73789655 -10.79319233 -9.68285477
## x.sample 0.0375009 0.03741268 0.03822807 0.04009721 0.03860955
## [,971] [,972] [,973] [,974] [,975]
## (Intercept) -10.1570711 -11.19243348 -10.43894460 -11.42058912 -8.13035088
## x.sample 0.0389295 0.03990813 0.03855678 0.03991947 0.03699817
## [,976] [,977] [,978] [,979] [,980]
## (Intercept) -9.31792300 -11.79023656 -12.77505866 -9.76093470 -9.00560635
## x.sample 0.03851579 0.04022575 0.04067649 0.04002041 0.03662758
## [,981] [,982] [,983] [,984] [,985]
## (Intercept) -8.63342453 -12.33580556 -10.15677527 -10.55766669 -11.33462122
## x.sample 0.03650004 0.04006831 0.03747412 0.03912821 0.03912677
## [,986] [,987] [,988] [,989] [,990]
## (Intercept) -9.63986887 -10.22677238 -10.38547102 -9.63620040 -9.43015749
## x.sample 0.03793948 0.03754975 0.03912734 0.03717802 0.03750213
## [,991] [,992] [,993] [,994] [,995]
## (Intercept) -12.107626 -10.08156887 -10.494659 -10.91783851 -9.74137211
## x.sample 0.039768 0.03896809 0.038729 0.03981068 0.03874382
## [,996] [,997] [,998] [,999] [,1000]
## (Intercept) -11.58156310 -10.21864743 -9.91514275 -7.94619285 -12.58770007
## x.sample 0.04037803 0.03864032 0.03901666 0.03582816 0.04070542
original_coef <- coef(r.lm)
parametric_ci <- confint(r.lm)
cat("Parametric Confidence Interval for Intercept (β0):", parametric_ci[1, ], "\n")
## Parametric Confidence Interval for Intercept (β0): -12.23262 -7.835736
cat("Parametric Confidence Interval for Slope (β1):", parametric_ci[2, ], "\n")
## Parametric Confidence Interval for Slope (β1): 0.03632639 0.04051944
ci_intercept_boot <- quantile(boot.stats[1, ], probs = c(0.025, 0.975))
ci_slope_boot <- quantile(boot.stats[2, ], probs = c(0.025, 0.975))
cat("Bootstrap Confidence Interval for Intercept (β0):", ci_intercept_boot, "\n")
## Bootstrap Confidence Interval for Intercept (β0): -12.45405 -7.970619
cat("Bootstrap Confidence Interval for Slope (β1):", ci_slope_boot, "\n")
## Bootstrap Confidence Interval for Slope (β1): 0.03594066 0.04079954
e4d Answer: The Parametric and Bootstrap confidence intervals are very similar and both fit the model. Both CIs also don’t contain 0 so they both indicate that we reject the null hypothesis and that there is a significant relationship between time and r and that if time increases then time also increases.
The R-squared value of the linear model for the python
index indicates that there could be a better fit for the model. Test two
variations/transformations (e.g. polynomial, reciprocal, linear-log) to
see if you can produce a better fit. Show the variation, plot your
resulting model with the scatterplot, and reference the appropriate
output from the summary to support your accessment of whether or not
you’ve found a better model fit.
Add code blocks as needed. Write your narrative in between the code blocks.