Page 1 of 1

Logistic Regression

Posted: Wed Aug 24, 2022 2:38 pm
by FurlanLeo
Does anyone know how to check the "Linearity Assumption" of a Logistic Regression Model in Jamovi?
What about useful R codes (for Logistic Regression) to be used via RjEditor?
Thanks!

Re: Logistic Regression

Posted: Wed Sep 28, 2022 8:36 pm
by BeginnerA
Based on this page,
https://search.r-project.org/CRAN/refma ... egBin.html
I think it may be something like this code:

data('birthwt', package='MASS')

dat <- data.frame(
low = factor(birthwt$low),
age = birthwt$age,
bwt = birthwt$bwt)

jmv::logRegBin (data = dat, dep = low,
covs = vars(age, bwt),
blocks = list(list("age", "bwt")),
refLevels = list(list(var="low", ref="0")),
boxTidwell =T)
summary(data)

However, I tried it and this was the output:
Image

(A table was designed for the test, but no output)
Maybe one of the makers can tell if the code needs more input.
Best regards

Re: Logistic Regression

Posted: Mon Oct 03, 2022 6:23 pm
by MAgojam
BeginnerA wrote:(A table was designed for the test, but no output)
Hey,
if you take a look at the binary logistic regression, directly in jamovi, passing from the Analyses->Regression->2 Otcomes ribbon you will find that in "Assumption Checks" there is only the checkbox for statistical collinearity and there is no checkbox for get the Box-Tidwell test.
Your example Rj script worked without errors, showing an empty table because the test is not yet available, but there is an output placeholder for it to indicate that it probably will be in a future version.

You might want to try this handful of code in Rj?

Code: Select all

data <- MASS::'birthwt'
jmv::logRegBin (data = data, 
                dep = low,
                covs = vars(age, bwt),
                blocks = list(list("age", "bwt")),
                refLevels = list(list(var="low", ref="0")))
car::boxTidwell(low~age+bwt, data=data)
Cheers,
Maurizio

Re: Logistic Regression

Posted: Tue Oct 04, 2022 1:17 pm
by BeginnerA
Thank you

I tried it and here is the output:

Output:

Code: Select all

MLE of lambda Score Statistic (z) Pr(>|z|)    
age        -15.61                 1.2      0.2    
bwt          0.49                 3.4    6e-04 ***
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

iterations =  22