1
vote
0answers
44 views

How do I create clusters with a completely categorical data?

I am working on the project that requires data mining. I have been asked to use R. I have a dataset with all categorical variables and would like to form clusters on that. I am unable to figure out ...
0
votes
0answers
20 views

Multi-group SEM with a categorical outcome (using lavaan)

I'd like to ask the SO community for some help in regard to the interpretation of a structural equation model with three groups, featuring a categorical outcome. I have found a lot of sources treating ...
2
votes
0answers
63 views

Generate boxplots for a combination of categorical variables [migrated]

How would I do the following? In a single plot, I would like to create multiple box plots, each X variable being a combination of the categorical variables shown below. ...
2
votes
1answer
47 views

Cross-validation with dummy variables?

Does it make sense to use cross-validation with factor variables that have 3+ levels? When using bestglm, I get an error saying that it doesn't work with categorical variables. In the documentation ...
0
votes
1answer
30 views

GLM with categorical predictor on R

I need to do a model with a generalized linear model. My data are these: habitat : 0 or 1, group : 1 or 0 , mortality : yes or no, and the numbers of individuals for each case (habitat, group and ...
2
votes
1answer
17 views

Varying Non-Linear Parameters Based on Groups in R

I'm trying to develop a non-linear model, but I'd like to have the values for the parameters vary by group. To give you an example, a section of my data (just random numbers here) looks like: ...
4
votes
1answer
32 views

Presenting results of a meta-analysis with multiple moderators?

I wish to present the results of my meta-analysis using the best practices possible. I do not find, however, examples in articles similar to what my output is. Here's a simplification of my model and ...
2
votes
1answer
43 views

conducting multi-level regression on ordinal DVs with imputed data in R

Do you know of an approach/package that facilitates mixed model regression of ordinal dependent variables on multiply imputed datasets in R? Ideally, the function takes: a list of multiply imputed ...
1
vote
3answers
72 views

Correlations with categorical 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
54 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
38 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
187 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
50 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
vote
0answers
21 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 ...
1
vote
2answers
52 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
77 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
33 views

Exploring properties of groups in R

I have a data frame with the following structure: ...
0
votes
1answer
49 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
26 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
49 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
63 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
48 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
104 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
37 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
106 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
34 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
55 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
37 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
13 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
33 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
61 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
78 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
256 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
49 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
135 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
471 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
441 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
100 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
35 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
94 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
245 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
93 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
89 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
440 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
116 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
3k 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
158 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
130 views

Predict binary outcome with R

I have a table includes the following data: ...