Disposition of functions that use OpenMx

Attachment | Size |
---|---|
polychoricFunction.R | 4.05 KB |
Question is, how should I dispose of this function? Obviously it needs a bit more tidying up - error checking on input, testing, documentation etc. but it could be quite handy. Comments welcome.
> polychoricMatrix(data[1:2])
Running model
$polychorics
t1neur1 t1mddd4l
t1neur1 1.0000000 0.2766488
t1mddd4l 0.2766488 1.0000000
$thresholds
t1neur1 t1mddd4l
Threshold1 -1.90078018 0.5352623
Threshold2 -0.60288738 0.5352623
Threshold3 -0.05787172 0.5352623
Threshold4 0.35325948 0.5352623
Threshold5 0.76300674 0.5352623
Threshold6 0.97337736 0.5352623
Threshold7 1.25752996 0.5352623
Threshold8 1.52144325 0.5352623
Threshold9 1.63884649 0.5352623
Threshold10 1.85627069 0.5352623
Threshold11 2.08894746 0.5352623
Threshold12 2.41675886 0.5352623
$polychoricStandardErrors
[,1] [,2]
[1,] NA 0.06604162
[2,] 0.06604162 NA
$Minus2LogLikelihood
[1] 2015.439
home for polycor
Nice function.
As polycor is a john fox package, I'd suggest asking if he might use your innovations in his package?
It might be too, that calling openmx can be made optional, i.e., if it is present then use it, if not, then use what ever ML optimizer is being called inside the existing polycor? Not sure what the efficiencies are here.
That way all the polychoric innovations can be kept in one place?
Log in or register to post comments