In this part of the project, we will be using R to run simulations of the...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
In this part of the project, we will be using R to run simulations of the model that is, the model proposed by J. Chang in his paper "Recent common ancestors of all present-day individuals". Before proceeding, make sure you fully understand that model. 1.1 Function to simulate the TMRCA Write an R. function that receives as input the size n of the population, runs a simulation of that model having that population size, and returns the number of generations it took to reach a MRCA. (Make sure you test this function is free of bugs by testing it for "small" values of n.) 1.2 Simulating the TMRCA Now we are going to "collect our data". That is, we will choose a "large" value of n and call the function defined above many times using that value of n. Make sure you collect the data (TMRCA) for each run of that function. Repeat this procedure for different values of n. We would like n to be very large, as close as possible to the size of the actual human population today. As you will see, if n is that large, the R code will run for too long. So you will have to find a suitable value of n that is not too small but at the same time allows you to actually run that function in a reasonable time. How many times should you call the function? Good question! If you read Chang's paper, Table 1 shows he called the function 25 times. You should also have at least 25 simulations (for each value of n). How small could n be? Another good question. Again, if you read Chang's paper, you will see in the same table he chose the largest n to be 4000. Your largest n should be at least 4000. 1.3 Presenting the results of the simulation Present the results of your simulations in a "nice" way. The bare minimum is a table like the one in Chang's paper. For full marks, though, your presentation of the simulations will have to be "nicer" both in terms of its form and of its content. This is the time to use your knowledge of descriptive statistics and data organization skills. Include also how much time it took to run the simulations. (In R. you can get the current time by calling Sys.time ().) 1.4 (Bonus) Further exploration If you want to play more with these simulations, this is your chance! Let your imagination ask interesting questions and then seek the answers! If you can come up with your own ideas, it is better but, if not, here are some ideas: You could find the time to "a generation in which each individual is either a CA of all present-day individuals or an ancestor of no present-day individual" (this is what Chang calls Un). • Can you make the model slightly more realist and then write an R code to run simulations of those modified versions of the model? • At the generation of the MRCA, are there usually more than one MRCA? If so, how many? You could do some meaningful statistics (confidence interval, hypothesis testing, ...) with the data collected. In this part of the project, we will be using R to run simulations of the model that is, the model proposed by J. Chang in his paper "Recent common ancestors of all present-day individuals". Before proceeding, make sure you fully understand that model. 1.1 Function to simulate the TMRCA Write an R. function that receives as input the size n of the population, runs a simulation of that model having that population size, and returns the number of generations it took to reach a MRCA. (Make sure you test this function is free of bugs by testing it for "small" values of n.) 1.2 Simulating the TMRCA Now we are going to "collect our data". That is, we will choose a "large" value of n and call the function defined above many times using that value of n. Make sure you collect the data (TMRCA) for each run of that function. Repeat this procedure for different values of n. We would like n to be very large, as close as possible to the size of the actual human population today. As you will see, if n is that large, the R code will run for too long. So you will have to find a suitable value of n that is not too small but at the same time allows you to actually run that function in a reasonable time. How many times should you call the function? Good question! If you read Chang's paper, Table 1 shows he called the function 25 times. You should also have at least 25 simulations (for each value of n). How small could n be? Another good question. Again, if you read Chang's paper, you will see in the same table he chose the largest n to be 4000. Your largest n should be at least 4000. 1.3 Presenting the results of the simulation Present the results of your simulations in a "nice" way. The bare minimum is a table like the one in Chang's paper. For full marks, though, your presentation of the simulations will have to be "nicer" both in terms of its form and of its content. This is the time to use your knowledge of descriptive statistics and data organization skills. Include also how much time it took to run the simulations. (In R. you can get the current time by calling Sys.time ().) 1.4 (Bonus) Further exploration If you want to play more with these simulations, this is your chance! Let your imagination ask interesting questions and then seek the answers! If you can come up with your own ideas, it is better but, if not, here are some ideas: You could find the time to "a generation in which each individual is either a CA of all present-day individuals or an ancestor of no present-day individual" (this is what Chang calls Un). • Can you make the model slightly more realist and then write an R code to run simulations of those modified versions of the model? • At the generation of the MRCA, are there usually more than one MRCA? If so, how many? You could do some meaningful statistics (confidence interval, hypothesis testing, ...) with the data collected.
Expert Answer:
Answer rating: 100% (QA)
To fulfill the requirements of the project and conduct the simulations as described it is advisable to have a programming environment with R installed ... View the full answer
Related Book For
Income Tax Fundamentals 2013
ISBN: 9781285586618
31st Edition
Authors: Gerald E. Whittenburg, Martha Altus Buller, Steven L Gill
Posted Date:
Students also viewed these accounting questions
-
Read the case study "Southwest Airlines," found in Part 2 of your textbook. Review the "Guide to Case Analysis" found on pp. CA1 - CA11 of your textbook. (This guide follows the last case in the...
-
The following additional information is available for the Dr. Ivan and Irene Incisor family from Chapters 1-5. Ivan's grandfather died and left a portfolio of municipal bonds. In 2012, they pay Ivan...
-
List three specific parts of the Case Guide, Objectives and Strategy Section (See below) that you had the most difficulty understanding. Describe your current understanding of these parts. Provide...
-
2. Evaluate the following definite integrals (a) (2x - 6x) dx /6 (b) 16 cos 3t + 2 sin 3t dt x+1 2 da
-
An aluminum cup of 100 cm3 capacity is completely filled with glycerin at 22oC. How much glycerin, if any, will spill out of the cup if the temperature of both the cup and the glycerin is increased...
-
Calculate the increase in entropy when \(2.8 \mathrm{~L}\) of oxygen are mixed with \(19.6 \mathrm{~L}\) of hydrogen at N.T.P.
-
Ryan Corporation began business on March 1, 2016. At that time, it issued 20,000 shares of \(\$ 60\) par value, seven percent cumulative preferred stock and 100,000 shares of \(\$ 5\) par value...
-
The University of Michigan football stadium, built in 1927, is the largest college stadium in America, with a seating capacity of 114,000 fans. Assume the stadium sells out all six home games before...
-
10 blockchain problems supply chains need to look out for. The Hurdles & Current Challenges of Using Blockchain in Supply Chain & Logistics. Five Challenges To Prepare For When Using Blockchain For...
-
Based on the two tables and the attributes below, write SQL commands for each question to retrieve the data from the database. tblSales InvoiceNumber InvoiceDate CustomerNumber Sales OrderNumber...
-
1 of 3 EXERCISE 1: Computation of Equivalent Units-Weighted-Average Method Lindex Company manufactures a product that goes through three processing departments. Information relating to activity in...
-
Patients are often accompanied by third parties who play an important part in the health care practitioner- patient relationship. The health care practitioner interacts and communicates with these...
-
Give an example of behaviors (individual and collective teams) for each stage of team development. Identify one pro and one con for each stage of development. How would a team get stuck in a stage?...
-
Can fashion be protected is an ongoing subject of debate both in and outside of our industry. 1. Go to LinkedIn Learning and watch the video "Intellectual Property Fundamentals" by Dana Robinson for...
-
Watch the full Martin Luther King Jr. I Have a Dream speech (16 minutes). What was your reaction to the speech? Describe how the speech moved you? Did you feel the crescendo ending?
-
Factor the following trinomial: y2 - 7y 18.
-
J & Torrey is an advertising agency. The firm uses a job cost system in which each client is a different "job." W & Torrey traces direct labor, software licensing costs, and travel costs directly to...
-
Match each of the key terms with the definition that best fits it. _______________ A record of the sequence of data entries and the date of those entries. Here are the key terms from the chapter. The...
-
The following additional information is available for the Dr. Ivan and Irene Incisor family from Chapters 1 and 2. On September 1, Irene opened a retail store that specializes in sports car...
-
Tom has a successful business with $100,000 of income in 2012. He purchases one new asset in 2012, a new machine which is 7-year MACRS property and costs $25,000. If you are Tom's tax advisor, how...
-
Jan has two jobs during 2012. One employer withheld and paid FICA taxes on $66,600 of Jan's salary, and the other employer withheld and paid FICA taxes on $44,400 in salary paid to Jan. Calculate the...
-
Explain why mass transfer correlations for co-flow cannot be used for countercurrent flow.
-
Why are mass transfer coefficients from clean drops higher than mass transfer coefficients in dirty systems? What is the practical significance of this?
-
How do we determine the height of packing required for a concentrated absorber or stripper if \(\mathrm{H}_{\mathrm{G}}\) is not constant?
Study smarter with the SolutionInn App