similar to: Double hurdle model in R

Displaying 20 results from an estimated 100 matches similar to: "Double hurdle model in R"

2005 Jun 10
1
Estimate of baseline hazard in survival
Dear All, I'm having just a little terminology problem, relating the language used in the Hosmer and Lemeshow text on Applied Survival Analysis to that of the help that comes with the survival package. I am trying to back out the values for the baseline hazard, h_o(t_i), for each event time or observation time. Now survfit(fit)$surv gives me the value of the survival function, S(t_i|X_i,B),
2012 Jan 17
2
pscl package and hurdle model marginal effects
This request is related to the following post from last year: https://stat.ethz.ch/pipermail/r-help/2011-June/279752.html After reading the thread, the idea is still not clear. I have fitted a model using HURDLE from the PSCL package. I am trying to get marginal effects / slopes by multiplying the coefficients by the mean of the marginal effects (I think this is right). To my understanding, this
2004 Aug 13
1
How to use the whole dataset (including between events) in Cox model (time-varying covariates) ?
Hello, coxph does not use any information that are in the dataset between event times (or "death times") , since computation only occurs at event times. For instance, removing observations when there is no event at that time in the whole dataset does not change the results: > set.seed(1) > data <- as.data.frame(cbind(start=c(1:5,1:5,1:4),stop=c(2:6,2:6,2:5),status=c(rep(
2008 Mar 03
2
glm: offset
R 2.6.0 Windows XP A question about running a generalized linear model. I am running a glm with (1) a poisson distribution and a log link: family=poisson(link = "log") and an offset. I would like to know if I should express the offset as the log of the offset value, i.e. offset=log(NumUniqPt) or as: offset=NumUniqPt I suspect I need to use the log, bu t I can't find any
2012 Feb 06
1
Simple lm/regression question
I am trying to use lm for a simple linear fit with weights. The results I get from IDL (which I am more familiar with) seem correct and intuitive, but the "lm" function in R gives outputs that seem strange to me. Unweighted case: > x<-1:4 > y<-(1:4)^2 > summary(lm(y~x)) Call: lm(formula = y ~ x) Residuals: 1 2 3 4 1 -1 -1 1 Coefficients:
2012 Jul 19
1
npindex: fitted values of the function itself?
Dear list, I am using the np package. With the npindex function I estimate a semiparametric single index model using the method of Klein-Spady. P(Z=1|X) = G(X?b) I don?t have any problems to calculated the fitted values and standard errors X?b: bw = npindexbw(xdat=x, ydat=y_bi, method="kleinspady", nmulti=2) model = npindex(bws= bw3, gradients= TRUE, residuals = TRUE, boot.num =
2010 Feb 25
1
Zero inflation model - pscl package
I have some questions regarding Zero Inflation Poisson models. I am using count data to analyze abundance trends of salamanders. However, I have surveys which differ in the amount of effort (i.e. the number of people searching and amount of time - I am using a museum database so not all surveys were conducted by me). Therefore I need to account for the effort. If change the count (response
2012 Sep 10
1
Zero inflated Models- pscl package
Dear R users, I want to apply zero inflated models with continuous and categorical variables and I used pscl package from R and the zeroinf() function. My question are the follow: a) The value of fitted.values is mu or (1-p)*mu? where p is the probability of zero came form a zero point mass b) If mu is zero, how do i know if it is a zero from the zero point mass or from the count process?
2008 Oct 01
1
Negative Binomial Predictions
Good Day All, I have a negative binomial model which I have developed using the MASS library. I now would like to develop some predictions from it. Running the predict.glm (stats library) using type="response" gives me a non-integer value which was rather puzzling. I would like to confirm that this is actually the mean predicted value of the probability mass function as opposed
2010 Jul 06
1
Interpreting NB GLM output - effect sizes?
Hi, I am trying to find out how to interpret the summary output from a neg bin GLM? I have 3 significant variables and I can see whether they have a positive or negative effect, but I can't work out how to calculate the magnitude of the effect on the mean of the dependent variable. I used a log link function so I think I might have to use the antilogs of the coefficients but I have no idea
2013 Jul 23
0
percent correctly predicted (PCP) zeros for hurdle model
Hello all, I am using the hurdle model for fitting my count data using the pscl package which is working fine. However, I am stuck with the problem of calculating the percent correctly predicted (PCP) zeros for hurdle model. The method I am trying to use to achieve this is 'hitmiss' in the pscl package (ref: http://www.inside-r.org/packages/cran/pscl/docs/hitmiss). When I do: >
2008 Jun 05
1
GAM hurdle models
Hello, I have been using mgcv to run GAM hurdle models, analyzing presence/absence data with GAM logistic regressions, and then analyzing the data conditional on presence (e.g. without samples with no zeros) with GAMs with a negative binomial distribution. It occurs to me that using the negative binomial distribution on data with no zeros is not right, as the negative binomial allows zeros.
2007 Sep 16
2
are hurdle logit-poisson model and posson model nested?
Dear Listers, I have a general statistical question. Are hurdle logit-poisson model and posson model nested? Thank you so much?
2012 Aug 22
0
hat matrix for zeroinfl and hurdle objects
Hi, I am wondering if there is an easy way to access the hat matrix for zeroinfl and hurdle objects in the pscl library? Thanks, Chris [[alternative HTML version deleted]]
2013 Oct 18
1
hurdle model error why does need integer values for the dependent variable?
Dear list, I am using the hurdle model for modelling the habitat of rare fish species. However I do get an error message when I try to model my data: > test_new1<-hurdle(GALUMEL~ depth + sal + slope + vrm + lat:long + offset(log(haul_numb)), dist = "negbin", data = datafit_elasmo) Error in hurdle(GALUMEL ~ depth + sal + slope + vrm + lat:long + offset(log(haul_numb)), :
2011 Jun 14
2
How to run zero inflated mixed model and hurdle mixed model in R
Dear Mr. or Ms.,   I would like to use the R-software to run the zero inflated mixed model and hurdle mixed model. But I do not know how to do? Would you please tell me the code and data format?   I will be very appreciated if you can help me. Thank you very much.   Best regards,   Sincerely, Xiongqing Zhang [[alternative HTML version deleted]]
1999 Aug 04
1
First (well second) CODA hurdle problem
I am having not a little difficulty in using R-CODA version 0.4 with R-Windows 0.64.2. Basically I want to produce some postscript plots from the updates. It seems the WinBugs output is OK for cut-and-paste operations but don't allow much flexibility for anything else. So far, I can produce the .ind and .out files from WinBugs 1.2 and these seem OK (in particular they are text files not
1999 Aug 06
0
FW: RE: First (well second) CODA hurdle problem
My reply seems not to have made it to either list 24 hours after I sent it, so I'm sending it again. Apologies if you get this twice (or 4 times if you're on both lists, or 6 times if you're John) Martyn -----FW: RE: [R] First (well second) CODA hurdle problem----- Date: Thu, 05 Aug 1999 09:40:01 +0200 (CEST) From: Martyn Plummer <plummer at iarc.fr> To: John Logsdon
2008 Nov 06
0
Inference and confidence interval for a restricted cubic spline function in a hurdle model
Dear list, I'm currently analyzing some count data using a hurdle model. I've used the rcspline.eval function in the Hmisc-library to contruct the spline terms for the regression model, and what I want in the end is the ability to compute coefficients and confidence intervals for different changes in the smooth function as well as plotting the smooth function along with the
2009 Sep 22
0
Question about the negative binomial hurdle model with random effect using REML.
Dear All, I am wondering about the fitting negative binomial(NB) hurdle model with random effect using REML estimation method in R. We can fit regular hurdle model without random effect using ML method as following. hurdle(pkg).... But, I couldn't figure out how I can fit NB hurdle model with random effect using REML in R. Please give me a tip. Thank you so much. Sincerely, SK