psci final code

0.0(0)
Studied by 0 people
call kaiCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/31

encourage image

There are no tags or description

Looks like no tags are added yet.

32 Terms

1
New cards

How do you calculate standard error in R?

sd(x) / sqrt(length(x))

2
New cards

How is an interval calculated?

Estimate ± multiplier × SE.

3
New cards

What function runs a one-sample t-test?

t.test(x, mu = )

4
New cards

What does mu specify?

The hypothesized population mean.

5
New cards

What function compares two group means?

t.test(dv ~ iv, data = )

6
New cards

What function tests proportions?

prop.test()

7
New cards

What should you find in test output?

Estimate, t-statistic, p-value, and confidence interval.

8
New cards

What function calculates correlation?

cor()

9
New cards

What does cor() measure?

The direction and strength of a linear relationship.

10
New cards

What function runs a bivariate regression?

lm(y ~ x, data = )

11
New cards

What function displays regression results?

summary()

12
New cards

What does Estimate show in summary()?

The estimated coefficient.

13
New cards

What does Std. Error show?

The standard error of the coefficient.

14
New cards

What does t value show?

The t-statistic.

15
New cards

What does Pr(>|t|) show?

The p-value.

16
New cards

What does R-squared show?

The proportion of variation explained.

17
New cards

What function generates predictions?

predict()

18
New cards

How do you run multiple regression?

lm(y ~ x + z)

19
New cards

How do you include an interaction?

lm(y ~ x * z)

20
New cards

What does the interaction coefficient show?

How the effect of one predictor depends on the other.

21
New cards

How do you include factor variables?

Use factor(variable).

22
New cards

What function creates regression tables?

modelsummary()

23
New cards

What can modelsummary() tables include?

Estimates, confidence intervals, n, R², and adjusted R².

24
New cards

How do you create a residual-versus-fitted plot?

plot(model, which = 1)

25
New cards

What function creates a residual table?

augment()

26
New cards

What does .fitted show?

Predicted values.

27
New cards

What does .resid show?

Residuals.

28
New cards

What does .cooksd show?

Cook's distance.

29
New cards

How do you run logistic regression?

glm(y ~ x, family = binomial)

30
New cards

What does a logistic regression coefficient represent?

Change in log odds.

31
New cards

What function calculates predicted values or probabilities?

predictions()

32
New cards

What function plots predicted outcomes?

plot_predictions()