The Stack Overflow podcast is back! Listen to an interview with our new CEO.

Questions tagged [r]

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`.

6,606 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
0
votes
0answers
2k views

How to report a permutation test?

I want to compare a parameter between two independent groups of volunteers (see MWE below). All volunteers had baseline reading (V1) and a subsequent reading by a later visit (V2) for intervention (<...
0
votes
0answers
180 views

Repeated measurement analysis advice in R lme and / or aov and a couple of more questions

I want to analyse the visual performance, operationalized via contrast threshold, depending on adaptation luminance and spectrum, gathered for 29 subjects. I'm currently kind of confused of how to do ...
0
votes
0answers
44 views

Group effects where there is a single group

Suppose I have a table of subjects and measurements as follows subject measurement s1 1 s1 2 s1 3 s1 4 s1 5 s1 6 s1 7 s1 8 s1 9 s1 ...
0
votes
0answers
1k views

Metric warning using caret's rfe

I am using the caret package to do feature selection with rfe while training a knn ...
0
votes
0answers
134 views

Recursive Feature Elimination Fails to Output as Expected

Currently I am using rfe function in the "caret" package to do feature selection. There are 380 variables as input candidates. I have done many trials and I noticed that something weird always happens,...
0
votes
0answers
71 views

Is this a valid test?

I have 5000 cases vs 5000 controls with positive/negative outcome. chi.test shows no significance for this data. I get significance when subsetting cases on VarX, ...
0
votes
0answers
821 views

How to interpret the significance of logistic regression variable? Something analogous to a partial F test in logistic regression

For ordinary linear regression with Gaussian noise, it is easy to interpret the significance of a variable. This is consistent with a partial F test. The square of the t-test for the second variable ...
0
votes
0answers
384 views

Modified ECDF in R

The ecdf (empirical cumulative distribution function in CDF) in R, instead of giving $P(X \le x)$ for a random variable $X$, it gives the proportion of observations in the data that are $\le X$. I ...
0
votes
0answers
627 views

Multi Factor analysis with FactoMineR

I have a database with different variables, both categorical and numerical. I wanted to analyse these using MultiFactor Analysis with FactoMineR, with the main idea to obtain which of them are the ...
0
votes
0answers
416 views

Exact p-value for any nonparametric test

After having found the R-package coin, I have a question. For example, to get an exact p-value, I could use the function ...
0
votes
0answers
92 views

Estimating the total number of sample subsets of size 10 from a population of size 1000

If we have $n > 1000$ units to sample from, how can we estimate the number of subsets of a certain size, since the number is too much for R to handle? What I ...
0
votes
0answers
146 views
0
votes
2answers
3k views

Data transformation to fit gamma distribution in R

I'm having trouble to fit and simulate a gamma distribution using the fitdistr function from the ...
0
votes
0answers
120 views

Would rotation of extracted components/factors after PCA/EFA affect results of a subsequent regression analysis?

To use the scores of the extracted components/factors in a further regression analysis, like mixed effects model regression as predictors to an outcome variable or DV. Would be there any discrepancies ...
0
votes
0answers
84 views

Difference between two univariate coverage versus bivariate coverage (ellipse)

I am trying to compare coverages from accounting for two outcomes independently and as a pair. I have 2 sets of p values (p1,p2) from 60 simulations say. I am trying to find out how many times is the ...
0
votes
0answers
462 views

Random intercept mixed model in R - is this fit… OK?

I am looking for opinions/interpretation on a model I'm trying to fit. A disclaimer: I'm an ecologist and not a statistician; and I appreciate everyone's time and opinions! I am generally following ...
0
votes
0answers
347 views

can Dirichlet prior distribution be larger than 1?

This question is related to my quest of clustering the sequences using mixture Markov modeling. I have trouble understanding Dirichlet priors in the context of MAP-estimate (Mixture Markov Models). ...
0
votes
0answers
63 views

How can two data sets have the same power?

I'm doing one-way ANOVA power calculations (in R) for an RCBD trial with 15 groups, 3 blocks, and n = 3 per group. How is it possible that two different ANOVA models have exactly the same power even ...
0
votes
0answers
1k views

Principal component analysis in 3D Scatterplot

I am new to principal component analysis (PCA). I performed PCA for a dataset with 54 samples. When I project them in 3D scatterplot, I can see samples with similar characteristics are grouped ...
0
votes
0answers
1k views

ARIMA Models in R, implementing in C

I need to take the output parameters from an ARIMA model fitted in R from the following set (1,0,1), (0,1,0), (1,1,0), (0,1,1), (1,1,1) of models and implement the prediction function in C. I DO NOT ...
0
votes
0answers
867 views

Predicting ecommerce variables based on visitation data - R or Python

I have 1.5 years worth of e-commerce data (orders and revenue) for 2 countries (US and UK) with daily metrics for visits, unique visitors, and page views. I would like to model these transactions and ...
0
votes
0answers
458 views

Distribution check using R

I want to check the probability distribution for my data using R.In some site I found fitdistr function in package MASS can do ...
0
votes
0answers
63 views

Determine minimum acceptable step in cut()

I'm using cut() to transform data like this: ...
0
votes
0answers
54 views

Determining equivalence of relationship between more than one regression

I've got a data set which has volume of mail sent from 2001-2012, recorded by age group. That is, for seven different age groups, I have each age group's annual volume of mail sent over that time ...
0
votes
0answers
702 views

Making sense of the output of svd() in R

I created a matrix of dimensions 6X5 and applied the svd() function on it. ...
0
votes
0answers
75 views

Meaning of I(Var^(-1)) in r

I have a test dataset on which I run the following regression analysis in r: fit <- lm(Cost ~ Slope + YardDist + Removals + TreeVol, data = test) I get an r-...
0
votes
0answers
808 views

Plot forecasts through vecm by using calendar years

I'm using the library vars in R to plot fanchart and predictions through the vector of error correction model. I have used this ...
0
votes
0answers
68 views

Regression for categorical y and proportional and discrete xs

I have a model with a categorical dependent variable and independent variables that contain a proportional variable also. It appears that multinomial would be an ideal fit, but am not certain on how ...
0
votes
0answers
662 views

Less significant findings using conditional logistic regression

I used regular logistic regression on my dataset and got a few significant hits. However, since the data is 1:1 case-control matched data I decided to try using conditional logistic regression (...
0
votes
0answers
1k views

Why my MA plot shows a pattern/trend while the normalized expression values not?

I am doing microarray analysis using bioconductor. I first performed the quality checks which was ok according to recommendations. I created an MA plot after normalizing the AffyBatch data. My MA ...
0
votes
0answers
444 views

Finite output in logistic regression with divergent `glm` algorithm

let m be my matrix of data ...
0
votes
0answers
262 views

GLMM Models in R

I want to see if there is a significant relationship between the mating (response variable) and several explanatory variables such as individual number (categorical), leg movement (continuous) and the ...
0
votes
0answers
194 views

Comparison with trial dependent chance level

I ran an experiment where each participant had to choose 1 image from a 4-image display and I measured whether the image they chose was from category A. I want to compare the average proportion of ...
0
votes
0answers
243 views

R ordinal regression packages

I have tried the clm and clmm functions in the ordinal package and the ...
0
votes
0answers
2k views

Easy-to-apply tests for randomness

I'm interested in testing a sequence of numbers for randomness. I've done some searching and come across die hard and die harder. However these tests seem to require some expertise to apply, or at ...
0
votes
0answers
68 views

Is my random variable affecting my response?

I performed an experiment on coral colonies (10 colonies, randomly chosen in repeated measurements); manipulating aragonite/carbon chemistry and temperature (fixed effect) to analyse effects on the ...
0
votes
0answers
747 views

“effects not estimable” error in R aov

I have data on the effect of treatment on leg shaking. I reused several individuals so I want to know Is there a significant effect of treatment on shaking Do the reused individuals present some ...
0
votes
0answers
226 views

R linear model summaries, why is one model “better” than the other?

I am attempting to get my head around the summaries of linear models given within R. In other words i am trying to identify when the summary of a model is good or bad. Consider the following two ...
0
votes
0answers
337 views

How to fit a standardized generalized hyperbolic distribution to my data using optim?

I want to fit a standardized generalized hyperbolid distribution to my data using the optim command. Regarding my post here, I think I have to try it manually, by using the optim command. My problem ...
0
votes
0answers
167 views

Standard deviation of errors

I have a multiple regression model (information derived from gretl): $$Y=‐3,859921 \ln(P) + 1,707514\, (A) + 3,578656$$ $$\quad\quad\space(1,216387)\quad\quad\quad(1,259650)\quad\quad(0,323867)$$ ...
0
votes
0answers
762 views

Confidence Bands in non linear mixed effects models

Is there a way to get confidence bands around the fitted population fixed effects curve for non linear mixed effects models fitted in R function ...
0
votes
0answers
3k views

“system is exactly singular” in R function BoxCox.ar

I'm trying to perform a Box-Cox transformation on some financial data (SPY). The BoxCox.ar function (in the package TSA) gives me the following error: ...
0
votes
0answers
145 views

Using R in Java Project

I hope this question is not off topic on CV: I am currently fitting some different models (naive bayes, logistic regression...) in R which I up to now thought of as prototypes for a later Java ...
0
votes
0answers
2k views

How to use Almon model (polynomial distributed lag) in R program

I am testing the influence of intramural R&D expenditure, life expectancy, HDP and tax on the GINI index, but I have a problem because I am trying to make my model better by using the Almon model ...
0
votes
0answers
139 views

MS business intelligence development studio CART analysis

I'm doing some clinical database research and in an effort to lessen the burden on our statistical staff, I started to look for different software solutions to get the analyses I need, and that's ...
0
votes
0answers
1k views

Deciding attributes for decision trees

I'm a complete beginner when it comes to R and decision trees, but I was asked to take a look at this to see if this was a viable solution for my data. So please excuse me if I say completely wrong. ...
0
votes
0answers
1k views

Analysis to use with categorical response and categorical predictor variables

I have data from a randomized survey experiment in which each respondent was assigned to one of 4 groups, one of which can be considered a "control" or "no treatment" group. The key question asked in ...
0
votes
0answers
4k views

Nested random effects in lme

I have a data which is longitudinal. I have same subject reading at 3 different treatment one after the other and I ran the samples in 2 batches: Batch one has subject id 1:7 and the three time point ...
0
votes
0answers
326 views

How can I perform an ANOVA from multiple CSV files with R?

I (or rather, my girlfriend whom I'm trying to convert to free software) am just getting started with R. She wants to do a two-way ANOVA on her data on mussels and the threads they release in self-...
0
votes
0answers
118 views

How can I calculate if there is a statistical difference?

I have a study with the following data and I would like to calculate if there is or isn't any statistically significant difference between the 4 groups: ...