Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

In a particular scientific study, suppose that the following model is being cons

ID: 3200835 • Letter: I

Question

In a particular scientific study, suppose that the following model is being considered where X is an n x p matrix with (i entry (za) being the observation on the kh covariate for p); and (za)- l for all i the i individual forke 12, B- IBo, ,A, is an unknown parameter vector and e is an n x 1 vector with i A entry e,. Assume e, nd N(0,o2). Assume that p 4. Explain carefully how you would test the null hypothesis He: 24,- versus the alternative that the null hypothesis is not true, by (a) Writing down this hypothesis in the form AB c, where A is a matrix and c is a vector. (b) Clearly writing down the series of all R/Splus or SAS commands that you woul se to test this hypothesis. You may assume that the second column of the X matrix is stored in the variable named Icol2, the third column of the X matrix is stored in the variable named rcol8, and the fourth column of the X matrix is stored in the variable named aco and that the y, observations are stored in a vector yvec of length n.

Explanation / Answer

The following R code is working but you need to install the package 'car'.

mod<-lm(yvec~xcol2+xcol3+xcol4)
linear.hypothesis(mod, c('xcol2 - 2*xcol3 = 0', 'xcol4 - 2*xcol3 = 0'))

Sample output on some random data is given below. Please use your own data if needed with the above code.

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote