vcdExtra icon indicating copy to clipboard operation
vcdExtra copied to clipboard

CMHtest throws an uncatchable "Error in solve.default(AVA)"

Open bill-raynor opened this issue 7 years ago • 5 comments

For large sparse table (many strata) CMHTest will occasionally throw a Error in solve.default(AVA) Not surprising when I inspect the sub-tables as there are lots of zeros. However, I am unable to catch it with a tryCatch wrapped around the CMHtest call. Are there any downsides to replacing the solve call with a call to MASS::ginv as I would normally do for a linear model? (aside from speed issues)

bill-raynor avatar Jun 11 '18 19:06 bill-raynor

As you say, your result for a large, sparse table with many strata is unsurprising. CMHtest was not designed for the situation of sparse tables, where solve doesn't work. We would not just substitute MASS::ginv without extensive testing.

If this issue is serious for you, you could clone the package, do some testing of an alternative, and file a patch or pull-request when you think you have a workable replacement.

friendly avatar Jun 11 '18 20:06 friendly

What kind of testing would you suggest? Just a simple drop-in seems to work in the few cases I tested.. UNC-CH was where I learned about GENCAT, PARCAT, CATMOD and the rest of the GSK FARM stuff. Dick Landis was a year or two ahead of me. IIRC generalized inverses were being used that context, since GSK is a linear approximation. Its been 40+ years, though.

bill-raynor avatar Jun 12 '18 00:06 bill-raynor

This issue is still open, but I'd like to close it. As I said,

If this issue is serious for you, you could clone the package, do some testing of an alternative, and file a patch or pull-request when you think you have a workable replacement.

friendly avatar Feb 09 '19 18:02 friendly

Excuse me Mike, I thought you had closed it after our last conversation. I cloned it, replaced it with a g-inverse and the problem is done.

Thanks Bill

On Feb 9, 2019, at 12:22 PM, Michael Friendly [email protected] wrote:

This issue is still open, but I'd like to close it. As I said,

If this issue is serious for you, you could clone the package, do some testing of an alternative, and file a patch or pull-request when you think you have a workable replacement.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/friendly/vcdExtra/issues/3#issuecomment-462067209, or mute the thread https://github.com/notifications/unsubscribe-auth/AB_B_sJ1T7z1jkFWk0ooYb419T7lKQeaks5vLxHTgaJpZM4UjTOU.

bill-raynor avatar Feb 10 '19 13:02 bill-raynor

You can issue a pull request & I'll check it out.

friendly avatar Feb 10 '19 15:02 friendly