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
0answers
6 views

r apply with multiple variables

I want to compute a weighted mean over factors with the code below ...
0
votes
1answer
11 views

Autoclass in R/Python?

Are there any packages that implement the Autoclass/ Naive Bayes Clustering algorithm in R or Python? Alternatively, what are some other clustering algorithms that can handle both categorical and ...
1
vote
0answers
8 views

fisher.test() and Chi-square bug in R

I'm getting this error when conducting fisher.test() in R: ...
0
votes
0answers
5 views

improving residuals for segmented glm

I have the following data: ...
0
votes
0answers
12 views

a trous wavelets implementation in R [on hold]

I am currently developing a forecasting model for a non stationary time series. I came across some research papers where a redundant Haar wavelet has been used. Is there any WAVELET package in R that ...
0
votes
1answer
21 views

Difference in output from mvtnorm and Mathematica/Java [on hold]

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
12 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
20 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
9 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
11 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
36 views

In R, why doesn't “rm(ls())” clear the environment? Why add “list=” [on hold]

I get that rm(ls()) doesn't work to clear the working environment. I understand that rm(list=ls()) does work. I'm looking for ...
0
votes
1answer
28 views

Event centric clustering on R (Sports news) [on hold]

i'm about to start a project on R and my goal is cluster Soccer news by event. in other words, each cluster must contain all news about a specific event from multiple sources. SO, my questions are: ...
-1
votes
0answers
33 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 ...
0
votes
0answers
9 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' probability to succeed in certain ...
0
votes
0answers
10 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
34 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
121 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
0answers
18 views

Cannot get the p values from afex package [on hold]

According to this website: http://www.psychologie.uni-freiburg.de/Members/singmann/R/afex I have run: ...
0
votes
0answers
9 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
28 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 ...
0
votes
0answers
12 views

R programming: Lapply(split) and Model Generation [on hold]

I would like to generate and store for multiple models to subsets of my data, but am having a hard time getting the programming code to produce correct output for more than one model. I have hundreds ...
-1
votes
1answer
13 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
27 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
43 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
10 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
39 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
16 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
48 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
14 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
31 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
16 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
35 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
13 views
+50

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
30 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
14 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
30 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
8 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
44 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
12 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
27 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
24 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
39 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
52 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
11 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
60 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
120 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 ...