BookmarkSubscribeRSS Feed
☑ This topic is solved. Need further help from the community? Please sign in and ask a new question.
Kunko
Obsidian | Level 7

Hello,

I am using  Reduced Rank Regression (RRR) to derive dietary patterns using 33 food groups with 5 response variables.

I am using the following SAS code:

proc pls data=RRR method=RRR

nfac=5 ;

model Response1  Response2  Response3  Response4  Response5  = group1-group33;

output out=pattern xscore=scorex yscore=scorey;

run;

This gave me correlation loading plot (in the form of radar plot) which I am not familiar with to interpret with confidence. I wanted to see loading coefficients for each factor score produced by this procedure. How can I get this, please? You support is highly appreciated and thanks in advance for your support.

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
PaigeMiller
Diamond | Level 26

It would help if you provided a portion of your data set as SAS data step code (instructions) and not in any other format.

 

To get the Y loadings from PROC PLS, you need to do this:

 

proc pls data=RRR method=RRR nfac=5 details;
    ods output yweights=yloadings;
    model Response1  Response2  Response3  Response4  Response5  = group1-group33;
    output out=pattern xscore=scorex yscore=scorey;
run;

 

--
Paige Miller

View solution in original post

11 REPLIES 11
PaigeMiller
Diamond | Level 26

It would help if you provided a portion of your data set as SAS data step code (instructions) and not in any other format.

 

To get the Y loadings from PROC PLS, you need to do this:

 

proc pls data=RRR method=RRR nfac=5 details;
    ods output yweights=yloadings;
    model Response1  Response2  Response3  Response4  Response5  = group1-group33;
    output out=pattern xscore=scorex yscore=scorey;
run;

 

--
Paige Miller
Kunko
Obsidian | Level 7

It worked well. Thank you, Paige!

KKAY
Obsidian | Level 7

I have the same problems in using RRR. I have read the a published paper(https://doi.org/10.1093/aje/kwh134) which used RRR to find a dietary mode. In that paper, the author gave many results obtained by RRR (as follows).

1、In table 5, it gave the “Response score coefficient” 

KKAY_0-1656446261047.png

2、in table 8, it gave the "Standardized score parameter 、Correlation with score"

KKAY_1-1656446386780.png

 

but I have no idea how to obtain them or what are their names  in the RRR results if using the following code. Could you help me?

proc pls data=abc method=RRR
nfac=4 varss details;
model b c d e = ab1-ab10/SOLUTION ;
output out=pattern xscore=scorex yscore=scorey;
run;

 

In the results, it will show "Model Effect Loadings"、"Model Effect Weights"、"Dependent Variable Weights"、"Coded Regression Coefficients for 4 Extracted Factors" and "Parameter Estimates".

 

Which one is the “Response score coefficient”  in table 5 (the picture above)?

Which one is the "Standardized score parameter 、Correlation with score" in the table 8 (the picture above)?

 

3、in this paper in table 6, the factor scores from RRR were used as the independent variable to build a new regression. I thought is was ok. Is the "factor scores" in the table 6 means the output values of  "xscore" column (as in my sas code)?

Why I asked this, because I saw your doubt about in another reply. Some one want to use the factor scores to build a regression. Are they same things? Could we? 

KKAY_3-1656447793325.png

Sorry for ask the questions here instead of starting a new post! Just I hope you could see it or some one who know the answers could help me!

Thank you so much!

PaigeMiller
Diamond | Level 26
  1. Response score coefficients come from the piece of code that I wrote that you left out:
        ods output yweights=yloadings;
  2. I don't know, I suspect there are some intermediate steps in the paper you cite that I haven't seen
  3. I think the model used in that paper has parameterized the model differently than PROC PLS. In the paper you are working from with both PLS and RRR in the table, there is a single regression coefficient for Factor 1 and a single regression coefficient for Factor 2 and so on. It seems as if PROC PLS doesn't produce a single regression coefficient for each Factor as in Table 6 in the case of multiple Y variables, it only produces a single regression coefficient for each factor in the case of only one Y variable (and then the value is equal to 1) — a different parameterization. Both parameterizations should produce the same model and the same predicted values. And so while it may be possible to algebraically derive the values that are in Table 6 from the PROC PLS output, I don't know how to do that off the top of my head. You would have to go through the algebra of RRR to see if these can be derived from the "Dependent Variable Weights". But, you don't have to do that at all — if the goal is to build a regression equation, PROC PLS gives that to you in the output as "Parameter Estimates" or "Parameter Estimates for Centered and Scaled Data" and you don't really need to have the model parameterized as in Table 6.
--
Paige Miller
KKAY
Obsidian | Level 7
Thank you for your reply at this time! it is night, you are so kind!
I compared the yweights, it is the "Dependent Variable Weights" if I add the "details" option. it that the Response score coefficients?
PaigeMiller
Diamond | Level 26

It is only night in half the world

 

Yes, the "Dependent Variable Weights" are the Response score coefficients

--
Paige Miller
KKAY
Obsidian | Level 7

Thank you very much, Paige!

First, I think the author use the  "factor scores"  as  a new dependent variablesIs,and a new health outcome as dependent variable to build a new regression model. This regression is not the previous regression by RRR method as the dependent variable changed, so the previous "Parameter Estimates" of response variables was not matching. It is a new exploring.

 

Back to the original problem:

(1) I know each extracted factor (Factor 1……) in RRR have one fixed parameter of every independent variable (eg. "ab1……",also like the different food in table 8) or dependent variable (eg. "b c d e" in my code) . 

so it could be create a "scores", such as "xscore"、“yscore” we have output.  

 

So my question is whether the "factor scores"  here in the table 6 is the output column of  "xscore" or the "yscore"?

 

(2)If it is "xscore"——could we calculate the "xscore" through multiply-accumulate of independent variables and their "model Effect Loadings" (name was according to the RRR results) ?  

for example:     ab1 * “model effect Loadings of ab1” + ab2 * “model Effect Loadings of ab2” +……

PaigeMiller
Diamond | Level 26

So my question is whether the "factor scores"  here in the table 6 is the output column of  "xscore" or the "yscore"?

 

For RRR (and PLS), the factor is a linear combination of X variables predicting a linear combination of Y variables. Also, Table 6 is showing a relative risk, which isn't a direct output from RRR, there has to be some other calculation done with the RRR results.

--
Paige Miller
KKAY
Obsidian | Level 7

Yes, the Relative risk in table 6 were calculated by logistic model (a new model) not from RRR. This paper might use the scores as a independent variable in the new logistic model. I figured out my problems.
Thank you so much for your help!

JianJian
Calcite | Level 5
Hi, I am using RRR for an analysis of Dietary pattern. I have data for two sets of data for 2021 and 2022, where data for the response variable is missing in 2021, so I want to calculate the 2021 meal score using the dietary pattern coefficients generated by the 2022 RRR. So far I have extracted Xloading, how to calculate the final meal score for each sample. Thanks!
PaigeMiller
Diamond | Level 26

@JianJian 

 

Please start a new thread for new problems. I'll be happy to answer your questions (if I can) in a new thread.

--
Paige Miller

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

Mastering the WHERE Clause in PROC SQL

SAS' Charu Shankar shares her PROC SQL expertise by showing you how to master the WHERE clause using real winter weather data.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 11 replies
  • 1681 views
  • 5 likes
  • 4 in conversation