5 Lab 1
5.1 Types of problems
- Modeling with networks Of the following cases, which ones can be treated with “regular statistical methods”? Justify your answers by identifying what is the unit of analysis in your “regression”/“test” and specify whether the units are independent or not.
Egocentric study 1: Analyze how the network structure affects health outcomes.
Egocentric study 2: Investigate what network structures are more prevalent in a population sample.
Egocentric study 3: Elucidate whether the prevalence of a given network structure is higher in one population than in another.
Country-level networks: Analyze whether neighboring countries tend to adopt international treaties at the same time.
Phylogenomics: Study a given phenotype in a population of organisms related by a phylogenetic tree.
5.2 Programming
- Simulating convolutions: Using what you have learned about statistical functions in R, simulate the convolution of two normal distributions, one with (\mu, \sigma^2) = (-3, 1) and the other with (\mu, \sigma^2) = (2, 2). Plot the histogram of the results. Draw 1,000 samples.
- Bimodal distribution: Using the previous two normal distributions, simulate a bimodal distribution where the probability of sampling from the first distribution is 0.3 and the probability of sampling from the second distribution is 0.7. Plot the histogram of the results. (Hint: use a combination of
runif()
andifelse()
).
5.3 Random graphs
Write a function to simulate Bernoulli graph, but instead of evaluating each (i,j) tie individually like in (er-code?), use a binomial random number to identify how many edges the graph will have, and randomly pick which will those be from the set V\times V
Using a Generalized-Linear-Model [GLM], estimate the density parameter of the previous graph.