Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Influential data points, leverage, cook's distance #428

Open
melina-leite opened this issue Sep 5, 2024 · 3 comments
Open

Influential data points, leverage, cook's distance #428

melina-leite opened this issue Sep 5, 2024 · 3 comments

Comments

@melina-leite
Copy link
Collaborator

Ideas to develop about how to measure the influence of data points in DHARMa, something like Cook's distance, in a simpler and more general way.

Some references:

@florianhartig
Copy link
Owner

some code to play around with

testData = createData(sampleSize = 100, family = gaussian(), fixedEffects = 1,
                      randomEffectVariance = 0, temporalAutocorrelation = 10)

fittedModel <- lm(observedResponse ~ Environment1, data = testData)
res = simulateResiduals(fittedModel, n = 1000)

plot(res)

resid = residuals(res, quantileFunction = qnorm, outlierValues = c(-5,5))

plot(resid~res$fittedPredictedResponse)

par(mfrow=c(2,2))

plot(fittedModel)

qqnorm(resid)

@melina-leite
Copy link
Collaborator Author

#171

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants