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

Rationalise coxphSLMAassignDS and coxphSLMADS #12

Open
tombisho opened this issue Jun 1, 2022 · 0 comments
Open

Rationalise coxphSLMAassignDS and coxphSLMADS #12

tombisho opened this issue Jun 1, 2022 · 0 comments
Labels
enhancement New feature or request

Comments

@tombisho
Copy link
Collaborator

tombisho commented Jun 1, 2022

coxphSLMAassignDS is designed to store a Cox model on the server side (assign) and coxphSLMADS is designed to return a summary of a Cox model (aggregate)

The only line that should be different is 207, where one returns the summary and the other the complete object.

There are some other differences, though, around these lines:

	    control <- gsub("~ bbbb", "", control, fixed = TRUE)
	    control <- gsub("~", "", control, fixed = TRUE)
	    control <- gsub("bbbb", "", control, fixed = TRUE)     

compared with:

control <- gsub("~bbbb", "", control, fixed = TRUE) 

I think this second one will miss ~ bbbb

Also in terms of maintainability, there should probably be a single function that generates the Cox model and applies the disclosure control (this might be called coxphSLMADS). Then there should be two other functions for the aggregate and assign operations, that call the main function. The aggregate would just call the main function, then do summary() on the coxph object and return to the client. The assign just returns the coxph object which stores it on the server side. That way the bulk of the code is in one place.

@neelsoumya neelsoumya added the enhancement New feature or request label Nov 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants