Re: [R] Matrix for correlation
Hi @ all and sorry for the confusion, my problem is solved. I also know a corellation is - it was only a formatting and describing problem. Grant gave me the right advice with the kruskal-wallis! Thanks GeOphagus -- View this message in context: http://r.789695.n4.nabble.com/Matrix-for-correlation-tp4119590p4120561.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Re: [R] Matrix for correlation
I think everyone is worried about your data, not what a correlation matrix is. Now I think you may be even more turned around: you want a correlation between the values of the correlation matrix? Just dput() your data object and copy it into your email and we'll see if it's possible to calculate a correlation matrix. Michael On Tue, Nov 29, 2011 at 11:15 AM, Geophagus wrote: > > Hi Michael, > thank you so much for your fast reply. > On the image below there is an example of what I mean. > I need the correlation between the values on the fields with "?". > > http://r.789695.n4.nabble.com/file/n4119734/corr_ex.png > > But my source data is not in a matrix. It looks like the table in my first > post. > > Do you understand my problem? > Thanks a lot! > Geophagus > > > > -- > View this message in context: > http://r.789695.n4.nabble.com/Matrix-for-correlation-tp4119590p4119734.html > Sent from the R help mailing list archive at Nabble.com. > > __ > R-help@r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. > __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Re: [R] Matrix for correlation
Hi Michael, thank you so much for your fast reply. On the image below there is an example of what I mean. I need the correlation between the values on the fields with "?". http://r.789695.n4.nabble.com/file/n4119734/corr_ex.png But my source data is not in a matrix. It looks like the table in my first post. Do you understand my problem? Thanks a lot! Geophagus -- View this message in context: http://r.789695.n4.nabble.com/Matrix-for-correlation-tp4119590p4119734.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Re: [R] Matrix for correlation
Do you have multiple data points for Car/Train etc? And do you want to see if there are differences between in mean/medians these modes of transport? If so explore anova, kruskal-wallis . > Date: Tue, 29 Nov 2011 16:57:57 +0100 > From: lig...@statistik.tu-dortmund.de > To: falk.hilli...@twain-systems.com > CC: r-help@r-project.org > Subject: Re: [R] Matrix for correlation > > > > On 29.11.2011 16:41, Geophagus wrote: > > hi @ all, > > I have problem with creating a matrix for a cor() function. > > I try to use the cor() function on a matrix to test the correlation between > > each value in a column. > > Maybe like corr(x, method = xyz). > > My x has two columns maybe like this: > > > > MEDIA VALUE > > Car 23 > > Train26 > > Plane 25 > > Cab 22 > > Bike 15 > > > > and so on. > > > > Now I want to calculate the correlation between Car and Train, Car and > > Plane, Train and Plane and so on. > > > > > If the above is your data, then you have indeed no clue what the word > "correlation" means. Please look it up in a textbook and find why you > cannot calculate it for this kind of data. If you do not find, please > ask a local statistician for help. > > Uwe Ligges > > > > > Sorry but I don't have a clue and I hope there is an easy way to solve my > > problem. > > Thanks a lot for all answers. > > > > Greetz Geo > > > > > > -- > > View this message in context: > > http://r.789695.n4.nabble.com/Matrix-for-correlation-tp4119590p4119590.html > > Sent from the R help mailing list archive at Nabble.com. > > > > __ > > R-help@r-project.org mailing list > > https://stat.ethz.ch/mailman/listinfo/r-help > > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > > and provide commented, minimal, self-contained, reproducible code. > > __ > R-help@r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Re: [R] Matrix for correlation
On 29.11.2011 16:41, Geophagus wrote: hi @ all, I have problem with creating a matrix for a cor() function. I try to use the cor() function on a matrix to test the correlation between each value in a column. Maybe like corr(x, method = xyz). My x has two columns maybe like this: MEDIA VALUE Car 23 Train26 Plane 25 Cab 22 Bike 15 and so on. > Now I want to calculate the correlation between Car and Train, Car and Plane, Train and Plane and so on. If the above is your data, then you have indeed no clue what the word "correlation" means. Please look it up in a textbook and find why you cannot calculate it for this kind of data. If you do not find, please ask a local statistician for help. Uwe Ligges Sorry but I don't have a clue and I hope there is an easy way to solve my problem. Thanks a lot for all answers. Greetz Geo -- View this message in context: http://r.789695.n4.nabble.com/Matrix-for-correlation-tp4119590p4119590.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Re: [R] Matrix for correlation
I'm not sure how you mean to calculate correlation if you have a single observation of each mediumcan you provide your data (or a subset thereof) so we can see what you are actually working with and if correlation makes sense. Michael On Tue, Nov 29, 2011 at 10:41 AM, Geophagus wrote: > hi @ all, > I have problem with creating a matrix for a cor() function. > I try to use the cor() function on a matrix to test the correlation between > each value in a column. > Maybe like corr(x, method = xyz). > My x has two columns maybe like this: > > MEDIA VALUE > Car 23 > Train 26 > Plane 25 > Cab 22 > Bike 15 > > and so on. > > Now I want to calculate the correlation between Car and Train, Car and > Plane, Train and Plane and so on. > > Sorry but I don't have a clue and I hope there is an easy way to solve my > problem. > Thanks a lot for all answers. > > Greetz Geo > > > -- > View this message in context: > http://r.789695.n4.nabble.com/Matrix-for-correlation-tp4119590p4119590.html > Sent from the R help mailing list archive at Nabble.com. > > __ > R-help@r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. > __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
[R] Matrix for correlation
hi @ all, I have problem with creating a matrix for a cor() function. I try to use the cor() function on a matrix to test the correlation between each value in a column. Maybe like corr(x, method = xyz). My x has two columns maybe like this: MEDIA VALUE Car 23 Train26 Plane 25 Cab 22 Bike 15 and so on. Now I want to calculate the correlation between Car and Train, Car and Plane, Train and Plane and so on. Sorry but I don't have a clue and I hope there is an easy way to solve my problem. Thanks a lot for all answers. Greetz Geo -- View this message in context: http://r.789695.n4.nabble.com/Matrix-for-correlation-tp4119590p4119590.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.