[R] Implent the function vglm in C++

2011-09-05 Thread Quentin
Hi,

I'm working on multiple logistic regression. I used the function vglm
(Package VGAM) in R. Now, i'd like to implent this function (vglm) in C++. 
Could someone help me or send me the algorithm.

Thanks in advance,

Quentin
 

--
View this message in context: 
http://r.789695.n4.nabble.com/Implent-the-function-vglm-in-C-tp3790813p3790813.html
Sent from the R help mailing list archive at Nabble.com.

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] SPOT package non-conformable arrays

2014-04-30 Thread Quentin Delivré
Hello everyone
I'm relatively new in R coding and I have a problem using the function 
forrBuilder, from SPOT package.
> fitC <- forrBuilder(xe, ye, 1e-3, 1e2, "optim-L-BFGS-B" , 100,0,1,FALSE)
Error in x - matrix(rep(xmin, s), nrow = s, byrow = TRUE) : 
  non-conformable arrays
> traceback()
2: spotNormalizeMatrix(fit$X, ymin, ymax, lb, ub)
1: forrBuilder(xe, ye, 0.001, 100, "optim-L-BFGS-B", 100, 0, 1, 
   FALSE)

this function works well when my data (xe) are in 1D, but now i'm trying in 2D 
and i meet a problem which according to traceback() comes from the function 
spotNormalizeMatrix. So I tried with the same data and used 
spotNormalizeMatrix, and that s works fine (cf below). I dont understand 
because i looked into the function forrBuilder &  spotNormalizeMatrix, and they 
should be able to manage 2D... Did anyone have an idea about this issue?
Thanks in advance
> xe
 [,1] [,2]
[1,]  0.1  0.1
[2,]  0.5  0.5
[3,]  0.9  0.1
[4,]  0.1  0.9
[5,]  0.9  0.9
> a=spotNormalizeMatrix(xe, 0, 1, xmin = NULL, xmax = NULL) 
> a
$y
 [,1] [,2]
[1,]  0.0  0.0
[2,]  0.5  0.5
[3,]  1.0  0.0
[4,]  0.0  1.0
[5,]  1.0  1.0

$xmin
[1] 0.1 0.1

$xmax
[1] 0.9 0.9



  
[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.