similar to: lm with an arbitrary number of terms

Displaying 20 results from an estimated 3000 matches similar to: "lm with an arbitrary number of terms"

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
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,"")
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
2005 Sep 27
3
quick "points" question
Hi Just one of those niggles....... I've just been trying to plot a filled circle. I thought that this would do it plot(1,1,type="n") points(1,1,pch=1,bg="blue",cex=5) #bg: background ("fill") color for open plot symbols But I need to do this instead points(1.2,1,pch=19,col="blue",cex=5) Am I misunderstanding the "bg" option in the points
1997 Dec 10
1
R-beta: Logistic regression....
Dear R-users I am introducing my collegue to R and she is interested to use R to perform Polytomous Logistic Regression called also Multi-category logistic regression. Is there any program in R doing this? Thank you so much for any feedback. I take this opportunity to thank people who were kind to answer my query about how to include a postscript file generated from R, in a latex file and
2011 Mar 09
4
Extracting only odd columns from a matrix
Hi, This might seem like a simple question but at the moment I am stuck for ideas. The columns of my matrix in which some data is stored are of this form: X1 Y1 X2 Y2 X3 Y3 ... Xn Yn with n~100. I would like to look at just the X values (i.e. odd column numbers). Is there an easy way to loop round extracting only these columns? Any help would be appreciated.
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
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
2000 Mar 16
3
MCMC
Hi Does anyone know of any R coding/functions for MCMC approaches? I am currently using BUGS but I wonder if the bazaar has produced anything? I think I am pushing BUGS to it's limit and possibly past it at the moment. John -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send
1998 Jul 16
2
R-beta: cite R -- how?
I want to cite R for an article. What is the right thing to do? Shall I include "Notes on R" or is there a better way? -- mailto:koloska at rcs.urz.tu-dresden.de http://rcswww.urz.tu-dresden.de/~koloska/ -- -- right now the web page is in german only but this will change as time goes by ;-)
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
2004 Nov 18
1
gibbs sampling for mixture of normals
hi i'm looking for a gibbs sampling algorithm for R for the case of mixture of K normals, and in particular for the case of bivariate normals. i'd be grateful if anyone could send its own R-routine, at least for the univariate case. thank you in advance matteo
2011 Apr 21
1
Converting from density to cumulative distribution
Hello I'm trying to do the following vector operation: given vector x = c(x1,x2,x3,x4...xn), produce vector y = c(x1,x1+x2,x1+x2+x3,...x1+...+xn). E.g., from x = c(1,3,2,2,5), produce y = c(1,4,6,8,13). The underlying problem is finding the cumulative distribution function given the empirical density distribution function. I have done some research on this but the only relevant
2008 May 08
3
lme nesting/interaction advice
Hi everyone, I am confused on how to specify some nesting and interaction terma with lme(). I have a dataset where some flies where selected for accessory gland size, made to mate in presence/absence of another male and the level of some protein measured. Now the complex stuff. The selection has been replicated twice, so that the selection term has got two levels (large and small) with
2005 Jun 09
2
can nlme do the complex multilevel model?
data from multilevel units,first sample the class ,and then the student in calss.following is the 2-level model. and the level-1 model deals with the student,and the level-2 model deals with the class level the students belong to. Level-1 Model Y = B0 + B1*(ZLEAD) + B2*(ZBUL) + B3*(ZSHY) + R Level-2 Model B0 = G00 + U0 B1 = G10 + G11*(ZWARMT) + U1 B2 = G20 + G21*(ZWARMT) + G22*(ZABLET) +
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
2011 Mar 04
2
Reading in and manipulating multiple data sets from the same input file
Hi, I am attempting to write code which will read in my data which is of this form: X1 Y1 X2 Y2 .... Xn Yn 0 0 0 0 0 0 1 0 1 255 1 0 2 255 2 0 2 255 3 0 3 0
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
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).
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