Displaying 20 results from an estimated 500 matches similar to: "nls - can't get published AICc and parameters"
2011 Sep 04
2
AICc function with gls
Hi
I get the following error when I try and get the AICc for a gls regression
using qpcR:
> AICc(gls1)
Loading required package: nlme
Error in n/(n - p - 1) : 'n' is missing
My gls is like this:
> gls1
Generalized least squares fit by REML
Model: thercarnmax ~ therherbmax
Data: NULL
Log-restricted-likelihood: 2.328125
Coefficients:
(Intercept) therherbmax
1.6441405
2004 Sep 16
1
Newbie q. need some help understanding this code.
dear all.
Would someone be kind and willing to explain the code
below for a person who has never used R? ( that is if
one has enough time and inclination)
It implements gillepsie's stochastic algorithm for
Lotka Volterra model.
What would help me tremendously is to see the
breakdown of the line by line code into plain english.
thanks for any insights or other comments.
sean
2013 Apr 06
1
Plotting a curve for a Holling Type III Functional Response
Hey,
So I have a scatter plot and I am trying to plot a curve to fit the data
based on a Holling Type III functional response. My function is this:
nll2<-function(a,b) {
conefun<-(a*DBH^2)/(b^2+DBH^2)
nlls2<-dnbinom(x=cones ,size=DBH, mu=conefun,log=TRUE)
-sum(nlls)
}
and my plot is this:
plot (DBH,cones)
DBH is on the x-axis and cones is on the y-axis. How do I get the curve
2008 Dec 14
1
error with sqldf v0-1.4
I'm getting an error message when using the new version of sqldf,
> library(sqldf)
> str(kdv)
'data.frame': 71 obs. of 3 variables:
$ dpss: num 0.117 0.144 0.164 0.166 0.165 ...
$ npdp: num 0.1264 0.0325 0.0109 0.0033 0.0055 ...
$ logk: num 1.12 1.29 1.41 1.41 1.42 ...
> test=sqldf("select * from kdv")
Error in get("fun", env = this, inherits =
2011 Apr 29
1
Handling of irregular time series in lineChart
Hi,
I realized that when I have irregular series to feed into lineChart,
the interval of each point in the chart does not seem to take care of
irregular time interval I specified in my input xts time series. But
rather, lineChart seems to take each point as equal spaced time
series. For example, I have the following code:
library(quantmod)
options(digits.sec=3)
t0 <-
2024 Jul 16
2
Interpreting p values of gls in nlme
Dear all
I have undertaken some phylogenetic and non-phylogenetic regressions with
gls() in nlme with single preictor variables. A p value is associated with
the intercept (upper p value) and another with the predictor variable
(lower). Which p value is important? What does it mean if the intercept p
value is insignificant but the predictor is still significant?
Thanks a lot, and sorry for my
2012 Mar 14
1
Glm and user defined variance functions
Hi,
I am trying to run a generalized linear regression using a negative binomial
error distribution. However, I want to use an overdispersion parameter that
varies (dependent on the length of a stretch of road) so glm.nb will not do.
>From what I've read I should be able to do this using GLM by specifying my
own quasi family and describing the variance function using varfun, validmu,
2011 Apr 04
1
Clarks 2Dt function in R
Dear Ben,
you answerd to Nancy Shackelford about Clarks 2Dt function.
Since the thread ended just after your reply,
I would like to ask, if you have an idea how to use this function in R
I defined it the following way:
function(x , p, u) {
(p/(pi*u))*(1+(x^2/u))^(p+1)
}
and would like to fit this one to my obeservational data (count)
[,1] [,2]
[1,] 15 12
[2,] 45 13
[3,]
2009 Apr 29
2
AICc
I am fitting logistic regression models, by defining my own link
function, and would like to get AICc values. Using the glm command
gives a value for AIC, but I haven't been able to get R to convert
that to AICc. Is there a code that has already been written for
this? Right now I am just putting the AIC values into an excel
spreadsheet and calculating AICc, likelihood, and AIC
2017 Jun 08
1
stepAIC() that can use new extractAIC() function implementing AICc
I would like test AICc as a criteria for model selection for a glm using
stepAIC() from MASS package.
Based on various information available in WEB, stepAIC() use
extractAIC() to get the criteria used for model selection.
I have created a new extractAIC() function (and extractAIC.glm() and
extractAIC.lm() ones) that use a new parameter criteria that can be AIC,
BIC or AICc.
It works as
2005 Nov 03
1
Help on model selection using AICc
Hi,
I'm fitting poisson regression models to counts of birds in
1x1 km squares using several environmental variables as predictors.
I do this in a stepwise way, using the stepAIC function. However the
resulting models appear to be overparametrized, since too much
variables were included.
I would like to know if there is the possibility of fitting models
by steps but using the AICc
2006 Dec 12
1
Calculating AICc using conditional logistic regression
I have a case-control study that I'm analysing using the conditional
logistic regression function clogit from the survival package.
I would like to calculate the AICc of the models I fit using clogit.
I have a variety of scripts that can calculate AICc for models with a
logLik method, but clogit does not appear to use this method.
Is there a way I can calculate AICc from clogit in R?
Many
2014 Jun 26
0
AICc in MuMIn package
Hello,
I am modelling in glmmADMB count data (I´m using a negative binomial
distribution to avoid possitive overdispersion) with four fixed and one
random effect. I´m also using MuMIn package to calculate the AICc and also
to model averaging using the function dredge. What I do not understand is
why dredge calculates a different value of the AICc and degrees of freedom
than the function AICc
2004 Dec 04
1
AIC, AICc, and K
How can I extract K (number of parameters) from an AIC calculation, both to
report K itself and to calculate AICc? I'm aware of the conversion from AIC ->
AICc, where AICc = AIC + 2K(K+1)/(n-K-1), but not sure of how K is calculated
or how to extract that value from either an AIC or logLik calculation.
This is probably more of a basic statistics question than an R question, but I
thank
2004 Dec 17
0
behaviour of BIC and AICc code
Dear R-helpers
I have generated a suite of GLMs. To select the best model for each set, I am using the
meta-analysis approach of de Luna and Skouras (Scand J Statist 30:113-128). Simply
put, I am calculating AIC, AICc, BIC, etc., and then using whichever criterion
minimizes APE (Accumulated Prediction Error from cross-validations on all model sets)
to select models.
My problem arises where I
2010 Jul 14
1
Converting POSIXct vales to real values
I have a dataframe that contains time values in the form of yyyy-mm-dd hh:mm i.e. 2010-07-14 13:00. When I convert this to numeric via tvec <- as.numeric(Time) I get a number that is in seconds. So far so good. When I then divide the numeric value by the number of seconds in a day eg tvec/(60*60*24) I only get integer values and not fraction of a day which is what I want.
What do I need to
2006 Jul 12
2
AICc vs AIC for model selection
Hi,
I am using 'best.arima' function from forecast package to obtain point forecast for a time series data set. The documentation says it utilizes AIC value to select best ARIMA model. But in my case the sample size very small - 26 observations (demand data). Is it the right to use AIC value for model selection in this case. Should I use AICc instead of AIC. If so how can I modify
2005 Nov 02
1
model selection based on AICc
Dear members of the list,
I'm fitting poisson regression models using stepAIC that appear to
be overparametrized. I would like to know if there is the
possibility of fitting models by steps but using the AICc instead of
AIC.
Best wishes
German Lopez
2010 Sep 28
0
the arima()-function and AICc
Hi
I'm trying to fit arima models with the arima() function and I have two
questions.
######
##1. ##
######
I have n observations for my time series. Now, no matter what
arima(p,d,q)- model I fit, I always get n residuals. How is that possible?
For example: If I try this out myself on an AR(1) and calculate the
fitted values from the estimated coefficients I can calculate n-1
residuals.
2013 Apr 16
0
Model ranking (AICc, BIC, QIC) with coxme regression
Hi,
I'm actually trying to rank a set of candidate models with an information criterion (AICc, QIC, BIC). The problem I have is that I use mixed-effect cox regression only available with the package {coxme} (see the example below).
#Model1
>spring.cox <- coxme (Surv(start, stop, Real_rand) ~ strata(Paired)+R4+R3+R2+(R3|Individual), spring)
I've already found some explications in