I am looking for a fixed point x when f(x)=x of a function, ofcourse numerically, but I have no idea how to solve it with R, I am trying with fsolve with following code, but possibly its not the right way to write this...I am not getting anything...Many thanks in advance
library(pracma)
p<- c(x=0.1, y=0.1)
f1 <- function(p) {
expPfLeft<- (160*p[1]) + ((1-p[1])*200)
expPfRight<- (10*p[1])+ ((1-p[1])*370)
expPfTop <- (200*p[2]) + ((1-p[2])*160)
expPfBottom <- (370*p[2]) + ((1-p[2])*10)
return(c (exp(2*expPfLeft)/((exp(2*expPfLeft)+exp(2*expPfRight))) ,
exp(2*expPfTop)/((exp(2*expPfTop))+(exp(2*expPfBottom))) ) )
}
fsolve(f1,p)
