Displaying 20 results from an estimated 10000 matches similar to: "help with table"
2003 Feb 12
1
rpart v. lda classification.
I've been groping my way through a classification/discrimination
problem, from a consulting client. There are 26 observations, with 4
possible categories and 24 (!!!) potential predictor variables.
I tried using lda() on the first 7 predictor variables and got 24 of
the 26 observations correctly classified. (Training and testing both
on the complete data set --- just to get started.)
I
2008 Sep 30
2
weird behavior of drop1() for polr models (MASS)
I would like to do a SS type III analysis on a proportional odds logistic
regression model. I use drop1(), but dropterm() shows the same behaviour. It
works as expected for regular main effects models, however when the model
includes an interaction effect it seems to have problems with matching the
parameters to the predictor terms. An example:
library("MASS");
options(contrasts =
2003 May 05
3
polr in MASS
Hi, I am trying to test the proportional-odds model using the "polr" function in the MASS library with the dataset of "housing" contained in the MASS book ("Sat" (factor: low, medium, high) is the dependent variable, "Infl" (low, medium, high), "Type" (tower, apartment, atrium, terrace) and "Cont" (low, high) are the predictor variables
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.
2006 Mar 08
3
Multiple logistic regression
Dear R-users,
Is there a function in R that classifies data in more than 2 groups using
logistic regression/classification? I want to compare the c-indices of
earlier research (lrm, binary response variables) with new c-indices
obtained from 'multiple' (more response variables) logistic regression.
Best regards,
Stephanie Delalieux
Department Biosystems
M?-BIORES
Group of Geomatics
2012 Aug 09
2
Analyzing Poor Performance Using naiveBayes()
My data is 50,000 instances of about 200 predictor values, and for all 50,000
examples I have the actual class labels (binary). The data is quite
unbalanced with about 10% or less of the examples having a positive outcome
and the remainder, of course, negative. Nothing suggests the data has any
order, and it doesn't appear to have any, so I've pulled the first 30,000
examples to use as
2013 May 27
1
Question about subsetting S4 object in ROCR
Dear list
I'm testing a predictor and I produced nice performance plots with ROCR
package utilizing the 3 standard command
pred <- prediction(predictions, labels)
perf <- performance(pred, measure = "tpr", x.measure = "fpr")
plot(perf, col=rainbow(10))
The pred object and the perfo object are S4
with the following slots
An object of class "performance"
2003 Aug 16
2
xtabs to dataframe fails (PR#3754)
Full_Name: Daniel Frey
Version: 1.7.1
OS: Windows 2000
Submission from: (NULL) (80.254.164.242)
Generating a data frame out of a xtabs result acts unusual. Take the following
sample to reproduce it:
> a.a <- c("a","a","a","b","b")
> a.b <- c("c","c","d","e","f")
>
2016 May 23
2
data frame method for as.table()
Hello,
Currently it's possible to convert an object of class table to a data frame
with as.data.frame.table(), but there's no ready-made function, AFAIK, to do
the reverse operation, i.e. conversion of a data frame to a table.
Do you think it would be a good idea to add a data.frame method to
as.table(), to allow such conversions?
The idea is that if `x' is a table and `y <-
2007 Dec 18
1
Random forests
Dear all,
I would like to use a tree regression method to analyze my dataset. I
am interested in the fact that random forests creates in-bag and
out-of-bag datasets, but I also need an estimate of support for each
split. That seems hard to do in random forests since each tree is
grown using a subset of the predictor variables.
I was thinking of setting mtry = number of predictor variables,
2019 Mar 12
3
as.data.frame.table() does not recognize default.stringsAsFactors()
Reporting a possible inconsistency or bug in handling stringsAsFactors in as.data.frame.table()
Here is a simple test
> options()$stringsAsFactors
[1] TRUE
> x<-c("a","b","c","a","b")
> d<-as.data.frame(table(x))
> d
x Freq
1 a 2
2 b 2
3 c 1
> class(d$x)
[1] "factor"
>
2012 May 26
1
Plotting interactions from lme with ggplot
I'm fitting a lme growth curve model with two predictors and their
interaction as predictors. The multilevel model is nested so that level 1 is
time within the individual, and level 2 is the individual. I would like to
plot the mean group-level trajectories at plus and minus 1 SD from the mean
of the main effects composing the interaction term. Thus, the plot should
have 4 lines (mean
2024 Apr 15
2
Synthetic Control Method
Good Morning
I want to perform a synthetic control method with R. For this purpose, I
created the following code:
# Re-load packages
library(Synth)
library(readxl)
# Pfadeinstellung Excel-Blatt
excel_file_path <-
("C:\\Users\\xxxxx\\Desktop\\DATA_INVESTMENTVOLUMEN_FOR_R_WITHOUT_NA.xlsx")
# Load the Excel file
INVESTMENTVOLUME <- read_excel(excel_file_path)
#
2010 Jul 07
1
Why do <none>s appear in the list of predictor variables in logistic regression using 'step' or 'stepAIC' function?
Would anyone help me solve my problem with R, please? I am very new to R. I am doing logistic regression analysis on the presence/absence of salamanders using several predictor variables, as shown below. I have checked my data, but I didn't find any 'NA' or empty cells. When I used step() or stepAIC to select significant predictor variables, <none>s appear to places where
2009 Nov 02
2
convert list to numeric
I would like to preface this by saying that I am new to R, so I would ask
that you be patient and thorough, so that I'm not completely clueless. I am
trying to convert a list to numeric so that I can perform computations on it
(specifically mean-center the variable), but I am running into problems. I
have imported the data set into "task" (data frame). The data frame is made
of
2009 Apr 20
1
Random Forests: Predictor importance for Regression Trees
Hello!
I think I am relatively clear on how predictor importance (the first
one) is calculated by Random Forests for a Classification tree:
Importance of predictor P1 when the response variable is categorical:
1. For out-of-bag (oob) cases, randomly permute their values on
predictor P1 and then put them down the tree
2. For a given tree, subtract the number of votes for the correct
class in the
2009 Feb 09
2
R equivalent of SAS Cochran-Mantel-Haenszel tests?
In SAS, for a two-way (or 3-way, stratified) table, the CMH option in
SAS PROC FREQ gives
3 tests that take ordinality of the factors into account, for both
variables, just the column variable
or neither. Is there an equivalent in R?
The mantelhaen.test in stats gives something quite different (a test of
conditional independence for
*nominal* factors in a 3-way table).
e.g. I'd like to
2010 Jun 09
3
bootpred for multinomial
I applied bootpred for multinomial logistic reg. (with nnet package). I used same as theta.fit and theta.predict of R for my data. but give me error. Can I do this with
response vriable;7 levels
predictor variables:5 (1 classifier, 4 continuous)?
Thanks alot
Azam
[[alternative HTML version deleted]]
2008 Dec 12
1
Concordance Index - interpretation
Hello everyone.
This is a question regarding generation of the concordance index (c
index) in R using the function rcorr.cens. In particular about
interpretation of its direction and form of the 'predictor'.
One of the arguments is a "numeric predictor variable" ( presumably
this is just a *single* predictor variable). Say this variable takes
numeric values.... Am I
2006 Jan 02
2
mixed effects models - negative binomial family?
Hello all,
I would like to fit a mixed effects model, but my response is of the
negative binomial (or overdispersed poisson) family. The only (?)
package that looks like it can do this is glmm.ADMB (but it cannot
run on Mac OS X - please correct me if I am wrong!) [1]
I think that glmmML {glmmML}, lmer {Matrix}, and glmmPQL {MASS} do
not provide this "family" (i.e. nbinom, or