• ¿Documento equivocado? Cámbialo gratis
  • Escrito por estudiantes que aprobaron
  • Inmediatamente disponible después del pago
  • Leer en línea o como PDF
Vender
¿Dónde estudias?
Tu idioma
Document preview thumbnail
Vista previa 1 fuera de 21 páginas
Resumen

Practical 2: Advanced Data Analysis: full summary + explanations

Document preview thumbnail
Vista previa 1 fuera de 21 páginas

A detailed description of each step of practical 2, including screenshots and explanations of the steps taken in R. This document includes everything that is seen in class, and all the exercises that are needed to be made for practical 2 of Advanced Data Analysis of the first master of Biomedical Sciences. Only includes practical 2. Does not include the take home assignment.

Vista previa del contenido

Practical 2 : Statistical analysis is R
Before you start :
- Create a folder / directory on your PC where you put all files related to this practical
- Turn this folder into your working directory

setwd ( "C:/wherever your files are")



1. Demo : the independent sample t-test

Data in long format : ozoneLong.txt
Read in the dataset ozoneLong.txt. This small dataset contains measurements of ozone (O3) in
two gardens, labelled A and B.




White format: concentrations in the gardens in two separate columns: no paired data. Independent
observations.

In the long format, there is the same data but arranged differently: one column which tells you which
garden and one column which gives the value of the ozone.

Here we want to know if there is a difference in ozone concentrations between the 2 gardens. The
null hypothesis is there is no difference in ozone between the gardens.

- Parametric tests: e.g. T-test
o Only allowed if you have enough observations and the data has +- a normal
distribution
- If the conditions for parametric testing are not fulfilled, you do Mann-Withney U test

Use the formula interface: t.test(continuantVar~groupingVar,data=myData)

Comes back quite often: this is usually the first argument of some function about a statistical test.
Generally it is y~x with y being the dependent variable (in t.test= continuous variable, here ozone),
and x that defines the groups (which group an observation comes from). The third argument is the
data frame.

First explore the data :
- How are the data organized? Check the environment in RStudio, or the str() function.
What do the two variables mean?
- Generate a plot to visualize the ozone concentration in the two gardens

Plot(myData$garden,myData$ozone)
Gives automatically a boxplot.
Looks like the ozone concentrations are higher in garden B than in garden A.




1

Información del documento

Estudio
Subido en
19 de marzo de 2022
Número de páginas
21
Escrito en
2021/2022
Tipo
Resumen
$6.75

¿Documento equivocado? Cámbialo gratis Dentro de los 14 días posteriores a la compra y antes de descargarlo, puedes elegir otro documento. Puedes gastar el importe de nuevo.
Escrito por estudiantes que aprobaron
Inmediatamente disponible después del pago
Leer en línea o como PDF

Seller avatar
Los indicadores de reputación están sujetos a la cantidad de artículos vendidos por una tarifa y las reseñas que ha recibido por esos documentos. Hay tres niveles: Bronce, Plata y Oro. Cuanto mayor reputación, más podrás confiar en la calidad del trabajo del vendedor.
Bi0med
4.2
(61)
Vendido
572
Seguidores
202
Artículos
90
Última venta
1 mes hace



Por qué los estudiantes eligen Stuvia

Creado por compañeros estudiantes, verificado por reseñas

Calidad en la que puedes confiar: escrito por estudiantes que aprobaron y evaluado por otros que han usado estos resúmenes.

¿No estás satisfecho? Elige otro documento

¡No te preocupes! Puedes elegir directamente otro documento que se ajuste mejor a lo que buscas.

Paga como quieras, empieza a estudiar al instante

Sin suscripción, sin compromisos. Paga como estés acostumbrado con tarjeta de crédito y descarga tu documento PDF inmediatamente.

Student with book image

“Comprado, descargado y aprobado. Así de fácil puede ser.”

Alisha Student

Preguntas frecuentes