# Search results

1. ### Multiplicative Change

Hey, I am still playing around with the gamma reg with log link. The model kicks out a coefficient for my continuous IV. I can then exp the coefficient to get the multiplicative change in the DV. In an estimate statement I can get the estimate for different values of the IV. I was curious if...
2. ### Linear Regression Alternatives if DV Zero Bounded

Any suggestions how to proceed when dependent variable (lab value) is zero bounded. See below:
3. ### Prob Biden Wins WI in 2020

I did this quick for @Dason! ################################################ # Monte Carlo Simulation B = 1630337 T = 1609640 Tot_counted = B + T Counted_Per = 0.97 State_Tot = Tot / Counted_Per Outstanding = State_Tot - Tot Lead = B - T N = 100000 set.seed(2020) y_rbeta <- rbeta(N, shape1 =...
4. ### Percent Portion of Logged DV

Well my brain is not on today. I have a continuous outcome, I was going to run a regression where if a categorical variable's coefficient(X1) was greater than 110% of the reference group (intercept) my hypothesis would not be supported. Since this is a non-inferiority hypothesis and bigger...
5. ### ROPE value in Bayesian Regression

I am fitting a Bayesian regression model. The outcome is continuous (patient length of stay; a little skewed) and the independent variable is binary (treatment; y/n). There are a couple of covariates (continuous) in the model as well. I wanted to test that patients in the treatment group do not...
6. ### Bayesian proxy to Huber-White Estimators

I am working on a study where a very small portion of the sample contribute more than one observation. I was wondering if there was a Bayesian proxy to the Huber-White estimator or robust regression? I was actually planning on using non-informative priors since it is novel research and there...
7. ### 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 myself 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...
8. ### 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...
9. ### 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...
10. ### 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
11. ### 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...
12. ### 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...
13. ### 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...
14. ### 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...
15. ### 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 #...
16. ### 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...
17. ### 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...
18. ### 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...
19. ### 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...
20. ### 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...