DIR Return Create A Forum - Home
---------------------------------------------------------
QA_Board
HTML https://qaboard.createaforum.com
---------------------------------------------------------
*****************************************************
DIR Return to: Questions for R / RStudio (Fall 2023)
*****************************************************
#Post#: 77--------------------------------------------------
Error in R ll Basics Lab
DIR By: aas423
Date: August 31, 2023, 3:49 pm
---------------------------------------------------------
[img]
HTML https://drive.google.com/file/d/1aRZsMfVN_xHN3vOHw1K3WGMW8Lr_WhDJ/view?usp=sharing[/img]
Please let me know if you see anything that I am doing that is
incorrect. As of now, I believe my X and Y matrix(s) are
correctly initialized.
#Post#: 79--------------------------------------------------
Re: Error in R ll Basics Lab
DIR By: Taeho Kim
Date: September 1, 2023, 3:30 pm
---------------------------------------------------------
Sorry for late response.
X^TX becomes t(X)%*%X.
So, in your case, XTransposeX needs to be
TransposeX %*% X
#Post#: 90--------------------------------------------------
Re: Error in R ll Basics Lab
DIR By: aas423
Date: September 3, 2023, 7:12 am
---------------------------------------------------------
Ahh! Can't believe I skimmed that too quickly, thanks!
#Post#: 91--------------------------------------------------
Re: Error in R ll Basics Lab
DIR By: Taeho Kim
Date: September 3, 2023, 10:23 am
---------------------------------------------------------
No worries. It's a common mistake for this type of questions,
especially since matrix multiplication isn't symmetric.
*****************************************************
Page 1 of 1