Displaying 20 results from an estimated 2000 matches similar to: "BIC doesn't work for glm(family=binomial()) (PR#8208)"
2004 Jul 19
1
Bug in cor() with named array and matrix (PR#7116)
Full_Name: Ju-Sung Lee
Version: 1.9.1
OS: Windows XP
Submission from: (NULL) (128.2.79.102)
The following commands causes R to crash:
a = array(1:3)
dimnames(a)[[1]] = c('1','2','3')
cor(a,matrix(1:3))
not naming the array seems to work.
2013 Feb 18
1
nobs() with glm(family="poisson")
Hi!
The nobs() method for glm objects always returns the number of cases
with non-null weights in the data, which does not correspond to the
number of observations for Poisson regression/log-linear models, i.e.
when family="poisson" or family="quasipoisson".
This sounds dangerous since nobs() is, as the documentation states,
primarily aimed at computing the Bayesian
2008 Sep 24
2
Error message when calculating BIC
Hi All,
Could someone help me decode what this error means ?
> BIC(nb.80)
Error in log(attr(object, "nobs")) :
Non-numeric argument to mathematical function
>
BTW, nb.80 is a negative binomial glm model created using the MASS
library with the call at the bottom of the message
In the hopes of trying to figure this out I tried the following
workaround but it did not work
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:
2007 Mar 19
1
font replacement not completely,howto?
i added the following in ~/.wine/user.reg
[SoftwareWineFontsReplacements]
"System"="AR PL New Sung"
"Arial"="AR PL New Sung"
"Fixedsys"="AR PL New Sung"
"Microsoft Sans Serif"="AR PL New Sung"
"MS UI Gothic"="AR PL New Sung"
"Tahoma"="AR PL New Sung"
2010 May 18
1
BIC() in "stats" {was [R-sig-ME] how to extract the BIC value}
>>>>> "MM" == Martin Maechler <maechler at stat.math.ethz.ch>
>>>>> on Tue, 18 May 2010 12:37:21 +0200 writes:
>>>>> "GaGr" == Gabor Grothendieck <ggrothendieck at gmail.com>
>>>>> on Mon, 17 May 2010 09:45:00 -0400 writes:
GaGr> BIC seems like something that would logically go into stats
2012 Jan 20
1
nobs() and logLik()
Dear all,
I am studying a bit the various support functions that exist for
extracting information from fitted model objects.
From the help files it is not completely clear to me whether the number
returned by nobs() should be the same as the "nobs" attribute of the
object returned by logLik().
If so, then there is a slight inconsistency in the methods for 'nls'
objects with
2012 Apr 24
1
nobs.glm
Hi all,
The nobs method of (MASS:::polr class) takes into account of weight,
but nobs method of glm does not. I wonder what is the rationale of
such design behind nobs.glm. Thanks in advance. Best Regards.
> library(MASS)
> house.plr <- polr(Sat ~ Infl + Type + Cont, weights = Freq, data = housing)
> house.logit <- glm(I(Sat=='High') ~ Infl + Type + Cont, binomial,weights
2003 Nov 13
1
creating a "report" table from a set of lists
I've been trying to figure out how to accomplish the following...
I've got a list (returned from a function) and I would like to "cbind()" the
lists together to create a "cross tab" report or simply bind them together
somehow
the function returns a list that looks like the following:
> all$BM
$species
[1] "BM"
$vbar.nobs
[1] 3
$vbar.sum
[1] 54.05435
2008 Dec 19
0
What BIC is calculated by 'regsubsets'?
The function 'regsubsets' appears to calculate a BIC value that is
different from that returned by the function 'BIC'. The latter is
explained in the documentation, but I can't find an expression for the
statistic returned by 'regsubsets'.
Incidentally, both of these differ from the BIC that is given in Ramsey
and Schafer's, The Statistical Sleuth. I assume
2013 Apr 25
1
lsfit: Error in formatting error message
Hi,
in R-3.0 I get the following error when calling lsfit with more
observations than variables, which seems to come from an error in the
formatting of the error message (note that this was not happening in
2.15.3):
> nobs <- 5; nvar <- 6; lsfit(matrix(runif(nobs*nvar), ncol=nvar),
runif(nobs), intercept=FALSE)
Error in sprintf(ngettext(nry, "%d response", "%d
2013 May 01
1
Trouble with methods() after loading gdata package.
Greetings to r-help land.
I've run into some program crashes and I've traced them back to methods()
behavior
after the package gdata is loaded. I provide now a minimal re-producible
example. This seems bugish to me. How about you?
dat <- data.frame(x = rnorm(100), y = rnorm(100))
lm1 <- lm(y ~ x, data = dat)
methods(class = "lm")
## OK so far
library(gdata)
2006 Jan 18
2
Windows package upates
Dear list
Having just started to use the Windows version, I am very impressed with
it's package handling as well as the gui.
So I tried to see what was due for update and packages such as Hmisc,
Matrix and others came up.
But when I had updated them - which took a few goes as something hung
between here and Bristol - I noticed that the default packages such as
nmle, MASS had disappeared. I
2008 Dec 23
1
quotation problem/dataframe names as function input argument.
Dear R friends:
Can someone help me with the following problem? Many thanks in advance.
# Problem Description:
# I want to write functions which take a (character) vector of dataframe
names as input argument.
# For example, I want to extract the number of observations from a number of
dataframes.
# I tried the following:
nobs.fun <- function (dframe.vec)
{
nobs.vec <-
2018 Jul 20
3
Should there be a confint.mlm ?
It seems that confint.default returns an empty data.frame for objects of
class mlm. For example:
```
nobs <- 20
set.seed(1234)
# some fake data
datf <-
data.frame(x1=rnorm(nobs),x2=runif(nobs),y1=rnorm(nobs),y2=rnorm(nobs))
fitm <- lm(cbind(y1,y2) ~ x1 + x2,data=datf)
confint(fitm)
# returns:
2.5 % 97.5 %
```
I have seen proposed workarounds on stackoverflow and elsewhere, but
2003 Sep 10
2
Samba 3.0rc3 - German Umlauts
Hi,
i have still the same problem.
I use 3.0RC3 with lib/charcnv.c of the actual CVS (Sep 10 15:19).
I works not realy:
I can create (Windows XP + Explorer) the filename "L?sung.txt" but not "?sung.txt".
--
Greetings
M. Ungermann
2006 Mar 09
3
newbie question: grouping rows
Hi all,
I have a very simple question that I can't seem to find the answer to.
How do I extract rows that meet a certain criteria from a data frame
and group them into a new data frame? For example, if I want to make a
new data frame that only includes rows of data for which the p values
(given by one of the columns in the data frame) are less than a
certain value, how do I do this? It seems
2011 Mar 27
1
run function on subsets of matrix
I was wondering if it is possible to do the following in a smarter way.
I want get the mean value across the columns of a matrix, but I want
to do this on subrows of the matrix, given by some vector(same length
as the the number of rows). Something like
nObs<- 6
nDim <- 4
m <- matrix(rnorm(nObs*nDim),ncol=nDim)
fac<-sample(1:(nObs/2),nObs,rep=T)
##loop trough different
2007 Dec 05
1
Information criteria for kmeans
Hello,
how is, for example, the Schwarz criterion is defined for kmeans? It should
be something like:
k <- 2
vars <- 4
nobs <- 100
dat <- rbind(matrix(rnorm(nobs, sd = 0.3), ncol = vars),
matrix(rnorm(nobs, mean = 1, sd = 0.3), ncol = vars))
colnames(dat) <- paste("var",1:4)
(cl <- kmeans(dat, k))
schwarz <- sum(cl$withinss)+ vars*k*log(nobs)
Thanks
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