# 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.

23,915 questions
Filter by
Sorted by
Tagged with
3 views

### reweighting one time series using proportions computed from another as weights in r

i have two groups of time series data about employment in two industries in two states. i need to figure out how to reweight one of the series for one of the states (for both industries) using ...
7 views

I intend to use Latent Class Analysis on a large dataset with 12 response categories and approximately 50,000 observations. I am getting an "ALERT: Iterations finished, maximum likelihood not ...
19 views

### How to obtain histograms of non-central t distributions from a normal distribution?

My Question; I'd like to know how to generate random numbers that follows a non-central t distribution using the normal random numbers. I made a calculation code for this using R (See Box2, below), ...
6 views

### How to interpret the results from three simple linear regressions side by side whit the export_summs() function

I ran a 3 simple linear regression of the percentage of votes pct_votes on three variables : share of immigrants akapct_immigrant...
25 views

### What methods can I use to quantify the impact of multiple variables on a response variable?

Suppose I have observations for both the predictors ${x_1,x_2,...,x_p}$ and the response $y$, what I am interested in is the controls of these predictors on the response $y$. There are several cases ...
5 views

### How to use joint models to assess the unique contribution of change in a longitudinal variable, incremental to current levels of that variable?

I am hoping to use joint modelling (shared random effects models using JM) to test whether change in a longitudinal marker variable contributes to prediction of a survival event, incremental to ...
15 views

### How do you test for a “moderator” with ANOVA?

I am trying to understand the terminology, and the appropriate test. What is the difference between a moderator, and just another factor, with ANOVA? The first factor is a consumer's market confidence ...
3 views

### Comparison of variances with multiple factors using fligner kileen test

Hope my question fits in here and I have described everything well enough. Somehow I cant quite get my head around it. I have a data set with pesticide residue data in flowers, which had been obtained ...
4 views

### Hotelling's-t random distribution in R [closed]

I would like to know if there is some R package to create a random Hotelling's-T distribution. Thanks!
17 views

### Simulations of Chi-Square Tests on 2 x 2 table without using the chi-square distribution

I'd like to simulate the chi-square test without using the chi-square distribution on the following 2×2 table. I made "chiq_2by2" function using the R (See #main function in the Box1,below)....
15 views

### Cointegration/GPH test

I am quite new to R and statistics. I want to test two time series with the GPH test for cointegration. For this I use the package LongMemoryTS and the function gph:...
7 views

### Different results using randomForest::randomForest with one tree vs rpart

I am wondering what randomForest package handles differently for each individual tree. If I build a random forest with a single tree, no resampling, and allow the usage of all features in a dataset, I ...
18 views

### Using clmm() for ordinal dependent variables

I have a 2 (Complexity: 1=Simple vs. 2=Complex) by 3 (Type: 1=A vs. 2=B vs. 3=C) design, where each participant completed separate tasks counterbalanced across the 6 conditions, and then gave a rating ...
3 views

### Connecting the points of a dodged geom_point by group [migrated]

Consider this nested data set, in which i aim at plotting the two nested factor variables on the x-axis: ...
3 views

### Is a two-way repeated measures ANOVA an adequate design for this experiment?

I want to study if a continous variables called Value changes when measured by different combinations of Raters and Methods. Since the subjects are the same in all the combinations, is a two-way ...
11 views

### selecting columns of a df for outlier analysis [duplicate]

I am running an outlier analysis using the package Routliers. I want to run analysis only including columns 2 and 3 in my analysis. I have multiple columns in my df. Here is sample data: ...
10 views

### How can I calculate with R a time-series mixed-model with random effects and a binomial dependent variable?

I'm evaluating a time series where users solve tasks in sessions. The model I want to evaluate is as follows: Main effects: Performance in single task (binomial) ~ workload + time on task Random ...
11 views

### Getting trip information from AVL data

I got a problem which needed to solved using Machine learning. The problem title is "how to generate trip information based on AVL". The dataset generated from AVL device is collected by ...
21 views

### limiting a df to specific columns for outlier analysis [closed]

I am running an outlier analysis using the package Routliers. I want to run analysis only including columns 2 and 3 in my analysis. I have multiple columns in my df. Here is sample data: ...
14 views

### discrepancy calculating power of 1 sided 1 sample proportion test

I am running the R code below to compare two methods for finding the power for a one-sided (greater) test of a proportion versus a fixed value ie lower bound (ie one sample test) - I have sample size ...
6 views

### How to include phylogeny in GLMM (not community ecology)

I have a dataset derived from a multi-species experiment that I carried out. I have 30 different plant species from several families and 3 geographical groups. I applied 6 different treatments to 5 ...
14 views

### Generalize functional Autoregressive model

I am working with the multivariate hourly electricity price data, data consist of six years hourly electricity data in which the first five years are use as testing set and the last year as validation ...
15 views

### How to calculate the standard deviation of a type in R [closed]

I read it in R and want to calculate the standard deviation of type "tumor" , how can I do that?
17 views

### Help Interpreting regression analysis of 2 models

I'm being asked to compare 2 data sets and their regression model outcomes, and pick one that is stronger to rely on for future regression analysis, and explain why. Here are the summaries of the 2 ...
12 views

### Number of Distinct Bootstrap Samples - A Non-Trivial Scenario

Michael Chernick's (@Michael R. Chernick) great book Bootstrap Methods with Applications to R explains that there are ${2n - 1}\choose{n - 1}$ distinct bootstrap samples. This comes from the fact that ...
75 views

### How to see Simpson's paradox effect via glm in R

I am using the UCBAdmissions dataset and glm from R to check for Simpson's paradox. I am ...
17 views

### Generating Poisson-Gamma data for empirical parameter estimation in r

I'm currently trying to learn parameter estimation and want to illustrate and compare different credibility methods (limited fluctuation, Bühlmann, Bühlmann-Straub) using both Bayesian and Empirical ...
22 views

### Random Forest Variable Importance Plot Discrepancy?

I am using the following code to get Random Forest variable importance plot: ...
14 views

### glmer r significant slope but bootstrap confidence interval includes zero

I am running a generalized linear mixed model in r using glmer. The slope (year) from the model is significant (<0.05), however, when I bootstrap the slope to get the confidence interval it ...
11 views

### Determining whether one variable is significantly different from multiple others in ggplot2

I have a dataset with the concentrations of six drugs for four diseases and eight participants ("Donors") in ±O2 conditions. I suspect that Donor 1 in my dataframe below might be an outlier ...
4 views

5 views

### Unused argument_Error in Overlap Estimates

I've been working on the Overlap package by Mike Meredith and Martin Ridout. While trying to determine first overlap estimates (in their example). ...
16 views

### How to estimate SEIR model parameter in R via RSS?

I tried to estimate the SEIR MODEL parameter in R by using the following code .Unfortunately I couldn't get it because I get the following error : "Error in names(parameters) <- c("...
18 views

### ARIMA (auto.arima in R) forecasts 0 for high variance and large time series

I'm noticing an issue with using auto.arima in R where if I input a series with large values and high variance, the forecast simply returns 0. Is this because the ...
10 views

### Which package works for mediation analysis in R when variables are categorical?

I am assessing pregnancy data where my exposure is categorical variable (either dichotomized or ordinal), potential mediator is categorical (dichotomized or ordinal) and the outcome is also ...