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

0
votes
0answers
3 views

Bootstrapping a t-test in R

I'm new to R, but am doing my best to learn it one step at a time. I've been working with a particular problem for a paper, but am having troubles implementing it in R. I couldn't find any earlier ...
0
votes
0answers
7 views

Using partial AUC as Caret metric for cross-validation?

I'm evaluating a grid of tuning parameters using Caret with metric="ROC" for cross-validation. Is there any simple way to use as metric the area under the curve for an specified interval of the ROC ...
0
votes
0answers
6 views

Problem applying a weight to the nlme() function [migrated]

First time poster here. I am currently attempting to fit a nonlinear mixed-effect model to predict the crown ratio of a tree using the nlme() function from the ...
0
votes
1answer
6 views

Two way Friedman ANOVA in R

I have ranked concentrations (from 0 to 5) of 5 different proteins from 3 different locations from the same patient. In total, 15 measures per patient and 61 patients, so 915 observations. What I'd ...
0
votes
0answers
9 views

How can I use negative binomial regression with caret?

I'd like to use negative binomial regression with caret. However in the list of supported models I can't find it. I tried to use: ...
0
votes
0answers
3 views

Multiinformation (aka Total Correlation) based feature vector selection

I would be happy to discuss the question with an information theory specialist. It is not exactly about the Mutual Information. I use a multiinformation metric (available, for example, in R's ...
0
votes
0answers
9 views

non parametric analysis of variance in small, unbalanced data set

I'm facing a data set composed of five different dependent (1,2,3,4,5) and three independent (I,II,III) variables. 1,2,3,4,5 are continuous but not normally distributed. I,II,III are qualitative, I ...
0
votes
1answer
11 views

Fitting a Copula to Two Stochastically Dependent Variables in R

I have two sets of observed data, and I would like to model their joint distribution using a copula in R. I have transformed each set into a uniform distribution using their CDFs, and so now I have ...
1
vote
0answers
15 views

Should predictions with negative binomial regression only produce integers?

I have a dataset consisting of about 600 observations. Each observation has around 100 attributes. One of the attributes I want to predict. Since the attribute that I want to predict can only have ...
1
vote
0answers
7 views

Comparison between vectors of distributions

I am running an ecosystem model and would like to give the proper statistics for a sensitivity analysis I'm performing on the model. The model provides a vector x containing all the flows in the model ...
0
votes
1answer
19 views

Outlier detection with ARIMA models?

I have several different time series with monthly values for 8 years, where I fit an ARIMA model. And the purpose is to forecast the next year and indicate possible outliers in a fancy way. Is the ...
0
votes
1answer
22 views
0
votes
0answers
13 views
3
votes
3answers
62 views

Is it feasible to rank several unnested Generalized (Additive and Linear) Models by AIC score?

I have one response variable and a large number (>100) of explanatory variables. METHOD 1: I have completed one approach where the explanatory variables have been reduced via a PCA (in accordance ...
0
votes
0answers
9 views

Forcing multcomp:glht() to calculate as many meaningful pairwise factor combination as possible

I have a very imbalanced dataset consisting of several habitats (i.e. "woodland", "grassland", "swamp", and so on) with different sample sizes (10 - 40) and species counts as outcome. Species counts ...
1
vote
1answer
26 views

Identifying contrasts between groups in R

I have some doubts which R function choose for my task. Lets imagine we have two types of objects "tree" and "grass" . I've estimated the height of both multiple ...
0
votes
0answers
20 views

Can we improve the Multiple R-square(coefficient of determination) value for a dataset of a linear regression model?

Here is what i am doing. I am building a logarithmic model in linear form based on the correlation between two variables shown in the graph! lm(y~logx,data=logdata) -- i have only one predictor and ...
0
votes
0answers
22 views

Genetic Algorithm in Finance [on hold]

I have done a lot of research on genetic algorithms, particularly its applications in quantitative trading and portfolio optimization. Now I would like to work on a real world case involving ...
0
votes
0answers
18 views

How to numerically compute Likelihood Ratio Test for a Logistic Regression?

Suppose I am simulating a data set from a binary logistic regression with $k=5$ predictors out of which $k_2=3$ are inactive i.e., $\beta_3=\beta_4=\beta_5=0,$ and remaining $k_1=2$ are active having ...
1
vote
0answers
20 views

Post hoc test for robust 3 way ANOVA

I am doing a 3x2x2 between subject study. To make thing simple, I name my variables as A, B and C here. Using the WRS 2 package in R, I have gotten results for the ...
0
votes
0answers
5 views

voom : mean variance trend plot, How to interpret the plot

I am new to the Limma package and when using voom I get the following plot. I am really not sure what it means. I wonder if anyone here have seen something like this before, or could explain it to ...
0
votes
0answers
9 views

A strange R limma voom function mean-variance trend [duplicate]

I am opening a long silent question here because I cannot understand my mean variance trend produced by limma. I am new to RNA-Seq analysis and tried using limma on my data. After voom transformation, ...
0
votes
2answers
45 views

How to deal with a single Yearly spike with ARIMA?

I have a time series which shows an yearly spike around summer but otherwise is predictable by an AR(1) model. The tests on the data also show that the time series shows stationarity and is ...
0
votes
0answers
17 views

How can I use “tsboot” in the boot package in R to do block bootstrap?

How can I use "tsboot" in the boot package in R to do block bootstrap or alternatively, by what means can I perform Block bootstrap? Please teach me step by step.
0
votes
0answers
12 views

In R: How to cluster retail transactional data with multiple products on multiple days

I have a transactional data set like the following which contains transactional history of 97 products with selling dates from 2014-5-1 to 2014-11-30: ...
0
votes
1answer
12 views

Compare two lm() which are subsets of each other

I'm trying to compare two linear models, one calculated with full dataset and one calculated on a subset of the same data. The reason why I need/want to do that is, I suspect a part of the data to ...
0
votes
3answers
23 views

Using roc() in R with a parametric response variable name in the formula [on hold]

I have a column named inp, and 10 columns named resp1, ..., resp10 in a matrix in R, and I want to compute receiver operating ...
0
votes
0answers
5 views

R Shiny - Recursive indexing failed at level 2 [migrated]

Trying to create a shiny app where the there is a plot and the selected points create a table with said points. Having some difficulty locating the source of my error, but have been able to narrow it ...
0
votes
0answers
14 views

Histogram in R. Problem with Function hist() [migrated]

I have csv file with ID and variable. It looks like this ID V1 1 0 2 -0,12 3 0,05 .... if I use hist(mydata$V1) I get an error ...
1
vote
0answers
27 views

Is there any algorithm that can predict multi-variables(response variables) based on one independent variable

let me ask the question in detail with an example -- I have a historical dataset with columns(a,b,c,d,e,f,g) Now i have to predict (b,c,d,e,f,g) based on the value of 'a' and all the variables are ...
0
votes
0answers
24 views

spurious regression/co-integration

I have two I(1) time series and I regressed one against the other and found that it had low to moderate R-squared but my DW statistic is about 0.015. I know the literature says this is the case of ...
3
votes
1answer
34 views

KS test for Uniformity

I am attempting to use the KS-test to test whether a set of points is uniformly distributed over an interval, and I had a question about whether there may be a more optimal test for what I'm trying to ...
0
votes
0answers
9 views

Interpreting mean of coefficients by accessing $Beta in BMR package in R

I've been using BMR (Bayesian Macroeconometrics in R) package to carryout BVAR(Bayesian Vector Auto Regression). When defining the Minnesota prior for my monthly dataset and have obtained mean of each ...
0
votes
1answer
20 views

Obtaining regression model B-values in an OLS model in R

This is probably a fairly silly question, but I have the following regression model: ...
2
votes
0answers
21 views

Uniform Sampling from Intersections of Faces of Simplices

I'm trying to sample uniformly on the intersections of faces of several simplicies, with all coordinates being non-negative. That is, given constraints $$A\vec{w}=\vec{b} \ \ and \ \ \vec{w} \geq ...
0
votes
0answers
11 views

Data imported from stata, variables not found [on hold]

I am trying to import .dta STATA dataset into R. I input: library (foreign) read.dta ("E:/Gabrielle.dta") Then what seems to be some of my data appears with a mix of numbers and "NA" Then I input: ...
0
votes
0answers
9 views

R - Using function which to find out desired sample [on hold]

I have a dataset which 26 rows which 4 columns two as a labels "Features" and "Method" and the other two as values "% False Alarms" and "% Detections". I would like to find the best feature and method ...
0
votes
0answers
11 views

List of nlme models

I am trying to find a list of models that nlme provides. I am completely new to this area and finding it hard to get a comprehensive list of models that nlme provides facilities for. I have tried to ...
1
vote
0answers
29 views

Checking the assumptions of K-means clustering

I want to do a k-means clustering on a dataset containing 22 numerical variables between 0 and 100 and 75 observations using R. I read this post How to understand the drawbacks of K-means on k-means ...
0
votes
0answers
12 views

Anova Question - how to see an interaction between two variables over three blocks. Subset?

I'm getting myself confused about how to analyse interactions in r. I am looking at eye-tracking data. I have the time duration of the saccade (movement of the eye) as 'sacduration', the physical ...
0
votes
0answers
6 views

Anderson-Darling p-value different between Nortest and Adgoftest

I'm assessing the normality assumption in a data set using both ad.test function of nortest package and the equivalent in the Adgoftest one. The resulting p-values are strongly different and lead to ...
1
vote
1answer
38 views

best tool for plotting 3 3D lines in one plot

I'm trying to recreate an image using either R, Matlab or Python (the languages I know) but I'm having troubles finding a good library for the task. The image I'd like to recreate is the one below. ...
0
votes
0answers
25 views

Q: How to correctly include a categorial control variable in a regression model (in R)?

I'm trying to fit a (logistic) regression model to predict the successful funding of crowdfunding ventures (0/1) based on a series of IV with different level of measurement. One of these IVs is a ...
0
votes
1answer
27 views

Survival regression variance estimates

I would like help understanding why a survival regression with no censored data-points does not give the same variance estimates as a linear model (see code below). I think it must be something to do ...
0
votes
0answers
17 views

How to use the output of a RStan model to predict test set data? [duplicate]

I'm uber-new to Bayesian statistics and am tasked with implementing a housing price estimator using RStan (the Stan package for R). I'm quite consfused as to how to design the modeling activity in ...
1
vote
0answers
21 views

J48 in Weka and R [on hold]

I tried J48 classifier in Weka to train the learner and got an accuracy of 99% but when I supply it with test dataset it threw me an error saying Training and Test sets are incompatible. I failed at ...
0
votes
0answers
17 views

specification of mixed effects model with two levels of repeated measures (in R)

My colleagues and I conducted a study of the effects of an experimental translocation on the movement and activity patterns of common brushtail possums in New Zealand. This involved first capturing 12 ...
1
vote
1answer
23 views

P-value of Augmented Dickey-Fuller test and KPSS test

I would like to test if the time series of the US 3-month treasury bills (monthly data from 1934 to 2015) is stationary. I'm using the ADF test in R (from the package ...
1
vote
1answer
66 views

Linear model coefficient negative in summary but positive in plot

I am an R beginner, so sorry if I missing something basic. I did a linear fit with 2 input variables and 1 output. Plots of the output vs each input show a clear positive slope for each. However, the ...
0
votes
0answers
13 views

permanova or non-parametric test for multiple explanatory variables and interaction

Hi I am trying to find a test to analyse the following data set. Response variable is failure or success (0 and 1) measured over 4 time points, under 2 different treatments (light and temperature) in ...