Gabor Grothendieck wrote:
kan_liu2 wrote:
Can you please piont me how to read SAS format file from R (is
it possible?)?
There was a thread on this last month. Check out the replies to:
http://maths.newcastle.edu.au/~rking/R/help/03b/5450.html
___
Dear everybody:
We used the fine foreign library to bring in an SPSS dataset that was
about 9 megabytes and I can squeeze it into a much smaller R object
using compression with
save(ndat, file="NatAnnES2000.rda", compress=T).
I can use load() to get the "ndat" dataframe back, that's all good
I hope I am not telling you things you already know. If so, I apologize
in advance.
There are several C-library addons available to try to deal with the
problem that comparisons of floating point numbers can be
unpredictable. I think your example with the greater than sign would
not be a sour
I handed out some results from glm() and the students ask "how many
observations were dropped due to missing values"?
How would I know?
In other stat programs, the results will typically include N and the
number dropped because of missings. Without going back to R and
fiddling about to find
Dear Feng and everybody
I still have my list of "how to" things for R and sometimes I even try
to add more. Here's the address
http://lark.cc.ku.edu/~pauljohn/R/statsRus.html
I can't tell if you want to have several plots on the same page, in
which case you should use this item:
http://lark.cc
Dear Goran (and others)
I did not know about the "eha" package, but reading the docs, I see many
things I've been looking for, including the parametric hazard model with
Weibull baseline. Thanks for the tip, and the package.
I still don't quite understand your point about the reason that coxph
-.0003223 .0002194-1.47 0.142
eio | -.053 .0726064-0.80 0.426
--
.
last observed exit t = 7
--
Paul Johnson
Dept. of Political Science
University of Kansas
__
[EMAIL P
Dear Everybody:
I have Fedora Core 2 and R-1.9.0 does not build "out of the box". After
applying the daily patch file R-release.diff, I find it does build and
I've made RPMS and SRPM.
In case you want to save yourself a recompile, you can find Fedora Core
RPMs in here:
http://lark.cc.ku.edu/~
With R 1.8.1 running in Fedora Core 1 Linux, I am having some trouble
recoding and ploting some factor variables.
First, can I give you some example data?
Here is a column of names for age groups:
agegroups <- c( "15-19", "20-24", "25-29","30-34", "35-39",
"40-44","45-49","50-54","55-59","60-
I have wrestled with this problem a lot. I use Linux, coauthors use
Windows, and the eps files I make from R don't work with MS Word. Well,
the don't ever have "previews" and they sometimes won't print at all
when I use CrossOver Office with MS Office 2000 in Linux. My coauthor
says he can of
Greetings, everybody. Can I ask some glm questions?
1. How do you find out -2*lnL(saturated model)?
In the output from glm, I find:
Null deviance: which I think is -2[lnL(null) - lnL(saturated)]
Residual deviance: -2[lnL(fitted) - lnL(saturated)]
The Null model is the one that includes the c
I'm confused going back and forth between the textbooks and these
emails. Please pardon me that I seem so pedantic.
I am pretty certain that -2lnL(saturated) is not 0 by definition. In
the binomial model with groups of size=1, then the observed scores will
be {0,1} but the predicted mean will
I've been reading the R mail archives and I've found a lot of messages
with this same kind of problem, but I can't understand the answers. Can
one of you try to explain this to me?
Here's my example. Given a regression model and a variable, I want to
use unstack() on the vector of residuals a
I do this kind of thing all the time. Here's an example program that
iterates over files in a directory. The files are called
DataCulture1
DataCulture2
and so forth. I want to make a graph based on the first, then the
second, and so forth. This version will make a graph each time the
functi
I have a longitudinal data analysis project. There are 10 observations
on each of 15 units, and I'm estimating this with randomly varying
intercepts along with an AR1 correction for the error terms within
units. There is no correlation across units. Blundering around in R
for a long time, I
I asked a few days ago about the difference in results I saw between the
MASS function glmmPQL (due to Venables and Ripley) and the lme function
from the package nlme (due to Pinheiro and Bates). When the two tools
apply to the same model (gaussian, link=identity, correlation=AR1), I
was getti
Dear Peter:
I notice there is a R code for a Zero-inflated Poisson/NB process on the
Stanford Political Science Computational Lab (Prof. Simon Jackman) web
page. If I were wanting to do a one-inflated model, I would start with
that because, at least to my eye, it is very easy to follow. Min
Dear Brett:
There are books for this topic that are more narrowly tailored to your
question. Lindsey's Models for Repeated Measurements and Diggle, et al's
Analysis of Longitudinal Data. Lindsey offers an R package on his web
site. If you dig around, you will find many modeling papers on this,
I just wanted to point out that I was there first :) on the Lyx List
(Nov 2004):
http://www.mail-archive.com/lyx-users@lists.lyx.org/msg36262.html
Perhaps somebody who is trying to put all of this together can benefit
from both sets of explanations.
pj
[EMAIL PROTECTED] wrote:
>>On Mon,
Good day:
I'm administering 6 linux systems (FC4) in a student lab and worry that
users may want packages that are not installed. I get tired of adding
them one by one. Then I happened upon this page
http://support.stat.ucla.edu/view.php?supportid=30
about installing all R packages from CRAN
I'd like to estimate an ordinal logistic regression with a random
effect for a grouping variable. I do not find a pre-packaged
algorithm for this. I've found methods glmmML (package: glmmML) and
lmer (package: lme4) both work fine with dichotomous dependent
variables. I'd like a model similar to
This is a follow up to the message I posted 3 days ago about how to
estimate mixed ordinal logit models. I hope you don't mind that I am
just pasting in the code and comments from an R file for your
feedback. Actual estimates are at the end of the post.
### Subject: mixed ordinal logit via "augm
On 5/10/07, Frank E Harrell Jr <[EMAIL PROTECTED]> wrote:
> Paul Johnson wrote:
> > This is a follow up to the message I posted 3 days ago about how to
> > estimate mixed ordinal logit models. I hope you don't mind that I am
> > just pasting in the code and
0)/3)
> > > f <- areg.boot(y ~ x1 + x2 + x3, B=40)
>
> Works fine on debian linux with same versions
>
> Frank
Works fine in Fedora Core 4 with R -2.2
in case more tests help to point finger at problematic OS
Paul Johnson
--
Paul E. Johnson
Professor, Political Sc
I'm using Fedora Core 4, R-2.2.
The basic question is: can one recover the numerical values used in
SPSS after importing data into R with read.spss from the foreign
library? Here's why I ask.
My colleague sent an SPSS data set. I must replicate some results she
calculated in SPSS and one problem
On 2/19/06, Robert W. Baer, Ph.D. <[EMAIL PROTECTED]> wrote:
> Quoted directly from the FAQ (although granted I need to look this up over
> and over, myself. Would that it had a easily remembered wrapper function):
> 7.10 How do I convert factors to numeric?
> It may happen that when reading numer
Fedora Core Linux is our preference here. The Fedora Extras system
keeps R (and just about everything else we need) up to date. Much of
the Linux kernel and gcc development that goes on in the RedHat
company makes its way to Fedora more quickly than it does to other
distributions.
But the Debian-
I have been reviewing GLM and LMER to sharpen up some course notes and
would like to ask for your advice.
1. Is there a test that would be used to check whether a particular
functional form--say Gaussian, Gamma, or Inverse Gaussian, is "more
appropriate" in a Generalized Linear Model? A theoretic
On 3/2/06, Laurits Søgaard Nielsen <[EMAIL PROTECTED]> wrote:
> Hi
>
> I have a little R problem. I have created a GLM model in R and now I want to
> predict some values outside the values I have in the model (extrapolate).
>
>
myglm <- glm( some stuff here)
whatever <- some-new-hypothetical-data-y
I just ran example(glm) and happened to notice that models based on
the Gamma distribution gives a t test, while the Poisson models give a
z test. Why?
Both are b/s.e., aren't they?
I can't find documentation supporting the claim that the distribution
is more like t in one case than another, exce
Recent questions about using plotmath have renewed my interest in this question
I want to have expressions take values of variables from the
environment. I am able to use expressions, and I am able to use paste
to put text and values of variables into
plots. But the two things just won't work tog
the information they give on the variance components is quite
different.
Thanks in advance.
Now I paste in the example code
### Paul Johnson <[EMAIL PROTECTED]>
### 2006-03-08
N <- 1000
A <- -1
B <- 0.3
x <- 1 + 10 * rnorm(N)
eta <- A + B * x
pi <- exp(eta)/(1+exp(
I upgraded from Fedora Core 4 to Fedora Core 5 and I find a lot of
previously installed packages won't run because shared libraries or
other system things have changed "out from under" the installed R
libraries. I do not know for sure if the R version now from
Fedora-Extras (2.2.1) is exactly the
Dear R users who might like to use the package RNetCDF on Fedora Linux:
Fedora (versions 4 and 5) users might have noticed that the default
install of the netcdf and netcdf-devel packages from the Fedora Extra
archive is inconsistent with the R package RNetCDF. The attempt to
install RNetCDF r
Dear R-helpers:
We have had fun using betareg to fit models with proportions as
dependent variables.
However, in the analysis of these models we found some wrinkles and
don't know where is the best place to start looking for a fix.
The problems we see (so far) are that
1. predict ignores newdat
I imagine this "where are your header files" problem comes up in other
packages, so I'm asking this as a general R question. How should
configure scripts be re-written so they look in more places?
Briefly, the problem is that Fedora-Extras installs the header files
in a subdirectory /usr/include/
ot; not found
library(R2WinBUGS)
I hope that by giving you this small not-yet-working example, you can
spot where I'm going wrong.
##Paul Johnson 2006-04-29
library(R2WinBUGS)
# Copied from Prof Andrew Gelman's example
model.file <- system.file(package = "R2WinBUGS", "model&q
R2WinBUGS on linux systems and I've got a small test case
> > that I'd like to ask about. Since rbugs is a linux adaptation of
> > R2WinBUGS, and R2WinBUGS is now buildable on Linux, it looks like
> > R2WinBUGS may be the way to go. But it fails. The error cente
directory
On 5/1/06, jun yan <[EMAIL PROTECTED]> wrote:
> I have used linbugs with the rbugs package for a recent work. It might be
> worthwhile trying.
>
> Jun
>
>
>
> On 5/1/06, Uwe Ligges <[EMAIL PROTECTED]>
> wrote:
> > Paul Johnson wrote:
>
rough Wine.
> >>
> >>If anybody has rbugs working in current Linux, please tell me
> >>how--give me a working example?
> >>
> >>In the meanwhile, I've noticed that nightly updates have successfully
> >>installed R2WinBUGS on linux systems
rking
examples in R2WinBUGS. For the teaching objective, this simplifies
things a lot!
So long, and thanks for all the fish
pj
On 5/4/06, Uwe Ligges <[EMAIL PROTECTED]> wrote:
> Paul Johnson wrote:
>
> > Hello, and thanks for the many very rapid responses to my requests
This thread piqued my interest in how to use Hmisc latex() to produce
the tables that I actually want, rather than the ones that come out by
default. Actually, I'd be glad to use R2HTML or any other tool if I
can make the output suit my taste.
Here's a small working example that does not require
Hello, everybody:
My friends in Ukraine are starting a research lab at a national
university and they asked what programs to use. I said "R" of course,
and they then asked me 'what support does it have for Cyrillic'?
i've done some snooping in the R website and all the references i find
to foreign
Does anybody suggest a work-around this problem?
pj
Marc Schwartz (via MN) wrote:
> On Wed, 2005-10-12 at 08:33 -0500, Charles Dupont wrote:
>
>>Marc Schwartz (via MN) wrote:
>>
>>>On Tue, 2005-10-11 at 10:01 -0400, Rick Bilonick wrote:
>>>
>>>
I'm using R 2.2.0 on an up-to-date version of F
It appears to me lowess has no "subset" or "strata" option. The
brute-force way (which my students like best) is just to create 4
columns, one for each group (with "unstack" or such) and then run one
lines(lowess()) command for each one.
I think there is a bit more art in using by, which will crea
Greetings:
I'm going to encourage some students to try Bayesian ideas for
hierarchical models.
I want to run the WinBUGS and R examples in Tony Lancaster's An
Introduction to Modern Bayesian Econometrics. That features MS
Windows and "bugs" from R2WinBUGS.
Today, I want to ask how people are doi
s done this, please let me know of your experience.
On 1/17/06, Uwe Ligges <[EMAIL PROTECTED]> wrote:
> Paul Johnson wrote:
> > Greetings:
> >
> > I'm going to encourage some students to try Bayesian ideas for
> > hierarchical models.
> > I wan
fp=7FC8FB80H)
(pc=465BD031H, fp=7FC8FBB0H)
HostMenus.Loop [3BDEH]
.done BOOLEAN FALSE
.f SET {0..5}
.n INTEGER 0
.resINTEGER 0
.w HostWindows.Window NIL
Kernel.Start [2B8CH]
.code PROCEDURE Host
Before I forget, found the working recipe for "rbugs". My mistake
before was not
realzing that the n.iter value is total iterations, including burnin,
and so by setting
n.iter=1000 and n.burnin=1000, I was leaving 0 iterations for the updates.
### Paul Johnson 2006-01-18. This
e source for 'pbatR' failed
** Removing '/usr/lib/R/library/pbatR'
** Restoring previous '/usr/lib/R/library/pbatR'
------
Here's the R code that runs from the Cron job
# Paul Johnson <[EMAIL PROTECTED]> 200
Hello, everybody:
I'm experimenting more with Sweave, R, and LyX. There's now an entry
in the LyX wiki on using R, so anybody can do it!
http://wiki.lyx.org/LyX/LyxWithRThroughSweave
Now I notice this frustrating thing. I think I've done everything
possible to make the Design library start up w
Greetings Everybody:
I generated a 1.2MB dta file based on the general social survey with
Stata8 for linux. The file can be re-opened with Stata, but when I bring
it into R, it says all the values are missing for most of the variables.
This dataset is called "morgen.dta" and I dropped a copy onl
I have a follow up question that fits with this thread.
Can you force an overlaid plot showing predicted values to follow the
scaling of the axes of the plot over which it is laid?
Here is an example based on linear regression, just for clarity. I have
followed the procedure described below to
No!
> ?family
The 'gaussian' family accepts the links '"identity"', '"log"' and
'"inverse"';
Kahra Hannu wrote:
In Venables & Ripley: Modern Applied Statistics with S (MASS), (4th edition), on page 184 there
is a table "Families and link functions" that gives you the available links wit
Greetings, R-help!
On 2 Fedora Core 2 Linux systems, i've completely erased the previous R
and all packages and then installed R-2.0 and installed fresh packages.
In using Rcmdr, I see some trouble and I wonder if other people see this
and if it is due to the tcl/tk, or R, or Rcmdr. (If readers
Greetings:
I'm running R-1.9.1 on Fedora Core 2 Linux.
I tested a proportional odds logistic regression with MASS's polr and
Design's lrm. Parameter estimates between the 2 are consistent, but the
standard errors are quite different, and the conclusions from the t and
Wald tests are dramaticall
I have a linux system with Fedora Core 2 and R-2.0.
I was comparing plots made with plot() and dotplot() and discovered a
problem. Although the dots are positioned correctly, the numerical
labels in the dotplot y axis are not correct.
I put copies here:
http://lark.cc.ku.edu/~pauljohn/R/plotTrou
CMD BATCH /usr/local/bin/R_installAll.R
--
And here's the R program
-----R_installAll.R-
# Paul Johnson 2005-08-31
# This should update and then install all packages, except for
# ones I exclude because they don't work or we don't
Dear R users:
I assigned students to make some graphs and I'm having trouble answering
some questions that they have. We are all working on R 2.1 on Fedora
Core Linux 4 systems.
1. In the plot, the axis is not labeled by "numbers", but rather
scientific notation like "-2e+08" or such. We rea
Maybe this is just the brute force you want to avoid, but it works to
coerce the integer into a string, and then back to a number. Could
reduce number of lines by nesting functions, of course.
y <- 1234131431
n <- 3
ychar <- as.character(y)
ydigits <- nchar(ychar)
result <- as.numeric ( substr(
Dear colleagues:
I've been storing up this question for a long time and apologize for the
length and verbosity of it. I am having trouble in consulting with
graduate students on their research projects. They are using surveys to
investigate the sources of voter behavior or attitudes. They ha
we have
found. Are there simpler, less frustrating approaches?
-----
# Paul Johnson 2005-11-17
# factorFutzing-1.R
myfac <- factor(c(1.1, 4.5, 1.1, 1.1, 4.5, 1.1, 4.5, 1.1))
y <- c(0,1,0,1,0,0,1,0)
mymod1 <-glm (y~myfac, family=binomial)
p1 <- predict(mym
When I run a script from an open editor window (using Ctrl-A, Ctrl-R), I
would like the filename of the script to be automatically written into the
program output, to keep up with frequent version changes. Is there a way to
access the filename (+ path) of the open script (the active one, if there i
Hello R users!
I've been experimenting with lmer to estimate a mixed model with a
dichotomous dependent variable. The goal is to fit a hierarchical
model in which we compare the effect of individual and city-level
variables. I've run up against a conceptual problem that I expect one
of you can
It is a FAQ in our Linux lab. People start emacs and fire up R via
ess, and then they have no idea 'where they are". For computer
experts, it is not a problem, but for people who don't know much about
computers, it is a pretty big problem. They have data in some
subdirectory, but almost invariab
I will test this out, but I'd like to point out that there is probably
an easier way.
Using LyX configured with Rweave, my students and I have had very good
luck generating documents that incorporate R graphics. Like you
propose, it is a one-file approach. I have example lyx and pdf output
files
I collected some advice about this question a couple of years ago.
This might help.
http://pj.freefaculty.org/R/Rtips.html#2.1 "Add variables to a data
frame (or list)"
and the next one after that.
On 7/14/06, Marc Schwartz (via MN) <[EMAIL PROTECTED]> wrote:
> On Fri, 2006-07-14 at 16:57 +0200
The Fedora Extras update of R found its way onto my systems today and
I noted that fix() and edit() no longer work. There is a program crash
that closes up R, but it does not leave a core file. I've tested by
turning off SELinux, it had no effect.
Do you see it too? What do you think? It happe
if you go
x[i]
you are giving x an "index vector", which we had mistakenly thought was
an integer. Rather, it is a vector of indices for observations. Here's data
x <- c(1 , 4, 3, 2, 5)
x[1] would be 1
x[2] would bd 4
but if you put an "index vector" in the brackets, you have
x [ c(1,2,1,2] ]
it
I've used the HDF5 library to bring some data into R. THe verbose output
looks like this:
>
hdf5load("hdfGraphWed_Mar_16_13_33_37_2005.hdf",load=T,verbosity=1,tidy=T)
Processing object: cprSeats .. which is a Group
Processing object: Seats 0 .. its a dataset..Finished dataset
Process
I'm writing R code to calculate Hierarchical Social Entropy, a diversity
index that Tucker Balch proposed. One article on this was published in
Autonomous Robots in 2000. You can find that and others through his web
page at Georgia Tech.
http://www.cc.gatech.edu/~tucker/index2.html
While I wor
Hello, everybody:
On a Fedora Core 3 Linux system, I built R-2.1 using an updated version
of the spec file that was used to make the RPMs for version 2.0.1 on the
CRAN system. The build was fine, and packages updates perfectly. Thanks!
Then I got curious about the package gnomeGUI. While tryin
72 matches
Mail list logo