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

Non parametric analysis

The my dataset is not normal distributed. In order to apply a non parametric analysis, exist only the Kruskal Wallis test or others? I need to find a test similar to ANOVA to apply a dataset not ...
0
votes
0answers
9 views

Calculating Cumulative Hazard Function

Why are not hazard.km and quantile.km functions working in R ? ...
2
votes
1answer
28 views

Need help selecting appropriate statistical method for animal study

I could use some help deciding on the proper statistical method for a current experiment. The experiment is setup as follows: Independent Variable: Diet (4 groups of 10 for a total of 40 animals) ...
0
votes
0answers
10 views

How do I conduct model validation with glm models that have proportional response variable?

I would like to determine which environmental factors influence turtle nest survival. I ranked glm models with AIC using a step-wise procedure. The response variable is the proportion of eggs that ...
0
votes
0answers
12 views

Error Output - Wrong model type for regression

I am trying to constructs an Learning Vector Quantization (LVQ) model. ...
0
votes
1answer
11 views

R: Coping with bad model fit convergence during bootstrap

I'm running into trouble while checking the robustness of a GLM using the bootstrap procedures in R. Basically I want to check whether the estimated coefficient estimates of an existing GLM that I've ...
0
votes
0answers
4 views

Collapse duplicate rows by median value in R [migrated]

I have a date frame with two columns. I would like to remove rows where there are duplicate entries in the first column. however I would like to select a specific row to remain based on the value of ...
0
votes
0answers
11 views

Data importation, manipulation & calulation on list of pairs [migrated]

I have a 'complex' problem to face: 1) I have to import in R a text file ('from_soft') which is shaped like that (output from an external software) : ...
0
votes
0answers
32 views

What does the following ACF curve mean ? (Picture attached)

I was checking for seasonality and other dependencies and this is the curve I get . There's no apparent seasonality....but what exctly does the falling slope mean? Any help would be appreciated. ...
0
votes
0answers
14 views

Cointegration in R - Standard error, test statistic and p-value of weights

I'm using urca package in R version 3.2.1. I used ca.jo function on a set of I(1) regular time series variables - taking two at ...
0
votes
1answer
22 views

Correlation coefficients of a time series

I have 100 simulations of an ARMA(1,2) process, created with R is such a way: ...
0
votes
0answers
7 views

Is a Mixed type III anova appropriate for unequal N data? How does one run this analysis in R?

I have a dataset from a psychological experiment that consists of three repeated measures of responses to different kinds of items 'variable', as well as two between-subject IVs, 'condition' and ...
1
vote
0answers
10 views

R square change for 2-way interaction model

I want to test a regression model with neuroticism as focal predictor, agreeableness as moderator and RT variability as dependent measure (covariates: attentional control and mean RT). Previously, I ...
0
votes
1answer
12 views

One main effect and one interaction in R using multiple regression, is that possible? And why am I getting two interaction terms in output?

I have two factors that are fully crossed, the levels of the factor are each coded 0 and 1. I am running a regression testing for one main effect and one interaction. The following is my logistic ...
0
votes
0answers
16 views

Time-series cross-sectional classification problem

I have a time-series cross-sectional dataset consisting of 100 individuals that each had 4 features measured yearly for 21 consecutive years. One of the features is binary and the other three are ...
0
votes
0answers
16 views

Understanding ANOVA for comparison of models in R. Why is the result the same regardless of model order?

I'm trying to figure out why the anova function in R gives me the same results (for the p-value) regardless of the order of the models. ...
0
votes
1answer
21 views

GAM : choosing the a function for each predictor

When using GAM methods for prediction: $y = af_1(x1) + bf_2(x2) + cf_3(x3)... $ Where $x_1,x_2.. $ are predictors / features used in the data. The gam package in R helps us find the best functions ...
1
vote
1answer
61 views

Goodness of fit in R

I need to check for goodness of fit using K-S test in R. I have a dataset (containing 50 data points) and a non-standard continuous probability distribution. Should I peform a one-sample or two-sample ...
4
votes
1answer
69 views

Why areny my 95% confidence intervals symetrical around the mean?

I am trying to calculate the 95% confidence intervals around a mean value using a bootstrap procedure, from the mosaic pacakge, to deal with some assumption issues in my data. The code below seems to ...
0
votes
0answers
16 views

Regression model for Cumulative data in R

I am having a daily data for 3-4 months and another variable which is the cumulative sum. It starts with some value on the first day and it keeps on adding and at the end of 3 months, it would be sum ...
0
votes
0answers
16 views

Is there are better way of solving this problem than using a Neural Network Regression Model?

I'm working on power plant time series data from a SO2 absorption process and my main objective is finding out which independent variables are critical for reducing SAG (% of SO2 concentration ...
0
votes
0answers
12 views

Parallel processing in R saving plots [migrated]

I have a code in R to perform classification and estimation( using regression modeling) on 60 data sets using random forest algorithm and at the end of it there is a plot to show how a quantity ...
0
votes
0answers
10 views

Why the Brier Score's better when probabilities are estimated through PAVA instead of Platt Scaling?

I've been studying (and applying) SVMs for some time now, mostly through kernlab in R. ...
2
votes
2answers
37 views

Exact formula Yates' correction in R

If I run a chi square in R with the Yates' correction, I get slightly different results from doing it by hand. What is the exact formula R is using for the Yates' correction? I use the simple code: ...
0
votes
0answers
7 views

Correlation is moderate but Path coefficients (in pls-sem) show insignificant results

I am performing PLS-SEM analysis (usng plspm package), the outer loading's are significant as CI do not include zero on any of them However, large number of path coefficient's (i.e, inner model)are ...
0
votes
1answer
20 views

Simulate ARIMA Model in R using same starting values as original time series?

I have built an ARIMA model in R with the forecast package's auto.arima() function. I want to simulate the ARIMA model with the same starting values as the original time series. For example, if my ...
0
votes
0answers
5 views

Regarding pattern recognition and forecasting next set of sequence [on hold]

I have been working on use case where I have some sample data as below : Date Device Name Time Facility Code 1/6/2015 Tablet X 16:18:48:168 22 A 1/6/2015 Tablet X 16:18:50:41 ...
0
votes
0answers
19 views

How can I find the variance components from a MCMCglmm output?

I have a dataset in which birds (n=55) were measured twice for five different behaviours. I am now trying to statistically test if individuals are reapeatable/consistent in their behaviours or not. I ...
0
votes
1answer
22 views

Simulation of time series with R [on hold]

I'm new on time series. I'm trying to solve an exercise on the simulation of an ARMA process. The problem is the following: Generate 100 simulations, each with n=60 elements of an ARMA(1,2) process ...
0
votes
0answers
6 views

Package ‘JPSurv’ - Trends in incidence rates [on hold]

Has anyone ever used the JPSurv package in R to look at trends in incidence rates? The original software put out by the NIH - Joinpoint - is not compatible with my computer (a macintosh) and so I ...
0
votes
0answers
8 views

Error when using Irlba function in R? [on hold]

irlba(A=X, nu=2, nv=2) Error in matrix(0, m, m_b) : non-numeric matrix extent In addition: Warning messages: 1: In min(m, n) : no non-missing arguments to min; returning Inf 2: In min(n, m) : no ...
2
votes
1answer
24 views

Bars or Boxplot

For my thesis work I need to plot data as dry mass content, Brix, sugar content, etc., of 12 genotypes of onions. My question is, what is convenient to use, barplots or boxplots? Personally I like ...
1
vote
1answer
19 views

R - Multivariate K-nearest neighbor outlier detection

I'm trying to implement the algorithm K-nearest neighbor to detect outlier from a multivariate dataset. I don't know how to do it. Could you provide me some example?
1
vote
1answer
19 views

How to check if the correlation between two continous variables is influenced by a categorical factor?

I have a data frame (df) where I see correlation between two continuous variables (c1 and c2). I need to know whether the observed correlation between the two variables differs between groups, which ...
0
votes
1answer
38 views

what does the minus sign mean in the function definition in R [on hold]

I am reading a tutorial and I found a function definition in R ...
-1
votes
0answers
10 views

Brand based aggregation Fundamental

I am looking to do brand based aggregation on our audience (Brand based clusters tell you what brands people like). I have the following data about our customers. ...
0
votes
1answer
50 views
0
votes
0answers
28 views

Graph with 3 variables in R? [on hold]

I have some data with 3 variables: x = position y = length z = number Here is an example: x y z 12 40 8 13 40 8 14 40 8 15 40 5 16 24 9 I'd like to ...
0
votes
1answer
60 views

Improving a logistic regression model in R [on hold]

I have to devise a model in R, capable of predicting the type of a disease, which is a categorical dependent variable (three possible values), through several continuous and categorical, some of the ...
0
votes
0answers
6 views

Inverse probability weighting (IPW): standard errors after weighting observations

When using propensity scores for inverse probability weighting (IPW) the standard errors for the parameters in the regression model may be affected. I have seen several examples of people using ...
-1
votes
1answer
36 views

Normal distribution in R: Find the value of $x$ for $P(X=x) = c$ where $c$ is known

I have a normal distribution with parameters $\mu=750$, $\sigma=260$. I'm interested in finding the value of $x$ that satisfies $P(X=x)=0.001$ for both sides of the tail. How would I go about doing ...
0
votes
0answers
17 views

How can I extract a residual variance-covariance matrix in lme?

I have been using MCMCglmm in R to fit bivariate (two response traits) mixed models in R, but now I need to move to lme to account for temporal autocorrelation of the residuals. In MCMCglmm I can fit ...
2
votes
1answer
31 views

Fitting nonlinear meta regression models to data

I have a collection of data, obtained from different studies. To plot the ratio of means against different CO2 concentrations, I used a random effects model with a continues predictor (the CO2 ...
1
vote
0answers
12 views

loop ordinal regression statistical analysis and save the data R [on hold]

I am relatively new to R. The short version of the data looks ike this: ...
0
votes
1answer
49 views

Multivariate OLS - Partialling Out

I have bee wondering why in a multivariate OLS-Regression it is not possible for R² to decrease when increasing the number of explanatory variables. The Point is that for example in the model ...
0
votes
0answers
22 views

How to choose which test to use to determine if a time series is non stationary?

I want to determine if my time series is non stationary. I looked many articles and have learned there is not just one formula - ADF. It seems you must use some series of tests and assumptions. But I ...
0
votes
0answers
15 views

Bayesian random effects meta-analysis on the risk ratio with r2jags

Following the work of Warn 2002 I am trying to set up the model for a Bayesian meta-analysis on the risk ratio and the odds ratio. I am using R together with R2jags to fit a simple RE MA model. ...
0
votes
0answers
25 views

Failed to reduce deviance while using “lme4 : glmer ”

this is my first post, so I will try to make it as clear as possible. Hopefully is not something trivial and I am just stuck. I am performing meta-analysis using the glmer function of the lme4 ...
1
vote
1answer
33 views

lavaan WARNING: could not compute standard errors!

I have a problem. I use r package "lavaan" to make confirmatory analysis. I run the following code: ...
0
votes
1answer
18 views

Forecasting with no seasonality

I have a set of data, let's say average weight of employees, captured every month over a period of 5 years (2010 - 2014). I cannot find a seasonality trend in the data over these years. Also, I have ...