ie-Eve St-Onge
Sent: Thursday, September 11, 2014 10:53 AM
To: r-help@r-project.org
Subject: [R] incorrect number of dimensions
Dear all, I'm trying the following experiment simulation, but I'm receiving
this error:
> probs()Error in x[j, 4] : incorrect number of dimensions
however, the
Dear all, I'm trying the following experiment simulation, but I'm receiving
this error:
> probs()Error in x[j, 4] : incorrect number of dimensions
however, the simulation works fine outside the function statement{}. What am I
doing wrong?
# Create some fake data and call the function: df <- data.
I'm running an ordered logit in R with the Zelig package and am trying to
calculate some predicted probabilities. However, I get the following error
message.
> x.low <- setx(mod, cars=1)Error in dta[complete.cases(mf), names(dta) %in%
> vars, drop = FALSE] :
incorrect number of dimensions
I g
Hi:
This is pure speculation since you didn't provide a minimal data set to test
this with, but is it possible that theta is meant to be a parameter
*vector*? If so, then you should have
eta <- theta[1]
K <- theta[2]
The code theta[, 1] means that you want to extract the first column of the
_mat
Hi,
Please check your dimensions of theta.
> ff <- function(theta) theta[,1]
> theta <- 1:5
> ff(theta)
Error in theta[, 1] : incorrect number of dimensions
> theta <- data.frame(c(1:5),c(6:10))
> ff(theta)
[1] 1 2 3 4 5
-
A R learner.
--
View this message in context:
http://r.789695.n4
Hi,
How to solve this problem. The following is the code.
betabinexch0=function(theta,data)
+ {
+ eta=theta[,1]
+ K=theta[,2]
+ y=data[,1]; n=data[,2]
+ N=length(y)
+ val=0*K;
+ for (i in 1:N)
+ val=val+lbeta(K*eta+y[i],K*(1-eta)+n[i]-y[i])
+ val=val-N*lbeta(K*eta,K*(1-eta))
+ val=val-2*log(1+K)-
Sarah wrote:
I am trying to fit a linear model with seasonal effects but keep getting
'Incorrect number of dimensions'. I have no idea what this means or how to
fix it. I am following instructions received from an instructor and it
worked for him, so I assume it has something to do with my da
I am trying to fit a linear model with seasonal effects but keep getting
'Incorrect number of dimensions'. I have no idea what this means or how to
fix it. I am following instructions received from an instructor and it
worked for him, so I assume it has something to do with my data. Here is my
8 matches
Mail list logo