Displaying 20 results from an estimated 300 matches similar to: "Strange parametrization in polr"
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
2009 Oct 31
2
Logistic and Linear Regression Libraries
Hi all,
I'm trying to discover the options available to me for logistic and linear
regression. I'm doing some tests on a dataset and want to see how different
flavours of the algorithms cope.
So far for logistic regression I've tried glm(MASS) and lrm (Design) and
found there is a big difference. Is there a list anywhere detailing the
options available which details the specific
2012 Apr 24
1
nobs.glm
Hi all,
The nobs method of (MASS:::polr class) takes into account of weight,
but nobs method of glm does not. I wonder what is the rationale of
such design behind nobs.glm. Thanks in advance. Best Regards.
> library(MASS)
> house.plr <- polr(Sat ~ Infl + Type + Cont, weights = Freq, data = housing)
> house.logit <- glm(I(Sat=='High') ~ Infl + Type + Cont, binomial,weights
2013 Oct 18
1
No P.values in polr summary
Hi everyone,
If I compute a "Ordered Logistic or Probit Regression" with the polr
function from MASS package. the summary give me : coefficients, Standard
error and Tvalue.. but not directly the p.value.
I can compute "manualy" the Pvalue, but Is there a way to directly obtain
the pa.value, and I wonder why the p.valeu is not directly calculated, is
there a reason?
exemple
2008 Sep 27
1
retrieving weights from a polr object
Dear list members,
The polr() function in the MASS package takes an optional weights argument
for case weights. Is there any way to retrieve the case weights from the
fitted "polr" object? Examining both the object and the code, I don't see
how this can be done, but perhaps I've missed something.
Any help would be appreciated.
John
------------------------------
John Fox,
2007 Feb 19
3
summary polr
Hi all,
I have a problem to estimate Std. Error and t-value by ?polr? in library Mass.
They result from the summary of a polr object.
I can obtain them working in the R environment with the following statements:
temp <- polr(formula = formula1, data = data1)
coeff <- summary(temp),
but when the above statements are enclosed in a function, summary reports the following error:
2011 Mar 01
1
How to understand output from R's polr function (ordered logistic regression)?
I am new to R, ordered logistic regression, and polr.
The "Examples" section at the bottom of the help page for
polr<http://stat.ethz.ch/R-manual/R-patched/library/MASS/html/polr.html>(that
fits a logistic or probit regression model to an ordered factor
response) shows
options(contrasts = c("contr.treatment", "contr.poly"))
house.plr <- polr(Sat ~ Infl +
2012 Feb 09
1
passing an extra argument to an S3 generic
I'm trying to write some functions extending influence measures to
multivariate linear models and also
allow subsets of size m>=1 to be considered for deletion diagnostics.
I'd like these to work roughly parallel
to those functions for the univariate lm where only single case deletion
(m=1) diagnostics are considered.
Corresponding to stats::hatvalues.lm, the S3 method for class
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 =
2005 Apr 13
2
multinom and contrasts
Hi,
I found that using different contrasts (e.g.
contr.helmert vs. contr.treatment) will generate
different fitted probabilities from multinomial
logistic regression using multinom(); while the fitted
probabilities from binary logistic regression seem to
be the same. Why is that? and for multinomial logisitc
regression, what contrast should be used? I guess it's
helmert?
here is an example
2011 Mar 14
3
Standardized Pearson residuals
Is there any reason that rstandard.glm doesn't have a "pearson" option?
And if not, can it be added?
Background: I'm currently teaching an undergrad/grad-service course from
Agresti's "Introduction to Categorical Data Analysis (2nd edn)" and
deviance residuals are not used in the text. For now I'll just provide
the students with a simple function to use, but I
2007 Oct 29
3
Strange results with anova.glm()
Hi,
I have been struggling with this problem for some time now. Internet,
books haven't been able to help me.
## I have factorial design with counts (fruits) as response variable.
> str(stubb)
'data.frame': 334 obs. of 5 variables:
$ id : int 6 23 24 25 26 27 28 29 31 34 ...
$ infl.treat : Factor w/ 2 levels "0","1": 2 2 2 2 1 1 1 2 1 1 ...
$ def.treat :
2012 Apr 30
5
Different varable lengths
Hi!
I'm trying to do a lm() test on three objects. My problem is that R protests
and says that the variable lengths differ for one of the objects
(Sweden.GDP.gap). But I have double checked that the number of observations
are the same. All three objects should contain 9 observations but R only
accepts 9 observations in two of the objects. The third must have 10! Very
confusing because there
2003 Apr 07
1
filtering ts with arima
Hi,
I have the following code from Splus that I'd like to migrate to R. So far,
the only problem is the arima.filt function. This function allows me to
filter an existing time-series through a previously estimated arima model,
and obtain the residuals for further use. Here's the Splus code:
# x is the estimation time series, new.infl is a timeseries that contains
new information
# a.mle
2009 Dec 10
2
Problem with coeftest using Newey West estimator
Hi,
I want to calculate the t- and p-values for a linear model using the Newey West estimator.
I tried this Code and it usually worked just fine:
> oberlm <- lm(DYH ~ BIP + Infl + EOil, data=HU_H)
> coeftest(oberlm, NeweyWest(oberlm, lag=2))
t test of coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 0.1509950 0.0743832 2.0300 0.179486
BIP
2005 Dec 06
1
standardized residuals (rstandard & plot.lm) (PR#8367)
Full_Name: Heather Turner
Version: 2.2.0
OS: Windows XP
Submission from: (NULL) (137.205.240.44)
Standardized residuals as calculated by rstandard.lm, rstandard.glm and plot.lm
are Inf/NaN rather than zero when the un-standardized residuals are zero. This
causes plot.lm to break when calculating 'ylim' for any of the plots of
standardized residuals. Example:
2009 Nov 13
1
dfbetas vs dfbeta
Hi, I've looked around but can't find a clear answer to the difference for
these two? Any help?
Thanks!
--
View this message in context: http://old.nabble.com/dfbetas-vs-dfbeta-tp26331704p26331704.html
Sent from the R help mailing list archive at Nabble.com.
2001 Dec 18
2
Aranda-Ornaz links for binary data
Hi,
I would like apply different link functions from Aranda-Ordaz (1981)
family to large binary dataset (n = 2000). The existing links in glm for
binomial data (logit, probit, cloglog) are not adequate for my data, and I
need to test some other transformations.
Is it possible to do this in R? And how?
Thank you for your help,
/Sharon
2004 Jan 20
2
rstandard.glm() in base/R/lm.influence.R
I contacted John Fox about this first, because parts of the file are
attributed to him. He says that he didn't write rstandard.glm(), and
suggests asking r-devel.
As it stands, rstandard.glm() has summary(model)$dispersion outside the
sqrt(), while in rstandard.lm(), the sd is already sqrt()ed. This seems to
follow stdres() in VR/MASS/R/stdres.R.
Of course for the c("poisson",
2004 Nov 11
1
polr probit versus stata oprobit
Dear All,
I have been struggling to understand why for the housing data in MASS
library R and stata give coef. estimates that are really different. I also
tried to come up with many many examples myself (see below, of course I
did not have the set.seed command included) and all of my
`random' examples seem to give verry similar output. For the housing data,
I have changed the data into numeric