Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

daSilva5
Copy link

@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
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