đŸ•ˇī¸ Crawler Inspector

URL Lookup

Direct Parameter Lookup

Raw Queries and Responses

1. Shard Calculation

Query:
Response:
Calculated Shard: 104 (from laksa093)

2. Crawled Status Check

Query:
Response:

3. Robots.txt Check

Query:
Response:

4. Spam/Ban Check

Query:
Response:

5. Seen Status Check

â„šī¸ Skipped - page is already crawled

đŸšĢ
NOT INDEXABLE
✅
CRAWLED
15 days ago
🤖
ROBOTS ALLOWED

Page Info Filters

FilterStatusConditionDetails
HTTP statusPASSdownload_http_code = 200HTTP 200
Age cutoffPASSdownload_stamp > now() - 6 MONTH0.5 months ago
History dropPASSisNull(history_drop_reason)No drop reason
Spam/banPASSfh_dont_index != 1 AND ml_spam_score = 0ml_spam_score=0
CanonicalFAILmeta_canonical IS NULL OR = '' OR = src_unparsedorg,rdocumentation!www,/packages/mgcv/versions/1.9-4/topics/ziP s443

Page Details

PropertyValue
URLhttps://www.rdocumentation.org/packages/mgcv/versions/1.9-3/topics/ziP
Last Crawled2026-03-22 18:38:39 (15 days ago)
First Indexed2025-04-14 02:47:05 (11 months ago)
HTTP Status Code200
Meta TitleziP function - RDocumentation
Meta Description<p>Family for use with <code>gam</code> or <code>bam</code>, implementing regression for zero inflated Poisson data when the complimentary log log of the zero probability is linearly dependent on the log of the Poisson parameter. Use with great care, noting that simply having many zero response observations is not an indication of zero inflation: the question is whether you have too many zeroes given the specified model.</p> <p>This sort of model is really only appropriate when none of your covariates help to explain the zeroes in your data. If your covariates predict which observations are likely to have zero mean then adding a zero inflated model on top of this is likely to lead to identifiability problems. Identifiability problems may lead to fit failures, or absurd values for the linear predictor or predicted values.</p>
Meta Canonicalorg,rdocumentation!www,/packages/mgcv/versions/1.9-4/topics/ziP s443
Boilerpipe Text
Description Usage Value Details References See Also Examples Run this code rzip <- function ( gamma ,theta= c (- 2 , .3 )) { ## generate zero inflated Poisson random variables, where ## lambda = exp(gamma), eta = theta[1] + exp(theta[2])*gamma ## and 1-p = exp(-exp(eta)). y <- gamma ; n <- length (y) lambda <- exp ( gamma ) eta <- theta[ 1 ] + exp (theta[ 2 ])* gamma p <- 1- exp (- exp (eta)) ind <- p > runif(n) y[!ind] <- 0 np <- sum (ind) ## generate from zero truncated Poisson, given presence... y[ind] <- qpois(runif(np,dpois( 0 ,lambda[ind]), 1 ),lambda[ind]) y } library(mgcv) ## Simulate some ziP data... set.seed( 1 );n<- 400 dat <- gamSim( 1 ,n=n) dat$y <- rzip(dat$f/ 4 - 1 ) b <- gam(y~s(x0)+s(x1)+s(x2)+s(x3),family=ziP(),data=dat) b$outer.info ## check convergence!! b plot(b,pages= 1 ) plot(b,pages= 1 ,unconditional= TRUE ) ## add s.p. uncertainty gam.check(b) ## more checking... ## 1. If the zero inflation rate becomes decoupled from the linear predictor, ## it is possible for the linear predictor to be almost unbounded in regions ## containing many zeroes. So examine if the range of predicted values ## is sane for the zero cases? range (predict(b,type= "response" )[b$y== 0 ]) ## 2. Further plots... par(mfrow= c ( 2 , 2 )) plot(predict(b,type= "response" ),residuals(b)) plot(predict(b,type= "response" ),b$y);abline( 0 , 1 ,col= 2 ) plot(b$linear.predictors,b$y) qq.gam(b, rep = 20 ,level= 1 ) ## 3. Refit fixing the theta parameters at their estimated values, to check we ## get essentially the same fit... thb <- b$family$getTheta() b0 <- gam(y~s(x0)+s(x1)+s(x2)+s(x3),family=ziP(theta=thb),data=dat) b;b0 ## Example fit forcing minimum linkage of prob present and ## linear predictor. Can fix some identifiability problems. b2 <- gam(y~s(x0)+s(x1)+s(x2)+s(x3),family=ziP(b= .3 ),data=dat) Run the code above in your browser using DataLab
Markdown
[Rdocumentation](https://www.rdocumentation.org/) *** [powered by](https://www.datacamp.com/) [Learn R Programming](https://www.datacamp.com/category/r) *** [mgcv (version 1.9-3)](https://www.rdocumentation.org/packages/mgcv/versions/1.9-3) # ziP: GAM zero-inflated (hurdle) Poisson regression family ## Description Family for use with `gam` or `bam`, implementing regression for zero inflated Poisson data when the complimentary log log of the zero probability is linearly dependent on the log of the Poisson parameter. Use with great care, noting that simply having many zero response observations is not an indication of zero inflation: the question is whether you have too many zeroes given the specified model. This sort of model is really only appropriate when none of your covariates help to explain the zeroes in your data. If your covariates predict which observations are likely to have zero mean then adding a zero inflated model on top of this is likely to lead to identifiability problems. Identifiability problems may lead to fit failures, or absurd values for the linear predictor or predicted values. ## Usage ``` ziP(theta = NULL, link = "identity",b=0) ``` ## Value An object of class `extended.family`. ## Arguments theta the 2 parameters controlling the slope and intercept of the linear transform of the mean controlling the zero inflation rate. If supplied then treated as fixed parameters (\\(\\theta\_1\\) and \\(\\theta\_2\\)), otherwise estimated. link The link function: only the `"identity"` is currently supported. b a non-negative constant, specifying the minimum dependence of the zero inflation rate on the linear predictor. ## Author Simon N. Wood [simon.wood@r-project.org](https://www.rdocumentation.org/link/simon.wood%40r-project.org?package=mgcv&version=1.9-3) ## WARNINGS Zero inflated models are often over-used. Having lots of zeroes in the data does not in itself imply zero inflation. Having too many zeroes \*given the model mean\* may imply zero inflation. ## Details The probability of a zero count is given by \\(1-p\\), whereas the probability of count \\(y\>0\\) is given by the truncated Poisson probability function \\(p\\mu^y/((\\exp(\\mu)-1)y!)\\). The linear predictor gives \\(\\log \\mu\\), while \\(\\eta = \\log(-\\log(1-p)) \\) and \\(\\eta = \\theta\_1 + \\{b+\\exp(\\theta\_2)\\} \\log \\mu \\). The `theta` parameters are estimated alongside the smoothing parameters. Increasing the `b` parameter from zero can greatly reduce identifiability problems, particularly when there are very few non-zero data. The fitted values for this model are the log of the Poisson parameter. Use the `predict` function with `type=="response"` to get the predicted expected response. Note that the theta parameters reported in model summaries are \\(\\theta\_1\\) and \\(b + \\exp(\\theta\_2)\\). These models should be subject to very careful checking, especially if fitting has not converged. It is quite easy to set up models with identifiability problems, particularly if the data are not really zero inflated, but simply have many zeroes because the mean is very low in some parts of the covariate space. See example for some obvious checks. Take convergence warnings seriously. ## References Wood, S.N., N. Pya and B. Saefken (2016), Smoothing parameter and model selection for general smooth models. Journal of the American Statistical Association 111, 1548-1575 tools:::Rd\_expr\_doi("10.1080/01621459.2016.1180986") ## See Also `ziplss` ## Examples [Run this code](https://www.datacamp.com/datalab/preview?_tag=rdocs&rdocsPath=packages%2Fmgcv%2Fversions%2F1.9-3%2Ftopics%2FziP&utm_source=r-docs&utm_medium=docs&utm_term=ziP&utm_content=run_example_in_datalab) ``` rzip <- function(gamma,theta= c(-2,.3)) { ## generate zero inflated Poisson random variables, where ## lambda = exp(gamma), eta = theta[1] + exp(theta[2])*gamma ## and 1-p = exp(-exp(eta)). y <- gamma; n <- length(y) lambda <- exp(gamma) eta <- theta[1] + exp(theta[2])*gamma p <- 1- exp(-exp(eta)) ind <- p > runif(n) y[!ind] <- 0 np <- sum(ind) ## generate from zero truncated Poisson, given presence... y[ind] <- qpois(runif(np,dpois(0,lambda[ind]),1),lambda[ind]) y } library(mgcv) ## Simulate some ziP data... set.seed(1);n<-400 dat <- gamSim(1,n=n) dat$y <- rzip(dat$f/4-1) b <- gam(y~s(x0)+s(x1)+s(x2)+s(x3),family=ziP(),data=dat) b$outer.info ## check convergence!! b plot(b,pages=1) plot(b,pages=1,unconditional=TRUE) ## add s.p. uncertainty gam.check(b) ## more checking... ## 1. If the zero inflation rate becomes decoupled from the linear predictor, ## it is possible for the linear predictor to be almost unbounded in regions ## containing many zeroes. So examine if the range of predicted values ## is sane for the zero cases? range(predict(b,type="response")[b$y==0]) ## 2. Further plots... par(mfrow=c(2,2)) plot(predict(b,type="response"),residuals(b)) plot(predict(b,type="response"),b$y);abline(0,1,col=2) plot(b$linear.predictors,b$y) qq.gam(b,rep=20,level=1) ## 3. Refit fixing the theta parameters at their estimated values, to check we ## get essentially the same fit... thb <- b$family$getTheta() b0 <- gam(y~s(x0)+s(x1)+s(x2)+s(x3),family=ziP(theta=thb),data=dat) b;b0 ## Example fit forcing minimum linkage of prob present and ## linear predictor. Can fix some identifiability problems. b2 <- gam(y~s(x0)+s(x1)+s(x2)+s(x3),family=ziP(b=.3),data=dat) ``` Run the code above in your browser using [DataLab](https://www.datacamp.com/datalab/preview?_tag=rdocs&rdocsPath=packages%2Fmgcv%2Fversions%2F1.9-3%2Ftopics%2FziP&utm_source=r-docs&utm_medium=docs&utm_term=ziP&utm_content=run_example_in_datalab)
Readable Markdown
## ## Description ## Usage ``` ``` ## Value ## Details ## References ## See Also ## Examples [Run this code](https://www.datacamp.com/datalab/preview?_tag=rdocs&rdocsPath=packages%2Fmgcv%2Fversions%2F1.9-3%2Ftopics%2FziP&utm_source=r-docs&utm_medium=docs&utm_term=ziP&utm_content=run_example_in_datalab) ``` rzip <- function(gamma,theta= c(-2,.3)) { ## generate zero inflated Poisson random variables, where ## lambda = exp(gamma), eta = theta[1] + exp(theta[2])*gamma ## and 1-p = exp(-exp(eta)). y <- gamma; n <- length(y) lambda <- exp(gamma) eta <- theta[1] + exp(theta[2])*gamma p <- 1- exp(-exp(eta)) ind <- p > runif(n) y[!ind] <- 0 np <- sum(ind) ## generate from zero truncated Poisson, given presence... y[ind] <- qpois(runif(np,dpois(0,lambda[ind]),1),lambda[ind]) y } library(mgcv) ## Simulate some ziP data... set.seed(1);n<-400 dat <- gamSim(1,n=n) dat$y <- rzip(dat$f/4-1) b <- gam(y~s(x0)+s(x1)+s(x2)+s(x3),family=ziP(),data=dat) b$outer.info ## check convergence!! b plot(b,pages=1) plot(b,pages=1,unconditional=TRUE) ## add s.p. uncertainty gam.check(b) ## more checking... ## 1. If the zero inflation rate becomes decoupled from the linear predictor, ## it is possible for the linear predictor to be almost unbounded in regions ## containing many zeroes. So examine if the range of predicted values ## is sane for the zero cases? range(predict(b,type="response")[b$y==0]) ## 2. Further plots... par(mfrow=c(2,2)) plot(predict(b,type="response"),residuals(b)) plot(predict(b,type="response"),b$y);abline(0,1,col=2) plot(b$linear.predictors,b$y) qq.gam(b,rep=20,level=1) ## 3. Refit fixing the theta parameters at their estimated values, to check we ## get essentially the same fit... thb <- b$family$getTheta() b0 <- gam(y~s(x0)+s(x1)+s(x2)+s(x3),family=ziP(theta=thb),data=dat) b;b0 ## Example fit forcing minimum linkage of prob present and ## linear predictor. Can fix some identifiability problems. b2 <- gam(y~s(x0)+s(x1)+s(x2)+s(x3),family=ziP(b=.3),data=dat) ``` Run the code above in your browser using [DataLab](https://www.datacamp.com/datalab/preview?_tag=rdocs&rdocsPath=packages%2Fmgcv%2Fversions%2F1.9-3%2Ftopics%2FziP&utm_source=r-docs&utm_medium=docs&utm_term=ziP&utm_content=run_example_in_datalab)
Shard104 (laksa)
Root Hash2683427806285514304
Unparsed URLorg,rdocumentation!www,/packages/mgcv/versions/1.9-3/topics/ziP s443