Re: [R] areg.boot use of inverseTrans and ytype

From: Frank E Harrell Jr <f.harrell_at_vanderbilt.edu>
Date: Sun 18 Jul 2004 - 03:55:58 EST

Anne wrote:
> Hi R helpers!
>
> I'm still a bit ( alot) confused by the use of "inverseTrans" and "ytype" in areg.boot (Hmisc): What I want to do seems very simple, but I do not get the result I want:
> plot the predicted values in the original scale. (I did not understand the documentation, sorry!)
>
>
> for instance the following code
> f<-areg.boot(Pe[here]~monotone(t[here])+monotone(v[here])+I(Pa[here]-Pm[here])+......,B=100)

In models don't subset every variable. Use subset=here.

>
> f.origScale<-Function(f,ytype="inverse") # works up to here OK, back to original Pe scale
>
>
>
> Now if use predict() to make prediction for given input values , how do I transform the result back into the original response scale?
>
> (in the documentation:
>
> A 'predict' method computes predicted
> values on the original or transformed response scale, or a matrix
> of transformed predictors)
>
>
>
> so I tried
>
> y.predicted<-predict(f,data2predict, type='inverse') #result is in transformed scale
>
> y.predicted<-predict(f,data2predict, type='fitted',scale="original")....without success

y.predicted <- predict(f, statistic='fitted') # similar to statistic='median'

>
> (I did not find the documentation for the predict method of areg.boot)

It's there. Do ?areg.boot and you'll see it.

Frank

>
>
>
>
>
> as the inverse transformation of response obtained by areg.boot is not analytical, I do not see how I can use inverseTrans
>
>
>
> .
>
>
>
> Thank for any help
>
>
>
> Anne
>
>
>
> ----------------------------------------------------
> Anne Piotet
> Tel: +41 79 359 83 32 (mobile)
> Email: anne.piotet@m-td.com
> ---------------------------------------------------
> M-TD Modelling and Technology Development
> PSE-C
> CH-1015 Lausanne
> Switzerland
> Tel: +41 21 693 83 98
> Fax: +41 21 646 41 33
> --------------------------------------------------
>
> [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help@stat.math.ethz.ch mailing list
> https://www.stat.math.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
>

-- 
Frank E Harrell Jr   Professor and Chair           School of Medicine
                      Department of Biostatistics   Vanderbilt University

______________________________________________
R-help@stat.math.ethz.ch mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Received on Sun Jul 18 08:07:52 2004

This archive was generated by hypermail 2.1.8 : Wed 03 Nov 2004 - 22:55:03 EST