Ilaria Pascucci
2016-Jul-13 09:47 UTC
[R] CensMixReg package - clarifications and working example
Dear All, I am relatively new to R but I am very interested in using some of the available packages for astronomical applications. While I have been able to understand and use other packages like cenken, I have some difficulties with CensMixReg. Here are the specifics (with info on R and package versions at the end of the email), I would really appreciate your help. 1. First I tried to run the example in the CensMixReg.pdf file that accompanies the download. While I could reproduce the " left mixture censored Student-t model fit to the data? (first example), the ?left mixture censored Normal model fit to the data? fails with the following error message: Error in `row.names<-.data.frame`(`*tmp*`, value = value) : invalid 'row.names' length Is this issue documented somewhere? 2. Also in the CensMixReg.pdf file it is suggested to use the imm.fmcr function to compute the uncertainties. However, the function does not seem to be part of the CensMixReg or CensRegMod libraries (IFmixRegT <- imm.fmcr(y,x1,cc, fitT) -> Error: could not find function "imm.fmcr"). I searched the R site but could not find the imm.fmcr function. I am wondering if this is now osbolete and if there is another function to compute uncertainties from the CensMixReg output. 3. Finally (and this is maybe the most important part), I am missing a working example with clearly laid out inputs and outputs to use confidently the CensMixReg package. Does anybody have such an example? More specifically, I was not sure of the transformation of x into x1 in the CensMixReg example (where there is an extra column of 1 in x1), is this to have the constant to the fitted line stored in beta0? Are the other betas the slopes of respectively age, educ and hours/1000? Where are the uncertainties on the slope and intercept stored? Thank you very much in advance. With best wishes, Ilaria == Info on R and package versions:> sessionInfo()R version 3.3.0 (2016-05-03) Platform: x86_64-apple-darwin13.4.0 (64-bit) Running under: OS X 10.10.5 (Yosemite) locale: [1] C attached base packages: [1] stats graphics grDevices utils datasets methods base other attached packages: [1] CensRegMod_1.0 CensMixReg_0.7 loaded via a namespace (and not attached): [1] tools_3.3.0 mvtnorm_1.0-5 mixsmsn_1.1-1 ************************************ Dr. Ilaria Pascucci Associate Professor Department of Planetary Sciences The University of Arizona ilariapascucci.com ************************************ [[alternative HTML version deleted]]