similar to: Poisson and negbin gamm in mgcv - overdispersion and theta

Displaying 20 results from an estimated 300 matches similar to: "Poisson and negbin gamm in mgcv - overdispersion and theta"

2012 Aug 22
0
pseudo-additive seasonal decomposition
Dear All, Would anyone happen to have tips on how to do a pseudo-additive seasonal decomposition in R? I am working on a ca. 20 year monthly time series on species abundance data, with annual peaks of varying magnitude and zero abundances between the seasonal occurrences. I have tried to use the package "x12", which utilizes x12arima, but without luck so far. More specifically, I am
2012 Jun 11
0
gamm (mgcv) interaction with linear term
Hello, I am trying to fit a gamm (package mgcv) model with a smooth term, a linear term, and an interaction between the two. The reason I am using gamm rather than gam is that there are repeated measures in time (which is the smooth term x1), so I am including an AR1 autocorrelation term. The model I have so far ended up with is of the type gamm(y ~ s(x1) + s(x1, by=x2), correlation =
2012 Dec 07
1
Negative Binomial GAMM - theta values and convergence
Hi there, My question is about the 'theta' parameter in specification of a NB GAMM. I have fit a GAM with an optimum structure of: SB.gam4<-gam(count~offset(vol_offset)+ s(Depth_m, by=StnF, bs="cs")+StageF*RegionF, family=negbin(1, link=log), data=Zoop_2011[Zoop_2011$SpeciesF=='SB',]) However, this GAM shows heterogeneity in the
2017 Dec 07
2
parallel computing with foreach()
I have used foreach() for parallel computing but in the current problem, it is not working. Given the volume and type of the data involved in the analysis, I will try to give below the complete code without reproducible example. In short, each R environment will draw a set of separate files, perform the analysis and dump in separate folders. splist <- c("juoc", "juos",
2017 Dec 07
0
parallel computing with foreach()
Your code generates an error that has nothing to do with dopar. I have no idea what your function stack is supposed to do; you may be inadvertently calling utils::stack which would produce this kind of error: > stack(1:25, RAT = FALSE) Error in data.frame(values = unlist(unname(x)), ind, stringsAsFactors = FALSE) : arguments imply differing number of rows: 25, 0 HTH, Peter On Wed, Dec 6,
2005 Nov 08
1
Poisson/negbin followed by jackknife
Folks, Thanks for the help with the hier.part analysis. All the problems stemmed from an import problem which was solved with file.chose(). Now that I have the variables that I'd like to use I need to run some GLM models. I think I have that part under control but I'd like to use a jackknife approach to model validation (I was using a hold out sample but this seems to have fallen out
2009 Oct 15
2
When modeling with negbin from the aod package...
Hi, When modeling with negbin from the aod package, parameters for a given count y | lambda~Poisson(lambda) with lambda following a Gamma distribution Gamma(r, theta) are estimated. The intercept is called phi. Some other parameters may be also be estimated from factors in the data: the estimates returned for all these would be in accordance with the Value listing in the negbin entry in the aod
2008 Jul 01
1
Help in using PCR
Hi, Currently I have a dataset of 2400*408. And I would like to apply PCR method to study the any correlation between the tests. My current data is in data.frame and I have formed horizontal(1-407) to be the exact data, and (408) to be my results data(Yes and No) I have also binarized these Yes and No to 1 and -1s. However, when I refer to PCR manual on R, the example of yarn.pcr <-
2009 Dec 30
2
Negbin Error Warnings
Hi, I ran a negative binomial regression (NBR) using the Zelig-package and the negbin model. When I then try to use the simumlation approach using the setx () and sim() functions to calculate expected values and first difference for different levels of one of my independent variables, I get 50 errors warnings, telling me that the calculation rpois produced NAs. However, the data I use
2011 Oct 26
2
gam predictions with negbin model
Hi, I wonder if predict.gam is supposed to work with family=negbin() definition? It seems to me that the values returned by type="response" are far off the observed values. Here is an example output from the negbin examples: > set.seed(3) > n<-400 > dat<-gamSim(1,n=n) > g<-exp(dat$f/5) > dat$y<-rnbinom(g,size=3,mu=g) >
2000 Mar 21
1
summary.negbin broken in R-1.0.0, VR_6.1-7
Dear R people, I am not sure if this is the correct place to tell about problems in evolving programmes, but it seems that the `summary.negbin' function of the excellent `MASS' library is now broken, and gives the following error message: > summary(hm) Error in summary.negbin(hm) : subscript out of bounds `summary.negbin' calls `summary.glm' which seems to work and give the
2007 Dec 12
1
Defining the "random" term in function "negbin" of AOD package
I have tried glm.nb in the MASS package, but many models (I have 250 models with different combinations of predictors for fish counts data) either fail to converge or even diverge. I'm attempting to use the negbin function in the AOD package, but am unsure what to use for the "random" term, which is supposed to provide a right hand formula for the overdispersion parameter.
2009 Jun 17
1
Specifying ui and ci such that ui %*% theta - ci >= 0
Hi, I am a bit stuck on specifying ui and ci. I have read Lange's book ((1999) Numerical Analysis for Statisticians) to his approach and unfortunately his descriptions were not helpful for me. Here is what I have: ui <- rbind(c(0, -1, 0), c(0, 0, -1)) ci <- c(0, -1, -1)) theta <- c(0.5, 0.5, 0.1) My goal is to feed these into constrOptim
2009 Aug 31
2
How to extract the theta values from coxph frailty models
Hello, I am working on the frailty model using coxph functions. I am running some simulations and want to store the variance of frailty (theta) values from each simulation result. Can anyone help me how to extract the theta values from the results. I appreciate any help. Thanks Shankar Viswanathan
2006 Aug 10
0
Negatie Binomial Regression: "Warning while fitting theta: alternation limit reached"
I am fitting a negative binomial regression model to some count data. I chose the negative binomial b/c the variance is greater than the mean. Anyways, when I fit the model I get the following warning: "Warning while fitting theta: alternation limit reached" The estimate that I end up with is very large (1070), and the standard error is even larger (1276). Does this indicate that I
2006 Sep 22
0
$theta of frailty in coxph
Dear all, Does the frailty.object$history[[1]]$theta returns the Variance of random effect? Why is the value different? Here is an example with kidney data: > library(survival) > data(kidney) > frailty.object<-coxph(Surv(time, status)~ age + sex + disease + frailty(id), kidney) > frailty.object Call: coxph(formula = Surv(time, status) ~ age + sex + disease + frailty(id), data
2005 Dec 05
1
Lack of 'LEFT JOIN' in Oracle 8, any patch for theta style (+)
Dears, Oracle 8 don''t support ANSI syntax with : SELECT e.emp_id, e.fname, e.lname, j.jobdesc FROM employe e LEFT JOIN jobs j ON e.job_id = j.job_id but only SELECT e.emp_id, e.fname, e.lname, j.jobdesc FROM employe e, jobs j WHERE j.job_id (+) = e.job_id JOIN syntax came with 9i. Anyone patched Rails
2007 Nov 18
2
Getting theta in italic in a plot
Dear All, Consider the following code: plot(0,0) text(0,0.5,expression(italic(theta))) I would like to get theta in italic, but I always get it upright. Any suggestions? Thanks in advance, Paul
2010 Mar 20
0
Getting a complete vector of Theta estimates from Package LTM
I am using package LTM to estimate a Rasch model: irtestimates <- rasch(binRasch) I want to get a single vector containing theta estimates for all the rows (individuals) in my data matrix (hopefully in the same order as my data matrix) such that the length of the theta vector = the number of rows (participants) in my data matrix. I am using: theta.est <-
2013 Sep 09
1
theta parameter - plm package
Hi all, what indicates the parameter theta in the summary of a random effect panel model estimated with the plm function? example: data("Produc", package = "plm") zz <- plm(log(gsp) ~ log(pcap) + log(pc) + log(emp) + unemp, model="random", data = Produc, index = c("state","year")) summary(zz) Effects: var std.dev