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 program in `R`.

learn more… | top users | synonyms

0
votes
1answer
50 views

In R and INLA, how do I graph results of 'rw2' model?

I'm working with model 2 of INLA's Zambia example in R: ...
0
votes
1answer
30 views

What is the difference between the Mann-Whitney and Wilcoxon rank-sumtest? [duplicate]

First of all, what is the difference between the Mann-Whitney and Wilcoxon rank-sum test? How do I choose between the two? I know the latter is implemented in R, is there a way to do the Mann-Whitney ...
-1
votes
1answer
16 views

Error: object 'descr' not found

I am trying to follow up the example code in the "Building Predictive Models in R Using the caret Package" paper from Max Kuhn[1]. Here is the part of the code: ...
1
vote
1answer
30 views

AICc and K for categorical factors and interactions

I am new to multimodel inference. I am trying to create a model that has multiple categorical factors and possible interactions. For example say that my model is... Y ~ X1 + factor(X2) + ...
0
votes
0answers
48 views

Two sample $t$ test in R: where did it go wrong?

I am doing two sampled t test on two species of fish. t.test(fish1,fish2) It runs for a year so there are 365 values for each fish, i.e. $(1,0,1,0,0,2...)$ and ...
0
votes
0answers
12 views

Limiting the range of possible values for distribution fitting with GAMLSS in R

I'm trying to fit ST5 distribution for reaction times with GAMLSS. Sometimes mu parameter of the distribution is negative, which is implausible. Is it possible to limit the range of parameter values ...
2
votes
0answers
46 views

Bootstrapping some statistics with non-normal data

I am new to bootstrapping. Assume I have some non-normal data, can be any distribution, it doesn't matter, and I want to find a confidence interval for the mean, median and standard deviation. For the ...
1
vote
0answers
19 views

studentized residuals in nonlinear regression

I am using the nls function in R to perform a nonlinear regression and need to calculate the studentized residuals. Is this something I need to manually do? It seems like I need to manually do a QR ...
4
votes
2answers
49 views

Name for combining related graphics

Often we combine related graphics to help us better understand a problem. We do this for poster talks in research (though we include text). Many info-graphics also do this as do this as do ...
0
votes
0answers
15 views

Finding extreme values in a normal distribution [migrated]

I want to find extreme values (anything greater or less than three times standard deviation from the mean) after generating a set of random numbers using: ...
0
votes
0answers
19 views

dose anybody know usg fastSOM packages in R?

I recently know the fastSOM package from google. So I download the package. But I’m beginner in R. And I really want to studying spillover measures because I’m interested in volatility spillover. ...
0
votes
1answer
48 views

Is there an R equivalent for the SPSS custom Tables feature?

I have used the custom tables feature in SPSS for my job almost every day. I am trying to learn R . How can I recreate the custom tables functionality in R. Is there some specific package that I need ...
1
vote
0answers
19 views

Weighted Least Squares with Standardized Coefficients

I want to understand how weighted least squares regressions work to implement it in a more complex context. I think I'm a good step into that process, but I'm still wondering what the correct way to ...
1
vote
0answers
71 views

Interpretation of Zero-One inflated Beta Regression with R (GAMLSS)

I am not that familiar with the interpretation of a beta regression with the r-package GAMLSS. Papers and package manuals didn`t help me. I modeled a Zero-One inflated Beta Regression. The ...
0
votes
0answers
18 views

Identifying the number of conditions by which variance components will be divided in Generalizability Theory using QME R package

I'm using QME R Package (can be downloaded from here) to calculate Generalizability ...
0
votes
0answers
31 views

R highfrequency package [migrated]

I'm newbie to R, I'm using it for my thesis on trade classification algorithms. I've some problems with the package highfrequency. I've converted my txt data in ...
0
votes
0answers
13 views

trouble using highfrequency package in R [duplicate]

I'm newbie to R, I'm using it for my thesis on trade classification algorithms. I've some problems with the package highfrequency. I've converted my txt data in xts format using the code: ...
0
votes
0answers
20 views

Interpreting R results, are the data multivariate normal?

I ran "mvn" using the "mclust" package in R using the following codes: mvn("EEE", data[,18:22], prior = NULL, warn= NULL) I am having trouble figuring out how to ...
2
votes
1answer
42 views

How to test if some data points is drawn from a distribution with linear PDF?

I have some data in the range [0, 1], and from the histogram below, it seems that they might be drawn from a distribution with linear probability density function (what's the name of that kinds of ...
0
votes
1answer
13 views

import kernlad model to caret

I'd like to test the anova rbf kernel included in the kernlab package in caret. Following excelent tutorial (https://topepo.github.io/caret/custom_models.html) I've come up with the following code: ...
2
votes
2answers
49 views

Factor or No-factor

I am performing linear regression in R and I have a variable called diversityscore which is a value ranging from 1 to 10 indicating #activities a user performs with 1 meaning one activity to 10 ...
0
votes
0answers
31 views

Fitting GLMMs for binomial data produces Error and Warning messages when using different fitting procedures in R.

I am trying to fit GLMM's to my data using the glmer function available in R's lme4 package. The data is available under the name block1and2 at: ...
0
votes
0answers
39 views

How to calculate p value from ANOVA function for LMM results?

I have used ANOVA function so that I can get the overall p value of significant factors: ...
0
votes
0answers
28 views

To get the overall significant p value, am I on the right track for LMM?

According to this document: http://www.bodowinter.com/tutorial/bw_LME_tutorial2.pdf I can get the overall p-value of fix effects by comparing models that I would like to know to null model. In my ...
1
vote
0answers
44 views

Random Forest for data imputation

Currently I am using Random Forest approach for Missing Values Imputation from missForest package in R. I faced the following problem: the algorithm works much longer than any other imputation ...
1
vote
0answers
28 views

Find linear subsets in a 2D point (xy) data [duplicate]

My problem is the very idea of how to start the analysis of 2D point patterns, specifically how to find linear trends within their spatial pattern. I have XY data points which are organized like in ...
2
votes
2answers
58 views

Test identicality of discrete distribution

Is there a standard way to test whether two vectors were drawn with the same discrete distribution in R? Something like a Kolmogorov-Smirnov test, but for discrete distributions. I think two-sample ...
0
votes
0answers
13 views

Temporal trends with missing values

I need to calculate the temporal trends for some climate variables with missing values. For example, last frost days defines as the last day of year with minimum temperature less than 0C. However, ...
3
votes
1answer
63 views

What kind of model can I try to fit in this plot?

I have a plot like this. I wish to apply a model to this, however, I guess a linear regression model won't work on this. What I did was plot it on logarithm x and logarithm y axis as well but it ...
2
votes
3answers
127 views

Sliding threshold for hypergeometric test

I have a list of 20,000 genes with an associated p-value (the total number of balls in the urn). I also have a list of specific genes that are "targets" of interest (these are the white balls in the ...
0
votes
1answer
42 views

Caret package in R - get top Variable of Importance

I am facing two problems while using caret package in R. I am reproducing an example below: ...
2
votes
1answer
113 views

Can we skip the lower order terms in interactions? [duplicate]

This question is about three-way interaction and the possibility of applying without second lower terms with keeping the main variables in the equation not like the other questions. In fact the other ...
0
votes
0answers
14 views

Adonis on categorical data

I wish to run Permanova on categorical data (example CSV structure is below) without any successes. Is Adonis can handle categorical data, an example script will be great. Thanks a lot I have a this ...
0
votes
1answer
25 views

adjusting batch effect by multiple linear regression

I am analyzing rna-seq data in the format of counts. There is batch effect revealed by PCA. One method I tried called RUVseq, it estimated the variation basing on control genes, and then added it to ...
2
votes
0answers
14 views

How to use one variable in regression with many independent variables in lm() [migrated]

I need to reproduce this code using all of these variables. ...
0
votes
1answer
34 views

Reproducing simple t-test result with ANOVA

We know that a t-test is just a special case of ANOVA, so I tried to reproduce the result of the following t-test with aov() or ...
1
vote
1answer
36 views

Comparing Cox Proportional Hazards Models (variable selection)

I am using a cox proportional hazards model to run a survival analysis in r on a number of non-nested, distinct covariates such as Age, Blood Type, Cancer, etc: ...
0
votes
1answer
36 views

Comparing mclust() and k-means centroids

I have some code that looks for clusters in x,y data. To check the number of clusters I use, I want to get the BIC. This is not possible (easily) using kmeans(), ...
1
vote
1answer
21 views

Using Mantel to explore relationship between geographic distance and a multivariate character

I'm working with bird songs. A song is composed of many vocal parameters [highest frequency (Hz), lower frequency(Hz), bandwidth(Hz), duration (s), number of notes, and son on....] I'm interested in ...
3
votes
3answers
55 views

Transforming time series to compensate for change in variance

I have a time series (shown below) that comes from a sensor whose calibration was changed in the middle of last year. As part of this change, the sensor's reading of the variance (or volatility) of ...
0
votes
0answers
22 views

log-likelihood and negative binomial zero inflated distribution in glmmADMB

Anyone know how glmmADMB calculates log-likelihood and negative binomial zero inflated distribution? I compared a model using glmmADMB and pscl and the diference in AIC and parameters are huge. I ...
0
votes
0answers
29 views

Model assumptions and diagnostics for proportional hazard regression model with frailty in R

I am wondering are there any assumptions that must be met in the proportional hazard regression model with frailty? I remember that in regular proportional hazard model without frailty all variables ...
0
votes
0answers
48 views

Determining Relative Weights

I am looking for some recommendations and more specifics about how to do the following: Objective: To determine the weights of a number of stock valuation metrics. I am looking at doing this across ...
1
vote
0answers
37 views

Has anyone publicly shared an implementation of RUSBoost in R?

There's no package available on CRAN, so I was hoping someone in the community had written their own function/package. I see it's been done in MATLAB, so I may just have to start with that and write ...
0
votes
0answers
13 views

Create list from for loop if value in sequence is greater than .5 [migrated]

Trying to create a list of significant variables for a regression model. I have 82 variables, so in order to only include the significant ones, I created a list of the correlations and sorted them. I ...
0
votes
0answers
44 views

why Hierarchical Clustering pvclust vs. hclust got different result?

I am performing the hierarchical clustering analysis on a dataset of 25 viral populations using 3 viral components (variables) to construct a dendrogram with average method and correlation distance ...
0
votes
1answer
22 views

lm() producing many NAs for coefficients

I am trying to run a regression using about 80 independent variables. The problem is that the last 20+ coefficients return NA. If I condense the range of data to within 60, I get coefficients for ...
1
vote
0answers
16 views

Nest-Varying Parameters in Nested Logit Model Estimation (mlogit package)

I am trying to replicate a Stata manual example (-mlogit-) of nested logit estimation, ...
0
votes
1answer
17 views

Mantel Test data assumptions

Does the Mantel Test works with non-normal distributed samples? I couldn't find anything clear enough about it.