1. Homepage
  2. Programming
  3. ST 495 Advanced computing for statistical methods - Homework problem set 5

ST 495 Advanced computing for statistical methods - Homework problem set 5

Engage in a Conversation
USNC State UniversityNCSUST 495ST495Advanced computing for statistical methodsRGram-Schmidt orthonormalization algorithmRegression

ST 495 Advanced computing for statistical methods Homework problem set 5 CourseNana.COM

February 14, 2023 CourseNana.COM

No R packages are permitted for use in this assignment. CourseNana.COM

1.     In the previous assignment you were asked to provide pseudocode for how to generate synthetic data from the statistical model posited for your midterm project. The motivation was described as synthetic data will be helpful for evaluating an estimation procedure and algorithm. Describe how you will design a simulation study based on your synthetic data to evaluate the estimation procedure and algorithm that you proposed a few weeks ago. CourseNana.COM

2.     Recall that in the case that X Rn×p does not have full column rank, (XX)1 does not exist, and so PX = X(XX)1Xdoes not exist. However, using the SVD of X we can still construct an orthogonal projection matrix onto col(X). Write an R function that takes as input (X), where X is an n × p matrix, and returns the orthogonal projection matrix onto col(X), regardless of the column rank of X. CourseNana.COM

3.     Write an R function that takes as input (X), where X is an n × p matrix with full column rank, and returns, via the Gram-Schmidt orthonormalization algorithm, an n × p orthonormal matrix Q such that col(Q) = col(X), along with a p×p upper-triangular matrix R such that X = Q R. CourseNana.COM

4. (a)  Write an R function that takes as input ( y, X), where y is an n-dimensional vector and X is an n×p matrix, and returns the least squares coefficient estimates by solving the normal equations CourseNana.COM

XXb = Xy CourseNana.COM

using the QR decomposition of X. CourseNana.COM

(b) Generate synthetic regression data for various choices of n and p to test whether your least squares estimation procedure in part (a) works. Note, you should compare your CourseNana.COM

least squares solution to the “true” coefficient values that you used to generate the data. Show that quantity b b2 < 104 for sufficiently large values of n. CourseNana.COM

(c) Plot the regression line using the coefficients from part (a), for synthetic simple linear regression data (i.e., p = 2 and b0 is an intercept.) CourseNana.COM

  CourseNana.COM

Get in Touch with Our Experts

WeChat WeChat
Whatsapp WhatsApp
US代写,NC State University代写,NCSU代写,ST 495代写,ST495代写,Advanced computing for statistical methods代写,R代写,Gram-Schmidt orthonormalization algorithm代写,Regression代写,US代编,NC State University代编,NCSU代编,ST 495代编,ST495代编,Advanced computing for statistical methods代编,R代编,Gram-Schmidt orthonormalization algorithm代编,Regression代编,US代考,NC State University代考,NCSU代考,ST 495代考,ST495代考,Advanced computing for statistical methods代考,R代考,Gram-Schmidt orthonormalization algorithm代考,Regression代考,UShelp,NC State Universityhelp,NCSUhelp,ST 495help,ST495help,Advanced computing for statistical methodshelp,Rhelp,Gram-Schmidt orthonormalization algorithmhelp,Regressionhelp,US作业代写,NC State University作业代写,NCSU作业代写,ST 495作业代写,ST495作业代写,Advanced computing for statistical methods作业代写,R作业代写,Gram-Schmidt orthonormalization algorithm作业代写,Regression作业代写,US编程代写,NC State University编程代写,NCSU编程代写,ST 495编程代写,ST495编程代写,Advanced computing for statistical methods编程代写,R编程代写,Gram-Schmidt orthonormalization algorithm编程代写,Regression编程代写,USprogramming help,NC State Universityprogramming help,NCSUprogramming help,ST 495programming help,ST495programming help,Advanced computing for statistical methodsprogramming help,Rprogramming help,Gram-Schmidt orthonormalization algorithmprogramming help,Regressionprogramming help,USassignment help,NC State Universityassignment help,NCSUassignment help,ST 495assignment help,ST495assignment help,Advanced computing for statistical methodsassignment help,Rassignment help,Gram-Schmidt orthonormalization algorithmassignment help,Regressionassignment help,USsolution,NC State Universitysolution,NCSUsolution,ST 495solution,ST495solution,Advanced computing for statistical methodssolution,Rsolution,Gram-Schmidt orthonormalization algorithmsolution,Regressionsolution,