similar to: using sampling weights in glm

Displaying 20 results from an estimated 10000 matches similar to: "using sampling weights in glm"

2008 Aug 06
1
Warning when using survey:::svyglm
Howdy, Referencing the below exchange: https://stat.ethz.ch/pipermail/r-help/2006-April/103862.html I am still getting the same warning ("non-integer #successes in a binomial glm!") when using svyglm:::survey. Using the API data: library(survey) data(api) #stratified sample dstrat<-svydesign(id=~1,strata=~stype, weights=~pw, data=apistrat, fpc=~fpc)
2008 Aug 19
4
converting coordinates from utm to longitude / latitude
Hi, is there a function in R to convert data read with read.shape and which is originally in UTM coordinates into longitude / latitude coordinates? I found the convUL() function from the PBSmapping package but I have no idea how I could apply that to the read.shape object. Many thanks, Werner __________________________________________________ Do sragenden Schutz gegen Massenmails.
2006 Apr 05
5
List to Array
Hi, this is probably the easiest thing to do but I manage not finding the answer: I have a list with matrices of exact same format and headers. Now I would like to transform the list into an normal array. What is the proper way to do this? as.array changes the entire format and right now I only found the method of creating a new array, going through the entire list and copy the matrix in each
2006 May 12
3
optimal way to compute matrix subtotals?
Hi! I have large matrices, one column per variable and I have a vector of factors / grouping symbols. Then I am computing subtotals for the groups but it takes pretty long and thus I wanted to ask if there is a better way to do it or if this is already the best way: subTotals <- function(x, groupvec) do.call("rbind",lapply(split(x,groupvec),colSums,na.rm=T)) Thanks reading my
2006 Jan 10
5
matching country name tables from different sources
Hi, Before I reinvent the wheel I wanted to kindly ask you for your opinion if there is a simple way to do it. I want to merge a larger number of tables from different data sources in R and the matching criterium are country names. The tables are of different size and sometimes the country names do differ slightly. Has anyone done this or any recommendation on what commands I
2010 May 11
1
(svy)glm and weights question
Hi all, I am running a set of logistic regressions, where we want to use some weights, and I am not sure whether what I am doing is reasonable or not. The dependent variable is turnout in an election - i.e. survey respondents were asked whether or not they voted. The percentage of those who say they voted is much higher than the actual turnout, probably due both to non-response bias and social
2008 Jul 27
4
Object-oriented programming in R for Java programmers?
Hi, I was wondering if anybody might have a reference for me: My R code is growing and getting more and more confusing. Thus, I figure it's time to switch to object-oriented again. I have done oo programming in C++ and Java before but the first few tutorial on R oo were a bit confusing for me. Is there any brief tutorial on oo programming in R especially for people who have done oo in Java
2011 Jan 28
2
help with S4 objects: trying to use a "link-glm" as a class in an object definition
Hi, I'm trying to make a new S4 object with a slot for a "link-glm" object. R doesn't like me have a slot of class "link-glm" > class(make.link("probit")) [1] "link-glm" > setClass("a",representation(item="link-glm")) [1] "a" Warning message: undefined slot classes in definition of "a": item(class
2012 Jun 01
1
Stratified Sampling with randomForest Regression
Hi All, I'm using R's randomForest package (and it's quite awesome!) but I'd really like to do some stratified sampling with a regression problem. However, it appears that the package was designed to only accommodate stratified sampling for classification purposes (see https://stat.ethz.ch/pipermail/r-help/2006-November/117477.html). As Andy suggests in the link just
2010 Dec 30
1
Different results in glm() probit model using vector vs. two-column matrix response
Hi - I am fitting a probit model using glm(), and the deviance and residual degrees of freedom are different depending on whether I use a binary response vector of length 80 or a two-column matrix response (10 rows) with the number of success and failures in each column. I would think that these would be just two different ways of specifying the same model, but this does not appear to be the case.
2006 Nov 30
2
AIC for heckit
Hi, I have used the heckit function in micEcon. Now I would like to evaluate the fit of the probit part of the model but when I enter AIC(sk$probit) I get this error Error in logLik(object) : no applicable method for "logLik" How can I then get the AIC for this model? Side question: If you know - from the top of your head - some link to readings dealing with evaluating the
2008 Feb 21
2
column name handling and long labels
Hi, I have two loosely related questions which could make my live again a bit easier: 1) Is there a simple way to select a range of columns in a data frame using column names? I am thinking of something like mydf[1,"col4":"col8"] 2) I have a data frame with many columns and they all have short variable names which is good in most cases but sometimes it would be nice to have
2008 Feb 26
2
Custom LaTeX tables
Hello, I am very happy that I have Sweave and R to write my papers. But I still have to do some tables by hand since I have not found out how I can customize the latex tables produced by R further (I mainly use xtable()). Like for instance, I have a table which needs an extra row every few rows as a group header and sometimes I want some extra horizontal lines in the table and also a multicolumn
2005 Oct 10
1
Question about Survey Package
To whom it may concern, I have a question referring to the calculation of variance estimation of the survey package I need to estimate the variance for different Domains but for a stratified sampling desing in several stages. Särndal et al (1992), CAP 10, makes reference to this problem. My question is if it is possible by means of "survey package" to obtain these
2009 Mar 02
4
portable R editor
Hi, I have been dreaming about a complete R environment on my USB stick for a long time. Now I finally want to realize it but what I am missing is a good, portable editor for R which has tabs and syntax highlighting, can execute code, has bookmarks and a little project file management facility pretty much like Tinn-R has those. I like Tinn-R but it seems like there is only a very old version of
2006 Apr 21
4
Considering port of SAS application to R
Hi there! I am considering to port a SAS application to R and I would like to hear your opinion if you think this is possible and worthwhile. SAS is mainly used to do data management and then to do some aggregations and simple computations on the data and to output a modified data set. The main problem I see is the size of the data file. As I have no access to SAS yet I cannot give real details
2011 Feb 27
1
stata.get labels glm()
Dear R community, I would like to import data saved with Stata and then run a Probit model using R. My data comes from the World Values Surveys and in the Probit model I want to control for countries. So far I figured out that I should put "convert.factors = FALSE" when using stata.get() in order to import numeric values instead of label mappings, which is what I want for most of the
2013 Jan 10
1
SRS, Stratified, and Cluster sampling
Hi, Has anyone done (or know of) any nice R activities that help introductory students ( and teachers :) ) better understand the concepts of simple vs stratified vs cluster sampling? Any links? David -- View this message in context: http://r.789695.n4.nabble.com/SRS-Stratified-and-Cluster-sampling-tp4655099.html Sent from the R help mailing list archive at Nabble.com.
2014 Nov 14
3
Cómo aplicar weights a las observaciones en un GLM binomial
Gracias por la ayuda Jose Luis. pero o no te he entendido bien o mi duda es tan sencilla que no me he explicado. SI yo tampoco he entendido mal tu explicación, mi problema es cómo obtengo ese "tus.pesos" para introducir, por ejemplo, en la función: library(survey) # objeto del diseño muestral ddatos <- svydesign(id=~1, weights =~ tus.pesos, data = tus.datos) # en caso de una reg
2006 Dec 05
1
summaryBy(): Is it the best option?
Hi, since I have quite large tables and the processing takes quite a while I am curious if I can improve the performance of this aggregation somehow: At the moment I am using summaryBy from the doBy package under R 2.4.0, Win2K. summaryBy(soc_s6aq5 + soc_s6aq7 + soc_s6aq9 + soc_s6aq11 ~ hh + comgroup,soc6a,postfix=c("","","",""),FUN=sum, na.rm=T) The