Skip to content
Snippets Groups Projects
Commit cc6f51e9 authored by Maria Voigt's avatar Maria Voigt
Browse files

changing the maxit in abundance_model

parent 2d8a0c0d
Branches
No related tags found
No related merge requests found
...@@ -319,7 +319,7 @@ model_terms <- names(glm.nb(as.formula(paste("nr_nests~", paste(m_terms, ...@@ -319,7 +319,7 @@ model_terms <- names(glm.nb(as.formula(paste("nr_nests~", paste(m_terms,
"+ offset(offset_term)", "+ offset(offset_term)",
sep = "")), sep = "")),
data = predictors_obs, data = predictors_obs,
control = glm.control(maxit = 500))$coefficients) control = glm.control(maxit = 1000))$coefficients)
# prediction estimates # prediction estimates
intercept <- rep(1, nrow(predictors_obs)) intercept <- rep(1, nrow(predictors_obs))
predictor_estimates <- cbind( intercept, predictor_estimates <- cbind( intercept,
...@@ -343,7 +343,7 @@ model <- as.formula( ...@@ -343,7 +343,7 @@ model <- as.formula(
paste("nr_nests ~", full_model, "+ offset(offset_term)")) paste("nr_nests ~", full_model, "+ offset(offset_term)"))
res_full <- glm.nb(model, data = predictors_obs, res_full <- glm.nb(model, data = predictors_obs,
control = glm.control(maxit = 500)) control = glm.control(maxit = 1000))
# HERE I CAN NOW USE THE OTHER FUNCTION # HERE I CAN NOW USE THE OTHER FUNCTION
dfbeta_frame <- data.frame(slope=res_full$coefficients, res_full$coefficients+ dfbeta_frame <- data.frame(slope=res_full$coefficients, res_full$coefficients+
...@@ -386,7 +386,7 @@ results_res <- foreach(i = 1:nrow(all_model_terms), ...@@ -386,7 +386,7 @@ results_res <- foreach(i = 1:nrow(all_model_terms),
paste(m_terms[all_model_terms[i, ] == 1], collapse = "+"), paste(m_terms[all_model_terms[i, ] == 1], collapse = "+"),
"+ offset(offset_term)")) "+ offset(offset_term)"))
res <- glm.nb(model, data = predictors_obs, res <- glm.nb(model, data = predictors_obs,
control = glm.control(maxit = 500)) control = glm.control(maxit = 1000))
# model # model
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment