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

Fixing glmfit function #126

Open
pr0m1th3as opened this issue Mar 1, 2024 · 4 comments · May be fixed by #173
Open

Fixing glmfit function #126

pr0m1th3as opened this issue Mar 1, 2024 · 4 comments · May be fixed by #173
Labels
help wanted Extra attention is needed

Comments

@pr0m1th3as
Copy link
Member

The newly introduced glmfit function in statistics 1.6.4 needs a lot of attention.

@pr0m1th3as
Copy link
Member Author

Further updates to @ruchikasonagote's PR #141 have been integrated into release-1.6.6. Functionality is still missing and more work is required.

@Sanj-bot
Copy link

/assign

@achengli
Copy link

Hello there,

Some points are not very polished. I'm working to solve the problem of deviance that occurs when the distribution is not binomial (see the following test prompt)

***** test
rand ("seed", 1);
X1 = rand (50, 1);
X2 = rand (50, 1) * 0.5;
b_true = [0.4; 1.5; -0.7];
mu_true = exp (b_true(1) + b_true(2) * X1 + b_true(3) * X2);
randp ("seed", 1);
y = poissrnd(mu_true);
[b, dev] = glmfit ([X1, X2], y, "poisson", "link", "log");
assert (b(1), b_true(1), 1);
assert (b(2), b_true(2), 1);
assert (b(3), b_true(3), 1);
assert (dev < 60, true);
!!!!! test failed
corrcoef: X and Y must be the same size

Thinking in the future, I want to give glmfit the full compatibility with other distributions like p-dist.

Thank you for your dedication

@pr0m1th3as
Copy link
Member Author

Your testing code above works properly with the latest dev sources bafore merging your PR. See my comments on your PR.

pkg load statistics
>> X1 = rand (50, 1);
>> X2 = rand (50, 1) * 0.5;
>> b_true = [0.4; 1.5; -0.7];
>> mu_true = exp (b_true(1) + b_true(2) * X1 + b_true(3) * X2);
>> y = poissrnd(mu_true);
>> [b, dev] = glmfit ([X1, X2], y, "poisson", "link", "log");
>> assert (b(1), b_true(1), 1);
>> assert (b(2), b_true(2), 1);
>> assert (b(3), b_true(3), 1);
>> assert (dev < 60, true);
>>

@Sonu0305 Sonu0305 linked a pull request Feb 4, 2025 that will close this issue
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants