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

Adding Bland- Altman statistical function #1135

Merged
merged 20 commits into from
Jan 22, 2024

Conversation

linc50
Copy link
Contributor

@linc50 linc50 commented Nov 20, 2023

Pull Request

I have added the Bland-Altman sfunction, which can be used to assess the agreement between two quantitative methods of measurement. Please kindly help to review the code.

Thanks,
Chanjuan

linc50 added 4 commits March 27, 2023 09:44
Merge branch 'main' of github.com:dl1248/tern into main

# Conflicts:
#	R/bland_altman.R
@linc50
Copy link
Contributor Author

linc50 commented Nov 20, 2023

close issue #850

R/bland_altman.R Outdated Show resolved Hide resolved
R/bland_altman.R Outdated Show resolved Hide resolved
R/bland_altman.R Outdated Show resolved Hide resolved
R/bland_altman.R Outdated Show resolved Hide resolved
Copy link
Contributor

@Melkiades Melkiades left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @linc50 for working on this :)

We need a NEWS entry, the documentation is not present (you need to roxygenize and add description and fix the reference), and we need to have this statistical function is some tabulation example, test and list of stats (see get_stats). I would also consider moving this to a file that has similar statistical functions as the name itself does necessarily cut it for a self-explanatory file. Remember to use the styler btw ;)

R/bland_altman.R Outdated Show resolved Hide resolved
@shajoezhu shajoezhu linked an issue Nov 30, 2023 that may be closed by this pull request
16 tasks
1. use <- instead of =
2. remove redundant line break
3. add more clarity for parameter description
4. add more details for @description
5. move the bib information to REFERENCES.bib under tern
R/bland_altman.R Outdated Show resolved Hide resolved
R/bland_altman.R Outdated Show resolved Hide resolved
@shajoezhu
Copy link
Contributor

Hi @Melkiades , we will update this PR with a g_bland_altman function

@Melkiades
Copy link
Contributor

Hi @Melkiades , we will update this PR with a g_bland_altman function

Ok super! so far, I think we have used the main user-facing (tables/plot) functions to name and direct files' content. I would probably wait to have the plot function and name it as you suggested, g_bland_altman. We can always refactor stats and methods to have a different semantic grouping at a later time (also after Daniels' work maybe?)

@shajoezhu shajoezhu self-assigned this Jan 5, 2024
@shajoezhu shajoezhu requested a review from Melkiades January 18, 2024 17:18
Copy link
Contributor

@shajoezhu shajoezhu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm! hey @Melkiades , I was wondering if you would want to take another look, Thanks

@shajoezhu shajoezhu requested a review from pawelru January 22, 2024 02:07
Copy link
Contributor

@Melkiades Melkiades left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@shajoezhu, we can proceed with this, but I would appreciate a little clarification. There is no primary a_bland_altman function or some rtables-related function. I understand this could be part of a plan to add statistical functions for other packages or for other uses. If this is the case, I suggest we group them in a file (e.g. general_stats or external_stats) where we specify that they are for external uses; I expect more functions will gather there.

On the technical side, it is missing the function references in pkgdown and needs the plot function test.

@shajoezhu
Copy link
Contributor

@shajoezhu, we can proceed with this, but I would appreciate a little clarification. There is no primary a_bland_altman function or some rtables-related function. I understand this could be part of a plan to add statistical functions for other packages or for other uses. If this is the case, I suggest we group them in a file (e.g. general_stats or external_stats) where we specify that they are for external uses; I expect more functions will gather there.

On the technical side, it is missing the function references in pkgdown and needs the plot function test.

Thanks @Melkiades , I created an issue #1175 to follow up on the ggplot test, let's do this after we resolve the svg plot testing issue.

the s_ function was dedicated for supporting the plot, there is no need for table at this moment, we had looked up on the standard before, and there was no example there.

I thought g_ pattern should allow us to add this to pkgdown site, correct me if I was wrong. probably no need to duplicate materials on the s_bland_altman function. thanks

@Melkiades
Copy link
Contributor

@shajoezhu, we can proceed with this, but I would appreciate a little clarification. There is no primary a_bland_altman function or some rtables-related function. I understand this could be part of a plan to add statistical functions for other packages or for other uses. If this is the case, I suggest we group them in a file (e.g. general_stats or external_stats) where we specify that they are for external uses; I expect more functions will gather there.
On the technical side, it is missing the function references in pkgdown and needs the plot function test.

Thanks @Melkiades , I created an issue #1175 to follow up on the ggplot test, let's do this after we resolve the svg plot testing issue.
Thanks 👍

the s_ function was dedicated for supporting the plot, there is no need for table at this moment, we had looked up on the standard before, and there was no example there.
I see, then LGTM! 👍

I thought g_ pattern should allow us to add this to pkgdown site, correct me if I was wrong. probably no need to duplicate materials on the s_bland_altman function. thanks
Good point. It is true ^^, hence the absence of error in ci/cd

Copy link
Contributor

@Melkiades Melkiades left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Thanks for working on this ;)

@shajoezhu shajoezhu merged commit 4e64a33 into insightsengineering:main Jan 22, 2024
23 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add a Bland-Altman analysis function
5 participants