Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

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

0
votes
2answers
37 views

Equality of Means (Student, Bootstrap Permutation) Using R

I am getting acquainted with resampling methods. Here is a problem I tried to tackle: I have two normal independent samples of size $60$ of equal variance but possibly different means. The two ...
0
votes
1answer
15 views

Pre.intervention and post.intervention should be contiguous in CausalImpact?

I am running a CausalImpact analysis on a time series and my pre.period goes from 01.01.15 to 30.03.15. I want my post period to be from 15.04.15 to 17.04.15. Is it ok if I create a time series that ...
1
vote
1answer
51 views

Estimating structural invariance across groups in lavaan?

lavaan provides a function for measuring measurement invariance (measurementInvariance()). However, let's say that I want to ...
2
votes
0answers
17 views

F ratios, ANOVA, and 2 stage nested (mixed) models in R

I have data relating to strength of fabric. Each fabric comes from one of 4 batches (B), and batches come from one of 3 suppliers (A). My question relates to the calculation and interpretation of F ...
0
votes
2answers
46 views

k-fold cross validation: Force at least m instances in each fold

I'm dealing with a multi-output regression problem (~ 800 dependent variables, ~ 1300 observations). My current approach is to train a single model for each output. To select an "optimal" lambda I ...
0
votes
0answers
21 views

Detecting insufficient communalities in R

Given is this sorted factor analysis: ...
1
vote
1answer
20 views
0
votes
0answers
24 views

statistical significance with r [closed]

Have trying to get my thoughts for the following problem. Let say we have the following simple university scoring dataset: scoring : It can be seen the last uni has not many students but a high ...
0
votes
1answer
21 views

VAR estimation-How to interpret the results?

I have these results when I estimate a VAR with two variables:Growth and Debt and p=2.How to interpret the result for each equation? Thank you. VAR Estimation Results: ...
3
votes
0answers
35 views

Standardizing qualitative variables in R to perform glm's, glm.nb's and lm's [closed]

I want to standardize the variables of a biological dataset. I need to run glm's, glm.nb's and lm's using different response variables but the same explanatory variables. The dataset contains counts ...
1
vote
1answer
30 views

Plotting ROC curve in R

This may be a trivial question but I cant answer it myself. Suppose we have clinical data for patients and healthy controls. how can we draw an ROC curve in R? ...
0
votes
1answer
18 views

Interpreting PCA with varimax rotation

I have problems understanding the Factor Component Analysis of the paper: "Measuring thirty facets of the Five Factor Model with a 120-item public domain inventory: Development of the IPIP-NEO-120". ...
0
votes
0answers
16 views

why is the effect size in sjstats anova_stats NA

I am trying to find the effect size of my mixed effects model. I found sjstats provides several outputs including eta-sq, ...
3
votes
1answer
31 views

alpha value in Bonferroni corrected test

I ran some analysis with Bonferroni corrected test in R. Now my supervisor asked me what the value for alpha is for my analysis and since I haven't changed the default value it should be same as ...
1
vote
1answer
13 views

Holt Winters estimation of parameters in R

Which type of error is R trying to minimise to estimate alpha, beta, gamma when you make a Holt Winters model? I looked it up in help and here it is stated as "the squared one-step prediction error" ...
19
votes
1answer
653 views

lme() and lmer() giving conflicting results

I have been working with some data that has some problems with repeated measurements. In doing so I noticed very different behavior between lme() and ...
1
vote
1answer
56 views

In GLMs are the Scale and Dispersion parameters the same?

Given a data set and a genralized linear model I am asked to find the estimation of the scale parameter obtained with the Pearson statistic. But I am a bit confused: I know that ${\rm Var}(Y)=\phi\...
0
votes
0answers
10 views

Is it appropriate to perform outlier treatment on test sample data set? I am building logistic regression model

I am building logistic regression model. Is it ok to perform outlier treatment on significant variables after building the model and if yes, do we need to perform outlier treatment on test sample data ...
1
vote
0answers
21 views

R Programming: automatic dataframe names [migrated]

I have around 100 dataframes with same structure, like d1,d2,d3,...,d10, d11,....,d100. I have to rbind them together, like rbind(d1,d2,.....dxx). I don't want to manually write all dataframes names ...
0
votes
0answers
41 views

Natural Gradients in Stochastic Variational Inference (SVI) for Gaussian Process Regression

Currently, I've hard times in understanding the natural gradients update in SVI method for Gaussian Process. I'm learning the SVI method for Gaussian Process through Gaussian Process for Big Data ...
0
votes
0answers
49 views

R Repeated measures with fixed intercept at 0

I am trying to run a repeated measures glmm with a fixed intercept at 0 for a longitudinal study calculating the spread of a parasite within different genotypes of Daphnia hosts, and testing for a gxg ...
4
votes
2answers
77 views

How to judge a series of linear regressions are parallel?

Assume there are three groups of data: ...
0
votes
1answer
24 views

Mean Survival Time Under Weibull Model Using `survreg`

Under the Weibull parametric model, we assume the survival time $T \sim \text{Weibull}(\alpha, \lambda)$, with density $f_T(t) = \alpha \lambda (\lambda t)^{\alpha - 1} \exp(-(\lambda t)^\alpha)$. ...
0
votes
0answers
21 views

Example of total least square in R

I read all posts about total least square method, but I am still very confused. Theory says that this method implies using svd decomposition but I need example on Dataset to see how can I get ...
0
votes
0answers
32 views

Between subject effects with repeated measures?

I have some data with a repeated measures/replication problem, but I am not interested in within subject effects, but instead the overall effect. Can I control for this with either a mixed or marginal ...
0
votes
0answers
31 views

Does standard error affected by the coefficient?

I make a comparison on ridge regression and OLS using simulation. As i set my correlation as 0.9, which is high, i expect the standard error of ridge regression to be low. However, it is not. ...
2
votes
1answer
52 views

Compare species count data between sites

I'm comparing species counts between areas. My data is very similar to the below. ...
0
votes
2answers
26 views

How to find cutoff point in Logistics Regression using R

I have run a Logistics Regression model in my data set. Below is the code: ...
0
votes
0answers
25 views

What test to use to compare within-group over time?

I have a set of data of $\approx 13$ people. We collect their data every 2 months for 2 years. I'm interested to see if a variable A in the data affect people's performance as well as their growth ...
0
votes
0answers
22 views

find F-statistic using R output

I have this R output: ...
0
votes
0answers
13 views

Unanswered Different results for ezANOVA and aov in R

I'm trying to carry out a 1 (between-subjects: group) x 2 (within-subjects:emotion(1:5),in_out(1:2)) repeated measures, however, ezANOVA() and aov() seem to provide different results; I know the ...
0
votes
0answers
38 views

Goodness of fit by Hosmer-Lemeshow test and ROC Curve for Logistic Regression not accompanying results conclusions

I am trying to perform Logistic regression on the sample data set. After its modeling, I tried to check its goodness of fit using the Hosmer Lemeshow test and found the p-value < 0.05, which tells ...
0
votes
1answer
36 views

R: Statistical tests for cluster analysis?

I'm not even sure if this is a well-formed question, but here it goes: Let's say I have three variables (shape, size, and color), and I want to test whether those three dimensions describe uniquely ...
0
votes
1answer
25 views

Calculating 95% confidence intervals for GLMM additive coefficient - count data estimates

I am running a GLMM on some data where the response is count data, using the glmmADMD package in R. I would like to plot the results giving estimates for the response variable with certain explanatory ...
0
votes
0answers
30 views

Sample from a distribution if only mean median max etc. are given

Could I generate samples from a distribution that I only know its: mean, median, mode, standard deviation, min, max, three of the percentiles If possible, I want to plot histogram of this ...
1
vote
1answer
30 views

Logistic regression, computation of the linear model used in given paper, how to apply to a different data set

I'm referring to this paper : Model building strategy for logistic regression: purposeful selection http://dx.doi.org/10.21037/atm.2016.02.15 Data is created at the start and I'm unsure about ...
0
votes
0answers
11 views

How to insert a parameter inside URL? [migrated]

I am passing a value in API from postman, let say, http://192.168.0.15:8000/kr_nlm?med_name=aspirin here med_name is the parameter being sent to R function say, <...
2
votes
2answers
59 views

How to model repeated measurements with mixed effect models - lme4

I have a dataset of temperature measurements within a day 6 am, 6 pm, for two groups of patients health and flue, There are repeated measurements on the same patient and same timepoint - measurements ...
0
votes
0answers
9 views

power analysis for interaction of three within-subject factors

I am trying to find an example of power analysis for an interaction effect of three within-subject factors (each factor has 2 levels). I found only an example for an r code simulation with 2 factors, ...
1
vote
1answer
19 views

Two way ANOVA, no difference between tests based on type I vs type II sums of squares

I'm learning about two way ANOVA possibly with interaction. I'm following this tutorial http://www.sthda.com/english/wiki/two-way-anova-test-in-r This is their code. ...
0
votes
0answers
9 views

How can we interpret variables as forum.posts in Rstudio? And what's the advantages when I use this function to process data? [closed]

Using the rpart package generate a classification tree predicting certified from the other variables in the M1 data frame. Which variables should you use? ...
0
votes
0answers
28 views

What are some fast outlier detection methods for big data in R?

I have a large dataset (300,000 rows) for which there are clear outliers. Box plots of two of the DVs of interest reveal the presence of large numbers of outliers by the Tukey outlier detection rule (...
0
votes
0answers
15 views

How do I estimate parameters of Weibull distribution in R based on a given dataset? [duplicate]

Here I got the Weibull distribution function like this, and how can I estimate the parameters by the below data set?
1
vote
0answers
18 views

How to validate(with sample-split data) and calibrate Cox model with time-dependent covaraites?

I am building 2 cox models: Without time-dependent covariates With time-dependent covariates. 1.The first model (without time-dependent variables) as specified below in R works fine and I have no ...
1
vote
2answers
46 views

What does the intercept mean in this GLM? Will it mean the same thing if I add more variables?

I have a GLM looking at death rate of characters based on gender: fit2 <- glm(Death~as.factor(Gender), data=data, family=binomial(link="logit")) This is my output: ...
-1
votes
0answers
9 views

Correct Correlation Analysis to Use for Multivariate Climate Time Series

I'm faced with an issue of how best to perform a correlation analysis for two time series datasets that have multiple variables. They are both non-stationary (easy to fix on my end), have minimal ...
0
votes
0answers
13 views

How can i interpret my residual deviance and degrees of freedom?

Ive made a binomial GLM in r and my resid. deviance and df are rather high; Null deviance: 4396.2 on 3207 degrees of freedom Residual deviance: 3679.4 on 3205 degrees of freedom (4346 ...
2
votes
2answers
52 views

How do I interpret the linear regression models when significance is lost when interaction term is added

Can someone kindly help me to interpret a model - lm(A ~ sqrt(B) + as.factor(C), data =mydata) which gives a result that B is significantly associated with A (based ...
2
votes
0answers
6 views

How to determine whether pruning of decision tree is necessary?

I am really new to decision trees. I constructed classification tree (estimate certification using grade and assignment) and calculated cp: ...
0
votes
0answers
40 views

Programming for hybrid models of arima-ann and arima-svm time series foercasting in rstudio

i am doing my mphil thesis on hybrid modeling of arima-ann and arima-svm for time series forecasting following the G.Peter Zhang's research paper (https://www.sciencedirect.com/science/article/pii/...