Moda: table(variable) para poner la tabla y ver cuál es el número que está más veces repe.
Rang: range(variable)
Variància: var(data)--> por ejemplo var(variable)
Desviació estàndard: sd(data)--> sd(variable)
Todos los datos a la vez: summary(variable) nos da el max, min, cuartils, mediana, mitjana a la
vez.
Per veure si heu llegit les dades correctament: > head(variable)
Conjunt de resums més complet: > install.packages("psych") > library("psych"):
>describe(variable): Podem veure la mitjana (mean), la desviació estàndard (sd), la mediana
(median), el mínim (min), el màxim (max), el rang (range), el coeficient d'asimetria (skew) i la
curtosis (kurtosis), entre d'altres estadístics que no fem servir a aquest curs.
CON PAQUETE “ACTUAR”:
Ver dades agrupades: > gdental
Suma de variable al objeto de dades agrupades: sum(gdental$nj)
Mitjana: mean(gdental)
5 números resumen: > quantile(variable)
Diagrama de cajas con 5 números resumen: > boxplot(quantile(variable),range=0)
Transformar els valors originals en euros al logaritme natural d'aquests valors: log_euros <-
log(viatge$euros).
Histograma: hist(log_euros).
GRÁFICOS CON RSTUDIO:
> table(variable)
Eixample Gracia Raval Sants
4 7 5 4
Per obtenir el mateix en freqüències relatives, és a dir proporcions, l'ordre és la següent:
> prop.table(table(variable))
Eixample Gracia Raval Sants
0.20 0.35 0.25 0.20
Si es vol en percentatges:
> 100*prop.table(table(variable))
Eixample Gracia Raval Sants
20 35 25 20
Diagrama de pastís:
> variable.freq <- table(variable)
> pie(variable.freq)
Diagrama de barres:
The benefits of buying summaries with Stuvia:
Guaranteed quality through customer reviews
Stuvia customers have reviewed more than 700,000 summaries. This how you know that you are buying the best documents.
Quick and easy check-out
You can quickly pay through credit card or Stuvia-credit for the summaries. There is no membership needed.
Focus on what matters
Your fellow students write the study notes themselves, which is why the documents are always reliable and up-to-date. This ensures you quickly get to the core!
Frequently asked questions
What do I get when I buy this document?
You get a PDF, available immediately after your purchase. The purchased document is accessible anytime, anywhere and indefinitely through your profile.
Satisfaction guarantee: how does it work?
Our satisfaction guarantee ensures that you always find a study document that suits you well. You fill out a form, and our customer service team takes care of the rest.
Who am I buying these notes from?
Stuvia is a marketplace, so you are not buying this document from us, but from seller lluszambudio. Stuvia facilitates payment to the seller.
Will I be stuck with a subscription?
No, you only buy these notes for $13.40. You're not tied to anything after your purchase.