I fitted a GAM model with Poisson distribution
using the function gam() in the mgcv package.
My model is of the form:
mod-gam(y~s(x0)+s(x1)+s(x2),family=poisson).
To extract estimates at a specified set of covariate
values I used the gam `predict' method.
But I want to get
estimate and
Gabor,
can you say this in some other way. I appologize, but I just don't
understand anything. I really don't see any connection with R CMD CHECK
and vignettes.
I would just like to see that Sweave would follow \input of \include
commands of LaTeX. You can try with the following example bellow.
(See DAAG book, p. 173, ex. 3)
I'm a new user of R, and I'm following the DAAG text. I want to create a
subset of the races2000 data frame, but get errors because of a mismatch
of values in some columns:
library(DAAG)
attach(races2000)
hills2000 - races2000[races2000$type == 'hill']
Error in
Clint Harshaw wrote:
(See DAAG book, p. 173, ex. 3)
I'm a new user of R, and I'm following the DAAG text. I want to create a
subset of the races2000 data frame, but get errors because of a mismatch
of values in some columns:
library(DAAG)
attach(races2000)
hills2000 -
On Sun, 27 Feb 2005 12:32:44 + (UTC),
Gabor Grothendieck (GG) wrote:
[...]
Since this might not be desirable in all instances,
if Sweave were to have an include facility then it should
not be implemented in such a way that the latex include facility
can no longer be used. The
Jim Lemon wrote:
Thanks for the answers - I should have been more specific as I had already
tried axTicks and pretty.
The function in question is gantt.chart() in the latest plotrix package
(Thanks to Scott Waichler for the original code). I settled on axis.POSIXct
as it seemed the most
Hello!
I have two vectors and want to know how many of their elements are equal -
what's the best way to do this in R?
Best regards,
Sven
__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the
Hi, Gabor:
Of course: time zone vs. GMT.
Next question: Might a simple example that illustrates this be
added to the help file for as.POSIXct, and if yes, what should be done
to make that happen?
Thanks.
spencer graves
Gabor Grothendieck wrote:
Spencer Graves
It depends on what you mean by that. Consider the following two
examples:
sum((1:5)==(5:1))
[1] 1
sum((2:1) %in%(1:6))
[1] 2
Does one of these solve your problem?
spencer graves
Sven C. Koehler wrote:
Hello!
I have two vectors and want to know how many of their elements
On Sun, 2005-02-27 at 16:07 +0100, Sven C. Koehler wrote:
Hello!
I have two vectors and want to know how many of their elements are
equal -
what's the best way to do this in R?
Best regards,
Sven
a - 1:10
b - 8:20
a
[1] 1 2 3 4 5 6 7 8 9 10
b
[1] 8 9 10 11 12 13
After I hit send, I realized an error in:
which(a %in% b)
[1] 8 9 10
The above should be:
a[which(a %in% b)]
[1] 8 9 10
They happen to be the same by coincidence only, given the values that I
used.
The first syntax returns the _indices_ of the matches, not the actual
matched values
Dear all,
I need an advice in the following problem.
I have to maximize two functions of the form f1(x)=f(y1,x,alpha1,beta1) and
f2(x)=(y2,x,alpha2,beta2), the maximization is with respect to alpha1, alpha2,
beta1, beta2. I can maximize each function separately using nlm.
The problem is that
Dear useRs,
I'm trying to download some data through the HTTPS protocol. However,
download.file() does not support HTTPS (R 2.0.1 on WinXP):
Error in download.file(https.url, destfile = test.txt) :
unsupported URL scheme
1. Is there any other function/package in R that can work with
On Sun, 2005-02-27 at 09:50 -0600, Marc Schwartz wrote:
[snip]
a[which(a %in% b)]
[1] 12 13 14 15
One more time:
The above can be simplified to just:
a[a %in% b]
[1] 12 13 14 15
Also, if you happen to be comparing floating point numbers in the two
vectors, consider that floating point
You say that the total number of parameters is approximately 30,
but you identify only 4, alpha1, alpha2, beta1 and beta2. I gather
these are vectors and g is a scalar?
Have you considered making the constraint part of the objective
function, so you minimize
1. I have not used nlm, but I would think for many problems, it
would be roughly equivalent to optim.
2. The parameter a in the objective function I wrote was the
relative weight between optimization of f1 and f2. I would expect to
get different answer with a = 0.5, 1, 2, though I
Dear Group, I am calculating correlation coeff.
between two populations. After calculating the
cor.coefs I want to represent them as a matrix file.
a b c d
A 1 0 1 1
B 1 1 1 1
C 1 0 1 0
D 0 1 1 1
could any one please help me how can i acheive this:
I am trying to search through a matrix I have (x) to see if there are any
missing values. This is what I have been using:
for (i in 1:3455)
for (j in 1:24)
if (is.na(x[i,j])) break;
i
j
When I run the program, it either freezes or stops and returns the last
entry in the matrix
Does the following solve your problem:
is.na(array(c(NA, 1:5), dim=c(2,3)))
[,1] [,2] [,3]
[1,] TRUE FALSE FALSE
[2,] FALSE FALSE FALSE
spencer graves
Jessica Higgs wrote:
I am trying to search through a matrix I have (x) to see if there are
any missing values. This is what I
What version of R under which operating system?
I just tried something similar and got something sensible, as
follows:
set.seed(1)
e1 - array(1:6, dim=c(3,2),
dimnames=list(NULL, LETTERS[1:2]))
e2 - array(rnorm(6), dim=c(3,2),
dimnames=list(NULL, letters[1:2]))
e12 - cor(e1,
hi,
i am need to plot two or more sets of data in a 3d scatterplot,
each set with different color.
i tried Rcmdr, and the 3d scatterplot facility, based on rgl. that
is what i need. but i cannot seem to code different sets of data
differently. any help will be very helpful.
i tried
21 matches
Mail list logo