You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the code outlined in the example, jtools::summ runs perfectly fine with the given data. When I run the command, I encounter a problem with glm.control(), and I do not get any values for R squared. All other values in the table are correct.
I therefore suppose that it is a conflict with any of the packages that I have loaded, or an issue caused by an update of jtools or MASS since the tutorial was written.
Output:
Errorin glm.control(...) :unused argument (family=list("Negative Binomial(2.2644)", "log", function (mu)
log(mu), function (eta)
pmax(exp(eta), .Machine$double.eps), function (mu)
mu+mu^2/.Theta, function (y, mu, wt)
2*wt* (y* log(pmax(1, y)/mu) - (y+.Theta) * log((y+.Theta)/(mu+.Theta))), function (y, n, mu, wt, dev)
{
term<- (y+.Theta) * log(mu+.Theta) -y* log(mu) + lgamma(y+1) -.Theta* log(.Theta) + lgamma(.Theta) - lgamma(.Theta+y)
2* sum(term*wt)
}, function (eta)
pmax(exp(eta), .Machine$double.eps), expression({
if (any(y<0)) stop("negative values not allowed for the negative binomial family")
n<- rep(1, nobs)
mustart<-y+ (y==0)/6
}), function (mu)
all(mu>0), function (eta)
TRUE, function (object, nsim)
{
ftd<- fitted(object)
rnegbin(nsim* length(ftd), ftd, .Theta)
}))
MODELINFO:Observations:915DependentVariable:artType:GeneralizedlinearmodelFamily:Negative Binomial(2.2644)
Linkfunction:logMODELFIT:
χ²(NA) =NA, p=NAPseudo-R² (Cragg-Uhler) =NAPseudo-R² (McFadden) =NAAIC=3135.92, BIC=3169.65Standarderrors:MLE------------------------------------------------------------
exp(Est.) 2.5% 97.5% zval.p-------------------------------------------------------
(Intercept) 1.290.991.691.860.06fem0.810.700.93-2.980.00ment1.031.021.049.050.00phd1.020.951.090.430.67mar1.160.991.371.830.07kid50.840.760.93-3.340.00------------------------------------------------------------Warningmessage:SomethingwentwrongwhencalculatingthepseudoR-squared.ReturningNAinstead.
Interesting, I hadn't explicitly intended to support glm.nb models but I'm glad to see they are almost working. With that in mind, I don't have a good idea about why it would have regressed like this.
However, this was a fairly easy fix so I have an update coming that will both get the pseudo-R2 back in there and add the missing chi-squared test as well.
I have encountered a problem when using
jtools::summ()
withMASS::glm.nb()
. There seems to be some parameter mismatch in theglm.control()
function.The reprex is from Francis L Huang
In the code outlined in the example, jtools::summ runs perfectly fine with the given data. When I run the command, I encounter a problem with
glm.control()
, and I do not get any values for R squared. All other values in the table are correct.I therefore suppose that it is a conflict with any of the packages that I have loaded, or an issue caused by an update of jtools or MASS since the tutorial was written.
Output:
The text was updated successfully, but these errors were encountered: