Jon Toledo
2011-Mar-17 16:38 UTC
[R] Spatial cluster analysis of continous outcome variable
Dear R Users, R Core Team, I have a two dimensional space where I measure a numerical value in two situations at different points. I have measured the change and I would like to test if there are areas in this 2D-space where there is a different amount of change (no change, increase, decrease). I don´t know if it´s better to analyse the data just with the coordinates or if its better to group them in "pixels" (and obtain the mean value for each pixel) and then run the cluster analysis. I would like to know if there is a package/function that allows me to do these calculations.I would also like to know if it could be done in a 3D space (I have collapsed the data to 2D because I don´t have many points. Thanks in advance J Toledo [[alternative HTML version deleted]]
Mike Marchywka
2011-Mar-17 19:20 UTC
[R] Spatial cluster analysis of continous outcome variable
Did you post your data or hypothetical data? Usually that helps make your problem more clear and more interesting ( likely to get a useful response to your post). ---------------------------------------- From: tintin_jb at hotmail.com To: r-help at r-project.org Date: Thu, 17 Mar 2011 17:38:14 +0100 Subject: [R] Spatial cluster analysis of continous outcome variable Dear R Users, R Core Team, I have a two dimensional space where I measure a numerical value in two situations at different points. I have measured the change and I would like to test if there are areas in this 2D-space where there is a different amount of change (no change, increase, decrease). I don?t know if it?s better to analyse the data just with the coordinates or if its better to group them in "pixels" (and obtain the mean value for each pixel) and then run the cluster analysis. I would like to know if there is a package/function that allows me to do these calculations.I would also like to know if it could be done in a 3D space (I have collapsed the data to 2D because I don?t have many points. Thanks in advance J Toledo [[alternative HTML version deleted]]
Jon Toledo
2011-Mar-17 20:11 UTC
[R] Spatial cluster analysis of continous outcome variable
I attach the data (csv format). There are the 3 coordinates, (but as there are not so many points I wanted two do 3 analysis in each of them collapsing one variable).There are two variables to study I have posted the data as a ratio between both states and as a percentage state between both states. The data are from different samples (and each sample has 3 or 6 measures).Thanks again.> From: marchywka at hotmail.com > To: tintin_jb at hotmail.com; r-help at r-project.org > Subject: RE: [R] Spatial cluster analysis of continous outcome variable > Date: Thu, 17 Mar 2011 15:20:09 -0400 > > > > > > > > > Did you post your data or hypothetical data? > Usually that helps make your problem more clear and more interesting > ( likely to get a useful response to your post). > > > > ---------------------------------------- > From: tintin_jb at hotmail.com > To: r-help at r-project.org > Date: Thu, 17 Mar 2011 17:38:14 +0100 > Subject: [R] Spatial cluster analysis of continous outcome variable > > > > Dear R Users, R Core > Team, > I have a two dimensional space where I measure a numerical value in two situations at different points. I have measured the change and I would like to test if there are areas in this 2D-space where there is a different amount of change (no change, increase, decrease). I don?t know if it?s better to analyse the data just with the coordinates or if its better to group them in "pixels" (and obtain the mean value for each pixel) and then run the cluster analysis. I would like to know if there is a package/function that allows me to do these calculations.I would also like to know if it could be done in a 3D space (I have collapsed the data to 2D because I don?t have many points. > Thanks in advance > > > > > > J Toledo > [[alternative HTML version deleted]] > >
Jon Toledo
2011-Mar-18 02:45 UTC
[R] Spatial cluster analysis of continous outcome variable
I read it but it said PDF file and Ps, didn´t specify which other files, so I attached a csv file, which I thought would work.I have uploaded the file in rapidhare (second option was putting on the web):http://rapidshare.com/files/453101614/Coordinates_and_values.csv Hope this works.Thanks for your interest.> From: dwinsemius@comcast.net > To: tintin_jb@hotmail.com > Subject: Re: [R] Spatial cluster analysis of continous outcome variable > Date: Thu, 17 Mar 2011 22:12:01 -0400 > > No data came through. You probably didn't read the Posting Guide or if > you did you didn't read it closely enough. > > -- > David. > On Mar 17, 2011, at 4:11 PM, Jon Toledo wrote: > > > > > I attach the data (csv format). There are the 3 coordinates, (but as > > there are not so many points I wanted two do 3 analysis in each of > > them collapsing one variable).There are two variables to study I > > have posted the data as a ratio between both states and as a > > percentage state between both states. The data are from different > > samples (and each sample has 3 or 6 measures).Thanks again. > > > >> From: marchywka@hotmail.com > >> To: tintin_jb@hotmail.com; r-help@r-project.org > >> Subject: RE: [R] Spatial cluster analysis of continous outcome > >> variable > >> Date: Thu, 17 Mar 2011 15:20:09 -0400 > >> > >> Did you post your data or hypothetical data? > >> Usually that helps make your problem more clear and more interesting > >> ( likely to get a useful response to your post). > >> > >> > >> > >> ---------------------------------------- > >> From: tintin_jb@hotmail.com > >> To: r-help@r-project.org > >> Date: Thu, 17 Mar 2011 17:38:14 +0100 > >> Subject: [R] Spatial cluster analysis of continous outcome variable > >> > >> > >> > >> Dear R Users, R Core > >> Team, > >> I have a two dimensional space where I measure a numerical value in > >> two situations at different points. I have measured the change and > >> I would like to test if there are areas in this 2D-space where > >> there is a different amount of change (no change, increase, > >> decrease). I don´t know if it´s better to analyse the data just > >> with the coordinates or if its better to group them in > >> "pixels" (and obtain the mean value for each pixel) and then run > >> the cluster analysis. I would like to know if there is a package/ > >> function that allows me to do these calculations.I would also like > >> to know if it could be done in a 3D space (I have collapsed the > >> data to 2D because I don´t have many points. > >> Thanks in advance > >> > >> > >> > >> > >> > >> J Toledo > >> [[alternative HTML version deleted]][[alternative HTML version deleted]]
Hi everyone, Is there any command to identify the pattern of responses of a database with this format: year id 2008 1 2009 1 2008 2 2009 2 2008 3 2009 3 2008 4 2009 4 2010 4 I just need the frequency of the patterns grouped by id: 2008 2009 2010 = 80 2009 2010 = 30 2008 2009 = 10 and so on.... Thank you in advance! -- Sebasti?n Daza sebastian.daza at gmail.com
Finally, I solved my problem using the following procedure and a database called ej ej$a <- 1 head(ej) ano nunico a 1 2008 1 1 2 2009 1 1 3 2008 2 1 4 2009 2 1 5 2008 3 1 6 2009 3 1 library(reshape) dej <- cast(ej, nunico ~ ano, sum, margins = FALSE) head(dej) nunico 2008 2009 2010 1 1 1 1 0 2 2 1 1 0 3 3 1 1 0 4 4 1 1 1 5 5 1 0 1 6 6 1 1 1 dej[dej==0] <- NA library(Hmisc) na.pattern(dej[,c(2:4)]) pattern 000 001 010 011 110 3385 1073 203 338 573 That way I can review the pattern of my panel data. Sebastian
Apparently Analagous Threads
- Latent Profile Analysis Package?
- Trying to extract probabilities in CARET (caret) package with a glmStepAIC model
- Repating a loop of lm function with different columns of database
- Semi continous variable- define bounds using lpsolve
- Re gression using age and Duration of disease as a continous factors