Skip to content

Add trans="cloglog" and trans="boxcox"#88

Open
daSilva5 wants to merge 1 commit intobiometryhub:mainfrom
daSilva5:ias555
Open

Add trans="cloglog" and trans="boxcox"#88
daSilva5 wants to merge 1 commit intobiometryhub:mainfrom
daSilva5:ias555

Conversation

@daSilva5
Copy link
Copy Markdown

@daSilva5 daSilva5 commented Dec 6, 2024

Please review and consider including transformations for "cloglog" and "boxcox".

The boxcox transformation is other type than the one in the documentation.

For boxcox I am considering the following transformation to the response variable:

cox<-MASS::boxcox(biom$dry_weight~biom$treatment)
lambda<-cox$x[which.max(cox$y)]
biom$trans_dry_weight<-(dry_weight^lambda-1)/lambda

The response also has a +1 (not shown), so I left the offset in the equation and use offset=1 when applying the function. I also use power=lambda when applying the function.

The predicted values are very close to my data means. However, "low" has negative values, thus transformation might not be correct. I am also unsure about the SE.

I really appreciate if you could fix what I could not get right and implement these two transformations.

I have added code to perform the transformations on L411 to L448.

Kind regards

Add option for back-transformation for "cloglog" link in binomial regression and for other type of boxcox transformation than the one in the documentation.
@rogerssam
Copy link
Copy Markdown
Contributor

Hi @daSilva5, thanks for the PR! I haven't had a chance to check this yet, but will have a look when I get some time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants