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

Random forest clustering

In my data the classes were defined by binning a variable in 10 bins. After growing the random forest its proximity matrix is viewed as the following MDSplot: As can be seen from the plot all ...
0
votes
0answers
7 views

summary.lm output customization [migrated]

I would like my lm summary output to be a little more compact than usual. I want to remove some newlines, the "Residuals" section, the line with the word "Coefficients". on the positive side, ...
0
votes
0answers
15 views

Installing R & RStudio for Windows [on hold]

I've looked to make sure I'm not asking a duplicate question. So far it doesn't seem that I'm. I've just been put on a project that requires R programming. Though I've programmed a bit before (like ...
0
votes
0answers
8 views

Checking for compatible conditional models

I am trying to implement MICE in R, using the package mice. I keep reading in papers that if the full conditionals we specify are compatible (they factor into a joint), then our inference is valid. ...
6
votes
1answer
67 views

How many sides does a die have? Bayesian inference in JAGS

Problem I would like to do some inference on a system analogous to die with an unknown number of sides. The die is rolled several times, after which I would like to infer a probability distribution ...
0
votes
0answers
12 views

R - Same Density but different QQ-Plot?

I have data variable corresponding to quotation amount and I want to find which statistic law this variable follow if there is one. It seems that the ...
0
votes
0answers
3 views

output of doParallel workers [migrated]

Suppose I have a code that does various calculations in a foreach loop, for simplicity let it be this: ...
1
vote
0answers
11 views

adjusting ties for kruskal.wallis [on hold]

I would like to perform a Kruskal-Wallis test on my data. I chose this test because my data is not normally distributed. As I have identical values in my data I tried to adjust the ties for ...
1
vote
0answers
17 views

Subset based on maximum difference for one variable, minimum for others

This seems like it should be an easy problem to solve, but I can't think of anything nor can I find anything to help me. I'm working with multiple data sets where I have a series of sometimes ...
0
votes
0answers
5 views

How can get F-measure, precision and re call and also Cluster labels in R [on hold]

I am new to R. I want to use hierarchical clustering of R to cluster following distance matrix. ...
0
votes
0answers
13 views

Different results in estimating 3PL model parameters in IRTPRO and mirt(R)

Can someone explain why I obtain different a, b, and c parameters estimates when I use IRTPRO3 and the package mirt from R? The method both uses are Bock and Aiken (1981) - IRTPRO calls BAEM and R ...
0
votes
0answers
12 views

Helmert contrasts: Each level compared to mean of subsequent levels, or mean of previous levels?

My question is what is the accepted definition of Helmert (and Reverse Helmert)? UCLA stats define Helmert contrasts thus: "Helmert coding compares each level of a categorical variable to the mean of ...
0
votes
0answers
6 views

Is it possible to gather webpage response time and plot histogram, with RSelenium? [on hold]

Can I check response time of page and create a histogram per page wise and using RSelenium For example, if I create script for bing search and search R, can R also check the Response time of search ...
0
votes
0answers
5 views

How to use tbats model parameters from a previous execution to fit another series in R?

I trying to model a time-series using tbats from forecast package in R. I have divided the ...
2
votes
1answer
40 views

Arimax Prediction : Using Forecast Package

The arimax function in the TSA package is to my knowledge the only R package that will fit a ...
1
vote
0answers
13 views

Zero Inflated Poisson Regression in R

I have a zero inflated Poisson regression model I want to run R, as my data are over-dispersed and I have many zeros, but I am not sure how to set up the model in R and interpret the output. First, is ...
0
votes
0answers
16 views

how one would implement a “modified maximum likelihood regression” method

I am looking to extend upon the ideas of the following study. In the paper, the author describes a Modified Maximum Likelihood Regression as proposed by Nakahira in 2000. So to follow the method from ...
0
votes
0answers
6 views

Output of fixed effects summary in lmerTest in R and post-hoc tests

I'm doing a two-factor ANOVA using the lmerTest package. Each factor has multiple levels. When one (or more) of the effects are significant, I would like to do a post-hoc test to determine which of ...
1
vote
0answers
13 views

Stationarity in Forecasting Weekly Retail Sales

I'm new to forecasting and trying to create a model to forecast one step ahead weekly sales from my company. The variables I've identified for the model are Lag 1 Markdown spend and lag 1 sales, and ...
-1
votes
0answers
10 views

Using Pelora function in R [on hold]

Although I examined the usage of pelora function which is under supclust library, I can't get why it uses. Is there anyone that explains how it works and what pelora function is ?
0
votes
0answers
5 views

clear function, useMethod from result [migrated]

how delete this function (x, ...) UseMethod("as.matrix") <bytecode: 0x000000000f13a888> <environment: namespace:base> from my result? my code: ...
0
votes
1answer
19 views

Create clusters subject to constraint

I have a set of nodes. Each node represents a building and it has some attributes. For example: x coordinate y coordinate population What I want is to create ...
1
vote
0answers
42 views

Square root link function

I'm running a glm that estimates gaussian variable of production in kilogrames using different independent variables. i found a problem of heteroskedasticity so i tried different transfromations of my ...
0
votes
0answers
13 views

R survreg returns reciprocal of incidence rate ratios?

I'm working through some poisson regression for survival data using R. As I understand it, the exponentiated output from survreg with dist = "exponential" should give the incident rate ratios. I ...
2
votes
0answers
35 views

How to do forecasting with detection of outliers in R? - Time series analysis procedure and Method

I have monthly time series data, and would like to do forecasting with detection of outliers. This is the sample of my data set: ...
0
votes
0answers
20 views

Implementation of ROC Curve in my data?

I have successfully created 2x2 contingency table.The contingency table is created through the following process: ...
0
votes
0answers
23 views

Evaluating logistic regression and interpretation of Hosmer-Lemeshow Goodness of Fit

As we all know, there are 2 methods to evaluate the logistic regression model and they are testing very different things Predictive power: Get a statistic that measures how well you can predict ...
0
votes
0answers
13 views

Improving my knn prediction

I am still somewhat new to R and machine learning. I am trying to predict the cases of diabetes in the PimaIndiansDiabetes data set. My results were not the best- and I am wondering what I could do to ...
0
votes
1answer
25 views

Numerically Solve for Parameters Characterizing Lognormal RV that's Truncated from Above

I am trying to numerically solve for parameters characterizing a lognormal distribution truncated from above with first moment = mean, second moment = ...
1
vote
2answers
34 views

Beta distribution GLM with categorical independents and proportional response

My data is percentage disease data of different varieties of plants that had been inoculated with disease from several different sources. having conducted two-way ANOVA in SPSS (using the log10+1 of ...
0
votes
0answers
9 views

“Market” testing instead of A/B testing?

I believe in the last couple of years some respected research organization wrote a blog post about rigorous statistical testing of variables across markets (e.g., countries) when you can't do per-user ...
0
votes
1answer
37 views

Random Forest Overfitting R

I used a two-step cforest in my model. the accuracy of the train set is 87%, yet the accuracy of the test set is 57%. This indicates the model is severely overfitting. How to solve this problem? ...
2
votes
1answer
81 views

Mathematically,how are the critical t values calculated?

I am willing to write a program for calculating the critical t values,preferably in R. I am aware of the functions used for the same. But, I am interested in getting aware of the mathematical ...
1
vote
1answer
37 views

Material for teaching R to medical students [on hold]

I am planing to start teaching R to undergraduate medical students. I am looking for any material that can help in doing so. These students did not have any experience using R. Another question: Is ...
0
votes
0answers
17 views

Finding most relevant variables for components in PCA / MCA [on hold]

I am conducting PCA and MCA analyses in datasets with 150+ variables using Factominer in R. My main goal is to create 2-dimensional views of these datasets. After doing so, I would like to explain the ...
0
votes
1answer
34 views

Greek letters in R legend [on hold]

How can I add greek letters like "gamma" in the legend? My program: ...
0
votes
1answer
43 views

R function survfit(): give newdata reference values for factors with >2 levels?

The goal is to plot separate survival curves for each level of a categorical variable in R, using a coxph model including the variable and a second categorical variable with >2 levels. If the second ...
0
votes
0answers
25 views

Interpreting circular-linear regression coefficient

I'm trying to use the circular package in R to perform regression of a circular response variable and linear predictor, and I do not understand the coefficient ...
0
votes
0answers
8 views

Prediction using r mlogit: How to reproduce “Frequencies of alternatives” from model summary

I am trying to reproduce results in Train & Croissant's vignette "Kenneth Train’s exercises using the mlogit package for R." Specifically, Train illustrates multinomial-logistic regression using a ...
1
vote
1answer
26 views

Interpret Wilcoxon-Mann-Whitney Result in R [duplicate]

I am doing a Wilcoxon rank sum test (aka Wilcoxon-Mann-Whitney) with R. There are two variables "ScorePerView", that is metric and "HasCodeElement", that is binary. So the syntax is like that ...
0
votes
0answers
18 views

t.test applied in pairs to more than two samples in R

I have 44 samples where I only have its sample size, average and 1 standard deviation. I asked about the possibility of doing a t.test and some of you returned the answer: ...
0
votes
0answers
7 views

Estimation of scale parameter and shape parameter of using 'maxLik' package [on hold]

I want to test the closeness of my sample data with the Generalized Exponential (GE) distribution. For that, I am using ks test in R. In the documentation of ...
0
votes
1answer
65 views

Why do sample ACF/PACF suggest different TS models after box-cox transformation?

I use auto.arima function in R to fit a TS model to a annual data composed of electricity demand. The series is twiced difference to eliminate the trend in the data. After that the data is transformed ...
0
votes
1answer
9 views

How to judge, which random effects to include in a mixed model?

I am currently writing my master thesis about the effect of an insecticide (clothianidin) on the microflora of bumblebees. I received the bumblebees from an experiment with a nested study design. 16 ...
1
vote
2answers
30 views

How to calculate the probability of success of a Logistic Regression model with a single continuous predictor?

I have a logistic regression model below, predicting a dichotomous variable type from a single continuous predictor fatigue. Using the coefficients below I can obtain the increase in the odds of a ...
0
votes
1answer
17 views

Flag Random or Nonsensical Entries in a data set using R

This is a variation on my question Machine learning to catch fraud I have a data set with about 5 million rows The data set contains names and addresses of companies The name of the company is free ...
0
votes
0answers
17 views

Descriptive statistics in my native language in R [migrated]

Regardless of R! variables: Sys.setlocale("LC_MESSAGES", 'pl_PL.UTF-8') Sys.setenv(LANG = "pl_PL.UTF-8") when I use function such as summary, output is given in ...
0
votes
0answers
19 views

R for lme complicated study design

I have a data set where siblings (brothers and sisters) had the quantity of a specific bacteria measured at specific intervals since their birth (2 weeks, 1 month, 2 months, 6 months, 1 year). Because ...
0
votes
0answers
10 views

R - cor.ci results interpretation

I am doing some survey analysis for my dissertation, and am interested in studying possible correlations between four variables, based on Technology Acceptance Model.The survey is built on a ...
0
votes
0answers
9 views

How to check stability condition of VEC estimates in R?

I am estimating a VEC model and need to check the stability of its parameters. The vars package has a function to do this on an object of class varest generated by ...