What R packages can I use to test statistical power of zero-inflated negative binomial model?
Reddit » The Statistical Computing with R
by /u/MostlyStatQuestions
1h ago
Hello all! In R, I have used the glmmTMB package to run a zero-inflated negative binomial model. This model had random and nested factors in the model. I originally did a quick and dirty posteriori power analysis using pwr.f2.test from the pwr package. Obviously that analysis was not appropriate because this function is for general linear models. I was planning on using the SIMR package to calculate power for my model since SIMR can be used for generalized linear mixed models. It was built for LME4 models, but I think it can be used for models from other packages. Can I use a model from glmmT ..read more
Visit website
First SEM model and issues with unique factor covariances among reverse scored items in lavaan
Reddit » The Statistical Computing with R
by /u/Big-Experience5952
1h ago
Hi everyone: This is my first time doing SEM and I feel super insecure about my code/results. I do not know colleagues that know SEM and also use R, so I will give a try here: I wanted to test a 'simple' model with 1 predictor (continuos variable) and 1 outcome (latent bi-factorial continuos variable with 4 factors). The structure of the outcome was identified from previous literature. First, I conducted a CFA to check the measurement model. I used the author's code and I reversed the negatively worded items before conducting CFA or SEM (the author did not mention any of this). I also include ..read more
Visit website
Using cluster option in mediate function
Reddit » The Statistical Computing with R
by /u/EntireBlueberry121
11h ago
am trying to conduct a mediation analysis with multi-level data, i.e., individual observations nested in countries. To control for the clustered structure, I want to use the "cluster" option of the mediation package in R. However, I get the following error message: Error in contrasts<-(*tmp*, value = contr.funs[1 + isOF[nn]]) : contrasts can be applied only to factors with 2 or more levels In addition: Warning message: In mediate(model.m, model.y, sims = 50, treat = "treatment", mediator = "mediator", : length of cluster vector differs from # of obs for mediator model There are 112 level ..read more
Visit website
Homework help
Reddit » The Statistical Computing with R
by /u/szbaddie
23h ago
https://preview.redd.it/m7iw9g1cuawc1.png?width=1810&format=png&auto=webp&s=844223abb17d9bd977ee5aac093b78f1d24d28db I don't know why this isn't working. please help. submitted by /u/szbaddie [visit reddit] [comments ..read more
Visit website
What causes this error?
Reddit » The Statistical Computing with R
by /u/burcusenerrrrrrr
23h ago
Hi everyone, I'm trying to perform a Lag Sequential Analysis using "lagsequential" package and I keep getting this error, upon this command: sequential(seqdata, labels = NULL, lag = 1, adjacent = TRUE, onezero = NULL, tailed = 2, permtest = FALSE, nperms = 10) Error: 'list' object cannot be coerced to type 'double' My dataframe consists of one column filled with integer numbers, which should be OK to run the analysis as specified in the package document. How can i resolve this issue? I am a beginner in R btw. Thanks in advance! submitted by /u/burcusenerrrrrrr [visit reddit] [comments ..read more
Visit website
Fatal error: Unexcepted exception: Bad allocation
Reddit » The Statistical Computing with R
by /u/Sufficient_Hunter_61
1d ago
Hi everyone. So today I (stupidly I think) decided to update all R packages after having some trouble getting some function right. Since then, whenever try to run my main code, an error window appears saying "Fatal error: Unexcepted exception: Bad allocation". Then, an error message in the console says: Error in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]) : namespace ‘xfun’ 0.40 is being loaded, but >= 0.43 is required Thereafter, a new error window pops up saying "R Session Disconnected This browser was disconnected from the R session because another br ..read more
Visit website
.Rmd: Error in `parse()`: ! attempt to use zero-length variable name
Reddit » The Statistical Computing with R
by /u/Eucarpio
1d ago
I am relatively familiar with R, but I just started using .Rmd files and have incurred the following error. My "HM.Rmd" file doesn't knit, and gets stuck on a specific line where a code chunk starts. The error in the console says: Quitting from lines 159-263 [Sales] (HM5.Rmd) Error in \parse()`: ! attempt to use zero-length variable name Backtrace: 1. rmarkdown::render("HM5.Rmd") 2. knitr::knit(knit_input, knit_output, envir = envir, quiet = quiet) 3. knitr:::process_file(text, output) 8. knitr:::process_group.block(group) 9. knitr:::call_block(x) ... 11. knitr:::eng_r(options) 14. knitr (lo ..read more
Visit website
A
by
ago
A ..read more
Visit website
A
by
ago
A ..read more
Visit website
A
by
ago
A ..read more
Visit website

Follow Reddit » The Statistical Computing with R on FeedSpot

Continue with Google
Continue with Apple
OR