Displaying 13 results from an estimated 13 matches similar to: "help with lda function from MASS package"
2009 Sep 28
1
help with lda function
I am having a problem understanding the lda package. I have a dataset here:
[,1] [,2] [,3]
[1,] 2.95 6.63 0
[2,] 2.53 7.79 0
[3,] 3.57 5.65 0
[4,] 3.16 5.47 0
[5,] 2.58 4.46 1
[6,] 2.16 6.22 1
[7,] 3.27 3.52 1
If I do the following;
"names(d)<-c("y","x1","x2")
d$x1 = d$x1 * 100
d$x2 = d$x2 * 100
g<-lda( y ~ x1 + x2, data=d)
v2
2009 Jan 19
1
candisc
Hello,
I have a question regarding the candisc package. My data are:
species three five
1 2.95 6.63
1 2.53 7.79
1 3.57 5.65
1 3.16 5.47
2 2.58 4.46
2 2.16 6.22
2 3.27 3.52
I put these in a table and then a linear model
>newdata <- lm(cbind(three, five) ~ species, data=rawdata)
and then do a candisc on them
>candata<-candisc(newdata)
2012 Jun 04
1
simulation of modified bartlett's test
Hi, I run this code to get the power of the test for modified bartlett's
test..but I'm not really sure that my coding is right..
#normal distribution unequal variance
asim<-5000
pv<-rep(NA,asim)
for(i in 1:asim)
{print(i)
set.seed(i)
n1<-20
n2<-20
n3<-20
mu<-0
sd1<-sqrt(25)
sd2<-sqrt(50)
sd3<-sqrt(100)
g1<-rnorm(n1,mu,sd1)
g2<-rnorm(n2,mu,sd2)
1998 Nov 16
1
PB Mandeville can't be reached
# Peter B. Mandeville kindly offered to send me code for Hotelling's T^2
# Test. Unfortunately there seems to be no route to his machine.
# So i'm trying to reach him via the Mailing List.
------------------------------------------------------------------------
Sir,
this morning i recieved your message about the availability of the code
for Hotelling's Test. I hurried to find out
1998 Nov 16
0
Re: Hotelling corrected
By accident, I left out the lines defining n1 and n2. Here it is as a
function.
Peter B.
hotelling <- function(d1,d2){
k <- ncol(d1)
n1 <- nrow(d1)
n2 <- nrow(d2)
xbar1 <- apply(d1,2,mean)
xbar2 <- apply(d2,2,mean)
dbar <- xbar2-xbar1
v <- ((n1-1)*var(d1)+(n2-1)*var(d2))/(n1+n2-2)
t2 <- n1*n2*dbar%*%solve(v)%*%dbar/(n1+n2)
f <-
2000 Sep 19
3
coerce mode list?
Dear R/S users;
I'm using S+ version 4 Release 3.
and I am trying to do a simple calculation like the
following :
> X1<-X[1:5]
> W1<-W[1:5,1:5]
> X1
[1] 1.250000 1.292308 1.176471 0.937500 1.538462
> W1
VAR00003 VAR00004 VAR00005 VAR00006 VAR00007
1 0 1 0 1 0
2 1 0 0 0 1
3 0 0 0
2010 Jul 21
1
Question about allocMatrix error message
Dear R family,
I faced a technical problem in r coding.
#s=t(dev)%*%dev/(nr-1) # dev (100,000 by 2) stands for
deviation from the mean
#sinv=solve(s)
#t2=diag(dev%*%sinv%*%t(dev))
I got an error message at t2 statement:
Error in diag(dev %*% si %*% t(dev)) : allocMatrix: too many elements specified
Please let me know if there is a way to overcome this problem.
best
moohwan
2013 Feb 12
0
error message from predict.coxph
In one particular situation predict.coxph gives an error message. Namely: stratified data, predict='expected', new data, se=TRUE. I think I found the error but I'll leave that to you to decide.
Thanks,
Chris
######## CODE
library(survival)
set.seed(20121221)
nn <- 10 # sample size in each group
lambda0 <- 0.1 # event rate in group 0
lambda1 <- 0.2 # event rate in group 1
2012 Dec 17
1
Code works standalone, yet same code fails when part of package
Hi
I'm missing something here but I cannot figure out what. What I can see is that the same code works when I load it via source(...) yet fails when I execute it after loading the package I have built (which includes the code.
Below is a transcript of my R session. First I load the code from a file, using source(). Then I execute it fine. Then I remove the function object, I load the
2024 Oct 22
1
invalid permissions
Dear Prof. Roger Koenker,
On Tue, 22 Oct 2024 09:08:12 +0000
"Koenker, Roger W" <rkoenker at illinois.edu> wrote:
> > fN <- rqss(y~qss(x,constraint="N")+z)
>
> *** caught segfault ***
> address 0x0, cause 'invalid permissions?
Given a freshly produced quantreg.Rcheck directory, I was able to
reproduce this crash by running
R -d gdb
# make
2024 Oct 22
1
invalid permissions
Gurus:
I have a new version of my quantreg package with minimal changes, mainly to fix some obscure fortran problems. It fails R CMD check ?as-cran with the error:
Running examples in ?quantreg-Ex.R? failed
The error most likely occurred in:
> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: plot.rqss
> ### Title: Plot Method for rqss Objects
2023 Apr 17
2
[PATCH libnbd v2] README: Document additional packages
When building from git we need autoconf, automake and libtool.
Signed-off-by: Nir Soffer <nsoffer at redhat.com>
---
Changes sinve v1:
- Remove `,` between package namses (Laszlo)
README.md | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/README.md b/README.md
index c7166613..7eed0e31 100644
--- a/README.md
+++ b/README.md
@@ -32,10 +32,17 @@ ## License
very liberal license.
2023 Apr 17
1
[PATCH libnbd v2] README: Document additional packages
On 4/17/23 18:44, Nir Soffer wrote:
> When building from git we need autoconf, automake and libtool.
>
> Signed-off-by: Nir Soffer <nsoffer at redhat.com>
> ---
>
> Changes sinve v1:
> - Remove `,` between package namses (Laszlo)
>
> README.md | 7 +++++++
> 1 file changed, 7 insertions(+)
>
> diff --git a/README.md b/README.md
> index