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

Measuring Accuracy of the SVM based model

I have developed a model which evaluates a user based on how important he is for the organization. For that purpose I have generated 1000 records for 1000 users. Here I have one dependent variable "...
0
votes
0answers
5 views

T test within data frame in r

I'd like to perform an independant t.test in a data frame ...
2
votes
0answers
21 views

How to interpret kmeans results on text data

(This post is a repost of a question I posted yesterday (now deleted), but I've tried to scale back volume of words and simplify what I'm asking) I'm hoping to get some help interpreting a kmeans ...
0
votes
0answers
10 views

bayesglm how to incorporate prior knowledge to improve model

I have downloaded the "University rankings data", available at: https://www.kaggle.com/mylesoneill/world-university-rankings, where the worlds top unis are nked in csv files and I want to take the ...
0
votes
0answers
15 views

R a priori function association rules between a column

I'm trying to find association rules from a CSV I have which has the folowing columns: Desc which is the description of what was bought and UUID which is the unique ID of each transaction from an ...
2
votes
1answer
39 views

K-S test is too sensitive

I'm trying to compare two samples to see if they come from same distribution. I'm not just interested in the measures of central tendency but in the overall shape and nature of the distributions. ...
0
votes
0answers
28 views

Data classification and regression in R [on hold]

My question is about finding the relationship between speed of a vehicle and its emission. I think, based on the nature of this problem, there is not a constant relationship between the speed of a ...
1
vote
4answers
68 views

How can I identify and remove outliers in R

I am performing regression analysis on prices of product that we have purchased, based on size and other attributes. However there are often buys in odd circumstances which factor into the price, ...
1
vote
0answers
20 views

When nature passes through (0;0): what are the consequences for a linear mixed model?

I'm analyzing the data for my master thesis; it's about photosynthetic efficiency for 10 different genotypes of a certain plant species (genotype=Accession in my dataset). For each Accession, I've ...
1
vote
1answer
35 views

Time series with 24 yearly data points - advice needed

I have a dataset containing the prevalence rate of Malaria in Botswana, starting in 1990 and ending in 2014. My task is to verify whether these data can be used in order to make predictions on the ...
0
votes
0answers
19 views

Kernel Smoothing with asymmetric window bandwidth

I have a question about kernel regression: assume that we have a time series (Time, Speed) of a vehicle during a trip. I know that how I can smooth my data, using ksmooth(Time, speed, h). This ...
0
votes
1answer
27 views

What can I conclude from the following Granger causality test?

I have two monthly time series: one for house prices expressed in annual change growth rates: $\left( \text{ln}(X_t) - \text{ln}(X_{t-12})\right) - \left( \text{ln}(X_{t-1}) - \text{ln}(X_{t-1-12})\...
0
votes
1answer
22 views

ANOVA 3 factors: 2 fixed factors, 1 factor nested within crossed fixed factors

I have a dilema of the suitability of the analysis with my design. I have 3 fixed factors: - Photoperiod (2 levels: 16L8D; 10L14D) - Temperature (2 levels: 6ºC; 25ºC) - Time (4 levels: 50;70;90;150 ...
0
votes
0answers
13 views

How to make ggplot axes to not start in 0? [on hold]

I am making a graph using ggplot and want to have my y and x axis, but I do not want them to start in 0. You can see my code below. I tried lineend, but I'm not sure what to put as argument there. <...
0
votes
0answers
17 views

How to predict Kalman filter based ARIMA model in R?

I am learning R and time series models by myself. I wrote a code for using ARIMA model based on Kalman filter to predict next 10 steps. But, I am not sure if the code is correct as I checked many ...
0
votes
0answers
10 views

R - analyzing 2 by 2 table of categorical data

I have a small data set of cases from an outbreak. For each case I have collected data for a few variables (age, HIV status, hospitalisation, country of infection etc. ). There are only 28 cases and ...
0
votes
1answer
14 views

How to deal with discrete and continuous output multi variables in neural network?

I have created neural networks using nnet for either discreate or continous output variables, but not using both at once. Now I have a problem in which the output ...
1
vote
1answer
23 views

Processing time prediction

I'm performing some processing of rather large amounts of data. I did a hundred tests with some constant number of records (i.e 1, 2, 3, 4, 5, …, 99, 100 millions) and measured execution time with <...
0
votes
0answers
12 views

R + Model + web service [on hold]

I would like to interface R with some other language (C#/Python/anything easy to use) to provide it with a web service (or other technology) to an other application developed in C#. R => black box ...
0
votes
0answers
13 views

forecast using an ARIMA Model

I'm using the R function auto.arima to fit an arima model for a time series, the result is an ARIMA(2,1,1). After that I apply the ...
0
votes
0answers
28 views

How to compute frequency distribution in R? [migrated]

Actually there are many functions which I don't know what to use to calculate it X = rnorm(100) Lets assume I have a normally distributed vector called X. I don'...
0
votes
0answers
19 views

How to convert SAS model to lme4 model?

I want to run a linear mixed model on a dependent variable DV that is collected under two different Condition at three different ...
-1
votes
0answers
24 views

Attempting to create histograms in R [on hold]

I am trying to write a function in R that will generate a histogram for me. My current code is as follows. ...
0
votes
0answers
6 views

How to extract fixed coefficients from output of coxme in R? [on hold]

I tried using 'names' and 'str' function but they do not help me find the right label to use in order to extract the fixed coefficients from the output of coxme I would like to see the entire output ...
1
vote
0answers
26 views

Finding moments of the untruncated distribution from the moments of the truncated one

I would like to get the moments of a normal distribution from the moments of a two-sided truncated normal distribution in R. Their formulas are available on the truncated normal distribution ...
0
votes
0answers
17 views

In R, why is the survdiff function returning the p value = 0?

I want to obtain the pvalue of the three curves that are plotted. Here is the code that does a survdiff: ...
0
votes
0answers
5 views

Interpretation of `int.size` values from `gbm.interactions` in R

Does anyone know how to interpret the int.size values from the gbm.interactions output? Do they say anything about significance of the interaction? In the table below, can any of these interactions ...
1
vote
0answers
7 views

Repeated Measures MANOVA with contrasts?

The data that I am using consists of 74 people that answered three DV once (each of them once). I had a 2x2 design, with Context x Intensity as IVs. I have done a MANOVA on the data but my supervisor ...
1
vote
0answers
17 views

If two groups are significant in a Mann-Whitney U test, should they also be significant in a Dunn's test?

I just ran across something that I thought was interesting but don't fully understand. I have some categorical data that I am comparing in R. I use a Mann-Whitney U test when there are just two groups ...
0
votes
1answer
42 views

Predict results of Elections

I have information on the votes in my town and in the country. I want to predict the results in the country's elections knowing the results in my town. What methods I can use? I have thought of ...
0
votes
1answer
36 views
-1
votes
0answers
32 views

How to understand the results of generalized linear model in R? [on hold]

I am always confused about the results of generalized linear model when I use R package like MASS. For example, we can get the summary below using glm.nb: ...
0
votes
1answer
15 views

How to select a range of dates in R? [on hold]

I have a dataset that I want to extract certain date ranges to look at the differences monthly/seasonally in R. The data has a column of date values. Q: How to obtain the full rows of the dataset ...
1
vote
2answers
175 views

Questionable Beta Regression Results

The goal of this regression is to determine whether the amount of leaf disk that an insect consumed varied by what tree the leaf material came from. I'll acknowledge upfront that my coding is rarely ...
0
votes
0answers
30 views

What is the FASTEST Neural Network Command in R? [on hold]

I'm running Neural Network on a data frame with 40,000 observations, 7500 predictors and with one response variables. The response variable is a categorical variable with 4 levels. I've found a lot ...
0
votes
0answers
6 views
1
vote
3answers
54 views

Model/explain a time series as a function of other time series - R

I have six time series, all made of daily historical data. All of them cover the same period and the same days, they are all about 2700 days long. I want to explain one of the time series as a ...
-3
votes
2answers
46 views

log-log regression in r

I want to do a log-log regression in R. I managed to do a simple linear and log-linear regression by using this code: ...
1
vote
1answer
21 views

Holt Winters with exogenous regressors in R

I need to forecast using HoltWinters with regression parameters using R. But I found there is not any option of xreg in ...
0
votes
0answers
9 views

Conditional Fixed Effect logistic model with unbalanced multilevel panel data

I have troubles finding methodology to test a model in R. My question may be long and contain many details, but I will be glad if somebody can help me and give some hints how to tackle it. I have ...
0
votes
0answers
13 views

Negative Exponential Decay in R [on hold]

I am trying to do negative exponential decay in R. My questions are: How to code this in R? How to find out the optimal Decay Rate? Will nlsLM() in R be helpful, ...
0
votes
0answers
14 views

How to prepare data for anova or manova

I have a datafile (below is Gdrive link) and I want to prepare it for Anova/Manova tests. About Data: ...
0
votes
1answer
27 views

What is “step size” in LASSO regression?

I'm looking at this example for LASSO regression in R: http://machinelearningmastery.com/penalized-regression-in-r/. It ...
0
votes
0answers
9 views

Selection of additive/multiplicative trend/error/seasonality in ETS

Forecasting: principles and practice. This book tells about 30 different types of ETS models. It describes about additive models and multiplicative model. I would like to know on what basis do we ...
0
votes
0answers
27 views

Demand Forecasting Models

I want to forecast demand of various products using time series data of 2 years (using loops on products in R), frequency is daily and demand is to be forecasted for next 90 days I have used the ...
0
votes
0answers
13 views

Why var.test and levineTest produce very different p-values? [duplicate]

I run var.test in R using two samples sample1<-c(1,2,3) and sample2<-c(1, 10, 1000). I got a p value of 0.000006. When using Levene's test, I got a p value of 0.3689. SO is the variances equal ...
1
vote
0answers
13 views

Estimation of correlation matrix for panel data

I want to estimate correlation matrix for panel data. However, I am confused how to proceed? Should I estimate it as pooled, over time, or cross-sectionally? ...
1
vote
0answers
16 views

Compute a Quadratic discriminant analysis (QDA) in R assuming not normal data and missing information

In this course, the professor is saying that we can compute a QDA with missing data points and non-normal data (even if this assumption can be violated). But the problem is that I don't know any ...