Displaying 20 results from an estimated 10000 matches similar to: "quick "points" question"
2001 Nov 28
2
Why are looping variables not local?
Hello,
I've had a quick look on the list and can't find an answer to this niggle.
Whilst debugging some code, I noticed that looping variables in R are not
local to the loop as seams common in procedural languages.
For example consider the following piece of code:
for(i in 1:3){
cat(i,"")
for(i in c("a","b","c")){
cat(i,"")
2003 Apr 02
8
lm with an arbitrary number of terms
Hello folks,
Any ideas how to do this?
data.frame is a data frame with column names "x1",...,"xn"
y is a response variable of length dim(data.frame)[1]
I want to write a function
function(y, data.frame){
lm(y~x1+...+xn)
}
This would be easy if n was always the same.
If n is arbitrary how could I feed the x1+...+xn terms into lm(response~terms)?
Thanks
Richard
--
Dr.
2002 Apr 22
3
glm() function not finding the maximum
Hello,
I have found a problem with using the glm function with a gamma
family.
I have a vector of data, assumed to be generated by a gamma distribution.
The parameters of this gamma distribution are estimated in two ways (i)
using the glm() function, (ii) "by hand", using the optim() function.
I find that the -2*likelihood at the maximum found by (i) is substantially
larger than that
2002 Jul 01
1
Defining own variance function / quasi-likelihood in a GLM
Hello,
I've been looking in the on-line manuals and searching past posts but
can't find an answer to this question.
I'd like to define my own variance function in a GLM.
The function glm(formula, family=quasi(var="var function"))
lets me choose from a selection of built in variances, but I want to
define my own function for the variance.
Is there an S-plus
2005 Oct 13
0
nlme gls() error
Hello
I'm fitting a gls model with a variance-covariance structure and an
getting an error message I don't understand
I'm using gls() from the nlme library with the structure defined by
correlation = corSymm(form = ~1|Subject), weights = varIdent(form=~1|strata)
I get the error
Error in recalc.corSymm(object[[i]], conLin) :
NA/NaN/Inf in foreign function call (arg 1)
My
2000 Nov 07
1
ascii load file ( was Re: none)
> Date: Tue, 7 Nov 2000 17:34:37 +0000 (GMT)
> From: Jonathan Myles <mylesj at icrf.icnet.uk>
>
> I've now got a colleague at MRC-BSU to compress it, and email it as an
> attachment to my UNIX machine, where I uncompressed it and then ftp'ed
> it in ascii format to my laptop. So it doesn't seem to be an ascii/bin
> issue ...
Is it possible to get a binary
1999 May 29
2
Unexpected behaviour of read.table
When reading comma-delimited files as saved from a spreadsheet (unfortunately
many of my scientific collaborators give me these) in read.table(), missing
values are spotted most of the time. Unfortunately when comma is the first
character on the line it gets it wrong. For example, reading the file
1,,3
,5,6
,8,9
with
read.table("test.dat", header=F, sep=",")
R gives
1997 Nov 14
1
R-beta: R in ESS with different -n and -v arguments
Is there any way of running R in ESS using -n and -v
arguments other than the default?
Thanks
Jonathan
--
Dr. Jonathan Myles e-mail:jonathan.myles at mrc-bsu.cam.ac.uk
MRC Biostatistics Unit Tel. 01223 330371
Institute of Public Health FAX 01223 330388
University Forvie Site
Robinson Way
CAMBRIDGE
CB2 2SR
2009 Apr 02
3
WinBUGS breaks under WINE > 1.1.12
Dear Wine-friends,
I was wondering if any of you would have a clue around why WinBUGS (http://www.mrc-bsu.cam.ac.uk/bugs/), a nifty Markov chain Monte Carlo sampler widely used in Bayesian statistical modelling, no longer works when run through any version of WINE newer than 1.1.12.
I have encountered this issue of my machines at home (which runs on Zenwalk 6.0) and work (Mandriva 2008.1) a
2000 Jun 22
2
Intermediate LaTeX output generated by R CMD Rd2dvi
Is there any way of getting just the LaTex output which
R CMD Rd2dvi
generates on the way to produces a .dvi file,
which could then be incoorporated into another
document?
Thanks,
Jonathan
--
Dr. Jonathan Myles e-mail:jonathan.myles at mrc-bsu.cam.ac.uk
MRC Biostatistics Unit Tel. 01223 330372
Institute of Public Health FAX 01223 330388
University Forvie Site
2008 Jun 25
1
dgamma in WinBUGS and JAGS (rjags)
Hello,
In WinBUGS 1.4 manual
(http://www.mrc-bsu.cam.ac.uk/bugs/winbugs/manual14.pdf), the gamma
density is presented as dgamma(r,mu) where r and mu are the shape and
rate parameters, respectively. In JAGS (rjags) manual version 1.0.2,
May 9, 2008 (http://www-fis.iarc.fr/~martyn/software/jags/jags_user_manual.pdf),
on page 26 the gamma density is presented as dgamma(mu,r) instead of
dgamma(r,mu).
2008 Aug 27
0
New package: ``denstrip'' for compactly illustrating distributions
Dear R users,
I'd like to announce a new package on CRAN called ``denstrip''. It
implements ``density strips'' and other graphical methods for
illustrating and comparing distributions in a compact fashion.
Posterior distributions of parameters are often summarised using point
and line drawings of means and credible intervals. This is common,
for example, in multiple
2008 Aug 27
0
New package: ``denstrip'' for compactly illustrating distributions
Dear R users,
I'd like to announce a new package on CRAN called ``denstrip''. It
implements ``density strips'' and other graphical methods for
illustrating and comparing distributions in a compact fashion.
Posterior distributions of parameters are often summarised using point
and line drawings of means and credible intervals. This is common,
for example, in multiple
2012 Jul 24
2
deleted-to-trash plugin problems
We have a user who wants to use Outlook with our Dovecot IMAP server but
doesn't like the way Outlook handles deletion with IMAP.
Ironically she would like Outlook to move the message to her Trash
folder, just like Outlook does with "local" folders, I guess.
So I enabled the "deleted-to-trash" plugin (v0.3) on our Dovecot 1.2.17
server (built for SPARC, solaris 10,
2002 Oct 17
4
Multiple colors in plots/lookup function
Hello,
I'd like to do something like:
n<-100
zz<-cbind(rnorm(n),rnorm(n),floor(runif(n)*3+1))
colors<-c("red","green","blue")
plot(zz,col=colors(zz[3]))
and have a matrix of scatterplots colored by class. The above does not
work, of course, but I'm not sure exactly what function I'm looking for.
Thank you for your time,
Dave,
--
Dave
1997 Jul 19
1
R-beta: R without graphics
Is there a way to "unplug" the windows graphics from
R, so that it will work across a teletype telnet
session or in a Linux box proving resistant to having
windows added to it?
Thanks
Jonathan Myles
--
Dr. Jonathan Myles e-mail:jonathan.myles at mrc-bsu.cam.ac.uk
MRC Biostatistics Unit Tel. 01223 330371
Institute of Public Health FAX 01223 330388
University Forvie
1999 Jul 12
0
Error is dynamivally loaded code
Changing from 0.64.1 to 0.64.2 is causing some dynamically-loaded code to
crash with the message:
ld.so.1: /usr/local/lib/R/bin/R.binary:
fatal: relocation error: file /homef/jonm/glib/ggg/libs/glmm.so:
symbol R_chk_calloc: referenced symbol not found
(I've added carriage returns)
what am I doing wrong?
Jonathan
--
Dr. Jonathan Myles e-mail:jonathan.myles at mrc-bsu.cam.ac.uk
1999 Jun 07
0
R/C programming and documentation---thanks and summary
Thanks to everyone who helped with my query---Professors
Riply, Bates, Lumley, and Tim Keitt.
I said
<snip>
> My worries are
>
> a) That I've used calloc rather than S_alloc throughout.
Professors Bates and Ripley both pointed out that calloc
should be replaced by Calloc and free by Free,
which, I'll do.
----
I said:
> b) That I've used the following
2000 Jun 15
2
Checking the existence of a file
Is there a platform-independent way of checking in R whether a
given file exists in the user's filespace?
(so in a unix system, can you check within R whather, say,
/homef/jonm/thisfile
exists)
Thanks
Jonathan Myles
--
Dr. Jonathan Myles e-mail:jonathan.myles at mrc-bsu.cam.ac.uk
MRC Biostatistics Unit Tel. 01223 330372
Institute of Public Health FAX 01223 330388
1999 May 27
3
No subject
(I dithered a bit about whether this belongs on r-help
(as part of it is a general R question) or r-devel
(as it's a question relating to putting stuff on
CRAN) but decided it might be of general enough interest
to go on the former )
I am currently preparing an R library to estimate
approximate posterior distributions for parameters in
Generalised Linear Mixed Models by Gibbs Sampling