Displaying 20 results from an estimated 800 matches similar to: "subset selection for glm"
2005 Aug 16
2
specify seed for Random Number Generator
I need to generate 100 I.I.D samples from an exponential distribution. I
use rexp(100,parameter). Is there anyway to specify a seed to determine the
first input for the uniform random number generator used to generate these
exponentials?
-Dhiren
2005 Aug 17
2
plotting issue with timestamps
I have a dataset with transactions and a timestamp at which they occoured
during a day. The time stamp is in the format YYYY/MM/DD hh:mm:ss. I would
like to plot a timeseries of the transactions to see if there is a
particular time in the day when there is a spike in transactions. Ofcourse
the YYYY/MM/DD can be dropped since I am monitoring activity for the day and
the actual date is
2005 Oct 07
2
matrix operation
Hello:
I have a matrix 'dat' with 2 columns.
I have the following code:
for (i in 1:nrows(dat))
{
if (dat[i,1] < dat[i,2])
{
dat[i,2]<-0
}
else
{
dat[i,2]<-1
}
Is there a way to accomplish this without the for loop?
Thank you.
-Dhiren
2005 Aug 05
1
SJava linux installation problems
Hi:
I am extremely new to linux so bare with the questions. I am trying to
install the SJava package for R on linux (debian).
I issue the R CMD INSTALL SJava_0.68-0.tar.gz and get the following error
Cannot find Java.
Please set your path to include the directory in which the java executable
resides,
or set the environment variable JAVA_HOME before this configure script is
run.
I have
2010 Jul 22
1
GLM Starting Values
Hello,
Suppose one is interested in fitting a GLM with a log link to binomial data. How does R choose starting values for the estimation procedure? Assuming I don't supply them.
Thanks,
Tyler
2009 Mar 27
1
deleting/removing previous warning message in loop
Hello R Users,
I am having difficulty deleting the last warning message in a loop so that the only warning that is produced is that from the most recent line of code. I have tried options(warn=1), rm(last.warning), and resetting the last.warning using something like:
> warning("Resetting warning message")
This problem has been addressed in a previous listserve string,
2006 Apr 11
1
gaussian family change suggestion
Hi,
Currently the `gaussian' family's initialization code signals an error if
any response data are zero or negative and a log link is used. Given that
zero or negative response data are perfectly legitimate under the GLM
fitted using `gaussian("log")', this seems a bit unsatisfactory. Might
it be worth changing it?
The current offending code from `gaussian' is:
2005 Jul 29
1
Wild card characters
I have a string '982323.1' and would like to replace everything after the
'.' with a '41'. So the string should look like '982323.41'. The code I
use to do this is
sub('\.$','41',982323.1)
This works fine as long as there is only 1 digit after the decimal. If I
have '982323.10', then the result of the code is '982323.141'
2006 Nov 12
2
segfault 'memory not mapped', dual core problem?
I encountered a segfault running glm() and wonder if it could have
something to do with the way memory is handled in a dual core system
(which I just set up). I'm running R-base-2.4.0-1, installed from the
SuSE 10.1 x86_64 rpm (obtained from CRAN). (My processor is an AMD
Athlon 64 x2 4800+).
The error and traceback are
*** caught segfault ***
address 0x8001326f2b, cause 'memory not
2009 Dec 17
2
segfault in glm.fit (PR#14154)
Bug summary:
glm() causes a segfault if the argument 'data'
is a data frame with more than 16384 rows.
Bug demonstration:
-------input ---------------
N <- 16400
df <- data.frame(x=runif(N, min=1,max=2),y=rpois(N, 2))
glm(y ~ x, family=poisson, data=df)
------ output ---------------
*** caught segfault ***
address (nil),
2002 Feb 27
1
Bug in glm.fit? (PR#1331)
G'day all,
I had a look at the GLM code of R (1.4.1) and I believe that there are
problems with the function "glm.fit" that may bite in rare
circumstances. Note, I have no data set with which I ran into
trouble. This report is solely based on having a look at the code.
Below I append a listing of the glm.fit function as produced by my
system. I have added line numbers so that I
2003 Jan 21
1
Starting values for glm fits
I'm fitting some small data sets using a binomial glm with complementary
log-log link. In some ill-conditioned cases I am getting convergence
failures. I know how to adjust maxit and epsilon, but that doesn't seem
to help.
In fact I know some very good starting values for my fits, but I can't
see how to get them in to glm(). How may I do this?
--
Dr Murray Jorgensen
2010 Apr 26
2
Unexpected warnings from summary() on mcmc.list objects
I am trying to get summary statistics from WinBUGS/JAGS output in the
form of mcmc.list objects, using the summary() function. However, I
get odd warning messages:
Warning messages:
1: In glm.fit(x = X, y = Y, weights = weights, start = start, etastart
= etastart, :
algorithm did not converge
2: In glm.fit(x = X, y = Y, weights = weights, start = start, etastart
= etastart, :
algorithm did
2008 Oct 19
1
MCMClogit: using weights
Hi everyone: I am just wondering how can I use weights with MCMClogit function (in MCMCpack package). For example, in case of glm function as given below, there is weights option in the arguments. Aparently there is no option of using weights in MCMClogit.
glm(formula, family = gaussian, data, weights, subset,
na.action, start = NULL, etastart, mustart,
offset, control =
2008 Jan 12
1
Problem with strptime
Dear R-list,
I'm experiencing some problems while using "strptime", which I don't understand.
> str(natver)
'data.frame': 154 obs. of 8 variables:
$ ID : Factor w/ 14 levels "AC","ALS","FA",..: 10 11 9 1 4 8 13 3 14 12 ...
$ CdBMin : int 22 22 26 26 28 23 27 23 25 26 ...
$ CdBMax : int 22 24 27 26 32 26 29 30 29 28 ...
$
2003 Jul 24
5
inverse prediction and Poisson regression
Hello to all, I'm a biologist trying to tackle a "fish" (Poisson Regression) which is just too big for my modest understanding of stats!!!
Here goes...
I want to find good literature or proper mathematical procedure to calculate a confidence interval for an inverse prediction of a Poisson regression using R.
I'm currently trying to analyse a "dose-response"
2005 Nov 28
3
glm: quasi models with logit link function and binary data
# Hello R Users,
#
# I would like to fit a glm model with quasi family and
# logistical link function, but this does not seam to work
# with binary data.
#
# Please don't suggest to use the quasibinomial family. This
# works out, but when applied to the true data, the
# variance function does not seams to be
# appropriate.
#
# I couldn't see in the
# theory why this does not work.
# Is
2006 Jan 14
2
initialize expression in 'quasi' (PR#8486)
This is not so much a bug as an infelicity in the code that can easily
be fixed.
The initialize expression in the quasi family function is, (uniformly
for all links and all variance functions):
initialize <- expression({
n <- rep.int(1, nobs)
mustart <- y + 0.1 * (y == 0)
})
This is inappropriate (and often fails) for variance function
"mu(1-mu)".
2008 Dec 24
1
Viewing code
How do you view the code for a built-in R command (i.e., if I want to see
what R is doing when I run a glm() statement)?
Regards,
Stephen
[[alternative HTML version deleted]]
2005 Jul 27
2
GAM weights
Dear all,
we are trying to model some data from rare plants so we always have less than 50
1x1 km presences, and the total area is about 550.000 square km. So we have a
real problem, when we perform a GAM, if we consider only the same amount of
absences than presences.
We have thought to use a greater number of absences but in this case we shoud
downweight them.
Does anybody know how to use the