search for: newdt

Displaying 4 results from an estimated 4 matches for "newdt".

Did you mean: newldt
2010 Sep 06
1
Prediction and confidence intervals from predict.drc
...aset, I am not getting the requested confidence or prediction intervals. Any idea what is going on? Here is code to reproduce the problem: --- library(drc) # Fit model to existing dataset in package spinach.model <- drm(SLOPE~DOSE, data = spinach, fct = LL.4()) #Generate new fake dataset newdt <- data.frame(matrix(c(seq(0, 150, 0.1), rep(NA, 1501)), ncol=2, byrow=F)) colnames(newdt) <- c('DOSE', 'SLOPE') #Use predict function to get prediction and confidence intervals pred <- predict(spinach.model, interval='prediction', newdata=newdt) conf <- predic...
2010 Nov 28
1
predict.drm not generating confidence intervals
...nction and I am submitting reproducible code hoping that somebody can help me figure out what is going on. -------- library(drc) # Fit a 4 parameter logistic model to ryegrass dataset fit <- drm(rootl ~ conc, data = ryegrass, fct = LL.4()) summary(fit) # Generate a fake dataset for prediction newdt <- data.frame( matrix(c(seq(0.2, 9, 0.01), rep(NA,881)), ncol=2)) colnames(newdt) <- c('rootl', 'conc') # Generate prediction intervals and confidence intervals prd.p <- predict(fit, newdata=newdt, interval='prediction') prd.c <- predict(fit, newdata=newdt, int...
2009 May 07
1
data transformation using gamma
...1 12 > dim(bhall) [1]  1 12 > trans_dt <- function(dt,a,b) + { n1 <- ncol(dt) +   n2 <- length(dt) +   trans  <- vector(mode='numeric', length=n2) +   dim(trans) <- dim(dt) +   for (i in 1:n1) +   {  dt[,i] <- as.vector(dt[,i]) +      trans[,i] <- transform(dti,newdt=pgamma(dti,shape= a[1,i],scale=b[1,i])) } +   trans + } > trans_dt(dp1,ahall,bhall) Error in transform(dti, newdt = pgamma(dti, shape = a[1, i], scale = b[1,  :   object "dti" not found and also try trans_dt <- function(dt,a,b) { n1 <- ncol(dt)   n2 <- length(dt)   trans ...
2009 May 01
0
need help - small code
....4   8.2  46.6  49.6  84.2  68.2  48.6 160.6  31.6  94.8  62.6  67.6   I try to write this code and try run it but got error message:   trans_dt <- function(dt,a,b) { trans  <- vector(length=12, mode="numeric")   n <- ncol(dt)   for (i in 1:n)   {  trans[i] <- transform(dt[,i],newdt=pgamma(dt[,i],shape= a[1,i],scale=b[1,i])) }   trans }   > trans_dt(dp1,ahall,bhall) Error in pgamma(dt[, i], shape = a[1, i], scale = b[1, i]) :   object "i" not found   Here are the output that I want:      X_data      newdt 1    49.7 0.68457469 2    21.8 0.41338124 3     5.6 0.141...