Displaying 15 results from an estimated 15 matches similar to: "help with lda function"
2009 Sep 29
1
help with lda function from MASS package
Thanks David,
Yes, I am talking about the MASS package.Thank you for pointing out that
these scale the same. My question is, how do I get from the V1 data:
V1
1 164.4283
2 166.2492
3 170.5232
4 156.5622
5 127.7540
6 136.7704
7 136.3436
to the other set of data:
+ 1 -2.3769280
+ 2 -2.7049437
+ 3 -3.4748309
+ 4 -0.9599825
+ 5 4.2293774
+ 6 2.6052193
+ 7 2.6820884
On Mon, Sep 28, 2009
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
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)
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
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
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
2007 Jul 18
2
Linear programming question
Hi everybody,
consider please an optimization problem:
minimize sum S1+S2
Subject to : y - x =< A + S1
x - y =< A + S2
and we want to add two more constraints:
y - x =< B - S3
x - y =< B - S4
where A is a small constant value and B is a large constant value, S1 and S2 are surplus and S3
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
2009 Apr 07
6
Sequences
Hi,
I am trying to make a sequence and am using a for loop for this. I want to
start off with an initial value ie S[0]=0 then use the loop to create other
values. This is what I have so far but I just keep getting error messages.
#To calculate the culmulative sums:
s<-rep(0,207) #as this is the length of the
vector I know I will have
s<-as.vector(s)
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