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

1
vote
2answers
13 views

Two-Sample t-Test for Equal Means with unequal variances for large samples

How can I perform a two sample test of means with unequal variances for a very large sample in R? In case of large samples the statistic will asymptotically follow a normal distribution. Which R ...
0
votes
0answers
2 views

Can I include future index into current forecasting in R models

I am new to R. Now my team is building forecasting models for monthly sales. Our sales correlates quite well with a industry index. As a forward index, we can get both past 5 years' index and next 3 ...
0
votes
0answers
8 views

Weighting related attributes in hierarchical clustering

I have two questions about output of hierarchical clustering and improving the output. I'm trying to learn more about performing hierarchical clustering in R so I started looking at a simple dataset ...
2
votes
0answers
14 views

Classical or robust variogram for incorporation into generalized linear model

I'm modeling counts of organisms over time at eleven locations. I'd like to account for temporal autocorrelation in the counts, assuming it's present. As the data are not equally spaced in time, ...
0
votes
1answer
12 views

R Error in chol.default(A) krigeST from gstat package

I am working with an hourly dataset of air temperature, recorded at ~200 stations over a relatively small area. I chose a space-time variogram (e.g. sum-metric) to fit my data and am now trying to ...
0
votes
0answers
23 views

Multinomial logistic regression interpretation in R

I have run a multinomial logistic regression test for the interaction between species of deer, days a camera trap was in the field and type of reaction. The model with the best AIC value was: ...
1
vote
0answers
11 views

How to specify binomial glmm with random and correlation in R?

I am working on developing a model with a binomial response variable. My data consist of GPS points from tracked animals. The data set is large and contains 15,000 observations from 40 individuals. I ...
0
votes
1answer
49 views

Difference between prediction in R and SQL

I'm working on a prediction model for a continuous variable (amount of medicine injected) .I use R for modeling.My project flow is to multiply the prediction of a glm (logistic regression) model that ...
1
vote
0answers
12 views

How to create a nearly orthogonal experimental design in R?

Does anyone know an R package for nearly orthogonal designs? I would like to create an experimental design, using 12 runs, up to 10 factors, and with mixed levels (e.g. a combination of 2 and 3 level ...
1
vote
1answer
15 views

divergence between nls (simple power equation) on non-transformed data and lm on log transformed data in R

I'm testing different ways to fit a simple power model to a dataset of 5 points. I don't get same results if I use nls on non-transformed data or lm on log10 transformed data in R whereas Excel ...
0
votes
0answers
7 views

R multinomial logistic regression interpretation

I have run a multinomial logistic regression test for the interaction between species of deer, days a camera trap was in the field and type of reaction. The model ...
0
votes
0answers
10 views

Complete interpretation of Cox regression output in R

I need help with complete interpretation of this output(below). Can someone explain all (almost all) estimators in this output: what they mean and what is the substantive interpretation. In ...
2
votes
0answers
15 views

Plotting means in R [migrated]

I want to fit my vectors x ,y to some kind of curve, but they're both about 10k long with x-values very closely packed, so a scatter plot just ends up as a huge mess. What I'd like to do is to plot ...
0
votes
0answers
25 views

Arima function doesn't consider seasonal components

Currently trying to fit several models to some data sets in order to find an accurate enough one, I ran into some difficulties with the Arima function of the ...
0
votes
0answers
12 views

GLM with categorical predictor on R

I need to do a model with a generalized linear model. my data are thoses : habitat : O or 1, group : 1 or 0 , mortality : yes or no, and the numbers of individuals for each case. (habitat, group and ...
0
votes
0answers
20 views

Entire data considered as support vector

I am currently learning to use support vector machine as classification. I have a data set with 161 observation and 18 dimension. I get 160 support vectors using svm function form R package, e1071. ...
0
votes
0answers
22 views

calculating probability that certain subject is not in the particular cluster

I have a situation where there are n individuals and p features (variables). I do have their cluster information. Here is an example: ...
1
vote
1answer
25 views

How to calculate the robust standard error of predicted y from a linear regression model in R?

How can I calculate the robust standard error of the predicted y from a linear regression model in R? Any suggestion is appreciated.
0
votes
0answers
13 views

Cross-validation and R

Consider the following data set train: z a 1 1 0 2 0 1 1 3 0 1 1 2 1 1 0 3 0 1 1 3 with binary outcome variable z and predictor variable a. ...
0
votes
0answers
8 views

Two class unpaired test using LIMMA

I want identify the set of genes that are significantly-differentially expressed in two different classes of samples. For Example, Normal and Disease. Both classes have samples from different stages, ...
0
votes
0answers
11 views

e1071 svm queries regarding plot and tune

I am new to R and I am learning the e1071 packages' svm function. Following are the few questions I have. How does the plot function work? I cannot understand the plotting case with more than 2 ...
1
vote
0answers
6 views

What does “(scores mapped into 1:m using rounded scores)” from the 1-sample permutation test mean?

I'm trying to do an exact paired permutation test. What does this "mapping" mean? ...
0
votes
0answers
21 views

Mixed Model Analysis of Experiment Data using lmer() Function (lme4 package in R) where Levels in Stimulus Grouping Factor equal Observations

I am running a post-hoc analysis on the data collected during an experiment in which 15 unique stimuli were presented to participants. Having run a least squares regression using the lm() function in ...
0
votes
0answers
8 views

Identifying duplicated rows [migrated]

I have a larger data frame (~50K rows and 50 to 75 columns) that has a small number of row that are duplicated in, say, 7 of the 75 columns. Although it's simple enough to locate rows that duplicate ...
0
votes
0answers
33 views

R lm without intercept strange contrast

I am actually doing a linear regression without intercept lm(y~ -1 + a + b + c + d ), where b, ...
1
vote
0answers
38 views

How can I constrain my regression coefficients such that they are positive and sum to be less than or equal to 1? (In R)

I've seen a few similar questions about constraining coefficients so they sum to 1, but I'm not sure if there's a simple change in these approaches to allow the sum to be anything in [0,1]. I need to ...
5
votes
0answers
47 views

How scared should we be about convergence warnings in lme4

If we a re fitting a glmer we may get a warning that tells us the model is finding a hard time to converge...e.g. ...
0
votes
1answer
23 views

Alternative to forecast() and ets() in Python?

I'm looking for a Python alternative to R's ETS() from forecast(). It's my understanding that ETS() is one of the best performing forecasting program and I would like to use it. However I am ...
0
votes
0answers
16 views

Running time dependent covariate model in R, getting warning

I am trying to fit this model, but it's giving a warning message I don't understand: ...
0
votes
0answers
10 views

Selecting multiple variables into model starting with common name in R [migrated]

As in SAS we can start multiple varibles using colon(:) option with start name. I wanted to do the same in R for modeling purpose. Any suggestions?
0
votes
0answers
19 views

How to install RJDBC package [on hold]

How to install RJDBC package? Because my network connection is not good to connect to the repo. Please tell me.
0
votes
0answers
10 views

Random effect model result of R and JMP

I have two groups of people, namely A and B. We have the hourly mean heart rate for 45-80 hrs, length differed by individual. We are interested in the group*time effect on the heart rate. Since I have ...
1
vote
2answers
70 views

What algorithm does ward.D in hclust() implement if it is not Ward's criteria?

The one used by option "ward.D" (equivalent to the only Ward option "ward" in R versions <= 3.0.3) does not implement Ward's (1963) clustering criterion, whereas option "ward.D2" implements ...
-1
votes
0answers
10 views

Inverse Wishart prior in Bayesian mixture model

i'm trying to fit basic Bayesian mixture model for bivariate normal and uniform distributions. Basically when I increase degrees of freedom parameter (wishart_df) I ...
-1
votes
0answers
12 views

R: creating a new column in Quandl data [on hold]

Beginner R user here. I am trying to recreate this! Quandl for R tutorial. Here is the code in GitHub. When I run lines 81 and 82 I get an error message stating "Error in ...
2
votes
1answer
16 views

Varying Non-Linear Parameters Based on Groups in R

I'm trying to develop a non-linear model, but I'd like to have the values for the parameters vary by group. To give you an example, a section of my data (just random numbers here) looks like: ...
1
vote
0answers
6 views

Labels missing in R likert plot [migrated]

I am trying to plot a simple likert graph. Somehow I am not able to set the value of legends. Can anyone please tell me how can I do that? The following is the ...
0
votes
0answers
8 views

R - Robust Ancova: Documentation/Examples for the ancmg function in the WRS package

Could anyone point me to a documentation or even better an example for the ancmg1 or ancmg functions of the WRS-package. There is a very short paragraph in the Wilcox' book about Robust Estimation, ...
1
vote
1answer
23 views

Model specification with Deflators: methodological question on forecast model

I am trying to build a model to predict one year ahead Earnings per share $(t+1)$ based on variables in year $t$. I’ve seen a lot of models in practice that use the following methodology: ...
2
votes
1answer
32 views

Exact central confidence interval for a correlation

I am working my way through (T.J. Diccio & B. Efron, "Bootstrap Confidence Intervals", Statistical Science, 1996, 11(3), 189–228), and I'm stuck even before I get to the good stuff. In the ...
0
votes
0answers
10 views

nonlinearTest() in S-plus vs R

Is there any similar function in R does the same thing as nonlinearTest() in S-plus? I am currently working on determine the number of regimes,delayed parameter d and threshold values for the ...
0
votes
0answers
9 views

VARMAX model in R

Is there a function in R that estimates the VARMAX model? There is one for a VARX (MTS package), but I didn't find one that works with the MA part also...
0
votes
1answer
51 views

Variance of $\bar x$, simulation with non-iid observations

So I know that the variance of $\bar x$ is usually computed as $\frac{\sigma_x^2}{n}$, and that this assumes the observations are independent. If instead, the observations have some positive serial ...
0
votes
0answers
4 views

Time in years(x axis) shows years in .5 interval - Time Series using R [migrated]

dsales1156ts<-ts(dsales1156,frequency=365,start=c(2011,6)) # This is my time series created with daily sales data when the first sale day is 6th January 2011. plot(dsales1156ts) The ...
0
votes
0answers
14 views

Controlling overfitting with random forests for very high dimensional data

I'm using the randomForest package in R to analyse a genetic dataset of ca 100 samples with 10.000 genes. The samples are grouped into 5 classes, the smallest being only of 5 samples. I'm ultimately ...
2
votes
1answer
31 views

Using proper scoring rule to determine class membership from logistic regression

I am using logistic regression to predict likelihood of an event occurring. Ultimately, these probabilities are put into a production environment, where we focus as much as possible on hitting our ...
4
votes
1answer
17 views

Presenting results of a meta-analysis with multiple moderators?

I wish to present the results of my meta-analysis using the best practices possible. I do not find, however, examples in articles similar to what my output is. Here's a simplification of my model and ...
1
vote
0answers
29 views

Multiple and long seasonality for a SARIMA model in R

While working on a big data set made of 10-minutes-points of information - i.e. 144 points per day, 1008 per week and ...
0
votes
0answers
14 views

R geom_smooth: what to write as aes [on hold]

I work with R and ggplot but I'm very new with it. I have already drawn point for 4 different data frames. And now I want to draw 4 regression lines for this points sets. Data frames are packed in ...
0
votes
0answers
11 views

Obtaining the Psi Weights of a seasonal ARIMA in R

I am trying to quantify the effect of a future random shocks on my seasonal ARIMA model. If I have understood the theory correctly, the easiest way is to express my seasonal ARIMA model in its "random ...