[R] Monotone Transformation

spencerg spencer.graves at prodsyse.com
Sat Apr 18 18:47:52 CEST 2009


An alternative to "isoreg" is "smooth.monotone" in the "fda" package, 
though it would doubtless require more work to use "smooth.monotone". 

Hope this helps. 
Spencer

Martin Maechler wrote:
>>>>>> "FJ" == Feng Jingyu <FengJin at BATTELLE.ORG>
>>>>>>     on Fri, 17 Apr 2009 11:22:01 -0700 (PDT) writes:
>>>>>>             
>
>     FJ> Hi, I am trying to use R to mimic what I did in SAS.
>
>     FJ> proc transreg data=x ;
>     FJ>   model identity(GSI)=monotone(group1);
>     FJ>   output out=d2 pprefix=M;
>     FJ> run; 
>
>     FJ> Accroding to SAS documentation, the MONOTONE transfomation algorithm comes
>     FJ> from (Kruskal 1964, secondary approach to ties). I have tried ace. it does
>     FJ> provide some kind of monotone transformation, but it is not what I expected.
>
>     FJ> Here is how sas output look like:
>
>     FJ> Obs      GSI        TGSI     group1    Tgroup1
>
>     FJ> 1     0.81301    0.81301       1      1.55594
>     FJ> 2     0.79359    0.79359       2      1.55594
>     FJ> 3     1.26900    1.26900       3      2.59702
>     FJ> 4     2.02680    2.02680       4      4.29111
>
>     FJ> group1 is the inital value. Tgroup1 is the monotone transformed value.
>
>     FJ> Here is how Transformed value output from ace:
>
>     FJ> $tx
>     FJ> [,1]
>     FJ> [1,] -0.5698602
>     FJ> [2,] -0.1899534
>     FJ> [3,]  0.1899534
>     FJ> [4,]  0.5698602
>
>     FJ> Does anybody have any idea whether I could do the similar thing in R? If I
>     FJ> can do it, which function I should use?
>
> I don't know what exactly you want,
> and I'd never want to read SAS code to understand your question, 
> but it could be that  isoreg()  can solve your problem,
> notably 
> 	rr <- isoreg(x,y)
> 	rr $yf  ## your "transformed" y
>
> Regards,
> Martin Maechler, ETH Zurich
>
>     FJ> Thanks,
>     FJ> Jingyu
>
> ______________________________________________
> R-help at 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.
>
>




More information about the R-help mailing list