Displaying 20 results from an estimated 1000 matches similar to: "numerical subscripts in a loop in a plot"
2011 Aug 01
3
formula used by R to compute the t-values in a linear regression
Hello,
I was wondering if someone knows the formula used by the function lm to compute the t-values.
I am trying to implement a linear regression myself. Assuming that I have K variables, and N observations, the formula I am using is:
For the k-th variable, t-value= b_k/sigma_k
With b_k is the coefficient for the k-th variable, and sigma_k =(t(x) x )^(-1) _kk is its standard deviation.
2009 Oct 18
1
function to convert lm model to LaTeX equation
Dear list,
I've tried several times to wrap my head around the Design library,
without much success. It does some really nice things, but I'm often
uncomfortable because I don't understand exactly what it's doing.
Anyway, one thing I really like is the latex.ols() function, which
converts an R linear model formula to a LaTeX equation.
So, I started writing a latex.lm() function
2010 Feb 18
0
lme - incorporating measurement error with estimated V-C matrix
I have data (each Y_i is a vector) in the form of
Y_i = X_i \beta_i + Z_i b_i + epsilon_i
Were it not for the measurement error (the epsilon_i) it's a very
simple model --- nice and balanced, compound symmetry, and I'd just
use lme(y ~ x1 + x2, random=~1|subj, ...) but the measurement error is
throwing me off.
Because the Y_i are actually derived from other data, I am able
2006 Jun 30
3
Creating Vectors
type count
0 20
1 15
0 10
1 35
0 28
I would like to create two vectors from the data above. For example,
type1=c(15, 35) and type0 = c(20, 10, 28). Can any one help
Raphael
2007 Oct 31
2
R WinEdt on Windows vista
Hi!
I was trying to install the RWinEdt library on a Windows Vista machine which had R 2.6.0, WinEdt 5.4 and the RWinEdt1.7.8.zip file in the library folder under the ...\R\2.6.0 directory. I am able to install fine form the local zip but I can't launch winedt from within R for some reason.
> utils:::menuInstallLocal()
package 'RWinEdt' successfully unpacked and MD5 sums checked
2006 Nov 29
3
comma delimiter & comma in text
Hi
I have data like
1, A, 24, The Red House
2, A, 25, King's Home, by the Sea
...
I'd like to read this in as three variables. I first tried
temp <-read.csv(addresses, sep = "," ) it worked but line 2 was broken after
King's Home, and by the Sea as placed in another line. and so i eneded up
with more number of rows than in the data. when i tried
temp
2006 Oct 25
1
cloud() works but wireframe() is blank
Per the message from Alexander Nervedi, 29 April 2006:
> I have to be making a riddiculously silly ommission.
> when I run the fillowing i get the cloud plot ok. But I cant figure
> out what I am missing out when I call wireframe.
> Any help would be appreciated.
> x<-runif(100)
> y<-rnorm(100)
> z<-runif(100)
> temp <-data.frame(x,y,z)
>
2007 Dec 21
3
Numerical precision problem
Dear All,
I have a numerical problem:
R, as other statistical software, can tell the difference between very small numbers and 0, while apparently cannot distinguish a number close to 1 and 1. In the example below, is it possible to instruct R to recognize that q is different from 1?
> p=.00000000000000000000000000000001
> p==0
[1] FALSE
> q=.99999999999999999999999999999
>
2010 Mar 04
2
precision issue?
Hi R Gurus,
I am trying to figure out what is going on here.
> a <- 68.08
> b <- a-1.55
> a-b
[1] 1.55
> a-b == 1.55
[1] FALSE
> round(a-b,2) == 1.55
[1] TRUE
> round(a-b,15) == 1.55
[1] FALSE
Why should (a - b) == 1.55 fail when in fact b has been defined to be a - 1.55? Is this a precision issue? How do i correct this?
Alex
2010 Sep 10
3
Non identical numerical results from R code vs C/C++ code?
Hi,
suppose you have two versions of the same algorithm: one in pure R, the
other one in C/C++ called via .Call().
Assuming there is no bug in the implementations (i.e. they both do the
same thing), is there any well known reason why the C/C++ implementation
could return numerical results non identical to the one obtained from
the pure R code? (e.g. could it be rounding errors? please
2007 May 16
3
more woes trying to convert a data.frame to a numerical matrix
I have the following csv file:
name,x,y,z
category,delta,gamma,epsilon
a,1,2,3
b,4,5,6
c,7,8,9
I'd like to create a numeric matrix of just the numbers in this csv dataset.
I've tried the following program:
sample.data <- read.csv("sample.csv")
numerical.data <- as.matrix(sample.data[-1,-1])
However, print(numerical.data) returns what appears to be a matrix of
2006 Dec 12
1
strings as factors
Hi,
To be able to match cases with a benchmark I need to have a data.frame with
a character id variable. however, I am surprised why this seems to be so
hard. In fact I was unable to succeed. Here is what I tried:
>test1 <-expand.grid(ID = 1:2, sex = c("male","female"))
>is(test1[,2])
[1] "factor" "oldClass"
>test2 <-expand.grid(ID =
2006 May 01
6
R-2.3.0 make error
Dear list,
When compiling the R-2.3.0 on FC4 x86_64, I got the following errors:
make[3]: Entering directory
`/project/scratch3/ligroup/wuming/src/R-2.3.0/src/main'
gcc -Wl,--export-dynamic -L/usr/local/lib64 -o R.bin Rmain.o
CConverters.o CommandLineArgs.o Rdynload.o Renviron.o RNG.o apply.o
arithmetic.o apse.o array.o attrib.o base.o bind.o builtin.o
character.o coerce.o colors.o complex.o
2006 Mar 29
2
write.table command
Dear All,
I'm trying to save a dataframe using write.table command. It works, but when I retrieved, there's an error message as shown below:
> write.table(soil.dat,file="C:/soil.rdata")
> load("C:/soil.rdata")
Error: bad restore file magic number (file may be corrupted)-- no data loaded
I can figure out the error message. Any assistance to solve the
2008 Feb 25
1
RWinEdt Install issue
Dear RUsers,
I just upgraded from 2.6.0 to 2.6.2 and tried to reinstall the RWinEdt patch to work with WinEdt so that I can continue function as I always have but I have run into problems that I don't understand how to fix. Any help would be great. Essentially, I downloaded the latest RWinEdt zip folder from the CRAN website and tried calling the library. I tried re-installing it a bunch of
2005 Apr 18
2
Construction of a large sparse matrix
Dear List:
I'm working to construct a very large sparse matrix and have found
relief using the SparseM package. I have encountered an issue that is
confusing to me and wonder if anyone may be able to suggest a smarter
solution. The matrix I'm creating is a covariance matrix for a larger
research problem that is subsequently used in a simulation. Below is the
latex form of the matrix if
2007 Sep 17
1
map issues
Hi !
I have a shapefile that I can easily read into R using library(maptools). My problem stems from some warning messages that come even though everything seems to work fine.
library(maptools)
districts <- read.shape(filen = "a_ds", dbf.data = TRUE)
length(districts$Shapes)
so far so good. when I try and plot this I get a nice plot and a warning message:
> plot(districts)
2003 Dec 10
3
e1071:svm - default epsilon = 0.1 (NOT 0.5) (PR#5671)
In e1071 package/svm default epsilon value is set to 0.1 and not 0.5
as documentation says.
R
2010 Apr 15
2
Regression w/ interactions
I have a project due in my Linear Regression class re: regression on a data
set & my professor gave us a hint that there were *exactly *2 sig
interactions. The data set is attached. We have to find which predictors are
significant, & which 2 interactions are sig. Also, I nedd some guidance for
this & selecting the best model. I tried the `full' model, that being:
2007 Oct 31
3
How to make "Add permission" for folder in system withntacl support?
Hi!
Let's go back to this topic please! I have to replace the Windows NT 4.0
server with Samba but I still don't know how to do this. I need to allow to
someone (some user group) the right to add files into the folder. They use
this "feature" on current NT server ver often and to this in the following
ways:
1. Rightclick on file you want to add, Copy, then go to server, for