similar to: use of offset - clarification

Displaying 20 results from an estimated 10000 matches similar to: "use of offset - clarification"

2012 Jan 07
2
glm or transformation of the response?
Hi Dr. Snow, I am a graduate student working on analyzing data for my thesis and came across your post on an R forum: The default link function for the glm poisson family is a log link, which means that it is fitting the model: log(mu) ~ b0 + b1 * x But the data that you generate is based on a linear link. Therefore your glm analysis does not match with how the data was generated
2005 Dec 01
2
Minimizing a Function with three Parameters
Hi, I'm trying to get maximum likelihood estimates of \alpha, \beta_0 and \beta_1, this can be achieved by solving the following three equations: n / \alpha + \sum\limits_{i=1}^{n} ln(\psihat(i)) - \sum\limits_{i=1}^{n} ( ln(x_i + \psihat(i)) ) = 0 \alpha \sum\limits_{i=1}^{n} 1/(psihat(i)) - (\alpha+1) \sum\limits_{i=1}^{n} ( 1 / (x_i + \psihat(i)) ) = 0 \alpha \sum\limits_{i=1}^{n} (
2006 Nov 27
2
[R-sig-Geo] plot() and Jpeg() increase font size and resolution
Thanks to Edzer and Roger, I can now plot with increased font sizes. However, jpeg still does not reproduce these, nor does it show up in high quality. What I would like to do is produce some highresolution jpegs. Any help would be appreciated Thanx Herry R2.4 on Mandriva 10.2 linux. Dr Alexander Herr Spatial and statistical analyst CSIRO, Sustainable Ecosystems Davies Laboratory, University
2015 Jun 10
2
Duda glmer
Hola, Tengo una base de datos con estructura jerárquica en la que quiero clasificar observaciones en distintas categorías. En el caso más simple, tengo una variable con dos categorías (variable Y1) y dentro de cada una de ellas hay otras dos categorías (variable Y2). Además tengo una variable explicativa cuantitativa discreta X. El banco de datos sería de este tipo: X Y1 Y2 5 0 1 9 0 0 2
2007 Jun 14
1
blotched y-axis text in plot function
Hi List, I have recently upgraded to opensuse10.2 and R 2.5 (compiled from source). Now, whenever I use plot the y-axis and labels are black blotches while x-axis and labels are fine. Using demo(graphics) this occurs with plot/boxplot/hist/pairs/coplot but not in the pie graphs and in the "The level of Interest in R" plot, which uses axis to define the y-axis. I presume this has to
2005 Nov 24
1
residuals in logistic regression model
In the logistic regression model, there is no residual log (pi/(1-pi)) = beta_0 + beta_1*X_1 + ..... But glm model will return residuals What is that? How to understand this? Can we put some residual in the logistic regression model by replacing pi with pi' (the estimated pi)? log (pi'/(1-pi')) = beta_0 + beta_1*X_1 + .....+ ei Thanks! [[alternative HTML version deleted]]
2003 Jan 13
2
summarizing dataframe
Hi Listers, Surely, I just have a mental block and there is a more elegant way of creating a summary count (other than extracing it from ftable). I''d like to create a new data.frame containing counts of spell by loc ie have three columns showing spell,loc,count. Below the data.frame... Any help appreciated Thanks Herry spell loc 101 Parts 1 102 Overall 2 105 Parts 1 106
2007 May 18
1
error: GLX extension missing on server
Hi List, when loading library(rgl) I get error "RGL: GLX extension missing on server". I have Mesa and xgl installed, but xgl info sais its an highly experimental code. Does this mean I shouldn't bother for a while with opengl or are there alternatives? Any help appreciated Thanx Herry R 2.4.1 on x86_64 opensuse 10.2 Dr Alexander Herr - Herry Spatial and statistical analyst
2006 May 27
2
boosting - second posting
Hi I am using boosting for a classification and prediction problem. For some reason it is giving me an outcome that doesn't fall between 0 and 1 for the predictions. I have tried type="response" but it made no difference. Can anyone see what I am doing wrong? Screen output shown below: > boost.model <- gbm(as.factor(train$simNuance) ~ ., # formula +
2007 Sep 13
1
Problem using xtable on an array
Hi all I know about producing a minimal example to show my problem. But I'm having trouble producing a minimal example that displays this behaviour, so please bear with me to begin with. Observe: I create an array called model.mat. Some details on this: > str(model.mat) num [1:18, 1:4] -0.170 -0.304 -2.617 2.025 -1.610 ... - attr(*, "dimnames")=List of 2 ..$ : chr
2002 Dec 18
3
summary stats including NA's into new dataframe
List, I am trying to extract summary statistics from a data frame with several variables (and NAs) into a dataframe with the columns: Variablename (ie the colnames of original data), mean, stdev, max, min, Valid N, Missing Values. Extracting the statistics is straightforward using stack and aggregate. However, I haven''t succeeded in obtaining the number of Missing Values. I can extract
2006 Nov 24
2
plot() and Jpeg() increase font size and resolution
Dear list, I am having troubles increasing the fontize when plotting a variogram{gstat} and its model (vgm) with plot and using jpeg(). Also the resolution in the jpeg call does not work. I am using R2.4 on Mandriva 10.2 linux. I can change fontsize with cex.axis in a normal plot, so I presume it has to do with plotting the variogram model. Any help on how to increase the font size and
2006 Dec 18
2
surface3d grid from xyz dataframe
Hi List, I am trying to plot a grid with an overlayed height. I have a dataframe with four variables: x,y,gridvalue,height. The dataframe has 2.5mio observations (ie grid points), I assign colors through the gridvalue using map_color_gradient thus producing: x,y,gridvalue,height,gridcol as variables of the dataframe. The grid dimensions are 1253 x 2001 (=2507253 data points). My attempts with
2018 Mar 06
0
raster time series statistics
Hi Herry, This is probably due to a call to strptime (or similar). No, it doesn't accept %Y-%m as a valid format. Maybe add a constant day to all the dates as that will work: dt<-list(ID=seq(1:24),month=rep(formatC(1:12,flag=0,width=2),2), year=sort(rep(2016:2017,12))) timelst<-paste(unlist(dt['year']),unlist(dt['month']),"01",sep="-")
2007 Jul 06
3
?replace characters within vector data
Hi List, I want replace characters within a vector. Outside R I could use sed, but I'd like to automate it in R. For example vectorx xxxyyz xxxyyza xxxyyzzb I want to change to: vectorx aaayyz aaayyza aaayyzzb The obvious replace command only deals with whole data entries? Any hints would be appreciated. Thanks Herry
2007 Sep 19
4
fontsize in mosaic plot lables
Hi List, I am trying unsucessfully to modify the fontsize of lables in mosaic: require(vcd) mosaic(Titanic, pop=FALSE, labeling_args=list(rot_labels=c(bottom=90,top=90), set_varnames = c(Sex = "Gender"), gp_text=gpar(fontsize=20))) #can't get it to resize text tab <- ifelse(Titanic < 6, NA, Titanic) # it works for labeling_cells labeling_cells(text = tab,
2010 Jan 25
3
binary
Hi all Assume I have a data set xx; Group: 1=group1 ?, 2=group2 IQ: ?1= High, 0 =low fit <- glm(IQ ~group, data = xx, family = binomial()) summary(fit) Results ?????? ????????????Estimate Std. Error z value Pr(>|z|) (Intercept) -2.55456??? 0.210 -12.273? < 5e-16 *** group????????? 0.36180 ?????0.076?? 3.952 ????5.24e-05 *** the odd ratio = exp(0.36180 )= 1.435912 My question
2006 Oct 08
1
Simulate p-value in lme4
Dear r-helpers, Spencer Graves and Manual Morales proposed the following methods to simulate p-values in lme4: ************preliminary************ require(lme4) require(MASS) summary(glm(y ~ lbase*trt + lage + V4, family = poisson, data = epil), cor = FALSE) epil2 <- epil[epil$period == 1, ] epil2["period"] <- rep(0, 59); epil2["y"] <- epil2["base"]
2018 Mar 05
4
raster time series statistics
Hi List, The following code returns an "Error in as.POSIXlt.character(x, tz, ...) : character string is not in a standard unambiguous format" require(raster) require(rts) require(stringi) r <- raster(ncol=100, nrow=100) values(r) <- runif(ncell(r)) list(ID=seq(1:24),month=rep(str_pad(1:12, pad = 0,width = 2 , "left"),2),year=sort(rep(2016:2017,12)))->dt
2006 Aug 17
1
Simulate p-value in lme4
Dear list, This is more of a stats question than an R question per se. First, I realize there has been a lot of discussion about the problems with estimating P-values from F-ratios for mixed-effects models in lme4. Using mcmcsamp() seems like a great alternative for evaluating the significance of individual coefficients, but not for groups of coefficients as might occur in an experimental design