Re: [R-pkg-devel] [Error] data length differs from size of matrix

2021-06-04 Thread Tiago Olivoto
Exactly Bill! I'll implement your suggestion (solve_svd(cor.x2)%*%cor.y), to return betas. Best! Tiago Em sex., 4 de jun. de 2021 às 15:12, Bill Dunlap escreveu: > solve_svd's second argument is 'tolerance', a small scalar value, not the > right hand side of X %*% beta == Y. It returns the [ap

Re: [R-pkg-devel] [Error] data length differs from size of matrix

2021-06-04 Thread Bill Dunlap
solve_svd's second argument is 'tolerance', a small scalar value, not the right hand side of X %*% beta == Y. It returns the [approximate] inverse of X, not beta. solve_svd(cor.x2,cor.y) should probably be solve_svd(cor.x2)%*%cor.y (or just solve(cor.x2,cor.y)). -Bill On Fri, Jun 4, 2021 at 8:4

Re: [R-pkg-devel] [Error] data length differs from size of matrix

2021-06-04 Thread Tiago Olivoto
Thanks, Bill and Max for your suggestions. I was using R 4.1.0. After updating to R-devel I was able to reproduce the error, which was just fixed by using solve() instead solve_svd() in the line suggested by Bill. Best regards, Tiago Em sex., 4 de jun. de 2021 às 12:41, Bill Dunlap escreveu: >

Re: [R-pkg-devel] [Error] data length differs from size of matrix

2021-06-04 Thread Bill Dunlap
The offending line in path_coeff seems to be betas[i, 2:nvar] <- t(solve_svd(cor.x2, cor.y)) where i is a single integer, nvar is 15, and the right hand side is a 14 by 14 matrix. What is this line trying to do? Did it ever give the correct result? -Bill On Fri, Jun 4, 2021 at 7:39 AM Bill

Re: [R-pkg-devel] [Error] data length differs from size of matrix

2021-06-04 Thread Bill Dunlap
That log file includes the line using R Under development (unstable) (2021-05-30 r80413) and later says The error most likely occurred in: > ### Name: path_coeff > ### Title: Path coefficients with minimal multicollinearity > ### Aliases: path_coeff path_coeff_mat > > ### ** Examples > > ## N

Re: [R-pkg-devel] [Error] data length differs from size of matrix

2021-06-04 Thread Max Turgeon
a<http://maxturgeon.ca> From: R-package-devel on behalf of Max Turgeon Sent: Friday, June 4, 2021 9:35 AM To: Tiago Olivoto ; R Package Devel Subject: Re: [R-pkg-devel] [Error] data length differs from si

Re: [R-pkg-devel] [Error] data length differs from size of matrix

2021-06-04 Thread Max Turgeon
istics Department of Computer Science University of Manitoba maxturgeon.ca<http://maxturgeon.ca> From: R-package-devel on behalf of Tiago Olivoto Sent: Thursday, June 3, 2021 7:56 PM To: R Package Devel Subject: [R-pkg-devel] [Error] data length differs from si

[R-pkg-devel] [Error] data length differs from size of matrix

2021-06-03 Thread Tiago Olivoto
Dear all, I have received an email from the CRAN team to fix a problem with my R package metan > to safely retain it on CRAN. The error is given at and seems