- 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 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
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 comentarios
Respuestas (1)
Ayush
el 20 de Jun. de 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
Ver también
Categorías
Más información sobre Financial Toolbox en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!