Answers.Body: <p>I understand linkage disequilibrium (LD) versus panmixia, which the technical term for Mendelian randomisation and for humans PLINK is a population package. The best outcome is a correlation between LD and cardiovascular disease. It is however an unlikely outcome.</p>
  <p>This really is a machine learning question and you would need to understand &quot;feature selection&quot; and will require very high accuracy scores &gt;0.95 - however you could triple the size of our control group quite easily (recommended). This is a separate question and I'm happy to answer this there.</p>
  <hr />
  <p>Just to address the comments. Inheritance probability, if that is the intended statistics, I personally don't think it would work because a 125 sample is low and the patients would need to be in cohorts of familial generations. LD is unlikely the explanation with humans but other non-humans species that might work (selection advantage).</p>
  <p>My personal view is this is a straight machine learning calculation, but it's a separate question. If your sample is heavily stratified across each familial generation then Hardy-Weinberg might work, but my experience of patient cohorts is that is really unusual and there could still be confounders. Supervised learning (subset of ML) is 100% the way forward.</p>
  <p>.... possibly use GWAS, but you've multiple features/training targets. GWAS is usually when there's one phenotype, ML would account for interaction in a way GWAS could not (it couldn't account for non-sequence features, i.e. mixed data).</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-11-13T06:45:10.103Z
Answers.Text: Thanks, I would like to know what step by step analysis I need to perform here; like first I can look for arsenic exposure and CpG association using linear regression and then I can also look for CpG and health outcome association and then for common CpG site for arsenic exposure and health outcome I need to take for identify with the genetics variants(IVs) that affect the methylation at these site. And finally not sure if this is the correct  approach and then what I need as input for MR.
Answers.UserDisplayName: bioinfonext
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-11-13T13:23:25.360Z
Answers.Text: Thanks @bioinfonext Upvotes and accepts are more appreciated than thanks. I've answered above. An alternative approach e.g. via ML is a separate question.
Answers.UserDisplayName: M__
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-11-13T15:39:25.100Z
Answers.Text: Thanks again, still I am not clear which R packages should I use for these analysis.
Answers.UserDisplayName: bioinfonext
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-11-13T16:13:06.157Z
Answers.Text: GWAS: statgenGWAS package; machine learning its caret. LD is about PLINK and other autonomous packages. If you want a single package for an easy answer then shoehorn GWAS
Answers.UserDisplayName: M__
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-11-14T09:45:43.467Z
Answers.Text: thanks, so first I need to find CpG sites associated with arsenic exposure and then I should use these CpG site for GWAS and should also perform GWAS with disease phenotypes (CVD/noCVD). and then use these GWAS for MR?
Answers.UserDisplayName: bioinfonext
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-11-14T18:30:51.610Z
Answers.Text: Or do you think here I should use structural equation modelling to find CpG sites associated with arsenic exposure and disease condition as I have very small size samples and you already point out that it may not useful for MR analysis.
Answers.UserDisplayName: bioinfonext
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-11-14T19:14:30.377Z
Answers.Text: @bioinfonext I think its a separate question. Small sample size changes things a lot because that means no ML and no HW. I've never use SEM; I know what it does. Do consider upvoting however.
Answers.UserDisplayName: M__
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-11-07T14:11:40.197Z
Answers.LastActivityDate: 2023-11-13T14:24:26.233Z
Answers.LastEditDate: 2023-11-13T14:24:26.233Z
Answers.UserDisplayName: M__
Body: <p>I would be thankful to you if you can help with how I can use MR from my case-control study to link DNA methylation (epic array) with toxic element exposure (arsenic) and health outcome (Cardiovascular diseases).</p>
  <p>I do have data from 125 Cardiovascular diseases and 125 non-Cardiovascular diseases individuals matched with age, sex, and smoking.I do have phenotypes files in a csv format having sex, age, smoking, disease, samples id, iAs (arsenic) values in log format and then a separate files for methylation data. we also have SNP data for these samples.</p>
  <p>Many thanks,</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2023-11-08T05:08:54.817Z
Comments.Text: Please add more detail to this question. What format are your datasets in? Can you provide any examples of that format?
Comments.UserDisplayName: gringer
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2023-11-08T12:17:33.230Z
Comments.Text: added other informations, hope this is ok now.
Comments.UserDisplayName: bioinfonext
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2023-11-08T20:31:03.450Z
Comments.Text: `csv` and `log` formats are not well specified. Please show some examples of inputs and expected outputs.
Comments.UserDisplayName: gringer
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2023-11-13T09:59:56.863Z
Comments.Text: thanks gringer, I don't have whole data yet but thinking how to do this analysis step by step.
Comments.UserDisplayName: bioinfonext
Tags: <r><epigenetics>
Title: Mendelian randomization
ThreadText: # Mendelian randomization
  
  (Asked by: username_0 on 2023-11-07)
  
  I would be thankful to you if you can help with how I can use MR from my case-control study to link DNA methylation (epic array) with toxic element exposure (arsenic) and health outcome (Cardiovascular diseases).
  
  I do have data from 125 Cardiovascular diseases and 125 non-Cardiovascular diseases individuals matched with age, sex, and smoking.I do have phenotypes files in a csv format having sex, age, smoking, disease, samples id, iAs (arsenic) values in log format and then a separate files for methylation data. we also have SNP data for these samples.
  
  Many thanks,
  
  **Tags:** r, epigenetics
  
  > **Comments:**
  > **username_1**: Please add more detail to this question. What format are your datasets in? Can you provide any examples of that format?  
  > **username_0**: added other informations, hope this is ok now.  
  > **username_1**: `csv` and `log` formats are not well specified. Please show some examples of inputs and expected outputs.  
  > **username_0**: thanks username_1, I don't have whole data yet but thinking how to do this analysis step by step.  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_2 on 2023-11-07. Score: 1
  
  I understand linkage disequilibrium (LD) versus panmixia, which the technical term for Mendelian randomisation and for humans PLINK is a population package. The best outcome is a correlation between LD and cardiovascular disease. It is however an unlikely outcome.
  
  This really is a machine learning question and you would need to understand "feature selection" and will require very high accuracy scores >0.95 - however you could triple the size of our control group quite easily (recommended). This is a separate question and I'm happy to answer this there.
  
  ---
  
  Just to address the comments. Inheritance probability, if that is the intended statistics, I personally don't think it would work because a 125 sample is low and the patients would need to be in cohorts of familial generations. LD is unlikely the explanation with humans but other non-humans species that might work (selection advantage).
  
  My personal view is this is a straight machine learning calculation, but it's a separate question. If your sample is heavily stratified across each familial generation then Hardy-Weinberg might work, but my experience of patient cohorts is that is really unusual and there could still be confounders. Supervised learning (subset of ML) is 100% the way forward.
  
  .... possibly use GWAS, but you've multiple features/training targets. GWAS is usually when there's one phenotype, ML would account for interaction in a way GWAS could not (it couldn't account for non-sequence features, i.e. mixed data).
  
  > **Comments:**
  > **username_0**: Thanks, I would like to know what step by step analysis I need to perform here; like first I can look for arsenic exposure and CpG association using linear regression and then I can also look for CpG and health outcome association and then for common CpG site for arsenic exposure and health outcome I need to take for identify with the genetics variants(IVs) that affect the methylation at these site. And finally not sure if this is the correct  approach and then what I need as input for MR.  
  > **username_2**: Thanks @username_0 Upvotes and accepts are more appreciated than thanks. I've answered above. An alternative approach e.g. via ML is a separate question.  
  > **username_0**: Thanks again, still I am not clear which R packages should I use for these analysis.  
  > **username_2**: GWAS: statgenGWAS package; machine learning its caret. LD is about PLINK and other autonomous packages. If you want a single package for an easy answer then shoehorn GWAS  
  > **username_0**: thanks, so first I need to find CpG sites associated with arsenic exposure and then I should use these CpG site for GWAS and should also perform GWAS with disease phenotypes (CVD/noCVD). and then use these GWAS for MR?  
  > **username_0**: Or do you think here I should use structural equation modelling to find CpG sites associated with arsenic exposure and disease condition as I have very small size samples and you already point out that it may not useful for MR analysis.  
  > **username_2**: @username_0 I think its a separate question. Small sample size changes things a lot because that means no ML and no HW. I've never use SEM; I know what it does. Do consider upvoting however.  
  
  ---
  
  