0
$\begingroup$

Within the GWAS wikipedia page, you can view the following plot:

gwas

"Illustration of a simulated genotype by phenotype regression for a single SNP. Each dot represents an individual. A GWAS of a continuous trait essentially consists of repeating this analysis at each SNP."

This is a regression plot showing on the y-axis the phenotype value for a continuous trait. Is it possible to create a similar plot with a binary trait - I can't think what this would look like, or if there is an equivalent plot I could create.

$\endgroup$
0

1 Answer 1

1
$\begingroup$

I have not really seen this type of plot used when a binary outcome is being analyzed. I think in part this is due to the fact that the plot will be rather boring and difficult to interpret as there are only a limited set of possible values (4 if the response and independent variable are both binary), and without introducing some level of random noise, all of the data observations with the same X-Y value pair would overlap.

The situation is a little better when the independent variable is continuous: then you can show more of a distribution. In the figure below, pulled from Figure 2 of this paper explaining how to visualize the discrimination abilities of a logistic regression model, the authors have plotted the risk score produced by the logistic regression model for each patient (x-axis) with the patient's actual outcome on the y-axis. Note that some random noise has been introduced to each observation's y-value so that they do not cover up each other. This plot shows that the risk score is able to somewhat separate the two outcomes.

enter image description here

If you are dealing with a categorical independent variable like the figure included in your question, I think it is better to visualize the proportion of the outcome for each independent variable category like this:

enter image description here

Here the outcome is whether the borrower defaulted on their loan (1 = yes, 0 = no) and the independent variable is whether they are a student (yes/no). For the y-axis, I have calculated the proportion of loan recipients in each group that defaulted. This could easily be done with GWAS data such as genotype vs whether the patient died of heart disease.

I also suggest you check out this answer on how to visualize a contingency table, as the data you are describing (assuming the independent variable stays categorical) is a contingency table.

$\endgroup$
1
  • $\begingroup$ Thank you for the thoughtful answer - that was really helpful! $\endgroup$
    – icedcoffee
    Commented Mar 31, 2022 at 10:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.