[R] strange gee behavior
Max_Kuhn@bd.com
Max_Kuhn at bd.com
Fri Dec 10 15:35:49 CET 2004
I'm using R 1.9.1 on suse server v9 enterprise with the gee package version
4.13-10.
I have code that runs in an automated script. It uses the gee function from
the gee package. The script is run quite often without error.
I have a problem where the script locks up R when calling this function (it
starts execution and never finishes). I was able to track down the
offending data and determine that this particular dataset results in a
correlation matrix that is not positive definite and a line within gee with
eigen(z$wcor) is where things lock up . Specifically, the line within eigen
.Call("La_rs", x, only.values, if (capabilities("IEEE754")) "dsyevr" else
"dsyev", PACKAGE = "base")
is where it happens.
The issue is that I get different behavior when I run the function
"interactively" and when it's run by sourcing a script. Running at a
command line (i.e. not embedding the call within functions and sourcing)
will return a result from gee with a warning and an error code. I can
program around this pretty well. However, running the command via the
script (i.e. embedded three functions down and called by sourcing a file)
will make the system lock up. It's difficult to send the entire set of code
to try to reproduce the locking up, but here is an example that does not
produce a pd matrix:
group1 <- rep(1:10, c(3, 2, 3, 2, 4, 1, 1, 3, 4, 2))
group2 <- rep(1:10, c(3, 3, 4, 5, 2, 6, 5, 4, 3, 4))
group <- c(group1, group2)
outcome <- c(rep(FALSE, length(group1)), rep(TRUE, length(group2)))
gee(outcome ~ 1, group, family="binomial", corstr="exchangeable").
Am I missing something obvious here? It seems like the behavior is
different depending on how the code is sent to R, but this is an
assumption. I know that there are cases where this can be the case (e.g.
printing lattice graphics). There doesn't seem to be a way to test the data
prior to running gee and try() isn't an option.
Thanks,
Max
-----------------------------------------
*******************************************************************
IMPORTANT MESSAGE FOR RECIPIENTS IN THE U.S.A.: This message may
constitute an advertisement of a BD group's products or services or a
solicitation of interest in them. If this is such a message and you would
like to opt out of receiving future advertisements or solicitations from
this BD group, please forward this e-mail to optoutbygroup at bd.com.
******************************************************************* This
message (which includes any attachments) is intended only for the
designated recipient(s). It may contain confidential or proprietary
information and may be subject to the attorney-client privilege or other
confidentiality protections. If you are not a designated recipient, you
may not review, use, copy or distribute this message. If you receive this
in error, please notify the sender by reply e-mail and delete this message.
Thank you.
*******************************************************************
Corporate Headquarters Mailing Address: BD (Becton, Dickinson and Company)
1 Becton Drive Franklin Lakes, NJ 07417 U.S.A.
More information about the R-help
mailing list