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

learn more… | top users | synonyms

-1
votes
0answers
8 views

Is fanny() an extension of cmeans() in R? or are they different? [on hold]

Is fanny() method in R is an extension of cmeans() in R. If I pass a dissimilarity cosine matrix to fanny() function, without passing any value for metric parameter will it perform fuzzy c-means with ...
0
votes
0answers
19 views

Controlling for variables with lmer (R)

I am using lmer (from the lme4 R package) on a dataset with 6 variables: SubjectID, ImageID, Category, Brightness, Contrast and ResponseTime, where the last three are continuous variables. (and yes, ...
5
votes
1answer
27 views

Are parametric tests on rank transformed data equivalent to non-parametric test on raw data?

Many non-parametric tests are identical to their parametric equivalent on ranked data. At least, that's what I learned from this blog post on Friedman's test and skimming this 1981 article.. This ...
0
votes
1answer
33 views

Model Underperforming

I am a quite new to machine learning but I have tried to implement some prediction on a data to predict if a customer would churn of not.And for this I have used many features but I am unable to ...
0
votes
1answer
31 views

Can this data be fitted with a beta distribution?

Disclaimer: I'm not a statistician but a software engineer. Most of my knowledge in statistics comes from self-education, thus I still have many gaps in understanding concepts that may seem trivial ...
1
vote
1answer
42 views

Confidence intervals for group means (R)

Here are some sample data in R: set.seed(42) df <- data.frame(g = factor(rep(1:2, each= 50)), y = rnorm(100)+rep(0:1, each=50)) One can easily get group means ...
0
votes
0answers
19 views

info about R in finance and timeseries analysis [on hold]

i'm interesting in R language but i'm not sure if it is what i need. I read lot of articles around the web and seems that R is so used in finance but i 'm still don't know if can be fine for me... ...
1
vote
1answer
21 views

How to interpret the lme function result?

the following is the command I used and the results I got for my question, whether the visitation frequency of my bee is different in different experiment types in different locations. I used the lme ...
1
vote
0answers
20 views

Adding dummies as control variables change the coefficient

It has been difficult to formulate a title for this question. But here is something that is puzzling me. I have an ordinal probit model with a bunch of covariates. One of the covariates is the number ...
0
votes
0answers
8 views

Dummy coding a column in R with multiple levels [on hold]

I have a dependent variable measuring the net revenue. One of the major predictor affecting this is "product" i.e. the product sold to the customer. My randomly sampled dataset contains 1.4 million ...
0
votes
0answers
13 views

Nested effect in GLM

I am sorry that my question repeats many others already available here. However I have read many of them (e.g. this, this and this) as well as other documents and I am still not sure about my model. ...
0
votes
1answer
12 views

Co-variate contribution to model accuracy in multi-variate analysis

I have implemented a multivariate analysis in R as such: lm1<-lm(Y ~ A + B + C + D + E, data=data, weights = 1/Uncert) I found that the variable A contributes ...
0
votes
0answers
5 views

How to read multiple excel marco enabled files in r [on hold]

I'm very new to r. I'm trying to read 500 odd marcos enabled files in r but i'm getting error as "Error: Skipped over all data". Below code as been used to run the program. files <- ...
3
votes
1answer
31 views

Random effects for second order in R mixed models

I am fitting a mixed effects model in R using nlme lme(y~x+I(x^2),random=~x|subject,data=train) Is this the correct way or should it be ...
0
votes
0answers
6 views

Nearest neighbours approach variant?

Hi i'd like to know a bit more about kNN-like approach implementations for classification problems, and specifically classification problems where we want to have a probability distribution as an ...
0
votes
0answers
11 views

How to find gamma coefficients?

I am trying to replicate this paper "Gleditsch, Kristian Skrede and Michael D. Ward. 2006. "Diffusion and the International Context of Democratization", International Organization 50: 911-933" and I ...
0
votes
0answers
28 views

Stuck while trying to predict on data based on H2O Deep Learning model

I have created an H2O Deep Learning model in R for multi-class classification and I want to use it to perform prediction. I would have assumed that if I use the model to predict on the validation ...
0
votes
0answers
18 views

Support to interpret Performance Metrics from H2O Deep Learning model

Using H2O in R, when I perform the call h2o.performance(m1, dataframe.valid.H2O), the below metrics table is returned. Where can I find explanation of what each row ...
0
votes
0answers
22 views

Support to interpret classification charts from H2O DEEP LEARNING

I have executed H2O Deep Learning (with grid search) on my data-set for multi-class classification and the resulting charts from the first and second best model do not make much sense to me. It seems ...
0
votes
0answers
4 views

R Caret train / rfe optimize for positive predictive value instead of Accuracy or Kappa

In train or rfe I can only set Accuracy or Kappa. Is there a way to edit the functions to define a scoring function? I am using Kappa at the moment but I need to optimize for positive predictive Value ...
1
vote
1answer
26 views

meta-analysis mixed model - polygons based on meta-regression

When using meta-regression with factor moderators, result differ a bit from using seperate estimation based on subgroup, even if the same model (mixed effects) is used for both. I understand the ...
0
votes
0answers
6 views

Test for actual realisations

I'm performing binomial test to check whether the number of occurrences within buckets are not greater than 95%. I'm using R for that. ...
0
votes
1answer
38 views

taking log of sales when many observations are 0 or close?

I am currently attempting to replicate an Econ paper in R, which claims that they take the natural log of net sales. Many of the observations however are either 0 or very close to 0. What is the ...
0
votes
0answers
29 views

Statistical optimization Model for which person should be assigned a lead within each state

I am working on creating an optimization model based on sales on a particular website. The system assigns the leads to different sales people. I want to generate a model doesn't randomly assign leads ...
0
votes
0answers
9 views

How to use metfor and meta packages for forest parts of pooled proportions [on hold]

Has anyone used these packages to create a forest plot of proportions- where the proportion and 95%CI displayed for each study is a simple proportion with an exact binomial 95%CI, and the package ...
0
votes
2answers
25 views

How to get Cox & Snell, Nagelkerke R-Square in R logistic regression output?

I'm new to R (used to work with SPSS), and looking for a function that will output the Cox & Snell and Nagelkerke R-Square measures of logistic regression. In SPSS they are displayed as part of ...
0
votes
1answer
21 views

RJAGS bayesian approach of mixed effects model

Why my posterior result always shows that the sigma and sigma.c estimates to be around 50? It should not be that large as I know from another approach of analysis and also summary of the data. Is it ...
0
votes
1answer
30 views
+50

aggregating constructs by Group

This is probably a very basic question; I have a data-frame with a fake questionnaire with three sets of questions measuring three constructs. I'm currently reading some research papers which in ...
0
votes
1answer
41 views

sjPlot: probabilities. How to interpret?

I am running the following model in R: model = lmer(Tau ~ ageS*days+YrsOfEds*days+sex*days+tract*days + (1|SubjectID), data=long) With this model I am ...
2
votes
0answers
19 views

What is the method i have to use to find correlation between multiple variables

I know how to find a correlation between 2 variables. How am i supposed to find correlations between multiple variables and how do i plot a graph for it?
3
votes
1answer
19 views

Standard errors `NaN` by `Arima` function in R

I'm working with a time series of 59 elements. I'm wondering why the R function, Arima, throws an NaN for the standard errors of ...
0
votes
1answer
16 views

How to treat the group variable as continuous in boxplot() in R? [on hold]

If I understand correctly, boxplot() treats numerical group variable values as discrete values and spaces the boxes evenly on the plot. What can I do to produce a ...
0
votes
0answers
18 views

Using VAR in R to estimate the effect of oil prices on stock returns [on hold]

I am having some problems with estimating a VAR in R. I am trying to replicate a study from Park and Ratti 2008 Using a time period from January 1997 to February 2016, I have been able to perform ...
0
votes
0answers
26 views

Forecast the profits for the stores in diffrent locations [on hold]

I have data set for stores as below about 700 rows for various store locations and below are columns ...
1
vote
0answers
37 views

Three-level partially nested model

I am modeling change over time in group psychotherapy subjects using R and lme4. My data have the following structure: subject (id) time (code 1-10 for equally spaced repeated measures) outcome (for ...
0
votes
0answers
36 views
+50

Cronbach Alpha Assumptions

I'm currently learning ho to use Cronbach Alpha in R. I have a scale with 7 items and 63 respondents. The aim is just to get a practical understanding of what Cronbach Alpha is. There are some nulls ...
0
votes
0answers
14 views

Create a predictive user model

I am a bit lost with creating a user model in R. I would like to create a model that predicts whether a user is likely to do an action or not, based on data on his past behaviour (Target variable ...
0
votes
1answer
23 views

Are PAM silhouette and K-means silhouette related ? [closed]

I used PAM Silhouette with different seeds to find the best k for ...
0
votes
0answers
23 views

robust mixed models 3 time points (y-side) and high dropout

I am running the model in R: model = rlmer(Tau ~ tract_FA_avg + (1|Subject), data=long2) (robust as I have outliers) Since I am relatively new to mixed ...
0
votes
0answers
18 views

Optim error training ARIMA model in R [duplicate]

I have the code below which trains ARIMA models for a range of order combinations. I'm getting the error below in the step training the ARIMA models. The code worked just fine with the ...
0
votes
0answers
10 views

JAGS missing data problem

For missing data problem in RJAGS, in this site, there are a lot of posts talking about setting priors to generate data for the missing place. However, instead of filling up the places, I tend to ...
-1
votes
0answers
11 views

rmr2 rhadoop - outofmemory exception [closed]

We trying rmr2 package from RHADOOP - get outofmemory exception. Below is sample code - aggregate sales quarterly. What is signature for function map, reduce & keyval? Some documents says: ...
-1
votes
0answers
16 views

autoclassification in R [closed]

Can you tell me, is there in R the possibility to choose the method that gives the most accurate classification well, for example ...
0
votes
1answer
24 views

One side tests for example monte carlo

I looked at R for Spatial Statistics (spatstat) and I actually found out that it doesn't always have to be that below -1.96 is necessarily clustered and that above 1.96 must be uniformed. There is ...
0
votes
0answers
24 views

Can't Get a Distribution That's Reasonably Close to Data [closed]

I've got about 30K data points. I've sampled about 1000 of them here (for reproduction's sake; I figured 1000 data points pasted here was probably a bad idea). ...
0
votes
0answers
6 views

How can I use TexReg (1.36.4) for a “relogit” model estimated using Zelig (v. 5.0-13)? [migrated]

I know that Zelig is a wrapper... But still, it provides nice simulation capabilities (which I wouldn't be able to do on my own). Lets say I have this data, ...
0
votes
0answers
11 views

What are the extra outputs in this fitdistr function? [closed]

I have the following code in order to find the scale and rate for the Weibull distribution: ...
0
votes
0answers
11 views

How can I add an ID variable that gives each set of duplicate rows a separate label? [closed]

I have data that contains many rows with eight identical columns. I would like to group the rows that are identical and assign a unique ID variable to these groups.
1
vote
1answer
29 views

Monotone, Bounded Local/Spline Regression in R

I'd like to perform an estimation of a probability (bounded [0, 1]) that has several input variables and success/failure results with those values. Some of these input variables have a monotone ...