- Transform Predictors: Adjust your predictor variables through transformations (e.g., logarithmic) to ensure the linear predictor remains positive.
- Change Link Function: If possible, switch to a different link function that doesn't require a strictly positive linear predictor, such as the log link or the identity link.
- Initial Values: Check and adjust the initial values for the model fitting process to guide it towards a solution that maintains a positive linear predictor.
Warning when using non-normal link function for generalized linear models with fitglme
10 views (last 30 days)
Show older comments
When I fit my data to a generalized linear model using the function fitglme, I get the following warning:
Warning: The 'Reciprocal' and 'Power' links require the linear predictor to be non-negative. However, the model
assumes that the linear predictor is unconstrained.
This happens although the data are non-negative, and I do not see any option to tell the fitting function that it should not worry. Question: How do I avoid this warning? (I mean "avoid" not "suppress". A warning usually indicates that something is wrong, so how do I correct it?)
0 Comments
Answers (1)
Ayush
on 20 Jun 2024
Hey Kim,
I understand that you are encountering a warning when fitting a generalized linear model using fitglme in MATLAB, specifically when employing 'Reciprocal' or 'Power' link functions. This warning is due to the requirement for the linear predictor to be non-negative, and you're looking for a way to address this issue.
To avoid the warning about the linear predictor being non-negative when using 'Reciprocal' or 'Power' links in "fitglme", consider the following approaches:
For more information on the link functions , you can refer to the following MathWorks documentation: https://in.mathworks.com/help/stats/fitglme.html
Hope this helps!
Regards
See Also
Categories
Find more on Financial Toolbox in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!