Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

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

0
votes
0answers
3 views

Homoskedasticity of the residuals

When, I fit an ARMA model to data, I look at the standardized residuals plot to assess if they behaves like uncorrelated random variables with zero mean and costant variance (if the model is good). ...
0
votes
1answer
18 views

Differences in calibration plots for machine learning models

I'm using machine learning methods in R for descriptive regression modelling of a small dataset. I have fit random forest (randomForest), unbiased random forest (cforest) and boosted regression trees (...
0
votes
2answers
299 views

Volatility of original vs. first-differenced series in ARIMA+GARCH in R

I want to do ARIMA-GARCH modelling on the daily prices of crude. Since ARIMA-GARCH model cannot be applied to the time series in R, I first differenced the series to convert it into a stationary ...
0
votes
0answers
22 views

Unable to remove heteroscadasticity

This is my model: lm(PCTUI~year+statefips+factor_agecat+factor_sexcat+factor_racecat+factor_iprcat, data = train) I have factorized the categorical variable. ...
4
votes
1answer
1k views

Maximum likelihood of multivariate t-distributed variable with scaled covariance

I am trying to estimate the covariance of a iid multivariate t-distributed random variable, where I define the multivariate density as in the Statlect textbok, which is the same as the wikipedia page. ...
0
votes
0answers
7 views

Is lmer or glmer appropriate for nested continuous proportion data

I have a reviewer that wants me to analyze my data along the lines: Con_Ratio ~ Range * Latitude * Longitude + (1 | Genotype/Pair). But I'm not sure if this can be done and how. My experimental ...
1
vote
1answer
96 views

How do you interpret the Cliff's delta & 95% Confidence Interval (2−tailed) graph?

I've recently just completed a cliff's delta on a data set containing ordinal data (Strongly disagree to strongly agree), and have graphed the results. I'm just a little wary over how to exactly ...
2
votes
1answer
6 views

How to conduct power analysis for unbalanced one-way ANOVA in R?

I am looking for a way to conduct power analysis for unbalanced one-way ANOVA in R. I found the pwd package; however, it only allows me to calculate power for ...
1
vote
1answer
32 views

How do you select the best from a number of linear models?

I'm learning linear regression with the Carseats data set. I went through the data, cleaned it, encoded the dummy variables and checked for collinearity. The dataset has 400 observations on Carseat ...
0
votes
1answer
334 views

repeated cross-validation shows similar results for different k-folds

I need to see whether different k-fold cross-validations with repeats will improve my classification accuracy. For that, I have tested with repeatedCV (...
1
vote
1answer
23 views

Out-of bag error in Random Forest

I am trying to code my own, simple version od RandomForest function in R for learning purposes. However I have a hard time understanding the concept of the out-of-bag error. Is it simply done by ...
0
votes
1answer
20 views

multiple one sample t.test with ANOVA

If I want to see if the mean of 3 different groups is above a specific threshold instead of doing 3 on-sample ttest can I use anova? So instead of 3 ...
0
votes
0answers
7 views

How to caluclate robust standard errors for a multinomial logistic regression (using the multinom command)?

I've estimated a multinomial logistic regression model using the nnet package and the multinom command. Now I would like to calculate robust standard errors for my coefficients but I don't know how to ...
2
votes
0answers
17 views

F ratios, ANOVA, and 2 stage nested (mixed) models in R

I have data relating to strength of fabric. Each fabric comes from one of 4 batches (B), and batches come from one of 3 suppliers (A). My question relates to the calculation and interpretation of F ...
0
votes
0answers
4 views

Questions about the interpretation of system-dynamic simulation in R

I try understand simulation modeling in R using DeSolved package. As source i used this article https://api.rpubs.com/rsmard05/sysDynR. It is detailed, but some things are incomprehensible to me from ...
0
votes
0answers
15 views

Experimental design for simulation experiment

I'm interested in investigating the effect of a treatment on survival times of a patient. The "patient" is a complex program with many interacting categorical and continuous variables. It also has a ...
0
votes
1answer
293 views

Strange: Partial Correlation changed correlations values to be negative?

I am trying to investigate the correlation values. A big problem happens. The method I used is in corpcor package in R. I have a column as missing data. I firstly calculate the correlation matrix. ...
0
votes
0answers
7 views

“right” in hist() function in R [on hold]

what is the meaning of "right" in hist() function in R while programming in R it makes significant changes in the graph Kindly answer me what is the utility of the right
0
votes
0answers
42 views

Plot Cumulative Distribution Function of Kernel in R [closed]

I am trying to plot $\hat F(x)$ of the log-normal kernel in R. It is a simple $\hat F(x)$ log-normal distribution with some transformation proposed by Jin and Kawczak (2003) (Check here if needed). ...
0
votes
0answers
4 views
0
votes
0answers
11 views

How to choose the best algorithm to fit neural model [on hold]

Im beginner in machine learning .. I have a problem of classification and i want to fit a neural network model with R and using the function Neuralnet(). but i don't know what is the best algorithm to ...
1
vote
1answer
307 views

Bootstrapping coefficient p-values under null hypothesis in case-resampling regression

I am fitting a multiple linear mixed-effects regression model in lme4. The residual fit is near-linear, enough to warrant not assuming residual homoscedasticity. ...
0
votes
0answers
22 views

What does the error of the neural network model mean? [on hold]

I m fiting a neural network model using R and with the library(neuralnet) but i found the error of the neural network model 500.222 that is not logical at all .. I got this Error when i wrote this ...
0
votes
0answers
10 views

Handling baseline differences with a retrospective study and mixed model

I am looking at the fixed effects of Var1, Var2, and Var3 on a dependent variable ...
2
votes
3answers
46 views

Mixed-model ANCOVA using nlme in R: How do I interpret and report significant interaction effects?

I've got a significant interaction effect and I'm unsure how to interpret and report the results. In my experiment, I've got plants planted inside fences to protect them from deer (fence plots) and ...
0
votes
0answers
4 views

Change color of points on a plot based on index R [migrated]

I want to plot anomalies in a dataset with a different color. For that i generated random numbers, injected anomalies based on a condition, and them plotted them. But the plot that i am getting is ...
0
votes
1answer
353 views

Logistic regression with r and stata [on hold]

I ran the same Logistic regression with R and STATA. The regressors include many dummy variables. In R, the code I used is ...
0
votes
0answers
13 views

Random coefficients logit estimation with Hierarchical Bayes in R

I am trying to estimate a Random Coefficients Logit model using the RSGHB R package. Thought, I came across with 2 main issues: Why the ...
1
vote
1answer
20 views

using decision tree to describe high dimensional data

I have a dataset with 6 numeric columns and one dichotomous factor contain yes and no. I would like to understand when yes is more likely given the 6 numeric columns. I intend to use a decision tree (...
5
votes
1answer
2k views

How to summarize GAM model result from multiple imputation data in R

I am very new to R and not very experienced in statistics. I have this general question regarding applying Generalized Additive Models (GAM) in multiple imputation dataset. I used R package mice for ...
1
vote
0answers
8 views

How to perform single-arm meta-analysis

I'm currently intending to perform a single-arm meta-analysis which study outcomes are: Objective Response Rate (ORR%), Disease Control Rate (DCR%), Duration of Response (DOR) in months, PFS in months,...
0
votes
0answers
24 views

bayesian decision making - comparing expected loss

The problem is like this: Suppose that I am considering which country should I invest on, country A and country B, based on their GDP growth rate $\alpha$. There are two possible choices for each ...
0
votes
1answer
27 views

Lag regression independent variables in dynamic panel: which Explanation of the signs? [Resolved]

In the famous paper " Richard Blundell & Stephen Bond (2000): GMM Estimation with persistent panel data: an application to production functions, Econometric Reviews, 19:3, 321-34" the authors ...
0
votes
0answers
24 views

Defining custom Bayesian priors in R (BayesFactor package)

I'm performing some Bayesian analyses in R using the BayesFactor package, and was wondering whether it is possible to specify priors for the alternative not centered on zero (the current defaults ...
221
votes
2answers
151k views

Interpretation of R's lm() output

The help pages in R assume I know what those numbers mean, but I don't. I'm trying to really intuitively understand every number here. I will just post the output and comment on what I found out. ...
0
votes
0answers
8 views

Three Factor Multiple Comparison Post-Hoc Test for Levene's Test

My research question is to find out whether or not my samples are exhibiting any significant differences in their variance in response to three possible treatments. Here are my possible groups: ...
0
votes
0answers
11 views
1
vote
0answers
14 views

summarisng sequences in R? [on hold]

I have a large data set comprising 45,000 days of a rainwater system switching between running on a tank or off the city water mains. The system switches between the two depending on the level in the ...
1
vote
1answer
259 views

How to know if data are compositional?

I have an environmental data set (LA-ICP-MS), where 46 elements are reported in ppms. I do not know whether my data is a subcompositional (compositional) or not. However, I know that an observation ...
1
vote
1answer
53 views

Multiple hypothesis testing in R vs. Stata [on hold]

I'm trying to replicate Stata multiple hypothesis testing for SE clustered regression. Below I attach both Stata code and R code: ...
1
vote
0answers
18 views

Strange rugarch error: $ operator invalid for atomic vectors? [on hold]

So, I am trying to make a huge nested for loop (optimizations be left for later) to fit all of the GARCH models available from rugarch. This is my MLE that ...
1
vote
1answer
32 views

Why doesn't the zero model in a hurdle model exactly match logit result?

I am relatively new to R and I suspect that there is user error here, but I cannot figure out why the output from the logit in the hurdle model does not match the prediction of the "zero" function in ...
0
votes
1answer
33 views

R: What's the right way to add an interaction term in lm()? [on hold]

I'm working with the Carseats data. I'm making a model to predict the sales of Carseats and I'd like to make an interaction term with Price and Competitor Price. Is it as simple as ...
0
votes
1answer
299 views

Wald testvs J-test in R

I'm trying to replicate the procedure done in this link using R. In table 2 it states that column 6 gives the overidentifying restrictions of the IV model using a Wald test. I'm using package gmm and ...
1
vote
0answers
13 views

Performing random forest on spatio-temporal rasters

We are trying to train a random forest model on land-use and meteorological variables to predict daily concentrations of air pollution at a 1km resolution. Our input data consists of 1km raster stacks ...
1
vote
1answer
19 views

Random effect in GAM - what are the smooth functions used?

In the GAM package in R created by Simon Wood there is a selection of the smooth function basis. I sort of understand the options such as bs='tp', bs='cr', etc. But bs='re' seems odd... that does ...
0
votes
0answers
18 views

System of equations for quadratic programming with inequality constraints [on hold]

Through the problem can be written for GLMs as well as for other more complex settings in terms of objective function and constraints, for easy of presentation, I present the problem using a simple ...
0
votes
1answer
20 views

Problem with Tuckey correction for planned contrasts with emmeans and pairs() in R

I tried to post my question in Stack Overflow but they suggest me to ask to the statistic expert (you), so here I am! I have a mixed design with 1 between factor (Group: ASD, CTR) and three within ...
0
votes
0answers
11 views

Description of the Cotton data in R package agricolae [on hold]

I am trying to use the cotton data in the agricolae package in R but the package documentation does not provide enough description of the dataset especially details concerning the variables "lineage" ...
2
votes
0answers
16 views

Interpreting the estimate of an ordered factor in regression

I have an output from a lm() object that has ordered factors. ...