Comments (6)
Thanks Jan.
Yes I see that.
An alternative workaround is this:
colon_s %>%
glmmulti("mort_5yr", "age.factor") %>%
fit2df(condense = FALSE) %>%
dplyr::select(-p) %>%
condense_fit()
Interested in your thoughts.
from finalfit.
Nice!
Wouldn't call it a workaround but rather a solution.
But not easy to find out. Maybe an example in the help file would be good.
from finalfit.
You are my hero, Thanks.
from finalfit.
I’ve never done it before which is why it isn’t documented 😬
I’ll add it.
There’s lots of variations here. Had you found that?
https://finalfit.org/articles/all_tables_examples.html
Thanks again.
from finalfit.
Of course I had a look at https://finalfit.org/articles/all_tables_examples.html
But if I am not mistaken, there is also no example with condense = FALSE
There is one other point which could be improved:
In epidemiology we are interested in row percentages not in column percentages.
If you look at your example: 2.01 Default Logistic regression first.
You are interested how different risk factors/exposures influence disease outcomes.
E.g. is case fatality higher in age < 40 compared to 45-60
The row percentages are also closer to the odds ratio which is on fact:
(Alive[risk]/Dead[risk]) / (Alive[no-risk]/Dead[no-risk])
I applied your trick mentioned above:
df <- data.frame(out=factor(rbinom(200,1,.5)), a=factor(rbinom(200,3,.5)), b=factor(rbinom(200,4,.5)))
ff <- df %>% summary_factorlist("out", c("a","b"), fit_id=TRUE) %>%
finalfit_merge(
fit2df(glmmulti(df, "out", c("a","b"), family = binomial), condense = FALSE) %>%
dplyr::select(-p) %>%
condense_fit()
)
But I think an argument column in funtion finalfit or finalfit.glm would be easy to implement.
Maybe something like:
finalfit.glm = function(.data, dependent, explanatory, [...]
keep_fit_id=FALSE, column = TRUE, ...){
summary.out = summary_factorlist(.data, dependent, explanatory, [...] , column=column,
from finalfit.
Hi,
If you pull from github you can now choose row proportions column = FALSE
in finalfit()
which is the new default.
devtools::install_github('ewenharrison/finalfit')
You can also use the helper function ff_remove_p()
which will do as it says for any Finalfit condensed output. Let me know if there are issues. Thank you again.
from finalfit.
Related Issues (20)
- ff_remove_ref for summaryfactorlist HOT 4
- finalfit results in table with "Coefficient" instead of "OR" HOT 3
- ff_plot with interaction HOT 2
- Feature Request: Random effect in univariable models HOT 3
- finalfit does not show median, only mean HOT 1
- inverse OR in finalfit in R continuation closed event
- Fine-gray model visualization HOT 2
- Extending cont_cut to or_plot HOT 1
- Adjust axes for coef plots? HOT 1
- Multinomial Logistic Regression HOT 4
- About modifying the hr_plot function HOT 3
- Error with or_plot HOT 2
- `fct_explicit_na()` was deprecated in forcats 1.0.0 HOT 1
- missing_compare - discrepancy in the manual (Kruskal-Wallis) HOT 1
- `Namespace in Imports field not imported from: ‘tidyselect’` HOT 1
- The output from the stratified models example does not align with the results of the stratified Cox model. HOT 4
- Table format of the finalfit output only gives HTML format script HOT 4
- Potential bugs finalfit command HOT 1
- Finalfit package: Descriptive statistics query for p values and getting Median as statistics HOT 1
- p>0.05, but 95% confidence interval for the odds ratio DOES NOT include 1. How can I check and standardise the methods used to calculate the p-values and confidence intervals? HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from finalfit.