Questions tagged [r]

R is a free, open-source programming language and software environment for statistical computing, bioinformatics, and graphics.

Filter by
Sorted by
Tagged with
0 votes
0 answers
16 views

sklearn Random Forest classifier vs R’s Random Forest classifier

I’m trying to implement the R’s random forest classifier equivalent in python- ...
Mark W's user avatar
  • 1
0 votes
1 answer
29 views

ROC curve manual calculation vs. pROC package R

I want do recreate ROC curve manually on my dataset and compare it to roc function from pROC package in R. I'm using dataset on customer churn telco.csv from Kaggle....
Nikola's user avatar
  • 1
0 votes
1 answer
25 views

Should I choose an ARIMA model (2,1,1) with a higher AIC value or an ARIMA model (6,1,8) with a lower AIC value?

I am trying to fit an ARIMA model to time series data. When I fit the model using auto.arima function in R, ...
Mehmet Yildirim's user avatar
0 votes
0 answers
12 views

5-fold cross validation in R: getting error Age variable different lengths

I am tasked to do a 5-fold cross validation for my R grad course with pga golf data. I continually get an error for a certain variable, Age, saying different lengths. Here is the error code: ...
Heather S.'s user avatar
0 votes
0 answers
10 views

How to visualize correlation values coming from two data frame for comparison

I am working on a project wherein we are comparing two methods used for modeling gene expression. One method is using elastic net and other is using lasso regression. In one method: we see that ...
Rhea Bedi's user avatar
1 vote
1 answer
27 views

Packages for Density Estimation using K-Nearest Neighbor

I would like to have suggestions for packages that provide K-Nearest Neighbor density estimator, I've already searched the web (to not bother you guys with my question :) ), but most results were ...
Neyo Goldsmith's user avatar
0 votes
1 answer
30 views

Selecting optimal regression model using cross validation

I have a logistic mixed model (lme4 package in R). I want to assess whether participants scores on the measures 'sumspq', 'sumpdi', and 'sumcaps' significantly affect the difference in performance ...
SilvaC's user avatar
  • 103
0 votes
0 answers
27 views

How to reduce number of continuous variables before I make a set of best predictors (for handgrip strength in women)

My assignment question is quoted: "2. Which set of variables best predicts handgrip strength in women? a. Reduce the number of continuous variables before doing the analysis." I do not ...
Nathan Vermaerke's user avatar
0 votes
0 answers
37 views

R [Warning] No further splits with positive gain, best gain: -inf in lightgbm training

I read through some answers, it seems many people face this message before. The answer seems there is no further need to split the tree, so you need to adjust the super parameter to make new splitting....
cloudscomputes's user avatar
0 votes
0 answers
9 views

R, Caret Predict(), and errors

So I've been playing around with/testing out a few ideas. I just wasn't sure though if there is a simple command you can use to have caret like send you back a list (or data.frame) of all the errors ...
Nevermnd's user avatar
0 votes
0 answers
26 views

Algorithms from R-statistics package Caret R Package- LVQ algorithm, is there similar in Python

In the R-statistics package : Caret R Package, they have the LVQ algorithm that is used for the purpose of "Feature Selection". I have used this to do some data science in R-stats over 6 ...
Palu's user avatar
  • 103
0 votes
1 answer
24 views

Working with functions [closed]

What are some good sources for learning how to deal with functions in Python and R. I have used them a lot of times and they can be a bit challenging. I like to write out a plan of what I want done ...
Salem Abdulkerim's user avatar
1 vote
1 answer
21 views

Question regarding coefficents regarding linear modeling in R

I had a question regarding the composition of coefficents of a linear model in R. Let's say my model is as follows, with three columns/independent variables: X, Y, and Z. And my model is: (X * Z) + (Y ...
Nevermnd's user avatar
0 votes
0 answers
19 views

Top hundred nearest neighbour

I have a dataframe with a column called pharmacy number and other columns corresponding to each pharmacy number, there many rows and each row corresponds to pharmacy number. I want to create a ...
Sanket Maiti's user avatar
1 vote
2 answers
98 views

Does it make sense to tune a model in scikit-learn and copy/paste the parameters into Rust's linfa?

I have a situation where my data can only be read from in a hosted Python environment, due to data security reasons. However, I am constrained to run ML models in a Rust environment due to work-...
wtwtwt's user avatar
  • 111
0 votes
1 answer
24 views

Does anyone know if I have written this mixed model correctly in lme4?

All effects should be random except Genotype. Index is a plant trait. Model from literature: Index=OverallMean+Location+Rep(Location)+Genotype+Location*Genotype+error Model as I have written in lme4: ...
Clayton Balfe's user avatar
0 votes
0 answers
6 views

R lm log v log log for asymptotic fit

I have data from a "bleed" experiment. That is, I fill a chamber with a gas that I can measure precisely (say, methane), and then just let it sit. The chamber has a natural bleed rate, which ...
jackisquizzical's user avatar
0 votes
0 answers
11 views

Interpreting large discrepancies between Specificities & the # of Extraneous Variable Models selected by a variable selection algorithm

I am going to preface my question by saying that this problem of interpretation I have run into is in the context of me doing my part as a collaborator on a statistical learning paper for the first ...
Marlen's user avatar
  • 157
0 votes
0 answers
32 views

Calculate the curve of a list and apply that to calculate the values of a larger list

I have a list of ~125 sorted ascending values and I am converting those to percentages of total so that they add up to 100% (shortened example would be: 0%, 0%, 15%, 15%, 30%, 40% with the total of ...
Disz's user avatar
  • 1
0 votes
0 answers
9 views

How to solve starting values problem in midas in R?

I am running the following code. ...
J_Bake's user avatar
  • 1
0 votes
0 answers
39 views

Unable to create associations using Apriori association rule algorithm for my dataset where the support is 0.01, confidence=0.8 and maxlen=10

Here's the code that I'm using: library(arules) library(arulesViz) library(tidyverse) library(readxl) library(knitr) library(ggplot2) library(lubridate) library(plyr) library(dplyr) tr <- read....
Abhik Bagchi's user avatar
0 votes
1 answer
600 views

Help with R - funModeling package no longer available, need help downloading older version

I have posted on GitHub but I'm not getting a response as quickly as I would like so I figured I'd seek help on multiple forums/websites. I am trying to do a few sample mean exercises from a textbook '...
JohnColtraneisJC's user avatar
0 votes
0 answers
44 views

Correlation in R between categorical and boolean variables

I want to use the data attached to see i there is correlation between a bootcamp that students attended and the job they end up getting. For example, does someone who attended a software engineering ...
Max's user avatar
  • 1
0 votes
0 answers
52 views

Trouble With Keras in R

I am using Rstudio on windows 11 trying to install and use keras for deep learning. Following the instructions from the ISLR2 book for installing dependencies (https://hastie.su.domains/ISLR2/keras-...
amc98's user avatar
  • 1
0 votes
0 answers
29 views

How to simulate from bivariate time series using VAR in R?

Background I've run into a problem while trying to simulate from an existing time series using a VAR. My aim is to simulate future "trajectories" which I'd like to integrate in an existing ...
ionatura's user avatar
0 votes
0 answers
66 views

Prediction in multiclass classification

Context: I need to make an multiclass classification to predict what type of sentence(law) the case will have in the end. Data: I Have several columns to predict the case:client, cause of action, ...
TM01's user avatar
  • 1
0 votes
0 answers
17 views

How to solve this error in R Error in mls(Log_change, 1:11, 52/12) : Incomplete high frequency data?

...
J_Bake's user avatar
  • 1
0 votes
0 answers
29 views

How do I group data to have a similar range of levels?

Background I am working on a procurement bid where we are purchasing a number of different vehicle types for our various locations. As part of the analysis, I want to plot the prices of vehicle type ...
ScottyJ's user avatar
  • 113
0 votes
0 answers
20 views

Recursive Feature Elimination - Long-Running R Code

I am running recursive feature elimination (RFE) in R using the code below. It never seems to finish on my PC. What options has anyone found useful to get R code, specifically RFE like that noted ...
user19226726's user avatar
1 vote
1 answer
35 views

Removing specific phrases from textual data (R)

I have the following reddit posts and I would like to clean the posts and remove from the data the specific phrase "Click to expand", while keeping all other words within a post the same. <...
maldini1990's user avatar
0 votes
0 answers
80 views

Is there a way to have both the ability to use LaTeX commands and knitting an HTML document in R?

I want to write a small report in which I use the amsmath package to align several equations. Thing is, when I put it in the YAML preamble in RStudio, like this: <...
JOSE SALVADOR BALBUENA GONZALE's user avatar
0 votes
0 answers
22 views

Logistic regression negative coefficient interpretation (reciprocal of negative logistic coefficient )

Suppose if a dependent variable is having a disease (1) and not having a disease (0). similarly , independent variable is smoking and not smoking. here , not smoking as reference group. Again, if ...
Prasanna's user avatar
0 votes
1 answer
55 views

Are there any R packages that support Deep RNNs?

I recently found an interesting paper on what it really means for a recurrent neural network (RNN) to be deep here. Depth can be added in several different ways (state to state, input to state, etc.) ...
noNameTed's user avatar
0 votes
0 answers
64 views

Correlation Matrix for Very Large Data Set

I am tasked to create a correlation matrix on a large portion of an MRI imaging data set (all numeric entries). The dimensions of the data is around 28,000x1,800. I have already set a correlation ...
user123's user avatar
  • 101
0 votes
1 answer
41 views

Stick to R or switch to Python as a newby in Reinforcement Learning?

Background I would consider myself to have a decent level in R and virtually 0 skills in any other programming language - something quite common in my field. Note also that my background is not in ...
ionatura's user avatar
0 votes
0 answers
12 views

Calculate missing values based on total and sum of available values in groups

I have a dataset in the following form ...
user avatar
0 votes
0 answers
27 views

Time series analysis help

I have a time-series analysis regression project in R. I am instructed that the regression should use pre-post events as a dummy variable to examine certain events' effect. I am also told that the ...
tryinghard04's user avatar
0 votes
1 answer
43 views

Automatic statistical analysis / statistical "diff" tool?

I'm new to data science and wondered if there are ways to have a tool figure out relations between variables that may be relevant to a problem. Imagine I have a log file that I have pre-processed to ...
Evgeniy Berezovsky's user avatar
0 votes
0 answers
26 views

Inverting the scaling of LSTM forecasts (tanh activation function)

I am working in R and the monthly time series of the M3 competition data (with values mostly around the 1000s). I want to scale the series from -1 to 1 in order to satisfy the tanh activation function ...
Duy Nguyen's user avatar
0 votes
0 answers
7 views

Expectation Step in Gaussian Mixture Model for Matrix Data Not Producing Proper Posterior Probabilities

I'm working on implementing a Gaussian Mixture Model (GMM) for three-way data (i.e., a set of matrices) in R. The GMM is being estimated using the Expectation-Maximization (EM) algorithm. However, I'm ...
John Smith's user avatar
0 votes
0 answers
16 views

Parsing multiple formats of values to give a true quantity with regex

I am currently parsing a large data set of drug prescriptions in R, because these have been collected manually (at least that's my guess) the data is extraordinarily messy and painful to deal with, ...
Sabor117's user avatar
0 votes
0 answers
98 views

Interpretation of best subset selection regression model for factor variables with more than 2 levels

I applied the best subset selection regression model in R from leaps package to my dat dataframe. ...
rez's user avatar
  • 63
0 votes
0 answers
11 views

Problem with 2 variable PCA loadings- Loadings are the same for all variables

I'm working on a problem for which i want to do some dimensionality reduction using 3 different PCAs of 2 variables each. Basically i want to perform a PCA and keep the first component between the ...
Felipe Maresca's user avatar
1 vote
1 answer
31 views

Which statistical technique should I use for a within-person repeated measures study?

I have collected all my data for a study and need to run my analysis but have come unstuck (I should have planned better beforehand I know). I'm looking to see whether personality traits (five trait ...
Jay's user avatar
  • 11
0 votes
1 answer
36 views

What is the reason behind this formula: 2 times interquartile range divided by length to the power of one third

In ggplot2 package documentation for geom_freqpoly, there is a formula in the last example which use a function to dynamically ...
rez's user avatar
  • 63
0 votes
0 answers
53 views

Media Mix Modeling: testing LightMMM or Robyn on specific dataset rather than ongoing basis

I'm currently scoping ideas for a student project in data analytics and wanted to build this around Media Mix Modeling through either LightMMM (in Python, unofficial Google library) or Robyn (in R, by ...
MFJC's user avatar
  • 101
0 votes
0 answers
30 views

Interpreting the pre-processing information of a the ridge regression

I have a dataframe of 39,600 records and 13 columns (12 of which are the predictors. 3 of the 12 are factor variables, the rest are numeric). The response variable ...
Nemo's user avatar
  • 101
0 votes
0 answers
14 views

Ranking 10^10 random strings

I would like to model a biological process that starts from a pool of 10^10+ random strings (a string can be 6-24 letters long; the alphabet contains 20 letters, say A-T) and I want to order those ...
isthisthat's user avatar
0 votes
0 answers
33 views

Looking for suggestions on how to distinguish between two different distributions in my data when no labels are available

My data consists of medical claims from thousands of providers across the country. The data contains how much they were paid for each service they performed and how many units of each service they ...
TheGoat's user avatar
  • 271
0 votes
0 answers
21 views

How to re-translate a forecast I wrote in R run on a dataset I downloaded from Tableau back into a SCRIPT_REAL function in Tableau

I want to add a SARIMA forecast of the next two days onto each line in the following Tableau graph: But Tableau only does Exponential Smoothing forecasts and if I create a moving average table ...
Marlen's user avatar
  • 157

1
2 3 4 5
30