[R] Very high Nagelkerke’s Pseudo-R2 values

2013-09-17 Thread Simone Santoro
Hi all, I have a data set made of 12 years each one with a number of males and a number of females. I tested the relationship between the sex ratio (proportion of males over the total) weighted for the number of individuals of each year. In R: glm.1<-glm(cbind(males,females)~predictor,bino

[R] Bootstrap encounter histories data

2013-03-14 Thread Simone Santoro
Hi all, I am working with a capture-recapture analyses and my data set consists of a typical set of encounter histories. Thus, for each individual I have a string (same length for all the individuals) consisting of 0 (not seen) and other numbers (seen in state "1", seen in state "2", etc. where

[R] comparing mixed binomial model against the same model without random effect

2011-09-22 Thread Simone Santoro
Hi everybody, If I am correct, you can compare a model with random effect with the same model without the random effect by using the nlme function, like this: no.random.model <- gls(Richness ~ NAP * fExp, method = "REML", data = RIKZ) random.model <- lme(Richness ~NAP * fExp, data

[R] GLM and normality of predictors

2011-04-15 Thread Simone Santoro
Hi, I have found quite a few posts on normality checking of response variables, but I am still in doubt about that. As it is easy to understand I'm not a statistician so be patient please. I want to estimate the possible effects of some predictors on my response variable that is nº of males an

[R] add my own calculated conficence interval to a plot

2011-03-28 Thread Simone Santoro
Hi, I have a data frame like this: var1=years var2=Sex ratio (0https://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] chisq.test and cbind

2011-03-13 Thread Simone Santoro
Hi, This is a mixed conceptual/methodological issue. I have 3 years and 2 localities, I want to compare the Sex Ratio series between the two localities. I can do it year by year, for instance: > SR2010<-data.frame(FAO=c(96,52),JUNC=c(60,42)) > SR2010 FAO JUNC 1 96 60 2 52 42 >

[R] Problems replacing empty cells with NA values

2011-01-28 Thread Simone Santoro
Hi, I am preparing a quite huge database in Excel, I replaced the empty cells with "NA", I formatted it like text, and saved the file like a *.txt. After, in R: data<-read.table("myfile.txt",header=T,sep="\t") edit(data) When doing this I can see that some columns are OK and they have NA cells

[R] time series analys by resting the effect of a covariate

2010-01-12 Thread Simone Santoro
Hi, Does anyone know a way to estimate the existence of a temporal trend (each unit of the sample is a count) by resting the possible effect of a covariate (i.e. climatic factor)? I have periodical counts of several species of waterbirds during the last 13 years and I want to know if, resting

[R] FW: problems in resampling time series, block length, trend.test

2009-07-15 Thread Simone Santoro
Hi, I have a time series (say "x") of 13 years showing an evident increase. I want to exclude two observations (the fourth and 10th), so I do: > trend.test(x[-c(4,10)]) where: > x[-c(4,10)] [1]7 37 79 72 197 385 636 705 700 1500 1900 and I get: Spearman's rank corre

[R] problems in resampling time series, block length, trend.test

2009-07-15 Thread Simone Santoro
Hi, I have a time series (say "x") of 13 years showing an evident increase. I want to exclude two observations (the fourth and 10th), so I do: > trend.test(x[-c(4,10)]) where: > x[-c(4,10)] [1]7 37 79 72 197 385 636 705 700 1500 1900 and I get: Spearman's rank correlatio

Re: [R] generalized linear model (glm) and "stepAIC"

2009-07-11 Thread Simone Santoro
d > if you are a beginner. You are right on the edge of having too little > data for what you want to do (the rule of thumb is that you should > have at least 10-20 responses per predictor), and stepwise regression is > known > to inflate p-values (see e.g. Whittingham e

[R] generalized linear model (glm) and "stepAIC"

2009-07-10 Thread Simone Santoro
Hi, I'm a very new user of R and I hope not to be too "basic" (I tried to find the answer to my questions by other ways but I was not able to). I have 12 response variables (species growth rates) and two environmental factors that I want to test to find out a possible relation. The sample s