Lab 2 Flashcards

1
Q

What does the function setwd() do?

A

Sets your working directory

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

What command would you enter to set your working directory?

A

setwd()

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

What does the function read.delim do?

A

It reads a file that is set up in a matrix where rows represent cases and columns represent variables

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

What would you enter to read a file?

A

use the read.delim() function, and then use

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

How would you plot a relationship?

A

Use the plot() function, and enter both variables that you want to look at in the brackets, separated by a comma

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

How would you plot the relationship between two log transformed variables?

A

You would use the plot() function, and enter the two variables in the brackets, contained in brackets with log10 before them, separated by a comma

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

What would you add to suppress the plotting of the data points?

A

type=n

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

What would you expect as an output after entering instructions to plot a dataset, and entering type=n?

A

I would expect a blank plot with space for all data points contained in the specified datasets

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

What does != mean?

A

It means everything but this

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

What is -999 often?

A

It is often a placeholder for missing data when a dataset is built

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

What is the formula for average diversification rate?

A

log(N)/t where N is the extant species richness and t is time

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

What is an OLS?

A

An Ordinary least-squares is an analysis that fits a model of a relationship between one or more explanatory variables and a continuous variable that minimizes the sum of square errors, where an error is the difference between the actual and the predicted value of the outcome variable

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

What are sum of square errors?

A

A way to measure the difference between the estimated value based on a certain model and the actual value. A small sum of square error indicates that there is a tight fit between the model and the data

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

How would you fit an OLS regression to a plot?

A

use test.ols

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

What is the problem with using an OLS regression on phylogenetic data?

A

OLS regression assumes independence between the data points, but data from a phylogenetic tree are nested in a hierarchical structure with varying degrees of relatedness. It could look like there is a significant line between two variables, when really there are two unrelated groups for example.

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

What is a PGLS?

A

A Phylogenetic generalized least-squares is a form of regression analysis that estimates the phylogenetic covariances and uses them to modify the parameter estimates of the fitted model.

17
Q

What does the comparative.data function do?

A

It combines phylogenies with other datasets to ensure consistent structure and ordering for use in functions e.g. remove missing data values and mismatched taxon names between a dataset and a phylogeny

18
Q

How do you fit a PGLS model?

A

use test.pgls and assign pgls() with your y axis, squigly line and x axis in the brackets. Then enter summary(test.pgls)

19
Q

What p-value is usually considered to be significant?

A

0.05