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

jmv::linReg produces wrong intercept coefficients #243

Open
jRafi opened this issue Feb 28, 2020 · 0 comments
Open

jmv::linReg produces wrong intercept coefficients #243

jRafi opened this issue Feb 28, 2020 · 0 comments

Comments

@jRafi
Copy link

jRafi commented Feb 28, 2020

When conducting a regression in R and jamovi I get the same intercept coefficients. However, when copying the jamovi syntax to R, I get different coefficients. See values in bold:

R:
> lm("Sepal.Length ~ Species", iris)
Estimate Std. Error t value Pr(>|t|)
(Intercept) 5.0060 0.0728 68.762 < 2e-16 ***
Speciesversicolor 0.9300 0.1030 9.033 8.77e-16 ***
Speciesvirginica 1.5820 0.1030 15.366 < 2e-16 ***

jamovi:

Predictor Estimate SE t p
Intercept ᵃ 5.006 0.0728 68.76 < .001
Species:
versicolor – setosa 0.930 0.1030 9.03 < .001
virginica – setosa 1.582 0.1030 15.37 < .001

jmv

jmv::linReg(
    data = data,
    dep = Sepal.Length,
    factors = Species,
    blocks = list(
        list(
            "Species")),
    refLevels = list(
        list(
            var="Species",
            ref="setosa")))

Predictor Estimate SE t p
Intercept 5.843 0.0420 139.02 < .001
Species:
versicolor – setosa 0.930 0.1030 9.03 < .001
virginica – setosa 1.582 0.1030 15.37 < .001

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

No branches or pull requests

1 participant