Turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

- Home
- /
- Analytics
- /
- Stat Procs
- /
- Re: Question about PROC CORR

Options

- RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page

🔒 This topic is **solved** and **locked**.
Need further help from the community? Please
sign in and ask a **new** question.

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

Posted 03-12-2020 09:45 AM
(627 views)

Hello All,

I have some JMP codes like below:

dt_a = dt_b << Multivariate(

Y( :Name( "A" ), :name( "B" ), :name( "C" ) ),

estimation method( "Row-wise" ),

invisible

);

I would like to replicate the results of these JMP codes in SAS. I know PROC CORR may give the correlation, but I don't know how to use "Row-wise" method in this procedure. Can someone help me?

PS: I am sorry if I posted this question in the wrong location.

1 ACCEPTED SOLUTION

Accepted Solutions

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

@Relax wrote:

Thanks for replying.

Yes, I want correlations using values of A, B and C in the same row.

Row-wise estimation is used for data tables with no missing values, so if a row occurs with missing B, but valid A and C, I will delete this row.

This is different than your previous explanation.

Try this

```
proc corr data=mydatasetname nomiss;
var a b c;
run;
```

--

Paige Miller

Paige Miller

7 REPLIES 7

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

Please explain what JMP is doing when you say "row-wise"

--

Paige Miller

Paige Miller

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

@Relax wrote:

No missing values ...

```
proc corr data=mydatasetname;
var a b c;
run;
```

--

Paige Miller

Paige Miller

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

By "rowwise" do you mean your want correlations using values in the same row?

Second question: what do you want to do about missing values? If you want correlations of A, B, and C, when a row occurs with missing B, but valid A and C, do you want that row to still contribute to generating the correlation of A and C?

--------------------------

The hash OUTPUT method will overwrite a SAS data set, but not append. That can be costly. Consider voting for Add a HASH object method which would append a hash object to an existing SAS data set

Would enabling PROC SORT to simultaneously output multiple datasets be useful? Then vote for

Allow PROC SORT to output multiple datasets

--------------------------

The hash OUTPUT method will overwrite a SAS data set, but not append. That can be costly. Consider voting for Add a HASH object method which would append a hash object to an existing SAS data set

Would enabling PROC SORT to simultaneously output multiple datasets be useful? Then vote for

Allow PROC SORT to output multiple datasets

--------------------------

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

Thanks for replying.

Yes, I want correlations using values of A, B and C in the same row.

Row-wise estimation is used for data tables with no missing values, so if a row occurs with missing B, but valid A and C, I will delete this row.

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

@Relax wrote:

Thanks for replying.

Yes, I want correlations using values of A, B and C in the same row.

Row-wise estimation is used for data tables with no missing values, so if a row occurs with missing B, but valid A and C, I will delete this row.

This is different than your previous explanation.

Try this

```
proc corr data=mydatasetname nomiss;
var a b c;
run;
```

--

Paige Miller

Paige Miller

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

Thank you, Paige. I appreciate your help.

**Don't miss out on SAS Innovate - Register now for the FREE Livestream!**

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

What is ANOVA?

ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.

Find more tutorials on the SAS Users YouTube channel.