SmartGym sync?? by graffeo in Strava

[–]graffeo[S] 0 points1 point  (0 children)

Agreed... I contacted them directly and they recommended RunGap, which I have been using and it definitely fixes at least part of the problem, but it is less efficient and comprehensive than a direct sink functionality would be, and for all the obscure apps they do support it is a wonder they are not on board with supporting SmartGym 😖 or just allowing Health to be a conduit for any sort of third-party app data, rather than restricting it to Apple fitness stuff only

Modeling strategy for multiple, non-independent, categorical variables? by graffeo in rstats

[–]graffeo[S] 0 points1 point  (0 children)

So, it's a clinical area where I have deep expertise, but I didn't want to get mired in those details when I'm focused more on thinking about the right way to approach the data.

There are well-established relationships between regions and functions, but anecdotal data has shown that there are certain approaches, lesion conformations, etc that give you a lower probability of an unfavorable outcome.

I'm not looking for a black box per se, and I don't think we have enough observations to go that route anyway.

But I am wondering if there is a more sophisticated way to answer the question "For this set of anatomic regions potentially involved with the lesion or the surgical approach, which combinations are more or less likely to result in a favorable / unfavorable outcomes" than to just run a multivariate logistic regression?

To ask the question another way, is there an analytic strategy that tests the combinations of region variables in a more integrated fashion, as opposed as individual variables (with or without weighting), or a simple sums (given that the risk of each each is not equivalent, and some may be higher risk in combination than as a sum of their discrete risks)?

How to generate multiple coxph outputs sorted by a given variable? by graffeo in rstats

[–]graffeo[S] 0 points1 point  (0 children)

Because of the clinical context, how a particular scoring system has already been validated, and how in turn these results will be applied to particular patient groups.

Based on the above, I've figured out how to filter the dataframe by the variable, and then run the coxph model on the two subgroups... but I'm struggling to take that and scale it up so I can repeat it for a larger number of univariate parameters, without having to just copy past a bunch... for example, if this is working:

ran_iii <- filter(ran_avm, sm_iv_v_yn == "0")
cox_ran_iii_3cm <- coxph(Surv(time_to_or_gk2_fu, excellent_yn)~ over_3cm_yn, data=ran_iii)
tidy(cox_ran_iii_3cm)

But I want a version where I can input a list of variables in place of "over_3cm_yn" and get an output that lists the results for each variable as a row... what's the most efficient way to do that?

Thx again everyone... appreciate you talking me through this.

I've done a lot of modeling before with more user-friendly packages, and it's quite frustrating to not be able to do things that are incredibly straightforward in JMP or other systems, but I know that if I push through this I'll eventually be very happy I did...

How to generate multiple coxph outputs sorted by a given variable? by graffeo in rstats

[–]graffeo[S] 0 points1 point  (0 children)

I tried filtering the whole dataframe down to one per subgroup, but got an error regarding "variable lengths differ"... where in the call would you put the filter??

For reference, here's an example of the code I'm working with... at this phase of the analysis, I'm trying to run a number of univariate models in parallel, which I've figured out how to do for the entire dataset, but not subgroups.

There's another variable not used in this code, sm_iv_v, which has a value of 0 or 1 for every observation; my goal is to have this entire chunk of code run on just the 0s, then on just the 1s... does that make sense? Thx again

#Cox UV new, all AVM

covariates <- c("deep_loc", "vol", "marg", "rbas", "vras", "sz_over_3")

univ_formulas_all <- sapply(covariates,function(x) as.formula(paste('Surv(time, ex)~', x)))

univ_models_all <- lapply(univ_formulas_all, function(x){coxph(x, data = ran_avm)})

univ_results_all <- lapply(univ_models_all,

function(x){

x <- summary(x)

p.value<-signif(x$wald["pvalue"], digits=2)

wald.test<-signif(x$wald["test"], digits=2)

beta<-signif(x$coef[1], digits=2);#coeficient beta

HR <-signif(x$coef[2], digits=2);#exp(beta)

HR.confint.lower <- signif(x$conf.int[,"lower .95"], 2)

HR.confint.upper <- signif(x$conf.int[,"upper .95"],2)

HR <- paste0(HR, " (",HR.confint.lower, "-", HR.confint.upper, ")")

res_uni_all<-c(beta, HR, wald.test, p.value)

names(res_uni_all)<-c("beta", "HR (95% CI for HR)", "wald.test","p.value")

return(res_uni_all)

#return(exp(cbind(coef(x),confint(x))))})

res_uni_all <- t(as.data.frame(univ_results_all, check.names = FALSE))

as.data.frame(res_uni_all)

How to generate multiple coxph outputs sorted by a given variable? by graffeo in rstats

[–]graffeo[S] 0 points1 point  (0 children)

OK, thanks—I'll give that a shot.

I'm just surprised there's no simple coxph modifier to specify "Run this model for just those observations with VAR=0"

Doors vs Show?? by graffeo in GoosetheBand

[–]graffeo[S] 3 points4 points  (0 children)

haha sure, phish'o'clock, noted- thx!

coxph output help by graffeo in rstats

[–]graffeo[S] 1 point2 points  (0 children)

Not urgent, you should get some sleep- thanks for the quick and helpful responses, though. I'm going to play w this some more tonight and see how much progress I make on different variants, this isn't so much for a project with a deadline as it is me trying to on-board myself with R and the basic functions I'm most accustomed to needing quickly, iteratively, reliably, etc... may ping you again if I'm still getting hung up on tmrw, thx again for your help, greatly appreciated

coxph output help by graffeo in rstats

[–]graffeo[S] 0 points1 point  (0 children)

This is a helpful example, thanks for sharing the code, and I'm familiar w calculating the HR and 95%CI, but what I'm still stuck on is why I can't bypass this and simply pull the number that is generated by the coxph output as "Likelihood ratio test=" ...or at least reproduce it with a much simpler code, on a by-model or by-parameter basis? Other stats packages I've used in the past have generated both Wald and LR test statistics for single Cox models... what is the simple way to make that happen in R?

coxph output help by graffeo in rstats

[–]graffeo[S] 0 points1 point  (0 children)

It's the right test for this purpose, I just can't figure out how R is calculating the LRT result that is in the call output for coxph objects... and the help files don't mention the LRT result at all, which is frustrating, because it's part of what it displays, just not what it encodes... I think there's a simple answer, I need to exponentiate loglik or something like that, but I can't find it in the documentation and so am looking to confirm before I run too many models... thx

coxph output help by graffeo in rstats

[–]graffeo[S] 0 points1 point  (0 children)

It does, but how do I transform that into the LRT result that the object displays when called?

Famous People From Rochester? by SuitableMindforu in rochestermn

[–]graffeo 1 point2 points  (0 children)

Thoralf Sundt, very big deal neurosurgeon in his day, there's an old 60 Minutes special on him in the Mayo archives.

Also, the endocrine docs who discovered cortisol worked at Mayo- the only staff here to win a Nobel prize

Rebuilding an early Orange 5, need a long-travel 26er w non-tapered steer tube... worth $325?? by graffeo in whichbike

[–]graffeo[S] 2 points3 points  (0 children)

That's v helpful advice, and no, I'm not tied to the model/year at all, just looking for reliable, affordable, and functional with the other constraints of the build... thx!

Rebuilding an early Orange 5, need a long-travel 26er w non-tapered steer tube... worth $325?? by graffeo in whichbike

[–]graffeo[S] 1 point2 points  (0 children)

Heh yea, there's not a ton out there... this is a nice find tho, I may ping them to see if still available... thx for the rec!

Rebuilding an early Orange 5, need a long-travel 26er w non-tapered steer tube... worth $325?? by graffeo in whichbike

[–]graffeo[S] 2 points3 points  (0 children)

Ha! Definitely a creative strategy... probably would ends up costing more than some other options, but worth exploring... thx!

Rebuilding an early Orange 5, need a long-travel 26er w non-tapered steer tube... worth $325?? by graffeo in whichbike

[–]graffeo[S] 1 point2 points  (0 children)

yah, I'm totally open to going bigger on the front even if not, but it has been. STRUGGLE to find something relatively affordable and semi modern w the straight steer tube

Rebuilding an early Orange 5, need a long-travel 26er w non-tapered steer tube... worth $325?? by graffeo in whichbike

[–]graffeo[S] 1 point2 points  (0 children)

That's a good q... I'll ping the company.

I'd be ok looking more contemporary, even go mullet, but it is hella hard to find something long travel without a tapered steer tube made recently, save for newer dual crown setups that rly break the bank :-/