search for: corstr

Displaying 20 results from an estimated 70 matches for "corstr".

2009 Feb 09
1
gee with auto-regressive correlation structure (AR-M)
...#### library(gee) library(geepack) # I SIMULATE DATA FROM POISSON DISTRIBUTION, 10 OBS FOR EACH OF 50 GROUPS set.seed(1) y <- rpois(500,50) x <- rnorm(500) id <- rep(1:50,each=10) # EXAMPLES FOR EXCHANGEABLE AND AR(1) CORRELATION STRUCTURES model1 <- gee(y ~ x, family=poisson(),id=id, corstr="exchangeable") model2 <- gee(y ~ x, family=poisson(),id=id, corstr="AR-M") # NOW 50 OBS FOR EACH OF 10 GROUPS id2 <- rep(1:10,each=50) model3 <- gee(y ~ x, family=poisson(),id=id2, corstr="exchangeable") model4 <- gee(y ~ x, family=poisson(),id=id2, corst...
2007 Sep 05
1
Running geeglm unstructured corstr
? stato filtrato un testo allegato il cui set di caratteri non era indicato... Nome: non disponibile Url: https://stat.ethz.ch/pipermail/r-help/attachments/20070905/6d1002c1/attachment.pl
2000 Mar 18
1
Corstr in the Gee (Generalized Estimation Equation) arguments?
Dear all: Y=a+bX1+cX2 In the Gee (Generalized Estimation Equation) arguments: The arument Corstr has sveral choices: "independence" "fixed" "stat_M_dep" "non_stat_M_dep" "exchangeable" "AR-M" "unstructured" What does each term mean? How do I choose among them? How do I know the correlation structure...
2008 Sep 07
1
an error to call 'gee' function in R
...940 3 28 5 1.06299869 3 8 6 1.47615784 3 24 7 0.83748390 3 9 8 1.67011313 3 16 9 -0.14181264 3 7 10 2.56751453 3 40 ........................... My data 'y' comes from x. So their correlations are not independent. What does the argument 'corstr' mean it defined in the function. I tried all choices. But the error was still there. Here was the function I used in my programming: mfit1 <- gee(y~x,data=newdata,family=poisson(link="log"),id=id,corstr="exchangeable") GEE: GENERALIZED LINEAR MODELS FOR DEPENDENT...
2010 Jun 17
0
Modifyiing R working matrix within "gee" source code
...might have something within .C("Cgee",but don't understand it well enough to know. Can you anyone help? /*gee source code*/ function (formula = formula(data), id = id, data = parent.frame(), subset, na.action, R = NULL, b = NULL, tol = 0.001, maxiter = 25, family = gaussian, corstr = "independence", Mv = 1, silent = TRUE, contrasts = NULL, scale.fix = FALSE, scale.value = 1, v4.4compat = FALSE) { message("Beginning Cgee S-function, @(#) geeformula.q 4.13 98/01/27") call <- match.call() m <- match.call(expand = FALSE) m$R <- m$b...
2008 Dec 08
0
gee niggles
..."fixed" working correlation matrix stored in integer mode crashes R. To illustrate, generate some data: df <- data.frame(i = rep(1:5, each = 5), j = rep(1:5, 5), y = rep(rnorm(5), each = 5) + rnorm(25)) An AR(1) model fits fine to the full data: require(gee) gee(y ~ 1, id = i, df, corstr = "AR-M", Mv = 1) So also when some subjects have fewer observations than others: gee(y ~ 1, id = i, df, subset = j <= i + 1, corstr = "AR-M", Mv = 1) (1) However, when any subject (in this case, the first) has only 1 observation, gee bails out: gee(y ~ 1, id = i, df, sub...
2010 Apr 29
1
Generalized Estimating Equation (GEE): Why is Link = Identity?
Hi, I'm running GEE using geepack. I set corstr = "ar1" as below: > m.ar <- geeglm(L ~ O + A, + data = firstgrouptxt, id = id, + family = binomial, corstr = "ar1") > summary(m.ar) Call: geeglm(formula = L ~ O + A, family = binomial, data = firstgrouptxt, id = id, corstr = &qu...
2012 Aug 29
1
spatial correlation in lme and huge correlation matrix (memory limit)
...tructure (with range=200 and nugget.effet of 0.3) in a lme model of this form: lme(ARBUS~YEAR, random=~1|IDSOUS). The structure of the data is "IDSOUS" "XMIN" "YMAX" "YEAR" "ARBUS" with 2 years of data and 5600 points for each year. I do: corstr<-corExp(value=200, form=~XMIN+YMAX|YEAR, nugget=0.3) with |year to calculate correlation of IDSOUS(plot) only within the same year since their positions did not change between the 2 years. Then I try to initialize the corExp vector: > corstr<-Initialize(corstr, data=cover) Erreur : imp...
2004 Dec 29
0
GEE with own link function
...anna Brandt (I'm using R 2.0.1 under Windows 2000) ## Example for geese() from the R-Help ##################### I took the example from the help: > data(ohio) > summary(geese(resp ~ age + smoke + age:smoke, id=id, data=ohio, + family=binomial(link="logit"), corstr="exch", scale.fix=TRUE)) Call: geese(formula = resp ~ age + smoke + age:smoke, id = id, data = ohio, family = binomial(link = "logit"), scale.fix = TRUE, corstr = "exch") Mean Model: Mean Link: logit Variance to Mean Relation: binomial...
2011 Aug 29
1
defining "id" argument in geeglm
..."continuous forest sites" and four of those being "secondary forest sites". The aim is to compare continuous and secondary forests. Would you define the sites or the forest type as id argument: model1<-geeglm(formula = number ~ type + month, family = poisson, *id = site *, corstr = "ar1") model2<-geeglm(formula = number ~ type + month, family = poisson, *id = type *, corstr = "ar1") or should even almost every count have a special id (e.g. * id=interaction(month,site)* or *id=interaction(month,type*)) Thanks for your help... Anna [[alternative HT...
2003 May 11
2
gee
...robust standard errors for a logit model. My dataset (zol) has 195019 observations; winner, racebl, raceas, racehi are all binary variables. ID is saved as a vector of length 195019 with alternating 0's and 1's. I get the following error message. I also tried the same command with corstr set to "independence" and got the same error message. > ID <- as.vector(array(0, nrow(zol))) > k <- seq(2, nrow(zol), 2) > ID[k] <- 1 > fm <- gee(winner ~ racebl + racehi + raceas, id = ID, data = zol, family = binomial(logit), corstr = "exchangeable&qu...
2009 Apr 22
1
Gee with nested desgin
...s 72. Hence we would expect 2 * 24 * 72 = 3456 data points. A few are missing, so we end up wih 3431 data points. This is what I have tried until now. #assuming independence between trees and thus ignoring the plot level. library(geepack) geeglm(formula = Y ~ Year, id = TreeID, family = binomial, corstr = "exchangeable") #using waves. But I'm wondering if this is correct. library(geepack) geeglm(formula = Y ~ Year, id = PlotID, waves = TreeID, family = binomial, corstr = "exchangeable") #using a unstructured correlation on the plot level. geeglm with unstructured correlat...
2011 Jul 18
1
Missing values and geeglm
...move the missing values then run the model, there is no problem. #remove missing values data<-subset(DataMiss, !is.na(outcome) & !is.na(predictor) & !is.na(confounder)) #run the model model<-geeglm(outcome~predictor+confounder, family=binomial(link = "logit"), data=data, corstr='ar1', id=id, std.err="san.se") However, I don't always want to have to run this extra step. The R instructions seem to indicate that na.omit should work, as shown below model<-geeglm(outcome~predictor+confounder, family=binomial(link = "logit"), data=na.omit(D...
2011 Mar 23
0
p and wald values intra-groups geeglm: geepack
*H*i, I am trying to fit a GEE model with *geeglm* function. The model is the following: Modelo<-geeglm(sqrt ~Tra+ Mes, id=Lugar , data=datos, family=gaussian(identity), corstr="independence") *Tra( is a experimental treatment, 2 levels)*, *Mes* (is the month of take data, 4 levels) and *Lugar* (is the site of study, 3 levels) are categorical variables and *sqrt* (sqrt of Total Carbon on soil) it's a continuous variable. I want to know if *sqrt* can be to e...
2008 Sep 09
2
naive variance in GEE
...slightly different from the naive SE from GEE under independence working correlation structure. Shouldn't they be identical? Anyone has insight about this? Thanks, Qiong a<-rbinom(1000,1) b<-rbinom(1000,2,0.1) c<-rbinom(1000,10,0.5) summary(gee(a~b, id=c,family="binomial",corstr="independence"))$coef summary(glm(a~b,family="binomial"))
2010 Jun 22
1
Generalised Estimating Equations on approx normal outcome with limited range
...to assess whether the measures are related to certain covariates, and I have tried the generalised estimating equation function geeglm (library geepack) with the 'gaussian' family details like so: geeout <- geeglm(outcome ~ covariate1 + covariate2, id=familyID, family=gaussian, data=dat, corstr="unstructured") But I'm thinking that the limited range of the outcome violates the assumption of normality and that the results could be off. Q: Is there a way in R, either in geeglm or another appropriate function, to take the limited range of the outcome into account? Another aim...
2008 Oct 29
2
call works with gee and yags, but not geepack
...ta at the bottom of this email. It can be read in by highlighting the data and then using this command: dat <- read.table("clipboard", header = TRUE,sep="\t") I can obtain solutions with both of these: library(gee) fit.gee<-gee(score ~ chem + time, id=id, family=gaussian,corstr="exchangeable",data=dat) and library(yags) fit.yags <- yags(score ~ chem + time, id=id, family=gaussian,corstr="exchangeable",data=dat,alphainit=0.05) However, I am making a mistake with: library(geepack) fit.geese <- geese(score ~ chem + time, id=id, family=gaussian,c...
2011 Apr 07
1
Quasipoisson with geeglm
...owever, only 326 observations are available (instead of 1254). For the time being, I ignore the large number of missing values, and the fact that GEE is only valid under MCAR. When I run the following code geeglm(SumOfButterflies ~ RES_YEAR, family = poisson, data = ManijurtNoNA, id = RES_ROTE_ID, corstr = "ar1") I obtain "normal" output. Not surprisingly, overdispersion is present (Estimated Scale Parameters: [1] 185.8571), so changing to quasipoisson is needed. However, the code below geeglm(SumOfButterflies ~ RES_YEAR, family = quasipoisson, data = ManijurtNoNA, id = RES_R...
2003 Oct 24
1
gee and geepack: different results?
...9 1998 1999 1998 1999 1998 1999 1998 ... $ eta : int 12 11 10 9 11 10 11 10 14 13 ... $ VCRE : num 5.3 6.9 11 9.9 7.9 9.2 14.2 11.9 10.5 10 ... $ temp : num 19.7 20.0 19.7 20.0 19.7 ... > mio1.2<- gee(VCRE ~ TR + STAT + temp + eta, id = PIANTA, + + data = dati22, family = Gamma, corstr = "AR-M", Mv = 1) > summary(mio1.2) GEE: GENERALIZED LINEAR MODELS FOR DEPENDENT DATA gee S-function, version 4.13 modified 98/01/27 (1998) Model: Link: Reciprocal Variance to Mean Relation: Gamma Correlation Structure: AR-M , M = 1 Call: gee(formula...
2010 Jun 08
1
GEE: estimate of predictor with high time dependency
Hi, I'm analyzing my data using GEE, which looks like below: > interact <- geeglm(L ~ O + A + O:A, + data = data1, id = id, + family = binomial, corstr = "ar1") > summary(interact) Call: geeglm(formula = lateral ~ ontask + attachment + ontask:attachment, family = binomial, data = firstgroupnowalking, id = id, corstr = "ar1") Coefficients: Estimate Std.err Wald Pr(>|W|) (Intercept) -1.89...