Displaying 2 results from an estimated 2 matches for "calc_dv_pr".
Did you mean:
calc_dv_pred
2011 Mar 30
3
optim and optimize are not finding the right parameter
Dear all,
I have a function that predicts DV based on one predictor pred:
pred<-c(0,3000000,7800000,15600000,23400000,131200000)
DV<-c(0,500,1000,1400,1700,1900)
## I define Function 1 that computes the predicted value based on pred
values and parameters a and b:
calc_DV_pred <- function(a,b) {
DV_pred <- rep(0,(length(pred)))
for(i in 1:length(DV_pred)){
DV_pred[i] <- a * (1- exp( (0-b)*pred[i] ))
}
return(DV_pred)
}
## I define Function 2 that computes the sum of squared deviations for
predicted DV from actual DV:
my.function <- function(param){...
2011 Mar 07
1
More appropriate optimization routine?
Hello!
I have 2 variables - predictor "pred" and response variable "DV":
pred<-c(439635.053, 222925.718, 668434.755, 194242.330, 5786.321, 115537.344,
100835.368, 7133.206, 159058.286, 4079991.629, 3380078.060, 2661279.136,
2698324.478, 1245213.965, 1901815.503, 1517019.451, 1396857.736, 1034030.988,
432249.574, 342329.325, 1831335.792, 2209578.859, 1641709.754,