0
votes
2answers
32 views

Correlation between unordered categorical variable and numerical variables

I have a dataframe with many observations and many variables. Some of them are categorical (unordered) and the others are numerical. I'm looking for associations between these variables. I've been ...
1
vote
2answers
41 views

Is it important to convert “integer” variables (with 0 or 1 values) to factors?

I am working on a high-dimensional dataset (1776 variables). When I read the csv file, R loads variables (with 0 or 1 values) as class of "integer". Is it important to convert these variables to ...
0
votes
1answer
23 views

Partial least squares regression for categorical factor in R

I adjust the partial least squares regression for one categorical factor (2 levels – be or nottobe) with with the ...
6
votes
4answers
171 views

Help creating a chart to show categorical data over time

The scenario: Over a course of 10 minutes 2 security guards patrol a floor and have their movement tracked. They can either be on the left or the right side of the floor, and within each side of the ...
0
votes
1answer
33 views

using cluster information in multiple imputation

i need to impute a dataset all categorical variables before doing analysis. I can just simply impute with mode of all data or a variable. I belief that better option will be to classify the subjects ...
-1
votes
0answers
50 views

Predictive modelling with categorical variables [closed]

My data consists of all categorical variables like tenure, type of business, Zone, Gender, rating etc (also age which I have transformed into categorical by bracketing them) and my dependent variable ...
1
vote
0answers
16 views

How to obtain estimates for all levels in a mixed effects model that uses effect (deviation) coding?

I am running a binomial mixed effects logistic regression in R using glmer for a sociolinguistics project. I was asked to used deviation (effect) coding. From what ...
0
votes
0answers
9 views

Importing csv file: factors instead of numbers. Retrieving a string vector from a list [migrated]

i) I was importing as csv file of numbers, which is now available as a list L. From applying sapply(L, class) I know that my numbers are now factors. Why is ...
0
votes
0answers
25 views

Object 'w' not found error in factor analysis with package 'psych' [migrated]

A lot of questions about factor analysis on these pages. I have browsed through them but nothing seems similar, so hopefully someone can help. I am running a factor analysis on some survey questions ...
1
vote
2answers
47 views

How to test if two populations have the same demographics?

I have 2 population samples for which I want to assess whether they have comparable demographics. What is the right way to test this, that includes multivariate combinations ? I.e I would like to ...
1
vote
3answers
74 views

Visualize effects of a regression with categorical explanatory variables (3 levels) in R?

Using R, I want to run a linear regression to estimate the abnormal return on days with positive, negative and neutral news (CLASS). I'm a beginner in R, as well as in using regression models! First ...
0
votes
0answers
32 views

Exploring properties of groups in R

I have a data frame with the following structure: ...
0
votes
1answer
46 views

Multiple regression with “overlapping” categorical dummy variables

Using R, I want to run a linear regression to estimate the abnormal return on days with positive, negative and neutral news (CLASS). I'm a beginner in R, as well as in using regression models! First ...
0
votes
0answers
23 views

Approach to post-hoc test for factors in a regressions (in R)

I have a problem with some analysis I need to do. I have a series of regressions. Some of the predictors of these regression are categorical with multiple levels. I performed regressions, both linear ...
1
vote
0answers
48 views

Difference categorical variables R [closed]

I can't figure out how to do the following: I need the following linear predictor $\eta=team_i-team_j$ where, both $team_i$ and $team_j$ are categorical variables, which have 163 categories. Normally ...
2
votes
2answers
55 views

How to interpret multiple factors in model output in R

I am well aware how to read the model summary in R for a regression model when a factor is included. The "first" level, in terms of ABC, is regarded as the base level to which all further levels of ...
0
votes
1answer
38 views

Organize data with multiple levels of a categorical variable per entry, for easy R analysis

I need some help here. I have some data in which every entry can take one or more levels of a categorical variable. for example, I have a category with 3 levels: ...
4
votes
1answer
77 views

Clustering data that has mixture of continuous and categorical variabes

I have data that represent some aspect of human behavior. I want to cluster it (unsupervised) into behavioral profiles of some sort. now, some of my variables are categorical (with 2 or more ...
0
votes
1answer
36 views

Should we conduct post-hoc tests when there is a significant interaction but no significant main effects?

I have data showing outcomes of some treatment on different people grouped by sex and age (grouped into: infant, child, adult). I need to investigate if there is any difference in outcome among age ...
0
votes
2answers
94 views

Analysis using ANOVA

I want to compare 6 designs of spoons (D1,D2,D3,D4,D5,D6) in 20 children (blocks).I also want to see whether holding the spoon in right or left hand affects food-pinching response(number of M&M's ...
0
votes
0answers
29 views

I need an insight on result of my analysis

I need some help/insights on result of my data analysis. My object is to classify 3 types of different numbers. ie) 1 or 2 or 3 I built C5.0 tree + leave group out cross validation (hold out) ...
1
vote
1answer
43 views

Coding Categorical Variables

Suppose I am building a linear model in R. I will be doing standard OLS. I have 10 dummy variables (predictors) that correspond to different regions. 6 of these regions are in California, and the ...
0
votes
1answer
35 views

Cluster analysis

I am trying to cluster cells (1×1km) over a specific area. Each cell is composed of various habitats defined by a code. (Each habitat consists of 3 parameters, so a habitat code looks like e.g. ...
0
votes
0answers
12 views

R Prefmod for paired comparisons

I'm trying to use the prefmod package to analyzed paired comparisons, but unfortunately the documentation is a bit poor and the author is no longer with us. I have a survey with 32 questions, split ...
1
vote
0answers
30 views

NA or “noResponse” in categorical variables

I am learning R and data analysis methods, so I apologise if my question is too basic. I have a data sample of 4K+ records of sociologic survey. There are a few demographic variables and a lot of ...
0
votes
1answer
51 views

Can I Use a Dummy Variable in Quadratic form in lm() in R?

I'm trying to replicate models published in The Age-Productivity Gradient: Evidence from a Sample of F1 Drivers and am stumbling at first hurdle over a line "the baseline specification contains a ...
4
votes
0answers
63 views

Inspecting mechanism for missing values in categorical data without prior knowledge

Scenario I am inspecting the Soybean data set, which has a quite a number of missing values for various categorical variables. Plan My plan is to eventually perform data imputation. However, ...
1
vote
2answers
178 views

Understanding dummy (manual or automated) variable creation in GLM

If a factor variable (e.g. gender with levels M and F) is used in the glm formula, dummy variable(s) are created, and can be found in the glm model summary along with their associated coefficients ...
1
vote
0answers
45 views

Finding multivariate clusters with survey data (in R)

I'd like to conduct a multivariate cluster analysis on data from the American Community Survey's PUMS microsample (individual level records). I've only performed cluster analysis before when there are ...
0
votes
0answers
14 views

Detecting poaching by age class proportion - suggested test for detecting decrease in given age class?

My dataset consists of observations of individuals, recording the date and the individual's age class. Age classes vary in bin size: 0-4 5-9 10-19 20-40 Example ...
2
votes
0answers
109 views

Interpretation of p-values & reduction of model deviance for factors in anova() vs summary()

My data has 3 major inputs: BLDDAY (a factor), BLDMNT (a factor), and D_BLD_SER (days as an ...
2
votes
1answer
409 views

Categorize continuous data effectively (taking into account a response variable)

I wonder what are the better approaches to categorize continuous data (e.g. age) than dividing them with the use of quantiles and cut function (in ...
0
votes
1answer
303 views

predict function and categorical variables in R

This is more of a general question about how the predict function treats categorical variables and how to interpret the output from predict. I have a zeroinfl model to predict the number of animals ...
0
votes
0answers
88 views

Interpreting RandomForest variable importance in case of multiple polytomous dummy variables

I have some trouble interpreting R's RandomForest variable importance measures when using multiple polytomous dummy variables. Take the following example: I have paired country data, e.g. ...
0
votes
0answers
29 views

Phylogenetic GLS with categorical response variable

I want to perform phylogenetic comparative analysis on a multilevel (3 level) categorical response variable, preferentially in R. Does anyone know how to do that or if there is a way to do at least? ...
1
vote
1answer
83 views

Strength of association test with binary variables

I have a dataset with different purchases for two different items from the same users. So the users purchased the two items at different points in time. I also have 3 different variables: ...
0
votes
1answer
180 views

R: Missing levels of categorical variable in summary of linear model [duplicate]

In my formula I have several terms with the categorical variable color and color's interaction with other variables. Color can ...
1
vote
1answer
84 views

How to reference R's automatically generated dummy variables in a linear model

R is creating dummy variables for the color variable (color is either white or red) in my linear regression model. For example, color:pH returns the interaction term colorred:pH. Some questions: Why ...
0
votes
0answers
80 views

Correction for non-linear trend seen in residuals plot when predictor is categorical

I'm running a linear regression analysis in R. One variable is a continuous outcome variable (score2) and the other is a categorical variable for treatment group ...
2
votes
3answers
390 views

Naive Bayesian Algorithm in R/SAS for categorical input variables?

Could anyone please let me know how to implement Naive Bayesian Algorithm in R or SAS?I have got a training dataset with all the categorical predictors and target variable(3 levels).I got to build a ...
1
vote
2answers
102 views

How to create predictive model in R when outcome variable has more than 10 classes?

I have a dataset for vehicles and trying to predict what will fail. Here is my data set ...
0
votes
0answers
5 views

how to create predictive model in R when outcome variable has more than 10 classes [duplicate]

I have a dataset for vehicles and trying to predict what will fail. Here is my data set ...
6
votes
4answers
2k views

Warning in R - Chi-squared approximation may be incorrect

I have data showing fire fighter entrance exam results. I am testing the hypothesis that exam results are dependent on ethnicity. To test this, I ran a Pearson chi-square test in R. The results show ...
0
votes
2answers
132 views

Predict binary outcome with R

I posted my original question here, but was told that I should have posted at Cross Validated, below is the link to the original question: ...
1
vote
2answers
121 views

Predict binary outcome with R

I have a table includes the following data: ...
2
votes
1answer
49 views

How to measure association of nominal values for few observations?

I have a sample with 181 observations. I measured two nominal variables for each observation and now want to calculate the association between the two variables. The problem is that one variable has ...
0
votes
0answers
106 views

How to present dummy variables from linear regression in table?

I have carried out this linear regression that includes month coded as a dummy variable: ...
0
votes
1answer
384 views

Interpreting intercepts in mixed effect model with categorical predictors

Trying to fit a linear mixed effects model with 2 categorical predictors (group & worker) where worker is a random effect and group a fixed effect. I'm trying to figure out 1) whether I should ...
1
vote
0answers
36 views

How can I get a “whole treatment effect” for a 3 level categorical variable in a GLMM (glmmPQL in R)

I work with habitat use data (summarized binomial data: visited / did not visit) which I fitted with a mixed model of the binomial family with a random factor accounting for repeated sampling of the ...
0
votes
0answers
52 views

dealing with categorical variables when using softImpute for missing data

I'm trying to impute missing values but I have problem dealing with categorical variables. The command softImpute calculate the missing values but they also turn categorical variables, which is ...