6
Good afternoon collaborators. I am having difficulty estimating a parameter via R programming to complete my processing routine. The equation I am using is the one described below, where I have all the values, except the value of the variable k
razao2 = (razao1)^((idade2/idade)^k)
where, I have the vectors
razao2<-c(1.0331279, 1.0416188, 1.0167619, 0.0000000, 0.9638364, 0.9668588)
razao1<-c(1.0151796, 1.0331279, 1.0416188, 1.0167619, 0.9822768, 0.9638364)
idade<-c(2.580833, 3.594167, 4.608333, 2.580833, 3.594167, 4.608333)
idade2<-c(3.594167, 4.608333, 5.625000, 3.594167, 4.608333, 5.625000)
razao1[1]
is the respective razao2[1]
, respective to idade[1]
and the idade2[1]
therefore for each position i
of the vectors, I will have a calculated value of k
that promotes equality
I tried to do the following way, but I did not succeed, I have difficulties in creating a logic q isole k to be estimated, or that from some other means promote estimates of a value k to home combinations of values of a given position i
of vectors
kcalculado <- function(razao1, idade2, idade, k){
razao2 <- razao1^((idade2/idade)^(k))
razao2
}
optimise(kcalculado, razao2)
thanks in advance for the help