100% satisfaction guarantee Immediately available after payment Both online and in PDF No strings attached
logo-home
Zusammenfassung/Summary Andy Fields Discovering Statistics Using R $11.76   Add to cart

Summary

Zusammenfassung/Summary Andy Fields Discovering Statistics Using R

1 review
 225 views  1 purchase
  • Course
  • Institution
  • Book

Includes summaries of chapters: Chapter 4: Exploring data with graphs Chapter 6: Correlations Chapter 7: Simple/Multiple Regressions Chapter 8: Logistic regression Chapter 9: Comparing two means Chapter 10: Comparing several means ANOVA Chapter 11: Analysis of Covariance ANCOVA Chapter 12: ...

[Show more]

Preview 4 out of 77  pages

  • No
  • Kapitelangaben in beschreibung enthalten
  • November 3, 2020
  • 77
  • 2019/2020
  • Summary

1  review

review-writer-avatar

By: gaaaaraa • 3 year ago

avatar-seller
SUMMARY – ANDY FIELDS R – MULTIVARIATE STATISTIK


Kapitel 4: Exploring data with graphs S.117-165
1. grundlegendes Name_plot <- ggplot(Datensatz, aes(x= Variable 1, y = Variable2, fill = x-Variable / group =
Objekt erstellen Gruppenvariable / color = Variable))
X-/Y-Achse begrenzen plot(ddf$height, ddf$weight, ylim=c(-5,130), xlim=c(-5,200))
Nullpunkt abline(x=0)
abline(y=0)
Regressionsgerade abline(model)
zum Diagramm
hinzufügen
2. Graphische Ebene Name_plot + geom_x()
hinzufügen  x kann für folgende Graphentypen stehen
o geom_point = fügt Ebene aus Punkten hinzu z.B. für Scatterplots
o geom_line = fügt Ebene mit einer Linie hinzu
o geom_smooth(method = lm, se = FALSE/TRUE)= fügt Regressionsgerade hinzu
 Method kann auch andere als lm sein (z.B. loess, dann ist es keine Gerade
 se = FALSE blenden Standardfehler aus,True zeigt ihn an (als Schatten um die Linie)
o geom_bar = Bardiagramm/Balkendiagramm
o geom_histogram= Histogramm
Scatterplot scatterplot <- ggplot(Datensatz, aes(x = , y = ))
scatterplot + geom_point() + geom_smooth(method = "lm", se = FALSE)




Plot nach Gruppen Scatterplot_neu <- scatterplot + facet_wrap(~ group)
getrennt




bar_plot <- ggplot(Datensatz, aes(x = fct_reorder(hero, injury), y = injury, fill = hero)

1. barplot + stat_summary(fun.y = mean, geom = "bar", color = "black") +
labs(x = "Antrieb",
y = "Miles per Gallon (Stadt)",

1

, SUMMARY – ANDY FIELDS R – MULTIVARIATE STATISTIK


Barplot title = "Verbrauch nach Antrieb",
fill = "Antrieb")

 fill fügt Farbe hinzu
 stat_summary(fun.y = mean) stellt die Mittelwerte der Daten auf der y-Achse dar
 geom = "bar" erzeugt Barplot
 colour = "black" verleiht Säulen einen schwarzen Rand
 labs(x="Test“, y = "Text“, title = "Text“, fill = "Text")beschriftet x- und y-Achse und gibt dem Plot einen
Titel + Beschriftung für die Farben

2. bar_plot + stat_summary(fun.y=mean, geom="bar", position=position_dodge())
+stat_summary(fun.data = mean_cl_normal, geom = "errorbar",
position=position_dodge(width=0.9),width=0.2)
+ labs(x = "X", y = "Y", title = "XX", fill = "XX")

 fct_reorder(x-Variable, y-Variable) sortiert die Faktorstufen der Größe nach (i.d.R. aufsteigend)
 position = position_dodge() bestimmt Abstand der Balken
 stat_summary(fun.data = mean_cl_normal, geom = "errorbar",
 position=position_dodge(width=0.9),width=0.2) macht Fehlerbalken und legt ihre Breite fest
Linienplot linien_plot <- ggplot(Datensatz, aes(x = class, y = cty))
linien_plot + stat_summary(fun.y = mean, geom = "point") +
stat_summary(fun.y = mean, geom = "line", aes(group = 1)) +
stat_summary(fun.data = mean_cl_normal, geom = "errorbar", width = 0.2) + labs(x = "X", y = "Y",
title = "XX")

 stat_summary(fun.y = mean, geom = "point"): fügt eine Ebene mit Punkten hinzu, die Punkte stellen die Mittelwerte
dar
 stat_summary(fun.y = mean, geom = "line", aes(group = 1)): fügt eine Ebene mit einer Linie hinzu, die die
Punkte verbindet, Argument aes(group = 1) teilt ggplot mit, dass alle Punkte in einer Gruppe gruppiert werden (also dass es
Mittelwerte sind)
 stat_summary(fun.data = mean_cl_normal, geom = "errorbar", width = 0.2): fügt eine Ebene mit
Fehlerbalken hinzu, die die 95% KIs der Mittelwerte angeben, Argument width stellt Breite der KIs ein




2

, SUMMARY – ANDY FIELDS R – MULTIVARIATE STATISTIK


Linienplot mit Linien_plot <- ggplot(data = Datensatz, aes(x = time, y = grammar, group = Gruppenvariable, color
Gruppierungsvariable = Gruppenvariable))
Linienplot + stat_summary(fun.y = mean, geom = "line") + stat_summary(fun.data = mean_cl_normal,
geom = "errorbar", width = .2)
 durch group = Gruppenvariable wird die Gruppenvariable (Group: Controls & Text Messagers) in den Plot eingefüht
 durch color = Gruppenvariable werden die Bedingungen der Gruppenvariable im Linienplot eingefügt




Liniendiagramm Linienplot <- ggplot(data = gdp, aes(year, gdp, group = country_fac, color = country_fac))
Linien, die keine Linienplot + geom_line() + geom_point() + labs(x = "Year", y = "GDP per capita", color =
"Country")
Mittelwerte
 hier kein stat.summary(fun.y = mean…)vor geom_line & geom_point, weil keine Mittelwerte, sondern nur die einzelnen
verbinden Messwerte pro Messzeitpunkt abgetragen und durch Linien verbunden werden




Histogramm  Häufigkeiten einer Variable; diese wird auf der x-Achse dargestellt - y-Achse: Häufigkeit
histogramm <- ggplot(Datensatz, aes(cty))
histogramm + geom_histogram() + theme_classic()


Pakete  ggplot2




Kapitel 6: Korrelationen S.205 - 243

3

, SUMMARY – ANDY FIELDS R – MULTIVARIATE STATISTIK


Wofür/wann  Wir können die Beziehung zwischen zwei Variablen mit Hilfe von Korrelationskoeffizienten messen.
benutzen?  Diese Koeffizienten liegen zwischen -1 und +1 (stärke des Zusammenhangs)
Welche gibt es?




name type assumptions

Pearson parametric  data are interval
 Sampling distribution has to be normally distributed
 Both variables have to be normally distributed
(one of the variables can be a categorical variable
provided there are only two categories)
 Needs to be standardized (Fishers z) when sampling
distribution not normal
Spearman non-parametric  can be used when the data have violated parametric
assumptions such as non-normally distributed data
 requires only ordinal data for both variables.
Kendall’s Tau non-parametric  should be used rather than Spearman’s coefficient when
you have a small data set with a large number of tied
ranks
Bootstrapping non-parametric

point-biserial correlation coefficient  quantifies the relationship between a continuous
variable and a variable that is a continuous dichotomy
(e.g., there is no continuum underlying the two
categories, such as passing or failing an exam)
biserial correlation coefficient  quantifies the relationship between a continuous
variable and a variable that is a continuous dichotomy
(e.g., there is a continuum underlying the two
categories, such as passing or failing an exam)
Allgemein  Correlation coefficients are effect sizes!
o caveat when using non-parametric correlation coefficients as effect sizes


4

The benefits of buying summaries with Stuvia:

Guaranteed quality through customer reviews

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

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

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 lauraelsbecker. Stuvia facilitates payment to the seller.

Will I be stuck with a subscription?

No, you only buy these notes for $11.76. You're not tied to anything after your purchase.

Can Stuvia be trusted?

4.6 stars on Google & Trustpilot (+1000 reviews)

82191 documents were sold in the last 30 days

Founded in 2010, the go-to place to buy study notes for 14 years now

Start selling
$11.76  1x  sold
  • (1)
  Add to cart