Distribution adjusted to row identifierHello, I could not find my answer in this forum - probably it is too simple:
Let us assume , I have the data table:
Person Sex Mortality
A F 0
B M 0
A F 1
When I just choose distribution , I occur the following problem:
Person A is accounted twice for female , and once for mortality. (B is accounted for male and alive)
However correct would be:
1 Female, 1 Male, 1 Mortality
a) how can I attribute for this in jmp (I tried by weight or frequency, which didnt work)
b) how can I make sure it is only accounted once for mortality
Many thanks, Marc
Re: Distribution adjusted to row identifierMany thanks Jim and Mark !
Re: Distribution adjusted to row identifierThe data table you displayed is often called a "Transactional Data Table". It is a common data table structure and can very nicely be used to generate reports that one may need, such as cost over time, or surgical visit costs vs. non sugical costs. However, it isn't an appropriate data table structure for looking at current patient status, which is the simple report you wanted in your first entry.
| Person |
Sex |
Mortality |
| A |
F |
1 |
| B |
M |
0 |
| |
|
|
To generate such reports as this, you need to generate a Summary Data Table. Mark illustrated one possible way to do this, using the Tabulate Platform. I suggest that you generate a Summary Table, which will give you a table of the current status of each patient, along with some summary data for each patient. This can easily be done using the Summary Platform in JMP.
So if your Transaction Data Table is as you illustrated in your last entry

I then simply brought up the Summary Platform
Tables==>Summary
and entered in the summarizations I wanted, per Patient

Which gave me the following table, which can be used for the generation of a lot of different reports

Re: Distribution adjusted to row identifierHello Mark, sorry for not being as descriptive. Allow me you and the community to give an example, and I may express myself better:
Individual patients have individual encounters - hospital visits - some of them repetitively come to visit and have different length of stay.
Now, while I refer some variables to individual patient encounters (different admissions) - like for example costs, I want to do
- a) summary statistics - individual patients only - meaning patient A was only 1 x male (1), 0 hispanic, race 1 x black, ... patient C was 0 male, 0 hispanic, race white...
- b) when I look at the dependancy - fit y by x - of mortality (nominal) or costs as continuos variables, although I look at individual encounters as well (so I count every admission), I also want to refer as per patient (costs, mortlity, other variables can have different outcome variables, but I usually take the highest variable (mortality = 1, costs = maximum costs). Is there an easier in JMP to do so ? - currently I go back in excel, sort by highest of my variable, which I want to investigate and reimport my table in JMP, a bit cumbersome...
Many thanks ! Marc
Patient Mortality Length Of Stay Male Hispanic Race Title - Version 1 Surgery ECMO Flag Thrombotic complications Number of thrombotic complications COSTS
A 1 74 1 0 Black 0 0 0 1197046
A 0 33 1 0 Black 0 0 0 273416.9
B 1 134 1 0 White 0 0 1 1 754668.1
B 0 71 1 0 White 0 0 1 1 722291.5
C 0 20 0 0 White 1 1 0 121580
C 0 294 0 0 White 0 1 0 2596557
D 1 28 1 0 White 1 0 0 230150.2
D 0 80 1 0 White 1 0 0 366455.1
D 0 85 0 1 White 1 0 1 1 458679.9
D 0 124 0 1 White 0 1 1 2 761956.2
Re: Distribution adjusted to row identifierIt is likely that a solution could be easier but your original post was brief and somewhat vague. You could use column formulas to isolate the information or status from each row and either analyze it or use it to filter the data table. You could script the action and extraction. We do not have enough detail, though, to say.
Perhaps if you describe what you want to do in more detail, with a more complete descriptioin of an example of the source and the desired result, someone will provide a more satisfying solution.
Re: Distribution adjusted to row identifierThanks, Mark. This works. I was just hoping , I could use it easier from my source data.
Many thanks, Marc
Re: Distribution adjusted to row identifierA simple way to get your answer is with Tables > Summary or Analyze > Tabulate. For example, select Tables > Summary, select the three columns and then click Group. Now click OK. You get the count/number/frequency by default. The advantage of using Summary is that you could right-click on Mortality = 0 and choose Select Matching Cells. They can be excluded and hidden from further analysis without deleting them.
Maybe something like this instead of Distribution, which correctly counted the number of observations (rows) of each level of these three variables.