Computer assignment 2
r语言作业代写 1. I would like you to take the file wide.to.long.for.two.repeated.measures.R and recode the values of “variable” in the file madjdata.df_long···
1. I would like you to take the file wide.to.long.for.two.repeated.measures.R and recode the values of “variable” in the file madjdata.df_long.sort so that
The new data set can have both the old variable, “variable” and a new variable (i.e. if you keep both variables in the data set you have to give the new variable a different name. I would like you to call the new 0-3 variable, time, and the variable that holds the values (currently called “value”), madj.
Submit the edited program along with the first 20 lines of the new version of madjdata.df_long.sort that includes the new recoded variables. You can get that from the Console.
2.I would like you to take the program bootstrap.resampling.R and use it to create a short report in R Markdown. First, in the report, indicate what data set you are analyzing. Second, include the table of regression coefficients from checkreg. The table of coefficients is located in the object, summary(checkreg), which is a list. The coefficients I want you table are in summary(checkreg)$coefficient
Put that into an object called regout. Check the attributes of that object. You will see that it is a matrix. Change it to a data frame so that it can be used by xtable().
Next, include the code for the function, boot.runs. r语言作业代写
Have short description of what it does. A few sentences will do.
Finally, put the results of boot.runs in a second table. To do this, put the results of boot.runs(potroy.data) into an object. Check the attributes and you will see that it has no attributes. You will need to name each of the columns and turn it into a data frame. Include a sentence or two to describe the results. You can compare the regression weight and standard error to the results of the lm() function.
Submit the report as part of the assignment. You can submit either a Word file or a .pdf. In a separate file, please submit the .Rmd program you used to create the report.