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

Appropriate Libraries for Unsupervised Textual Classification

Let's say I take 1000 dissertations from a variety of different fields, and thereafter extract the top 100 words from each dissertation. What libraries/tools in R (although Python suggestions are ...
1
vote
0answers
25 views

Survival analysis to estimate kanban tasks completion times

I am working on a problem to estimate task completion time in kanban (project management tool). While doing EDA, I looked at tasks that are either done or cancelled. In this case, I defined the ...
-2
votes
0answers
9 views

merging/concatenating of two CSV files with different row and column names in r [closed]

I'm going to merging/concatenating two CSV files (as a picture attached) with different rows (has some row names in common) and totally different column names in r. Would you please help me out how to ...
0
votes
0answers
10 views

Optimise a value over a vector

I have been given this code below to modify to optimize the value of theta over vector (0.01,0.02, ..., 0.99, 1.00) where R0=10 and D=14, any help at all would mean a lot. Thanks ...
0
votes
1answer
8 views

Error in lmest: missing data in the covariates affecting the initial probabilities are not allowed

I'm running an LM model using the LMest package available in R. The dataset contains NO missing values. pct_miss(df_long) [1] 0 n_miss(df_long) [1] 0 The lmest function with no covariates works fine....
0
votes
1answer
8 views

I keep getting an error message in R while using twitteR

here is what I am doing: tweets=searchTwitter("walmart",n=3000, lang="en",since="2021-01-08",until="2021-01-10") And this ...
0
votes
0answers
16 views

How to write a loop for linear mixed effects model with a number of independent and dependent variables

I'm trying to run a number of linear mixed effects models with different independent and dependent variables. Since there is such a large number that need to be run, I understand that a loop would be ...
-1
votes
0answers
26 views

F1 score /Sorensen Dice / Bray Curtis Distance/ XGBoost / Custom objective function [closed]

My question is: How can I use the Bray Curtis distance as a custom objective function for XG Boost in R? Bray Curtis is a proxy for F1 score. For two vectors, Labels and Preds, the BC distance is Sum ...
0
votes
0answers
6 views

Box Jenkins, ADF and KPSS tests on a time series

this is my first question I have the growth from Ecuadors GDP from 2000 to 2025 (Annually) and I have to predict Ecuadors GDP growth from 2026 to 2030 taking into account: Ecuadors GDP Growth ...
0
votes
0answers
9 views

dimensionality reduction of (partly) categorical metadata

I have several datasets, each with with hundreds of samples. I have different metadata for each data set, which contains about 50 variables per sample. Some of this metadata is clearly redundant. For ...
0
votes
0answers
21 views

R: saving/printing all intermediate results

currently, we have developed a model at work and it is at the verification step. the goal is for another person to receive output from each and every step of calculation to verify. The issue is that ...
0
votes
0answers
16 views

About Gaussian kernel in other distances

I have a question about Gaussian kernel. I read the following site. Why do we use a Gaussian kernel as a similarity metric? My question is whether we can extend this to other distances or ...
0
votes
1answer
24 views

Using R to organize/rearrange CSV - group by multiple columns?

I have a CSV that I need to clean up / organize in a usable way using R. I need to group by the property ID and then want to take all the unique years for the defor year column and make each year into ...
0
votes
1answer
23 views

Problem with escape character in paste-function in R

I am trying to paste together a path-string. Like this "C:\testfile.txt" This doesn't work at all: ...
0
votes
0answers
26 views

Determining the optimal number of cluster and clustering method in hierarchical clustering

I'm working with some patient data and decided to cluster the patients. I came up with a distance metric, created a distance matrix, and performed hierarchical clustering. Now the question is, what ...
0
votes
2answers
18 views

Trying to analyze market data in R, but companies continually show very low average growth over large time intervals

I think the title explains it all. In more detail, I'm using the data set from this Kaggle page. The data set doesn't come with a daily change in percent, so I copied the dataset and made a new column ...
1
vote
1answer
321 views

Error while trying glmnet() in R: “Error in storage.mode(xd) <- ”double“ : 'list' object cannot be coerced to type 'double'”

I'm trying to create a logistic regression model using Ridge, this is the code: glmnet(X_Train, Y_Train, family='binomial', alpha=0, type.measure='auc') And this ...
1
vote
1answer
47 views

Find correlation between grades from two raters [duplicate]

The question is whether we can find a correlation between two sets of grades (categorical data). Let’s say we have a dog competition and there are 1000 dogs participating. There are two rounds of ...
0
votes
1answer
25 views

the missForest function in R doesn't work

I'm trying to use the function missForest() of the library 'missForest' but I always get the same error message. This is the code: libraries: ...
0
votes
0answers
21 views

How can I efficiently represent statistics and visualizations for a large number of features?

Suppose I have a dataset with more than 50 features (could be 100 or 10,000, etc.). I'd like to create a summary table that has some statistics about each feature and plot the distributions. Normally, ...
1
vote
0answers
13 views

Class weights in RSNSS package?

New to ML in general and have been Googling on this. I am working on a dataset that will rate each customer features to a credit worthiness class attribute. Is it possible to add class weights in the '...
1
vote
0answers
16 views

How to compare hyperparameter tuning in R and Python

I tried random forest in both R (Caret) and Python (Scikit-learn), but the results differ drastically. Pearson correlation between predicted value and actual value was 0.2 in python whereas 0.8 in R. ...
2
votes
0answers
24 views

h2o much faster than neuralnet (in R)

I’m a novice to machine learning. I've been trying out different neural network implementations in R, including the neuralnet package and the deeplearning function of the h2o package. For neuralnet, ...
1
vote
1answer
25 views

Finding a pattern in reponses in R programming [closed]

I did a study in which around 1000 participants took a test (100 questions). In this study participants were asked in each question to choose between two texts (text 1 and text 2) and decide which ...
0
votes
0answers
15 views

Feature Engineering and prediction with R and python

I have a sequential dataset, and have 2000 rows for 300 ID. I have 20 variables (i.e in my real dataset) ...
5
votes
1answer
83 views

experimental design in R project

I want to know of any repositories that contain complete experimental design in R covering basic test and analyses? I want to take a top-buttom approach to learn step by step through a real project ...
0
votes
0answers
10 views

Interpretation of som_model with kohonen package?

I've just started learning som_model(self-organizing map) on R Studio with kohonen package. I've tried to find resources on the topic to understand how the different maps works but most of the ...
1
vote
0answers
115 views

Error “comparison (6) is possible only for atomic and list types” encountered in metafor

I'm very new to r and trying to run a multi-level meta analysis using pre-calculated effect sizes. The data file can be accessed via this link:testrunfile The script I used as a first step to fit the ...
0
votes
1answer
20 views

How to add a column for descending row numbers into dataset in R

I am new to R and would like to insert a new column that numbers the row to a large dataset. I have no idea how to use 'mutate()' to insert this. Would appreciate ...
1
vote
0answers
23 views

Extracting rules in regression tree in Python

I don't know if this question is a complicated question or not. I wanna train a regression tree in which in leaves, linear regression is applied to predict. Then, when the tree and linear regression ...
2
votes
1answer
29 views

How to generate higher quality jpg plots on R [closed]

I have tried generating higher quality of data visualization plots from RStats. I tried increasing frame dimensions but it's still max at about ~350kb. How do I generate higher quality images from ...
0
votes
0answers
10 views

Evaluating the performance of tracking multiple objects detected with object detection

I have a ground truth dataset where the objects have been manually annotated and each object have been provided an ID that is consistent through time. There are no false positives or false negatives ...
0
votes
0answers
15 views

Quasi-experiment analysis in R

I have 5-year sales information from a grocery store in Canada. I would like to check the effect of an online campaign that happened in 2017 on food sales. My treatment group is people living in urban ...
2
votes
0answers
12 views

Keep retweets during topic-modelling [duplicate]

I got a dataset made out of tweets and I need to classify them into topics. For topic modelling with LDA I have cleaned out the dataset (removing stopwords, mentions, symbols, etc). Do I need to ...
2
votes
1answer
24 views

Tweet Classification into topics- What to do with data

Good evening, First of all, I want to apologize if the title is misleading. I have a dataset made of around 60000 tweets, their date and time as well as the username. I need to classify them into ...
1
vote
1answer
43 views

Linear transformation from one sample to another

Generate a Sample $\underline{Z_1}$ $\underline{Z_2}\dots \underline{Z_{5000}}$ , while $\underline{Z_i} \sim N_2[(0,0)^T,I_2]$ generate new sample with size of $ n = 5000$ by applying linear ...
4
votes
2answers
93 views

Maximum Likelihood estimation

Given a sample $ X_1,X_2 \dots X_{100}$ and the density function $ f(x;\theta) = \frac{1}{\pi \cdot \left(1+\left(x-\theta \right)^2\right)}$ , find an approximate solution for $\hat{\theta}_{MLE.}$...
0
votes
0answers
13 views

Methods for standardizing string data with different naming conventions

Are there conventions for standardizing text that follows different naming conventions? I have a variable of owner names that include individual names and company names. The entries follow some common ...
0
votes
0answers
41 views

Meaning of absolute tolerance and relative tolerance

Hello Data science community, I am using a library nnet in R. The documentation, page no. 4-5, shows that it has default values for ...
1
vote
1answer
18 views

How to Identify Repeating Data Entries when the Repeated Entries are Spelled or Constructed Differently

I have a dataset of entries and a variable for the owner of the entry. Some of these people occur more than once. However, the names are sometimes written differently. I want to eventually be able to ...
0
votes
0answers
17 views

How to predict out-of-sample observations with depmixS4 package in R?

I have a series of univariate data and I want to fit a Hidden Markov Model on it using the depmixS4 package on R. My final goal is to predict the next k observations (let's say k = 10) for the data ...
0
votes
1answer
37 views

Unsupervised text classification with R/Python

I am relativity new to machine/deep learning and NLP. As a part of my Phd thesis I have scraped vast number of job vacancies (most of them are in Polish, and about 10% are in English ones) and then ...
1
vote
0answers
21 views

Manually building and visualising a decision tree

I am currently working on a decision tree for predicting the average of a binary outcome with a small number of categorical features (think predicting the survival rate in the titanic dataset). I am ...
0
votes
0answers
11 views

Linear Regression Model Validation with Transformed Data

I worked on a model that I applied a log10 transformation to the dependent variable. I am having trouble with manually calculating the R2 for both train and test dataset. The model looks like this. <...
1
vote
1answer
15 views

How to get a (descriptive) overview of a large database?

I'm facing a data framework with ~ 20 k observations and 151 variables across 2078 subjects At first I am primarily interested in how the data looks like related to a single parameter. But I cannot ...
0
votes
0answers
14 views

Multi-Collinearity in Classification Problems

I have a "Small data matrix" of scraped data from multiple websites trying to account for sentiment towards certain cellphone models. The matrix includes independent variables such as "...
2
votes
0answers
19 views

Interpretation of the output from qqPlot (using car library)

Basically, I have created a linear model and am testing to verify the normality of my errors. As a result, I have used the qqPlot function from the car library and have gotten the graph that can be ...
0
votes
1answer
36 views

how can i fix this problem ? I tried to train a simple linear VSM classifier

library(kernlab) letter_classifier <- ksvm(letter ~ ., data = letters_train, kernel = "vanilladot") ...
0
votes
1answer
336 views

Model with always Error in py_call_impl(callable, dots$args, dots$keywords)

I have a problem with my trainingtarget , trainingtarget , trainLables and ...

1
2 3 4 5
26