Tagged Questions

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 program in `R`.

learn more… | top users | synonyms

3
votes
1answer
32 views

“weight” input in glm and lm functions in R

I am confused with the definition of the weights in glm and lm. Using the McCullagh and Nelder (1989)'s notation, If random variable $y_i$ is from the Generalized Linear Model (GLM), then its density ...
0
votes
0answers
5 views

Comparing structure of disconnected networks of different sizes

I am trying to figure out a way to evaluate and compare the structure of multiple (600+) disconnected networks of different sizes (from 31 to 5000 nodes). From what I have read in the literature, ...
0
votes
1answer
39 views

How to interpret ANOVA output when comparing two nested mixed-effect models?

I've got two models (all variable are count variables): ...
2
votes
0answers
15 views

Some questions about AlgDesign for Fractional Factorial Design in R

I have a few Design of Experiment type questions about the AlgDesign package in R that I can't find answered online: Will using the center=TRUE option in the ...
0
votes
0answers
24 views

clustering analysis of large amount of time series

I would like to cluster a set of time series, which are composed of around 50000 different time series. Are there established algorithms/package that can handle this scalability problem?
0
votes
0answers
3 views

Rserve connection from local R client to Rserve host on AWS Server [migrated]

Currently trying to connect to an Amazon AWS server via IP address on port 6311. I've set up Rserve as a daemon on the AWS server and have checked that it is in fact listening on port 6311 by calling ...
1
vote
0answers
36 views

Confidence interval for differences in total sums

I have data from two variations of an ecommerce web site and would like to determine the confidence interval for the difference in generated profit between the variations. My data contains both the ...
1
vote
1answer
36 views

Using the same variable as a fixed and random effect in Mixed Effect Models

The experiment this data comes from an experiment where two people collaborate to put objects in a specific order. The Direction has the target array on their screen, and the Matcher has a scrambled ...
1
vote
2answers
102 views

Determine when time-series should be logged (or any other transformation) and applied automatically

Is there any way to test whether a series should be logged or transformed in another way? I have a code of which i use to run lots of different data through to forecast. Some of the data definitely ...
0
votes
0answers
37 views

R Logistic regression model - Error

I'm trying to run following command in R, but I'm getting an error ! any one could help and explain a reason for that ? ...
1
vote
1answer
38 views

Power analyses of 5 populations of infection data (binomial data) [duplicate]

I am PhD Biologist. I have 5 populations of infected moth larvae (3 inbred, and 2 outbred). The infection in this case is spread vertically (from mother or father to offspring). Normally the virus is ...
0
votes
1answer
28 views

AR(2) & constant & trend - very poor constant estimates?

Here is a problem that was puzzling me. Suppose I simulate the AR(2) process with constant and trend using the code below (I apologize for inefficiency and inelegance - the aim was to get job done at ...
0
votes
0answers
4 views

R Fuzzy Membership function is not working correctly [migrated]

I have a two dimensional dataset and I want to calculate a score for the degree of membership of a new datapoint to that dataset. For this purpose I thought of using the membership function used in ...
2
votes
1answer
52 views

Confusing Holt-Winters parameters

I have got a model for forecasting using holt-winters. However the parameters confuse me... The parameters show that there is no trend or seasonality even though there is definite trend and ...
0
votes
0answers
23 views

How to use controls as a reference in GLM?

I'm running glms in R on two datasets, both with three discrete explanatory variables and one continuous dependent variable. My question is about the use of controls - I want to use my controls as a ...
1
vote
0answers
26 views

Kolmogorov-smirnov two-sample confidence level [duplicate]

I do not find information about how to calculate the $c(\alpha)$ "by hand" (see wikipedia article for two samples: http://en.wikipedia.org/wiki/Kolmogorov%E2%80%93Smirnov_test) for the formula: $ ...
0
votes
2answers
42 views

Front End for R helpful for novice [duplicate]

Is there any front end that sit over R and execute codes - basically making usage of R further simpler? In my team we used to run lots of statistical things using R. There are some people who are ...
0
votes
0answers
17 views

What is the average error for the model? [on hold]

Anybody knows what is the average error for the model? I don't understand what the term "average error" means at all. Does that mean the residual standard error on n degrees of freedom?
0
votes
0answers
19 views

Singularities in Multivariable Regression in R [on hold]

I am running a regression in R on a dataset with 3 dummy variables (FEMALE, NONWHITE, and UNION) and 3 regular variables(AGE, EDUC(years of education), EXPER(years of work experience)). It is a CPS ...
0
votes
1answer
32 views

R NA's introduced by coercion [on hold]

I know there is a lot of information in Google about this problem, but I could not solve it. I have a data frame: ...
1
vote
1answer
43 views

compare quasi poisson models

I have two models: ...
1
vote
0answers
20 views

Assumptions for nlme

I want to analyze a repeated measure design with two independent variables (var1, var2) where the subjects had to solve three ...
0
votes
1answer
32 views

K-medoids clustering with Gower distance in R

I have both numeric and binary data in my data set with 73 observations. I read a lot about which distance metric and which clustering technique to use especially from this web site. I decided to use ...
1
vote
0answers
28 views

How many random effects to specify in lmer?

I ran a computer-based experiment in which there were two within-subject factors, A and B. So all participants got multiple trials in each A*B cell. There was also one between subject factor, C. I'm ...
2
votes
1answer
39 views

lme4: profile takes lot of time for a complicated model

I have a pretty complicated mixed model (cross classified data) and a pretty large dataset (>700000 obs.). The lmer function took few hours to compute, but profile takes over two days and is still ...
0
votes
0answers
33 views

Caret feature selection with customized random forest classifier

I'm following the Caret package tutorial for constructing customized functions for a recursive feature elimination. I can reproduce the provided example which is a random forest regression. However, ...
1
vote
0answers
41 views

Is it possible to create a pie in pie chart in SPSS or R? [migrated]

I know it is possible to create such double pie charts in excel like this: http://chandoo.org/wp/2009/12/02/group-small-slices-in-pie-charts/ but can SPSS or R do this also?
1
vote
1answer
43 views

Linear model decomposition

Is is possible to decompose fitted linear model? What I mean by that: I have parameters of fitted linear model as following: y=2.3a-1.23b+1.65c+1.76d Now I have ...
0
votes
0answers
20 views

Model averaging with MuMIn. What's the mean of pvalue?

the summary() of a model.avg made with MuMIn in R, give a lot of interesting results, in particular model averaged coefficients (estimate, standard error, adjusted standard error and a z value with a ...
1
vote
0answers
32 views

Regression model for predicting life expectancy

I have average life expectancy at birth data for an 8 year period and I would like to use that 8 year period to predict the trend for average life expectancy for the next 5 years. I would then like to ...
0
votes
0answers
10 views

When should one centre variables in a cox proportional hazard model and when not? [duplicate]

I want to use a Cox proportional hazard model in order to analyze the prognostic value of a certain variable (I divided it in quartiles and so I have 4 categories) with respect to the time to event ...
0
votes
0answers
17 views

Grouping similar plots together in a Stripchart [migrated]

I have groups of data that I want to put more closely together on my strip charts ...
0
votes
0answers
26 views

interpreting y axis of a partial dependence plots

I have read through other topics on partial dependence plots and most of them are on how you actually plot them with different packages, not how you can accurately interpret them, So: I have been ...
0
votes
0answers
12 views

Standard errors of estimates in multi factorial LMEM

This question may already be well-answered as it seems relatively straight forward, but my search of existing posts has failed... apologies if it is redundant. I am building a linear mixed effects ...
0
votes
0answers
21 views

(binary) Matrix completion with less known data

Recently, I meet such problems, I call it matrix completion problem. For example, the row denotes the users and the column denotes items. And If one user like the ...
0
votes
0answers
9 views

Simulation of CI of amount of values in different intervals by adding noise to original data

I am having a hard time trying to solve this problem, so maybe some of you guys can sort it out. I have a large data set containing a value describing the thermal comfort in buildings called PMV. The ...
0
votes
0answers
6 views

Ggplot gives “arguments imply differing number of rows” error in geom_point while it isn't true - how to debug? [migrated]

I have two objects of type Large SpatialPointsDataFrame named st2 and st10. They come from the same source. They both plot without problems with: plot(st2) or ...
0
votes
0answers
14 views

Strange behaviour of list in R [migrated]

I ran on a very strange behaviour. I am trying to evaluate a rather long list (Generated code). ...
0
votes
0answers
4 views

Passing a function with parameters as an argument to another function in R [migrated]

Consider an example: I want to pass a function with or without parameters to another function and use it in the following way: ...
0
votes
0answers
5 views

error for xreg and newxreg matrix size in an arima model

I am using auto.arima to forecast a daily data and used holiday and weekday dummies as regressors. I am getting an error which does not make sense. When I want to predict a 7 step ahead forecast, it ...
1
vote
0answers
29 views

Why only full ARIMA models in auto.arima?

It seems that the auto.arima() function in the forecast package in R only considers full ...
0
votes
0answers
18 views

Some doubts about using time random effect

I'm starting with lme4 and GLMM. Maybe this question can be basic for experimented researchers, but I'm still learning. I have a pooled data where every ...
0
votes
0answers
16 views

Error “initial value in 'vmmin' is not finite” when changing factors in ordinal logistic regression [migrated]

I've generated some fake data to give a simple example of ordinal logistic regression. My data set (raw data here) looks like this: ...
2
votes
1answer
12 views

Repeated measures - sum of biomassproduction

I am student in biology. For my examination I conducted a greenhouse experiment with gras. Actually I am not sure how to develop the correct model and unfortunately I haven't found an answer in the ...
1
vote
0answers
25 views

Predicting values using linear regression

I am very new to statistical analysis and R. Recently I worked on a simple linear regression model to predict values. For example: consider the below data set ...
0
votes
1answer
28 views

What is the meaning of the R factanal output?

What does all this mean? I'm a factor analysis 'noob' and although I've read a book, it didn't tell me everything apparently. Since the chi square statistic is so high and the p-value so low, it ...
3
votes
1answer
35 views

Is there a way to add inequality constraints on the LASSO in R?

I am trying to use LASSO for model selection, but I need my fitted values to remain non-negative. Is there a way to implement this simply in R? I've found that the penalized package allows for non ...
4
votes
1answer
55 views

Given a chi-squared distribution, find $\Pr(\mu-2\sigma \leq Y \leq \mu + 2\sigma)$

Given a chi-squared distribution of df = 8, which R command do I use in order to find $\Pr(\mu-2\sigma \leq Y \leq \mu + 2\sigma)$? That is, the probability that $Y$ lies within 2 standard deviations ...
0
votes
1answer
20 views

How to define samples in caret package?

I am using the caret package and need to train a random forest, where only certain samples should be in the held-out set. I want to define the sampling for each tree in the random forest, for say 100 ...
0
votes
0answers
29 views

Need help setting up multilevel logistic regression

I am trying to see the effect of a certain intervention in schools. The outcome variable is binary. We have students within schools. Also students' age is a covariate (doesn't changed before and after ...