I want to maximize a conditional likelihood function that is basically logistic conditional on the number of successes within strata. What would be a good starting place for this? A complication is that the denominator includes a term that is the sum over all permutations. Although there is no time dimension to the problem, it's possible a degenerate use of the Cox proportional hazards model (in the survival package of 1.7) will do what I want. Here's a little more detail on the function, though this is still quite terse. Pseudo Tex notation: We have cases in clusters. y_ij is the outcome (0 or 1) for the j'th case in the i'th cluster It has vector covariates X_ij. c_ij is a transform of y_ij and is in (0, 1) (it's actually the probability of being in cluster j). It may be specified a priori or to be estimated. Maximize the product over i of c_ij exp(sum_j y_ij X_ij b) ---------------------------- sum_K c_ij exp(sum_K y_ij X_ij b) Where sum_K means we are summing over all possible subsets of the strata that contain the observed number of successes. b, and perhaps c, are the parameters to estimate. The more vanilla case has no c_ij terms. That says we maximize the probability of the observed outcomes, given the total number of successes within strata--i.e., we condition out on strata-specific effects. I kind of expected there would already be a routine that does this, but I can't find it. Thanks for any help you can offer. -- Ross Boylan wk: (415) 502-4031 530 Parnassus Avenue (Library) rm 115-4 ross at biostat.ucsf.edu Dept of Epidemiology and Biostatistics fax: (415) 476-9856 University of California, San Francisco San Francisco, CA 94143-0840 hm: (415) 550-1062
Have you considered "optim"? spencer graves Ross Boylan wrote:> I want to maximize a conditional likelihood function that is basically > logistic conditional on the number of successes within strata. What > would be a good starting place for this? A complication is that the > denominator includes a term that is the sum over all permutations. > > Although there is no time dimension to the problem, it's possible a > degenerate use of the Cox proportional hazards model (in the survival > package of 1.7) will do what I want. > > Here's a little more detail on the function, though this is still quite > terse. Pseudo Tex notation: > > We have cases in clusters. y_ij is the outcome (0 or 1) for the j'th > case in the i'th cluster It has vector covariates X_ij. c_ij is a > transform of y_ij and is in (0, 1) (it's actually the probability of > being in cluster j). It may be specified a priori or to be estimated. > > Maximize the product over i of > > c_ij exp(sum_j y_ij X_ij b) > ---------------------------- > sum_K c_ij exp(sum_K y_ij X_ij b) > > Where sum_K means we are summing over all possible subsets of the strata > that contain the observed number of successes. > b, and perhaps c, are the parameters to estimate. > > The more vanilla case has no c_ij terms. That says we maximize the > probability of the observed outcomes, given the total number of > successes within strata--i.e., we condition out on strata-specific > effects. I kind of expected there would already be a routine that does > this, but I can't find it. > > Thanks for any help you can offer. >
Ross Boylan <ross at biostat.ucsf.edu> writes:> I want to maximize a conditional likelihood function that is basically > logistic conditional on the number of successes within strata. What > would be a good starting place for this? A complication is that the > denominator includes a term that is the sum over all permutations. > > Although there is no time dimension to the problem, it's possible a > degenerate use of the Cox proportional hazards model (in the survival > package of 1.7) will do what I want.Did you check out clogit from the same package? -- O__ ---- Peter Dalgaard Blegdamsvej 3 c/ /'_ --- Dept. of Biostatistics 2200 Cph. N (*) \(*) -- University of Copenhagen Denmark Ph: (+45) 35327918 ~~~~~~~~~~ - (p.dalgaard at biostat.ku.dk) FAX: (+45) 35327907
Can I ask if this method would be suitable for application to my problem? I recently posted a question to which no one has replied: https://www.stat.math.ethz.ch/pipermail/r-help/2003-July/034777.html Basically I have multiple unique choice sets of various sizes on which I want to apply a multinomial logit to optimise the attributes. eg Chosen AttrQ AttrW Choices set size 0 8 0 3 1 20 34 3 0 7 2 3 0 5 3 4 0 3 5 4 1 25 18 4 0 4 9 4 1 30 12 2 0 2 4 2 Any help would be greatly appreciated - including any R code. Thanks