Displaying 20 results from an estimated 100 matches similar to: "multinom crashes (when I do something stupid) (PR#8358)"
2011 Jan 29
1
environment question: changing variables from a formula through model.frame?
Hello all,
I came across a behavior of R with environments that I'm not sure what is
causing it.
It involves changing variables that are found through using model.frame on a
formula inside a function.
I wonder if it's a "bug" or a "feature". And in either case, how it might
be managed.
Here is a simple example:
# let's say we have an x and y variables:
temp_x
2011 Jan 26
1
boxplot - code for labeling outliers - any suggestions for improvements?
Hello all,
I wrote a small function to add labels for outliers in a boxplot.
This function will only work on a simple boxplot/formula command (e.g:
something like boxplot(y~x)).
Code + example follows in this e-mail.
I'd be happy for any suggestions on how to improve this code, for example:
- Handle boxplot.matrix (which shouldn't be too hard to do)
- Handle cases of complex
2005 Oct 13
3
Help with Matrix package
Hello all,
A colleague at work set me the challenge to convert some MATLAB
code into R, to see which is faster. We'd seen that benchmark comparing
MATLAB 6.5 to R1.90 (and others), and so I thought that I should be able
to get roughly comparable speeds. The code has lots of multiplications
of matrixes, transposes, and MATLAB's "repmat". I did the code
conversion, and R was about
2003 Feb 25
3
cat in windows vs linux
Hi all,
Easy question for you (which I failed to find the answer to in the FAQ etc). I've recently been forced to switch from linux to windows (currently windows NT), and my usual habit of putting lots of "cat" statements in slow functions to get an idea of the progress rate is no longer useful. Why -- because R waits until the function is completely finished before printing the cat
2001 Apr 05
1
predict.glm
Hello,
Probably a stupidly easy question, but I have done the following
in order to make predictions from a fitted glm with new data:
my.glm <- glm(lt96~so296[,1:17],family=binomial(link=logit))
p96 <- predict.glm(my.glm,newdata=so293[,1:17],type="response")
but I always get the fitted linear predictors from the original model, ie
there doesn't seem to be acknowledgement of
2009 Feb 24
0
multinom() and multinomial() interpretation
Hello and thanks in advance for any advice.
I am not clear how, in practice, the multinom() function in nnet and the
multinomial() function in VGAM differ in terms of interpretation. I
understand that they are fit differently. Are there certain scenarios where
one is more appropriate than the other? In my case I have a dependent
variable with 4 categories and 1 binary and 4 continuous
2004 May 17
1
residuals in multinom
Hi,
is there a possibility to calculate the different "types" of residuals
directly using the multinom function from MASS as it is possible for the
functions gam, glm
using type="deviance" or "working" or "pearson" or "response"? I tried it
but got always the "response" type, I guess.
thanx
Matthias
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
2012 Nov 10
1
colineraity among categorical variables (multinom)
Dear all users,
I"d like to ask you how to make decision about colinearity among
categorical independent variables
when the model is multinomial logistic regression.
Any help is appreciated,
Niklas
[[alternative HTML version deleted]]
2003 Aug 01
1
behavior of weights in nnet's multinom()
I see that "case weights" can be optioned in multinom(). I wanted to
make sure I understand what weights= is expecting. My weights (not
really mine but I'm stuck with them) are noninteger, are not scaled to
sum to the sample size, and larger weights are intended to increase
influence.
The description of various types of weights is a perennial confusion for
me; sorry.
STS
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
2003 Nov 19
0
multinom question
I'd like to fit a multinomial log-linear model for 4 categories of the
form
log[(P(D=i | X)/P(D=0 | X)] = alpha_i + X beta_i ; i=1,2,3
but with beta_1 constrained to zero. Is there a way to impose such a
constraint in the multinom function?
Brad
-------------------------------------------------------------------------
Brad McNeney email: mcneney at stat.sfu.ca
2004 Nov 02
0
Confident intervals in multinom
Dear R help list,
i'm using multinom (nnet), the results given to me is
the coefficients and std errors.
Is there a way to obtain directly (or in an export to
latex) the odd-ratio (exp(B)) and it's confident
intervals.
thanks very much for your help
Pierre-Henry Miquel
Universit?? de Lille 2 (M??decine)
France
Vous manquez d??espace pour stocker vos mails ?
2005 May 09
1
formula restriction in multinom?
Good Day: When I used:
multinom(formula = Y ~ X1 + X2 + X3 + X1:X2 + X1:X3 + X3:X2 + X1^2 + X2^2 +
X3^2, data = DATASET),
I get estimates and AIC for the model containing main effects and
interactions only (no squared terms)...and FYI, all predictors are
continuous. Is this "normal" behavior? If I run this in S-Plus I get
estimates and AIC for the model containing all terms(including
2007 Jan 05
1
Efficient multinom probs
Dear R-helpers,
I need to compute probabilties of multinomial observations, eg by doing the
following:
y=sample(1:3,15,1)
prob=matrix(runif(45),15)
prob=prob/rowSums(prob)
diag(prob[,y])
However, my question is whether this is the most efficient way to do this.
In the call prob[,y] a whole matrix is computed which seems a bit of a
waste.
Is there maybe a vectorized version of dmultinom which
2004 May 11
0
Question about predict.multinom()
Hello,
This is the fitted model:
> fit
Call:
multinom(formula = resp ~ pred$cls + pred$smoke)
Coefficients:
(Intercept) pred$cls2 pred$cls3 pred$cls4 pred$cls5 pred$smoke2 pred$smoke3
Proteinuria -1.140520 0.1616644 0.05554898 -0.01584927 0.02574805 -0.4057245 -0.2898425
Hypertension -2.691215 -0.3699690 -0.22582107 0.01615898 0.26318005 0.1239051 0.2413282
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
2004 Dec 28
1
glm vs multinom
Dear Colleagues,
I am doing two class classification using logistic regression. I realized that I can either use "glm" function or "multinom" function. I know "multinom" is used for multiclass classification. But if I was it for binary classification, I was wondering if there is an difference in the results compared to "glm" results.
Thanks in advance.
2005 Jun 13
0
Problem with multinom ?
>On Sat, 11 Jun 2005, John Fox wrote:
>
>>Dear Marc,
>>
>>I get the same results -- same coefficients, standard errors, and fitted
>>probabilities -- from multinom() and glm(). It's true that the deviances
>>differ, but they, I believe, are defined only up to an additive constant:
>
>Yes. There are many variations on the definition
>of (residual)