similar to: Dispersion parameter in Neg Bin GLM

Displaying 20 results from an estimated 2000 matches similar to: "Dispersion parameter in Neg Bin GLM"

2005 Jun 30
1
RE : Dispersion parameter in Neg Bin GLM
Edward, you also can use the package aod on CRAN, see the help page of the function negbin. Best Matthieu An example: > library(aod) > data(dja) > negbin(y ~ group + offset(log(trisk)), ~group, dja, fixpar = list(4, 0)) Negative-binomial model ----------------------- negbin(formula = y ~ group + offset(log(trisk)), random = ~group, data = dja, fixpar = list(4, 0))
2008 Oct 15
1
Forecasting using ARIMAX
Dear R-helpers, I would appreicate if someone can help me on the transfer parameter in ARIMAX and also see what I am doing is correct. I am using ARIMAX with 2 Exogeneous Variables and 10 years data are as follows: DepVar Period, depVar, IndepVar1 Period, indepVar1, IndepVar2 Period, indepVar2 Jan 1998,708,Jan 1998,495,Jan 1998,245.490 Feb 1998,670,Feb 1998,421.25,Feb 1998,288.170 Mar
2010 Sep 12
1
R-equivalent Stata command: poisson or quasipoisson?
Hello R-help, According to a research article that covers the topic I'm analyzing, in Stata, a Poisson pseudo-maximum-likelihood (PPML) estimation can be obtained with the command poisson depvar_ij ln(indepvar1_ij) ln(indepvar2_ij) ... ln(indepvarN_ij), robust I looked up Stata help for the command, to understand syntax and such: www.stata.com/help.cgi?poisson Which simply says
2010 Jul 15
1
Longitudinal negative binomial regression - robust sandwich estimator standard errors
Hi All, I have a dataset, longitudinal in nature, each row is a 'visit' to a clinic, which has numerous data fields and a count variable for the number of 'events' that occurred since the previous visit. ~50k rows, ~2k unique subjects so ~25 rows/visits per subject, some have 50 some have 3 or 4. In STATA there is an adjustment for the fact that you have multiple rows per
2011 Dec 07
1
MIXED MODEL WITH REPEATED MEASURES
I am trying to specify a mixed model for my research, but I can't quite get it to work. I've spent several weeks looking thru various online sources to no avail. I can't find an example of someone trying to do precisely what I'm trying to do. I'm hoping some smart member of this mailing list may be able to help. First off, full disclosure: (1) I'm an engineer by trade, so
2011 Mar 13
2
Problem implementing 'waldtest' when using 'mlogit' package
Hi all, I have been working through the examples in one of the vignettes associated with the 'mlogit' package, 'Kenneth Train's exercises using the mlogit package for R.' In spite of using the code unchanged, as well as the data used in the examples, I have been unable to run a Wald test to test two models. Specifically, I have run the following command, where mc and mi2 are
2005 Jan 17
2
Omitting constant in ols() from Design
Hi! I need to run ols regressions with Huber-White sandwich estimators and the correponding standard errors, without an intercept. What I'm trying to do is create an ols object and then use the robcov() function, on the order of: f <- ols(depvar ~ ind1 + ind2, x=TRUE) robcov(f) However, when I go f <- ols(depvar ~ ind1 + ind2 -1, x=TRUE) I get the following error: Error in
2008 May 14
1
Negative Binomial Model
Hello, I am trying to run a negative binomial regression model in R and can't get the standard errors to match the output I get from the Stata nbreg command. I've tried a few different options but haven't had much luck. The closest I've found is: gamlss(formula, family = NBI, sigma.formula = ~ 1,data=dataframe) ...But this is still a little off most of the time and pretty far
2011 Oct 18
1
problem in exceuting PLS
Hi I'm performing a PLS This is my data present in a file Year Y X2 X3 X4 X5 X6 1960 27.8 397.5 42.2 50.7 78.3 65.8 1960 29.9 413.3 38.1 52 79.2 66.9 1961 29.8 439.2 40.3 54 79.2 67.8 1961 30.8 459.7 39.5 55.3 79.2 69.6 1962 31.2 492.9 37.3 54.7 77.4 68.7 My R-code Data <- read.csv("C:/TestData.csv") variable=names(Data)[4:8] dataset=NULL dataset$X=NULL len=length(variable)
2009 Sep 22
4
Evaluating expresssions as parameter values
I need to play games with an expression similar to the following one: print(xyplot(DepVar ~ Group|Covar, groups=Othergroup, data=mydf, pch = 18 ,main="Testcase",auto.key = TRUE)) The problem is that the formula argument (the first argument) an the groups argument are passed over from another program as strings. The formula argument does not pose problems, I can do
2018 Mar 25
1
Get Specific Records from Another DataFrame
Hello I have been struggling with this simple looking problem. I have two dataframes. The first one contains ID, date, and revenue information for specific suppliers. id lastdate depvar A 5/10/2017 10 B 8/16/2017 20 C 2/14/2017 30 D 9/5/2017 40 E 8/1/2017 50 F 11/4/2017 60 G 6/22/2017 70 The second dataframe contains timeseries data of each supplier in different columns. For example Column A are
2012 Aug 01
1
optim() for ordered logit model with parallel regression assumption
Dear R listers, I am learning the MLE utility optim() in R to program ordered logit models just as an exercise. See below I have three independent variables, x1, x2, and x3. Y is coded as ordinal from 1 to 4. Y is not yet a factor variable here. The ordered logit model satisfies the parallel regression assumption. The following codes can run through, but results were totally different from what I
2006 Nov 06
4
neg-bin clustered analysis in R?
Dear All, I'm analysing a negative binomial dataset from a population-based study. Many covariates were determined on household level, so all members of a household have the same value for those covariates. In STATA, there seems to be an option for 'clustered analysis' for neg-bin regression. Does an equivalent exist for R(MASS)'s glm.nb or a comparable function? Many thanks for
2012 Feb 17
2
Error message in gamm. Problem with temporal correlation structure
HELLO ALL, I AM GETTING AN ERROR MESSAGE WHEN TRYING TO RUN A GAMM MODEL LIKE THE ONE BELOW. I AM USING R VERSION 2.14.1 (2011-12-22) AND MGCV 1.7-12. M1 <-gamm(DepVar ~ Treatment + s(Year, by =Treatment), random=list(Block=~1), na.action=na.omit, data = mydata, correlation = corARMA(form =~ Year|Treatment, p = 1, q = 0)) THIS IS THE ERROR MESSAGE Error in `*tmp*`[[k]] : attempt to
2003 Jan 29
3
multinomial conditional logit models
A multinomial logit model can be specified as a conditional logit model after restructuring the data. Doing so gives flexibility in imposing restrictions on the dependent variable. One application is to specify a loglinear model for square tables, e.g. quasi-symmetry or quasi-independence, as a multinomial logit model with covariates. Further details on this technique and examples with several
2011 Oct 13
2
GLM and Neg. Binomial models
Hi userRs! I am trying to fit some GLM-poisson and neg.binomial. The neg. Binomial model is to account for over-dispersion. When I fit the poisson model i get: (Dispersion parameter for poisson family taken to be 1) However, if I estimate the dispersion coefficient by means of: sum(residuals(fit,type="pearson")^2)/fit$df.res I obtained 2.4. This is theory means over-dispersion since
2010 Feb 08
0
Poisson and neg. bin. regression with random effects
Hi there, I have relative abundance data for 13 mammal species that I collected at various sites that ranged in road density. I'm trying to determine the effect of road density on animal abundance across body sizes. For most species, I have data that was collected in one year but for a few species I have two years of complete data, and would like to use both. Since I have count data, I'm
2011 Jun 27
1
Neg Binomial In GEE
Hi, I want to fit a GEE with a negative binomial distribution. I have uesd already a poisson glm and then neg binommial to deal with alot of dispersion. In my neg binomial residuals i have some patterns so i have implemented a GEE, but only with a poisson family as i couldnt with neg binomial. However the residual patterns in fact look worse here. When i try and put neg binomial family it
2005 Dec 02
1
Zero-inflated neg.bin. model and pscl package
Dear list, I'm currently trying to develop a model to assess clam yield potential in a lagoon. I'm using the zeroinfl function of the pscl package to fit a Zero-inflated negative binomial model, given the high occurrence of zero counts. I don't understand from the sentence in the pscl guide "Zero-inflated count models are a type of two-component mixture model, with a component
2009 Apr 27
2
Problem with R 2.9.0 vs. R2.8.1 with either "survival" package or "predict" function
Just wanted to alert everyone regarding a problem that I only experience with R2.9.0 and not with R2.8.1 when I run both using exactly the same script and the same data. Here is what I do with my data "MyData", 2 predictors (V1 and V2) and my survival DV "Depvar": library(survival)