search for: maxcl

Displaying 3 results from an estimated 3 matches for "maxcl".

Did you mean: maxcol
2006 Apr 25
4
Help needed
...macro to R. here is my code. I get an error at the last line. attach(fram) dset1<-cbind(AGE,BMI,DEATH) > BMIGRP<-cut(BMI,breaks=3,right=TRUE) > AGEGRP<-floor(AGE/10)-2 > dset<-cbind(AGEGRP,BMIGRP,DEATH) > maxage<-max(dset[,1]) > minage<-min(dset[,1]) > #maxcls<-dset[,2] > #mincls<-dset[,2] > nage<-maxage-minage+1 > nclass<-maxcls-mincls+1 > nsub<-nrow(dset) > weight <- matrix(,nage,1) > for ( i in minage:maxage ) + {weight[i-minage+1,1] = sum(std = i)} > > atrisk = matrix(,nclass,nage) > wevents = matr...
2006 Apr 17
7
help
Hi, I am trying to runn a age-period-cohort model, but here is what I am having problem with, hope you can help me! This is what I am trying to do: sumzero_a<-((A-min(A))/5+1) - mean((A-min(A))/5+1) where A is my age variable (numeric, the mid-point of a five-year age group), but I got the following error: Error in min(..., na.rm = na.rm) : invalid 'mode' of argument I am pretty
2010 Jun 17
0
Modifyiing R working matrix within "gee" source code
...scale.fix <- mm$scale.value <- mm$id <- NULL mm[[1]] <- as.name("glm") beta <- eval(mm, parent.frame())$coef print(beta) beta <- as.numeric(beta) } if (length(id) != length(y)) stop("Id and y not same length") maxclsz <- as.integer(max(unlist(lapply(split(id, id), "length")))) maxiter <- as.integer(maxiter) silent <- as.integer(silent) if (length(offset) <= 1) offset <- rep(0, length(y)) if (length(offset) != length(y)) stop("offset and y not same l...