library(tidyverse)
library(plotly)
library(ggbeeswarm)
library(ggplot2)
library(car)
library(rstatix)
library(SimComp)
library(readxl)
library(dplyr)
dataset_exp_2_bm_imprint <- read_excel (path = "/mnt/c/Users/Toshiya Matsushima/OneDrive/R projects/BM_project/data analysis using Rstudio/BM_project_dataset.xlsx", sheet = "exp_2_3_bm_imprint")
dataset_exp_2_bm_imprint_ctrl <- filter(dataset_exp_2_bm_imprint, drug == "00_ctrl")
dataset_exp_2_bm_imprint_ctrl_vpa_keta_tubo <- filter(dataset_exp_2_bm_imprint, label == "00_ctrl_1" | label == "01_vpa_2" | label == "02_keta_2" | label == "04_tubo_2")
#dataset_exp_2_bm_imprint_ctrl_vpa_vpabume <- filter(dataset_exp_2_bm_imprint, label == "00_ctrl_1" | label == "01_vpa_2" | label == "01_vpa_2_bume")
#dataset_exp_2_bm_imprint_ctrl_bumeta_vu_vpa_vpabume <- filter(dataset_exp_2_bm_imprint, label == "00_ctrl_1" | label == "01_vpa_2" | label == "08_bume_1_e14" | label == "09_vu_1_e14" | label == "01_vpa_2_bume")
dataset_exp_2_bm_imprint_fig <- filter(dataset_exp_2_bm_imprint, fig_data == 1)
dataset_exp_2_bm_imprint_fig_2 <- filter(dataset_exp_2_bm_imprint, fig_data == 1 | fig_data == 2)
dataset_exp_2_bm_imprint
dataset_exp_2_bm_imprint_ctrl
dataset_exp_2_bm_imprint_ctrl_vpa_keta_tubo
#dataset_exp_2_bm_imprint_ctrl_vpa_vpabume
#dataset_exp_2_bm_imprint_ctrl_bumeta_vu_vpa_vpabume
dataset_exp_2_bm_imprint_fig
dataset_exp_2_bm_imprint_fig_2
dataset_exp_2_bm_imprint %>%
group_by (label) %>%
get_summary_stats(run)
dataset_exp_2_bm_imprint %>%
group_by (label) %>%
get_summary_stats(bm)
dataset_exp_2_bm_imprint %>%
group_by (label) %>%
get_summary_stats(imprint)
cor_test(dataset_exp_2_bm_imprint_ctrl, bm, imprint, method = "spearman")
fig <- ggplot(data = dataset_exp_2_bm_imprint_ctrl, mapping = aes(x=bm, y=imprint))+
geom_point(size=3)+
geom_vline(xintercept=0, linetype = "dotted")+
geom_hline(yintercept=0, linetype = "dotted")+
geom_smooth(method = "lm")+
xlim(-400, 600)+
ylim(-600, 600)+
theme_classic()
fig
`geom_smooth()` using formula 'y ~ x'
ggsave(plot = fig, filename = "exp_2_imprint_vs_bm_control.png", dpi = 300, height = 10, width = 13, units = "cm")
`geom_smooth()` using formula 'y ~ x'
fig <- ggplot(data = dataset_exp_2_bm_imprint_ctrl_vpa_keta_tubo, mapping = aes(x=bm, y=imprint, color=drug))+
geom_point(size=3)+
geom_vline(xintercept=0, linetype = "dotted")+
geom_hline(yintercept=0, linetype = "dotted")+
geom_smooth(method = "lm")+
xlim(-400, 600)+
ylim(-600, 600)+
theme_classic()
fig
`geom_smooth()` using formula 'y ~ x'
Warning in max(ids, na.rm = TRUE) :
no non-missing arguments to max; returning -Inf
ggsave(plot = fig, filename = "exp_2_imprint_vs_bm_control_vpa_keta_tubo.png", dpi = 300, height = 10, width = 13, units = "cm")
`geom_smooth()` using formula 'y ~ x'
Warning in max(ids, na.rm = TRUE) :
no non-missing arguments to max; returning -Inf
fig <- ggplot(data = dataset_exp_2_bm_imprint, mapping = aes(x=bm, y=imprint, color=label))+
geom_point(size=1)+
facet_wrap(~drug)+
geom_vline(xintercept=0, linetype = "dotted")+
geom_hline(yintercept=0, linetype = "dotted")+
geom_smooth(method = "lm")+
xlim(-400, 600)+
ylim(-400, 600)+
theme_classic()
fig
`geom_smooth()` using formula 'y ~ x'
Warning: Removed 5 rows containing non-finite values (stat_smooth).
Warning: Removed 5 rows containing missing values (geom_point).
Warning: Removed 29 rows containing missing values (geom_smooth).
Warning in max(ids, na.rm = TRUE) :
no non-missing arguments to max; returning -Inf
ggsave(plot = fig, filename = "exp_2_imprint_vs_bm_all_wrap.png", dpi = 300, height = 15, width = 20, units = "cm")
`geom_smooth()` using formula 'y ~ x'
Warning: Removed 5 rows containing non-finite values (stat_smooth).
Warning: Removed 5 rows containing missing values (geom_point).
Warning: Removed 29 rows containing missing values (geom_smooth).
Warning in max(ids, na.rm = TRUE) :
no non-missing arguments to max; returning -Inf
fig <- ggplot(data = dataset_exp_2_bm_imprint_fig, mapping = aes(x=bm, y=imprint, color=label))+
geom_point(size=1)+
facet_wrap(~drug)+
geom_vline(xintercept=0, linetype = "dotted")+
geom_hline(yintercept=0, linetype = "dotted")+
geom_smooth(method = "lm")+
xlim(-400, 600)+
ylim(-400, 600)+
theme_classic()
fig
`geom_smooth()` using formula 'y ~ x'
Warning: Removed 2 rows containing non-finite values (stat_smooth).
Warning: Removed 2 rows containing missing values (geom_point).
Warning in max(ids, na.rm = TRUE) :
no non-missing arguments to max; returning -Inf
ggsave(plot = fig, filename = "exp_2_imprint_vs_bm_fig_wrap.png", dpi = 300, height = 15, width = 20, units = "cm")
`geom_smooth()` using formula 'y ~ x'
Warning: Removed 2 rows containing non-finite values (stat_smooth).
Warning: Removed 2 rows containing missing values (geom_point).
Warning in max(ids, na.rm = TRUE) :
no non-missing arguments to max; returning -Inf
fig <- ggplot(data = dataset_exp_2_bm_imprint, mapping = aes(x=label, y=run))+
geom_hline(yintercept=0, linetype = "dotted")+
geom_boxplot()+
ylim(0, 3000)+
geom_quasirandom(shape=16, size=2, colour="black")+
theme_classic()+
theme(axis.text.x = element_text(angle = 45, hjust = 1))
fig
Warning: Removed 19 rows containing non-finite values (stat_boxplot).
Warning: Removed 19 rows containing missing values (position_quasirandom).
ggsave(plot = fig, filename = "exp_2_run_label_all.png", dpi = 300, height = 10, width = 18, units = "cm")
Warning: Removed 19 rows containing non-finite values (stat_boxplot).
Warning: Removed 19 rows containing missing values (position_quasirandom).
fig <- ggplot(data = dataset_exp_2_bm_imprint_ctrl_vpa_keta_tubo, mapping = aes(x=run, y=imprint, color=drug))+
geom_point(size=3)+
geom_vline(xintercept=0, linetype = "dotted")+
geom_hline(yintercept=0, linetype = "dotted")+
geom_smooth(method = "lm")+
xlim(0, 3000)+
ylim(-600, 600)+
theme_classic()
fig
`geom_smooth()` using formula 'y ~ x'
Warning: Removed 12 rows containing non-finite values (stat_smooth).
Warning: Removed 12 rows containing missing values (geom_point).
Warning in max(ids, na.rm = TRUE) :
no non-missing arguments to max; returning -Inf
ggsave(plot = fig, filename = "exp_2_imprint_vs_run_control_vpa_keta_tubo.png", dpi = 300, height = 10, width = 13, units = "cm")
`geom_smooth()` using formula 'y ~ x'
Warning: Removed 12 rows containing non-finite values (stat_smooth).
Warning: Removed 12 rows containing missing values (geom_point).
Warning in max(ids, na.rm = TRUE) :
no non-missing arguments to max; returning -Inf
fit_exp2_run_all <- lm (run ~ label, data = dataset_exp_2_bm_imprint)
summary (fit_exp2_run_all)
Call:
lm(formula = run ~ label, data = dataset_exp_2_bm_imprint)
Residuals:
Min 1Q Median 3Q Max
-1610.4 -689.8 -163.9 427.3 3624.9
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 1154.11 87.50 13.190 <2e-16 ***
label01_vpa_1 -130.81 319.10 -0.410 0.6821
label01_vpa_2 484.29 319.10 1.518 0.1300
label01_vpa_2_bume -591.11 319.10 -1.852 0.0648 .
label02_keta_1 -487.81 319.10 -1.529 0.1273
label02_keta_2 -651.81 319.10 -2.043 0.0418 *
label02_keta_2_bume -187.83 305.39 -0.615 0.5389
label03_mk801_1 193.99 319.10 0.608 0.5436
label03_mk801_2 -341.41 319.10 -1.070 0.2854
label04_tubo_1 -396.11 319.10 -1.241 0.2153
label04_tubo_2 -339.41 319.10 -1.064 0.2882
label04_tubo_2_bume 47.69 319.10 0.149 0.8813
label04_tubo_2_e10 215.89 319.10 0.677 0.4991
label04_tubo_2_e18 48.29 319.10 0.151 0.8798
label05_mla_1 -447.31 319.10 -1.402 0.1619
label05_mla_2 -225.61 319.10 -0.707 0.4800
label06_dhbe_1 18.49 319.10 0.058 0.9538
label06_dhbe_2 -319.01 319.10 -1.000 0.3182
label07_imi_1 -235.52 251.10 -0.938 0.3489
label07_imi_2 63.89 239.20 0.267 0.7895
label07_imi_3 35.59 319.10 0.112 0.9112
label07_imi_4 -359.61 319.10 -1.127 0.2605
label08_bume_1_e14 -65.81 319.10 -0.206 0.8367
label09_vu_1_e14 381.89 319.10 1.197 0.2322
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
Residual standard error: 970.4 on 346 degrees of freedom
Multiple R-squared: 0.06327, Adjusted R-squared: 0.001005
F-statistic: 1.016 on 23 and 346 DF, p-value: 0.4437
car::Anova(fit_exp2_run_all)
Anova Table (Type II tests)
Response: run
Sum Sq Df F value Pr(>F)
label 22008393 23 1.0161 0.4437
Residuals 325823984 346
fig <- ggplot(data = dataset_exp_2_bm_imprint, mapping = aes(x=label, y=bm))+
geom_hline(yintercept=0, linetype = "dotted")+
geom_boxplot()+
ylim(-400, 600)+
geom_quasirandom(shape=16, size=2, colour="black")+
theme_classic()+
theme(axis.text.x = element_text(angle = 45, hjust = 1))
fig
Warning: Removed 2 rows containing non-finite values (stat_boxplot).
Warning: Removed 2 rows containing missing values (position_quasirandom).
ggsave(plot = fig, filename = "exp_2_bm_label_all.png", dpi = 300, height = 10, width = 18, units = "cm")
Warning: Removed 2 rows containing non-finite values (stat_boxplot).
Warning: Removed 2 rows containing missing values (position_quasirandom).
fit_exp2_bm_all <- lm (bm ~ label, data = dataset_exp_2_bm_imprint)
summary (fit_exp2_bm_all)
Call:
lm(formula = bm ~ label, data = dataset_exp_2_bm_imprint)
Residuals:
Min 1Q Median 3Q Max
-508.20 -126.80 -1.45 119.90 402.69
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 1.363e+02 1.587e+01 8.592 2.99e-16 ***
label01_vpa_1 -5.871e+01 5.786e+01 -1.015 0.31097
label01_vpa_2 2.609e+01 5.786e+01 0.451 0.65232
label01_vpa_2_bume -5.371e+01 5.786e+01 -0.928 0.35392
label02_keta_1 -7.211e+01 5.786e+01 -1.246 0.21351
label02_keta_2 -1.468e+02 5.786e+01 -2.537 0.01161 *
label02_keta_2_bume -9.285e+01 5.537e+01 -1.677 0.09447 .
label03_mk801_1 -8.943e-03 5.786e+01 0.000 0.99988
label03_mk801_2 -9.509e+00 5.786e+01 -0.164 0.86956
label04_tubo_1 3.539e+01 5.786e+01 0.612 0.54116
label04_tubo_2 -1.625e+02 5.786e+01 -2.809 0.00526 **
label04_tubo_2_bume -7.111e+01 5.786e+01 -1.229 0.21991
label04_tubo_2_e10 -2.821e+01 5.786e+01 -0.488 0.62619
label04_tubo_2_e18 -4.621e+01 5.786e+01 -0.799 0.42505
label05_mla_1 -3.891e+01 5.786e+01 -0.672 0.50173
label05_mla_2 -1.535e+02 5.786e+01 -2.653 0.00834 **
label06_dhbe_1 -1.456e+02 5.786e+01 -2.517 0.01230 *
label06_dhbe_2 -5.031e+01 5.786e+01 -0.869 0.38518
label07_imi_1 -4.690e+01 4.553e+01 -1.030 0.30371
label07_imi_2 -1.286e+02 4.337e+01 -2.966 0.00323 **
label07_imi_3 -1.328e+02 5.786e+01 -2.295 0.02231 *
label07_imi_4 -1.557e+02 5.786e+01 -2.691 0.00747 **
label08_bume_1_e14 -1.222e+02 5.786e+01 -2.112 0.03539 *
label09_vu_1_e14 -1.289e+02 5.786e+01 -2.228 0.02653 *
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
Residual standard error: 176 on 346 degrees of freedom
Multiple R-squared: 0.1116, Adjusted R-squared: 0.05251
F-statistic: 1.889 on 23 and 346 DF, p-value: 0.008715
car::Anova(fit_exp2_bm_all)
Anova Table (Type II tests)
Response: bm
Sum Sq Df F value Pr(>F)
label 1345194 23 1.8891 0.008715 **
Residuals 10712336 346
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
fig <- ggplot(data = dataset_exp_2_bm_imprint_fig, mapping = aes(x=label, y=bm))+
geom_hline(yintercept=0, linetype = "dotted")+
geom_boxplot()+
geom_quasirandom(shape=16, size=3, colour="black")+
ylim(-400, 600)+
theme_classic()+
theme(axis.text.x = element_text(angle = 45, hjust = 1))
fig
ggsave(plot = fig, filename = "exp_2_bm_label_selected.png", dpi = 300, height = 10, width = 10, units = "cm")
fig <- ggplot(data = dataset_exp_2_bm_imprint_fig_2, mapping = aes(x=label, y=bm))+
geom_hline(yintercept=0, linetype = "dotted")+
geom_hline(yintercept = 0, linetype="dotted")+
geom_hline(yintercept=136.3089, linetype = "solid", color ="blue", size = 1)+ #average of the control data
geom_hline(yintercept=38.65567, linetype = "solid", color ="darkred", size = 1)+ #5% level below the control average
geom_hline(yintercept=-5.85836, linetype = "solid", color ="red", size = 1)+ #1% level below the control average
geom_boxplot()+
geom_quasirandom(shape=16, size=3, colour="black")+
ylim(-400, 600)+
theme_classic()+
theme(axis.text.x = element_text(angle = 45, hjust = 1))
fig
Warning: Removed 1 rows containing non-finite values (stat_boxplot).
Warning: Removed 1 rows containing missing values (position_quasirandom).
ggsave(plot = fig, filename = "exp_2_bm_label_selected_bumetanide.png", dpi = 300, height = 10, width = 10, units = "cm")
Warning: Removed 1 rows containing non-finite values (stat_boxplot).
Warning: Removed 1 rows containing missing values (position_quasirandom).
fit_exp2_bm_selected_bumetanide <- lm (bm ~ label, data = dataset_exp_2_bm_imprint_fig_2)
summary (fit_exp2_bm_selected_bumetanide)
Call:
lm(formula = bm ~ label, data = dataset_exp_2_bm_imprint_fig_2)
Residuals:
Min 1Q Median 3Q Max
-508.20 -131.83 2.12 124.44 402.69
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 136.309 16.199 8.415 6.86e-15 ***
label01_vpa_2 26.091 59.075 0.442 0.65920
label01_vpa_2_bume -53.709 59.075 -0.909 0.36434
label02_keta_2 -146.809 59.075 -2.485 0.01375 *
label02_keta_2_bume -92.854 56.537 -1.642 0.10206
label03_mk801_2 -9.509 59.075 -0.161 0.87228
label04_tubo_2 -162.509 59.075 -2.751 0.00648 **
label04_tubo_2_bume -71.109 59.075 -1.204 0.23010
label05_mla_2 -153.509 59.075 -2.599 0.01005 *
label06_dhbe_2 -50.309 59.075 -0.852 0.39543
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
Residual standard error: 179.7 on 204 degrees of freedom
Multiple R-squared: 0.09335, Adjusted R-squared: 0.05335
F-statistic: 2.334 on 9 and 204 DF, p-value: 0.01597
car::Anova(fit_exp2_bm_selected_bumetanide)
Anova Table (Type II tests)
Response: bm
Sum Sq Df F value Pr(>F)
label 677933 9 2.3339 0.01597 *
Residuals 6584059 204
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
fig <- ggplot(data = dataset_exp_2_bm_imprint, mapping = aes(x=label, y=imprint))+
geom_hline(yintercept=0, linetype = "dotted")+
geom_boxplot()+
geom_quasirandom(shape=16, size=2, colour="black")+
ylim(-400, 600)+
theme_classic()+
theme(axis.text.x = element_text(angle = 45, hjust = 1))
fig
Warning: Removed 3 rows containing non-finite values (stat_boxplot).
Warning: Removed 3 rows containing missing values (position_quasirandom).
ggsave(plot = fig, filename = "exp_2_imprint_label_all.png", dpi = 300, height = 10, width = 18, units = "cm")
Warning: Removed 3 rows containing non-finite values (stat_boxplot).
Warning: Removed 3 rows containing missing values (position_quasirandom).
fit_exp2_imprint_all <- lm (imprint ~ label, data = dataset_exp_2_bm_imprint)
summary (fit_exp2_imprint_all)
Call:
lm(formula = imprint ~ label, data = dataset_exp_2_bm_imprint)
Residuals:
Min 1Q Median 3Q Max
-947.52 -101.49 66.64 149.48 492.70
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 419.52 19.68 21.322 < 2e-16 ***
label01_vpa_1 -138.32 71.75 -1.928 0.0547 .
label01_vpa_2 -316.22 71.75 -4.407 1.4e-05 ***
label01_vpa_2_bume 84.68 71.75 1.180 0.2388
label02_keta_1 -51.82 71.75 -0.722 0.4707
label02_keta_2 -118.62 71.75 -1.653 0.0992 .
label02_keta_2_bume -26.07 68.67 -0.380 0.7045
label03_mk801_1 20.88 71.75 0.291 0.7712
label03_mk801_2 3.88 71.75 0.054 0.9569
label04_tubo_1 -5.82 71.75 -0.081 0.9354
label04_tubo_2 47.08 71.75 0.656 0.5122
label04_tubo_2_bume -5.42 71.75 -0.076 0.9398
label04_tubo_2_e10 78.18 71.75 1.090 0.2767
label04_tubo_2_e18 27.38 71.75 0.382 0.7030
label05_mla_1 61.48 71.75 0.857 0.3921
label05_mla_2 -160.32 71.75 -2.234 0.0261 *
label06_dhbe_1 -47.42 71.75 -0.661 0.5091
label06_dhbe_2 -151.02 71.75 -2.105 0.0360 *
label07_imi_1 18.24 56.46 0.323 0.7468
label07_imi_2 -101.52 53.79 -1.887 0.0599 .
label07_imi_3 -62.62 71.75 -0.873 0.3834
label07_imi_4 -103.62 71.75 -1.444 0.1496
label08_bume_1_e14 -29.72 71.75 -0.414 0.6790
label09_vu_1_e14 -7.02 71.75 -0.098 0.9221
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
Residual standard error: 218.2 on 346 degrees of freedom
Multiple R-squared: 0.1145, Adjusted R-squared: 0.05563
F-statistic: 1.945 on 23 and 346 DF, p-value: 0.006327
car::Anova(fit_exp2_imprint_all)
Anova Table (Type II tests)
Response: imprint
Sum Sq Df F value Pr(>F)
label 2130197 23 1.9452 0.006327 **
Residuals 16474517 346
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
fig <- ggplot(data = dataset_exp_2_bm_imprint_fig, mapping = aes(x=label, y=imprint))+
geom_hline(yintercept=0, linetype = "dotted")+
geom_boxplot()+
geom_quasirandom(shape=16, size=3, colour="black")+
ylim(-400, 600)+
theme_classic()+
theme(axis.text.x = element_text(angle = 45, hjust = 1))
fig
Warning: Removed 2 rows containing non-finite values (stat_boxplot).
Warning: Removed 2 rows containing missing values (position_quasirandom).
ggsave(plot = fig, filename = "exp_2_imprint_label_selected.png", dpi = 300, height = 10, width = 10, units = "cm")
Warning: Removed 2 rows containing non-finite values (stat_boxplot).
Warning: Removed 2 rows containing missing values (position_quasirandom).
fig <- ggplot(data = dataset_exp_2_bm_imprint_fig_2, mapping = aes(x=label, y=imprint))+
geom_hline(yintercept=0, linetype = "dotted")+
geom_hline(yintercept=419.5203, linetype = "solid", color ="blue", size = 1)+ #average of the control data
geom_hline(yintercept=284.19273, linetype = "solid", color ="darkred", size = 1)+ #5% level below the control average
geom_hline(yintercept=217.9088, linetype = "solid", color ="red", size = 1)+ #1% level below the control average
geom_boxplot()+
geom_quasirandom(shape=16, size=3, colour="black")+
ylim(-400, 600)+
theme_classic()+
theme(axis.text.x = element_text(angle = 45, hjust = 1))
fig
Warning: Removed 2 rows containing non-finite values (stat_boxplot).
Warning: Removed 2 rows containing missing values (position_quasirandom).
ggsave(plot = fig, filename = "exp_2_imprint_label_selected_bumetanide.png", dpi = 300, height = 10, width = 10, units = "cm")
Warning: Removed 2 rows containing non-finite values (stat_boxplot).
Warning: Removed 2 rows containing missing values (position_quasirandom).
fit_exp2_imprint_selected <- lm (imprint ~ label, data = dataset_exp_2_bm_imprint_fig)
summary (fit_exp2_imprint_selected)
Call:
lm(formula = imprint ~ label, data = dataset_exp_2_bm_imprint_fig)
Residuals:
Min 1Q Median 3Q Max
-947.5 -100.6 78.4 152.0 492.7
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 419.52 20.66 20.311 < 2e-16 ***
label01_vpa_2 -316.22 75.33 -4.198 4.27e-05 ***
label02_keta_2 -118.62 75.33 -1.575 0.1171
label03_mk801_2 3.88 75.33 0.052 0.9590
label04_tubo_2 47.08 75.33 0.625 0.5328
label05_mla_2 -160.32 75.33 -2.128 0.0347 *
label06_dhbe_2 -151.02 75.33 -2.005 0.0465 *
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
Residual standard error: 229.1 on 176 degrees of freedom
Multiple R-squared: 0.1303, Adjusted R-squared: 0.1007
F-statistic: 4.396 on 6 and 176 DF, p-value: 0.0003639
car::Anova(fit_exp2_imprint_selected)
Anova Table (Type II tests)
Response: imprint
Sum Sq Df F value Pr(>F)
label 1383957 6 4.3957 0.0003639 ***
Residuals 9235459 176
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
fit_exp2_imprint_selected_BM <- lm (imprint ~ label*bm, data = dataset_exp_2_bm_imprint_fig)
summary (fit_exp2_imprint_selected_BM)
Call:
lm(formula = imprint ~ label * bm, data = dataset_exp_2_bm_imprint_fig)
Residuals:
Min 1Q Median 3Q Max
-948.09 -80.70 58.74 143.68 333.93
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 394.32790 25.36851 15.544 < 2e-16 ***
label01_vpa_2 -448.38281 87.86769 -5.103 8.92e-07 ***
label02_keta_2 -95.38232 75.20438 -1.268 0.2064
label03_mk801_2 -17.62608 101.46569 -0.174 0.8623
label04_tubo_2 75.22628 76.02530 0.989 0.3238
label05_mla_2 -135.18053 75.65554 -1.787 0.0758 .
label06_dhbe_2 -156.86870 85.46211 -1.836 0.0682 .
bm 0.18482 0.11305 1.635 0.1039
label01_vpa_2:bm 0.78412 0.30287 2.589 0.0105 *
label02_keta_2:bm -0.37095 0.41052 -0.904 0.3675
label03_mk801_2:bm 0.18346 0.54992 0.334 0.7391
label04_tubo_2:bm -0.07206 0.46760 -0.154 0.8777
label05_mla_2:bm -0.18788 0.54853 -0.343 0.7324
label06_dhbe_2:bm 0.17612 0.48779 0.361 0.7185
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
Residual standard error: 223.5 on 169 degrees of freedom
Multiple R-squared: 0.2051, Adjusted R-squared: 0.1439
F-statistic: 3.354 on 13 and 169 DF, p-value: 0.0001373
car::Anova(fit_exp2_imprint_selected_BM)
Anova Table (Type II tests)
Response: imprint
Sum Sq Df F value Pr(>F)
label 1348258 6 4.4987 0.0002962 ***
bm 368670 1 7.3808 0.0072785 **
label:bm 425295 6 1.4191 0.2099434
Residuals 8441494 169
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
sessionInfo()
R version 3.6.3 (2020-02-29)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 20.04.3 LTS
Matrix products: default
BLAS: /usr/lib/x86_64-linux-gnu/blas/libblas.so.3.9.0
LAPACK: /usr/lib/x86_64-linux-gnu/lapack/liblapack.so.3.9.0
locale:
[1] LC_CTYPE=C.UTF-8 LC_NUMERIC=C LC_TIME=C.UTF-8 LC_COLLATE=C.UTF-8 LC_MONETARY=C.UTF-8 LC_MESSAGES=C.UTF-8 LC_PAPER=C.UTF-8 LC_NAME=C LC_ADDRESS=C LC_TELEPHONE=C LC_MEASUREMENT=C.UTF-8
[12] LC_IDENTIFICATION=C
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] ggbeeswarm_0.6.0 readxl_1.3.1 SimComp_3.3 rstatix_0.7.0 car_3.0-12 carData_3.0-5 plotly_4.10.0 forcats_0.5.1 stringr_1.4.0 dplyr_1.0.7 purrr_0.3.4 readr_2.1.1 tidyr_1.1.4 tibble_3.1.6 ggplot2_3.3.5
[16] tidyverse_1.3.1
loaded via a namespace (and not attached):
[1] nlme_3.1-144 fs_1.5.2 lubridate_1.8.0 httr_1.4.2 tools_3.6.3 backports_1.4.1 utf8_1.2.2 R6_2.5.1 vipor_0.4.5 DBI_1.1.1 lazyeval_0.2.2 mgcv_1.8-31
[13] colorspace_2.0-2 withr_2.4.3 tidyselect_1.1.1 compiler_3.6.3 survPresmooth_1.1-11 mratios_1.4.2 cli_3.1.0 rvest_1.0.2 xml2_1.3.3 sandwich_3.0-1 labeling_0.4.2 scales_1.1.1
[25] mvtnorm_1.1-3 digest_0.6.29 rmarkdown_2.11 pkgconfig_2.0.3 htmltools_0.5.2 dbplyr_2.1.1 fastmap_1.1.0 htmlwidgets_1.5.4 rlang_0.4.12 rstudioapi_0.13 jquerylib_0.1.4 generics_0.1.1
[37] farver_2.1.0 zoo_1.8-9 jsonlite_1.7.2 magrittr_2.0.1 Matrix_1.2-18 Rcpp_1.0.7 munsell_0.5.0 fansi_0.5.0 abind_1.4-5 lifecycle_1.0.1 stringi_1.7.6 multcomp_1.4-18
[49] yaml_2.2.1 MASS_7.3-51.5 grid_3.6.3 crayon_1.4.2 lattice_0.20-40 haven_2.4.3 splines_3.6.3 hms_1.1.1 knitr_1.37 pillar_1.6.4 codetools_0.2-16 reprex_2.0.1
[61] glue_1.6.0 evaluate_0.14 data.table_1.14.2 modelr_0.1.8 vctrs_0.3.8 tzdb_0.2.0 cellranger_1.1.0 gtable_0.3.0 assertthat_0.2.1 xfun_0.29 broom_0.7.10 survival_3.1-8
[73] viridisLite_0.4.0 beeswarm_0.4.0 TH.data_1.1-0 ellipsis_0.3.2