Questions tagged [r]

Use this tag for any *on-topic* question that (a) involves `R` either as a critical part of the question or expected answer, & (b) is not *just* about how to use `R`.

Filter by
Sorted by
Tagged with
1
vote
0answers
14 views

How to conduct a meta-analysis on ICCs (i.e., test-retest reliability)?

I have calculated two-way single consistency ICCs in R using the irr package. There are multiple ICCs representing test-retest reliability across these time points. Is there a way to compute a meta-...
0
votes
0answers
6 views

Radial Basis Network and Multilayer Perceptron Network regression in R

I am new to R and I try to make a simple regression problem using a radial basis neural network and a multilayer perceptron neural network. With the following code: ...
0
votes
0answers
8 views

Joint Model predictions without data stored

I've produced a Shiny app which allows users to run Joint Model predictions using a model object JM created by the JM package in ...
0
votes
1answer
31 views

How to assess the difference between columns?

I have a data frame of enrichment scores for each sample with each gene signature. This is a study about a cancer drug. It has too many variables, this is a small chunk of it: ...
0
votes
0answers
26 views

A posterior predictive check using R

Question: On page 120, the data from the SAT coaching experiments were checked against the model that assumed identical effects in all eight schools: the expected order statistics of the effect sizes ...
0
votes
0answers
23 views

Small bias but low coverage probability

I tried my codes on 100 and 500 simulation data. Each data has 100, 500, or 1000 observations. The number of simulated data did not affect much of my results. However as I increased the number of ...
0
votes
1answer
25 views

Time varying effect in time dependent cox model

In the case of Stanford heart transplant dataset (jasa), is it possible to check if the effect of the time dependent covariate of transplant is time varying as well ? If that's the case can we compute ...
0
votes
1answer
20 views

Climate change calculations? [closed]

Sorry for the stupid question, but I have been unable to answer it even after wasting time googleing for a while... I know there are several climate-changes scenarios, and I know the several climatic ...
4
votes
0answers
29 views

Do I control for different effects by adding the variables to the regression?

I'm trying to understand the dynamics of fixed effects in R. Regression without FEs: lm(return ~ esg_score + education, data = df) Do I manage to control for: ...
1
vote
0answers
12 views

What is the coefficient that shows whether there is a positive or negative relationship between variables in vector error correction models?

I am trying to estimate the long-run and short-run relationship between variables. Based on the Johansen cointegration analysis it was concluded, that there is one cointegrating relationship. The next ...
1
vote
1answer
17 views

Power Analysis result weird for multiple regression in R

I have a glmer model: glmer(kept ~ agent_liking*.loneliness + (1|participant_id),family = "binomial", data = d) We collected 150 participants for study 1 ...
0
votes
0answers
15 views

Testing for the significance of a random effect in a mixed model using R

This is cross-posted here on stack overflow. This might be a better question for stack overflow, so apologies if that is the case. I am working with the lme4 ...
1
vote
0answers
19 views

What is the coefficient that shows whether there is a positive or negative relationship between variables in vector error correction models? [closed]

I am trying to estimate the long-run and short-run relationship between variables. Based on the Johansen cointegration analysis it was concluded, that there is one cointegrating relationship. The next ...
3
votes
1answer
42 views

Do the levels of a random effect need to be present in all the levels of a fixed effect?

Study design In our study, we have a 2x2x2 design with factors Prime (determiner, pronoun), Category (noun, verb) and ...
1
vote
1answer
51 views

Why are my chi squared results and logistic regression so much different?

Ok, backstory: Per my understanding, based on stuff like this, chi squared tests and logistic regressions can often be used for fairly similar purposes. That's not to say they should have the same ...
0
votes
0answers
8 views

Generate event profile in R for timestamp format

I'd like to have your thoughts about an approach I'm trying to work on, and I'm a little bit lost would like to have your insight where I'm reading some research papers and looking into different ...
0
votes
0answers
34 views

How to not get negative values in the forecast?

Data - Monthly Rainfall of a region for the past 20 years. Objective - To Forecast for the next 2 years. In the collected data, 10 out of 13 values for January are 0s and the other three are (1.9, 0.9,...
1
vote
0answers
17 views

R or Excel: Calculate difference between dates [closed]

I have a list of course completion dates (person, start, end) in the following format (exemplary): Person X || Sept 21, 2021 06:30 PM || Sept 21, 2021 06:50 PM Now I'd like to calculate the overall ...
0
votes
0answers
8 views

Significance testing for two MLE estimates from the same model R

First of all, sorry if this is something I should be able to find an answer for easily via Google (I haven't, hence why I ask here!). I'm using optim in R to obtain ...
0
votes
0answers
56 views

Can the Response Variable ever be used in Clustering?

I have the following question: Can the response variable ever be used in a clustering algorithm? I understand that in general, clustering is considered to be an "unsupervised learning algorithm&...
1
vote
0answers
16 views

GAMM with BETAR(Link = "Logit") [closed]

I'm trying to use betar in gamm4 models but keep hitting an error. As far as I can tell, betar is one of the families that should be available - can anyone identify why I would keep hitting this error?...
0
votes
0answers
14 views

Correct syntax for random coefficient in Cox with time-varying predictors using R coxme

thanks for helping! I am testing a repeated measures dataset (multiple rows per participant) in a multilevel Cox regression with time-varying predictors. I'm trying to see if effects vary by assessor. ...
0
votes
0answers
15 views

How to calculate eigen-decomposition for a positive kernel in R^2 using R

Suppose $K$ is a continuous positive semi-definite kernel on $\mathcal{T} = [0,1]\times[0,1] \subseteq \mathbb{R}^2$. By Mercer Theorem, there is a eigen-decomposition of $K$ such that $$ K(x,y) = \...
0
votes
0answers
13 views

Is there a minimum variance explained for a random forest model, below which variable importance shouldn't be interpreted?

I am running several random forest regression models on different datasets. In each, I have a continuous DV and ~30 dichotomous predictors. I don't expect these predictors to explain much variance. ...
1
vote
0answers
130 views

R best subset selection to find (1) what the single best variable is, (2) what the first variable is, and (3) what the last variable is

I am trying to analyse this dataset using best subset selection: I perform best subset selection using the R regsubsets function as follows: ...
0
votes
0answers
16 views

Generating Likert-type response: A follow-up

I want to follow up on this great answer. The answer explains in an intuitive way how to generate Likert-type responses for any number of items from N participants ...
0
votes
0answers
6 views

How does cforest() treat a continuous dependent variable?

I'm specifically talking about the function in the party package. When it is given a continuous DV, does it just do a median split and then categorize observations into the high vs. the low half?
0
votes
1answer
14 views

How to decide if I need to use weights in regressions in R

I have a dataset which is a combination of some survey results and some demographics. All survey results are normalized by population density. Now I want to design a model to see the relationship ...
4
votes
0answers
83 views

Are there any General Proofs on Genetic Algorithms?

Are there any general proofs or theorems relating to "genetic algorithms"? I have been reading about a theorem in math called the "Schema Theorem" - this theorem is one of the ...
0
votes
0answers
11 views

Do all Decision Trees output "Rules"?

Do all Decision Trees provide "rules"? Recently, I read about a new decision tree algorithm called "Reinforcement Learning Trees" (RLT) which supposedly has the potential to fit &...
1
vote
1answer
75 views

forecast results does not change as the covariate variables change

I am trying to forecast a time series using the bsts package. The data is as follows: The data is collected monthly and the goal is to forecast ...
0
votes
0answers
19 views

Mixed- effect model tree in Bayesian Framework

I am currently analyzing a mixed- effects model with a small number of random effect levels (n=2) and a continuous outcome. Is there any possibility to impose a prior over the covariance matrix of the ...
3
votes
1answer
39 views

Quantile regression showing different results with same tau

I am using the quantreg package from R to calculate quantile regression between 2 columns : red pixel values and near infrared pixel values (target). But the problem is that it gives me different ...
0
votes
1answer
30 views

How do you interpret outputs of Cox regression based on data type of an independent categorical variable?

I have the following data frame which consists of a grouping variable, as well as time ans status variables for survival analysis: ...
6
votes
0answers
71 views

Rule-Based and Tree-Based Statistical Models

I have been doing some research and have been trying to find "Rule-Based" and "Tree-Based" (statistical) models that are capable of overcoming the "greedy search algorithm&...
0
votes
1answer
20 views

flexsurvreg log logistic intercept in R

I'm trying to fit a log-logistic AFT model with flexsurvreg(). With AFT model, $$\log T = \gamma_0 + \gamma_1 z_1 + \gamma_2 z_2 + \sigma W,$$ where W ~ standard logistic distribution. Below is an ...
0
votes
0answers
20 views

How am I supposed to crossvalidate hyperparameters in a timely manner? XGBOOST

I am trying right now to do a 10 fold cross validation cycling through some different combinations of hyper parameters in the XGBOOST algorithm. I know this is a very complicated process with many ...
0
votes
0answers
18 views

trend test for small sampled size data

I am looking for a trend test(s) for my small sample sized data (only 3 observations). You can see the plot in the attachment. I will apply trend test for each line, what do you suggest to me ? Let me ...
2
votes
0answers
19 views

Partial eta squared calculation with multiple imputation data

I have 10 multiple imputation datasets ($N = 97$, two groups) and am running ANCOVA (controlling for pre-test values) to look at post-test group differences. Working in SPSS and can't really invest ...
2
votes
1answer
65 views

Bonferroni correction comparing multiple treatments

I want to compare the impact of different drugs on different blood-parameters. We measure $m$ parameters. In our study we want to compare $n$ drugs with each other. The blood-parameters for patients ...
1
vote
0answers
32 views

Add Age/sex as covariates when the groups are already Age- and Sex-matched? [duplicate]

Context: I am working on a longitudinal study that aim to analyse a response variable in Alzheimer's disease population and determine the differences between 4 groups of the AD population I want to ...
1
vote
1answer
34 views

I am getting (slightly) different results each time I run the glmmadmb function from glmmADMB, and I don't understand why

Background: We are investigating the effects of two environmental variables, temperature and evapotranspiration, on annual infection rates in mosquitoes. We want to identify the months with conditions ...
2
votes
1answer
19 views

Aren't these both plots of the residuals? If so, then what is the difference?

I'm analysing the Boston dataset from the MASS package in R. I begin by carrying out a linear regression with medv as the ...
1
vote
2answers
87 views

How to get R-Squared after doing stepwise model selection in regression in R

I am using R commander to do stepwise model selection in a linear model. When I run stepwise model selection, it reduces some variables, and finally, a model with AIC is provided. However, it does not ...
0
votes
0answers
16 views

How to interpret results of TWFE model?

I am an university student, who has never used R before. I am using a two-way-fixed-effects regression with the within estimator in order to estimate the treatment effect of the blue flag program. I ...
0
votes
0answers
9 views

kruskal-walis interpretation with too many outliers and "0" values

I want to establish significant differences between certain groups. I have a dependent variable that is named "NRPS BGCs" which are the presence of certain genes founded in certain bacterial ...
0
votes
0answers
8 views

Does the plot of the eval metric and n_estimators/nrounds indicate the overall quality of the model? XGBOOST

I have a plot of two different models. Eval metric is on the y axis and n_estimators/nrounds is on the x axis. Model A does not improve very much as more boosting occurs. Model B steadily increases a ...
0
votes
0answers
8 views

How to tell if there is a significant difference between two cut off values on an ROC?

Trying to see if there's a statistically significant difference between an old cut off value and a new one that we are proposing on a ROC curve. I have been using ...
1
vote
0answers
10 views

Difference in simple polynomial regression coefficients using `poly()` function in R vs doing manually [duplicate]

I'm not sure whether to ask this here or on Stack OverFlow, but I think here is better because the question is based more around the theoretical aspects than specific code. I'm currently working ...
0
votes
0answers
19 views

Can Probability Density Functions be used for Supervised Classification?

I have the following question: Can Probability Density Functions be used for Supervised Classification? I know that statistical models that "heavily rely on probability distributions" can be ...

1
3 4
5
6 7
527