similar to: regression constraints?

Displaying 20 results from an estimated 5000 matches similar to: "regression constraints?"

2000 Sep 04
3
somebody's stolen my probabilities
gday gurus, could someone please help me with this one? Can't find it in the doco. summary of my lm object gives "Pr(>|t|)" but coef doesn't. How do I get hold of these probabilities within an object? There doesn't seem to be an appropriate attribute within the object - I was hoping for something like "my.lm$probabilies". I was hoping to grab the best t
2007 Dec 12
3
lm/model.matrix confusion (? bug)
Dear List-members, Hopefully someone will help through my confusion: In order to get the same coefficients as we get from the following ## require (MASS) summary ( lm(Gas ~ Insul/Temp - 1, data = whiteside) ) ...................... we need to do the following (if we use model.matrix to specify the model) ## summary ( lm(Gas ~ model.matrix(~ Insul/Temp - 1) - 1, data = whiteside) )
2000 Oct 04
5
postscript preview
gday R friends, I was wondering if anyone could help me with some graphics issues please. I'm processing R in batch on redhat6.2 with some graphics to be imported into msword on NT. For scaling within my doco I want some vector type graphics. win.metafile doesn't seem to be supported on redhat which gives me postscript. postscript is ideal but doesn't contain a preview so I
2001 May 01
3
Factor Analysis
Thanks to Brian Ripley for the time and effort put into developing the factanal package for R. I have found it very useful. However, in trying to replicate some results from previous research, I have run into the need for a couple of extensions and was wondering if they might find their way into future implementations. 1. Though maximum likelihood estimates might be more rigorous and
2008 Mar 05
1
testing for significantly different slopes
Hi, How would one go about determining if the slope terms from an analysis of covariance model are different from eachother? Based on the example from MASS: library(MASS) # parallel slope model l.para <- lm(Temp ~ Gas + Insul, data=whiteside) # multiple slope model l.mult <- lm(Temp ~ Insul/Gas -1, data=whiteside) # compare nested models: anova(l.para, l.mult) Analysis of Variance
2018 Dec 15
2
Documentation examples for lm and glm
A pragmatic solution could be to create a simple linear regression example with variables in the global environment and then another example with a data.frame. The latter might be somewhat more complex, e.g., with several regressors and/or mixed categorical and numeric covariates to illustrate how regression and analysis of (co-)variance can be combined. I like to use MASS's whiteside
2001 Feb 19
1
ghostscript errors
gday R friends, Since I had random errors with ghostscript 6.01 I thought I'd upgrade. After upgrading to gs6.5 I've had problems. Originally, gs failed complaining about lack of "__sysconf" in glibc2.2 so I upgraded glibc. Now I get this. Note that it used to work with gs6.01. I realise this is probably a ghostscript problem but you never know... thanks, John Strumila >
2010 Feb 08
3
What is the equivalent function in R to xyplot in S?
Page 140 of MASS uses the function xyplot. But I don't find it in R. Is there a package that I should load to use xyplot. Or there is a function with a different name in R that does the same thing as xyplot in S. xyplot(Gas ~ Temp | Insul, whiteside, panel = function(x, y, ...) { panel.xyplot(x, y, ...) panel.lmline(x, y, ...) }, xlab = "Average external temperature (deg. C)", ylab
2001 Jan 11
1
lm variable name limit?
gday R gurus, has anyone seen this lm problem? When I add 2 bytes to the variable name (via names), lm returns an error. It's as if there's a limit to the size of the variable names. Any suggestions? thanks, John Strumila > names(y)[12:14] [1] "Log.SQLServer.Locks.RID.Lock.Wait" "Log.SQLServer.Lock" [3] "xxaa"
2000 Aug 17
2
R on os390
G'day R friends, I didn't get any replies on the main list so I thought I'd try with the experts. I was wondering if anyone's ported R to os390. If so, are the vsize and nsize limits the same as other platforms? I could really annoy those SAS guys then. thanks, John Strumila john.strumila@team.telstra.com
2002 Jun 19
1
superscripts in xyplot labels
R-helpers; I tried to get a superscripted 3 in the following xyplot example but failed: >data(whiteside) >xyplot(Gas ~ Temp | Insul, whiteside, panel = function(x, y, ...) { panel.xyplot(x, y, ...) panel.lmline(x, y, ...) }, xlab = "Average external temperature (deg. C)", ylab = paste(paste("Gas consumption (1000", expression(ft^3),")"), aspect
2009 Mar 22
3
data analysis. R
so i am having this question what should i do if the give data file (.txt) has 4 columns, but different lengths? how can i read them in R? any idea for the following problem? Gas consumption (1000 cubic feet) was measured before and after insulation was put into a house. We are interested in looking at the effect of insulation on gas consumption. The average outside temperature (degrees celcius)
2002 Jan 07
1
internet2 and proxies
gday R gurus, I've never attempted to use download.file before on my win2k machine but this version 1.4 looks exciting. However, I'm not getting something right. I've passed my R shortcut --internet2 and I can tell it's using the wininet calls because it's asking about authentication but how do I tell it my username/password? The help file only talks about user/pw for non
2000 Sep 26
3
lm -- significance of x coefficient when I(x^2) is used
In "Modern Applied Statistics with S-Plus" 3rd ed., footnote on page 153 regarding a model lm(Gas~Insul/(Temp+I(Temp^2))-1,whiteside), I read "Notice that when the quadratic terms are present, first degree coefficients mean 'the slope of the curve at temperature zero', so a non-significant value does not mean that the linear term is not needed.
2018 Dec 16
3
Documentation examples for lm and glm
On Sat, 15 Dec 2018, frederik at ofb.net wrote: > I agree with Steve and Achim that we should keep some examples with no > data frame. That's Objectively Simpler, whether or not it leads to > clutter in the wrong hands. As Steve points out, we have attach() > which is an excellent language feature - not to mention with(). Just for the record: Personally, I wouldn't recommend
2000 Jul 26
3
merge aint merging
g'day R friends, can anyone please help me with a frustrating merge? The number of rows of a resulting merge is the smaller of the 2 dataframes used as input. What am I doing wrong? I'm using 1.1.0 on redhat 6.2 thanks, John Strumila > xx[1:10,] datetime c 948992940 948992940 0 948993000 948993000 0 948993060 948993060 0 948993120 948993120 0 948993180 948993180 0
2008 Feb 23
3
using subset() in data frame
R folks, As an R novice, I struggle with the mystery of subsetting. Textbook and online examples of this seem quite straightforward yet I cannot get my mind around it. For practice, I'm using the code in MASS Ch. 6, "whiteside data" to analyze a different data set with similar variables and structure. Here is my data frame: ###subset one of three cases for the variable
2011 Sep 08
3
global optimisation with inequality constraints
Dear All, I would like to minimise a nonlinear function subject to linear inequality constraints as part of an R program. I have been using the constrOptim function. I have tried all of the methods that come with Optim, but nothing finds the correct solution. If I use the correct solution as the vector of starting values, though, my program does output the correct solution and optimum - the
2009 Feb 16
2
solve.QP with box and equality constraints
Dear list, I am trying to follow an example that estimates a 2x2 markov transition matrix across several periods from aggregate data using restricted least squares. I seem to be making headway using solve.QP(quadprog) as the unrestricted solution matches the example I am following, and I can specify simple equality and inequality constraints. However, I cannot correctly specify a constraint
2008 Dec 28
1
Logistic regression with rcs() and inequality constraints?
Dear guRus, I am doing a logistic regression using restricted cubic splines via rcs(). However, the fitted probabilities should be nondecreasing with increasing predictor. Example: predictor <- seq(1,20) y <- c(rep(0,9),rep(1,10),0) model <- glm(y~rcs(predictor,n.knots=3),family="binomial") print(1/(1+exp(-predict(model)))) The last expression should be a nondecreasing