similar to: matrix computation???

Displaying 20 results from an estimated 6000 matches similar to: "matrix computation???"

2009 Jan 14
1
dfbetas without intercept
Hello I am running a regression without the intercept, and want to compute dfbetas. How do I do this? The dfbetas function only works when the intercept is included in the model. Regards K [[alternative HTML version deleted]]
2009 Apr 02
1
matrix vectorization or something else??
Hello This may have been answered elsewhere, and I have looked on the web, but nothing helps. I am trying to do the following: X<-matrix(c(1:15),nrow=3,byrow=T) Y<-matrix(c(2,4,6,8,10),ncol=1) I need to sum the product of each row of X by the remaining j rows multiplied by j y values (i.e sum( t(x_i) x_j y_j) ) Hope this makes sense. Thanks in advance. Ps: how do I reference all
2007 Jun 05
2
biplot package
Dears, I've been learning biplot (Gabriel, 1971) and I found the function 'biplot', inside of the package 'stats', useful but, a bit limited. So, I'm thinking to start a colaborative package to enhance this methods to other multivariate methods. In this way, I would like to start it, making public a new function (biplot.pca, still in development, but running) that make
2023 Jan 26
1
Failing to install the rgl package
Hi, I try to execute the seven lines of code below to plot a graph. But I am failing as the messages below show. Where am I going wrong? install.packages("rgl") library(rgl) y_hat = X%*%B_hat open3d(windowRect = c(100,100,900,900),family = "serif") color = rainbow(length(y_hat))[rank(y_hat)] plot3d(educ,exper,wage,col = color,type = "s",size = 0.5,xlim =
2010 Jun 23
1
Estimate of variance and prediction for multiple linear regression
Hi, everyone, Night. I have three questions about multiple linear regression in R. Q1: y=rnorm(10,mean=5) x1=rnorm(10,mean=2) x2=rnorm(10) lin=lm(y~x1+x2) summary(lin) ## In the summary, 'Residual standard error: 1.017 on 7 degrees of freedom', 1.017 is the estimate of the constance variance? Q2: beta0=lin$coefficients[1] beta1=lin$coefficients[2] beta2=lin$coefficients[3]
2008 Oct 29
1
how can I access parts of yags output
Here is an example given from ?yags library(methods) data(stackloss) Y1 <- yags(stack.loss~Air.Flow,id=1:21, data=stackloss) How can I access parts of the output. I tried: > str(Y1) Formal class 'yagsResult' [package "yags"] with 25 slots ..@ coefficients : num [1:2] -44.13 1.02 ..@ coefnames : chr(0) > Y1$coefnames Error in Y1$coefnames : $
2002 Jan 22
1
documentation and plotting with lqs
Dear r-help, Is there any available description of the components of lqs objects found in the package "lqs"? > names(slts) [1] "crit" "sing" "coefficients" "bestone" [5] "fitted.values" "residuals" "scale" "terms" [9] "call"
2015 Jul 17
1
Improvements (?) in stats::poly and stats::polym.
Dear Keith, >>>>> <Keith.Jewell at campdenbri.co.uk> >>>>> on Thu, 16 Jul 2015 08:58:11 +0000 writes: > Dear R Core Team, > Last week I made a post to the R-help mailing list > ?predict.poly for multivariate data? > <https://stat.ethz.ch/pipermail/r-help/2015-July/430311.html> > but it has had no responses so I?m
2007 Oct 17
1
y_hat
Hello, suppose one has the following values x1 <- rnorm(10,5,1) x2 <- rgamma(10,5,1) y <- rnorm(10,4,1) mydat <- data.frame(y,x1,x2) then one can use glm like mod <- glm(y~x1+x2, data=mydat, family=gaussian) But how could I estimate y_hat? Thanks alot! Sam --------------------------------- [[alternative HTML version deleted]]
2005 Feb 02
4
(no subject)
can you recommend a good manual for R that starts with a data set and gives demonstrations on what can be done using R? I downloadedR Langauage definition and An introduction to R but haven't found them overly useful. I'd really like to be able to follow some tutorials using a dataset or many datasets. The datasets I have available on R are Data sets in package 'datasets':
2007 Dec 02
1
speeding up likelihood computation
R Users: I am trying to estimate a model of fertility behaviour using birth history data with maximum likelihood. My code works but is extremely slow (because of several for loops and my programming inefficiencies); when I use the genetic algorithm to optimize the likelihood function, it takes several days to complete (on a machine with Intel Core 2 processor [2.66GHz] and 2.99 GB RAM). Computing
2010 Mar 25
1
Manually calculate SVM
Hi, I'm learning more about SVMs and kernels in general. I've gotten used to using the svm function in the e1071 package. It works great. Now, I want to do/learn some more interesting stuff. (Perhaps my own kernel and/or scoring system). So I want to better understand 1) how calculation of the kernel happens. 2) how to calculate the predicted value (y_hat) given a list of support
2005 Dec 05
1
Help
Hi R-Users, I apologize if it is too simple question for all. I have a multivariate dataset having 7 variables as independent and 1 dependent variable. 248 data points are there. I want to do out sample forecast first considering 156 points. So I'll have to start from 157th point and calculate the 157th y_hat value. In this way it will go to 248th data point. Can any one tell me how I can
2005 Jul 20
1
predict.lm - standard error of predicted means?
Simple question. For a simple linear regression, I obtained the "standard error of predicted means", for both a confidence and prediction interval: x<-1:15 y<-x + rnorm(n=15) model<-lm(y~x) predict.lm(model,newdata=data.frame(x=c(10,20)),se.fit=T,interval="confidence")$se.fit 1 2 0.2708064 0.7254615
2017 Jan 24
3
Convertir programa Matlab a R sacado de Threshold Models of Collective Behavior de Michèle Lai & Yann Poltera
Estimados Usuarios-R: Estoy convirtiendo un programa en Matlab a R. El original lo saqu de: Lai, M., & Poltera, Y. (2009). Lecture with computer exercises: Modelling and simulating social systems with matlab. Tech. rep., Swiss Federal Institute of Technology (December 2009). 27. Ahora estoy convirtiendo la siguiente funcin: function sizes = gridsizes(N,varargin) % gridsizes(N) calculates
2012 Dec 04
1
Solve system of equations (nleqslv) only returns origin
I'm solving 4 complex equations simultaneously. Code is below. The code returns only zero's for the solution though there should also be a non-zero result. I'm pretty confident that the equations are correct because they are straight from a published paper and I checked them pretty thoroughly. The parameter values I used are from the published paper as well. Any suggestions for how
2012 Dec 17
1
seeking a help on if function
Hello r helpers! Below is the whole coding for my programme. Before proceed more further, let me explain for you. First of all, I need to compute trimmed mean. Till that step is ok. Then I need to compute ssdw which is sum of square deviation. If I do equal trimming at both tail of distribution that I chose, I will use the first ssd formulae which is "a". But if I am doing unequal
2013 Mar 29
3
if clause in data frame
Hi, final<-data.frame() ?? for (m1 in 4:10) { ?????? for (n1 in 4:10){? ?????????? for (x1 in 0: m1) { ????????????? for (y1 in 0: n1) { final<- rbind(final,c(m1,n1,x1,y1)) res}}}} ?final1<-within(final,{flag<-ifelse(x1/m1>y1/n1, 1,0)}) ?head(final1) #? m1 n1 x1 y1 flag #1? 4? 4? 0? 0??? 0 #2? 4? 4? 0? 1??? 0 #3? 4? 4? 0? 2??? 0 #4? 4? 4? 0? 3??? 0 #5? 4? 4? 0? 4??? 0 #6? 4? 4?
2010 Jul 24
1
Doubt about a population competition function
Hi, I'm doing a function that describe two populations in competition. that's the function that i wrote: exclusao<-function(n10, n20, k1, k2, alfa, beta, t){ n1<-k1-(alfa*n20) n2<-k2-(beta*n10) if(t==0){plot(t, n10, type='b', xlim=range(c(1:t),c (1:t)), ylim=range(n10, n20), xlab='tempo', ylab='tamanho populacional') points(t, n20, type='b',
2013 Feb 01
2
How does this function print, why is n1 which equals 1 printed as 2?
Windows 7, R 2.12.1 Colleagues, I am trying to understand the n.for.2means function. The code below is a copy of the function (renamed to n.for.2means.js). I have inserted a single line of code towards the bottom of the function which uses the cat function to print the value of n1. You will note the value (preceded by stars) is printed as 1. The function (1) prints a lot of output without any