simle R coding task

it's an exercise with three simple tasks:

In the exercise, we will analyze experimental data using mixed-model methodology.

The exercise has three main parts:

1. Analyze the data according to the mixed models methodology.

2. Re-analyze the data using naive linear regression and comparing the results.

3. Use parametric bootstrap to approximate the bias and variance of the estimators under

each method.


• Feel free to use plots or tables as needed to present your results.

• Please attach your code at the end of your work.

• You may discuss your work with Danielle and me. You may not discuss your work or

share code with other students.

The data

We will use the lawn dataset from library(”faraway”). The data describes cutoff times for

lawnmowers (mecasahat deshe). 3 machines were randomly selected from manufacturers A

and B. Each machine was tested twice at low speed and twice at high speed (total n = 24

measurements). We are interested in testing the difference between Manufacturer A and B,

and between low speed and high speed.

1 Fitting the model as a mixed model

1. Set this problem as a mixed effects model and explain your choices.

2. Use the lmer function from the lme4 package to get estimates for the random effects.

You can use ”REML=TRUE”.

3. Estimate the fixed effects and the variance of your estimators using GLS. Here, I expect

you to write your own functions. For Σ = V ar(Y ), plug in the parameters from (2). Form

asymptotical marginal confidence intervals for the fixed effects.


2 Fitting the model as a fixed-effects model using OLS

1. Re-run your analysis, fitting the model as a fixed effects model. Write your own code (do

not use lm). Make sure the parameters of interest have the same meaning as in Part 1.

2. Estimate the effects of manufacterer and speed, as well as the variance of your estimators

according to the OLS theory. Form asymptotical marginal confidence intervals for the effects

in Part 1.

3 Parametric Bootstrap

1. Write a function that takes all the parameters in the model and samples of the response

vector (Y

) according to the mixed effects model. This would require sampling the random

effects and noise terms, and adding the fixed effects according to the design. Specify the

assumptions of your sampling procedure.

2. Use the parameters estimated in 1.2 to sample many (e.g. B = 1000) datasets according

to the model. For each run, estimate the effect of manufacterer and speed according to GLS

(as in Part 1) and according to OLS (as in Part 2).

3. Compare the B estimates to the parameters you used to generate the data in 3.1. Estimate

the bias of each method and the standard-deviation of each method. Estimate the root-meansquared

error for each method. Check which procedure better estimates the variance of the



Summarize briefly your findings. In particular, discuss:

1. For this data set, which method would you recommend?

Use empirical evidence from Part 3.

2. What is your conclusion regarding difference between manufacturers and the effect of



Evner: Coding

Se mere: start of shink in banner code a href http shink in r 142911 img src http shink in img banner728 jpg title shink in make short li, As i have done masters in English so it would be better to take task regarding English.I can teach also. , As i have done masters in English so it would be better to take task regarding English.I can teach also , r programming questions and answers, r programming practice problems, r practice projects, r programming practice problems pdf, r programming exercises pdf, r practice exercises, r programming exercises and solutions pdf, r practice problems, R - coding, designing a small pcb board for a very simple task regarding power management of another product using Attiny85, designing a small pcb board for a very simple task regarding power management, r coding outsourcing, r coding free lance, get mobile app coding task, freelance r coding, R coding, coding task website

Om arbejdsgiveren:
( 0 bedømmelser ) Israel

Projekt ID: #16319139

2 freelancere byder i gennemsnit $40 på dette job


Expert in machine learning 1. [login to view URL] 2. [login to view URL]

$55 USD in 5 dage
(0 bedømmelser)
$25 USD på 1 dag
(0 bedømmelser)