# Search results

1. ### Bayesian Prediction Intervals

I have been thinking about this every once and awhile - also i will acknowledge that i havent tried to look up the answer my self yet. I thought i would throw it out here at TS and see what you have to say. Say i am running a Bayesian regression model based on MCMC. I end up with a posterior...
2. ### Metrics to compare series

Say I have two series that are related, fictitious example: # marriages and # divorces. So the counts in the second series is a subset of the first series. Now an exogenous boost happened that changed the counts (dampened the accumulation) in the first series and this is now seen in the second...
3. ### Plotting a new series on top of old

Well, I don't quite have a solution in my brain or way to phrase this for a WWW search. I 'plot' a series (x = time, y = count) in base plot, then I run "par(new = TRUE)" and plot a new series (x=time, y = count/n) on top of the old and label the second y-axis accordingly to account for units...
4. ### Series of doubled numbers

I am looking for a way to double a number (i.e., "3") until I get to around 3 million; resulting in a series that I can plot. Solution: 3, 6, 12, 24, 48, 96,..., ~3M
5. ### Association estimate (partial reverse temporality)

I have a project where i modeled variables associated with a target variable. I used logistic regression. My issue is that covariates are causes of the target and some are effects. This seems bizzarre and is regularly done in the field of medicine. Say i am looking at an injury and variables...
6. ### COVID19 Infographics

Hello all, I created this thread to compile interesting COVID19 graphics, charts, depictions, even comics. Please keep it tasteful and educational. Below is the mother of all graphics and the GitHub data source...
7. ### Repeated Measures

I will acknowledge that I dont get a lot of repeated measures data. Someone is working on getting me some data. Simplified, it will consist of a treatment variable, binary(X), and a continuous outcome for subjects across time. People will likely get the same treatment across time (X=0) up until...
8. ### Correcting Probabilities for Artificially Balanced Data

I have data from a frequency matched case-control study. All that needs to be known about that is the outcome variable is artificially balanced (50:50), when the true ratio is actually (10:90). When you run logistic regression on these data all outputs are correct (if generalized to the original...
9. ### Prior in this Bayesian Analyses

I have done the following, based on code from the below link: n1 = 321 # Pre y1 = 313 # OUt-of-Range n2 = 356 # Post y2 = 49 # Out-of-Range # SIMULATION I = 10000 # simulations theta1 = rbeta(I, y1+1, (n1-y1)+1) theta1 theta2 = rbeta(I, y2+1, (n2-y2)+1) theta2 diff = theta1-theta2 #...
10. ### Feed Varlist into Calculation

I have a dataset which I want to add a new variable (column) based on a calculation of existing variables in the set. But I want to repeat the process for eight variables and I AM hoping to do it in one step. So I would feed in a varlist into the line of code and generate the 8 new terms. See...
11. ### Converting Classification Tree to Logistic Reg

I have a dataset with a binary outcome. I fitted a two spit classification tree to these data. Both splitting variables were natural binary variables. I then fit a logistic regression model to the dataset based on the tree, so I included the two binary variables and their interaction term. All...
12. ### One-Sample Bayesian Proportion Test

https://www.lexjansen.com/phuse/2011/sp/SP08.pdf In the above (short) paper, the authors present an approach for a one-sample Bayesian proportion test with uninformed and informed priors. Below I have presented code for the informed setting, which consists of just a few lines of code. However...
13. ### Repeat Function Across Rows

I am trying to run a bunch of values through the evalues.RD function in the EValue package in R. The function just wants inputs for 4 integer values: install.packages("EValue") library(Evalue) evalues.RD(300,20,10,310) However, I want to run a bunch of values through the function. The...
14. ### Connected Dot and Whisker Plot (with Histograms)

Hey, I am wanting to make a connected dot and whisker plot, but instead of dot whiskers it has a 90 degree rotated histogram. I know I have seen these before. Doing this in R would be fine. So on the X-axis will be an ordinal variable represented by five values (e.g., 1K, 2K, 3K, 4K, 5K) and...
15. ### Seasonal Time Series

Hey y'all, I am looking for suggestions for a seasonal time series. Ideally with at least four years (season cycles). I am soliciting suggestions for novel sets, not just the typical ones published in textbooks our used as online examples. Perhaps something current or perhaps esoteric. Thanks...
16. ### Multilevel regression with two clusters

Well I am revisiting a project that is giving me mental fits. I am going to give a comparable example. Say I have a binary outcome for a picture interpreted as containing a man or woman and I know the truth so the DV is correct classification yes or no. Now I have fifty pictures reviewed by...
17. ### Dose Response Curve (log logistic regression)

Hey, I had someone ask me if I could create a dose response curve for them. They have a dose amount and associated response which is a time to event. I believe everyone will have an event, so I have a continuous response value to work with (but I have a feeling there will only be 2-3 dose...
18. ### Continous (Ordinal) Outcome with Middle Group as Target

I had someone send me an idea for a project. The dependent variable is continuous, though they are interested in predicting the middle region. So imagine a value of 0-infinity and they want to trichotomize data into 0-10; 11-20; 20+, with 11-20 as the target. The context is that the middle...
19. ### Sad Shiny App won't work for Logistic Reg MLM Power Calc

I am trying to use a shiny app for a simple logistic regression multilevel model power calculation. But every time I click on the 'Covariates' option to change it to '1', I get 'disconnected from server'. Is there anyone out there at all that can walk me through this. I have 47 subjects with...
20. ### Weighted Cohen Kappa (R)

Well I am attempting to get some code ready to calculated two rater Cohen Kappa inter-rater reliability with Fleiss-Cohen weights with 99% CIs. I am trying to use R and figured I would post this to see if you all can save me some time. Toy dataset: NB <- read.table(header = TRUE, text = "...