(breve) Introduction a R
Variables:
Modelos lineales:
Teórico y práctico
Definiciones y procedimientos
Responder a: ¿y cómo lo hago en R?
Teórico y práctico
Definiciones y procedimientos
Responder a: ¿y cómo lo hago en R?
Material
2 archivos de teoría en PDF
5 practicas + solucionario
Teórico y práctico
Definiciones y procedimientos
Responder a: ¿y cómo lo hago en R?
Material
2 archivos de teoría en PDF
5 practicas + solucionario
Contenido disponible en https://avallecam.github.io/biostat2019/
#aritmética2+2x <- 2x+2#funcionesseq(1,10)rep(1,5)#vectoresheights <- c(147.2, 153.5, 152.5, 162.0, 153.9)mean(heights)#subconjuntosy <- LETTERS[1:10]y[3:7]
Si necesitas ayuda:
help()
o ?
, p.e.: help(mean)
o ?mean
VEF = Volumen Expiratorio Forzado (mL/s)
¿Existe una asociación entre VEF y edad, talla, etc?
¿Cómo se ve afectado el VEF en las personas que fuman?
espirometria.dta
edad
, talla
vef
caso | codigo | edad | vef | talla | sexo | fumar |
---|---|---|---|---|---|---|
1 | 301 | 9 | 1.708 | 57.0 | female | No |
2 | 451 | 8 | 1.724 | 67.5 | female | No |
3 | 501 | 7 | 1.720 | 54.5 | female | No |
4 | 642 | 9 | 1.558 | 53.0 | male | No |
5 | 901 | 9 | 1.895 | 57.0 | male | No |
6 | 1701 | 8 | 2.336 | 61.0 | female | No |
espir %>% select(edad,vef,talla) %>% skim()
skim_variable | n_missing | mean | sd | p0 | p25 | p50 | p75 | p100 | hist |
---|---|---|---|---|---|---|---|---|---|
edad | 0 | 9.931193 | 2.9539352 | 3.000 | 8.000 | 10.0000 | 12.0000 | 19.000 | ▂▇▇▃▁ |
vef | 0 | 2.636780 | 0.8670591 | 0.791 | 1.981 | 2.5475 | 3.1185 | 5.793 | ▃▇▆▂▁ |
talla | 0 | 61.143578 | 5.7035128 | 46.000 | 57.000 | 61.5000 | 65.5000 | 74.000 | ▂▅▇▇▂ |
espir %>% ggplot(aes(x=talla,y=vef)) + geom_point() + geom_smooth(method = "lm")
espir %>% ggplot(aes(x=talla,y=vef)) + geom_point() + geom_smooth(method = "lm")
espir %>% select(edad,vef,talla) %>% correlate() %>% rearrange() %>% shave()
## # A tibble: 3 x 4## term edad talla vef## <chr> <dbl> <dbl> <dbl>## 1 edad NA NA NA## 2 talla 0.792 NA NA## 3 vef 0.756 0.868 NA
espir %>% tabyl(sexo) %>% adorn_totals("row") %>% adorn_pct_formatting()
## sexo n percent## male 336 51.4%## female 318 48.6%## Total 654 100.0%
espir %>% tabyl(sexo) %>% adorn_totals("row") %>% adorn_pct_formatting()
## sexo n percent## male 336 51.4%## female 318 48.6%## Total 654 100.0%
espir %>% tabyl(sexo,fumar) %>% adorn_totals(c("col")) %>% adorn_percentages() %>% adorn_pct_formatting() %>% adorn_ns(position = "front") %>% adorn_title()
## fumar ## sexo No Si Total## male 310 (92.3%) 26 (7.7%) 336 (100.0%)## female 279 (87.7%) 39 (12.3%) 318 (100.0%)
espir %>% tabyl(sexo,fumar) %>% chisq.test() %>% tidy()
## # A tibble: 1 x 4## statistic p.value parameter method ## <dbl> <dbl> <int> <chr> ## 1 3.25 0.0714 1 Pearson's Chi-squared test with Yates' continuity~
espir %>% ggplot(aes(x=fumar,y=vef)) + geom_point( aes(color=fumar), position = "jitter") + geom_boxplot(alpha=0)
espir %>% ggplot(aes(x=fumar,y=vef)) + geom_point( aes(color=fumar), position = "jitter") + geom_boxplot(alpha=0)
espir %>% ggplot(aes(x=fumar,y=vef)) + geom_violin(aes(color=fumar))
espir %>% select(fumar,vef) %>% group_by(fumar) %>% skim()
skim_variable | fumar | n_missing | mean | sd | p0 | p25 | p50 | p75 | p100 | hist |
---|---|---|---|---|---|---|---|---|---|---|
vef | No | 0 | 2.566143 | 0.8505215 | 0.791 | 1.920 | 2.465 | 3.048 | 5.793 | ▃▇▅▂▁ |
vef | Si | 0 | 3.276861 | 0.7499863 | 1.694 | 2.795 | 3.169 | 3.751 | 4.872 | ▂▃▇▃▂ |
espir %>% select(fumar,vef) %>% group_by(fumar) %>% skim()
skim_variable | fumar | n_missing | mean | sd | p0 | p25 | p50 | p75 | p100 | hist |
---|---|---|---|---|---|---|---|---|---|---|
vef | No | 0 | 2.566143 | 0.8505215 | 0.791 | 1.920 | 2.465 | 3.048 | 5.793 | ▃▇▅▂▁ |
vef | Si | 0 | 3.276861 | 0.7499863 | 1.694 | 2.795 | 3.169 | 3.751 | 4.872 | ▂▃▇▃▂ |
t.test(vef ~ fumar, data = espir, var.equal=FALSE) %>% tidy()
estimate | estimate1 | estimate2 | statistic | p.value | parameter | conf.low | conf.high | method | alternative |
---|---|---|---|---|---|---|---|---|---|
-0.71 | 2.57 | 3.28 | -7.15 | 0 | 83.27 | -0.91 | -0.51 | Welch Two Sample t-test | two.sided |
#importar base en formato DTAespir <- read_dta("data-raw/espirometria.dta") %>% as_factor()#generar resumen descriptivoespir %>% skim()#grafica distribuciónespir %>% ggplot(aes(vef)) + geom_histogram()#realizar pruebas de hipótesis#experimenta y describe qué cambios genera cada uno de los argumentos?compareGroups(formula = fumar ~ edad + vef + talla + sexo, data = espir, byrow=T, method=c(vef=2) ) %>% createTable(show.all = T) %>% export2xls("table/tab1.xls")
Limitante:
Alternativa1:
Porque:
Fija una variable independiente o exposición y observa una respuesta en la variable dependiente o desenlace.
Permite explicar el cambio promedio de un evento Y en base a cambios en X, usando coeficientes o medidas de asociación.
Permite predecir la probabilidad asociada a un evento.
Permite cuantificar el tamaño del efecto de la comparación.
Y=β0+β1X1+ϵ
espir %>% ggplot(aes(x=edad,y=vef)) + geom_point()
espir %>% ggplot(aes(x=edad,y=vef)) + geom_point()
Pregunta
¿Existe una relación lineal entre edad y VEF?
¿En cuánto incrementa el VEF, por cada incremento en un año de edad?
espir %>% ggplot(aes(x=edad,y=vef)) + geom_point()
Pregunta
¿Existe una relación lineal entre edad y VEF?
¿En cuánto incrementa el VEF, por cada incremento en un año de edad?
Evaluación de supuestos:
#1 independencia de observaciones
#2 linealidad
Cálculo de la sumatoria del cuadrado de los residuales hacia la media y la recta:
SSE(mean)=∑(data−mean)2 SSE(fit)=∑(data−fit)2
Cálculo de la sumatoria del cuadrado de los residuales hacia la media y la recta:
SSE(mean)=∑(data−mean)2 SSE(fit)=∑(data−fit)2
Var(x)=SSE(x)2n
Medida de bondad de ajuste:
R2=Var(mean)−Var(fit)Var(mean)
wm1 <- lm(vef ~ edad, data = espir)wm1 %>% glance()
## # A tibble: 1 x 6## r.squared adj.r.squared sigma statistic p.value df## <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>## 1 0.572 0.572 0.568 872. 2.45e-122 1
INTERPRETACIÓN
wm1 <- lm(vef ~ edad, data = espir)wm1 %>% glance()
## # A tibble: 1 x 6## r.squared adj.r.squared sigma statistic p.value df## <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>## 1 0.572 0.572 0.568 872. 2.45e-122 1
INTERPRETACIÓN
edad explica el 57% de la variabilidad de VEF
existe un 57% de reducción en la variabilidad de VEF al tomar en cuenta la edad
wm1 %>% tidy()
## # A tibble: 2 x 5## term estimate std.error statistic p.value## <chr> <dbl> <dbl> <dbl> <dbl>## 1 (Intercept) 0.432 0.0779 5.54 4.36e- 8## 2 edad 0.222 0.00752 29.5 2.45e-122
INTERPRETACIÓN
wm1 %>% tidy()
## # A tibble: 2 x 5## term estimate std.error statistic p.value## <chr> <dbl> <dbl> <dbl> <dbl>## 1 (Intercept) 0.432 0.0779 5.54 4.36e- 8## 2 edad 0.222 0.00752 29.5 2.45e-122
INTERPRETACIÓN
wm1 %>% tidy()
## # A tibble: 2 x 5## term estimate std.error statistic p.value## <chr> <dbl> <dbl> <dbl> <dbl>## 1 (Intercept) 0.432 0.0779 5.54 4.36e- 8## 2 edad 0.222 0.00752 29.5 2.45e-122
wm1 %>% tidy(conf.int=TRUE)
## # A tibble: 2 x 7## term estimate std.error statistic p.value conf.low conf.high## <chr> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>## 1 (Intercept) 0.432 0.0779 5.54 4.36e- 8 0.279 0.585## 2 edad 0.222 0.00752 29.5 2.45e-122 0.207 0.237
.fitted
: valor predicho de Y para valor de X ( ˆY ).resid
: valor crudo del residual ( Y−ˆY ).std.resid
: valor estudiantizado del residualwm1 %>% augment()
## # A tibble: 654 x 8## vef edad .fitted .resid .hat .sigma .cooksd .std.resid## <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>## 1 1.71 9 2.43 -0.722 0.00168 0.567 0.00137 -1.27 ## 2 1.72 8 2.21 -0.484 0.00218 0.568 0.000797 -0.854## 3 1.72 7 1.99 -0.266 0.00304 0.568 0.000335 -0.469## 4 1.56 9 2.43 -0.872 0.00168 0.567 0.00199 -1.54 ## 5 1.89 9 2.43 -0.535 0.00168 0.568 0.000750 -0.944## 6 2.34 8 2.21 0.128 0.00218 0.568 0.0000558 0.226## 7 1.92 6 1.76 0.155 0.00424 0.568 0.000160 0.274## 8 1.41 6 1.76 -0.349 0.00424 0.568 0.000808 -0.616## 9 1.99 8 2.21 -0.221 0.00218 0.568 0.000166 -0.390## 10 1.94 9 2.43 -0.488 0.00168 0.568 0.000624 -0.861## # ... with 644 more rows
wm1 %>% augment() %>% ggplot(aes(.std.resid)) + geom_histogram()
wm1 %>% augment() %>% ggplot(aes(.std.resid)) + geom_histogram()
wm1 %>% augment() %>% ggplot( aes(sample=.std.resid) ) + geom_qq() + geom_qq_line()
wm1 %>% augment() %>% ggplot(aes(.fitted,.std.resid)) + geom_point() + geom_smooth() + geom_hline(yintercept = c(0))
Y=β0+β1X1+ϵ VEF=0.60+0.22(edad)+ϵ
espir %>% ggplot(aes(edad,vef)) + geom_point() + geom_smooth(method = "lm")
R2 indica el porcentaje de variabilidad del desenlace (var. dependiente) explicada por la exposición (var. independiente).
los coeficientes permiten cuantificar el tamaño del efecto de la exposición en el desenlace en base a un modelo estadístico.
los supuestos permiten evaluar qué tan adecuado es el ajuste de los datos al modelo.
espir %>% ggplot(aes(x = talla,y = vef)) + geom____()
# recordar: y ~ xwm1 <- lm(_____ ~ _____, data = _____)wm1 %>% g_____wm1 %>% t_____wm1 %>% c_____
wm1 %>% augment() %>% ggplot() + _____wm1 %>% augment() %>% ggplot(aes(.fitted,.std.resid)) + __________
Y=β0+β1X1+ϵ
logit(p)=log(odds)=log(p1−p)logit(p)=β0+β1X1+...+βnXn+ϵ;y∼Binomial
logit(p)=log(odds)=log(p1−p)logit(p)=β0+β1X1+...+βnXn+ϵ;y∼Binomial
logit(p)=log(odds)=log(p1−p)logit(p)=β0+β1X1+...+βnXn+ϵ;y∼Binomial
Y=β0+β1X1{Yx=1=log(oddsx=1)=β0+β1(1)Yx=0=log(oddsx=0)=β0+β1(0)Yx=1−Yx=0=β1log(oddsx=1)−log(oddsx=0)=β1log(oddsx=1oddsx=0)=β1OR=exp(β1)
GLM ajusta modelos lineales de g(y) con covaribles x
g(Y)=β0+n∑n=1βnXn,y∼F
Donde:
GLM ajusta modelos lineales de g(y) con covaribles x
g(Y)=β0+n∑n=1βnXn,y∼F
Donde:
La estimación de parámetros se da por un proceso de optimización llamado máxima verosimilitud (o likelihood).
un estimado por máxima verosimilitud es aquel que maximiza la verosimilitud de obtener las actuales observaciones dado el modelo elegido.
estimación numérica mediante proceso iterativo hasta la convergencia.
En personas VIH+, ¿el polimorfismo CCR5 está asociado con el desarrollo del SIDA?
aidsdb.dta
ccr5
aids
studyid | ttoaidsorexit | aids | age | race | loghivrna | cd4 | ccr2 | ccr5 | sdf1 |
---|---|---|---|---|---|---|---|---|---|
101750 | 1019 | Yes | 22 | race1 | 11.786481 | 434 | No | Yes | No |
101780 | 2809 | No | 25 | race2 | 12.916421 | 391 | Yes | Yes | No |
103328 | 1717 | Yes | 32 | race1 | 13.169676 | 819 | No | No | No |
104463 | 2315 | Yes | 31 | race1 | 10.649203 | 763 | No | No | No |
104525 | 3764 | No | 39 | race1 | 10.834726 | 520 | No | Yes | Yes |
107858 | 2643 | Yes | 39 | race1 | 6.790097 | NA | No | No | No |
wm1 <- glm(aids ~ ccr5, data = aidsdb, family = binomial(link = "logit"))
## # A tibble: 2 x 7## term log.or se or conf.low conf.high p.value## <chr> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>## 1 (Intercept) -0.487 0.106 0.614 0.499 0.754 0 ## 2 ccr5Yes 0.151 0.245 1.16 0.715 1.87 0.539
INTERPRETACIÓN
wm1 <- glm(aids ~ ccr5, data = aidsdb, family = binomial(link = "logit"))
## # A tibble: 2 x 7## term log.or se or conf.low conf.high p.value## <chr> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>## 1 (Intercept) -0.487 0.106 0.614 0.499 0.754 0 ## 2 ccr5Yes 0.151 0.245 1.16 0.715 1.87 0.539
INTERPRETACIÓN
wm1 <- glm(aids ~ loghivrna, data = aidsdb, family = binomial(link = "logit"))
## # A tibble: 2 x 7## term log.or se or conf.low conf.high p.value## <chr> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>## 1 (Intercept) -2.52 0.593 0.0808 0.0246 0.252 0.00002## 2 loghivrna 0.216 0.0575 1.24 1.11 1.39 0.00017
INTERPRETACIÓN
¿Qué otros marcadores están asociados con el desarrollo de SIDA?
Intenta ajustar por otras covariables como edad, raza o sexo
# recordar: y ~ xwm1 <- glm(_____ ~ _____, data=_____, family= _____(link="_____"))wm1 %>% g_____wm1 %>% t_____wm1 %>% c_____wm1 %>% a_____wm1 %>% epitidy::epi_tidymodel_or()
Cuando monitoreamos un gran número de resultados experimentales, esperamos observar descubrimientos que ocurren al azar.
Los métodos desarrollados para ajustar o reinterpretar los valores p son llamados métodos de corrección por múltiples comparaciones.
p.e.: experimentos ómicos:
Stamer J. StatQuest
Stamer J. StatQuest
Stamer J. StatQuest
Stamer J. StatQuest
Stamer J. StatQuest
Stamer J. StatQuest
padjusted=pvalue∗(Npvaluerankpvalue)
tibble( p=seq(from = 0.01, to = 0.91, by = 0.1), r=1:10)
padjusted=pvalue∗(Npvaluerankpvalue)
tibble( p=seq(from = 0.01, to = 0.91, by = 0.1), r=1:10)
## # A tibble: 10 x 2## p r## <dbl> <int>## 1 0.01 1## 2 0.11 2## 3 0.21 3## 4 0.31 4## 5 0.41 5## 6 0.51 6## 7 0.61 7## 8 0.71 8## 9 0.81 9## 10 0.91 10
padjusted=pvalue∗(Npvaluerankpvalue)
tibble( p=seq(from = 0.01, to = 0.91, by = 0.1), r=1:10) %>% mutate( p.adjust= p.adjust( p = p, method = "BH"))
## # A tibble: 10 x 2## p r## <dbl> <int>## 1 0.01 1## 2 0.11 2## 3 0.21 3## 4 0.31 4## 5 0.41 5## 6 0.51 6## 7 0.61 7## 8 0.71 8## 9 0.81 9## 10 0.91 10
padjusted=pvalue∗(Npvaluerankpvalue)
tibble( p=seq(from = 0.01, to = 0.91, by = 0.1), r=1:10) %>% mutate( p.adjust= p.adjust( p = p, method = "BH"))
## # A tibble: 10 x 3## p r p.adjust## <dbl> <int> <dbl>## 1 0.01 1 0.1 ## 2 0.11 2 0.55 ## 3 0.21 3 0.7 ## 4 0.31 4 0.775## 5 0.41 5 0.82 ## 6 0.51 6 0.85 ## 7 0.61 7 0.871## 8 0.71 8 0.888## 9 0.81 9 0.9 ## 10 0.91 10 0.91
Stamer J. StatQuest
Stamer J. StatQuest
Stamer J. StatQuest
multpv %>% ggplot(aes(p.value)) + geom_histogram(binwidth=.05) + facet_wrap(~ type, scale="free_y", nrow=2) + labs(x="P-values")
multpv %>% group_by(type) %>% mutate(p.adjust=p.adjust(p = p.value,method = "BH"), p.adjust_pass=if_else(p.adjust<0.05,"TRUE","FALSE")) %>% ungroup() %>% ggplot(aes(p.value,fill=p.adjust_pass)) + geom_histogram(binwidth=.05) + facet_wrap(~ type, scale="free_y", nrow=2) +labs(x="P-values",fill="BH")
cleaned_data <- read_rds("data-raw/microarraydata.rds")
cleaned_data %>% count(nutrient)
## # A tibble: 6 x 2## nutrient n## <chr> <int>## 1 Ammonia 33141## 2 Glucose 33138## 3 Leucine 33178## 4 Phosphate 33068## 5 Sulfate 32897## 6 Uracil 33008
cleaned_data %>% count(rate)
## # A tibble: 6 x 2## rate n## <dbl> <int>## 1 0.05 32741## 2 0.1 33132## 3 0.15 33145## 4 0.2 33121## 5 0.25 33177## 6 0.3 33114
cleaned_data %>% filter(BP == "leucine biosynthesis") %>% plot_expression_data() #función detallada en: practica-05.R
cleaned_data %>% filter(BP == "cell wall organization and biogenesis") %>% plot_expression_data()
cleaned_data %>% #elegimos 01 gen y 01 nutriente filter(name == "LEU1", nutrient == "Leucine") %>% #graficamos la relación Y: expresión ~ X: rate ggplot(aes(rate, expression)) + #empleamos la geometría punto geom_point()
cleaned_data %>% #elegimos 01 gen y 01 nutriente filter(name == "LEU1", nutrient == "Leucine") %>% #graficamos la relación Y: expresión ~ X: rate ggplot(aes(rate, expression)) + #empleamos la geometría punto geom_point() + geom_smooth(method = "lm")
cleaned_data %>% #elegimos 01 gen y 01 nutriente filter(name == "LEU1", nutrient == "Leucine") %>% #ajustamos una regresión lineal #dado que data no es el primer argumento #necesitamos especificarlo en data con "." lm(expression ~ rate, data = .) %>% #visualizamos tabla con estimados tidy()
## # A tibble: 2 x 5## term estimate std.error statistic p.value## <chr> <dbl> <dbl> <dbl> <dbl>## 1 (Intercept) 4.62 0.348 13.3 0.000186## 2 rate -11.0 1.79 -6.14 0.00356
linear_models <- cleaned_data %>% filter(nutrient=="Ammonia") %>% #filtramos por nutriente group_by(name, systematic_name, nutrient) %>% #agrupamos por gen nest() %>% #anidamos los datos en una columna lista de df # ajustamos un modelo lineal a cada fila -ver paquete purrr::map- mutate(model = map(data, ~ lm(expression ~ rate, data = .x)), tidym = map(model,tidy))
linear_models <- cleaned_data %>% filter(nutrient=="Ammonia") %>% #filtramos por nutriente group_by(name, systematic_name, nutrient) %>% #agrupamos por gen nest() %>% #anidamos los datos en una columna lista de df # ajustamos un modelo lineal a cada fila -ver paquete purrr::map- mutate(model = map(data, ~ lm(expression ~ rate, data = .x)), tidym = map(model,tidy))
linear_models
## # A tibble: 5,536 x 6## # Groups: name, systematic_name, nutrient [5,536]## name systematic_name nutrient data model tidym ## <chr> <chr> <chr> <list> <list> <list> ## 1 "SFB2" YNL049C Ammonia <tibble [6 x 4]> <lm> <tibble [2 x 5]>## 2 "" YNL095C Ammonia <tibble [6 x 4]> <lm> <tibble [2 x 5]>## 3 "QRI7" YDL104C Ammonia <tibble [6 x 4]> <lm> <tibble [2 x 5]>## 4 "CFT2" YLR115W Ammonia <tibble [6 x 4]> <lm> <tibble [2 x 5]>## 5 "SSO2" YMR183C Ammonia <tibble [6 x 4]> <lm> <tibble [2 x 5]>## 6 "PSP2" YML017W Ammonia <tibble [6 x 4]> <lm> <tibble [2 x 5]>## 7 "RIB2" YOL066C Ammonia <tibble [6 x 4]> <lm> <tibble [2 x 5]>## 8 "VMA13" YPR036W Ammonia <tibble [6 x 4]> <lm> <tibble [2 x 5]>## 9 "EDC3" YEL015W Ammonia <tibble [6 x 4]> <lm> <tibble [2 x 5]>## 10 "VPS5" YOR069W Ammonia <tibble [6 x 4]> <lm> <tibble [2 x 5]>## # ... with 5,526 more rows
slope_terms <- linear_models %>% unnest(cols = c(tidym)) %>% ungroup() %>% filter(term=="rate" & !is.na(p.value)) slope_terms %>% ggplot(aes(p.value)) + geom_histogram(binwidth = .01) + facet_wrap(~nutrient)
slope_terms_adj <- slope_terms %>% mutate(q.value = qvalue(p.value)$qvalues, q.value_pass=if_else(q.value < .01,"TRUE","FALSE")) slope_terms_adj %>% ggplot(aes(p.value, fill=q.value_pass)) + geom_histogram(binwidth = .01) + facet_wrap(~nutrient)
slope_terms_adj %>% filter(q.value_pass=="TRUE") %>% arrange(q.value) %>% select(systematic_name,nutrient,term,estimate,p.value,q.value)
## # A tibble: 585 x 6## systematic_name nutrient term estimate p.value q.value## <chr> <chr> <chr> <dbl> <dbl> <dbl>## 1 YBR291C Ammonia rate 11.6 0.000000582 0.000951## 2 YLR174W Ammonia rate -14.0 0.00000162 0.00132 ## 3 YLL003W Ammonia rate -4.22 0.00000346 0.00189 ## 4 YMR053C Ammonia rate -7.25 0.00000656 0.00268 ## 5 YEL001C Ammonia rate 6.61 0.0000155 0.00276 ## 6 YHR068W Ammonia rate 10.0 0.0000166 0.00276 ## 7 YDR069C Ammonia rate -4.49 0.00000939 0.00276 ## 8 YML128C Ammonia rate -15.0 0.0000169 0.00276 ## 9 YPR049C Ammonia rate -5.90 0.0000128 0.00276 ## 10 YGR244C Ammonia rate -5.44 0.0000135 0.00276 ## # ... with 575 more rows
reproducir el proceso para los demás nutrientes
explorar paquete limma
explorar la documentación del paquete qvalue
link
library(qvalue)#datos microarrayqmicro <- qvalue(p = slope_terms$p.value)summary(qmicro)hist(qmicro)plot(qmicro)
Rstudio Education: Learn
Rstudio Cheat sheets
@avallecam
Slides created via the R package xaringan.
(breve) Introduction a R
Variables:
Modelos lineales:
Keyboard shortcuts
↑, ←, Pg Up, k | Go to previous slide |
↓, →, Pg Dn, Space, j | Go to next slide |
Home | Go to first slide |
End | Go to last slide |
Number + Return | Go to specific slide |
b / m / f | Toggle blackout / mirrored / fullscreen mode |
c | Clone slideshow |
p | Toggle presenter mode |
t | Restart the presentation timer |
?, h | Toggle this help |
Esc | Back to slideshow |