Displaying 20 results from an estimated 1100 matches similar to: "explained deviance in multinom"
2005 Apr 05
1
extracting Proportion Var and Cumulative Var values from factanal
Hi R users,
I need some help in the followings:
I'm doing factor analysis and I need to extract the loading values and
the Proportion Var and Cumulative Var values one by one.
Here is what I am doing:
> fact <- factanal(na.omit(gnome_freq_r2),factors=5);
> fact$loadings
Loadings:
Factor1 Factor2 Factor3 Factor4 Factor5
b1freqr2 0.246 0.486 0.145
2007 Mar 30
2
ANOVA and confidence intervals plot
Dear *,
I would like to obtain for each factor of my anova model the
"response variable vs factor" plot with means and 95% Tukey HSD
intervals.
I would appreciate any information on how to do that.
Cheers
--------------------------------------------------------------------
Max MANFRIN Tel.: +32 (0)2 650 3168
IRIDIA - CoDE, CP 194/6
2011 Apr 15
3
GLM output for deviance and loglikelihood
It has always been my understanding that deviance for GLMs is defined
by;
D = -2(loglikelihood(model) - loglikelihood(saturated model))
and this can be calculated by (or at least usually is);
D = -2(loglikelihood(model))
As is done so in the code for 'polr' by Brian Ripley (in the package
'MASS') where the -loglikehood is minimised using optim;
res <-
2011 Apr 08
1
multinom() residual deviance
Running a binary logit model on the data
df <- data.frame(y=sample(letters[1:3], 100, repl=T),
x=rnorm(100))
reveals some residual deviance:
summary(glm(y ~ ., data=df, family=binomial("logit")))
However, running a multinomial model on that data (multinom, nnet)
reveals a residual deviance:
summary(multinom(y ~ ., data=df))
On page 203, the MASS book says that "here the
2009 Dec 11
3
Correcting for missing data combinations
I can think of many brute-force ways to do this outside of R, but was
wondering if there was a simple/elegant solution within R instead.
I have a table that looks something like the following:
Factor1 Factor2 Value
A 11/11/2009 5
A 11/12/2009 4
B 11/11/2009 7
B 11/13/2009 8
>From that I need to generate all permutations of Factor1 and Factor2 and
force a 0 for any combination that doesn?t
2011 Nov 10
1
Sum of the deviance explained by each term in a gam model does not equal to the deviance explained by the full model.
Dear R users,
I read your methods of extracting the variance explained by each
predictor in different places. My question is: using the method you
suggested, the sum of the deviance explained by all terms is not equal to
the deviance explained by the full model. Could you tell me what caused
such problem?
> set.seed(0)
> n<-400
> x1 <- runif(n, 0, 1)
> ## to see problem
2002 Nov 29
2
Obtaining the variable names of a glm object
Is names(model1$coef) what you're looking for?
-----Original Message-----
From: Kenneth Cabrera [mailto:krcabrer at epm.net.co]
Sent: 29 November 2002 10:36
Cc: R-help at stat.math.ethz.ch
Subject: [R] Obtaining the variable names of a glm object
Hi, R users!
Suppose I make a model like this:
2003 Mar 06
6
type III Sum Sq in ANOVA table - Howto?
Hello,
as far as I see, R reports type I sums of squares. I'd like to get R to
print out type III sums of squares.
e.g. I have the following model:
vardep~factor1*factor2
to get the type III sum of squares for factor1 I've tried
anova(lm(vardep~factor2+factor1:factor2),lm(vardep~factor1*factor2))
but that didn't yield the desired result.
Could anyone give me a hint how to proceed?
2004 Jul 29
2
aov for unbalanced design (PR#7144)
Full_Name: Tanya Logvinenko
Version: 1.7.0
OS: Windows 2000
Submission from: (NULL) (132.183.156.125)
For unbalanced design, I ran into problem with ANOVA (aov function). The sum of
squares for only for the second factor and total are computed correctly, but sum
of squares for the first factor is computed incorreclty. Changing order of
factors in the formula changes the ANOVA table. For the
2010 Jan 12
3
How to get minimum value by group
I'd like to get a long data set of minimum values from groups in another data
set.
The following almost does what I want. (Note, I'm using the word factor
differently from it's meaning in R; bad choice of words)
myframe = data.frame(factor1 = rep(1:2,each=8), factor2 =
rep(c("a","b"),each=4, times=2), factor3 = rep(c("x","y"),each=2, times=4),
2010 Jun 06
1
Why did TukeyHSD not work when I used it for post-hoc for 2way within-subjects anova?
Dear R people,
I have a couple of questions about post-doc analyses for 2 by 2 within
subjects ANOVA. I conducted a psycholinguistic study that combined a 2 by 2
design and a latin square design. Specifically, I had 32 items each of which
generated 4 conditions. Participants saw each of the 32 items only once: 8
in Condition A, 8 in B, 8 in C, and 8 in D. The table below serves as an
example.
2009 Dec 08
1
{Lattice} help.
Hi All,
I have a 4-dimensional data. I'm using barchart() function from lattice
package. The R code and data are below - code includes one for stack=TRUE
and other for stack=FALSE.
I would like to present the data in another form which would be plotting
Factor3 levels (P, Q, R, S) as two stacked bars (side by side). Like, for
each level of Factor1 there should be two bars: first bar showing
2004 Oct 28
1
polr versus multinom
Hi,
I am searching for methods to compare regression models with an ordered
categorical response variable (polr versus multinom).
The pattern of predictions of both methods (using the same predictor
variables) is quite different and the AIC is smaller for the multinom
approach. I guess polr has more strict premises for the structure of the
response variable, which methods can be used to test for
2006 Jun 27
1
weights in multinom
Best R Help,
I like to estimate a Multinomial Logit Model with 10 Classes. The
problem is that the number of observations differs a lot over the 10
classes:
Class | num. Observations
A | 373
B | 631
C | 171
D | 700
E | 87
F | 249
G | 138
H | 133
I | 162
J | 407
Total: 3051
Where my data looks like:
x1 x2 x3 x4 Class
1 1,02 2 1 A
2 7,2 1 5 B
3 4,2 1 4 H
1 4,1 1 8 F
2 2,4 3 7 D
1 1,2 0 4 J
2 0,9
2006 Feb 22
2
does multinomial logistic model from multinom (nnet) has logLik?
I want to get the logLik to calculate McFadden.R2 ,ML.R2 and
Cragg.Uhler.R2, but the value from multinom does not have logLik.So my
quetion is : is logLik meaningful to multinomial logistic model from
multinom?If it does, how can I get it?
Thank you!
ps: I konw VGAM has function to get the multinomial logistic model
with logLik, but I prefer use the function from "official" R
2008 Aug 11
1
checking if multinom converged
Is anyone aware of a way to check whether multinom has converged by
checking a component of the output ? I'm
not familar with nnet but, since multinom calls nnet , maybe there is an
extra argument once can send to multinom to capture this
information. Thanks.
2005 Nov 17
1
access standard errors from multinom model
Dear R users,
I'm using a multinomial LOGIT model to analyse choice behaviour of consumers
(as part of my masters thesis research).
Using the R documentation and search on the R website I have a working
script now.
Parameters are estimated and I can access them via
coefficients(multinom.out).
In order to see if the parameters are significant I like to access the
standard errors in the
2004 Sep 27
1
multinom object :way of plotting??
Dear all,
I'm fitting a multinom function to my dataset (multinom(outcome~age+K+D))
and I need to present my results on a poster. Does someone know a nice way
of doing that? I think I saw in an archive that you cannot plot a
multinom.object, is it true?
Thank you by advance for your help,
Cheers
Camille
2009 Jun 13
1
Insignificant variable improves AIC (multinom)?
Hi,
I am trying to specify a multinomial logit model using the multinom function from the nnet package. Now I add another independent variable and it halves the AIC as given by summary(multinom()). But when I call Anova(multinom()) from the car package, it tells me that this added variable is insignificant (Pr(>Chisq)=0.39). Thus, the improved AIC suggests to keep the variable but the Anova
2005 May 13
1
multinom(): likelihood of model?
Hi all,
I'm working on a multinomial (or "polytomous") logistic regression
using R and have made great progress using multinom() from the nnet
library. My response variable has three categories, and there are two
different possible predictors. I'd like to use the likelihoods of
certain models (ie, saturated, fitteds, and null) to calculate
Nagelkerke R-squared values for