eyefun: GUI to Minipulate Non Linear Regression Models With Sliders

Description Usage Arguments Value Author(s) Examples

View source: R/eyefun.R

Description

This function creates a GUI to manipulate parameters of a model with sliders. It is useful to get insight of a model.

Usage

1
eyefun(model, start, dots = NULL)

Arguments

model

a formula with, at least, the right hand side.

start

a list in many elements as number of parameters in model. Each list element must have a parameter name. All elements must be numeric vector of length 2 or 3 (from, init and to) used to create the sliders with rpanel.

dots

a named list with arguments passed to the curve().

Value

A GUI with one slider for each parameter in model to manipulate the curve of the model.

Author(s)

Walmes Zeviani, walmes@ufpr.br, based on suggestion in the R-br mailing list (Brazil), [R-br] transferir modelo da função nls para a função curve() automaticamente.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
## Not run: 

library(rpanel)

model <- y ~ A/(1 + exp(-(x - M)/S))
start <- list(A = c(2, 5),
              M = c(0, 5),
              S = c(-1, 0.5, 1))
eyefun(model, start,
       dots = list(lwd = 2, col = "blue",
                   from = 0, to = 10,
                   ylim = c(0, 5),
                   xlab = "Age", ylab = "Weight",
                   main = expression(alpha/(1 + exp(-(x - M)/S)))))


## End(Not run)

walmes/wzRfun documentation built on Aug. 10, 2021, 2:19 p.m.