Displaying 20 results from an estimated 70 matches similar to: "lm without intercept"
2010 Mar 05
2
Selecting rows of a matrix based on some condition on the columns
The data set consists of two sets of matrices, as labelled by the columns, T's and C's.
> xy
x T1 T2 T3 T4 T5 C1 C2 C3 C4 C5
[1,] 50 0.00 0.00 33.75 0.00 0.00 0.00 36.76 0.00 35.26 0.00
[2,] 13 34.41 0.00 0.00 36.64 32.86 34.11 35.80 37.74 0.00 0.00
[3,] 14 35.85 0.00 33.88 36.68 34.88 34.58 0.00 32.75 37.45 0.00
[4,] 33 34.56
2006 May 10
3
NumbersToWords
= numbersToWords - convert your integers and floats to english or
japaneese words,or translate it into american currency
- This plugin was created from a solution to the ruby quiz (english
numbers) by Matthew D Moss. I modified the code to work as a rails
plugin and added the to_dollars method.
- the to_dollars method will work with integers and floats
- the to_english and to_japaneese methods
2002 Jun 19
2
solve() doesn`t work
Hi,
I tried to inverse a matrix but it doesn`t work. I hope somebody can help
me. This is what I did.
> kurse <- read.table("kurse.txt", header=T, dec=",")
> x <- cbind(1,kurse[,-c(1)])
> y <- kurse$index
> t(x) %*% x
Error in t(x) %*% x : requires numeric matrix/vector arguments
> x <- as.matrix(x)
> xtxi <- solve(t(x) %*% x)
Error in
2012 Jun 19
1
Stepwise Discriminant Analysis - greedy.wilks
I don't understand which is the problem
Could you help me please?
Thanks in advance
Marta
> str(data_indiciN2)
'data.frame': 200 obs. of 36 variables:
$ gruppo: Factor w/ 2 levels "0","1": 2 2 2 2 2 2 2 2 2 2 ...
$ I001N2: num 19.32 8.22 28.35 7.24 14.7 ...
$ I002N2: num 2.92 2.54 0.11 1.6 7.12 ...
$ I003N2: num -22.362 -0.222 -19.291
2008 Jul 02
1
randomForest training error
While trying to train randomForest with my dataset, I am ending up with the
following error
Error in randomForest.default(datatrain, classtrain) :
length of response must be the same as predictors
My data looks like:
A,B,C,D,Class
1,2,1,2,cl1
1,2,1,2,cl1
3,2,1,2,cl2
3,2,1,2,cl2
3,2,1,2,cl2
3,2,1,2,cl2
3,2,1,2,cl2
3,2,1,2,cl2
3,2,1,2,cl2
3,2,12,3,cl2
3,2,1,2,cl2
Actual dataset has around 4000
2012 Aug 03
1
How can I read time series data to create zoo objects if I have two title lines?
Hello,
This is a standard example in which I read the time series data from a
csv file and create a zoo object:
x0 <- read.csv(file="CPI.csv", header=TRUE)
time_0<-as.yearmon("1981-01")+(0:371)/12
x0zoo<-zoo(x0, time_0)
The data look like this:
TIME CPI CPI_food CPI_Clothes CPI_House CPI_Rent 198101 62.1 55.34
103.45 65.24 61.43 198102 63.16 56.95
2013 Apr 23
2
Tables package - remove NAs and NaN
Dear Rxperts,
q <- data.frame(p=rep(c("A","B"),each=10,len=30),
a=rep(c(1,2,3),each=10),id=seq(30),
b=round(runif(30,10,20)),
c=round(runif(30,40,70)))
The operation below...
tabular(((p=factor(p))*(a=factor(a))+1) ~ (N = 1) + (b + c)*
(mean+sd),data=q)
yields some rows of NAs and NaN as shown below
b c
p a N mean sd mean sd
A 1 10
2007 Jul 25
2
using contrasts on matrix regressions (using gmodels, perhaps)
Hi,
I want to test for a contrast from a regression where I am regressing the columns of a matrix. In short, the following.
X <- matrix(rnorm(50),10,5)
Y <- matrix(rnorm(50),10,5)
lm(Y~X)
Call:
lm(formula = Y ~ X)
Coefficients:
[,1] [,2] [,3] [,4] [,5]
(Intercept) 0.3350 -0.1989 -0.1932 0.7528 0.0727
X1 0.2007 -0.8505 0.0520
2008 Feb 27
2
Sweave produces gibberish instead of apostrophe in pdf
Dear All,
I try to use Sweave to make a document. But when I use the Sweave()
command on it and build a pdf with pdflatex (3.141592-1.40.3) my
apostrophes are replaced by some gibberish (an 'a' with a hat on it, a
capital A with a arc pointing upwards on it and a capital Y with two
points on it). If I manually replace the apostrophes using the keyboard,
I get a different looking
2010 Jan 09
1
Linear regression - R^2
Hello,
I was doing a linear regression with the following formula:
*lm(y~x+0)*, so it passes through the origin. But when I called the summary
of the regression i saw that R squared is abnormally high (it's a lot lower
in other programs such as SigmaPlot and MS Excel).The manual explained the
cause of the difference (because of the different computing method), but
what should I do to get the
2010 Jan 09
2
R^2 in linear regression
Hello,
I was doing a linear regression with the following formula:
lm(y~x+0), so it passes through the origin. But when I called the summary of
the regression i saw that R squared is abnormally high (it's a lot lower in
other programs such as SigmaPlot and MS Excel).The manual explained the
cause of the difference (because of the different computing method), but
what should I do to get the
2006 Apr 12
1
Failed to recieve Fax: Asterisk - IAXModem - Hylafax
Hi,
I've tired to forward a Fax from Asterisk to Hylafax. It works so far
until I tried with a Fax machine.
I just got error shown in the log below. I'm not sure why. I've tested
it with other 6 machines and they all work fine.
Do you have any idea why?
Pim
Hylafax Session log:
Apr 12 11:16:48.82: [ 5933]: SESSION BEGIN 000000078 492212601860
Apr 12 11:16:48.82: [ 5933]:
2008 Jul 03
1
Migrating from S-Plus to R - Exporting Tables
Does something like this get you close:
x <- list()
keys <- LETTERS[1:6]
# create
for (i in keys){
x[[i]] <- data.frame(a=1:5, b=1:5, c=1:5)
}
# output
output <- file('tempxx.txt', 'w')
for (i in keys){
write.table(i, row.names=FALSE, col.names=FALSE, file=output, quote=FALSE)
write.table(x[[i]], file=output, quote=FALSE)
}
close(output)
On Wed, Jul 2,
2010 Jan 04
1
log-normal overlay
Hello,
Using the following lines of code, I created the following graph:
2010 Jan 04
1
log normal overlay
Hello,
Using the following lines of code, I created the following graph:
2008 Apr 24
2
changing format of a float value to another
hello
How can I change a vector's float value from ("1.085714e-01") format to
a simpler format (like 0.1xxx).
regards
--
Ahmet Temiz
Jeo. M?h.
Afet ??leri Gen. Md.l???
Deprem Ar. D.
Ahmet Temiz
Geo. Eng.
General Dir. of
Disaster Affairs
--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
2012 Jun 19
0
greedy.wilks
I have used the greedy.wilks to stepwise discriminant analysis, but it
doesn't work with my dataset.
I don't understand which is the problem
Could you help me please?
Thanks in advance
Marta
> str(data_indiciN2)
'data.frame': 200 obs. of 36 variables:
$ gruppo: Factor w/ 2 levels "0","1": 2 2 2 2 2 2 2 2 2 2 ...
$ I001N2: num 19.32 8.22 28.35 7.24
2017 Dec 05
2
PLS in R
Hello, I need help with a partial least square regression in R. I have read
both the vignette and the post on R bloggers but it is hard to figure out
how to do it. Here is the script I wrote:
library(pls)
plsrcue<- plsr(cue~fb+cn+n+ph+fung+bact+resp, data = cue, ncomp=7,
na.action = NULL, method = "kernelpls", scale=FALSE, validation = "LOO",
model = TRUE, x = FALSE, y =
2008 Jan 25
2
'Best penalty' in design package
Dear Users,
In case of ridge logistic regression, i want to calculate the optimum
penalty using aic and bic criteria. Here is the sample code:
fit <- lrm(RES ~CAT01+NUM01+NUM02+CAT02+CAT03+CAT04+NUM03+CAT05+CAT06+NUM04+
CAT07+CAT08+NUM05+NUM06, data = train.data, x = TRUE, y = TRUE)
pentrace(fit, penalty = list(seq(.001, 5, by=.1)))
output:
Best penalty:
penalty df
1.001
2008 Sep 09
1
survey package
Version 3.9 of the survey package is now on CRAN. Since the last
announcement (version 3.6-11, about a year ago) the main changes are
- Database-backed survey objects: the data can live in a SQLite (or other
DBI-compatible) database and be loaded as needed.
- Ordinal logistic regression
- Support for the 'mitools' package and multiply-imputed data
- Conditioning plots,