简体   繁体   中英

how check overfitting on point pattern on a linear network using spatstat

I have been using lppm (point pattern on a linear network) on spatstat with bunch of covariates and fitting a log-linear model but I couldn't see how to check over-fitting. Is there a quick way to do it?

It depends on what you want.

What tool would you use to check overfitting in (say) a linear model?

To identify whether individual observations may have been over-fitted, you could use influence.lppm (from the spatstat.linnet package).

To identify collinearity in the covariates, currently we do not provide a dedicated function in spatstat , but you could use the following trick. If fit is your fitted model of class lppm , first extract the corresponding GLM using

g <- getglmfit(as.ppm(fit))

Next install the package faraway and use the vif function to calculate the variance inflation factors

library(faraway)
vif(g)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM