|
Are there implementations of, e.g. Neville's algorithm, for interpolating polynomials through some data points? Nevilles' is an improvement on Lagrange interpolation. And how about interpolating rational functions? I could not find anything at rseek.org or at crantastic.org.
thanks |
|
Neville's algorithm is not an "improvement" on Lagrange interpolation, it is simply one way of calculating it that has some useful properties. The result is still the Lagrange interpolating polynomial, though, with all its flaws.
Implementing Neville's algorithm is fairly easy using the PolynomF package, but I'm not sure if it really offers much advantage. YMMV. Bill Venables. -----Original Message----- From: [hidden email] [mailto:[hidden email]] On Behalf Of dslowik Sent: Tuesday, 14 June 2011 10:34 AM To: [hidden email] Subject: [R] functions for polynomial and rational interplation? Are there implementations of, e.g. Neville's algorithm, for interpolating polynomials through some data points? Nevilles' is an improvement on Lagrange interpolation. And how about interpolating rational functions? I could not find anything at rseek.org or at crantastic.org. thanks -- View this message in context: http://r.789695.n4.nabble.com/functions-for-polynomial-and-rational-interplation-tp3595334p3595334.html Sent from the R help mailing list archive at Nabble.com. ______________________________________________ [hidden email] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. ______________________________________________ [hidden email] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. |
|
Bill,
Thank you for the correction; yes, Nevilles' is an algorithm to produce the same Lagrange interpolating polynomial. And thank you for the polynomF package! Don Slowik |
|
Dear List, I wanted to calculate the asymmetrical confidence interval based on the sample statistic and standard error that available from the published report (complex survey-based). The calculation details can be seen from pages 17-18 of the document at the following link: http://www.oas.samhsa.gov/nsduh/2k5MRB/2k5statInference.pdf. Could someone tell me whether R has any function included in it "survey" or other contributed package of R. Thank you in advance, Pradip Muhuri ______________________________________________ [hidden email] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. |
|
On Thu, 16-Jun-2011 at 04:43PM -0400, Muhuri, Pradip (SAMHSA/CBHSQ) wrote:
|> |> Dear List, |> |> I wanted to calculate the asymmetrical confidence interval based on |> the sample statistic and standard error that available from the |> published report (complex survey-based). |> The calculation details can be seen from pages 17-18 of the |> document at the following link: |> http://www.oas.samhsa.gov/nsduh/2k5MRB/2k5statInference.pdf. |> |> Could someone tell me whether R has any function included in it |> "survey" or other contributed package of R. There might be one in a package somewhere, but it's so trivial to make your own function by using the information you already have. This is sounding suspiciously like a homework question. -- ~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~. ___ Patrick Connolly {~._.~} Great minds discuss ideas _( Y )_ Average minds discuss events (:_~*~_:) Small minds discuss people (_)-(_) ..... Eleanor Roosevelt ~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~. ______________________________________________ [hidden email] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. |
|
In reply to this post by Muhuri, Pradip (SAMHSA/CBHSQ)
Hi Muhuri,
What do you suspect the underlying distribution is of your statistic? ----------------Contact Details:------------------------------------------------------- Contact me: [hidden email] | 972-52-7275845 Read me: www.talgalili.com (Hebrew) | www.biostatistics.co.il (Hebrew) | www.r-statistics.com (English) ---------------------------------------------------------------------------------------------- On Thu, Jun 16, 2011 at 11:43 PM, Muhuri, Pradip (SAMHSA/CBHSQ) < [hidden email]> wrote: > > Dear List, > > I wanted to calculate the asymmetrical confidence interval based on the > sample statistic and standard error that available from the published report > (complex survey-based). > > The calculation details can be seen from pages 17-18 of the document at the > following link: > http://www.oas.samhsa.gov/nsduh/2k5MRB/2k5statInference.pdf. > > > Could someone tell me whether R has any function included in it "survey" or > other contributed package of R. > > Thank you in advance, > > Pradip Muhuri > > ______________________________________________ > [hidden email] mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide > http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. > [[alternative HTML version deleted]] ______________________________________________ [hidden email] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. |
|
In reply to this post by Patrick Connolly-4
Dear Patrick,
I do agree with you that it is a very simple problem. Actually, I do have the following SAS program written to compute the asymmetrical confidence interval. As a new user of R, I just wanted to see the corresponding codes in R if they already exist. Thanks, Pradip *SAS program begins here; /******************************************************** MEAN = prevalence rate PLOWER = lower 95% confidence limit for the rate PPER = upper 95% confidence limit for the rate TLOWER = lower 95% confidence limit for the total TUPPER = upper 95% confidence limit for the total Calculate the 95% CI FOR PREVALENCE RATES AND TOTALS ********************************************************/ IF MEAN=0 OR MEAN=1 THEN DO; L=.; NUMBER=.; A=.; B=.; PLOWER=.; PUPPER=.; TLOWER=.; TUPPER=.; END; ELSE DO; L=LOG(MEAN/(1-MEAN)); NUMBER=SEMEAN/(MEAN*(1-MEAN)); A=L-1.96*NUMBER; B=L+1.96*NUMBER; PLOWER=1/(1+EXP(-A)); PUPPER=1/(1+EXP(-B)); TLOWER=WSUM*PLOWER; TUPPER=WSUM*PUPPER; END; RUN; *SAS program ends here: Pradip K. Muhuri, PhD Statistician Substance Abuse & Mental Health Services Administration The Center for Behavioral Health Statistics and Quality Division of Population Surveys 1 Choke Cherry Road, Room 7-1023 Rockville, MD 20857 Tel: 240-276-1070 Fax: 240-276-1260 e-mail: [hidden email] The Center for Behavioral Health Statistics and Quality your feedback. Please click on the following link to complete a brief customer survey: http://cbhsqsurvey.samhsa.gov -----Original Message----- From: Patrick Connolly [mailto:[hidden email]] Sent: Sunday, June 19, 2011 1:57 AM To: Muhuri, Pradip (SAMHSA/CBHSQ) Cc: [hidden email]; '[hidden email]' Subject: Re: [R] Asymetrical Confidence Interval On Thu, 16-Jun-2011 at 04:43PM -0400, Muhuri, Pradip (SAMHSA/CBHSQ) wrote: |> |> Dear List, |> |> I wanted to calculate the asymmetrical confidence interval based on |> the sample statistic and standard error that available from the |> published report (complex survey-based). |> The calculation details can be seen from pages 17-18 of the |> document at the following link: |> http://www.oas.samhsa.gov/nsduh/2k5MRB/2k5statInference.pdf. |> |> Could someone tell me whether R has any function included in it |> "survey" or other contributed package of R. There might be one in a package somewhere, but it's so trivial to make your own function by using the information you already have. This is sounding suspiciously like a homework question. -- ~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~. ___ Patrick Connolly {~._.~} Great minds discuss ideas _( Y )_ Average minds discuss events (:_~*~_:) Small minds discuss people (_)-(_) ..... Eleanor Roosevelt ~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~. ______________________________________________ [hidden email] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. |
|
Learn to search the Archives (or at least one of the forms of the
Archives) http://search.r-project.org/cgi-bin/namazu.cgi?query=confidence+interval+logit+proportion&max=100&result=normal&sort=score&idxname=functions&idxname=Rhelp08&idxname=Rhelp10&idxname=Rhelp02 (That is constructed with an URL I use for the purpose that brings up the RSiteSearch page with different parameters than are currently in the default implementation. This is an R function that does the same: > rhelpSearch function(string, restrict = c("Rhelp10", "Rhelp08", "Rhelp02", "functions" ), matchesPerPage = 100, ...) RSiteSearch(string=string, restrict = restrict, matchesPerPage = matchesPerPage, ...) -- David On Jun 20, 2011, at 8:50 AM, Muhuri, Pradip (SAMHSA/CBHSQ) wrote: > Dear Patrick, > > > I do agree with you that it is a very simple problem. Actually, I > do have the following SAS program written to compute the > asymmetrical confidence interval. > > As a new user of R, I just wanted to see the corresponding codes in > R if they already exist. > > Thanks, > > Pradip > > > > *SAS program begins here; > > /******************************************************** > MEAN = prevalence rate > PLOWER = lower 95% confidence limit for the rate > PPER = upper 95% confidence limit for the rate > TLOWER = lower 95% confidence limit for the total > TUPPER = upper 95% confidence limit for the total > > Calculate the 95% CI FOR PREVALENCE RATES AND TOTALS > ********************************************************/ > > IF MEAN=0 OR MEAN=1 THEN DO; > L=.; > NUMBER=.; > A=.; B=.; > PLOWER=.; PUPPER=.; TLOWER=.; TUPPER=.; > END; > > > ELSE DO; > > L=LOG(MEAN/(1-MEAN)); > NUMBER=SEMEAN/(MEAN*(1-MEAN)); > A=L-1.96*NUMBER; > B=L+1.96*NUMBER; > PLOWER=1/(1+EXP(-A)); PUPPER=1/(1+EXP(-B)); > TLOWER=WSUM*PLOWER; TUPPER=WSUM*PUPPER; > > END; > > RUN; > > *SAS program ends here: > > > Pradip K. Muhuri, PhD > Statistician > Substance Abuse & Mental Health Services Administration > The Center for Behavioral Health Statistics and Quality > Division of Population Surveys > 1 Choke Cherry Road, Room 7-1023 > Rockville, MD 20857 > > Tel: 240-276-1070 > Fax: 240-276-1260 > e-mail: [hidden email] > > > The Center for Behavioral Health Statistics and Quality your > feedback. Please click on the following link to complete a brief > customer survey: http://cbhsqsurvey.samhsa.gov > > -----Original Message----- > From: Patrick Connolly [mailto:[hidden email]] > Sent: Sunday, June 19, 2011 1:57 AM > To: Muhuri, Pradip (SAMHSA/CBHSQ) > Cc: [hidden email]; '[hidden email]' > Subject: Re: [R] Asymetrical Confidence Interval > > On Thu, 16-Jun-2011 at 04:43PM -0400, Muhuri, Pradip (SAMHSA/CBHSQ) > wrote: > > |> > |> Dear List, > |> > > |> I wanted to calculate the asymmetrical confidence interval based on > |> the sample statistic and standard error that available from the > |> published report (complex survey-based). > > |> The calculation details can be seen from pages 17-18 of the > |> document at the following link: > |> http://www.oas.samhsa.gov/nsduh/2k5MRB/2k5statInference.pdf. > > |> > |> Could someone tell me whether R has any function included in it > |> "survey" or other contributed package of R. > > There might be one in a package somewhere, but it's so trivial to make > your own function by using the information you already have. > > This is sounding suspiciously like a homework question. > > > -- > ~ > .~ > .~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~. > ___ Patrick Connolly > {~._.~} Great minds discuss ideas > _( Y )_ Average minds discuss events > (:_~*~_:) Small minds discuss people > (_)-(_) ..... Eleanor Roosevelt > > ~ > .~ > .~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~. > > ______________________________________________ > [hidden email] mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. David Winsemius, MD West Hartford, CT ______________________________________________ [hidden email] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. |
| Powered by Nabble | Edit this page |
