r's questions - English 1answer

19.390 r questions.

I'm trying to fit a classification tree model to the credit card fraud data form kaggle (https://www.kaggle.com/mlg-ulb/creditcardfraud) using rpart in R. Once I come up with a model and call printcp(...

I have created a wrapper using forward selection method to test each feature as they are added to the response variable in naivebayes function R to determine the accuracy and error. The predictor ...

I have data with the following variables: mutant | wild-type, treated | untreated, and one type of measurements (size) for time point 1 and 2. The data is roughly normal. My ultimate H1 is that there ...

I have two datasets of schoolchildren performance by height in cm, one for each school. I was wondering how to best visualize how the differences in the performance between the schools vary by grade. ...

http://www.stat.wisc.edu/courses/st333-larget/aic.pdf The AIC calculated with the model lm(SAT~1) was 560.4736, but the AIC calculated with stepwise selection starting with lm(SAT~1) was 419.42. May ...

I'd like to create a variance-covariance matrix in R using the optim() function. In particular, the matrix looks like this: \begin{bmatrix} \sigma^2_{a} & \rho\sigma_{a}\sigma_{b} & 0\\ \rho\...

How to perform the exact calculation this calculator is performing in R. Specifically a Student T-Value Calculator right-tailed.

I would like to ask you, if anybody could check my code, because it was behaving weird - not working, giving me errors to suddenly working without changing anything - the code will be at the bottom. ...

I'm working on the following to get the upper limit of my integration, as I know I need to have some idea where the point might occur but in real it can be any value between 0 and infinity. May I know ...

I have a somewhat noisy time series that hovers around different levels. For example, the following data: I have the solid line data available, and I would like to obtain an estimate for the dashed ...

Is there a way to compute p-value for Goodman and Kruskal's lambda and/or tau tests using R? I know SPSS can do it, but I don't have SPSS.

I have two time series yt and xt that are linked and the relation can be written in a state-space form as in the attached screenshot. I have no idea on how to write the program on R since no similar ...

My goal is to (1) prove the hypothesis of seasonality in this inflation time-series and (2) remove the seasonality via the X-13-ARIMA-SEATS procedure. My questions are (1) how does one prove such ...

I'm implementing a 'smoothing scheme' of sorts in which I have 2 matrices of parameters emat[NxN] and lmat[NxN] in my model file. Each lmat[i, j] is dependent on the corresponding element of emat and ...

I have a data set of information about different products that I want to cluster similare ones so I can do pricing on them. Each product have at least ten features that I can consider to differentiate ...

My mantra has always been that if you are not able to recreate something you haven't really understood it. In this manner I tried to implement the AdaBoost algorithm of Freund and Schapire I used one ...

I am wondering whether it is possible to call out those significance values of the DW test (those printed on tables) in R. Please help. Thanks a lot. I tried packages like CAR and lmtest. I have ...

I am running a fixed-effect logistic regression using 'bife' command from the 'bife' R-package. Here, I am trying to have both FIRM and YEAR fixed-effects simultaneously. However, the examples I can ...

I am using the Kaggle Scikit data to learn R. I am using the R e1071 SVM function to predict classes. When I use: ...

I encountered a lot of references that talk about R squared but I can't understand what the difference is between the R squared in regression of the response on the predictors and the R squared that ...

I'm using randomForest to fit a model with continuous response variable. I was reading the An Introduction to Statistical Learning: with Applications in R (Springer Texts in Statistics), in Chapter 8, ...

I have two samples of observations drawn from distributions with different variances. To test whether they have the same mean, I plan to use the function wilcox.test...

Here is my attempt to make the likelihood function for Poisson distribution for data x and parameter theta in R: ...

I want to do a Granger test in R, but my problem is to choose the proper order/lag: grangertest(hp ~ GDP, order = ??, data = data) grangertest(GDP ~ hp, order = ??, data = data) grangertest(...

I am trying to get the chi-square goodness-of-fit and R-square measures from the following fixed-effect logistic regression using 'feglm' function. However, I find very limited information to even ...

I have 64 subject allocated with treatment and placebo using simple, block and stratified randomization techniques. I what to compare which technique is better than the others. What test should one ...

I couldn't make sure Whether the model I'm using is a local level model with multiplicative components (state vector $\times$ regressor vector) or a linear gaussian state-space model. And couldn't ...

This probably has been asked many a times, but I cannot find the answer. I'm trying to interpret the output that I get from lmer. My code is as follows: ...

First post so apologies if I miss something here. I need to estimate a quantile regression model with time (year) and unit (city) fixed effects. I have an unbalanced panel with 9 years and 152 cities ...

Given an irregular daily time series where some days are missing, e.g. holidays and weekends. Suppose data is a zoo object in R,...

I'm working on a forecasting weekly sales by category. I want to make sure I'm doing it correctly. ...

Suppose I have the following dataset below: With my understanding of Pearson's Correlation Coefficient, I could get a coefficient for Percentage Use vs. Average Age between timepoints. However, is ...

I am attempting to analyze the effect of two categorical variables (landuse and species) on a continuous variable (...

lambda=1; n=100; alpha=3; y = dgamma(n, shape=alpha, scale=lambda)I have this typed in but i just get a graph of one point. I need to generate one sample of size ...

Quantile for a single variable is easy to implement in R. However, it is not an easy task to quantile for multivariate data. There are several papers have been proposed to quantile for multivariate ...

What to do when there is heteroskedasticity in an ANCOVA model? Is there a correction similar to Welch ANOVA? Or is better to use a OLS regression model? Should we try to solve heteroskedasticity by ...

I have an imbalanced dataset (around 2000 entries, 10% class A, 90% class B, 2 features that I use for training) and I'm building a model for binary classification. I'm using R caret package to train ...

I was looking at this Data Science question on TestDome. The problems is stated as the following: Implement the desired_marketing_expenditure function, which returns the required amount of money ...

I'm lost to analyse my data... Context: I've 2 groups with 2 treatments, 7 dependent variables and 3 assessment times (T1, T2, T3). Group 1 n=7 Group 2 n=8 An example of dataset to analyse :<...

I want to run a loop using ifelse() and including NA in R. Here is a example of my dataset named ...

I am using function neuralnet in the package neuralnet to build the neural network, and I see the error: ...

I have the following model: ...

I am trying to do a Time varying parameters regression. The equation is as follows: $y_t = a + b_t * x_{1t} + \epsilon_t$ Here a is fixed while $b_t$ is AR1. My state space equations are : There ...

After reading this blog post by Max Kuhn, I successfully adapted the code as follows: It now takes multiple tuning parameters for a given model. Adding additional model types (e.g. KNN, ANN) only ...

It doesn't seem to be directly possible to use a sqrt link function in lme4::glmer.nb. This is a pity because on my specific data, with the fix effect model, the sqrt link does improve the ...

I have a requirement where i have to represent data in Upper triangular form Input Variables are Time period. I populated a dataframe x with making all the places which needs to be blank using ...

So I have some data that I fit a IRT graded response model to, using this code: ...

I have data with 6 predictor variables and a response variable (default ). When I do a logistic regression using probit estimation, I get a result different from SAS. (the link to my data https://...

i have a variable say "storeid" and under the store i have factor like 100, 104, 107, 110 etc etc. is there a way to randomly pick a store id like random(storeid) and it will randomly give me any 1 ...

I am attempting to write the mathematical model for and also simulate an MA(1) process that has drift (in R). I have referenced ARIMA (0,1,1) or (0,1,0) - or something else?, Simulation of forecasted ...

Related tags

Hot questions

Language

Popular Tags