[R] Plotting Rickers curve in R with confidence intervals

2012-03-18 Thread kyoung
Hello, I am both new to this forum and to R.  Therefore apologies if I am
posting a request for help for something overly simple and/or that has
already been covered in past posts.  I would really appreciate some simple
and straightforward help on how to plot a Rickers growth curve with
confidence intervals and to determine r and K.  My data is in the very
simple form of year and population size.  I would like to know how to get
these curve parameters in graphical form and as numerical outputs.  If
someone can help me with some really simple script from start to finish I
would be so appreciative. Thank so much in advance

 

--
View this message in context: 
http://r.789695.n4.nabble.com/Plotting-Rickers-curve-in-R-with-confidence-intervals-tp4483757p4483757.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] logLik calculations

2008-03-20 Thread kyoung
Does the “logLik” function applied to a  “glm” and “glm.nb” (from MASS
package) calculate the complete log-likelihoods, or does it drop the
constant terms of the equation? (It’s not clear from the associated help
pages, and I’ve found no reference from searching the R help mailing list)

Thank you,
Kelly Young

__
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] using "logLik" with AIC to compare models with different error

2008-03-04 Thread kyoung
Hi there, I’d like to use AIC to compare between models with different
error distributions (eg: Dick 2004, Sileshi 2004, Burnham and Anderson
2002), namely a normal, Poisson and negative binomial.  I realize there
are differing views whether this is valid or not from reading past R help
postings; however, for my purpose I think AIC is more appropriate rather
than something such as a Chi-sq or G-statistic as I don’t need to know
whether the fit is statistically significant or not, rather I want to know
which model is the best given my data.

The data I’m working on are counts per station (7 stations in total for
each model), and originally I used a simplistic glm model:

Model.p<-glm(count~station,poisson)
Model.n<-glm(count~station,gaussian)

And from the MASS package (v 7.2-30)

Model.nb<-glm.nb(count~station)

I then extracted the log-likelihood using “logLik(model)”, from which I
calculated AIC (by hand).  However, after reviewing more of the R help
postings and associated help pages for the functions, I have the following
questions:

1- the “glm” function doesn’t use MLE to fit the model, so is the
associated “logLik” extracted valid?

2- If it is valid, does it calculate the full likelihood, or are the
constants dropped? (this is not clear in the ?glm or ?loglik files)

3- if neither are valid, are there alternatives? For example, I’ve seen
that the MASS package also has a “fit.distr” function with an associated
“logLik” method, but can I use the log-likelihood extracted using this
method to calculate AIC and compare between distributions (in the manner
that I want using the “glm” function)?  if so, are the log-likelihood
given complete or have the constants been dropped?

Any help and suggestions would be appreciated!


Kelly Young
[EMAIL PROTECTED]
M.Sc Candidate, Dept. Biology
Fisheries Oceanography Research Lab
University of Victoria
.·.><°>

__
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.