Displaying 5 results from an estimated 5 matches for "wgts".
Did you mean:
gts
2005 Oct 19
2
Automatic rounding of values after factors , converted to numeric, are multipled by a real number
I am wondering if someone would have any suggestion about my issue?
I have the following code:
wgts<-aggregate(subset(lendata,select=c(Length)),list(lendata$Cruise,len
data$Station,lendata$Region,lendata$Total),mean)
wgts<-wgts[order(wgts$Group.3,wgts$Group.1,wgts$Group.1),]
names(wgts)<-c("Cruise","Station","Region","Total","MLen")
wgts$...
2008 Mar 30
1
Second & subsequent calls to function fails. Please help debug.
...r3)
tukey.nonadd.test(ov.lm)
@
At that point I ran debug() on the call:
debug(tukey.nonadd.test)
tukey.nonadd.test(ov.lm)
debugging in: tukey.nonadd.test(ov.lm1)
debug: {
envir <- environment(formula(m))
dd <- eval(m$call$data, envir)
subs <- eval(m$call$subset, envir)
wgts <- eval(m$call$weights, envir)
naa <- m$call$na.action
dd <- data.frame(dd, preds.sq = predict(m, dd)^2)
uf <- update.formula(formula(m$terms), ~. + preds.sq)
environment(uf) <- environment(NULL)
mup <- if (is.null(naa))
lm(uf, data = dd, subset =...
2005 Sep 21
2
Help on optim
...or equal to 1 c) Sum of the weights should be equal to 1.
Now after googling around a bit & trying my hands at RSiteSearch , I
found that I can use optim with L-BFGS-B method and could possible use
lower bound and upper bound for constraint, however I am clueless as
to how I can impose the sum(wgts) = 1 condition. In excel solver, this
problem is extremely simple since it's just a matter of setting an
additional constraint of setting the summation cell to 1.
Your kind help is greatly appreciated.
Best Regards
Manoj
2006 Apr 19
1
Trouble with glm() .... non-integer #successes in a binomial glm
...data=dat, family=binomial, weights=
dat$hy.wgt.s, subset=(dat$haspdat0!=3) )
I get the message:
Warning message:
non-integer #successes in a binomial glm! in: eval(expr, envir, enclos)
Does anyone know what this means?? The data for this command is listed
below.
Thanks,
Phil Smith
CDC
dat.hy.wgts.s
Here is my data:
> table( dat$haspdata )
0 1
21890 9097
> is.integer( dat$haspdata )
[1] TRUE
dat$hy.wgt.s
> summary( dat$hy.wgt.s)
Min. 1st Qu. Median Mean 3rd Qu. Max.
0.003374 0.657700 0.874200 1.000000 1.204000 8.557000
dat$haspdat0
> table(dat$hasp...
2008 Dec 19
2
How do I generate one vector for every row of a data frame?
I am trying to generate a set of data points from a Gaussian mixture
model. My mixture model is represented by a data frame that looks
like this:
> gmm
weight mean sd
1 0.3 0 1.0
2 0.2 -2 0.5
3 0.4 4 0.7
4 0.1 5 0.3
I have written the following function that generates the appropriate data:
gmm_data <- function(n, gmm) {
c(rnorm(n*gmm[1,]$weight, gmm[1,]$mean,