Emmeans multiplicity adjustment for CIs keeps reverting to Bonferroni?
Reddit » The Statistical Computing with R
by /u/four_hawks
2h ago
I'm reporting results of a binomial GLM predicting a binary outcome (agreement vs. disagreement with a survey item) from a categorical predictor (primary language). I've used emmeans() to test the effect of each language using method = del.eff (since pairwise would produce too many comparisons). I'm trying to obtain the 95% CIs for each effect for plotting; however, emmeans keeps applying the Bonferonni correction to the CIs it calculates, even when I specify to use the Holm correction. This is problematic because some effects that are statistically significant based on the (Holm-adjusted) p ..read more
Visit website
Question about a time-dependent Cox model
Reddit » The Statistical Computing with R
by /u/Goliof
6h ago
I have a variable for age that does not meet the proportional hazards assumption. I am trying to control for it using a time-dependent variable in the model (even though age is time-independent for this project). My question is, how do I do this in R? This is the code I currently have for a model that includes 2 other time-dependent variables. data_tmerge <- tmerge(data, data, id=id, var1_dependent=event(cox_time, var1), var2_dependent=tdc(time_to_var1), var3=tdc(time_to_var3)) coxph(Surv(tstart, tstop, var1) ~ var2 + var3, data = data_tmerge) I'd like to include the variable age to thi ..read more
Visit website
SAS sem model with moderator
Reddit » The Statistical Computing with R
by /u/Lilith_Be_97
6h ago
For my master thesis (sociology) im doing research on dating behavior during the pandemic. I'm doing structural equation modeling in SAS using mainly manifest variables. I want to include gender as a moderator in my model but I keep getting errors and it seems to be impossible to find any examples of sas code/syntax of sem-models with a moderator. Can someone please help? submitted by /u/Lilith_Be_97 [visit reddit] [comments ..read more
Visit website
Hide bars with no data
Reddit » The Statistical Computing with R
by /u/BrokenFridge507
8h ago
Hello, I’ve made this bar chart (using geom_col) with ggolot2. The red circles are sections where there is no data, but R is leaving a gap. Is there anyway to remove this gap? submitted by /u/BrokenFridge507 [visit reddit] [comments ..read more
Visit website
Weights argument in lm()
Reddit » The Statistical Computing with R
by /u/sonicking12
16h ago
submitted by /u/sonicking12 [visit reddit] [comments ..read more
Visit website
Any good resources or tutorials on really good forest plots in metafor? Base/grid graphics is killing me
Reddit » The Statistical Computing with R
by /u/ElPitufoDePlata
16h ago
Howdy, I was wondering if anyone had any videos or documentation on how to fully flex the forest() function? It seems to be a lot of trial and error for me at the moment and the end product just doesn't look as good as other plots I've seen. submitted by /u/ElPitufoDePlata [visit reddit] [comments ..read more
Visit website
Vegan package. Bray Curtis distances
Reddit » The Statistical Computing with R
by /u/Motor_Fig698
1d ago
Hi everyone, I have a (probably) very stupid question. I am trying to analize bacterial composition in different niches. 2 of those niches have the bacterial counts of each species normalised per individual. The other niches do not have that normalization. Therefore, given that Bray Curtis takes into account absence/presence and abundance, I assume I cannot compare all the niches, unless the data of all niches is somewhat normalized (i.e relative abundances) My quesiton is if calculating the bray curtis distances with the vegan package(vegdist(df,method="bray")), the relative abundances are a ..read more
Visit website
Recoding two variables into one
Reddit » The Statistical Computing with R
by /u/sarahmisanthrop
1d ago
Hi! R newbie here. I had one course on R basics in my previous semester at uni, and I'm now writing my thesis using R (a survival analysis). And yes, I tried to search for help on google. I'm working with NHIS data, and none of their race/ ethnicity variables includes hispanic people. they have a whole separate variable for hispanic people. I now want to create a new variable that includes all given races and ethnicities. I also know that the way I recoded my variables probably isn't the best one, but it's how I learned it. In the pictures you'll see that I recoded the the variable racesr ..read more
Visit website
Help with Moderated Mediation
Reddit » The Statistical Computing with R
by /u/hyperbubblesLeo
1d ago
Hi everyone! I am currently trying to learn data analysis with R and need to do a moderated mediation analysis. Here is an example of the model type I am trying to analyze. https://preview.redd.it/lcqjpv1lhmwc1.png?width=348&format=png&auto=webp&s=face5f8916f51e7e2bfbdea2e8a02f6041eb66ae Here is the code I have been trying to run, but I realized I unfortunately am too new with R to be able to fully understand the outputs and thus, what I am missing. Could someone please help me figure out how to get the strengths of the effects in my model, and the significance? Thank you so m ..read more
Visit website
Need to create a function for Specific Growth Rate
Reddit » The Statistical Computing with R
by /u/Thiiiq
2d ago
I need to create a function that I can use to calculate specific growth rate into a new column in my data frame. The function is ln(N2/N1)/(t2-t1) where and N1 and N2 are the weight on days t1 and t2, respectively. It needs to run similar to this delta weight line: sgr$deltaweight <- ave(sgr$weight, sgr$id, FUN = function(x) c(NA, diff(x))) ​ This is my dataset submitted by /u/Thiiiq [visit reddit] [comments ..read more
Visit website

Follow Reddit » The Statistical Computing with R on FeedSpot

Continue with Google
Continue with Apple
OR