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
31 views

Difference in output from mvtnorm and Mathematica/Java [closed]

Let $a \sim\mathcal{N}(6.532056,0.06532056)$,$b \sim\mathcal{N}(8.390961,0.08390961)$ and $c \sim\mathcal{N}(8.736566,0.08736566)$. We use $\mathcal{N}(\mu,\sigma^2)$ notation unless specified ...
0
votes
0answers
25 views

Alternatives to proportional odds mixed effects models

I was doing some reading about categorical data analysis (e.g. Agresti (2010): Analysis of Ordinal Categorical Data). Additionally to analysing data with an ordinal response with the help of ...
0
votes
0answers
42 views

estimate the log odds-ratio in R

I fit the logistic regression model for gender and drink for the data ihd using the following command ...
1
vote
0answers
15 views

What is the “scale” parameter in “continuous autoregressive model” in cts package?

I am trying to use the "car" command in "cts package" in R program and I see the "scale" parameter there. I wonder whether this can be assumed to be equivalent to time intervals for time series ...
0
votes
0answers
22 views

Sample Weights for classification using Gradient-Boosted trees?

How can "weights" be given to different samples according to their relative importance while using Gradient boosted decision trees for classification? How does the ...
-1
votes
0answers
43 views

Principal component Regression Using R

Can anyone explain principal component regression with the help of an example and the code in R? How to interpret the result of a principal component regression? How to find the individual effect of ...
1
vote
1answer
57 views

Include nesting factor as fixed effect in a GLMM

I have the following GLMM: success ~ age + gender + group/task + (1 + group/task|school/subject), family = binomial I want to know whether participants' ...
0
votes
0answers
15 views

Zero inflated model problem: system is computationally singular

I'm using R.After getting an error asking me to provide starting values for a glm (poisson family), I took a look at my data and realized I had quite a bit of zeroes. So, I tried zeroinfl from pscl. I ...
2
votes
0answers
42 views

Bayes' classification in R

For a machine learning class I am taking, on our first homework assignment we are given the following problem that has me stuck: ...
2
votes
1answer
130 views

Does fixing coefficients in a regression make sense, and if so how to do it?

I have a generic question about whether it might sometimes make sense to fix specific regression coefficients to predetermined values. And if this makes sense in particular cases, how do you best go ...
0
votes
1answer
48 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
15 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
29 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
45 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
18 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
46 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
67 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
19 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
36 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
62 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
39 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
23 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
35 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
34 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 ...