installed size is 31.3Mb
  sub-directories of 1Mb or more:
    libs  29.6Mb
Running examples in ‘lrstat-Ex.R’ failed
The error most likely occurred in:

> ### Name: getDesignLogistic
> ### Title: Power and sample size for logistic regression
> ### Aliases: getDesignLogistic
> 
> ### ** Examples
> 
> 
> # two ordinal covariates
> x1 = c(5, 10, 15, 20)
> px1 = c(0.2, 0.3, 0.3, 0.2)
> 
> x2 = c(2, 4, 6)
> px2 = c(0.4, 0.4, 0.2)
> 
> # discretizing a normal distribution with mean 4 and standard deviation 2
> nbins = 10
> x3 = qnorm(((1:nbins) - 0.5)/nbins)*2 + 4
> px3 = rep(1/nbins, nbins)
> 
> # combination of covariate values
> nconfigs = length(x1)*length(x2)*length(x3)
> x = expand.grid(x3 = x3, x2 = x2, x1 = x1)
> x = as.matrix(x[, ncol(x):1])
> 
> # probabilities for the covariate configurations under independence
> pconfigs = as.numeric(px1 %x% px2 %x% px3)
> 
> # convert the odds ratio for the predictor variable in 5-unit change
> # to the odds ratio in 1-unit change
> (design1 <- getDesignLogistic(
+   beta = 0.1, ncovariates = 3,
+   nconfigs = nconfigs,
+   x = x,
+   pconfigs = pconfigs,
+   oddsratios = c(1.2^(1/5), 1.4, 1.3),
+   responseprob = 0.25,
+   alpha = 0.1))
Error in getDesignLogistic(beta = 0.1, ncovariates = 3, nconfigs = nconfigs,  : 
  pconfigs should sum up to 1
Execution halted
installed size is 31.0Mb
  sub-directories of 1Mb or more:
    libs  29.2Mb
installed size is 31.4Mb
  sub-directories of 1Mb or more:
    libs  29.6Mb
Running examples in ‘lrstat-Ex.R’ failed
The error most likely occurred in:

> ### Name: getDesignLogistic
> ### Title: Power and sample size for logistic regression
> ### Aliases: getDesignLogistic
> 
> ### ** Examples
> 
> 
> # two ordinal covariates
> x1 = c(5, 10, 15, 20)
> px1 = c(0.2, 0.3, 0.3, 0.2)
> 
> x2 = c(2, 4, 6)
> px2 = c(0.4, 0.4, 0.2)
> 
> # discretizing a normal distribution with mean 4 and standard deviation 2
> nbins = 10
> x3 = qnorm(((1:nbins) - 0.5)/nbins)*2 + 4
> px3 = rep(1/nbins, nbins)
> 
> # combination of covariate values
> nconfigs = length(x1)*length(x2)*length(x3)
> x = expand.grid(x3 = x3, x2 = x2, x1 = x1)
> x = as.matrix(x[, ncol(x):1])
> 
> # probabilities for the covariate configurations under independence
> pconfigs = as.numeric(px1 %x% px2 %x% px3)
> 
> # convert the odds ratio for the predictor variable in 5-unit change
> # to the odds ratio in 1-unit change
> (design1 <- getDesignLogistic(
+   beta = 0.1, ncovariates = 3,
+   nconfigs = nconfigs,
+   x = x,
+   pconfigs = pconfigs,
+   oddsratios = c(1.2^(1/5), 1.4, 1.3),
+   responseprob = 0.25,
+   alpha = 0.1))
Error in getDesignLogistic(beta = 0.1, ncovariates = 3, nconfigs = nconfigs,  : 
  pconfigs should sum up to 1
Execution halted