Written by students who passed Immediately available after payment Read online or as PDF Wrong document? Swap it for free 4.6 TrustPilot
logo-home
Summary

script bijhorend bij samenvatting STAT B

Rating
1.0
(1)
Sold
3
Pages
8
Uploaded on
11-09-2024
Written in
2023/2024

Met dit script, samen met samenvatting, behaalde ik 19/20 op het examen

Institution
Course

Content preview

#PDF-principe

#Packages laden
library(car)
library(moments)
#R-bestand inladen
load(file.choose())
#Functies1 inladen
source(file.choose())
#Functies2 inladen
source(file.choose())



#handmatige methode voor pakketten inladen => aanklikken
#handmatige methode R-bestand inladen => file → open file
#csv-bestand inladen
Naam <- read.csv2(file.choose())
#handmatige methode CSV-Data inladen => import Dataset → From tekst (base) → (settings ok?) → import
#handmatige methode functies inladen => file → open file → source




KRUISTABEL

, #Data aanmaken
VariabeleRij <- c(rep(“A”, 99), rep(“B”, 50), rep(“C”, 110))
VariabeleKolom <- c(rep(“cat1”, 50), rep(“cat2”, 40), rep(“cat3”, 20), rep(“cat1”, 70), → 2 kwalitatieve (bivariaat)
rep(“cat2”, 10), rep(“cat3”, 2), rep(“cat1”, 5), rep(“cat2”, 410), → niet causaal
rep(“cat3”, 2))
1. kruistabel
#ordering behouden
2. statistische significantie
VariabeleRij <- ordered(VariabeleRij, levels=c(“A”, “B”, “C”))
3. effectgrootte
VariabeleKolom <- ordered(VariabeleKolom, levels=c(“cat1”, “cat2”, “cat3”))
4. associatieplot (visualisatie)

#variabelen (en frequenties) bekijken
table(Data$Variabele)


#Kruistabel maken
Kruistabel <- table (Data$VariabeleRij, Data$VariabeleKolom)


#Marginalen in output opvragen; zowel kolommarginalen als rijmarginalen
addmargins(Kruistabel)
#Marginalen in output opvragen; alleen kolommarginalen
addmargins(Kruistabel, 1)
#Marginalen in output opvragen; alleen rijmarginalen
addmargins(Kruistabel, 2)


#Kruistabel met de totaalproporties (tussen 0 en 1) of totaalpercentages (tussen 0 en 100)
prop.table(Kruistabel)
prop.table(Kruistabel)*100
#Kruistabel met rijproporties
prop.table(Kruistabel, 1)
#Kruistabel met kolomproporties
prop.table(Kruistabel, 2)


#kruistabel met kolompercentages en percentage rijmarginalen
kruistabel.kolom(Data$VariabeleRij, Data$VariabeleKolom)
kruistabel.kolom(Kruistabel)
#tabel met rijpercentages en percentage kolommarginalen
kruistabel.rij(Data$VariabeleRij, Data$VariabeleKolom)
#Chi-kwadraattoets
chisq.test(Kruistabel)


#Chi-kwadraattoets, Cramer’s V en 95% betrouwbaarheidsinterval rond Cramers’s V → effectgrootte
chi.kwadraat.test(table(Data$VariabeleRij, Data$VariabeleKolom))
of
chi.kwadraat.test(Kruistabel)


#visualisatie
#!!! tabel in juiste volgorde…
assocplot(table(Data$VariabeleKolom, Data$VariabeleRij))


T-TEST

→ 1 kwalitatieve met 2 categorieën

Written for

Institution
Study
Course

Document information

Uploaded on
September 11, 2024
Number of pages
8
Written in
2023/2024
Type
SUMMARY

Subjects

$7.13
Get access to the full document:

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF


Also available in package deal

Reviews from verified buyers

Showing all reviews
3 months ago

1.0

1 reviews

5
0
4
0
3
0
2
0
1
1
Trustworthy reviews on Stuvia

All reviews are made by real Stuvia users after verified purchases.

Get to know the seller

Seller avatar
Reputation scores are based on the amount of documents a seller has sold for a fee and the reviews they have received for those documents. There are three levels: Bronze, Silver and Gold. The better the reputation, the more your can rely on the quality of the sellers work.
StudentUantwerpenOOW Universiteit Antwerpen
Follow You need to be logged in order to follow users or courses
Sold
127
Member since
1 year
Number of followers
2
Documents
20
Last sold
1 month ago

4.4

14 reviews

5
11
4
1
3
0
2
0
1
2

Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Working on your references?

Create accurate citations in APA, MLA and Harvard with our free citation generator.

Working on your references?

Frequently asked questions