Re: [R] GLM quasipoisson error

2009-10-06 Thread Alain Zuur
atorso wrote: Hello, I'm having an error when trying to fit the next GLM: model-glm(response ~ CLONE_M + CLONE_F + HATCHING +(CLONE_M*CLONE_F) + (CLONE_M*HATCHING) + (CLONE_F*HATCHING) + (CLONE_M*CLONE_F*HATCHING), family=quasipoisson) anova(model, test=Chi) I guess that

Re: [R] how to fit time varying coefficient regression model?

2009-10-06 Thread Alain Zuur
R_help Help wrote: Hi - I read through dse package manual a bit. I'm not quite certain how I can use it to estimate a time varying coefficient regression model? I might pick up an inappropriate package. Any suggestion would be greatly appreciated. Thank you. Just rewrite the linear

[R] Paper on data exploration

2009-11-16 Thread Alain Zuur
R users doing data analysis may be interested in the following paper: http://methodsblog.wordpress.com/2009/11/13/first-paper-now-online/?utm_source=feedburnerutm_medium=feedutm_campaign=Feed%3A+wordpress%2Fmethodsblog+(methods.blog) All data and R code is available. Alain -

Re: [R] Checking for normality and homogeneity of variance

2010-01-05 Thread Alain Zuur
Haiyang AI wrote: Dear all, I'm a beginner of R and I need to carry out some three-way mixed ANOVAs. Following examples at http://personality-project.org/r/r.anova.html, I managed to get the ANOVA part, but I don't know how can I check data normality and homogeneity of variance in R

Re: [R] Zinb for Non-interger data

2009-07-20 Thread Alain Zuur
distribution can be used? You would have to adjust all likelihood equations as Gamma doesn't allow for zeros. But perhaps another continuous distribution is more appropriate...depends on your data. Alain Zuur -- View this message in context: http://www.nabble.com/Zinb-for-Non-interger-data

Re: [R] Re gression for loop test HELP! URGENT!

2009-07-20 Thread Alain Zuur
Rbeginner wrote: Hi everyone! I'm new to R, and I've sent this message as a non-member, but since it's pretty urgent, I'm sending it again now I'm on the mailing list (Thanks Daniel for your suggestion nevertheless). I have calculated a regression in the form of M ~ D + O + S, and I

Re: [R] Re gression function lm() not giving proper results

2009-07-20 Thread Alain Zuur
Read the warning message! It has converted your variables into factors. Figure out why...and you will have solved the problem. Alain Zuur moumita wrote: * * Hi , Can anyone help me please with this problem?* * *CASE-I* all_raw_data_NAomitted is my data frame.It has columns

Re: [R] local regression using loess

2009-07-28 Thread Alain Zuur
cindy Guo wrote: Hi, All, I have a dataset with binary response ( 0 and 1) and some numerical covariates. I know I can use logistic regression to fit the data. But I want to consider more locally. So I am wondering how can I fit the data with 'loess' function in R? And what will be the

Re: [R] Multiple graphs

2009-07-28 Thread Alain Zuur
Data Analytics Corp. wrote: Hi, I wrote a simple master function, run(), that has inside six qplot functions. The goal is to type run() and have all six graphs appear as separate windows so that I can copy them into PowerPoint for a client. When I type run(), only the last graph

Re: [R] creating subsets within lm()

2009-07-30 Thread Alain Zuur
: lm(blah blah, data=explaining.data[, pick your columns]) Alain Zuur - Dr. Alain F. Zuur First author of: 1. Analysing Ecological Data (2007). Zuur, AF, Ieno, EN and Smith, GM. Springer. 680 p. 2. Mixed effects models

Re: [R] Adding picture to graph?

2009-07-30 Thread Alain Zuur
the optimal the size of the jpg. R didn't like to use the original 5Mb jpg file. So..I had to reduce it size. Alain Zuur - Dr. Alain F. Zuur First author of: 1. Analysing Ecological Data (2007). Zuur, AF, Ieno, EN and Smith

Re: [R] Moving Average on Defined Intervals

2009-07-30 Thread Alain Zuur
Hadassa Brunschwig-2 wrote: Hi all I have been looking (in the help archives) for a function which does a moving average. Nothing new, I know. But I am looking for a function which is very flexible: The user should be able to input a vector of breaks which define the bins (and not just

Re: [R] R book for economists

2009-08-01 Thread Alain Zuur
Thiemo Fetzer wrote: Dear Group, I am an economics student starting with PhD work in London. As preparation I would like to get to know R a little bit better. For Stata there are tons of books, however, can you recommend a book for R? I have some substantiated econometrics

Re: [R] Compare lm() to glm(family=poisson)

2009-08-01 Thread Alain Zuur
Mark Na wrote: Dear R-helpers, I would like to compare the fit of two models, one of which I fit using lm() and the other using glm(family=poisson). The latter doesn't provide r-squared, so I wonder how to go about comparing these models (they have the same formula). Thanks very

Re: [R] generalized linear models

2009-08-09 Thread Alain Zuur
annie Zhang wrote: Hi, Milton, Thank you for the reply. I tried, but it seems the problem is the column name of the test data is not the same as the column name of the training data. I didn't give the column name, the system seemed do. How to chang here? Annie On Fri, Aug 7, 2009

Re: [R] lme, lmer, gls, and spatial autocorrelation

2009-08-25 Thread Alain Zuur
Ben Bolker wrote: My two cents: this is a hard problem to do, period (not just in R). I would second the recommendation of the Dormann et al paper listed below; also see Zuur, Alain F., Elena N. Ieno, Neil J. Walker, Anatoly A. Saveliev, and Graham M. Smith. Mixed Effects Models and

Re: [R] Using anova(f1, f2) to compare lmer models yields seemingly erroneous Chisq = 0, p = 1

2009-09-07 Thread Alain Zuur
rapton wrote: Hello, I am using R to analyze a large multilevel data set, using lmer() to model my data, and using anova() to compare the fit of various models. When I run two models, the output of each model is generated correctly as far as I can tell (e.g. summary(f1) and

Re: [R] Using anova(f1, f2) to compare lmer models yields seemingly erroneous Chisq = 0, p = 1

2009-09-07 Thread Alain Zuur
rapton wrote: Hello, I am using R to analyze a large multilevel data set, using lmer() to model my data, and using anova() to compare the fit of various models. When I run two models, the output of each model is generated correctly as far as I can tell (e.g. summary(f1) and

Re: [R] Dealing with heterogeneity with varComb weights

2009-09-17 Thread Alain Zuur
RS27 wrote: Hi, I am trying to add multiple variance structures such as the first example below: vf1 - varComb(varIdent(form = ~1|Sex), varPower()) However my code below will not work can anybody please advise me?

Re: [R] Predicted values for zero-inflated Poisson

2012-07-09 Thread Alain Zuur
Lee, Laura wrote Hi all- I fit a zero-inflated Poisson model to model bycatch rates using an offset term for effort. I need to apply the fitted model to a datasets of varying levels of effort to predict the associated levels of bycatch. I am seeking assistance as to the correct way to