AML 612 Homework #2 For all questions, please submit your R code, and a doc file with a copy of the screen output and plots (where applicable) to . Due Wed February 7th at noon. The code in your R files should exhibit all of the good coding practices mentioned in Include a comment header in your R file stating your name, etc Please do not just copy and code from the examples given in class into your code. Please submit your files in a format hwk2_<last name>.R, hwk2_<last name>.doc (this file will contain the output of your R script), hwk2_<last name>.tex and hwk2_<last name>.pdf Question 1) As done in homework #1, find two papers on a research topic that interests you (ensure that the papers involve some sort of statistical analysis of data), and analyse the papers according to the rubric of Lacum et al. Pay careful attention to the difference between motive and objective. Make sure you include the sample sizes used in the analysis in the description of for the paper. Create a bibtex file “Support” with the annotated bibliography of the papers, and a latex file that describes the papers according to the Lacum et al rubric, with citations to the papers within the document. Make sure the references are resolved in the compiled latex! (no [?]) Question 2) Create a vector, called x, of all odd integers between 1 to 100 Get the length of the vector, and print it to standard output Get the mean of the vector, and print it to standard output Extract every 3rd element of x (starting with the first), and put it back into x. Create a vector, called y, that is the elements of x in reverse order Remove the 15th element of y, and the 3rd element of x and create a new vector z that is y times x Get the index of the maximum value of z, and the maximum value, and print to standard output How many elements of z are divisible by 3? (note the modulus function %% comes in handy here). Print the number to standard output. Question 3) Set the random seed to be 58637. Create a vector, w, with 10,000 random numbers drawn from the Poisson distribution with mean lambda=124.7.
AML 612 Homework #2 For all questions, please submit your R code, and a doc file with a copy of the screen output and plots (where applicable) to . Due Wed February 7th at noon. The code in your R files should exhibit all of the good coding practices mentioned in Include a comment header in your R file stating your name, etc Please do not just copy and code from the examples given in class into your code. Please submit your files in a format hwk2_<last name>.R, hwk2_<last name>.doc (this file will contain the output of your R script), hwk2_<last name>.tex and hwk2_<last name>.pdf Question 1) As done in homework #1, find two papers on a research topic that interests you (ensure that the papers involve some sort of statistical analysis of data), and analyse the papers according to the rubric of Lacum et al. Pay careful attention to the difference between motive and objective. Make sure you include the sample sizes used in the analysis in the description of “Support” for the paper. Create a bibtex file with the annotated bibliography of the papers, and a latex file that describes the papers according to the Lacum et al rubric, with citations to the papers within the document. Make sure the references are resolved in the compiled latex! (no [?]) Question 2) Create a vector, called x, of all odd integers between 1 to 100 Get the length of the vector, and print it to standard output Get the mean of the vector, and print it to standard output Extract every 3rd element of x (starting with the first), and put it back into x. Create a vector, called y, that is the elements of x in reverse order Remove the 15th element of y, and the 3rd element of x and create a new vector z that is y times x Get the index of the maximum value of z, and the maximum value, and print to standard output How many elements of z are divisible by 3? (note the modulus function %% comes in handy here). Print the number to standard output. Question 3) Set the random seed to be 58637. Create a vector, w, with 10,000 random numbers drawn from the Poisson distribution with mean lambda=124.7.
AML_612_Spring_2018_Hwk2.docx