Displaying 20 results from an estimated 10000 matches similar to: "min frequencies of categorical predictor variables in GLM"
2012 Mar 03
1
interpreting the output of a glm with an ordered categorical predictor.
Greetings.
I'm a Master's student working on an analysis of herbivore damage on plants.
I have a tried running a glm with one categorical predictor (aphid
abundance) and a binomial response (presence/absence of herbivore damage).
My predictor has four categories: high, medium, low, and none. I used the
"ordered" function to sort my categories for a glm.
ah <-
2010 Mar 28
6
Coding of categorical variables for logistic regression?
Hello,
I am trying to do a logistic regression and have one predictor variable
(x) that is ratio and two predictor variables (y and z) that are
categorical. These have three levels each which I have called "High",
"Medium" and "Low".
My question: do I need to use a numerical coding scheme for the
categorical variables as required by some statistical software
2008 Apr 01
1
SEM with a categorical predictor variable
Hi,
we are trying to do structural equation modelling on R. However, one of our
predictor variables is categorical (smoker/nonsmoker). Now, if we want to
run the sem() command (from the sem library), we need to specify a
covariance matrix (cov). However, Pearson's correlation does not work on the
dichotomous variable, so instead we produced a covariance matrix using the
Spearman's (or
2010 Sep 08
3
regression function for categorical predictor data
Hi, do you guys know what function in R handles the multiple regression on
categorical predictor data. i.e, 'lm' is used to handle continuous predictor
data.
thanks,
karena
--
View this message in context: http://r.789695.n4.nabble.com/regression-function-for-categorical-predictor-data-tp2532045p2532045.html
Sent from the R help mailing list archive at Nabble.com.
2010 May 14
4
Categorical Predictors for SVM (e1071)
Dear all,
I have a question about using categorical predictors for SVM, using "svm"
from library(e1071). If I have multiple categorical predictors, should they
just be included as factors? Take a simple artificial data example:
x1<-rnorm(500)
x2<-rnorm(500)
#Categorical Predictor 1, with 5 levels
x3<-as.factor(rep(c(1,2,3,4,5),c(50,150,130,70,100)))
#Catgegorical Predictor
2012 Aug 02
1
Metafor package: Including multiple (categorical) predictors
Dear Metafor users,
I''d like to test a model with 2 continuous and 2 categorical moderators in a meta regression. One categorical parameter has 2 levels and the other has 4 levels. If I understand correctly, when I include all moderators in the model, Metafor returns main effects of the continuous parameters and contrasts of each level of categorical moderators with the intercept (which
2012 Oct 20
1
rms plot.Predict question: swapping x- and y- axis for categorical predictors
Hello all,
I'm trying to plot the effects of variables estimated by a regression model
fit individually, and for categorical predictors, the independent variable
shows up on the y-axis, with the dependent variable on the x-axis. Is there
a way to prevent this reversal?
Sample code with dummy data:
# make dummy data
set.seed(1)
x1 <- runif(200)
x2 <- sample(c(1,2),200, TRUE)
x3 <-
2004 Jun 09
1
testing effects of quantitative predictors on a categorical response variable
Hello,
I have a small statistics question, and
as I'm quite new to statistics and R, I'm not
sure if I'm doing things correctly.
I am looking at two quantitative
variables (x,y) that are correlated.
When I divide the data set according to a categorical
variable z, then x and y are more poorly correlated
when z = A than when z = B (see attached figure).
In fact x and y are two
2006 Jul 17
1
use "factor" for categorical covariate in Cox PH model
Hi All,
I'm learning the R codes for Cox PH modeling. Could I ask you what the
function of "factor" in modeling? Thank you!
When dealing with the categorical covariates (for example 3 groups), it
will come out different results if we add the command "factor" in front
of the categorical covariate or not: if we don't add "factor", there is
only one
2012 Jun 08
1
Testing relationships in logistic regression
I am interested in knowing whether and how I can test the significance of
the relationship between my continuous predictor variable (a covariate) and
my binary response variable according to two different groups, my
categorical predictor variable, in a logistic regression model (glm).
Specifically, can I determine whether the relationships are identical (the
hypothesis of coincidence), or whether
2012 Feb 07
1
survfit is too slow! Looking for an alternative
Hi All
I found survfit function was very slow for a large
dataset and I am looking for an alternative way to quickly get the predicted
survival probabilities.
My
historical data set is a pool of loans with monthly observed default status for
24 months. I would like to fit the proportional hazard model with time varying
covariate such as unemployment rates and time constant variables at loan
2012 Mar 04
2
Can't find all levels of categorical predictors in output of zeroinfl()
Hello,
I?m using zero-inflated Poisson regression via the zeroinfl() function to
analyze data on seed-set of plants, but for some reason, I don?t seem to be
getting the output for all three levels of my two categorical predictors.
More about my data and model:
My response variable is the number of viable seeds (AVInt), and my two
categorical predictors are elevation (Elev) and Treatment
2013 Nov 08
2
Earth (MARS) package with categorical predictors
It appears to be legitimate to include multi-level categorical and continuous variables in defining the model for earth (e.g. y ~ cat + cont1 + cont2) but is it also then possible use categoricals in the predict method using the earth result? I tried but it returns an error which is not very informative.
Thanks
Chris
2010 Nov 10
2
randomForest can not handle categorical predictors with more than 32 categories
I received this error
Error in randomForest.default(m, y, ...) :
Can not handle categorical predictors with more than 32 categories.
using below code
library(randomForest)
library(MASS)
memory.limit(size=12999)
x <- read.csv("D:/train_store_title_view.csv", header=TRUE)
x <- na.omit(x)
set.seed(131)
sales.rf <- randomForest(sales ~ ., data=x, mtry=3,
importance=TRUE)
My
2005 Mar 23
0
Error: Can not handle categorical predictors with more th an 32 categories.
It always helps to check whether you got the data into R correctly. Hint:
What does str(credit) tell you?
Andy
> From: Melanie Vida
>
> Hi All,
>
> My question is in regards to an error generated when using
> randomForest
> in R. Is there a special way to format the data in order to
> avoid this
> error, or am I completely confused on what the error implies?
2011 Aug 05
1
Main-effect of categorical variables in meta-analysis (metafor)
Dear R-experts!
In a meta-analysis (metafor) I would like to assess the effect of two
categorical covariates (A & B) whereas they both have 4 levels.
Is my understanding correct that this would require to dummy-code (0,1) each
level of each covariate (A & B)?
However I am interested in the main-effects and the interaction of these two
covariates and the dummy-coding would only allow to
2008 Sep 03
2
ANCOVA/glm missing/ignored interaction combinations
Hi
I am using R version 2.7.2. on a windows XP OS and have a question
concerning an analysis of covariance with count data I am trying to do,
I will give details of a scaled down version of the analysis (as I have
more covariates and need to take account of over-dispersion etc etc) but
as I am sure it is only a simple problem but I just can't see how to fix
it.
I have a data set with count
2011 Sep 15
1
MCMCglmm heteroscedasticity dependent on predictor
Hi,
I have a dataset where the residual variance decreases with on one of
the predictors (population size).
Currently, the full model looks like this:
prior<-list(R=list(V=1e-16, nu=-2),G1=list(V=diag(2), nu=2))
m<-MCMCglmm(response~poly(population size,2)*poly(other
predictor,2)+time, random=~us(1+time):population, data=data,
prior=prior)
Basically, it's a random regression with
2011 Aug 04
1
Can glmnet handle models with numeric and categorical data?
Dear All,
Can the x matrix in the glmnet() function of glmnet package be a
data.frame with numeric columns and factor columns? I am asking this
because I have a model with both numeric and categorical predictors,
which I would like to study with glmnet. I have already tried to use a
data.frame, but with no success -- as far as I know, the matrix object
can only have data of a single type. Is
2005 Mar 22
2
Error: Can not handle categorical predictors with more than 32 categories.
Hi All,
My question is in regards to an error generated when using randomForest
in R. Is there a special way to format the data in order to avoid this
error, or am I completely confused on what the error implies?
"Error in randomForest.default(m, y, ...) :
Can not handle categorical predictors with more than 32 categories."
This is generated from the command line:
>