News
On June 1, we’re asking you to select a content label when starting a new topic in the Discussions area. Read more to find out why.
Choose Language Hide Translation Bar
Highlighted
benson_munyan
Level II

Stacking Data and Slopes as Outcome Models

Hello, everyone.

 

I am running JMP Pro 12, for reference.

 

 I am trying to convert my "wide" dataset to "long form". I have an N of 61, and am trying to stack 4 repeated variables, each with a differing number of observations.

 

Variable 1: 820 Observations

Variable 2: 1340

Variable 3: 740

Variable 4: 6000

 

 

Each variable is arranges as a group, and when I try to stack them, I'm having observations dropped. By my understanding, the following should accomplish what I want:

 

Stack

Multiple Series Stack (4 Series)

Contiguous

Stack by row

Keep all

 

However, when I do this, it wraps Var1 and Var 2 together in my first stacked column when all VAR1 observations have been stacked. What am I doing wrong?

 

Secondly:

 

I am trying to run a "Slopes as outcomes" analysis with this observations sets. I have utilized LMM's before, but do not fully understand how to accomplish this task within JMP. Any suggestions would be helpful.

0 Kudos
5 REPLIES 5
Highlighted
txnelson
Super User

Re: Stacking Data and Slopes as Outcome Models

I am having difficulty in imagining your starting data table.  Can you describe the starting table in the form of how many rows and columns your data table has?  All JMP tables are complete rectangles.  They may contain missing values, but the data table will alwayus be a complete rectangle. 

You also mention an N of 61.  Is that 61 replicates of 4 rows of data with row1 containing variable 1, row 2 being variable 2, row 3 being variab le 3 and row 4 being variable 4.  With this arrangement, I would assume 6000 columns.

If you can provide a more specific description of the structure of your current data table, or better yet, if you can attach a copy of your data table, I might be able to provide better help.

Jim
Highlighted
benson_munyan
Level II

Re: Stacking Data and Slopes as Outcome Models

Hi Jim,

 

I actually managed to solve to Stack issue by doing 4 single stacks and using the join function to match my "ID" and "Time" Variables. It wasn't ideal but was perfectly functional. 

 

To answer your question, My dataset is attached. I was trying to stack E1, E2, E3, and E4.

Highlighted
txnelson
Super User

Re: Stacking Data and Slopes as Outcome Models

I believe your solution is probably the best.  Given your beginning data table, the Stack would not work, unless each of your groups E1-E4 each had the same number of columns.  

Jim
Highlighted
benson_munyan
Level II

Re: Stacking Data and Slopes as Outcome Models

That is what I began to suspect. Thanks for looking into it. Now I just
have to crack the slopes as outcomes bit.
0 Kudos
Highlighted
txnelson
Super User

Re: Stacking Data and Slopes as Outcome Models

For your Linear Mixed Models analyis, I will point you to the documentation on modeling in JMP.  It is availabile under the Help pull down menu

     Help==>Books==>Fitting Linear Models

and

     Help==>Books==>Specialized Models 

Jim