R Studio Flashcards

1
Q

What are the first commands to put into Rstudio?

A
Install.packages(‘devtools’)
Devtools::install_github(“mark-andrews/psyntur”)
Library(psyntur)
Library(“tidyverse”)
Library(ggplot2)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What does describe function do?

A

Gets descriptive statistics
Overall mean of the variable for all conditions

Describe(title, mean = mean(variable), stdev = sd(variable))

Describe(title, by =categoricalvariable, mean =mean(variable), stdev =sd(variable))

Does it for each one

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What does the standard deviation tell you?

A

Higher standard deviation is more of a range around the mean - bigger variation. A lot of overlapping values.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What does the labs() function do?

A

Adds labels to the pox plot or histogram.

Labs(x = “title”, y = “title”)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Function for normal distributions

A

Plot_normal_sample(1000, mean = 100, sd = 15, bins = number)

For bars in histogram can increase that by increasing number of bins

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

How to look at the distribution of the means in samples ?

A

Function is:
Plot_repeat_normal_samples( N = 100, n = 10, sd = 15)

N= how many repetitions so 100 in this example
n= each repetition we sample 10 values from the normal distribution.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What command to you put for a histogram for normal distributions ?

A

Hist_repeat_normal_samples()

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What is sampling variability?

A

An estimate of the proportion will not be a perfect representation of the true proportion of the population. May be smaller or larger than the average in the population.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

How to pass it through a deframe and why using a vector helps?

A

Counts

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What does sum(counts) tell us?

A

The total sample size

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Paired sample t test

T
Df
P-values

A

T- greater the t value the larger the effect ( less than 1 smaller effect)

Df- how much information the data provides.

P-value- how common the t value is if null hypothesis is true. Needs to be smaller than 0.05- to reject the hypothesis

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What happens when the size of the SDs are the same as the difference between the means?

A

The effect size is 1

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What is the command for a t_test?

A

t_test(y~x, data = name)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

How to do you make a box plot ?

A

Tukeyboxplot(data =name, x = condition, y = condition)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly