Re: [R] Represent point size according to frequency
thank you, that looks good -- View this message in context: http://r.789695.n4.nabble.com/Represent-point-size-according-to-frequency-tp4646976p4647049.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] Represent point size according to frequency
Thank you for your comment. I would be very interested, but I did not know about jitter. Would you have a small example? -- View this message in context: http://r.789695.n4.nabble.com/Represent-point-size-according-to-frequency-tp4646976p4647023.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] Represent point size according to frequency
Thank you very much. I managed to do it with a similar approach and it looks like what I expected. -- View this message in context: http://r.789695.n4.nabble.com/Represent-point-size-according-to-frequency-tp4646976p4647022.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] Represent point size according to frequency
Hello! I would like to make a scatterplot of my data, but the problem is that several points have the same x and y values and are represented as only one point. I wonder if there is a way to represent the data points, but with point size representing the frequency of the depicted x-y value? Thank you! -- View this message in context: http://r.789695.n4.nabble.com/Represent-point-size-according-to-frequency-tp4646976.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] Assessing overdispersion and using quasi model with lmer, possible?
thank you very much -- View this message in context: http://r.789695.n4.nabble.com/Assessing-overdispersion-and-using-quasi-model-with-lmer-possible-tp4646626p4646967.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] Assessing overdispersion and using quasi model with lmer, possible?
Hello! I am trying to model data on species abundance (count data) with a poisson error distribution. I have a fixed and a random variables and thus needs a mixed model. I strongly doubt that my model is overdispersed but I don't know how to get the overdispersion parameter in a mixed model. Maybe someone can help me on this point. Secondly, it seems that quasi models cannot be implemented with the function lmer, is there an option? If not, I certainly should go to variable transformation and use a gaussian error distribution, but it is not optimal. Thank you! -- View this message in context: http://r.789695.n4.nabble.com/Assessing-overdispersion-and-using-quasi-model-with-lmer-possible-tp4646626.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] function logit() vs logistic regression
Thank you very much for replies and the nice explanation about variance stabilization. I heard about the arcsin transformation, but some recent papers were very critical about it (i.e., Warton & Hui, 2011), so that I would better try another way. I will have a look at beta regression. Best, V. -- View this message in context: http://r.789695.n4.nabble.com/function-logit-vs-logistic-regression-tp4646498p4646582.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] function logit() vs logistic regression
Hello! When I am analyzing proportion data, I usually apply logistic regression using a glm model with binomial family. For example: m <- glm( cbind("not realized", "realized") ~ v1 + v2 , family="binomial") However, sometimes I don't have the number of cases (realized, not realized), but only the proportion and thus cannot compute the binomial model. I just found out that the package car contains a function "logit" which allows for logit transformation. Would it be possible to transform the proportion data with this function and analyze the transformed data with a glm with family="gaussian"? Thank you very much -- View this message in context: http://r.789695.n4.nabble.com/function-logit-vs-logistic-regression-tp4646498.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] Problem with lmer and fixef
Thank you very much. I started R again and loaded less libraries and it worked! I didn't know about this problem, the next time, I'll check for this before looking a whole afternoon for alternative methods ;). -- View this message in context: http://r.789695.n4.nabble.com/Problem-with-lmer-and-fixef-tp4551816p4552053.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] Problem with lmer and fixef
Hello, I am trying to do contrasts after applying a binomial mixed effect model with the function lmer. I have to extract the fix effect values, but as I write fixef(model), I get this error message: Error in UseMethod("fixef") : no method for 'fixef' with objects of class "mer" Has anybody some ideas why? And how can I then post-hoc testing my data if I cannot do the contrasts? Thank you very much -- View this message in context: http://r.789695.n4.nabble.com/Problem-with-lmer-and-fixef-tp4551816p4551816.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] testing for temperature differences between years and sites?
Thank you very much! This is the kind of plot I tried to do. For the statistical models, I am a bit confused between which factors to put as fixed or random effects. I will have a look at time series models as you suggested. swertie -- View this message in context: http://r.789695.n4.nabble.com/testing-for-temperature-differences-between-years-and-sites-tp4344311p4347278.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] testing for temperature differences between years and sites?
Hello! I have a dataset with monthly temperatures for 4 different years and I would like to test if they are significantly different between the years. As I collected the data for different sites I wondered if there were some possibility to perform the calculation at once or if I have to repeat it for each site. I tried like this: Model_Temp <- lmer(Temp ~Year + (1|Site)+(1|Month),na.action=na.omit, data= MeanTemp) But I am not sure at all if it is correct to put the sites as random factors or if I have to do the calculation for each site separately. I am not interested in correlation between sites, but only between years for each different site. Alternatively, can you indicate me some way to plot this? Thank you very much -- View this message in context: http://r.789695.n4.nabble.com/testing-for-temperature-differences-between-years-and-sites-tp4344311p4344311.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] customizing names in an ordination biplot
Hello, I would like to change the names of the sites in an ordination biplot (resulting from the function "rda" in vegan). Can somebody give me some trick? Thank you very much -- View this message in context: http://r.789695.n4.nabble.com/customizing-names-in-an-ordination-biplot-tp3260004p3260004.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] Mantel test
oh yes of course. It is quite simple. I have two presence/absence matrices (one for plants, one for butterflies) and I would like to test if the butterfly community similarities is correlated with the plant community similarities. The think is also that I don't really see the purpose of doing a PCA, that's why I would have make the Mantel test directly from the distance matrices Tal Galili wrote: > > Hi swertie , > Could you please add more details ? > What field are you at, some links maybe ? > > Thanks, > Tal > > > > > > On Mon, Sep 14, 2009 at 8:30 PM, swertie wrote: > >> >> Hello! It is not really linked to R, but can somebody explain me why we >> sometimes make a mantel test directly for to distance matrices and >> sometimes >> we first make a gradient analysis and then a mantel test between the >> axis? >> Thank you >> -- >> View this message in context: >> http://www.nabble.com/Mantel-test-tp25439984p25439984.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. >> > > > > -- > -- > > > My contact information: > Tal Galili > Phone number: 972-50-3373767 > FaceBook: Tal Galili > My Blogs: > http://www.r-statistics.com/ > http://www.talgalili.com > http://www.biostatistics.co.il > > [[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. > > -- View this message in context: http://www.nabble.com/Mantel-test-tp25439984p25448834.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] Mantel test
Hello! It is not really linked to R, but can somebody explain me why we sometimes make a mantel test directly for to distance matrices and sometimes we first make a gradient analysis and then a mantel test between the axis? Thank you -- View this message in context: http://www.nabble.com/Mantel-test-tp25439984p25439984.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] Mantel test least square line
Thank you it is what I was looking for. -- View this message in context: http://www.nabble.com/Mantel-test-least-square-line-tp25235402p25401329.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] Confusion metaMDS and CA
Thank you very much for those useful informations. I've been reading some papers and actually different people will use different ordination methods also if the studies are very alike. So I will keep metaMDS for the moment and see if my results are interpretable :) -- View this message in context: http://www.nabble.com/Confusion-metaMDS-and-CA-tp25274426p25295956.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] Confusion metaMDS and CA
Thank you very much. I am just concerned because I wonder if I used the best method. I have presence/absence data. With isoMDS I can specify "Bray-Curtis" distance method, which is adequate, but I was not sure of the method used by metaMDS. I think that it is Euclidian distance. Can I use it for presence/absence data? Gavin Simpson wrote: > > On Thu, 2009-09-03 at 04:49 -0700, swertie wrote: >> Hello, I read a lot about ordination, but I am still confused... I have >> data >> on species presence/absence for 8 different sites and I would like to >> represent my species and the sites on an ordination plot to see if some >> species are associated with specific sites. I used metaMDS function, >> which >> displays both sites and species and it seems to work well. However why >> are >> most people using CA instead of non metric multidimensional scaling? >> Thank >> you > > Inertia ;-) > > It's what they were taught, because that's what their supervisors were > taught etc. > > CA has a long history within ecological circles and most people will be > familiar with it. > > nMDS is an iterative algorithm that may nor may not converge to "the" > solution. There may not be "one" solution but rather many equally good > ones. It takes a lot more effort (well, if you are outside of R) to run > nMDS properly and check you're not converging to a local solution. > > There are lots of reasons. Why are interested in this; are you concerned > you've done something wrong or inappropriate with your data? > > HTH > > G > > -- > %~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~% > Dr. Gavin Simpson [t] +44 (0)20 7679 0522 > ECRC, UCL Geography, [f] +44 (0)20 7679 0565 > Pearson Building, [e] gavin.simpsonATNOSPAMucl.ac.uk > Gower Street, London [w] http://www.ucl.ac.uk/~ucfagls/ > UK. WC1E 6BT. [w] http://www.freshwaters.org.uk > %~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~% > > __ > 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. > > -- View this message in context: http://www.nabble.com/Confusion-metaMDS-and-CA-tp25274426p25292096.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] Confusion metaMDS and CA
Hello, I read a lot about ordination, but I am still confused... I have data on species presence/absence for 8 different sites and I would like to represent my species and the sites on an ordination plot to see if some species are associated with specific sites. I used metaMDS function, which displays both sites and species and it seems to work well. However why are most people using CA instead of non metric multidimensional scaling? Thank you -- View this message in context: http://www.nabble.com/Confusion-metaMDS-and-CA-tp25274426p25274426.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] Date format in plot
As suggested in the article R News 4/1, I used as.Date(as.character(Phenology_VE$Date), "%Y-%m-%d"), however this function returns me only "NA" values as.Date(as.character(Phenology_VE$Date), "%Y-%m-%d") [1] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA [26] NA NA NA NA NA NA NA NA NA NA The date corresponding to 39939 is really 06.05.2009, so it doesn't match R format. I tried to use names(Date)<-c("06.05","07.05","11.05","19.05","20.05","22.05","23.05","24.05","28.05","29.05","31.05","03.06","04.06","09.06","10.06","12.06","14.06","17.06","24.06","29.06","30.06","01.07","26.07","27.07","29.07","04.08","05.08","12.08","13.08","14.08","17.08","18.08","19.08","27.08","28.08") plot(Date, Phenology_VE[,3], ylim=range(0, 16), main=names(Phenology_VE[3]),xaxt="n", yaxt="n") axis(1, labels=names(Date), at=Date) It works more or less, but I don't get regular intervals, but a thick for each date. Do you have any idea how I could represent only some dates? Thank you -- View this message in context: http://www.nabble.com/Date-format-in-plot-tp25244066p25252150.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] Date format in plot
Hello, I plot the abundance of a species in relation to the date. To have the date as a continous variable I put it in the format "standard" in excel (f.ex. 39939 means 06.05.2009). R uses 39939 on the x axis, but I would like to have "06.05". I tried to use as.Date as suggested in some discussion but I don't manage to use it, the returned date is not correct. Do you have any clue? thank you -- View this message in context: http://www.nabble.com/Date-format-in-plot-tp25244066p25244066.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] Exclude 0 values from plot
Thank you it worked well -- View this message in context: http://www.nabble.com/Exclude-0-values-from-plot-tp25235290p25244045.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] Mantel test least square line
Hello, I performed a Mantel test and plotted communitiy similarities. I would like to add a least square line. I thought about using abline taking as slope the r-statistic of the Mantel test and calculating the y-intercept analytically. Is this method correct? Is there any function for this calculation? Thank you -- View this message in context: http://www.nabble.com/Mantel-test-least-square-line-tp25235402p25235402.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] Exclude 0 values from plot
Hello, I have a matrix of species abundance with a lot of 0 values. I would like to plot the species abundance vs date, but I don't want that the 0 values appear as points on my graph. Do you know how I could represent only non-0 values? Thank you very much -- View this message in context: http://www.nabble.com/Exclude-0-values-from-plot-tp25235290p25235290.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] Plot several graphs in the same window
Thank you very much it works well. Henrique Dallazuanna wrote: > > Try this: > > par(mfrow = c(8,5), mar = c(1, 1, 1, 1)) > replicate(40, plot(10)) > > On Mon, Aug 31, 2009 at 4:39 PM, swertie wrote: > >> >> Hello, I would like to plot a large number of graphs (43) in a same >> window. >> I >> tried wit par(mfrow=c(8,5)), but when I give the code for the plots I >> receive a error message saying that the margins are to wide. Can someone >> help me? Is it possible to put so many graphs in a single window? Thank >> you >> -- >> View this message in context: >> http://www.nabble.com/Plot-several-graphs-in-the-same-window-tp25229263p25229263.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. >> > > > > -- > Henrique Dallazuanna > Curitiba-Paraná-Brasil > 25° 25' 40" S 49° 16' 22" O > > [[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. > > -- View this message in context: http://www.nabble.com/Plot-several-graphs-in-the-same-window-tp25229263p25235251.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] Plot several graphs in the same window
Hello, I would like to plot a large number of graphs (43) in a same window. I tried wit par(mfrow=c(8,5)), but when I give the code for the plots I receive a error message saying that the margins are to wide. Can someone help me? Is it possible to put so many graphs in a single window? Thank you -- View this message in context: http://www.nabble.com/Plot-several-graphs-in-the-same-window-tp25229263p25229263.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] Problem with nesting in lmer
Hello, I would like to run a model with nesting design in lmer but I always got the error message "Matrices must have same number of columns in rbind2(..1, r)". My model is: model_3R <- lmer(N~Bareground+Habitat_type_simple+Presence+(1|Region/Ref_lmer),family = "poisson") of course it doesn't say you a lot, but maybe you know about this error message. If I take the nested variable out, the model is running well. Thank you -- View this message in context: http://www.nabble.com/Problem-with-nesting-in-lmer-tp19757471p19757471.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.