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

R programming. Finding efficient frontier using Black Litterman Model

I'm trying to get Efficient frontier Using Black Litterman model. I'm getting only optimal portfolio using BLCOP Package and i have used this function ...
2
votes
1answer
28 views

simulating data with a lot of predefined constraints in R

how to simulate data (in R) to generate , sample values 1) variables with specific correlation values for a particular model AND 2) with predefined regression coefficients? 3) Can we also set the ...
0
votes
0answers
19 views

R binomial family with identity link

I want to fit a linear model by R with family=binomial(link="identity"), however, binomial family do not have identity link. What should I do?
0
votes
0answers
20 views

Plotting confidence bands around dots in a plot [on hold]

I want to be able to print confidence bands around the dots of the plot for the following data ...
0
votes
0answers
3 views

Accounting for initial values of reponse variable in binomial GLM

R v.3.1.0. Mac OSX 10.9.5. Can somebody please recommend a method to account for initial values of a response variable in binomial GLMM? I am designing an ecological experiment, and am having a hard ...
0
votes
0answers
7 views

Extract ETS method used for automatic forecasts of hierarchical time series with hts package [migrated]

I'm trying to extract the ETS method that is automatically chosen when we apply the forecast function to an hierarchical time series using the hts R package. When I look in the structure of the ...
1
vote
0answers
8 views

Examining trends with interactions and with stratification - obtaining discordant results

I'm examining the effect of income (categorized into quintiles) on a response variable during different years (from 1996 to 2014). I adjust for some other covariates and have repeated measurements on ...
-1
votes
0answers
9 views

r package for non-decimated /stationary wavelet [on hold]

Which r package is should be used for forecasting and plotting stationary wavelet transformation?
0
votes
0answers
12 views

Scatterplot with two different categories of data [duplicate]

I have a text document containing three columns. One column is "sex", and each value is either "M" or "F". The other two columns contain numerical data (my explanatory variable and response ...
0
votes
0answers
11 views

Time series analysis for discontinous years

i have a data of measured values of pH in river water for two years 2004 and 2009 for each month. I want to see seasonal trend ie: are there similarity in summer , winter and monsoon for both year. ...
1
vote
1answer
44 views

What is the reason for this discrepancy between confidence level and probability?

I ran the following R code: library(Hmisc) binconf(x=1, n=70) # PointEst Lower Upper # 0.01428571 0.0007327613 0.07658187 Which is the ...
1
vote
0answers
23 views

Paired homogeneity test: Compare two regression coefficients in R

I have a question about paired homogeneity test. By using Cox regression analysis Im evaluating 2 new biomarkers (A and B) in association with a outcome (X). I developed 2 multivariable models and on ...
0
votes
0answers
38 views

Multiple imputation of conditional variables

I need to impute the missing values of a dataset of medical data in which several variables only make sense if another variable has a specific value. In the questionnaire the data come from they were ...
1
vote
0answers
16 views

partial plots from a Random forest classifier for binary predictors

I'm working on a classification problem with continous and categorical predictors with Random Forests (RF). I'm particularly interested on RF as we avoid the specification of the functional form. ...
1
vote
0answers
10 views

should we check for multicollinearity when building a discrimination analysis?

In fact, I have two questions: 1- do we need to check for the multicollinearity when we deal with linear discrimination analysis? 2- how to solve those variables which are multi-collinear? Lets ...
2
votes
1answer
15 views

Advantages of counterbalancing vs. randomizing stimuli

I'm designing an experiment, in which 40 participants answer 10 questions, 5 in condition $A$ and 5 in condition $B$, and I'm interested in the difference between the two conditions. It's not clear ...
-1
votes
0answers
33 views

Optimal brain damage in R [on hold]

Is there any R package implementing optimal brain damage algorithm or anything similar what can be used to prune neural networks models?
0
votes
0answers
38 views

Setting up a aov model in R for a variant of a 2-way nested ANOVA

I have a rather complex experiment i need to analyse The experiment was an infection trial, where the effect of two different infection methods ("inoculation" and "in-contact infection") were ...
0
votes
0answers
10 views

non-metric multi-dimensional scaling in R: help with plotting and understanding Stress for isoMDS vs. metaMDS

I have a dataframe with 900 observations. There are 11 columns: 9 measured variables and 1 representing region. ...
-1
votes
0answers
9 views

How to calculate average groups and create columns [on hold]

I want to write a function for the following table Group1 Group2 Age diffG1 diffG2 A K 12 1.33 1 A K 14 1.33 1 A K 16 1.33 1 B M 12 ...
-1
votes
0answers
11 views

modify Length of Y axis in barplot with R [on hold]

I try to do a barplot with R Here the code hommes <- scan() ...
0
votes
0answers
12 views

R language: Can the function rfe of the package caret be used with a mixed effect model [migrated]

I would like to do feature selection with a mixed effect model in R, but I cannot manage to combine the function rfe of the package caret with the function me of ...
6
votes
4answers
82 views

Detecting changes in time series (R example)

I would like to detect changes in time series data, which usually has the same shape. So far I've worked with the changepoint package for R and the ...
0
votes
0answers
11 views

How to do regression model selection if dummy variables are involved?

Original post on stackoverflow: http://stackoverflow.com/questions/28773153/how-to-do-regression-model-selection-if-dummy-variables-are-involved I am trying to do a logistic regression analysis in R ...
0
votes
0answers
9 views

How do I interpret results from calibration using bootstrap in R [on hold]

I am using the package rms in R. I want to report results of the statistics found in the function: ...
1
vote
0answers
11 views

Non-recursive regression tree

I would like to construct a regression tree such that each factor appears at most once on each branch. When I use rpart in R, it commonly results in a tree where ...
0
votes
0answers
29 views

Is the question of outlier detection to fit a model better? [on hold]

I was searching to find a package in R which has outlier detection since i am a Matlab User; Anyway, I found several questions in this website which the answers disappointed me very much. this is one ...
1
vote
0answers
13 views

How do I fit a linear mixed model in R with autocorrelation, when the effect of time is of no interest?

I am attempting to fit a linear mixed model with the lme function using R. My data involve repeated measures, but the effect of time is not of interest to me, so I don't want to include it as a fixed ...
0
votes
0answers
13 views

maximizing matrix diagonal elements in R [migrated]

Given a matrix (or table in R ) ...
0
votes
0answers
14 views

Need for correction of persp plot?

I have problem with persp and contour plot to visualize PDF and CDF plot of bivariate standard normal plots in R. When I call the generic function persp() and contour() I got wrong plots of PDF and ...
0
votes
0answers
3 views

R Packages for rank-preserving structural failure time model (RPSTM)

I have a randomized clinical trial data that has high percentage(30-40% in both arms) switching over to a different treatment regimen. By browsing through some literature, I am inclined to perform ...
0
votes
0answers
3 views

Help with multiple landmark and Non-Metric Data INPUT [on hold]

Thank you all in advance for being so kind as to put up with my extremely beginner level R-Studio (and statistics programming in general) skills. I am struggling with the most basic of tasks-combining ...
0
votes
0answers
16 views

How to get standard errors for parameter estimates from full model-averaged coefficients (with shrinkage) [migrated]

I'm using MuMIn to calculate parameter estimates in a model averaging procedure. Right now I want to compare parameter estimates from conditional vs shrinkage. I want to compare both parameter ...
6
votes
0answers
51 views

When do coefficients estimated by logistic and logit-linear regression differ?

When modelling continuous proportions (e.g. proportional vegetation cover at survey quadrats, or proportion of time engaged in an activity), logistic regression is considered inappropriate (e.g. ...
2
votes
1answer
19 views

Interpreting results of prop.test()

Suppose that I have two approaches to a particular problem. Approach A is observed to succeed 685 times out of 1347 attempts. Approach B is observed to succeed 2100 times out of 3748 attempts. I ...
0
votes
1answer
11 views

R : using survey package to run t-test on sub population of weighted data set

I have a large set of weighted data. I have loaded it into a survey design and would now like to run t-tests on sub-populations. example: ...
0
votes
1answer
50 views

Cross validation for logistic regression in R [on hold]

I am doing a K-fold cross validation for a logistic regression. I first used the PCA to reduce the dimensionality. Then I used those principal components to build the regression model. My problem is ...
0
votes
0answers
19 views

Model Stacking algorithm

I'm trying the stacking method to see if it improves my results, but before using some R package, i decided to code it by myself. Here's a pseudocode of what i'm doing: ...
1
vote
1answer
55 views

Approach and example of graph clustering in “R”

I am looking to group/merge nodes in a graph using graph clustering in 'r'. Here is a stunningly toy variation of my problem. There are two "clusters" There is a "bridge" connecting the clusters ...
0
votes
0answers
22 views

Multivariate stochastic time series forecasting

I have a multivariate time series like this ...
0
votes
0answers
10 views

Subset items from a group while controlling for variables between groups

Can anyone offer solutions to the following problem?: I'm trying to extract a subset of items from multiple groups (grouped by 2 separate factors) so that the final groups are: 1) of equal size, and ...
0
votes
0answers
17 views

best way of univariate prediction for sparse data

I have a client who has sparse hourly data (by sparse I mean there are too many hours with 0 calls). I used TBATS in R to forecast hourly data for them. Regardless of the point forecast, the actual ...
0
votes
0answers
14 views

Estimate the conditional distribution of an latent variable?

What techniques might best illuminate the underlying conditional distribution of a latent variable and what information or assumptions would improve that illumination? For example, if we have data ...
0
votes
1answer
20 views

Calculating Standard Deviation when given sample size, mean difference & p value

I am trying to pool data in my meta-analysis and i need MEAN & SD. However the study has reported sample size (27), before (11.8) & after mean (11.9), and p value (0.540). I need the SD. ...
0
votes
0answers
14 views

Choropleth / thematic map in R with ggplot2 not filling polygons [migrated]

I am doing the following: I read a shapefile containing boundaries within a city (Leeds for example), then I read another data set (csv.) containing the number of females in each area for which I ...
0
votes
1answer
35 views

Relation between $R^2$ and the covariate correlation matrix

I'm quite new to Statistics and I'm facing a problem. Is there any relation between $R^2$ and the correlation matrix of the covariates? A short example is (case with 2 covariates) : A7 ~ A1 + A2 ...
-1
votes
0answers
19 views

Can I use gzlm with Poisson family if counts data are treated as factors? [on hold]

My data called (my data) looks like below and I have 5 DVS(dv1,dv2,dv3,dv4,dv5) note all under one column and three IVS(IV1,IV2,IV3) as a data frame. I keep getting the error below. I am trying to fit ...
1
vote
1answer
18 views

Logistic regression: Overall significance of categorical predictor in SPSS

In SPSS, when performing binary logistic regression using multiple categorical predictors, a significance level is detailed for the variable overall in addition to each category. This strikes me as ...
0
votes
0answers
6 views

How to test/validate unlabeled data in association rules in R?

I produced association rules by using the arules package (apriori). I'm left with +/- 250 rules. I would like to test/validate the rules that I have, like answering the question: How do I know that ...
0
votes
0answers
19 views

How do test that two continuous variables are independent using rank statistics in R? [on hold]

This question a particular case of this question. Suppose we have a sample $(X_i,Y_i),i=1,\ldots,n$ from the joint distribution of $X$ and $Y$. Are there any other function (or package) apart from ...