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

How to copy/clone RSNNS network in R? [on hold]

I would like to create multiple copies of my network instance to predict mutliple independent waves. Unfortunately simple reassigning does not work in this case, so what can I do? I attached a ...
1
vote
0answers
6 views

Splitting between train/test for customer churn survival models

I am a bit confused on how data can be split between train/test and "live" data for predicting churn using survival models such as the one in RandomForestSRC package. Goal of the model is to predict ...
0
votes
0answers
7 views

Nested Mixed Model with repeated measures within repeated measures in lme4

I'm trying to model the effect of a biomarker, Pentraxin3 on another biomarker, IL6 in a mixed model to account for correlations between the repeated measures and for correlations between the ...
0
votes
0answers
10 views

Model selection for and forecasting of arctic oscillation (a seasonal time series)

I'm having a doubt with a time series. I have to find the best model for it and use it to do some forecast. The data are about the arctic oscillation (AO) from 1950 to 2015. The series is clearly ...
0
votes
0answers
4 views

R darch : deep neural net pre-training

I'm trying to train a (not even deep) network on iris using the darch package. It works well as a standard backprop-net, but becomes bad as soon as I add a little pre-training: ...
0
votes
1answer
20 views

Alternative to beta regression

In the data that I am working on, my response is a proportion ranging between 0 and 1. I learnt that beta regression is probably the best choice to model such data, but is there a suitable alternative ...
0
votes
1answer
15 views

Metafor package in R: meta regression and scatter plot

I am doing a meta-regression with metafor package in R. The mixed-effect model for proportion is used to assess the linearity between study performed year and medication prevalence. Here below is my ...
0
votes
0answers
6 views

Add a legend on package darts [on hold]

I'm a student of statistic master degree of Padua. I'm finishing my thesi on models of darts. I've a speed question, Who Can help me? With this package you estimate the variance of dart's throw for ...
0
votes
0answers
6 views

Improve ctr for recommender system

I work in internet advertising company and the task is to increase ctr. I have different variables, such as amounts of clicks, user location, browser, os, his previous history etc. What are possible ...
2
votes
0answers
23 views

One to one exact matching in R [on hold]

I'm attempting one-to-one exact matching in R. That is, I have 60,000 treatment observations and 200,000 control observations but I only want 60,000 control observations and I want those to be matched ...
1
vote
1answer
13 views

Interpreting the residuals vs. fitted values plot for logit GLMM?

What I have is a generalized linear mixed model of the log OR of a rater (random effect) giving a response above a certain level on an ordinal scale, given a specification of what the rater was ...
0
votes
0answers
24 views

Conflict answers between SPSS and R Software [on hold]

I used R software (auto.arima function) in getting the best ARIMA model for my data. Then I used SPSS in getting the parameter estimates since there is no p-value ...
0
votes
0answers
14 views

Difference in randomForestSRC and randomForest package / increasing OOB-Error curve

Probably this is related to randomForest vs randomForestSRC discrepancies. When training this dataset it seems, that concerning the mean missclassification error less trees are better than more in ...
0
votes
0answers
6 views

Comparison between different models: hierarchical models and model with dummy

I have these three models: M0<-glm(y=="yes"~x+z+b+c+r+as.factor(w),family="binomial") 'logLik' -1147.734 (df=65) ...
0
votes
0answers
4 views

Predicted values poisson family using cv.glmnet

I am a little bit confuse with the values predicted when using cv.glmnet with poisson family. I am using this model because my response variable is counts, but when a use the function predict with s ...
0
votes
1answer
17 views

What does the error “pre.period must span at least 3 time points” in the CausalImpact R package mean?

I've been encountering the error "pre.period must span at least 3 time points" when using the package. Can someone help me understand why the package requires me to have at least 3 time points and ...
0
votes
0answers
4 views

TMLE for non-binary treatment A

I'm trying to deploy the TMLE approach (WAY) to a non-binary treatment indicator variable, aka I have one group that is not treated, one group with treatment A, another with treatment B and yet ...
0
votes
0answers
4 views

Creating a Bargraph with Error Bars [on hold]

I am novice programmer and am making an attempt to learn R. Below is the dataset I am working with: ...
1
vote
0answers
7 views

R package RMySQL installation returns a configuration failed error [on hold]

I am trying to install RMySQL package, but getting the following error message: ...
0
votes
0answers
18 views

Rolling estimate of Andrews.Chen, median unbiased estimator of an AR model in R? [migrated]

Given an AR(4) process, this can be rewritten in an ADF form as In order to estimate $\rho$, that in this case represents the sum of the autoregressive parameters, there is a procedure proposed by ...
0
votes
0answers
10 views

'arg' must be NULL or a character vector [on hold]

Good afternoon, I wonder if I can work despejandome a little doubt, I happen to have an application that allows you to upload .CSV files Shiny made in order to apply to the data loaded Rule Sturges ...
0
votes
0answers
15 views

Mixed model with clustered and repeated-measures data

I'm analysing the results of an experiment using a mixed model. Reaction times for each subject (40 male and 40 female) to 8 stimuli have been registered. The process has been repeated on the same ...
2
votes
0answers
19 views

What do my residuals say about my data?

I am new to R and I am trying to find a relationship between Wing length (mm) and Weight (g) of black-capped chickadees using a data set of over 4000 data points. I did a regression analysis and ...
-1
votes
1answer
27 views

Handling missing values in function `prewhiten` in R [on hold]

I am using function prewhiten from "TSA" package in R. I get an error about NA values, but I don't understand it, because I ...
0
votes
0answers
10 views

Mixed Effects Model R Help [on hold]

I am trying to formulate a mixed effects model in R in order to determine the repeatability of individual personality traits. I have 4 measurements for each individual and I measured 6 personality ...
1
vote
2answers
19 views

Interpreting accuracy results for an ARIMA model fit

I want to know how accurate one ARIMA model is for estimating a second time series. I've built the model: ...
0
votes
0answers
4 views

How is correlation between fixed intercept and fixed effect calculated in lmer of R, lme4?

When I fit any model in lmer(), summary identifies a correlation between fixed effect(s) and the (fixed) intercept. How should ...
-1
votes
1answer
34 views

Shows an error in R : “In library, there is no package called devtools” even though I have installed the package [on hold]

I installed R 3.2.3 and RStudio. I then proceeded to install the packages. The first package I tried to install was the "devtools" package. It popped up a message saying since lib is unspecified, ...
0
votes
2answers
30 views

Statistical test in R for count data

I am struggling with using the correct test for count data in r. The dataset I have is the number of nymphs produced by three aphid species on wheat. So this is count data with one response variable ...
0
votes
0answers
6 views

How to create a desktop application from RGtk2 user interface? [on hold]

I'm using RGtk2 to create a graphical user interface for my project. This GUI should be used by users who are not familiar with R; therefore, I need to make a ...
0
votes
0answers
14 views

Forest plot of multi-variate analysis with subgroups

I am trying to plot a multivariate analysis by subgroup. I have three subgroups: Experiment group "E", Active controls "A", and Passive controls "P" that have been measured (pre and post) on a number ...
0
votes
0answers
23 views

R auto.arima for two variables, forecasting crime deterrence - what am I missing?

I have data on newspaper articles about police cracking down on crime, and data on crimes reported to the police. The data are daily, covering about six months and the same city. I want to try an ...
2
votes
0answers
21 views

Print significant auto-correlation values in R [on hold]

If I do an autocorrelation test in R (using function acf), I get a great graph, and the horizontal lines show the cutoff of significance. Function ...
0
votes
0answers
6 views

A linear model for testing difference in pairs value between two groups

I have the following experimental design: Values of expression of 3 genes taken from 3 different patients and 3 different controls. R code for generating these data: ...
0
votes
0answers
24 views

Missing Data (mice) and Survey Package r

First, I am new to analyzing public opinion polls and the r package "Survey". I would like some advice. I am running a regression model with weights from a Pew survey, however, I noticed that a ...
0
votes
0answers
12 views

Use of data not captured in a survey for survey glm model

A former statistician in my organization carried out a survey to understand customer satisfaction using stratified sampling. On arriving at the organization, I was interested in seeing how variables ...
0
votes
0answers
17 views

Supervised HMM Training in R

I'm looking for an R package that implements the supervised training of Hidden Markov Models. By supervised, I mean given a sequence of observations, we know which ...
0
votes
0answers
17 views

plotting a three way interaction in an lmer model using r

I have a significant three way interaction between three continuous variables (frequency, exposure, and density) in a linear mixed effects model. I'd like to understand the nature of the effect by ...
0
votes
0answers
10 views

How to interpret clmm output

I am using the clmm() function from the R package ordinal. I understand that the ...
2
votes
0answers
17 views

Confidence interval of linear regression variable calculation [duplicate]

I want to be able to calculate the confidence interval from the estimated coefficient and respective standard errors. I have a linear regression model which can be summarized (in R): ...
0
votes
0answers
9 views

Propensity score matching - Force full match on specific categorical variable

I'm trying to perform propensity score matching using R MatchIt pacakage, and I have a question: I have tried the nearest neigbor method, and I understand that it tries to find the nearest match, in ...
0
votes
0answers
27 views

Results of xgboost binary logistic regression in R

I am having problems running logistic regression with the xgboost package. My code (the dataset is not the classic iris dataset): ...
-1
votes
0answers
24 views

How to find the 1000 closest point to a centroid built from another matrix

I actually work on text-mining. I try to find the 1000 closest documents (inside a corpus of 56000 documents) to a selected corpus of document (150). There are a lot of words in my dictionary. I ...
2
votes
1answer
50 views

Computing Cross-Validation Errors for Subset Selection: error in standard code in the literature?

I am currently trying to understand how to use cross-validation in order to choose among the "best" subsets of different sizes returned by the R function regsubsets (regsubsets returns the "best" ...
0
votes
0answers
15 views

Calculate the non centrality parameter (ncp) for non central chi squared distribution

I have the 0.975-quantile value (0.191) and the degree of freedom (k=1). How can i calculate the non centrality parameter ? in R if possible. Q0.975(k=1, ncp= ??) = 0.191
3
votes
0answers
30 views
+50

When does pam (partition around medoids) fails to find the optimal solution? (counter example?!)

If I understand correctly, the pam algorithm is a greedy search for a set of medoids such that no other set offers a lower cost (i.e.: the sum of distances of points to their nearest medoid). ...
1
vote
0answers
31 views

Probability of a point fitting a line

I am trying to classify between two groups a set of points given two variables (size of the space = L and points of the space occupied = N). At the moment I have a sample size of 620 samples with ...
0
votes
1answer
22 views

Computing the Interaction gain. Is there an Error in the infotheo package in R?

In order to implementing a certain feature selection method for a classification problem I need to estimate the the interaction the interaction gain between two features and the target variable which ...
0
votes
0answers
20 views

R Commander: how to test correlation across all variables? [on hold]

If I want to test correlation between two variables I would run the following command in R: ...
1
vote
0answers
32 views

How to forecast daily sales of multiple items?

...