Statistical Packages

153

Solutions

331

Contributors

Statistical packages are software titles, such as JMP and GNU Octave, and programming languages, such as MATLAB, R and SAS, that are used to discover, explore and analyze data and suggest useful conclusions, either to learn something unexpected or to confirm a hypothesis. The field includes the design and analysis of techniques to give approximate but accurate solutions to hard problems in statistics, econometrics, time-series, optimization and 2D- and 3D-visualization. Data analysis has multiple facets and approaches, encompassing diverse techniques under a variety of names, in different business, science, and social science domains.

Share tech news, updates, or what's on your mind.

Sign up to Post

In excel vba I need to have my set range change negatives to positive numbers and negatives to positive.
I can not seem to get it to fire.

Here what I am have been trying:

Private Sub Worksheet_Change(ByVal target As Range)
   
    'On Error Resume Next
         
    If Not Intersect(target, Range("H3:H13")) Is Nothing Then
        Set rng = Intersect(target, Range("H3:H13"))
        For Each r In rng

        Me.Unprotect
       
        Application.EnableEvents = False
       
        target.Value = target.Value / 100
       
     Next r
       
    End If
       
           
    If Not Intersect(target, Range("R3:R13")) Is Nothing Then
      Set rng = Intersect(target, Range("R3:R13"))
        For Each cell In rng
      'Me.Unprotect
     
      'For Each c In target.Cells
          cell.Value = -cell.Value
          cell.NumberFormat = "_($* #,##0_);_($* (#,##0);_($* ""-""_);_(@_)"
      Next cell
           
      End If
     
           
      Application.EnableEvents = True
     
    'Me.Protect
   
End Sub
0
Amazon Web Services
LVL 19
Amazon Web Services

Are you thinking about creating an Amazon Web Services account for your business? Not sure where to start? In this course you’ll get an overview of the history of AWS and take a tour of their user interface.

I have 2 of Dell Server PowerEdge R 510.
Both have got Windows 2019 Server as the OS right now.
I have a SAN (Storage Area Network) which is Dell PowerVault MD 3200 (12@ SAS 600GB).
I installed the “MDSM” (management software Dell Modular Disk Storage Manager at each of R 510); accordingly, from both of the R 510, I can see the MD 3200.

The Goal: I want to create some virtual machines at both R 510 which get the storage from MD 3200.

Note: I do have a little knowledge of Dell Server and no experience in VM machines; I have recently worked with Dell servers; This forum has helped me a lot; something like, it is big challenges in installing Win Server 2019 at R 510 which is INSTALLED now at both R 510, ETC.

Question: How to configure the SAN so it can be linked to VM machines at R 510?

tjie
0
How to modify the following query to add a total column of TaskSelected?

TRANSFORM COUNT(T.TaskSelected)
SELECT R.TAID, T.TaskSelected
FROM RBWS R
LEFT JOIN TaskSelected T  ON R.TaskSelectedID=T.ID
GROUP BY R.TAID
PIVOT T.TaskSelected
0
Hi All,

Please advise on the best way in a module to select query from a MSSQL db.
I have enabled ODBC etc... in PHP settings.
Have setup the DSN.
Not having much joy at all. Can query MySQL DB's of course .. but do not think I can get MSSQL to work.
Possibly I am missing an extension.

Do not want to post any code as I have tried all sorts.
I am happy with the Select.. just need to get the MSSQL connection right.

Would like to see an example I can drop into my custom extension within a module.

PHP 7.3.9
Joomla 3.9.12
Plesk 17.8.11
OS: Windows 2016.

Many thanks in advance

R
0
Hi,

Server#1(Dell R510): it is at 135 subnet
Server#2 (Dell R 510): it is at 135 subnet
The SAN (Dell MD 3200): it is at 135 subnet

Server#1, server#2 and MD 3200 are located  in the data center (Colo).

From Office (It is at different location with Colo), I can do the followings:
I can RDP to Server#1 (which from it, I can see “all network drives”),
I can install the Management software for the SAN (=Management Software Dell Modular Disk Storage Manager “MDSM”) at Server#1 remotely, then when I launch the MDSM, I can see the SAN (MD3200)

But from Server#2, I cannot see or connect to "any network drives"

Question: Why i can not see any network drives from Server#2?

tjie
0
Hi,

I have SAN Dell MD 3200:
+ We can access it through IP address
+ I have management cable which can access this SAN
+ This SAN will be used for Dell R 510 servers.

I have never experienced dealing with the SAN.

Question: Why do we need to know ADMIN PASSWORD of this MD 3200?

Thanks,
tjie
0
I am trying to learn R programming and I do not see how the following command

M = matrix( c(2,6,5,1,10,4), nrow = 2,ncol = 3,byrow = TRUE)
v = M %*% t(M)
print(v)

Open in new window


gives this output
     [,1] [,2]
[1,]   65   82
[2,]   82  117

Open in new window


when i do
 print(M)
print(t(M))

Open in new window


i see
     [,1] [,2] [,3]
[1,]    2    6    5
[2,]    1   10    4
     [,1] [,2]
[1,]    2    1
[2,]    6   10
[3,]    5    4

Open in new window


but i am not seeing how that results in
     [,1] [,2]
[1,]   65   82
[2,]   82  117

Open in new window

0
When I try to install grobi by install.packages, it fails with the attached warning. I tried R-Studio version 3.4.2 and other. However, it shows the same error message like it says "package 'gurobi' is not available (for R version 3.4.2).   It's appreciate if I can know how to install 'gurobi'.
gurobi_not_available.JPG
0
Text file to excel.
I have two set of txt file and I can import to a sheet of excel.(sheet name: R, S) But I want to import to one sheet using VBA.
Also, I want to delete duplicate value(name column) from each set of data(ex, lee from sheet R, kim and lee from sheet S)
Is it possible ?

Thank you.
0
Hi,

Finally, My Dell Power Edge R 510 is running Windows Server 2019 (actually, it is a straight forward installation).

Now, I want to install VM machines in this server.

As Dell Server, my experience in VM machine is also limited.
Can somebody direct me what would I do to create the Hyper V server 2019?

Thanks,
tjie
0
Why Diversity in Tech Matters
LVL 19
Why Diversity in Tech Matters

Kesha Williams, certified professional and software developer, explores the imbalance of diversity in the world of technology -- especially when it comes to hiring women. She showcases ways she's making a difference through the Colors of STEM program.

If I clock the speed of an object for six different trials is their a way to predict what the approximate mean and standard would be for 100 trials for the same distance?

Also is my sample of six trials too small?

Example
Trial 1:  .607 seconds
Trial 2:  .653 seconds
Trial 3:  .618 seconds
Trial 4:  .809 seconds
Trial 5:  .63 seconds
Trial 6:  .619 seconds

Mean is 6
Standard deviation is .076562
0
I've below code to SelectFolderDialog in my previous vb.net application. I'm trying to implement it to c# but didn't succeeded.

Can anyone help me to convert it to C# or any additional solution would be grateful.

Public Class SelectFolderDialog
    Implements IDisposable

    ' Wrapped dialog
    Private OFD As System.Windows.Forms.OpenFileDialog = Nothing

    ''' <summary>
    ''' Initialize our Open File Dialog object
    ''' </summary>
    Public Sub New()
        OFD = New System.Windows.Forms.OpenFileDialog()

        With OFD
            .Filter = "Folders|" & vbLf
            .AddExtension = False
            .CheckFileExists = False
            .DereferenceLinks = True
            .Multiselect = False
        End With
    End Sub

#Region "Properties"

    ''' <summary>
    ''' Gets/Sets the initial folder to be selected. A value of Nothing or Emplty selects the current directory.
    ''' </summary>
    Public Property InitialDirectory() As String
        Get
            Return OFD.InitialDirectory
        End Get
        Set(value As String)
            OFD.InitialDirectory = CType(IIf(value Is Nothing OrElse value.Length = 0, Environment.CurrentDirectory, value), String)
        End Set
    End Property

    ''' <summary>
    ''' Gets/Sets the title to show in the dialog. A value of Nothing or Empty defaults to 'Select a folder'
    ''' </summary>
    Public Property Title() As String
        Get
            Return OFD.Title
        End Get
        

Open in new window

0
Starting with a string representing a range:
string sortRange = "C10:H24";

Open in new window

This then works:
worksheet.Range[sortRange].Sort(worksheet.Range[sortRange].Columns[1], xlSortOder.xlDescending);

Open in new window

I saw worksheet.Range[sortRange] was listed twice, so I decided to refactor that out:
Excel.Range r = worksheet.Range[sortRange];
Excel.Range c = r.Columns[1];
r.Sort(c, xlSortOrder.xlDescending);

Open in new window

My refactored version gives a much different result. Why is that?
1
I thought I knew how to do this after my last post, but apparently not.  I have the following code which works fine, however, the output needs to list groups from the profile table that have no entries at all.  So, when I run the code currently, I get all the groups that have registered individuals.  However, there may be some groups that have no registered individuals and they should show up as 0, however they don't.

With TOTAL_REGISTERED as 
(select r.regdate, r.Agency
FROM   tblOrgProfile p 

LEFT JOIN tblOrgRegistrations r
ON p.AgencyID = r.AgencyID
and r.fiscal = 2020

 where active = 1 and
 r.agency <> 'Administrator')

select Agency, 
SUM(CASE when regdate >= '7/1/2019' And regdate < '10/01/2019' then 1 end) as [1st Quarter],
SUM(CASE when regdate >= '10/01/2019' And regdate < '01/01/2019' then 1 ELSE 0 end) as [2nd Quarter],
SUM(CASE when regdate >= '01/01/2020' And regdate < '04/01/2020' then 1 ELSE 0 end) as [3rd Quarter],
SUM(CASE when regdate >= '04/01/2020' And regdate < '07/01/2020' then 1 ELSE 0 end) as [4th Quarter]
from TOTAL_REGISTERED T group by Agency order by agency

Open in new window


Please note that the tables attached do not reflect exactly all the data in the actual tables.
tblOrgProfile.xlsx
tblOrgRegistrations.xlsx
0
Q: How to unite interaction columns from R emmeans package dynamically generated in R-Shiny?

I am building an R-Shiny app where I need to wrangle the output from the 'emmeans' package. However, in this interactive environment where many factors may be entered by the user, the single-tibble 'emmeans' output structure will vary with each run depending on the selections made. It could go from having only a single main effect to having multiple 3-way interactions (mixed with main effects and 2-way interactions) arranged in a wide format way.

For instance, assuming the user selects FctrA (with levels A and B) and FctrB (with levels C, D, and E), the interaction FctrA_FctrB will be automatically considered as well. When (~FctrA, ~FctrB, ~FctrA+FctrB) are submitted to 'emmeans', the output tibble is structured as follows:

- the leftmost side of the tibble contains FctrA results (levels, estimates, SE, df, CLs);
- the certermost block contains FctrB results;
- the rightmost side of the tibble contains the interaction results

So far so good except that FctrA levels columns is a single column, FctrB levels column is also a single column, but the interaction portion has its levels split into two columns, one with FctrA and one with FctrB.

The above issue impairs gathering, spreading, stacking of the separate blocks owing to the dimensional discrepancy.

My question is: How can I tell Shiny ('tidyr') to find those split interaction columns and concatenate them …
0
Hi I have a Dell Perc 740p RAID card I just put in a computer, the computer recognizes it but I can't get in with ctrl + R.  I see the post message, but this one dosen't say press ctrl + R to get into Bios.  it says...

"PowerEdge Expandable RAID controller BIOS copyright AVAGO Technologies"

Then Initializing virtual drives, then goes on it's marry way.

Question: is there another way to get into Bios?  Am I dooing something wrong?

Thanks all
0
hi,

I have a study on ETL tools and recently heard a lot of voice on just need to do ETL programming using script/coding, e.g. R and Qview, so is this means now ETL tools like MS SSIS is useless ?

what is the pros and cons on doing ETL logic by coding and ETL tools?

it seems now doing ETL code in container level with RESTFUL API already make ETL process can do load balancing, parallel execution and scale out (by container), is that correct ? so no need ETL tools any more ???

the new MariaDB X3 platform seems can even ignore ETL process as it can stream data directly form OLTP to OLAP, so not need ETL anymore?
0
Hello,

You can see I have commented out a couple of tables.  The  B.EMPLID = '4373198'
here does not have a residency - even with a left outer join he does not appear. What needs to be done for him to appear in the result set?

SELECT DISTINCT B.EMPLID  
 , T.FIRST_NAME_SRCH  
 , T.LAST_NAME_SRCH  
 , B.STRM  
 , B.DESCR  
 , B.CLASS_NBR  
 , B.SUBJECT  
 , B.CATALOG_NBR  
 , B.CLASS_SECTION  
 , B.ENRL_STATUS_REASON  AS STATUS
 , X.XLATSHORTNAME AS ENRL_STATUS_REASON  
 , B.ENRL_ACTN_RSN_LAST AS ActionReasonLastStatus  
  , T.PHONE  
 , U.EMAIL_ADDR  
 , B.ENRL_ADD_DT  
 , B.ENRL_DROP_DT  
 , A.ACCOUNT_BALANCE
  , VW.DESCR
 , VW.REF1_DESCR
 , (  
 SELECT O.COMMENTS  
  FROM PS_PERSON_COMMENT O  
 WHERE B.EMPLID = COMMON_ID  
   AND ADMIN_FUNCTION = 'SFAC'  
   AND CMNT_CATEGORY = 'FYI'  
   AND COMMENT_DT <= GETDATE()  
   AND COMMENTS IS NOT NULL  
   AND SEQ_3C = (  
 SELECT (MAX(SEQ_3C))  
  FROM PS_PERSON_COMMENT O2  
 WHERE O2.COMMON_ID = O.COMMON_ID  
   AND ADMIN_FUNCTION = 'SFAC'  
   AND CMNT_CATEGORY = 'FYI'  
   AND COMMENT_DT <= GETDATE() ))
   --,R.RESIDENCY
  -- ,S.SRVC_IND_CD
  -- ,MAX(SRVC_IND_DTTM)
  FROM PS_CLASS_TBL_SE_VW  B
LEFT OUTER JOIN XLATTABLE_VW X ON B.ENRL_STATUS_REASON = X.FIELDVALUE
LEFT OUTER JOIN PS_PERSONAL_DATA T ON B.EMPLID = T.EMPLID
LEFT OUTER JOIN PS_EMAIL_ADDRESSES U ON B.EMPLID = U.EMPLID  
LEFT OUTER JOIN PS_ACCOUNT_TOT_VW A ON B.EMPLID = A.EMPLID
LEFT OUTER JOIN PS_ITEM_SF_VW VW  …
0
Hi Experts

Could you give me an overall knowledge on how to use R language to obtain data from Facebook ?

Thanks in advance.
0
OWASP: Forgery and Phishing
LVL 19
OWASP: Forgery and Phishing

Learn the techniques to avoid forgery and phishing attacks and the types of attacks an application or network may face.

/usr/local/sbin/smsbox -v 4 /home/admin/web/mysite.com/kannel/kannel.conf
2019-05-29 08:17:42 [2871] [0] PANIC: Failed to open HTTP socket
2019-05-29 08:17:42 [2871] [0] PANIC: /usr/local/sbin/smsbox(gw_panic+0x145) [0x438f05]
2019-05-29 08:17:42 [2871] [0] PANIC: /usr/local/sbin/smsbox(main+0x128d) [0x40e7cd]
2019-05-29 08:17:42 [2871] [0] PANIC: /lib64/libc.so.6(__libc_start_main+0xf5) [0x7f7d88b9e445]
2019-05-29 08:17:42 [2871] [0] PANIC: /usr/local/sbin/smsbox() [0x40ead2]
[root@sms-api ~]# /usr/local/sbin/bearerbox -v 4 /home/admin/web/mysite.com/kannel/kannel.conf
2019-05-29 08:18:03 [2872] [3] PANIC: Could not open smsbox port 13001
2019-05-29 08:18:03 [2872] [3] PANIC: /usr/local/sbin/bearerbox(gw_panic+0x145) [0x47d8c5]
2019-05-29 08:18:03 [2872] [3] PANIC: /usr/local/sbin/bearerbox() [0x41b638]
2019-05-29 08:18:03 [2872] [3] PANIC: /usr/local/sbin/bearerbox() [0x47b41f]
2019-05-29 08:18:03 [2872] [3] PANIC: /lib64/libpthread.so.0(+0x7e25) [0x7fe3f9e54e25]
2019-05-29 08:18:03 [2872] [3] PANIC: /lib64/libc.so.6(clone+0x6d) [0x7fe3f8f99bad]
  i run command to see process active and  why this happend.

tcp        0      0 0.0.0.0:2525            0.0.0.0:*               LISTEN      779/exim
tcp        0      0 0.0.0.0:13000           0.0.0.0:*               LISTEN      2182/bearerbox
tcp        0      0 0.0.0.0:13001           0.0.0.0:*               LISTEN      2182/bearerbox
tcp        0      0 0.0.0.0:3306            0.0.0.0:*               LISTEN   …
0
Hi Experts

I am new to R Script and coding, just inherited some R Code that i which plots perfectly fine and gives the correct results. I want to have the ability to show the x and y values when a user hoovers the mouse cursor over the line.

I have found a link to a articles that describe how to carry out the necessary step but having no luck at all..
[url=" https://www.r-graph-gallery.com/124-change-hover-text-in-plotly/"]


my r code.
library(dplyr)
library(ggplot2)
library(survival)
library(survminer)
library(grid)
library(gridExtra)
library(plotly)
pc <- dataset
fstat <- pc %>% mutate(fstatus = case_when(OUTCOMETYPE=="Revised" ~ 1,TRUE ~ 0))
pmpa <- fstat %>% select(PRIMARYPROCEDUREID,PRIMARYTOOUTCOMEYEARS,fstatus,OUTCOMETYPE)
if(nrow(pmpa) < 4){
d <- pmpa %>% select(PRIMARYPROCEDUREID,PRIMARYTOOUTCOMEYEARS,OUTCOMETYPE) %>% mutate(INSUFFICIENTDATA = "Summary Results")
h = head(d[,2:4])
grid.table(h)
}else{
fit <- survfit(Surv(PRIMARYTOOUTCOMEYEARS,fstatus)~1,data = pmpa) 
ggsurv <- ggsurvplot(fit,
           ylab="Patient Analysis",
           xlab="Time (Years)",
           break.time.by = 1,
           xlim = c(0,max(fit$time)),
           surv.scale = "percent",
           legend.title = "Kaplan-Meier",
           legend.labs = "",
           risk.table = TRUE,
           fontsize = 3,
           font.tickslab = c(10, "plain"),
           risk.table.y.text = FALSE,
           fun = "event"
           )
ggsurv$plot <- ggsurv$plot + theme(plot.title = 

Open in new window

0
If you had to consider all the myriad of stock trading indicators out there that many novice and advanced traders alike base their trading on, and you had to group that huge number of indicators into the broadest possible major categories, what would those categories be?

I'm thinking there may only be two (2) categories off the top of my head:  Price and Volume.

What do you think?
0
Guys,
I like to know how and at what scenarios Pythons and R that embedded in sql server 2017 can really meaningful to be use? I'm still using sql 2014 and running sql reporting services to produces end report to customer  and I can says 100% of data analysis that we have performed  were generated from T-sql.
Actually I wonder how this R and Python in sql 2017 would assist me to speed up or create more meaningful data for customer as from my experiences T-sql is doing more than enough for me to provides even complex reports to end users.
If anyone  here are able to shed some lights I maybe have more explanation and reason to upgrade to sql 2017.
0
I've installed the rattle package and run this code.
library(rattle)
test <- c(1,2,3,4,5,6)
test
test2 <- binning(test,4,method = "quantile",ordered = FALSE)
test2

Open in new window


This is the output I get.

[1] 1.000000 1.916667 3.500000 5.083333 6.000000
Levels: [1,1.92] (1.92,3.5] (3.5,5.08] (5.08,6]

Open in new window

I understand that 3.5 is the median.  Where do 1.92 and 5.08 come from?
0
Hi,

I have a file with extension .dta

I need to analyse the data in excel

I've downloaded Stata and would like to know how to convert the .dta to a .xls or .csv

Thanks
Seamus
0

Statistical Packages

153

Solutions

331

Contributors

Statistical packages are software titles, such as JMP and GNU Octave, and programming languages, such as MATLAB, R and SAS, that are used to discover, explore and analyze data and suggest useful conclusions, either to learn something unexpected or to confirm a hypothesis. The field includes the design and analysis of techniques to give approximate but accurate solutions to hard problems in statistics, econometrics, time-series, optimization and 2D- and 3D-visualization. Data analysis has multiple facets and approaches, encompassing diverse techniques under a variety of names, in different business, science, and social science domains.