Hello,Kindly assist me on how to make the plot from the following programm to
be editable
x<-c(0.84,1.03,0.96)y<-c(1.30,1.46,1.48)z<-c(1.32,1.47,1.5)w<-c(0.07,0.07,0.07)r<-c(500,1000,2000)
# Graph cars using a y axis that ranges from 0 to 12plot(r,x, type="o",
col="blue", ylim=c(0,1.5),lwd= 2,
Hi,
kindly give me some guide on how to plot the following data in a single line
graph that is ( y1,y2,y3,y4 against x) including title and key
y1<-c(0.84,1.03,0.96)
y2<-c(1.30,1.46,1.48)
y3<-c(1.32,1.47,1.5)
y4<-c(0.07,0.07,0.07)
x<-c(500,1000,2000)
Thanks
Ishaq
[[alternative HTML vers
kindly guide me on how i can delete and replace an element from a matrix t below
for example delete first element in column one and replace it with 50, third
element in column 2 by 90 and fifth element in column 3 by 100
t1<-c(1,2,3,4,5)
t2<-c(6,7,8,9,10)
t3<-c(11,12,13,14,15)
t<-cbind(t1,t2,
kindly guide me on how i can plot the following data on the same graph using
the kernel density. i will like to use as to compare performance
mu1<-c(500.0035, 501.2213, 500.7532, 500.2622, 500.3391, 500.1618, 499.9511,
500.1843, 499.8945, 499.8467)
mu2<-c(498.9623, 504.7938, 506.8957, 495.6634,
i try to generate 27*5 matrix of observation using the following code but is
given error
kindly assist and correct the problem
x1<-c(-1,0,1,-1,0,1,-1,0,1,-1,0,1,-1,0,1,-1,0,1,-1,0,1,-1,0,1,-1,0,1)
x2<-c(-1,-1,-1,0,0,0,1,1,1,-1,-1,-1,0,0,0,1,1,1,-1,-1,-1,0,0,0,1,1,1)
x3<-c(-1,-1,-1,-1,-1,-1,-1,
given the data below
x1<-c(-1,0,1,-1,0,1,-1,0,1,-1,0,1,-1,0,1,-1,0,1,-1,0,1,-1,0,1,-1,0,1)
y<-c(-1,-1,-1,0,0,0,1,1,1,-1,-1,-1,0,0,0,1,1,1,-1,-1,-1,0,0,0,1,1,1)
z<-c(-1,-1,-1,-1,-1,-1,-1,-1,-1,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1)
using maple i can fit as below and get (1)
#PolynomialFit(3, x1,
how do i use set.seed? for example i want to generate fix x with different
value of y each time i.e
genarate x<-rnorm(10)
generate y<-rnorm(10)
i want have x fix but y changes at each iteration. this what i try but is not
working
{
set.seed(100)
x<-10*runif(10)
}
x
set.seed(y<-rnorm(10))
y
please, how can i generate ten different estimated parameter with multiple y,
response from the following response.
> true.slope<-5
> true.err.var<-3.7
> n.iter<-100
> s.sample<-10
> estimates<-matrix(NA,nrow=n.iter,ncol=2)
>
> list<-list()
> s.sample<-10
> x<-10*runif(s.sample)
>
> for(i in
kindly help and guide me how i can correct this code, my target is to find
x1,x2,x3 but when the matrix is positive definite i do get
the solution correctly as you can see from the code but when the matrix is
indefinite we dont get the solution . i want know how i can correct this
problem if th
kindly help me fine what is the mistake with following:
my aim is to compute those steps and obtain a vector with values (3,5)
but i am geting (NAN,NAN)
Q<-matrix(c(5,-3,-3,2),2,2)
b<-rbind(0,1)
H0<-diag(2)
x0<-rbind(0,0)
d0<-b
g0<--b
a0<--(t(g0)%*%d0)/(t(d0)%*%Q%*%d0)
x1<-x0+a0[,1]*d0
dx0<-x1-x
kindly help find out why the following code is given me error
time<-c(80,80,90,90,85,85,85,85,85,85,92,77,85,85)
> tem<-c(170,180,170,180,175,175,175,175,175,175,175,175,182.07,167.93)
> yield<-c(80.5,81.5,82,83.5,83.9,84.3,84,79.7,79.8,79.5,78.4,75.6,78.6,77)
> Block<-c("B1","B1","B1","B1","B1"
x1<-c(5.548,4.896,1.964,3.586,3.824,3.111,3.607,3.557,2.989,18.053,3.773,1.253,2.094,2.726,1.758,5.011,2.455,0.913,0.890,2.468,4.168,4.810,34.319,1.531,1.481,2.239,4.204,3.463,1.727)
y<-c(2.590,3.770,1.270,1.445,3.290,0.930,1.600,1.250,3.450,1.096,1.745,1.060,0.890,2.755,1.515,4.770,2.220,0.590,0.5
hi
I have a nonlinear regression model with two parameter, i have estimated using
nls in R
and i want to also find the estimate using MM, someone refer me to this
function nlrob
but this is main for only M estimate. can you please help me findout a
function in R for MM nonlinear regression
th
kindly help correct this program as given below i run and run is given me some
error and i want to estimate
robust MM
rm(list=ls())
require(stats)
require(robustbase)
x1<-as.matrix(c(5.548,4.896,1.964,3.586,3.824,3.111,3.607,3.557,2.989))
y<-as.matrix(c(2.590,3.770,1.270,1.445,3.290,0.93
:
kindly help correct this program as given below i run and run is given me some
error
rm(list=ls())
require(stats)
require(robustbase)
x1<-as.matrix(c(5.548,4.896,1.964,3.586,3.824,3.111,3.607,3.557,2.989))
y<-as.matrix(c(2.590,3.770,1.270,1.445,3.290,0.930,1.600,1.250,3.450))
kindly help correct this program as given below i run and run is given me some
error
rm(list=ls())
require(stats)
require(robustbase)
x1<-as.matrix(c(5.548,4.896,1.964,3.586,3.824,3.111,3.607,3.557,2.989))
y<-as.matrix(c(2.590,3.770,1.270,1.445,3.290,0.930,1.600,1.250,3.450))
x2<-as.
given the model
y = x1 / 1+ b1x2^b2
given data
y<-c(2,3,4,5,6)
x1<- c(0.23,0.32,0.43,0.54,0.65)
x2<-c(0.11,021,0.31,0.41,0.33)
initial parameter
b1=0.023
b2=0.045
i am able to find the parameter of the above model usingnls method,
can u please give hint on how i can solve the same model as above
[[1]]
[,1] [,2]
[1,] 0.003632559 0.2190629
[2,] -2.090772847 0.2190629
[[2]]
[,1] [,2]
[1,] 0.004278991 0.04337005
[2,] 0.190723602 0.04337005
[[3]]
[,1] [,2]
[1,] 0.01237827 -0.01544811
[2,] 0.06452200 -0.01544811
g<-c(1,2,3)
function(g,
> y <- c(5.5199668, 1.5234525, 3.3557000, 6.7211704, 7.4237955, 1.9703127,
+ 4.3939336, -1.4380091, 3.2650180, 3.5760906, 0.2947972, 1.0569417)
> x <- c(1, 0, 0, 4, 3, 5, 12, 10, 12, 100, 100, 100)
>
> fn<-function(x,y){
+ lreg<-lm(y ~ x)
+ }
> fn(x,y)
>
> b<-coef(fn)
On Sunday, November 3, 2013 3:17 PM, IZHAK shabsogh wrote:
Hi,
another problem after getting the above hessian matrix i am suppose to use it
and fine the sum of the product
of the hessian and the residuals, for the hessian is generated from the above
while the residual is also obtain
below is a code to compute hessian matrix , which i need to generate 29 number
of different matrices for example first element in x1 and x2 is use to generate
let say matrix (M1) and second element in x1 and x2 give matrix (M2) upto
matrix (M29) corresponding to the total number of observations
21 matches
Mail list logo