Relative Content

Tag Archive for rrstudio

Fasceted Bloxplot in Rstudio – values/data structure

enter image description hereI’m having difficulty making the data for the boxplot fit what I’m trying to show.
Basically, I want the first fasceted boxplot for “tumor” to have the values
2.97 and 2.97 for the first boxplot, 2.9 and 2.97 for the second boxplot, and just 2.6 for the third boxplot (just a line).
And for “adjacent lung”, 1.5 and 2.25; 2.97 and 2.5; and 2.37.
And for “tissue far from tumor”, 2.5 and 2.8; 2.5 and 2.1; and 3.

geepack:: geeglm Error in `contrasts<-`(`*tmp*`, value = contr.funs[1 + isOF[nn]]): contrasts can be applied only to factors with 2 or more levels

I’m using the geeglm() command to fit a logistic regression model via GEE, intending to incorporate an unstructured correlation matrix to capture within-participant correlations (for subjects with two eligible eyes). However, I’ve encountered errors whenever I attempt to specify the correlation structure as unstructured. Instead, when I set the corstr argument to “exchangeable”, the code runs without issue. Since the cluster size is at most 2, both the exchangeable and unstructured correlation structures should yield the same results, requiring estimation of only one alpha. Hence, I’m puzzled as to why one works while the other doesn’t.

simulation of customer distribution in r

I have a Markov chain transition matrix and I’m attempting to simulate client distribution starting from year 1. Clients transition between classes according to probabilities outlined in the transition matrix. Here’s the transition matrix:

RStudio Project Template not working in non-main branch

I followed the guidelines in https://rstudio.github.io/rstudio-extensions/rstudio_project_templates.html and wrote code in a non-main branch inside this R package: https://github.com/jhudsl/ottrpal/tree/127-rstudio-project-template. The dcf file is here and the the template function is here.