similar to: model.frame(), model.matrix(), and derived predictor variables

Displaying 20 results from an estimated 20000 matches similar to: "model.frame(), model.matrix(), and derived predictor variables"

2012 Jan 09
2
Joint confidence interval for fractional polynomial terms
Dear R users, The package 'mfp' that fits fractional polynomial terms to predictors. Example: data(GBSG) f <- mfp(Surv(rfst, cens) ~ fp(age, df = 4, select = 0.05) + fp(prm, df = 4, select = 0.05), family = cox, data = GBSG) print(f) To describe the association between the original predictor, eg. age and risk for different values of age I can plot it the polynomials
2003 Apr 07
3
spline with multiple predictor vars?
Hi, is there a way in R to generate a polynomial spline with multiple predictor variables? I have one response and two predictors and I'm trying to fit a spline model for this... Please cc me on the reply.. Thanks, nirmal
2006 Nov 13
1
wishlist: xlim in lines.polynomial (PR#9362)
Full_Name: Tamas K Papp Version: 2.4.0 OS: linux Submission from: (NULL) (140.180.166.160) I was using the lines.polynomial method for plotting piecewise polynomials (parts of splines). I needed a feature to limit the range of plotting using a parameter given to the function (as opposed to par("usr")). I think that the following changes would be a nice addition: lines.polynomial
2008 Oct 16
3
defining a function using strings
Hi All, I need to evaluate a series expansion using Legendre polynomials. Using the 'orthopolinom' package I can get a list of the first n Legendre polynomials as character strings. > library(orthopolynom) > l<-legendre.polynomials(4) > l [[1]] 1 [[2]] x [[3]] -0.5 + 1.5*x^2 [[4]] -1.5*x + 2.5*x^3 [[5]] 0.375 - 3.75*x^2 + 4.375*x^4 But I can't figure out how to
2006 Nov 07
1
multivariate splines
Hi, I am looking for an R package that would calculate multivarite (mostly 2d and 3d, tensor) cubic interpolating splines, so that I could evaluate these splines (and their derivatives) at many points (unkown at the time of calculating the spline polynomials) repeatedly. To make things concrete, I have an array V with dim(V) = k and gridpoint vectors grid=list(...), length(grid[[i]])==k[i],
2007 Feb 12
1
How to get the polynomials out of poly()
Hi Folks! Im using the function poly to generate orthogonal polynomials, but Id like to see the actual polynomials so that I could convert it to a polynomial in my original variable. Is that possible and if so how do I do it? /E
2011 Sep 20
2
Multivariate spline regression and predicted values
Hello, I am trying to estimate a multivariate regression of Y on X with regression splines. Y is (nx1), and X is (nxd), with d>1. I assume the data is generated by some unknown regression function f(X), as in Y = f(X) + u, where u is some well-behaved regression error. I want to estimate f(X) via regression splines (tensor product splines). Then, I want to get the predicted values for some new
2003 Apr 29
1
polynomial fitting
I'm trying to find a way to fit a polynomial of degree n in x and y to a set of x, y, and z data that I have and obtain the coefficients for the terms of the fitted polynomial. However, when I try to use the surf.ls function I'm getting odd results. > x <- seq(0, 10, length=50) > y <- x > f <- function (x, y) {x^2 + y} > library(spatial) > test <-
2004 Aug 26
1
Why terms are dropping out of an lm() model
Hi all! I'm fairly new to R and not too experienced with regression. Because of one or both of those traits, I'm not seeing why some terms are being dropped from my model when doing a regression using lm(). I am trying to do a regression on some experimental data d, which has two numeric predictors, p1 and p2, and one numeric response, r. The aim is to compare polynomial models in p1
2011 Feb 06
4
playback problems with oppo BDP-95
Thanks for bringing up this aspect, Nicholas. I seem to recall that specific hardware has a problem with certain compression levels, but I cannot recall whether that was limited to just encoding, or decoding as well. It could very well be true that I am conflating my vague memory of encoder limitations with decoder limitations. It does seem to be that the oppo BDP-95 is exhibiting
2002 Oct 08
2
Orthogonal Polynomials
Looking to the wonderful statistical advice that this group can offer. In behavioral science applications of stats, we are often introduced to coefficients for orthogonal polynomials that are nice integers. For instance, Kirk's experimental design book presents the following coefficients for p=4: Linear -3 -1 1 3 Quadratic 1 -1 -1 1 Cubic -1 3 -3 1 In R orthogonal
2009 Dec 08
1
coefficients of each local polynomial from locfit
Hi list, This was asked a couple of years ago but I can't find a resolution. Is there any way to get the coefficients from one of the local polynomial fits in locfit. I realize that locfit only constructs polynomials at a handful of intelligently selected points and uses interpolation to predict any other points. I would like to know the terms of the polynomials at these points. It seems
2001 Sep 30
2
non linear models
Dear Members of the Help List, Honestly, I feel a little bit stupid - I would like to do something rather simple: fit a non linear model to existing data, to be more precise I wanted to start with simple higher order polynomials. Unfortunately, I do not quite understand the examples in the helpfiles for the nlm, nls and nlsModel commands. Could anyone please provide a simple example to get me
2013 Apr 27
2
Polynomial Regression and NA coefficients in R
Hey all, I'm performing polynomial regression. I'm simulating x values using runif() and y values using a deterministic function of x and rnorm(). When I perform polynomial regression like this: fit_poly <- lm(y ~ poly(x,11,raw = TRUE)) I get some NA coefficients. I think this is due to the high correlation between say x and x^2 if x is distributed uniformly on the unit interval
2008 Jul 01
1
Orthogonal polynomials and poly
Dear All, I have found in the poly help this sentence: The orthogonal polynomial is summarized by the coefficients, which can be used to evaluate it via the three-term recursion given in Kennedy & Gentle (1980, pp. 343–4), and used in the predict part of the code. My question: which type of orthogonal polynomials are used by this function? Hrmite, legendre.. TIA Giovanni [[alternative HTML
2013 Jan 03
1
interpreting results of regression using ordinal predictors in R
Dear friends, Being very new to this, I was wondering if I could get some pointers and guidance to interpreting the results of performing a linear regression with ordinal predictors in R. Here is a simple, toy example: y <- c(-0.11, -0.49, -1.10, 0.08, 0.31, -1.21, -0.05, -0.40, -0.01, -0.12, 0.55, 1.34, 1.00, -0.31, -0.73, -1.68, 0.38, 1.22, -1.11, -0.20) x <-
2012 Mar 03
1
interpreting the output of a glm with an ordered categorical predictor.
Greetings. I'm a Master's student working on an analysis of herbivore damage on plants. I have a tried running a glm with one categorical predictor (aphid abundance) and a binomial response (presence/absence of herbivore damage). My predictor has four categories: high, medium, low, and none. I used the "ordered" function to sort my categories for a glm. ah <-
2001 Jul 09
1
polynomial regression and poly
When doing polynomial regression I believe it is a good idea to use the poly function to generate orthogonal polynomials. When doing this in Splus there is a handy function (transform.poly I think) to convert the coefficients produced by regression with the poly function back to the original scale. Has somebody written something similar for R ? Robert
2005 Nov 08
1
Need advice about models with ordinal input variables
Dear colleagues: I've been storing up this question for a long time and apologize for the length and verbosity of it. I am having trouble in consulting with graduate students on their research projects. They are using surveys to investigate the sources of voter behavior or attitudes. They have predictors that are factors, some ordered, but I am never confident in telling them what
2009 Feb 08
0
recursive derivative a list of polynomials
Dear list, This is quite a specific question requiring the package orthopolynom. This package provides a nice implementation of the Legendre polynomials, however I need the associated Legendre polynomial which can be readily expressed in terms of the mth order derivative of the corresponding Legendre polynomial. (For the curious, I'm trying to calculate spherical harmonics [*]).