
Help fixing some functions in R for copula distributions
5145
$350
- Posted:
- Proposals: 3
- Remote
- #144074
- Archived
Description
Experience Level: Expert
hello. i have some R code that estimates an index popular in the quantitative social sciences called the polychoric correlation coefficient. the difference is that instead of assuming a multivariate normal distribution an elliptical copula distribution is assumed as a model.
the R script works fine, i generate good enough estimates but i cannot, for the life of me, get appropriate standard errors (SE). there are functions in R that estimate this index via maximum likelihood so i have been using these as comparison to evaluate my results. they should be the same (within reasonable rounding error of course) but mines are far, far off.
i think this has more to do with the fact that i'm an intermediate-level learner of R/statistics and may not be fully grasping how to obtain the hessian matrix properly or how to set the likelhood function well.
your job would be to look at my R script (which otherwise works perfectly) and help me fix it to obtain standard errors that match the ones from the
already-developed functions in the 'polycor' R package.
ps- as a little bit of a guideline, this is a little more complicated than just grabing the 'optim' function, setting hessian=T and taking the square root of the inverse of the diagonal. i'm wondering if something is wrong with the likelihood function (although i hope not because the estimates i get match the ones i would expect)
the R script works fine, i generate good enough estimates but i cannot, for the life of me, get appropriate standard errors (SE). there are functions in R that estimate this index via maximum likelihood so i have been using these as comparison to evaluate my results. they should be the same (within reasonable rounding error of course) but mines are far, far off.
i think this has more to do with the fact that i'm an intermediate-level learner of R/statistics and may not be fully grasping how to obtain the hessian matrix properly or how to set the likelhood function well.
your job would be to look at my R script (which otherwise works perfectly) and help me fix it to obtain standard errors that match the ones from the
already-developed functions in the 'polycor' R package.
ps- as a little bit of a guideline, this is a little more complicated than just grabing the 'optim' function, setting hessian=T and taking the square root of the inverse of the diagonal. i'm wondering if something is wrong with the likelihood function (although i hope not because the estimates i get match the ones i would expect)
Adam K.
0% (0)Projects Completed
3
Freelancers worked with
1
Projects awarded
43%
Last project
12 Apr 2012
Canada
New Proposal
Login to your account and send a proposal now to get this project.
Log inClarification Board Ask a Question
-
There are no clarification messages.
We collect cookies to enable the proper functioning and security of our website, and to enhance your experience. By clicking on 'Accept All Cookies', you consent to the use of these cookies. You can change your 'Cookies Settings' at any time. For more information, please read ourCookie Policy
Cookie Settings
Accept All Cookies