Hello.

I want to use conditional logistic regression to calculate the probability
of winning one of three players in golf. I was able to calculate these
probabilities in Stata10, and I now want to transfer the code in the R
Project, because it is can get data directly form MySQL. Unfortunately, I'm
novice in R and I can't calculate the probability using the predict function
when trying to get out of sample forecasts.

The code I use to built the regression is and generate predictions is:

predict (clogit (place ~ rating1+ rating2+rating3+strata(event_id), data =
a), b, type = "expected")

Here "a" - my original data, "b" - the new data, for which I want to
calculate probabilities. The sample is grouped by number of the event
(event_id).

What am I doing wrong? When I try to calculate the probability of the data
outside the sample, I get an error "Method not yet finished." Reading the
history of this mailing list, I found mention of this error back in 2008. Does
this mean that clogit function is no longer being developed and there is
another, more suitable function? I tried to replace clogit witch cph, but in
this case, the error was:

Error in names (Strata) <- paste ( "S", 1: nstrata, sep = ""):
  'names' attribute [2] must be the same length as the vector [0]

Can I use R Project to calculate the conditional probabilities, or am I
doomed to use Stata?

WBR
Dmitrij

        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to