similar to: AIC questions

Displaying 20 results from an estimated 900 matches similar to: "AIC questions"

2012 Jun 28
3
would you give me your hand to standardize columns in a matrix?
Hi R User, Would you give me your hand to standardize some columns in a matrix? I have included the example table. > dput(test) structure(list(X = c(1, 2, 3, 4, 5, 6), Y = c(4, 5, 6, 7, 8, 9), temp = c(0.818, 0.113, 0.256, 0.587, 0.955, 0.207), oxy = c(0.797, 0.487, 0.727, 0.128, 0.514, 0.031)), .Names = c("X", "Y", "temp", "oxy"), row.names =
2007 Mar 19
5
Problem well trying to run Need For Speed Porsche Unleased
So I have Need For Speed Porsche Unleased and I have ubuntu 6.06 LTS and I have wine 0.9.90-ubuntu2 which I installed using the package manager . So I simply use wine and I get to play NFS on ubuntu simple right. I install NFS and everything goes fine. I then go to wincfg and add NFS and change it to run in 98. Error one I run the shortcut on my desktop in a terminal and I get this
2001 Dec 19
2
Interpolating variables into quoted strings
Hello I am new to R and am coming from a Perl background. I have had trouble figuring out from the documentation how to interpolate a variable into a quoted string (if it's possible). This seems to be necessary when writing a script that must print out strings (for example plot legends) whose content is calculated during the execution of the script. In perl I could write: $name =
2003 Nov 10
1
kmeans error (bug?)
Hello, I have been getting the following intermittent error from kmeans: >str(cavint.p.r) num [1:1967, 1:13] 0.691 0.123 0.388 0.268 0.485 ... - attr(*, "dimnames")=List of 2 ..$ : chr [1:1967] "6" "49" "87" "102" ... ..$ : chr [1:13] "HYD" "NEG" "POS" "OXY" ... > set.seed(34) >
2011 Oct 20
1
stop R from rounding
Hello, I have a column in a data frame that need to be 10 digits long. As such: Decimal.Year 1 1994.25997 2 1994.26020 However, R keeps rounding the digits. As such: Decimal.Year 1 1994.260 2 1994.260 *Is there any way to stop this from happening?* Here is how I created the data frame: x <- read.table('bats_1994_CTD.txt') colnames(x) <-
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)
2003 Sep 27
2
CI on median
Dear friends, I'm probably wrong but is there anything better than bootstrap to get a confidence interval of the median from a population with unspecified distribution ? Best wishes Troels Ring, Aalborg, Denmark
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
2018 Jun 04
0
aic() component in GLM-family objects
>>>>> Ben Bolker >>>>> on Sun, 3 Jun 2018 17:33:18 -0400 writes: > Is it generally known/has it been previously discussed here that the > $aic() component in GLM-family objects (e.g. results of binomial(), > poisson(), etc.) does not as implemented actually return the AIC, but > rather -2*log-likelihood + 2*(model_has_scale_parameter)
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
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
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
2018 Jun 03
2
aic() component in GLM-family objects
Is it generally known/has it been previously discussed here that the $aic() component in GLM-family objects (e.g. results of binomial(), poisson(), etc.) does not as implemented actually return the AIC, but rather -2*log-likelihood + 2*(model_has_scale_parameter) ? Can anyone in this forum gauge how a documentation patch would be received? This behaviour does not seem to be documented in ?family
2007 Sep 28
2
plot graph with error bars trouble
Hi, I have a data set like this: Mutant Rep Time OD 02H02 1 0 0.029 02H02 2 0 0.029 02H02 3 0 0.023 02H02 1 8 0.655 02H02 2 8 0.615 02H02 3 8 0.557 02H02 1 12 1.776 02H02 2 12 1.859 02H02 3 12 1.668 02H02 1 16 3.379 02H02 2 16 3.726 02H02 3 16 3.367 306 1 0 0.033 306 2
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
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
2003 Oct 27
3
expanding factor with NA
I have a factor (with "n" observations and "k" levels), with only "nobs" < n of the observations not missing. I would like to produce a (n x k) model matrix with treatment contrasts for this factor, with rows of NAs placeholding the missing observations. If I use model.matrix() I get back a (nobs x k) matrix. Is there an easy way to get the (n x k) without
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 <-
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
2011 Apr 16
1
Matching Problem: Want to match to data.frame with inexact matching identifier (one identifier has to be in the range of the other).
Hello R-Community, I have the following matching problem: I have two data.frames, one with an observation every month (per company ID), and one with an observation every quarter (per company ID; note that quarter means fiscal quarter; therefore 1Q = Jan, Feb, Mar is not necessarily correct and also, a fiscal quarter is not necessarily 3 month long). For every month and company, I want to get the