<font face="trebuchet ms,sans-serif">Então é só escrever a função logística, conforme se queira, e determinar essas probabilidades e simular. Um ponto de partida pode ser esse<br><br><span style="font-family:courier new,monospace">logis <- function(x, A, B) 1/(1+exp(-(A+B*x)))</span><br style="font-family:courier new,monospace">
<span style="font-family:courier new,monospace">curve(logis(x, 1, 1), -9, 4)</span><br style="font-family:courier new,monospace"><span style="font-family:courier new,monospace">curve(logis(x, 2.3, 1), add=TRUE)</span><br style="font-family:courier new,monospace">
<span style="font-family:courier new,monospace">curve(logis(x, 3.6, 1), add=TRUE)</span><br style="font-family:courier new,monospace"><span style="font-family:courier new,monospace">x <- -2</span><br style="font-family:courier new,monospace">
<span style="font-family:courier new,monospace">px <- logis(-2, c(1,2.3,3.6), 1)</span><br style="font-family:courier new,monospace"><span style="font-family:courier new,monospace">abline(v=x, h=px, lty=3)</span><br style="font-family:courier new,monospace">
<span style="font-family:courier new,monospace">probs <- diff(c(0,px,1))</span><br style="font-family:courier new,monospace"><span style="font-family:courier new,monospace">probs</span><br style="font-family:courier new,monospace">
<span style="font-family:courier new,monospace">sum(probs)</span><br style="font-family:courier new,monospace"><span style="font-family:courier new,monospace">amostr <- sample(1:4, size=1000, prob=probs, replace=TRUE)</span><br style="font-family:courier new,monospace">
<span style="font-family:courier new,monospace">prop.table(table(amostr))</span><br style="font-family:courier new,monospace"><br>À disposição.<br>Walmes.<br><br clear="all"></font><span style="font-family:trebuchet ms,sans-serif">==========================================================================</span><br style="font-family:trebuchet ms,sans-serif">
<span style="font-family:trebuchet ms,sans-serif">Walmes Marques Zeviani</span><br style="font-family:trebuchet ms,sans-serif"><span style="font-family:trebuchet ms,sans-serif">LEG (Laboratório de Estatística e Geoinformação, 25.450418 S, 49.231759 W)</span><br style="font-family:trebuchet ms,sans-serif">
<span style="font-family:trebuchet ms,sans-serif">Departamento de Estatística - Universidade Federal do Paraná</span><br style="font-family:trebuchet ms,sans-serif"><span style="font-family:trebuchet ms,sans-serif">fone: (+55) 41 3361 3573</span><br style="font-family:trebuchet ms,sans-serif">
<span style="font-family:trebuchet ms,sans-serif">VoIP: (3361 3600) 1053 1173</span><br style="font-family:trebuchet ms,sans-serif"><span style="font-family:trebuchet ms,sans-serif">e-mail: <a href="mailto:walmes@ufpr.br" target="_blank">walmes@ufpr.br</a></span><br style="font-family:trebuchet ms,sans-serif">
<span style="font-family:trebuchet ms,sans-serif">twitter: @walmeszeviani</span><br style="font-family:trebuchet ms,sans-serif"><span style="font-family:trebuchet ms,sans-serif">homepage: <a href="http://www.leg.ufpr.br/%7Ewalmes" target="_blank">http://www.leg.ufpr.br/~walmes</a></span><br style="font-family:trebuchet ms,sans-serif">
<span style="font-family:trebuchet ms,sans-serif">linux user number: 531218</span><br style="font-family:trebuchet ms,sans-serif"><span style="font-family:trebuchet ms,sans-serif">==========================================================================</span><br>