Displaying 20 results from an estimated 400 matches similar to: "problem with polr ?"
2005 Jun 14
2
Logistic regression with more than two choices
Dear all R-users,
I am a new user of R and I am trying to build a discrete choice model (with
more than two alternatives A, B, C and D) using logistic regression. I have
data that describes the observed choice probabilities and some background
information. An example below describes the data:
Sex Age pr(A) pr(B) pr(C) pr(D) ...
1 11 0.5 0.5 0 0
1 40 1 0 0 0
0 34 0 0 0 1
0 64 0.1 0.5 0.2 0.2
...
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
2007 Jun 04
2
How to obtain coefficient standard error from the result of polr?
Hi - I am using polr. I can get a result from polr fit by calling
result.plr <- polr(formula, data=mydata, method="probit");
However, from the 'result.plr', how can I access standard error of the estimated coefficients as well as the t statistics for each one of them?
What I would like to do ultimately is to see which coefficients are not significant and try to refit the
2007 Nov 10
1
polr() error message wrt optim() and vmmin
Hi,
I'm getting an error message using polr():
Error in optim(start, fmin, gmin, method = "BFGS", hessian = Hess, ...) :
initial value in 'vmmin' is not finite
The outcome variable is ordinal and factored, and the independant variable
is continuous. I've checked the source code for both polr() and optim()
and can't find any variable called
2004 Jan 08
3
Strange parametrization in polr
In Venables \& Ripley 3rd edition (p. 231) the proportional odds model
is described as:
logit(p<=k) = zeta_k + eta
but polr apparently thinks there is a minus in front of eta,
as is apprent below.
Is this a bug og a feature I have overlooked?
Here is the naked code for reproduction, below the results.
------------------------------------------------------------------------
---
version
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 +
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
2007 Jun 11
1
How do I obtain standard error of each estimated coefficients in polr
Hi,
I obtained all the coefficients that I need from polr. However, I'm wondering how I can obtain the standard error of each estimated coefficient? I saved the Hessian and do something like summary(polrObj), I don't see any standard error like when doing regression using lm. Any help would be really appreciated. Thank you!
- adschai
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,
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)
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:
2007 Feb 20
0
R: Re: summary polr
Hi all,
The problem is that when you try to use the function summary of a polr object in a function, it does not work.
The problem is not related to the formula or the structure of data involved.
It is probably related to the use of the function "vcov" in the code of summary for polr, and the iterative procedure to estimate the Hessian.
Anyway, here there is an example extracted from
2005 May 03
2
comparing lm(), survreg( ... , dist="gaussian") and survreg( ... , dist="lognormal")
Dear R-Helpers:
I have tried everything I can think of and hope not to appear too foolish
when my error is pointed out to me.
I have some real data (18 points) that look linear on a log-log plot so I
used them for a comparison of lm() and survreg. There are no suspensions.
survreg.df <- data.frame(Cycles=c(2009000, 577000, 145000, 376000, 37000,
979000, 17420000, 71065000, 46397000,
2010 Jun 08
2
type conversion with apply or not
Folks, i thought it should be straightforward but after a few hours poking around, I decided it's best to post my question on this list.
I have a data frame consisting of a (large) number of date columns, which are read in from a csv file as character string. I want to convert them to Date type. Following is an example, where the first column is of integer type, while the rest are type
2011 Apr 09
1
loop and sapply problem, help need
Dear R experts
Sorry for this question
M1 <- 1:10
lcd1 <- c(11, 22, 33, 44, 11, 22, 33, 33, 22, 11)
lcd2 <- c(22, 11, 44, 11, 33, 11, 22, 22, 11, 22)
lcd3 <- c(12, 12, 34, 14, 13, 12, 23, 23, 12, 12)
#generating variables through sampling
pvec <- c("PR1", "PR2", "PR3", "PR4", "PR5", "PR6", "PR7",
2011 Jun 10
2
Plotting NLS profiles
Hello list,
I'm trying to plot nls profiles, but the plot.profile.nls function in
R doesn't seem to accept any plot.default variables. Specifically,
I'd like to be able to change the x-axis title and the colors to black
and white. Has anyone had any luck with this?
If not, is there a way to override to plotting colors, perhaps in par()?
Thanks,
Sam
fm1 <- nls(demand ~
2007 Oct 12
2
accessing ylim set by xyplot
Hello,
I would like to know if there is a clever way to avoid the problem
illustrated below within the xyplot function.
x <- seq(1:10)
y <- seq(1:10)
pr1 <- xyplot(x ~ y)
u <- seq(1:12)
v <- seq(1:12)
pr2 <- xyplot(u ~ v, col = "red", more = FALSE)
prts <- list(pr1, pr2)
for(i in prts) print(i, more = TRUE)
I realize that one possibility is to
2006 Apr 07
1
Compiling PL/R against R.dll in Win32/MinGW
Hello list,
I've been trying to get the PostgreSQL PL/R library to compile on
windows (http://www.joeconway.com/plr/). The author of this library
says the problem is likely because the distributed R.dll isn't compiled
as a shared dll. Is this the case? If so, is there any way to compile
it such that it is shared? If that's not the case, than maybe someone
on this list has a better
2012 Nov 22
2
Trick to replace NA
Dear members,
I have a series of values in a vector and some value are missing and
replaced with NA.
For example:
a <- c(27, 25, NA, NA, 24, 26, 27, NA, 26)
I would like to replace the NAs with the value taken from the previous
value that is non-NA. The output would be in this case:
27 25 25 25 24 26 27 27 26
Now I do that with a for loop, but I try to eliminate all the loops to
gain in
2004 Nov 01
1
plot time series / dates (basic)
Dear R users,
I'm having a hard time with some very simple things. I have a time
series where the dates are in the format 7-Oct-04. I imported the
file with read.csv so the date column is a factor. The series is
rather long and I want to plot it piece by piece. The function below
works fine, except that the labels for date are meaningless (ie
9.47e+08 or 1098000000 - apparently the number of