# r

1. ### p-values histogram for random effects

I have recently come across with this post: http://varianceexplained.org/statistics/interpreting-pvalue-histogram/ it was great to understand better what my results mean, but I still have a remaining question I can seam to find the answer for. To give you some context, I work with DNA...
2. ### Test Durbin Watson(error independence)

Hello, I am solving an example of Design of experiments of a variable (DCA). It turns out that, on having applied logarithmic transformations, durbin watson throws a similar value, being the different graph library(lmtest) tb = data.frame("treat" = factor(x = c(rep(1:5, c(4,4,4,4,4)), labels...
3. ### how to create a portfolio using xts time series

Hello, I have already corrected the stationary of my elements with diff, but to analyze the VaR (), CVaR (). It is necessary to create a portfolio, I have seen many packages that have left me confused. How is the procedure to create a crypto portfolio? that is I must assign all the columns of...
4. ### Lagged values in a LASSO regression

Hi all, While working on the statistics for my thesis, I became confused while building up my model. I am currently working on a forecasting model with the use of a LASSO regression. The model is build as follows: the unemployment rate is the dependent variable and as exogenous variables I...
5. ### Kaplan-Meier graph: is my input data correctly structured for analysis in R?

(to be removed sorry)
6. ### How to deal with non-proportional hazard Cox models?

Dear all, I want to run a Cox model to see if there is an interaction between two treatments. However, the test to see if proportional hazard is respected suggests that it is actually not respected. So I don't know what other statistical survival analysis to do because it means I cannot rely on...
7. ### R: Survival and censored data: how structure my input datasheet?

Dear all, I would like to know how to organize the datasheet to import in R for survival analysis (Surv object, logrank test and Coxph). Let's consider an experiment with small animals. A cohort of 600 individuals is being followed-up every two days for 6 days (so I have data at day=0, 2, 4...
8. ### Logistic regression for factorial design: interaction and main effects of treatments

Hi, This is my first post here. I'm hoping to get some help/feedback for the following hypothetical problem: I have a factorial experimental design with 4 groups: (1) Controls, (2) Treatment A, (3) Treatment B, and (4) Both treatments A and B. A total of 100 patients were randomly allocated in...
9. ### Independent, non-normal, unbalanced, analysis of an interaction effect

I have previously used straightforward two-way ANOVAs for comparing bone density across sport disciplines. I have males (M) and females (F) across low impact (LI) and high impact (HI) sports (N = 92). I have 24 males and females in in the LI group, 19 females in the HI group, but 39 males in the...
10. ### Am I dealing with outliers, or something else (skewness of 106)?

So I have not exactly a homework problem, but I just discovered how fun statistic modelling is, and usually I use already clean datasets. However, I am dealing with a credit default dataset that a lecturer showed me as a challenge. I want to do a logistic regression, a random forest, and XGBoost...
11. ### Alternative to Spearman correlations in R when data is not independent?

Hi everyone, I'm working with a dependent variable which is the number of individuals of an species. The way in which we counted the individuals is along transects, so we have number of individuals in at least 7 plots at different distance from a plantation (from 0-20 m, 20-40 m, 40-60 m, etc)...
12. ### a function created does not work

Hello, I had created a function and I aimed to verify if it complies with certain data and if it was, then it is stored in another variable. data = c(12, 20, 11, 16, 18, 32, 22 , 8) class = function(N){} tabla1= c(1:8) for (i in length(N)){ if (data[i]<21.78){ table1[i]= data[i]...
13. ### Test for Multicollinearity

Hello Talk Stats Forum! I am working on building a Predictive Model using the binary logistic regression and LASSO logistic regression. In order to apply these models on some real data set I am using R software. Before performing such a model I am testing for multicollinearity and will remove...
14. ### [R] Probability of sample proportion given true proportion

Hi everyone, First post here. I am looking for feedback on the results of my analysis of a sample proportion. My aim is to determine the probability of observing a sample proportion given a true proportion. In my example, my true proportion is 0.85 and my sample proportion is 0.82. My sample...
15. ### Estimating Likelihood of NFL Game Outcomes

Hey all, similar to last year, I'm passing along the tracker for the top 4 statistical model trackers for the season. https://tinyurl.com/ybwyffu3 Good news is that they are all at 100% so far...
16. ### How to deal with individual pseudoreplication?

I am trying to deal with pseudoreplication of individuals in my study, and not quite sure how to handle it. I have been trying to account for individuals being sampled multiple times (twice usually) using a GLMM with individual ID as a random intercept. However, I think that the number of ID's...
17. ### Markov chain with covariates

Hi everyone, My first post! :-) I apologize for how long it will be, but please bear with me. I am looking for help in a topic related to Markov chain modeling with covariates. I have a decent knowledge of the underlying theory, but not exactly how to implement some aspects of it in practical...
18. ### I need someone to write me a basic code please!!

Hi, I am learning basic programming with R, and I desperately need someone to write me a PSEUDO code and code for it please: Here's the situation "you have been sentenced to die tomorrow, but you're offered a way out... you get given 12 red balls and 12 blue balls together with two urns...
19. ### GLM question

Hi guys, I have done my GLM model fitting on R and I was wondering if someone could help me with the following question : What is the probability for a male student to be admitted to department B? We have to use 'fit1' to answer the above question but I can't quite figure it out...
20. ### Tukey's HSD following repeated measures ANOVA using ezANOVA package

Hi, I have a longitudinal balanced tendon injury study with two treatment groups of horses (n=6/group) with 5 measurements over 6 mos measured on multiple MRI sequences. I have multiple questions with how I want to analyze this information, but my current question is the most pressing: Below...