search for: intercept1

Displaying 6 results from an estimated 6 matches for "intercept1".

Did you mean: intercept
2011 Jul 07
3
coefficients lm of data.frame
...655 9 0.08065333 0.22168589 10 0.25196536 0.84619914 11 -0.59536986 -0.08243074 12 1.09115054 0.49822977 I need to add two columns as result of the fitting of linear model based on a preset numbers of row. For example if I need to compute a lm each 4 rows, I get the data.frame below, where intercept1 and coeff1 is obtained from V1 and V2 of first 4 rows lm(V2 ~ V1), and so on... V1 V2 "intercept" "coeff" 1 0.6931694 0.05797771 intercept1 coeff1 2 -1.4069786 0.23983307 intercept1 coeff1 3 -1.4901708 0.45079601 intercept1 coeff1 4 0.2215696...
2003 Jan 22
1
something wrong when using pspline in clogit?
...4*xvar)/(1+exp(0.5+0.4*xvar)))) library(Nnet) mult.fit<-multinom(data.mult~xvar) coef(mult.fit) library(survival) choice<-c(ifelse(data.mult==0,1,0),ifelse(data.mult==1,1,0),ifelse(data.mult==2,1,0),ifelse(data.mult==3,1,0)) temp<-list(time=2-choice, status=choice, intercept1=c(rep(0,length(data.mult)),rep(1,length(data.mult)),rep(0,length(data.mult)),rep(0,length(data.mult))), intercept2=c(rep(0,length(data.mult)),rep(0,length(data.mult)),rep(1,length(data.mult)),rep(0,length(data.mult))), intercept3=c(rep(0,length(data.mult)),rep(0,length(dat...
2007 Jun 09
1
How to plot vertical line
Hi,I have a result from polr which I fit a univariate variable (of ordinal data) with probit function. What I would like to do is to overlay the plot of my fitted values with the different intercept for each level in my ordinal data. I can do something like:lines(rep(intercept1, 1000), seq(from=0,to=max(fit),by=max(fit)/1000))where my intercept1 is, for example, the intercept that breaks between y=1 and y=2 labels and the max(fit) is the maximum of overall fitted values or maximum of all ordinal y labels. I'm wondering if there is better way to do this? If you could l...
2005 Jan 20
1
Windows Front end-crash error
...u<-c(100,150,200,250) Sigma<-matrix(c(400,80,80,80,80,400,80,80,80,80,400,80,80,80,80,400),4,4 ) mu2<-c(0,0,0) LE<-8^2 #Linking Error Sigma2<-diag(LE,3) sample.size<-5000 N<-100 #Number of datasets #Take a single draw from VL distribution vl.error<-mvrnorm(n=N, mu2, Sigma2) intercept1 <- 0 slope1 <- 0 intercept2 <- 0 slope2 <- 0 for(i in 1:N){ temp <- data.frame(ID=seq(1:sample.size),mvrnorm(n=sample.size, mu,Sigma)) temp$X5 <- temp$X1 temp$X6 <- temp$X2 + vl.error[i,1] temp$X7 <- temp$X3 + vl.error[i,2] temp$X8 <- temp$X4 + vl.error[i,3...
2017 Dec 20
1
Nonlinear regression
...>##The data >ce <- c(15.17, 42.15, 69.12, 237.7, 419.77) >qe <- c(17.65, 30.07, 65.36, 81.7, 90.2) > >##The linearized data >celin <- 1/ce >qelin <- 1/qe > >plot(ce, qe, xlim = xlim, ylim = ylim) > >##The linear model >fit1 <- lm(qelin ~ celin) >intercept1 <- fit1$coefficients[1] >slope1 <- fit1$coeffecients[2] >summary(fit1) > >Qmax <- 1/intercept1 >Kl <- .735011*Qmax > >xlim <- range(ce, celin) >ylim <- range(qe, qelin) > >abline(lm(qelin ~ celin)) > >c <- seq(min(ce), max(ce)) >q <- (Q...
2017 Dec 20
0
Nonlinear regression
...7, 419.77) > >qe <- c(17.65, 30.07, 65.36, 81.7, 90.2) > > > >##The linearized data > >celin <- 1/ce > >qelin <- 1/qe > > > >plot(ce, qe, xlim = xlim, ylim = ylim) > > > >##The linear model > >fit1 <- lm(qelin ~ celin) > >intercept1 <- fit1$coefficients[1] > >slope1 <- fit1$coeffecients[2] > >summary(fit1) > > > >Qmax <- 1/intercept1 > >Kl <- .735011*Qmax > > > >xlim <- range(ce, celin) > >ylim <- range(qe, qelin) > > > >abline(lm(qelin ~ celin)) &gt...