Displaying 20 results from an estimated 5000 matches similar to: "Resolution of problem re location polr and of MASS"
2004 Mar 03
7
Location of polr function
Hello
I am running R 1.8.1 on a Windows platform
I am attempting to fit an ordinal logistic regression model, using the
polr function, as described in Venables and Ripley. But when I try
model4 <- polr(ypsxcat~committed + as.factor(sex)
+ as.factor(drugusey) + anycsw + as.factor(sex)*committed
+ as.factor(sex)*as.factor(drugusey)+as.factor(sex)*anycsw, data =
duhray)
I get a message
2004 Oct 08
1
polr and optim question
Hello again
I am trying to fit an ordinal logistic model using the polr function
from MASS. When I run
model.loan.ordinal <- polr(loancat~age + sex + racgp + yrseduc +
needlchg + gallery + sniffball + smokeball + sniffher +
smokeher + nicocaine + inject + poly(year.of.int,3) + druginj +
inj.years)
I get an error
Error in optim(start, fmin, gmin, method = "BFGS", hessian =
2004 Oct 09
2
polr problem solved
I'd like to thank John Fox and Chuck Cleland for their help in resovling
this issue. It turned out to be something simple, but perhaps others
have had similar problems
In my original data frame, I had 4 categories of race/ethnicity. One of
the categories (other) was very small, and not similar to any of the
other three categories, so I created a new data frame deleting those
people.
2004 Oct 09
0
RE: zero-inflated count models (was polr problem solved)
John Fox wrote
<<<
>From your description, it seems possible that there are too many zeros
for a Poisson or negative-binomial model. Since the focus of your paper
is the methodology, you might want to try a zero-inflated Poisson or
negative-binomial model. Though I haven't tried them, I'm aware of two
sources of R functions for zero-inflated count models -- zeroinfl(),
from
2003 Nov 08
2
Effects of rounding on regression
Does anyone know of research on the effects of rounding on regression?
e.g., when you ask people "How often have you _______?" you are more
likely to get answers like 100, 200, etc. than 98, 203, etc.
I'm interested in investigating this, but don't want to reinvent the
wheel.
thanks
Peter
Peter L. Flom, PhD
Assistant Director, Statistics and Data Analysis Core
Center for
2003 Aug 26
2
Simple simulation in R
Hello all
I have a feeling this is very simple......but I am not sure how to do
it
My boss has two variables, one is an average of 4 numbers, the other is
an average of 3 of those numbers i.e
var1 = (X1 + X2 + X3 + X4)/4
var2 = (X1 + X2 + X3)/3
all of the X variables are supposed to be measuring similar constructs
not surprisingly, these are highly correlated (r = .98), the question
is how
2006 Mar 28
2
Welch test for equality of variance
Hello
Using R 2.2.1 on a Windows machine.
Has anyone programmed the Welch test for equality of variances?
I tried RSiteSearch, but this gave references to t test and
oneway.test, which are not quite what I need.....I need the Welch test
itself, for use in a meta-analysis (to determine if variances are
equal).
TIA
Peter
Peter L. Flom, PhD
Assistant Director, Statistics and Data Analysis
2003 Sep 08
2
Yet another beginner question
Thanks for all the help on my earlier questions.....
How do you plot a simple time series with unequal intervals? I have
the following
dateofpoll <- as.ts(c("6/1/02", "7/1/02", "10/1/02", "1/4/03",
"1/25/03",
"6/7/03", "7/16/03", "8/17/03", "9/4/03"))
reelect <- c(51, 47, 49, 51, 49, 49, 46, 45, 40)
2003 Oct 29
2
Where is rmutil package?
Pursing my earlier question, when I tried loading Lindsey's gnlm, I got
a
message
Loading required package: rmutil
Warning message:
There is no package called 'rmutil' in: library(package, character.only
= TRUE, logical = TRUE, warn.conflicts = warn.conflicts,
According to the R documentation
http://finzi.psych.upenn.edu/R/doc/html/packages.html
rmutil is in the standard
2005 Mar 30
1
fastbw question
Hello
I am running R 2.0.1 on Windows, I am attempting to use Frank Harrell's
'fastbw' function (from the Design library), but I get an error that the
fit was not created with a Design library fitting function; yet when I
go to the help for fastbw (and also look in Frank's book Regression
Modeling Strategies) it appears that fastbw should work with a model
created with lm.....
2004 Jun 09
3
Dot chart question
Running R 1.8.1 on a Windows machine
In dotchart, I would like to shrink the labels on the tick marks (that
is, the numbers) without shrinking anything else. I could not find this
in either the Rhelp archives or in ?dotchart, which recmmends cex to
avoid 'label overlap', but cex shrinks all the characters in the plot.
Is there a way to do this?
Thanks
Peter
Peter L. Flom, PhD
2003 Sep 05
3
Dotchart question
Sorry to keep asking elementary questions......I appreciate the help.
I am trying to create a dotchart with the rows sorted according to the
values, rather than the labels. When I try
prof <- c('Accountant', 'Administrative assistant', 'Garment worker',
'Cook',
'Dentist', 'General practictioner', 'Graduate student', 'High level
2003 Oct 01
3
sas.get problem
When I try
citypro <- sas.get('c:/ndri/cvar/data', member = 'citypro2')
I get the following errors and warnings:
'sas' is not recognized as an internal or external command,
operable program or batch file.
'less' is not recognized as an internal or external command,
operable program or batch file.
Error in sas.get("c:/ndri/cvar/data", member =
2003 Jul 15
1
Tree question
I was under the impression that the tree method (e.g. as implemented in
rpart) was insensitive to monotonic transformations of the dependent
variable. e.g. Breiman Olshen et al. Classification and Regression
Trees state "In a standard data structure [a tree] is invariant under
all monotone transformations of individual ordered varaibles" (p. 57)
However, I get very different results
2004 Jan 16
2
Weird problem with trying to change a variable
I have a dataframe called cvar, with two variables (among many others)
called MSA and ACTUP. Both are numeric. This was working fine. Then I
found out that for two MSAs, ACTUP should be 1, not 0.
so I tried
cvar$ACTUP[cvar$MSA == 6840] <- 1
cvar$ACTUP[cvar$MSA == 5360] <- 1
but when I try
table(cvar$MSA, cvar$ACTUP)
the level of ACTUP for those two MSAs has not changed, and is still
2003 Sep 04
1
scatter.smooth error
Hello
When I run
scatter.smooth(jitter(weight), jitter(height2), span = .25, evaluation
= 50, pch = '.')
I get the type of graph I thought I would get, but also a warning.....
k-d tree limited by memory. ncmax= 528
I always get concerned when there are warnings I don't understand.
What's a k-d tree? Is this something to be concerned about?
Thanks
Peter
Peter L. Flom,
2007 Feb 07
1
Problem with subsets and xyplot
Hello
I have a dataframe that looks like this
MSA CITY HIVEST YEAR YR CAT
1 0200 Albuquerque 0.50 1996 1996 5
2 0520 Atlanta 13.00 1997 1997 5
3 0720 Baltimore 29.10 1994 1994 1
4 0720 Baltimore 13.00 1995 1995 5
5 0720 Baltimore 3.68
2004 Sep 27
2
Getting code for functions
Hello
Pardon for the elementary question, I did try searching the archives
with various terms, but to no avail. I am using R1.9.1 on a windows
machine
One of the great advantages of R (to me, anyway) is being able to see
the code for a function , e.g. by typing sd one sees the code for
getting a standard deviation.
However, for many functions this only provides info. including
UseMethod, eg.
2003 Dec 19
1
Question re labels in r-part (continuation of a thread from a while back)
Hello again
I have modeled a tree using rpart, with the DV being a log
transformation of the variable I am really interested in (I transformed
the DV due to extreme skewness). By default, text.rpart labels the
nodes with the value of yval, which in this case is not what I want; I'd
like the labels to be on the original metric, but label in text.rpart
requires a "column name of
2003 Oct 29
1
One inflated Poisson or Negative Binomal regression
Hello
I am interested in Poisson or (ideally) Negative Binomial regression
with an inflated number of 1 responses
I have seen JK Lindsey's fmr function in the gnlm library, which fits
zero inflated Poisson (ZIP) or zero inflated negative binomial
regression, but the help file states that for ' Poisson or related
distributions the mixture involves the zero category'.
I had thought