Displaying 20 results from an estimated 1000 matches similar to: "graphing regression coefficients and standard errors"
2008 Jul 18
2
matrix multiplication question
Hello,
I am a newcomer to R and therefore apologize for posting such a
basic question. I am
trying to multiply 2 matrices t(X1)%*%X1, where t(X1) is:
1 2 3 4 5 8 12 13 20 24 26 27 31 33 34 36 37 40 41 42 45 46
47 48 49
ones 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
1 1 1 1 1
Shadow 0 1 1 1 1 1 1 1 0 1 1 1 1 0 1 0
2008 Jul 25
3
Maximization under constraits
I''m looking for a R function which can maximise this logliklihood function,
under the constraits a>0 e b>0
f<-function(param){
a<-param[1]
b <-param[2]
log(prod)-(a*s2)-(b*s)-n*log(1-((0.5*b/sqrt(a))*(exp((b^2)/(4*a)))*((sqrt(pi
))*(1-pnorm(-b/(2*sqrt(a)), mean=0, sd=1)))))}
I''ve tried maxlik constrOptim e donlp2 but without success.
Thanks so
2006 Nov 26
1
problem loading package Hmisc
Hi,
I installed the package Hmisc with the command
install.packages("Hmisc") without errors. When I try to load the
library with command library(Hmisc) I get the error
> library(Hmisc)
Error in library(Hmisc) : there is no package called 'Hmisc'
> version
_
platform i386-pc-linux-gnu
arch i386
os linux-gnu
system i386,
2008 Dec 06
1
Kaplan-Meier function from survfit
Hi All,
Please pardon me if I am missing something obvious here. How do I get
the Kaplan-Meier estimate function that is created by survfit and
plotted by the code.
fit <- survfit(Surv(time, status) , data=aml)
plot(fit)
That is, I need a function that will give me the survival estimate at
a given time: \hat{S}(t).
Thanks in advance.
Ritwik Sinha
ritwik.sinha at gmail.com | +12033042111 |
2006 Jun 14
3
A question about stepwise procedures: step function
Dear all,
I tried to use "step" function to do model selection, but I got an error massage. What I don't understand is that data as data.frame worked well for my other programs, how come I cannot make it run this time. Could you please tell me how I can fix it?
***************************************************************************************************
2006 Aug 23
5
two density curves in one plot?
Hello,
I was wondering if I can plot two curves I get from "density(data)" into
one plot. I want to compare both.
With the following commad, I just get one curve plotted:
plot( density(mydata) )
Sorry for this stupid question but I could not find a solution until now...
Antje
2007 Oct 29
3
using survfit
hie
when i use plot.survfit to plot more than one graph why I only see the last graph how do i see the other graphs.for example
n=20
n1=n/2
n2=n/4
a11=4;a12=4 ;a21=4 ;a22=4
t1<-array(1,c(n1))
t2<-array(2,c(n1))
treatgrp=matrix(c(t1,t2))
2006 Sep 27
2
Histogram
Dear all,
I want to design a histogram and I need to have the frequency at certain
points. For example I have the following 2 columns:
*X Y*
0.1 25
0.4 22
0.45 11
0.55 21
I want the chart to have 4 columns. First column is from 0.0-0.1 (on X) and
frequency is 25. Next colum is wider and form 0.1-0.4 with 22 frequency.
Next column is narrow with 11 frequency and the last column is
2006 Sep 30
3
Textmate project drawer: is there a Windows alternative?
I was reading about the project drawer feature in Textmate, which is Mac
only.
Is there a similar feature in a Windows based text editor that works with R.
This feature sounds really useful.
Thanks,
Graham
[[alternative HTML version deleted]]
2006 Aug 23
1
covariance matrix of predictions
Hi !
I am trying to get at the covariance of the predictions of a linear model. Suppose the we have:
> x<-runif(1000)
> y<-2 + 25x*x +rnorm(1000)
> lm1 <-lm(y~x, data = data.frame(y = y, x=x))
> x.pred <-runif(10)
> y.hat <- predict(lm1, newdata = data.frame(x=x.pred))
I was wondering how to get an estimate of the covariance of y.hat which would be a 10 x 10
2006 Oct 27
2
Multivariate regression
Hi,
Suppose I have a multivariate response Y (n x k) obtained at a set of
predictors X (n x p). I would like to perform a linear regression taking
into consideration the covariance structure of Y within each unit - this
would be represented by a specified matrix V (k x k), assumed to be the same
across units. How do I use "lm" to do this?
One approach that I was thinking of
2006 Sep 29
6
List-manipulation
Hi,
Sorry for the question, I know it should be basic knowledge but I'm
struggling for two hours now.
How do I select only the first entry of each list member and ignore the
rest?
So for
> $"121_at"
> -113691170
> $"1255_g_at"
> 42231151
> $"1316_at"
> 35472685 35472588
> $"1320_at"
> -88003869
2006 Aug 04
2
plotting picture data
Hi R users
I have a dataset which represents points that are market by patients as the
source of pain.
Basically the patients indicates by a cross on a chest pictures where he/she
thinks is the
source of pain. The data was then digitalized by divinding the chest into
small squares and each
square was give value 1 if it was the center 2 if it was touched by the
markings and 3 if it was not
2007 Aug 13
1
p value statistic for lm object
Hi,
I conduct a univariate regression with lm function. I would like to get
the p value for the regression. Is there a method that would enable me to
extract the p value into a variable.
Thanks.
Arjun Bhandari
**************************************************************************************************************
This email and any files transmitted with it are confidentia...{{dropped}}
2004 Aug 25
3
Help using Hmisc / Latex
Dear R users,
I'm trying to automatically generate a *.tex file with the output of an OLS
estimation. Some people suggested to use the latex function on the Hmisc
package. I'm having a bit of trouble to properly specify this function (I'm
not a very experienced R user). Below you will find an example, of what I'm
doing.
## Annette Dobson (1990) "An Introduction to Generalized
2004 May 30
1
summary.lm
I ran across this error the other day while using lm(). I confess that I
haven't used it for awhile and haven't been tracking the changes between
versions of R. However, the piece of code below is a tiny modification of
the example in the help file for "lm". I just separated the commands apart
for clarity. A similar piece comes from the help file for
2005 Apr 20
2
heckit / tobit estimation
Dear All,
we (Ott Toomet and I) would like to add functions for maximum likelihood (ML)
estimations of generalized tobit models of type 2 and type 5 (*see below) in
my R package for microeconomic analysis "micEcon". So far we have called
these functions "tobit2( )" and "tobit5( )".
Are these classifications well known? How are these functions called in other
2007 May 04
2
Library & Package for Tobit regression
Hello R-Users:
I am want to use tobit regression for left censored panel/longitudinal data. Could you please provide me the name of "library" and/or "package" that will give me option of fitting tobit regression model for longitudinal data?
Thank you.
Sattar
__________________________________________________
[[alternative HTML version deleted]]
2011 Mar 10
2
tobit regression model
Hi,
I'm trying to fit a tobit regression model to some data. When fitting the
exact same data in Stata, I have no problems at all, however R won't
converge. Its not a maxiters thing, since I've tried increasing this
already. I need to be able to fit the model in R since there are users of
the code that don't have a Stata license.
The code is:
require(AER)
left = 3.218476
x =
2012 Apr 02
1
Bootstrapped Tobit regression - get standard error 0...
I am trying to work out a bootstrapped Tobit regression model. I get the
coefficients all right, but they all have standard error zero. And I am
unable to figure out why. I know the coefficients are correct because that's
what I get when do a Tobit (without bootstrapping). Here's my code:
# Bootstrap 95% CI for Tobit regression coefficients?
library(boot)
library(AER) # for the Affairs