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

0
votes
0answers
24 views

Heavy-tailed RBF kernel function

I'm trying to run a SVM regression on some data and I want to use ksvm from kernlab or svm ...
0
votes
0answers
32 views

Phylogenetic General Least Squares, Multivariate Regression

I'm working on a biological question, with species data derived from an external database, which has multiple response and predictor variables. As a result, I want to do multivariate regression across ...
0
votes
0answers
32 views

Determine the causes of change in time with mixed models

I have a database with several continuous variables measured in two times. I searched for a change in time in my dependent variables in this way: ...
0
votes
0answers
66 views

Small loadings in all variables, PCA analysis is ok?

I'm performing a PCA analysis on a set of 5 variables, whose correlation matrix is: ...
0
votes
0answers
30 views

How to interpret ANOVA output comparing two models

I'm working with the Blackmoor data from the study "Female adolescents with anorexia nervosa and their parents." I've made 4 models based on this: ...
0
votes
0answers
37 views

Using principal components to perform further PCA

I am working with principal component analysis for the first time. I have managed to extract the principal components of one set of data (say data1) using prcomp(). ...
1
vote
2answers
89 views

Treating predictors as numerical or categorical variable in regression

I have a set of data that I am using regression analyses on. All of the columns are numeric (as far as I can see) a mix of integers and reals. However, two of the columns are being read from the CSV ...
0
votes
0answers
4 views

How to use filter in dplyr to find values in muliple columns without using '|' [migrated]

I want to use the 'dplyr' package in order to return rows in a data frame that contain some numeric or character values in any of the columns. For example, ...
0
votes
0answers
22 views

verify the central limit theorem of chi sq distribution

hi i have a question on verifying the central limit theorem using R. the question was to use data generated from different statistical distribution n see if the sample means follow normal ...
0
votes
0answers
6 views

Frequency form to case form - unexpected values in table [migrated]

I'm taking count data on voting preferences by race and entering it into a table in frequency form, then expanding out to case form and using CrossTable to look at ...
2
votes
1answer
72 views

Finding peaks in power spectrum of a signal in R

I am analyzing some eeg waveforms and developing a classifier based on them. In the data I have, I usually find a strong peak at a very low frequency (I am not interested in this peak) followed by ...
0
votes
2answers
60 views

weibull mle with optim in R

I am fitting a weibull distribution to some data. Let us say we have the data in warpbreaks, that is, warpbreaks$breaks in R. My code is as follows: ...
0
votes
2answers
36 views

Can C4.5 handle continuous attributes?

I'm trying to play with the breast cancer data available through UCI: https://archive.ics.uci.edu/ml/machine-learning-databases/breast-cancer-wisconsin/wdbc.data When trying to classify the data ...
2
votes
1answer
65 views

One observation per level in mixed-effect model

Field explains how to analyse repeated-measures data using linear mixed-effect models (LME). See Field et al., Discovering Statistics Using R, 2012, p. 573. However, the way he specifies the model, ...
0
votes
0answers
20 views

Boxplots with percentiles instead of hinges [duplicate]

I am new to R and am working with a dataset refined of 254 datapoints that are in 12 different groups and would like to compare the parameters with boxplots between ...
0
votes
0answers
14 views

Gibbs Sampling form Non-standard distribution in R

Gibbs sampling examples in R has involved initializing and updating iteratively from conditional that are in standard form. Has anyone performed on a gibbs sampling when the conditionals are in ...
1
vote
1answer
71 views

Box plot with just two values does not have its whiskers in R

Are boxplots by default unable to produce the whiskers when there are just 2 values being input? I am working with dataset rufi and the values input are ...
0
votes
0answers
27 views

GAM and ordered probit regression in R

I want to check the fit of the ordinal probit regression model with the help of GAM (generalized additive models). There are plenty of examples how to construct GAM for dichotomous responses in R. ...
0
votes
1answer
24 views

Pointers on calculating probability/odds from data vectors

I am trying to figure out how to calculate probability and odds for the variable Target. ...
0
votes
1answer
31 views

Which post-hoc is more valid for multiple comparison of an unbalanced lmer-model: lsm or mcp?

After doing a model comparison with my mixed lmer model, I have a model with three main effects, no interaction, say ...
0
votes
0answers
17 views

type of ICC coefficient to use in my study for inter und intrarater-reliability

I am new to the subject and not sure, which ICC I have to use in order to analyse inter/intrarater-reliability of my measurements. A physician examined 649 healthy individuals with an ...
1
vote
0answers
49 views

Basic question about getting esimated probabilities in R

I've got what I think is a fairly basic problem. I'm not sure if it is a conceptual question or software question, but I'm fairly new to using R and these kinds of stats, so it could be either or ...
0
votes
0answers
9 views

geeglm Model matrix is rank deficient after scaling the predictors?

Trying to run a linear regression with repeated measure using geeglm. Here is my original model: ...
0
votes
0answers
19 views

How do I report the result of an mcp-Tukey-test, i.e. how do I report it's z value?

After doing a model comparison with my mixed lmer model, I have a model with two main effects, no interaction, say signal ~ factor A + factor B + (1|subj). Factor ...
0
votes
0answers
30 views

Visualize a large binary matrix with instances and three classes

I have a matrix with 9500 columns and 1000 rows. Each row represents an instance. I have three classes and an instance belongs to a class. Each column represents a binary feature. That is, each cell ...
0
votes
1answer
49 views

Calcuate Bayes Factor for Adjusted Mean Difference

I have an ANCOVA model shown below (fit) where I calculated the mean difference between two groups while controlling for another variable (x). For the adjusted mean difference (288.72), I'd like to ...
0
votes
1answer
39 views

Correlation Between 2 uneven samples size

I am trying to determine the correlation between an observed and theoretical set of data. Both sets of information are in the form of a table of deflection against time. Both samples have the same ...
0
votes
1answer
59 views

Linear regresson lm or stepwise regression here using R?

It is a basic question but I could not find clear answer on my reading. I am trying to find independent predictors of Infant.Mortality in data frame 'swiss' in R. ...
0
votes
0answers
24 views

R - basic multiple imputation with the mi package

Consider the following R code: ...
0
votes
0answers
17 views

Trying to understand output of spectrum function

The spectrum function in R is supposed to return the power spectrum of input signal which is simply the square of the magnitude of the fourier transform. Given ...
1
vote
1answer
63 views

Specifying Cross-Level Interactions in LMER

I am trying to figure out if it's okay to specify cross-level interactions in a hierarchical model with fixed effect predictor variables at both levels using the ...
0
votes
0answers
13 views

Friedman's test help in R

I'm trying to figure out Friedman's test in R and am confused by some of the output. For example, consider two groups where the ranks are reversed. Thus Group 1 goes from 1:40, then group 2 goes from ...
3
votes
3answers
99 views

How to fit regression to custom model in R

This is for my honors thesis. I have a large data set, of which I'm sharing only what I call the "Low phosphorus" series: ...
0
votes
0answers
10 views

Specifying Cross-Level Interactions in LMER [duplicate]

I am trying to figure out if it's okay to specify cross-level interactions in a hierarchical model with fixed effect predictor variables at both levels using the lmer function, and, if so, how to do ...
0
votes
1answer
20 views

Rpart using Caret changes names of Factors

If I have a factor e.g. sexe with two levels MALE and FEMELLE let's say, using rpart alone I get splits that say for example Sexe = Male and then a yes no split. However using rpart with caret I get a ...
-2
votes
1answer
40 views

How to make a vertical line in R [closed]

curve(dnorm(x,90,10),from=60, to=120) I need to make some vertical line in the x line that in number 70 and 110. How should I do it?
0
votes
0answers
25 views

GEE and post hoc comparisons

I am trying to analyze a dataset using the GEE. This is what I have so far ...
0
votes
0answers
16 views

How to Interpret coefficients of a beta regression model with logit link

I'm running a beta regression in R where the outcome variable is continuous but bounded between 0-1. I need the results to be understandable to an audience with a ...
0
votes
0answers
16 views

algorithm to predict cost function

The goal of problem is to predict the weight for missing data . I have a dataset of categorical type as shown below ...
0
votes
0answers
10 views

Error using “cengaussian” family with MCMCglmm

I'm trying to run a model using a cengaussian family distribution with the function MCMCglmm. The model is: ...
0
votes
2answers
49 views

Different results from several “passes” of Random Forest on same dataset

I've been playing around with the German Credit dataset available in Kuhn & Johnson's caret package for ...
2
votes
1answer
38 views

Interpretation of logged regression

I have run a linear regression with the following equation (in r): lm(formula = logTotal ~ Continent + logArea + Method + Servs) where ...
0
votes
0answers
24 views

comparing two sets of meta-analysis

I have two subgroups (high / low BMI) on which several measures where recorded and analyzed on by various papers in a treatment and a control group. I was trying to verify if, for each measure, the ...
1
vote
0answers
37 views

Interpreting and reporting gamm4 result

I am new to gam, and most of my knowledge comes from this document http://www3.nd.edu/~mclark19/learn/GAMS.pdf. Now I am using generalized addictive model with random effects to model some data, where ...
3
votes
2answers
84 views

Why does my loading matrix following PCA with a varimax rotation contain only ones and zeros?

I'm running a PCA using the R function prcomp. This is the function: d2.pca <- prcomp(sel.d2, center=TRUE, scale.=TRUE) So ...
0
votes
1answer
38 views

How to ReSample the Training DataSet

I have a training dataset which differs significantly on several parameters (t-test/f-test) with the test set (for which the labels are not known to me.). I am thinking of re-sampling from the ...
1
vote
1answer
49 views

3D surface plot for least square & ridge regression

I'm very impressed by this plot: Why does ridge estimate become better than OLS by adding a constant to the diagonal? Does someone has any clue about how to plot this on R? I mean, how to get RSS ...
0
votes
0answers
17 views

Regression using indicator variables and time t. (R code) [duplicate]

I'm having difficulties setting regression R code.... This is the data that I need to use: ...
-1
votes
2answers
41 views

Will RandomForest model work well if the correlation lies between the given attributes

Currently I am working on the data mining project and I am using RandomForest classification model for that. I have a few queries in that. Will the RandomForest handle if there is correlation ...
0
votes
0answers
14 views

Regression using indicator variables and time t. (R code)

I'm having difficulties setting regression R code.... This is the data that I need to use: ...