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

Request different degrees of freedom (OneSampleTTest) #181

Open
marinadietze opened this issue Feb 13, 2020 · 0 comments · May be fixed by #188
Open

Request different degrees of freedom (OneSampleTTest) #181

marinadietze opened this issue Feb 13, 2020 · 0 comments · May be fixed by #188

Comments

@marinadietze
Copy link

marinadietze commented Feb 13, 2020

In the OneSampleTTest functions, the degrees of freedom are fixed as n-1. But if we want to perform a t-test for the p regression parameters, the degrees of freedom must be equal to n-p. Is it possible to generalize the OneSampleTTest function by:

function OneSampleTTest(xbar::Real, stddev::Real, n::Int, μ0::Real=0, df::Int = n-1)
    stderr = stddev/sqrt(n)
    t = (xbar-μ0)/stderr
    OneSampleTTest(n, xbar, df, stderr, t, μ0)
end
birm added a commit to birm/HypothesisTests.jl that referenced this issue Mar 14, 2020
@birm birm linked a pull request Mar 14, 2020 that will close this issue
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

Successfully merging a pull request may close this issue.

1 participant