permutation test
1
0
Entering edit mode
Patricia ▴ 20
@patricia-2706
Last seen 10.2 years ago
An embedded and charset-unspecified text was scrubbed... Name: not available Url: https://stat.ethz.ch/pipermail/bioconductor/attachments/20080312/ 197fee1b/attachment.pl
• 1.2k views
ADD COMMENT
0
Entering edit mode
@john-seers-ifr-1605
Last seen 10.2 years ago
Hi I don't really understand your question but perhaps these functions may help: ?sample ?combn Regards John Seers --- -----Original Message----- From: bioconductor-bounces@stat.math.ethz.ch [mailto:bioconductor-bounces at stat.math.ethz.ch] On Behalf Of Patricia Sent: 12 March 2008 10:46 To: bioconductor at stat.math.ethz.ch Subject: [BioC] permutation test Hi everyone, Is there any function to apply a randomization test (permutation test) in witch you can choose the number of permutations? I've using function perm.test but I need to make more permutations. Thanks! Regards Patricia [[alternative HTML version deleted]] _______________________________________________ Bioconductor mailing list Bioconductor at stat.math.ethz.ch https://stat.ethz.ch/mailman/listinfo/bioconductor Search the archives: http://news.gmane.org/gmane.science.biology.informatics.conductor
ADD COMMENT
0
Entering edit mode
Hi, My question is about the number of permutations in a randomization test. I would need to make a very large number of permutations (around 10000) and I can't find a function that calculates the pvalue from that. Thanks Patricia -----Original Message----- From: john seers (IFR) [mailto:john.seers@bbsrc.ac.uk] Sent: mi?rcoles, 12 de marzo de 2008 12:04 To: Patricia; bioconductor at stat.math.ethz.ch Subject: RE: [BioC] permutation test Hi I don't really understand your question but perhaps these functions may help: ?sample ?combn Regards John Seers --- -----Original Message----- From: bioconductor-bounces@stat.math.ethz.ch [mailto:bioconductor-bounces at stat.math.ethz.ch] On Behalf Of Patricia Sent: 12 March 2008 10:46 To: bioconductor at stat.math.ethz.ch Subject: [BioC] permutation test Hi everyone, Is there any function to apply a randomization test (permutation test) in witch you can choose the number of permutations? I've using function perm.test but I need to make more permutations. Thanks! Regards Patricia [[alternative HTML version deleted]] _______________________________________________ Bioconductor mailing list Bioconductor at stat.math.ethz.ch https://stat.ethz.ch/mailman/listinfo/bioconductor Search the archives: http://news.gmane.org/gmane.science.biology.informatics.conductor
ADD REPLY
0
Entering edit mode
Hi Patricia, I think John was getting at the fact that 'randomization test' has no specific meaning in statistics, other than the obvious fact that you want to permute things. If you state clearly what you are trying to do you will have a much better chance of getting an answer, not to mention probably getting the correct answer. Best, Jim Patricia wrote: > Hi, > My question is about the number of permutations in a randomization test. I > would need to make a very large number of permutations (around 10000) and I > can't find a function that calculates the pvalue from that. > > > Thanks > > Patricia > > -----Original Message----- > From: john seers (IFR) [mailto:john.seers at bbsrc.ac.uk] > Sent: mi?rcoles, 12 de marzo de 2008 12:04 > To: Patricia; bioconductor at stat.math.ethz.ch > Subject: RE: [BioC] permutation test > > > > > Hi > > I don't really understand your question but perhaps these functions may > help: > > ?sample > ?combn > > Regards > > John Seers > > > > --- > -----Original Message----- > From: bioconductor-bounces at stat.math.ethz.ch > [mailto:bioconductor-bounces at stat.math.ethz.ch] On Behalf Of Patricia > Sent: 12 March 2008 10:46 > To: bioconductor at stat.math.ethz.ch > Subject: [BioC] permutation test > > Hi everyone, > > > > Is there any function to apply a randomization test (permutation test) > in witch you can choose the number of permutations? > > I've using function perm.test but I need to make more permutations. > > > > Thanks! > > > > Regards > > > > Patricia > > > > > > > > > [[alternative HTML version deleted]] > > _______________________________________________ > Bioconductor mailing list > Bioconductor at stat.math.ethz.ch > https://stat.ethz.ch/mailman/listinfo/bioconductor > Search the archives: > http://news.gmane.org/gmane.science.biology.informatics.conductor > > _______________________________________________ > Bioconductor mailing list > Bioconductor at stat.math.ethz.ch > https://stat.ethz.ch/mailman/listinfo/bioconductor > Search the archives: http://news.gmane.org/gmane.science.biology.informatics.conductor -- James W. MacDonald, M.S. Biostatistician Affymetrix and cDNA Microarray Core University of Michigan Cancer Center 1500 E. Medical Center Drive 7410 CCGC Ann Arbor MI 48109 734-647-5623
ADD REPLY
0
Entering edit mode
Hi James A fortuitous coincidence you mention my name in a posting when I was reading one of your threads the other day and this prompts me to ask you directly. The thread in question is: https://stat.ethz.ch/pipermail/bioconductor/2007-November/020291.html I followed the thread through and found it did not offer a solution and you finish with: "I'm not sure why you would want to do things pair-wise, but if you really want paired t-tests, then you will have to analyze the data in pairs rather than all at once." I am using limma on a similar setup and I am not sure how to pair the data. The setup is before and after two diets and a condition control and disease. (There is a section in the limma manual on paired data and a section on factorial designs but I am not sure how to marry them). Can you explain what you mean by "analyzing the data in pairs rather than all at once"? My solution so far is to preprocess the data and take the ratio of the expression values of the paired arrays (so halving the number of columns) and analyzing them in limma. That removes the pairing from the limma analysis. Does that make sense to you? Thank you in advance for any time you take. Regards John Seers --- Web sites:
ADD REPLY
0
Entering edit mode
Hi John, john seers (IFR) wrote: > > > Hi James > > A fortuitous coincidence you mention my name in a posting when I was > reading one of your threads the other day and this prompts me to ask you > directly. > > The thread in question is: > > > https://stat.ethz.ch/pipermail/bioconductor/2007-November/020291.html > > > I followed the thread through and found it did not offer a solution and > you finish with: > > "I'm not sure why you would want to do things pair-wise, but if you > really want paired t-tests, then you will have to analyze the data in > pairs rather than all at once." > > I am using limma on a similar setup and I am not sure how to pair the > data. The setup is before and after two diets and a condition control > and disease. (There is a section in the limma manual on paired data and > a section on factorial designs but I am not sure how to marry them). > > Can you explain what you mean by "analyzing the data in pairs rather > than all at once"? Well, the poster wanted his data to agree with the results from a paired t-test, which won't happen if you fit a model to all the data and then compute contrasts. This is because the denominator of the statistic will be different in the two cases. In the former, the denominator will be the standard error of the mean, which is computed using only the two samples under consideration. In the latter, it will be the sums of squares of error (or some variant thereof, depending on the model), which measures the within-group variance of all the groups in the model, not just the two under consideration for a given contrast. I didn't know why he would want to do things pair-wise, as the variance estimates get better as n goes up, so the linear model approach is often preferable. You can see that in his example - the t-statistic was larger when he used all his data than when he just used the paired data. > > My solution so far is to preprocess the data and take the ratio of the > expression values of the paired arrays (so halving the number of > columns) and analyzing them in limma. That removes the pairing from the > limma analysis. Does that make sense to you? Well, if by 'take the ratio' you mean 'compute the difference'(we _are_ on the log scale?), then this is essentially what you would be doing by fitting a batch effect anyway. However, it will limit the types of comparisons you can make since you are combining the paired data into differences. Best, Jim > > Thank you in advance for any time you take. > > Regards > > > John Seers > > > > --- > > Web sites: > > _______________________________________________ > Bioconductor mailing list > Bioconductor at stat.math.ethz.ch > https://stat.ethz.ch/mailman/listinfo/bioconductor > Search the archives: http://news.gmane.org/gmane.science.biology.informatics.conductor -- James W. MacDonald, M.S. Biostatistician Affymetrix and cDNA Microarray Core University of Michigan Cancer Center 1500 E. Medical Center Drive 7410 CCGC Ann Arbor MI 48109 734-647-5623
ADD REPLY
0
Entering edit mode
Hi James Thanks and thanks for your effort. I understand that mostly but I am still not sure what I can do setting up a design matrix and a contrasts matrix. I do not like the idea of losing flexibility so I would like to be able to do it all through limma. I want to be able to see the effects between the two diets and on the disease condition. Diet1 is a control diet and I would like to see the effects of Diet2. Also the difference between the Control and Disease conditions by diet. So if I do something like: Pairing<-factor(descr[,"Pairing"]) Condition<-factor(descr[,"Condition"]) Diet<-factor(descr[,"Diet"]) design<-model.matrix(~ -1 + Diet + Condition + Pairing) Is that valid? If I then run this line I get an error message. Can I ignore the error? Or has the lmFit failed? fit<-lmFit(eset, design) #(I get this error message: Coefficients not estimable: Pairing6 Pairing9 ) Then I am not sure what contrasts I can make to get what I want. Can you suggest to me what would be some sensible choices? For instance, is this a valid contrast to show the difference between the two diets? contrast.matrix<-makeContrasts(DietDiet2 - DietDiet1, levels=design) Help appreciated. Regards John Seers > colnames(design) [1] "DietDiet1" "DietDiet2" "ConditionDisease" "Pairing10" "Pairing11" "Pairing12" "Pairing13" [8] "Pairing14" "Pairing15" "Pairing16" "Pairing17" "Pairing18" "Pairing19" "Pairing2" [15] "Pairing20" "Pairing21" "Pairing22" "Pairing23" "Pairing24" "Pairing25" "Pairing26" [22] "Pairing27" "Pairing28" "Pairing3" "Pairing4" "Pairing5" "Pairing6" "Pairing7" [29] "Pairing8" "Pairing9" > > Pairing [1] 1 1 2 2 3 3 4 4 5 5 6 6 7 7 8 8 9 9 10 10 11 11 12 12 13 13 14 14 15 15 16 16 17 17 18 18 19 19 20 20 21 21 22 22 23 [46] 23 24 24 25 25 26 26 27 27 28 28 Levels: 1 10 11 12 13 14 15 16 17 18 19 2 20 21 22 23 24 25 26 27 28 3 4 5 6 7 8 9 > > Diet [1] Diet1 Diet1 Diet1 Diet1 Diet1 Diet1 Diet2 Diet2 Diet2 Diet2 Diet2 Diet2 Diet1 Diet1 Diet1 Diet1 Diet1 Diet1 Diet1 Diet1 Diet1 Diet1 [23] Diet1 Diet1 Diet1 Diet1 Diet2 Diet2 Diet2 Diet2 Diet2 Diet2 Diet2 Diet2 Diet2 Diet2 Diet2 Diet2 Diet2 Diet2 Diet1 Diet1 Diet2 Diet2 [45] Diet1 Diet1 Diet1 Diet1 Diet1 Diet1 Diet2 Diet2 Diet2 Diet2 Diet2 Diet2 Levels: Diet1 Diet2 > > > Condition [1] Control Control Control Control Control Control Control Control Control Control Control Control Disease Disease Disease Disease Disease [18] Disease Disease Disease Disease Disease Disease Disease Disease Disease Disease Disease Disease Disease Disease Disease Disease Disease [35] Disease Disease Disease Disease Control Control Disease Disease Disease Disease Disease Disease Control Control Disease Disease Disease [52] Disease Disease Disease Control Control Levels: Control Disease > --- Web sites: www.ifr.ac.uk www.foodandhealthnetwork.com -----Original Message----- From: James W. MacDonald [mailto:jmacdon@med.umich.edu] Sent: 12 March 2008 14:59 To: john seers (IFR) Cc: bioconductor at stat.math.ethz.ch Subject: Re: [BioC] Paired arrays and limma Hi John, john seers (IFR) wrote: > > > Hi James > > A fortuitous coincidence you mention my name in a posting when I was > reading one of your threads the other day and this prompts me to ask > you directly. > > The thread in question is: > > > https://stat.ethz.ch/pipermail/bioconductor/2007-November/020291.html > > > I followed the thread through and found it did not offer a solution > and you finish with: > > "I'm not sure why you would want to do things pair-wise, but if you > really want paired t-tests, then you will have to analyze the data in > pairs rather than all at once." > > I am using limma on a similar setup and I am not sure how to pair the > data. The setup is before and after two diets and a condition control > and disease. (There is a section in the limma manual on paired data > and a section on factorial designs but I am not sure how to marry them). > > Can you explain what you mean by "analyzing the data in pairs rather > than all at once"? Well, the poster wanted his data to agree with the results from a paired t-test, which won't happen if you fit a model to all the data and then compute contrasts. This is because the denominator of the statistic will be different in the two cases. In the former, the denominator will be the standard error of the mean, which is computed using only the two samples under consideration. In the latter, it will be the sums of squares of error (or some variant thereof, depending on the model), which measures the within-group variance of all the groups in the model, not just the two under consideration for a given contrast. I didn't know why he would want to do things pair-wise, as the variance estimates get better as n goes up, so the linear model approach is often preferable. You can see that in his example - the t-statistic was larger when he used all his data than when he just used the paired data. > > My solution so far is to preprocess the data and take the ratio of the > expression values of the paired arrays (so halving the number of > columns) and analyzing them in limma. That removes the pairing from the > limma analysis. Does that make sense to you? Well, if by 'take the ratio' you mean 'compute the difference'(we _are_ on the log scale?), then this is essentially what you would be doing by fitting a batch effect anyway. However, it will limit the types of comparisons you can make since you are combining the paired data into differences. Best, Jim > > Thank you in advance for any time you take. > > Regards > > > John Seers > > > > --- > > Web sites: > > _______________________________________________ > Bioconductor mailing list > Bioconductor at stat.math.ethz.ch > https://stat.ethz.ch/mailman/listinfo/bioconductor > Search the archives: http://news.gmane.org/gmane.science.biology.informatics.conductor -- James W. MacDonald, M.S. Biostatistician Affymetrix and cDNA Microarray Core University of Michigan Cancer Center 1500 E. Medical Center Drive 7410 CCGC Ann Arbor MI 48109 734-647-5623
ADD REPLY
0
Entering edit mode
Hi John, john seers (IFR) wrote: > > > Hi James > > Thanks and thanks for your effort. I understand that mostly but I am > still not sure what I can do setting up a design matrix and a contrasts > matrix. I do not like the idea of losing flexibility so I would like to > be able to do it all through limma. > > I want to be able to see the effects between the two diets and on the > disease condition. Diet1 is a control diet and I would like to see the > effects of Diet2. Also the difference between the Control and Disease > conditions by diet. > > So if I do something like: > > > Pairing<-factor(descr[,"Pairing"]) > Condition<-factor(descr[,"Condition"]) > Diet<-factor(descr[,"Diet"]) > > design<-model.matrix(~ -1 + Diet + Condition + Pairing) > > Is that valid? Theoretically yes. > > If I then run this line I get an error message. Can I ignore the error? > Or has the lmFit failed? > > fit<-lmFit(eset, design) > > #(I get this error message: Coefficients not estimable: Pairing6 > Pairing9 ) It's not an error. It is a warning indicating that the design matrix you specified isn't of full column rank. Simply put, you have more parameters in your model than you have data to estimate with. What limma is doing is removing the extra columns of the design matrix and then fitting the model (along with the warning that you had an over- specified model). I'm sort of surprised that model.matrix will create such a design matrix, but I have to assume there is a good reason. I don't really understand the pairings you have below. By my count, each paired sample got the same diet and had the same disease. In which case, what's up with the paired samples? I assumed you had something like control and diseased animals that you fed different diets at different times (or maybe siblings or some other dependence structure), but this doesn't seem to be the case. I *was* going to say that you could just compute the differences between the pairs (diet1 - diet2). Then it would be easy to get the diet-specific genes for each type (control and disease), as well as the interaction (genes that react differently to diet depending on the disease status). But given how you describe the samples below I don't think that is necessary, nor do I really understand what you are doing. Best, Jim > > Then I am not sure what contrasts I can make to get what I want. Can you > suggest to me what would be some sensible choices? > > For instance, is this a valid contrast to show the difference between > the two diets? > contrast.matrix<-makeContrasts(DietDiet2 - DietDiet1, levels=design) > > > Help appreciated. > > Regards > > John Seers > > >> colnames(design) > [1] "DietDiet1" "DietDiet2" "ConditionDisease" > "Pairing10" "Pairing11" "Pairing12" "Pairing13" > > [8] "Pairing14" "Pairing15" "Pairing16" > "Pairing17" "Pairing18" "Pairing19" "Pairing2" > > [15] "Pairing20" "Pairing21" "Pairing22" > "Pairing23" "Pairing24" "Pairing25" "Pairing26" > > [22] "Pairing27" "Pairing28" "Pairing3" "Pairing4" > "Pairing5" "Pairing6" "Pairing7" > [29] "Pairing8" "Pairing9" > > >> Pairing > [1] 1 1 2 2 3 3 4 4 5 5 6 6 7 7 8 8 9 9 10 10 11 11 > 12 12 13 13 14 14 15 15 16 16 17 17 18 18 19 19 20 20 21 21 22 22 23 > [46] 23 24 24 25 25 26 26 27 27 28 28 > Levels: 1 10 11 12 13 14 15 16 17 18 19 2 20 21 22 23 24 25 26 27 28 3 4 > 5 6 7 8 9 > >> Diet > [1] Diet1 Diet1 Diet1 Diet1 Diet1 Diet1 Diet2 Diet2 Diet2 Diet2 Diet2 > Diet2 Diet1 Diet1 Diet1 Diet1 Diet1 Diet1 Diet1 Diet1 Diet1 Diet1 > [23] Diet1 Diet1 Diet1 Diet1 Diet2 Diet2 Diet2 Diet2 Diet2 Diet2 Diet2 > Diet2 Diet2 Diet2 Diet2 Diet2 Diet2 Diet2 Diet1 Diet1 Diet2 Diet2 > [45] Diet1 Diet1 Diet1 Diet1 Diet1 Diet1 Diet2 Diet2 Diet2 Diet2 Diet2 > Diet2 > Levels: Diet1 Diet2 > >> Condition > [1] Control Control Control Control Control Control Control Control > Control Control Control Control Disease Disease Disease Disease Disease > [18] Disease Disease Disease Disease Disease Disease Disease Disease > Disease Disease Disease Disease Disease Disease Disease Disease Disease > [35] Disease Disease Disease Disease Control Control Disease Disease > Disease Disease Disease Disease Control Control Disease Disease Disease > [52] Disease Disease Disease Control Control > Levels: Control Disease > > > --- > Web sites: > > www.ifr.ac.uk > www.foodandhealthnetwork.com > > -----Original Message----- > From: James W. MacDonald [mailto:jmacdon at med.umich.edu] > Sent: 12 March 2008 14:59 > To: john seers (IFR) > Cc: bioconductor at stat.math.ethz.ch > Subject: Re: [BioC] Paired arrays and limma > > Hi John, > > john seers (IFR) wrote: >> >> >> Hi James >> >> A fortuitous coincidence you mention my name in a posting when I was >> reading one of your threads the other day and this prompts me to ask >> you directly. >> >> The thread in question is: >> >> >> https://stat.ethz.ch/pipermail/bioconductor/2007-November/020291.html >> >> >> I followed the thread through and found it did not offer a solution >> and you finish with: >> >> "I'm not sure why you would want to do things pair-wise, but if you >> really want paired t-tests, then you will have to analyze the data in >> pairs rather than all at once." >> >> I am using limma on a similar setup and I am not sure how to pair the >> data. The setup is before and after two diets and a condition control >> and disease. (There is a section in the limma manual on paired data >> and a section on factorial designs but I am not sure how to marry > them). >> Can you explain what you mean by "analyzing the data in pairs rather >> than all at once"? > > Well, the poster wanted his data to agree with the results from a paired > t-test, which won't happen if you fit a model to all the data and then > compute contrasts. This is because the denominator of the statistic will > be different in the two cases. > > In the former, the denominator will be the standard error of the mean, > which is computed using only the two samples under consideration. > > In the latter, it will be the sums of squares of error (or some variant > thereof, depending on the model), which measures the within-group > variance of all the groups in the model, not just the two under > consideration for a given contrast. > > I didn't know why he would want to do things pair-wise, as the variance > estimates get better as n goes up, so the linear model approach is often > preferable. You can see that in his example - the t-statistic was larger > when he used all his data than when he just used the paired data. > >> My solution so far is to preprocess the data and take the ratio of the >> expression values of the paired arrays (so halving the number of >> columns) and analyzing them in limma. That removes the pairing from > the >> limma analysis. Does that make sense to you? > > Well, if by 'take the ratio' you mean 'compute the difference'(we _are_ > on the log scale?), then this is essentially what you would be doing by > fitting a batch effect anyway. However, it will limit the types of > comparisons you can make since you are combining the paired data into > differences. > > Best, > > Jim > > >> Thank you in advance for any time you take. >> >> Regards >> >> >> John Seers >> >> >> >> --- >> >> Web sites: >> >> _______________________________________________ >> Bioconductor mailing list >> Bioconductor at stat.math.ethz.ch >> https://stat.ethz.ch/mailman/listinfo/bioconductor >> Search the archives: > http://news.gmane.org/gmane.science.biology.informatics.conductor > -- James W. MacDonald, M.S. Biostatistician Affymetrix and cDNA Microarray Core University of Michigan Cancer Center 1500 E. Medical Center Drive 7410 CCGC Ann Arbor MI 48109 734-647-5623
ADD REPLY
0
Entering edit mode
Hi James Thanks for the reply. >Theoretically yes. That sounds a bit doubting? Are you saying not really? >By my count, each paired sample got the same diet and had the same disease. In which case, what's up >with the paired samples? Yes, exactly correct. The arrays are a Before and After for a volunteer. A Before array was made. They are then fed either diet1 or diet2 for 6 months and the After array made. There are volunteers who are controls and volunteers who have the condition. So the pairings are because they are the same volunteer before and after. Does that make it clearer? Diet1 is a control diet. >I *was* going to say that you could just compute the differences between the pairs (diet1 - diet2). Then >it would be easy to get the diet-specific genes for each type (control and disease), as well as the >interaction (genes that react differently to diet depending on the disease status). But given how you >describe the samples below I don't think that is necessary, What you describe sounds something like what I want. How would that be done? Can you explain why in your view it is not necessary? You have left me behind at this point. >nor do I really understand what you are doing. I am sorry I cannot explain it better. Perhaps if you ask me a specific question I can make it clearer. Thanks again for taking the time and trouble to help. Regards John --- -----Original Message----- From: James W. MacDonald [mailto:jmacdon@med.umich.edu] Sent: 12 March 2008 20:10 To: john seers (IFR) Cc: bioconductor at stat.math.ethz.ch Subject: Re: [BioC] Paired arrays and limma Hi John, john seers (IFR) wrote: > > > Hi James > > Thanks and thanks for your effort. I understand that mostly but I am > still not sure what I can do setting up a design matrix and a > contrasts matrix. I do not like the idea of losing flexibility so I > would like to be able to do it all through limma. > > I want to be able to see the effects between the two diets and on the > disease condition. Diet1 is a control diet and I would like to see the > effects of Diet2. Also the difference between the Control and Disease > conditions by diet. > > So if I do something like: > > > Pairing<-factor(descr[,"Pairing"]) > Condition<-factor(descr[,"Condition"]) > Diet<-factor(descr[,"Diet"]) > > design<-model.matrix(~ -1 + Diet + Condition + Pairing) > > Is that valid? Theoretically yes. > > If I then run this line I get an error message. Can I ignore the error? > Or has the lmFit failed? > > fit<-lmFit(eset, design) > > #(I get this error message: Coefficients not estimable: Pairing6 > Pairing9 ) It's not an error. It is a warning indicating that the design matrix you specified isn't of full column rank. Simply put, you have more parameters in your model than you have data to estimate with. What limma is doing is removing the extra columns of the design matrix and then fitting the model (along with the warning that you had an over- specified model). I'm sort of surprised that model.matrix will create such a design matrix, but I have to assume there is a good reason. I don't really understand the pairings you have below. By my count, each paired sample got the same diet and had the same disease. In which case, what's up with the paired samples? I assumed you had something like control and diseased animals that you fed different diets at different times (or maybe siblings or some other dependence structure), but this doesn't seem to be the case. I *was* going to say that you could just compute the differences between the pairs (diet1 - diet2). Then it would be easy to get the diet-specific genes for each type (control and disease), as well as the interaction (genes that react differently to diet depending on the disease status). But given how you describe the samples below I don't think that is necessary, nor do I really understand what you are doing. Best, Jim > > Then I am not sure what contrasts I can make to get what I want. Can > you suggest to me what would be some sensible choices? > > For instance, is this a valid contrast to show the difference between > the two diets? > contrast.matrix<-makeContrasts(DietDiet2 - DietDiet1, levels=design) > > > Help appreciated. > > Regards > > John Seers > > >> colnames(design) > [1] "DietDiet1" "DietDiet2" "ConditionDisease" > "Pairing10" "Pairing11" "Pairing12" "Pairing13" > > [8] "Pairing14" "Pairing15" "Pairing16" > "Pairing17" "Pairing18" "Pairing19" "Pairing2" > > [15] "Pairing20" "Pairing21" "Pairing22" > "Pairing23" "Pairing24" "Pairing25" "Pairing26" > > [22] "Pairing27" "Pairing28" "Pairing3" "Pairing4" > "Pairing5" "Pairing6" "Pairing7" > [29] "Pairing8" "Pairing9" > > >> Pairing > [1] 1 1 2 2 3 3 4 4 5 5 6 6 7 7 8 8 9 9 10 10 11 11 > 12 12 13 13 14 14 15 15 16 16 17 17 18 18 19 19 20 20 21 21 22 22 23 > [46] 23 24 24 25 25 26 26 27 27 28 28 > Levels: 1 10 11 12 13 14 15 16 17 18 19 2 20 21 22 23 24 25 26 27 28 3 > 4 > 5 6 7 8 9 > >> Diet > [1] Diet1 Diet1 Diet1 Diet1 Diet1 Diet1 Diet2 Diet2 Diet2 Diet2 Diet2 > Diet2 Diet1 Diet1 Diet1 Diet1 Diet1 Diet1 Diet1 Diet1 Diet1 Diet1 [23] > Diet1 Diet1 Diet1 Diet1 Diet2 Diet2 Diet2 Diet2 Diet2 Diet2 Diet2 > Diet2 Diet2 Diet2 Diet2 Diet2 Diet2 Diet2 Diet1 Diet1 Diet2 Diet2 [45] > Diet1 Diet1 Diet1 Diet1 Diet1 Diet1 Diet2 Diet2 Diet2 Diet2 Diet2 > Diet2 > Levels: Diet1 Diet2 > >> Condition > [1] Control Control Control Control Control Control Control Control > Control Control Control Control Disease Disease Disease Disease > Disease [18] Disease Disease Disease Disease Disease Disease Disease > Disease Disease Disease Disease Disease Disease Disease Disease > Disease Disease [35] Disease Disease Disease Disease Control Control > Disease Disease Disease Disease Disease Disease Control Control > Disease Disease Disease [52] Disease Disease Disease Control Control > Levels: Control Disease > > > --- > Web sites: > > www.ifr.ac.uk > www.foodandhealthnetwork.com > > -----Original Message----- > From: James W. MacDonald [mailto:jmacdon at med.umich.edu] > Sent: 12 March 2008 14:59 > To: john seers (IFR) > Cc: bioconductor at stat.math.ethz.ch > Subject: Re: [BioC] Paired arrays and limma > > Hi John, > > john seers (IFR) wrote: >> >> >> Hi James >> >> A fortuitous coincidence you mention my name in a posting when I was >> reading one of your threads the other day and this prompts me to ask >> you directly. >> >> The thread in question is: >> >> >> https://stat.ethz.ch/pipermail/bioconductor/2007-November/020291.html >> >> >> I followed the thread through and found it did not offer a solution >> and you finish with: >> >> "I'm not sure why you would want to do things pair-wise, but if you >> really want paired t-tests, then you will have to analyze the data in >> pairs rather than all at once." >> >> I am using limma on a similar setup and I am not sure how to pair the >> data. The setup is before and after two diets and a condition control >> and disease. (There is a section in the limma manual on paired data >> and a section on factorial designs but I am not sure how to marry > them). >> Can you explain what you mean by "analyzing the data in pairs rather >> than all at once"? > > Well, the poster wanted his data to agree with the results from a > paired t-test, which won't happen if you fit a model to all the data > and then compute contrasts. This is because the denominator of the > statistic will be different in the two cases. > > In the former, the denominator will be the standard error of the mean, > which is computed using only the two samples under consideration. > > In the latter, it will be the sums of squares of error (or some > variant thereof, depending on the model), which measures the > within-group variance of all the groups in the model, not just the two > under consideration for a given contrast. > > I didn't know why he would want to do things pair-wise, as the > variance estimates get better as n goes up, so the linear model > approach is often preferable. You can see that in his example - the > t-statistic was larger when he used all his data than when he just used the paired data. > >> My solution so far is to preprocess the data and take the ratio of >> the expression values of the paired arrays (so halving the number of >> columns) and analyzing them in limma. That removes the pairing from > the >> limma analysis. Does that make sense to you? > > Well, if by 'take the ratio' you mean 'compute the difference'(we > _are_ on the log scale?), then this is essentially what you would be > doing by fitting a batch effect anyway. However, it will limit the > types of comparisons you can make since you are combining the paired > data into differences. > > Best, > > Jim > > >> Thank you in advance for any time you take. >> >> Regards >> >> >> John Seers >> >> >> >> --- >> >> Web sites: >> >> _______________________________________________ >> Bioconductor mailing list >> Bioconductor at stat.math.ethz.ch >> https://stat.ethz.ch/mailman/listinfo/bioconductor >> Search the archives: > http://news.gmane.org/gmane.science.biology.informatics.conductor > -- James W. MacDonald, M.S. Biostatistician Affymetrix and cDNA Microarray Core University of Michigan Cancer Center 1500 E. Medical Center Drive 7410 CCGC Ann Arbor MI 48109 734-647-5623
ADD REPLY
0
Entering edit mode
Hi Patricia, I assume you need a randomization test for calculating the FDR or the FWER for multitesting, thus the number of usefull permutaions is limited by the number of your samples. I would recomend you to check the siggenes packages,where you can setting the number of permutations. Best Manuel --- Patricia <patricia.garcia at="" integromics.com=""> escribi?: > Hi, > My question is about the number of permutations in a > randomization test. I > would need to make a very large number of > permutations (around 10000) and I > can't find a function that calculates the pvalue > from that. > > > Thanks > > Patricia > > -----Original Message----- > From: john seers (IFR) > [mailto:john.seers at bbsrc.ac.uk] > Sent: mi?rcoles, 12 de marzo de 2008 12:04 > To: Patricia; bioconductor at stat.math.ethz.ch > Subject: RE: [BioC] permutation test > > > > > Hi > > I don't really understand your question but perhaps > these functions may > help: > > ?sample > ?combn > > Regards > > John Seers > > > > --- > -----Original Message----- > From: bioconductor-bounces at stat.math.ethz.ch > [mailto:bioconductor-bounces at stat.math.ethz.ch] On > Behalf Of Patricia > Sent: 12 March 2008 10:46 > To: bioconductor at stat.math.ethz.ch > Subject: [BioC] permutation test > > Hi everyone, > > > > Is there any function to apply a randomization test > (permutation test) > in witch you can choose the number of permutations? > > I've using function perm.test but I need to make > more permutations. > > > > Thanks! > > > > Regards > > > > Patricia > > > > > > > > > [[alternative HTML version deleted]] > > _______________________________________________ > Bioconductor mailing list > Bioconductor at stat.math.ethz.ch > https://stat.ethz.ch/mailman/listinfo/bioconductor > Search the archives: > http://news.gmane.org/gmane.science.biology.informatics.conductor > > _______________________________________________ > Bioconductor mailing list > Bioconductor at stat.math.ethz.ch > https://stat.ethz.ch/mailman/listinfo/bioconductor > Search the archives: > http://news.gmane.org/gmane.science.biology.informatics.conductor >
ADD REPLY

Login before adding your answer.

Traffic: 925 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6