Displaying 20 results from an estimated 4000 matches similar to: "lme in R and Splus"
2002 Feb 13
3
xtabs
Hi,
In Splus if I call the function crosstabs() the output is a contigency
table; in each cell of the table is printed: N, N/RowTotal,
N/ColTotal, N/Total. N is the number of observations in each cell.
The same call to xtabs() in R will produce the contigency table but the
only entry in each cell is N.
How can I get the same relative frequencies that crosstabs() gives?
Thanks,
mike
--
2011 Mar 18
1
Problem with Slope.test function
Hi all,
I need to test the significnce of difference between slopes of two regression lines and regression line with theoretical line. I try to use Slope.test function from emu package,
but an error occured...
library(emu)
d1<-data.frame(P1=c(1,2,3,5,7,8,9,13,14,15),
P2=c(1,2,5,8,11,13,15,15,18,24),
R=c(2,7,8,9,16,21,27,31,33,36)) # First data set
m1<-lm(R~P1+P2+P1*P2,data=d1) # Regr.
2002 May 28
0
random Forests
Hi,
I have a data set with 1000 observations and 260 predictors. The
predictor variables are all ordinal. There are 2 classes labeled as, F
and T with class proportions of 0.44 and 0.56, respectively.
In a call to the function randomForest() with mytry=1 and nodesize=1 and
ntree=100 the resulting classifier puts all observations in class T.
When I change nodesize to nodesize=5 I get the
2002 Mar 21
0
tree
Hi,
I have a dataframe, y, with 1000 rows and 266 columns. The first column
of y is a 2 level factor response; columns 2:266 are each ordinal
variables that can take on one of the values 1, 2, or 3.
I'm trying to fit a model with the calls:
(A) y.tree <- tree(pref~.,data=y,mindev=0,minsize=2)
and
(B) y.tree <- tree(pref~.,data=y,split='gini')
pref is the name of the factor
2007 Feb 05
0
random forest proximities
Good Day,
I'm using the randomForest package to perform a classification. If I
supply weights to the optional classwt argument are proximity values
computed as a weighted average? I understand that the forest will
possibly change as a function of the particular weights I supply.
Thanks in advance.
Mike
Michael Fugate
Los Alamos National Laboratory
Mail Stop MS-F600,
Los Alamos, NM
2011 Oct 18
1
How to read data sequentially into R (line by line)?
I have a data set like this in one .txt file (cols separated by !):
APE!KKU!684!
APE!VAL!!
APE!UASU!!
APE!PLA!1!
APE!E!10!
APE!TPVA!17122009!
APE!STAP!1!
GG!KK!KK!
APE!KKU!684!
APE!VAL!!
APE!UASU!!
APE!PLA!1!
APE!E!10!
APE!TPVA!17122009!
APE!STAP!1!
GG!KK!KK!
APE!KKU!684!
APE!VAL!!
APE!UASU!!
APE!PLA!1!
APE!E!10!
APE!TPVA!17122009!
APE!STAP!1!
GG!KK!KK!
it contains over 14 000 000 records. Now
2009 Oct 19
3
loop and plot
Dear all,
I am stuck at applying loop function for creating separated plots.
I have coding like below:
dataset.table <-
table(data.frame(var1=c(1,2,3,1,2,3,1),colour=c("a","b","c","c","a","b","b")
))
kk = function(f)
{
ls=as.character(f)
pie(dataset.table[ls,],main=ls)
2001 Feb 08
2
dnbinom(,size<1,)=0 (PR#842)
This came up on r-help but indicates a bug.
dnbinom(x,n,p) calls dbinom_raw(n-1,...)
which returns 0 for n<1.
-thomas
---------- Forwarded message ----------
Date: Thu, 08 Feb 2001 17:10:23 +0000
From: Yudi Pawitan <yudi@stat.ucc.ie>
To: Mark Myatt <mark@myatt.demon.co.uk>
Cc: R-Help <r-help@stat.math.ethz.ch>
Subject: Re: [R] Goodness of fit to Poisson / NegBinomial
2010 May 13
1
merge for data.frame and matrix
Hello,
how to merge a data.frame and a matrix by one column in the data.frame and rownames of the matrix?
df <- data.frame(col1=c("kk","yy","kk"),col2=c(6,4,3))
> df
col1 col2
1 kk 6
2 yy 4
3 kk 3
m<-matrix(c(3,8,56,9), nrow=2, dimnames = list(c("aa","kk"),c("col1","col2")))
> m
col1 col2
aa
2006 Nov 03
1
difference in using with() and the "data" argument in glm call
Dear all,
I am dealing with the following (apparently simple problem):
For some reasons I am interested in passing variables from a dataframe
to a specific environment, and in fitting a standard glm:
dati<-data.frame(y=rnorm(10),x1=runif(10),x2=runif(10))
KK<-new.env()
for(i in 1:ncol(dati)) assign(names(dati[i]),dati[[i]],envir=KK)
#Now the following two lines work correctly:
2011 Oct 27
2
Consistant test for NAs in a factor when exclude = NULL?
Dear folks?
Is there a function to correctly find (and count) the NAs in a factor when
exclude=NULL, regardless of whether their origin is in the original data or
by subsequent assignment?
In example number 1 below, where NAs are assigned by is.na()<-, testing the
factor with is.na() finds the correct number of NAs. In example number 2,
where the NAs are from the data, neither is.na(), ==NA,
2006 Nov 03
1
[R] difference in using with() and the "data" argument in glm (PR#9338)
I've redirected this reply from r-help to the bugs list.
On 11/3/2006 8:25 AM, vito muggeo wrote:
> Dear all,
> I am dealing with the following (apparently simple problem):
> For some reasons I am interested in passing variables from a dataframe
> to a specific environment, and in fitting a standard glm:
>
> dati<-data.frame(y=rnorm(10),x1=runif(10),x2=runif(10))
>
2005 Aug 26
1
Memory leakage/violation?
Hi,
I've spotted a possible memory leakage/violation in the latest R v2.1.1
patched and R v2.2.0dev on Windows XP Pro SP2 Eng.
I first caught it deep down in a nested svd algorithm when subtracting a
double 'c' from a integer vector 'a' where both had finite values but
when assigning 'a <- a - c' would report NaNs whereas (a-c) alone would
not. Different runs
2009 May 14
2
[LLVMdev] alias analysis results
Hi there,
I am trying to understand how AliasAnalysis works out in LLVM. I used
the following simple test-case (test4.c):
--
void test()
{
int *jj, *kk;
int aa = 100;
jj = &aa;
*jj = 300;
}
int main()
{
test();
return 0;
}
--
Then I did "llvm-gcc -emit-llvm -c -o test4.bc test4.c" to get bc. I
tried the following 2 ways to get what I expect to get as
2009 Dec 11
1
about --link-dest
Hello all:
I don't know what I'm doing bad, but --link-dest does not work for me:
I have three directories, the original one, the first copy and the second copy I want to populate:
$ ls -li
total 12
1761433 drwxr-xr-x 2 envite envite 4096 dic 10 14:04 copy1
1761434 drwxr-xr-x 2 envite envite 4096 dic 11 01:18 copy2
1761432 drwxr-xr-x 2 envite envite 4096 dic 10 14:04 origin
$ ls -li *
2005 May 25
1
Samba vs ActiveDirectory Kerberos error message
Hi,
When validating users on my Linux system against an ActiveDirectory,
the Windows event log are filled with messages like these (Windows
Event ID 675):
Pre-authentication failed:
User Name: linux$
User ID: KK\linux$
Service Name: krbtgt/KK.LOCAL
Pre-Authentication Type: 0x0
Failure Code: 0x19
Client
2008 Oct 01
1
knn class probabilities
Good Day,
I'm using the knn function in the package class. With k set to 3,
the function returns proportions of 1/3, 0.5, 0.6, 2/3, 3/4, and 1.0
for the test cases. I don't understand how with k set to 3 the
proportions can be anything other than 1/3, 2/3, or 1.0 I've seen
similar inconsistencies with k set to 5.
R version 2.5.0 with redhat linux.
Thanks in advance.
Mike
2010 Aug 05
1
difficulties with read.table applied to files from URL
Hello,
I am using read.table to read files directly from a public ftp site. I have
a general list of files that may or may not exist in the ftp directory, but
my hope was that R would read the file if it existed and ignored it if it
didn't exist and move on to the next one. However, when R arrives at a file
that does not exist I get the error message "Error in file(file, "rt") :
2012 Feb 10
1
stepwise variable selection with multiple dependent variables
Good Day,
I fit a multivariate linear regression model with 3 dependent variables and several predictors using the lm function. I would like to use stepwise variable selection to produce a set of candidate models. However, when I pass the fitted lm object to step() I get the following error:
Error from R:
Error in drop1.mlm(fit, scope$drop, scale = scale, trace = trace, k = k, :
no
2009 May 15
1
[LLVMdev] alias analysis results
Hi Eli, thanks for the answers helping out.
I tried to understand further - got another example:
void test()
{
int *jj, *kk;
int aa = 100;
jj = &aa;
*jj = 300;
kk = jj;
*kk = 400;
}
int main()
{
test();
return 0;
}
bc looks like the following (only test() part)
define void @test() nounwind {
entry:
%aa = alloca i32 ; <i32*> [#uses=2]
%kk =